/* 韩风聊天室 · 液态玻璃 / 深色渐变
   ---------------------------------------------------- */

:root {
    --bg: #07080d;
    --bg-2: #0b0c14;
    --ink: #edeaf7;
    --dim: #9a98ad;
    --faint: #6d6b80;
    --line: rgba(255, 255, 255, .09);
    --line-soft: rgba(255, 255, 255, .055);
    --glass: rgba(255, 255, 255, .045);
    --glass-2: rgba(255, 255, 255, .075);
    --accent: #7c5cff;
    --accent-2: #22d3ee;
    --accent-3: #ff6b8b;
    --ok: #4fd1a5;
    --warn: #efb45e;
    --danger: #ff6b6b;
    --r-lg: 22px;
    --r-md: 16px;
    --r-sm: 10px;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
    --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: rgba(124, 92, 255, .35); }

/* ---------- 背景光晕 ---------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 15% 0%, #12102a 0%, transparent 55%),
        radial-gradient(90% 70% at 90% 10%, #08202a 0%, transparent 50%),
        linear-gradient(180deg, #08090f 0%, #06070c 60%, #05060a 100%);
}
.aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
}
.aurora .a1 { width: 46vw; height: 46vw; left: -10vw; top: -12vw; background: radial-gradient(circle, #4a30c8, transparent 65%); }
.aurora .a2 { width: 40vw; height: 40vw; right: -8vw; top: 6vh; background: radial-gradient(circle, #0e6b78, transparent 62%); opacity: .4; }
.aurora .a3 { width: 50vw; height: 40vw; left: 30vw; bottom: -20vw; background: radial-gradient(circle, #4a1b4f, transparent 60%); opacity: .35; }
.aurora .grain {
    position: absolute; inset: 0;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='n' opacity='.035'/%3E%3C/svg%3E");
}

.glass {
    background: var(--glass);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 9, 15, .62);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { position: relative; width: 30px; height: 22px; display: block; }
.brand-mark i {
    position: absolute; top: 2px; width: 18px; height: 18px; border-radius: 50%;
    mix-blend-mode: screen;
}
.brand-mark i:first-child { left: 0; background: linear-gradient(135deg, #6d4dff, #a56bff); }
.brand-mark i:last-child { right: 0; background: linear-gradient(135deg, #22d3ee, #4b8dff); opacity: .85; }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text small { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--faint); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
    padding: 7px 13px; border-radius: 999px; font-size: 13.5px; color: var(--dim);
    transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav a.on { color: var(--ink); background: rgba(124, 92, 255, .16); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .28); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid transparent; cursor: pointer;
    border-radius: 999px; font-size: 13.5px;
    padding: 9px 18px; transition: transform .18s, background .2s, border-color .2s, box-shadow .2s;
    background: transparent; color: var(--ink); white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-solid {
    background: linear-gradient(135deg, #7957ff, #5a3cf0);
    box-shadow: 0 8px 24px -12px rgba(110, 80, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-solid:hover { box-shadow: 0 12px 30px -12px rgba(120, 90, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { border-color: var(--line); color: var(--dim); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-xs { padding: 5px 11px; font-size: 12px; }
.btn-block { width: 100%; }

/* 用户菜单 */
.usermenu { position: relative; }
.usermenu summary {
    display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
    padding: 4px 10px 4px 5px; border-radius: 999px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04); transition: background .2s;
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: rgba(255, 255, 255, .08); }
.usermenu .uname { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.usermenu .uname em {
    font-style: normal; font-size: 10px; color: #cbb8ff; padding: 1px 6px;
    border: 1px solid rgba(124, 92, 255, .4); border-radius: 4px; background: rgba(124, 92, 255, .12);
}
.menu {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 168px; border-radius: 14px; padding: 6px;
    box-shadow: var(--shadow); background: rgba(16, 16, 26, .92);
    z-index: 60;
}
.menu a, .menu .menu-item {
    display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0;
    background: none; border-radius: 9px; font-size: 13px; color: var(--dim); cursor: pointer;
}
.menu a:hover, .menu .menu-item:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }

.avatar {
    --tone: #7c5cff;
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: #fff;
    background: radial-gradient(120% 120% at 20% 15%, color-mix(in srgb, var(--tone) 70%, #fff 30%), var(--tone) 55%, color-mix(in srgb, var(--tone) 70%, #000 30%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px -6px var(--tone);
    letter-spacing: .02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 68px; height: 68px; font-size: 26px; }

/* ---------- 提示条 ---------- */
.toasts {
    position: fixed; bottom: 26px; right: 22px; z-index: 80;
    display: flex; flex-direction: column-reverse; gap: 9px; max-width: 340px;
}
.toast {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px;
    border-radius: 12px; border: 1px solid var(--line);
    background: rgba(18, 18, 28, .9); backdrop-filter: blur(14px);
    box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1);
}
.toast p { font-size: 13px; }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); flex-shrink: 0; }
.toast.err .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.toast-x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- 页面骨架 ---------- */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 44px 24px 70px; }

.eyebrow {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em;
    color: var(--faint); text-transform: uppercase; margin-bottom: 14px;
}
.eyebrow .line { width: 26px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.mono { font-family: var(--mono); }
.dim { color: var(--faint); }
.muted { color: var(--dim); }
.pad { padding: 22px; }
.hint { font-size: 12px; color: var(--faint); }

/* ---------- 首页 ---------- */
.hero {
    display: grid; grid-template-columns: 1.35fr .65fr; gap: 40px;
    align-items: end; padding: 18px 0 52px;
}
.hero h1 {
    font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -.03em;
    font-weight: 650;
    background: linear-gradient(100deg, #fff 10%, #cfc6ff 45%, #9fdcf0 78%, #fff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 200% 100%;
}
.hero-sub { margin-top: 16px; color: var(--dim); font-size: 15.5px; max-width: 460px; }
.notice {
    margin-top: 26px; display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .03);
    max-width: 520px;
}
.notice-label {
    flex-shrink: 0; font-size: 11px; letter-spacing: .08em; color: #cbb8ff;
    padding: 2px 8px; border-radius: 5px; background: rgba(124, 92, 255, .14); margin-top: 2px;
}
.notice p { font-size: 13px; color: var(--dim); }

.hero-stats {
    border-radius: var(--r-lg); padding: 22px 24px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num { font-family: var(--mono); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.stat-cap { font-size: 11px; color: var(--faint); letter-spacing: .04em; }

.section-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; margin-bottom: 20px;
}
.section-bar h2 { font-size: 17px; font-weight: 600; }
.search {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--line); border-radius: 999px;
    padding: 7px 14px; background: rgba(255, 255, 255, .035);
    color: var(--faint); transition: border-color .2s, background .2s;
}
.search:focus-within { border-color: rgba(124, 92, 255, .45); background: rgba(255, 255, 255, .06); }
.search input {
    border: 0; background: none; outline: none; font-size: 13px; color: var(--ink);
    width: 210px;
}
.search input::placeholder { color: var(--faint); }
.search .clear { font-size: 11.5px; color: var(--faint); }
.search .clear:hover { color: var(--ink); }

.pending-note {
    display: flex; gap: 12px; align-items: flex-start;
    border-radius: 12px; padding: 12px 16px; margin-bottom: 18px;
}
.pending-note p { font-size: 13px; color: var(--dim); }
.pending-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-top: 8px; box-shadow: 0 0 10px var(--warn); }

.room-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: 18px;
}
.room-card {
    --c1: #5b6bd6; --c2: #8f6bff;
    position: relative; border-radius: 20px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .28s cubic-bezier(.2, .8, .3, 1), border-color .28s, box-shadow .28s;
    animation: cardIn .6s cubic-bezier(.2, .8, .3, 1) both;
    animation-delay: var(--d, 0ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.room-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 255, 255, .03);
}
.room-cover {
    position: relative; height: 96px; overflow: hidden;
    background:
        radial-gradient(80% 120% at 15% 10%, color-mix(in srgb, var(--c2) 55%, transparent), transparent 60%),
        linear-gradient(120deg, var(--c1), color-mix(in srgb, var(--c2) 80%, #0b0b14 20%));
}
.cover-orb {
    position: absolute; width: 150px; height: 150px; border-radius: 50%;
    right: -30px; top: -60px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .06) 55%, transparent 70%);
    filter: blur(2px); opacity: .7;
}
.cover-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(80% 120% at 20% 0%, #000 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(80% 120% at 20% 0%, #000 20%, transparent 80%);
}
.room-tag {
    position: absolute; left: 16px; bottom: 12px;
    font-size: 11px; letter-spacing: .04em; color: #fff;
    padding: 3px 9px; border-radius: 6px;
    background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(6px);
}
.room-index {
    position: absolute; right: 16px; bottom: 8px;
    font-family: var(--mono); font-size: 26px; font-weight: 500;
    color: rgba(255, 255, 255, .22); line-height: 1;
}
.room-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.room-body h3 { font-size: 16.5px; letter-spacing: -.01em; }
.room-intro {
    font-size: 12.8px; color: var(--dim); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 41px;
}
.room-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; font-size: 11.5px; color: var(--faint); }
.room-foot .meta { display: inline-flex; align-items: center; gap: 5px; }
.room-foot .time { margin-left: auto; }
.mi-msg, .mi-user { width: 13px; height: 13px; display: inline-block; opacity: .62; flex-shrink: 0; }
.mi-msg svg, .mi-user svg { width: 13px; height: 13px; display: block; }
.room-enter {
    position: absolute; right: 16px; bottom: 16px;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #fff; opacity: 0; transform: translateX(-6px);
    transition: opacity .25s, transform .25s;
}
.room-card:hover .room-enter { opacity: .9; transform: none; }

.empty { text-align: center; padding: 70px 0; color: var(--dim); }
.empty h3 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 13px; }
.empty-glyph { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.empty-glyph i { display: block; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.empty-glyph i:nth-child(2) { transform: translateY(-6px); background: rgba(124, 92, 255, .13); border-color: rgba(124, 92, 255, .3); }

/* ---------- 登录注册 ---------- */
.auth {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px;
    align-items: center; padding: 24px 0 40px;
}
.auth-aside h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.28; letter-spacing: -.03em; font-weight: 650; }
.auth-aside > p { margin-top: 18px; color: var(--dim); font-size: 14.5px; max-width: 420px; }
.auth-list { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-list li { display: flex; gap: 12px; font-size: 13px; color: var(--dim); align-items: baseline; }
.auth-list li span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.auth-quote {
    margin-top: 38px; padding-left: 18px; border-left: 1px solid rgba(124, 92, 255, .35);
    max-width: 360px;
}
.auth-quote p { font-size: 13.5px; color: #c9c3de; font-style: italic; }
.auth-quote span { font-size: 11.5px; color: var(--faint); }

.auth-panel { border-radius: var(--r-lg); padding: 32px 30px 34px; box-shadow: var(--shadow); }
.auth-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-soft); margin-bottom: 26px; }
.auth-tabs a {
    flex: 1; text-align: center; padding: 9px 0; border-radius: 999px;
    font-size: 13.5px; color: var(--dim); transition: background .2s, color .2s;
}
.auth-tabs a.on { background: rgba(255, 255, 255, .09); color: var(--ink); }
.auth-panel h2 { font-size: 21px; margin-bottom: 6px; }
.form-note { font-size: 12.5px; color: var(--faint); margin-bottom: 22px; }

.form { display: flex; flex-direction: column; gap: 15px; }
.form label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form label > span { font-size: 12px; color: var(--dim); letter-spacing: .02em; display: flex; gap: 6px; align-items: center; }
.form label > span em { font-style: normal; font-size: 10.5px; color: var(--faint); }
.form input[type="text"], .form input[type="password"], .form input[type="search"], .form textarea, .form select {
    width: 100%; border: 1px solid var(--line); border-radius: 11px;
    background: rgba(255, 255, 255, .035); padding: 11px 13px; font-size: 13.5px;
    outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
    color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus {
    border-color: rgba(124, 92, 255, .5); background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .12);
}
.form input::placeholder, .form textarea::placeholder { color: var(--faint); }
.form textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form select option { background: #14141f; color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form > .btn { margin-top: 4px; }
.form-switch { margin-top: 20px; font-size: 12.5px; color: var(--faint); text-align: center; }
.form-switch a { color: #a893ff; }
.form-switch a:hover { text-decoration: underline; }

/* 通用表单栅格 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 4px; }

.panel { border-radius: var(--r-lg); padding: 26px 28px; }
.panel.nopad { padding: 0; overflow: hidden; }
.panel-title { font-size: 15px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head .panel-title { margin: 0; }
.link-sm { font-size: 12px; color: var(--faint); }
.link-sm:hover { color: var(--ink); }
.divider { height: 1px; background: var(--line-soft); margin: 26px 0; }

/* 窄页 */
.narrow { max-width: 760px; margin: 0 auto; }
.narrow.center { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.page-head p { font-size: 13px; color: var(--dim); margin-top: 8px; }

.tone-picker { display: flex; gap: 9px; align-items: center; padding: 4px 0; }
.tone-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tone {
    display: block; width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .16);
    transition: transform .2s, box-shadow .2s;
}
.tone:hover { transform: translateY(-2px); }
.tone.t1 { background: linear-gradient(135deg, #5b6bd6, #8f6bff); }
.tone.t2 { background: linear-gradient(135deg, #2b8f86, #4fd1a5); }
.tone.t3 { background: linear-gradient(135deg, #3a5a8f, #5bb6e8); }
.tone.t4 { background: linear-gradient(135deg, #8f4a63, #e07b9a); }
.tone.t5 { background: linear-gradient(135deg, #8a6a3a, #e0b070); }
.tone-picker input:checked + .tone { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(255, 255, 255, .5); transform: translateY(-2px); }

/* ---------- 个人中心 ---------- */
.profile-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; align-items: start; }
.profile-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.profile-card h2 { font-size: 19px; margin-top: 8px; }
.profile-card .mono { font-size: 12px; color: var(--faint); }
.badges { display: flex; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.badge {
    display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 5px;
    font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-soft);
}
.badge-ok { color: #8be5c6; background: rgba(79, 209, 165, .1); border-color: rgba(79, 209, 165, .25); }
.badge-off { color: #ff9b9b; background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .25); }
.badge-wait { color: #f2c98a; background: rgba(239, 180, 94, .1); border-color: rgba(239, 180, 94, .28); }
.badge-admin { color: #c3b0ff; background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .3); }
.facts { width: 100%; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 9px; }
.facts div { display: flex; justify-content: space-between; font-size: 12.5px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; color: var(--dim); font-family: var(--mono); font-size: 12px; }

/* ---------- 聊天室 ---------- */
.room-shell {
    display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 18px;
    height: calc(100vh - 66px - 108px);
    min-height: 520px;
}
.room-side { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); width: fit-content; }
.back-link:hover { color: var(--ink); }
.side-cover {
    --c1: #5b6bd6; --c2: #8f6bff;
    position: relative; height: 118px; border-radius: var(--r-md); overflow: hidden;
    background:
        radial-gradient(70% 120% at 20% 0%, color-mix(in srgb, var(--c2) 60%, transparent), transparent 65%),
        linear-gradient(120deg, var(--c1), color-mix(in srgb, var(--c2) 70%, #0a0a12 30%));
}
.cover-rings { position: absolute; inset: 0; }
.cover-rings i {
    position: absolute; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%;
}
.cover-rings i:nth-child(1) { width: 120px; height: 120px; right: -20px; top: -30px; }
.cover-rings i:nth-child(2) { width: 74px; height: 74px; right: 6px; top: 4px; }
.cover-rings i:nth-child(3) { width: 40px; height: 40px; right: 24px; top: 22px; background: rgba(255, 255, 255, .06); }
.side-title { font-size: 19px; letter-spacing: -.01em; }
.side-intro { font-size: 12.5px; color: var(--dim); line-height: 1.65; }
.side-facts { display: flex; gap: 18px; margin: 4px 0 0; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.side-facts div { display: flex; flex-direction: column; gap: 2px; }
.side-facts dt { font-size: 10.5px; color: var(--faint); }
.side-facts dd { margin: 0; font-family: var(--mono); font-size: 14px; }
.side-people, .side-rule { display: flex; flex-direction: column; gap: 9px; }
.cap { font-size: 10.5px; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-person {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px;
    border-radius: 999px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line-soft);
    font-size: 11.5px; color: var(--dim);
}
.side-rule p { font-size: 11.8px; color: var(--faint); line-height: 1.7; }

.chat-panel {
    border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden;
    min-height: 0; box-shadow: var(--shadow);
}
.chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px; border-bottom: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, .02);
}
.chat-head h3 { font-size: 16px; }
.chat-head .sub { font-size: 11.8px; color: var(--faint); margin-top: 3px; }
.chat-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--dim); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.msg-list {
    flex: 1; overflow-y: auto; padding: 22px 22px 8px;
    display: flex; flex-direction: column; gap: 16px;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent;
}
.msg-list::-webkit-scrollbar { width: 6px; }
.msg-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 3px; }
.msg-list::before { content: ""; margin-top: auto; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.msg-main { min-width: 0; }
.msg-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-name { font-size: 12px; color: var(--dim); }
.msg-time { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.bubble {
    padding: 9px 13px; border-radius: 4px 14px 14px 14px;
    background: rgba(255, 255, 255, .055); border: 1px solid var(--line-soft);
    font-size: 13.5px; line-height: 1.65; color: #e6e3f2;
    word-break: break-word; white-space: pre-wrap;
}
.msg.self { margin-left: auto; flex-direction: row-reverse; }
.msg.self .msg-main { text-align: right; }
.msg.self .msg-top { flex-direction: row-reverse; }
.msg.self .bubble {
    border-radius: 14px 4px 14px 14px;
    background: linear-gradient(135deg, rgba(124, 92, 255, .26), rgba(80, 60, 200, .18));
    border-color: rgba(124, 92, 255, .32); color: #f2efff;
}
.chat-blank { margin: auto; text-align: center; color: var(--faint); padding: 40px 0; }
.chat-blank .big { font-size: 16px; color: var(--dim); margin-bottom: 6px; }
.chat-blank p { font-size: 12.5px; }

.composer { padding: 14px 18px 16px; border-top: 1px solid var(--line-soft); background: rgba(8, 9, 14, .35); }
.composer-box {
    display: flex; align-items: flex-end; gap: 10px;
    border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04);
    padding: 8px 8px 8px 14px; transition: border-color .2s, box-shadow .2s;
}
.composer-box:focus-within { border-color: rgba(124, 92, 255, .45); box-shadow: 0 0 0 3px rgba(124, 92, 255, .1); }
.composer textarea {
    flex: 1; border: 0; background: none; outline: none; resize: none;
    font-size: 13.5px; line-height: 1.6; padding: 6px 0; max-height: 120px; color: var(--ink);
}
.composer textarea::placeholder { color: var(--faint); }
.composer-side { display: flex; align-items: center; gap: 10px; }
.count { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.send-btn {
    display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
    padding: 8px 14px; border-radius: 10px; font-size: 12.5px; color: #fff;
    background: linear-gradient(135deg, #7957ff, #5a3cf0);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: opacity .2s, transform .16s;
}
.send-btn:hover { transform: translateY(-1px); }
.send-btn:disabled { opacity: .45; cursor: default; transform: none; }
.composer-hint { font-size: 11px; color: var(--danger); height: 14px; margin-top: 5px; }

/* ---------- 后台 ---------- */
.admin { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-nav {
    border-radius: var(--r-md); padding: 16px 12px; position: sticky; top: 84px;
    display: flex; flex-direction: column; gap: 16px;
}
.admin-me { display: flex; align-items: center; gap: 9px; padding: 2px 6px 12px; border-bottom: 1px solid var(--line-soft); }
.admin-me strong { display: block; font-size: 13px; }
.admin-me small { font-size: 10.5px; color: var(--faint); letter-spacing: .06em; }
.admin-nav nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav nav a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border-radius: 9px; font-size: 13px; color: var(--dim);
    transition: background .2s, color .2s;
}
.admin-nav nav a:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.admin-nav nav a.on { background: rgba(124, 92, 255, .14); color: #e6dfff; box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .22); }
.nav-badge {
    font-style: normal; font-family: var(--mono); font-size: 10px; line-height: 1.6;
    padding: 0 6px; border-radius: 5px; background: rgba(239, 180, 94, .16); color: #f2c98a;
}
.admin-exit { margin-top: auto; font-size: 11.5px; color: var(--faint); padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.admin-exit:hover { color: var(--ink); }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-head h1 { font-size: 27px; letter-spacing: -.02em; }
.admin-head p { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.admin-head .search { margin-bottom: 2px; }
.admin-head .search input { width: 180px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-card .cap { font-size: 10.5px; color: var(--faint); letter-spacing: .1em; }
.stat-card strong { font-family: var(--mono); font-size: 25px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.stat-card strong.txt { font-family: var(--font); font-size: 17px; padding: 4px 0 0; }
.stat-card small { font-size: 11px; color: var(--faint); }

.review-list { display: flex; flex-direction: column; }
.review-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 0;
    border-top: 1px solid var(--line-soft);
}
.review-item:first-child { border-top: 0; }
.review-swatch { width: 6px; height: 40px; border-radius: 3px; background: linear-gradient(180deg, var(--c1), var(--c2)); flex-shrink: 0; }
.review-info { flex: 1; min-width: 0; }
.review-info strong { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.review-info p { font-size: 12px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-info small { font-size: 10.5px; color: var(--faint); }
.review-acts { display: flex; gap: 6px; flex-shrink: 0; }
.tag-lite { font-style: normal; font-size: 10px; color: var(--dim); padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .06); font-weight: 400; }

.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th.ta-r, .table td.ta-r { text-align: right; }
.table th {
    text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .1em; color: var(--faint);
    padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .025);
    text-transform: uppercase;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table tr:last-child td { border-bottom: 0; }
.row-self { background: rgba(124, 92, 255, .06); }
.ta-r { text-align: right; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user strong { font-size: 13px; font-weight: 500; display: block; }
.cell-user small { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.mini-cover { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex-shrink: 0; }

.ops { position: relative; display: inline-block; }
.ops > summary { list-style: none; display: inline-flex; }
.ops > summary::-webkit-details-marker { display: none; }
.ops-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
    min-width: 190px; padding: 6px; border-radius: 12px;
    background: rgba(18, 18, 28, .95); box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.ops-menu form { margin: 0; }
.ops-menu .menu-item {
    display: block; width: 100%; text-align: left; padding: 8px 11px; border: 0;
    background: none; border-radius: 8px; font-size: 12.5px; color: var(--dim); cursor: pointer;
}
.ops-menu .menu-item:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
.ops-menu .danger:hover { background: rgba(255, 107, 107, .12); color: #ff9b9b; }
.ops-inline { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 6px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.ops-inline input {
    width: 100%; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .05);
    padding: 7px 10px; font-size: 12px; outline: none; color: var(--ink);
}
.edit-form { min-width: 240px; gap: 8px; padding: 12px; }
.edit-form label { display: flex; flex-direction: column; gap: 4px; }
.edit-form label span { font-size: 10.5px; color: var(--faint); }
.edit-form input, .edit-form textarea, .edit-form select {
    width: 100%; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .05);
    padding: 7px 9px; font-size: 12px; outline: none; color: var(--ink);
}
.edit-form textarea { resize: vertical; }

.switch-row { display: flex; flex-direction: column; gap: 12px; margin: 4px 0; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
    width: 40px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .1);
    position: relative; flex-shrink: 0; transition: background .22s; border: 1px solid var(--line);
}
.switch .track::after {
    content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px;
    border-radius: 50%; background: #cfcbe2; transition: transform .22s, background .22s;
}
.switch input:checked + .track { background: rgba(124, 92, 255, .55); border-color: rgba(124, 92, 255, .7); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch-text { display: flex; flex-direction: column; gap: 1px; }
.switch-row .switch { flex-direction: row; align-items: center; gap: 12px; }
.switch-row .switch .track { flex: 0 0 40px; }
.switch-row .switch .switch-text { flex: 1; align-items: flex-start; text-align: left; }
.switch-text strong { font-size: 13px; font-weight: 500; }
.switch-text small { font-size: 11px; color: var(--faint); }

.notice-panel { text-align: center; padding: 48px 34px; }
.notice-panel h1 { font-size: 24px; margin-bottom: 10px; }
.notice-panel p { font-size: 13px; color: var(--dim); margin-bottom: 24px; }

/* ---------- 页脚 ---------- */
.foot {
    border-top: 1px solid var(--line-soft);
    margin-top: auto; padding: 20px 24px;
    display: flex; justify-content: space-between; gap: 14px;
    max-width: 1180px; width: 100%; margin-left: auto; margin-right: auto;
    font-size: 11.5px; color: var(--faint);
}
.foot-brand { color: var(--dim); }
.foot .sep { margin: 0 8px; opacity: .4; }
.foot-meta { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; gap: 26px; align-items: start; }
    .hero-stats { max-width: 420px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .topbar-inner { gap: 14px; padding: 0 16px; height: 60px; }
    .brand-text small { display: none; }
    .nav { margin-left: 0; flex-shrink: 1; min-width: 0; }
    .nav a { padding: 6px 9px; font-size: 12.5px; white-space: nowrap; }
    .topbar-right { flex-shrink: 0; }
    .toasts { top: auto; bottom: 14px; left: 14px; right: 14px; max-width: none; }
    .page { padding: 28px 16px 48px; }
    .auth { grid-template-columns: 1fr; gap: 28px; }
    .auth-aside h1 { font-size: 27px; }
    .auth-aside > p, .auth-list, .auth-quote { display: none; }
    .auth-panel { padding: 24px 20px 26px; }
    .room-shell { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .room-side { display: none; }
    .chat-panel { height: calc(100vh - 60px - 40px); min-height: 480px; }
    .chat-head { padding: 14px 16px; }
    .chat-head .sub { display: none; }
    .msg-list { padding: 16px 14px 6px; }
    .msg { max-width: 88%; }
    .composer { padding: 10px 12px 12px; }
    .admin { grid-template-columns: 1fr; }
    .admin-nav { position: static; padding: 10px; }
    .admin-nav nav { flex-direction: row; overflow-x: auto; gap: 4px; }
    .admin-nav nav a { white-space: nowrap; padding: 8px 11px; }
    .admin-me, .admin-exit { display: none; }
    .admin-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .profile-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 10px 10px; }
    .table th:nth-child(4), .table td:nth-child(4),
    .table th:nth-child(5), .table td:nth-child(5) { display: none; }
    .review-item { flex-wrap: wrap; }
    .review-acts { width: 100%; justify-content: flex-end; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .foot { flex-direction: column; gap: 6px; }
    .toasts { left: 14px; right: 14px; top: auto; bottom: 14px; max-width: none; }
}

@media (max-width: 560px) {
    .brand-text { display: none; }
    .nav a { font-size: 12px; padding: 6px 8px; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); padding: 16px; }
    .stat-num { font-size: 20px; }
    .section-bar { flex-direction: column; align-items: stretch; gap: 12px; }
    .search { width: 100%; }
    .search input { width: 100%; }
    .room-grid { grid-template-columns: 1fr; }
    .usermenu .uname { display: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .chat-live { display: none; }
}
