/* ==========================================================================
   片刻私语 · Moments Whisper — 蓝白设计系统
   ========================================================================== */

:root {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-500: #3b82f6;
  --brand-400: #60a5fa;
  --brand-soft: #eaf2ff;
  --brand-softer: #f4f9ff;
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #eef5ff;
  --ink: #0b1a30;
  --ink-2: #22374f;
  --muted: #5f7391;
  --muted-2: #8ba0bb;
  --line: #e2ecfa;
  --line-strong: #cfdff5;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --radius: 20px;
  --radius-sm: 13px;
  --radius-xs: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 39, 80, .05), 0 10px 26px -22px rgba(15, 39, 80, .55);
  --shadow-md: 0 20px 50px -34px rgba(23, 63, 135, .5);
  --shadow-lg: 0 34px 90px -46px rgba(23, 63, 135, .6);
  --header-h: 72px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #071326;
  --surface: #0d1d35;
  --surface-2: #0a1830;
  --surface-3: #112441;
  --ink: #e8f0ff;
  --ink-2: #cbd9ee;
  --muted: #8fa6c6;
  --muted-2: #6f88a9;
  --line: #1b3253;
  --line-strong: #26456f;
  --brand-soft: #12294b;
  --brand-softer: #0b1c33;
  --brand-600: #93c5fd;
  --brand-700: #bfdbfe;
  --success-soft: #062a23;
  --danger-soft: #2c1017;
  --warning-soft: #2a2010;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -22px rgba(0, 0, 0, .8);
  --shadow-md: 0 20px 50px -30px rgba(0, 0, 0, .8);
  --shadow-lg: 0 34px 90px -40px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -12%, rgba(191, 219, 254, .55), transparent 60%),
    radial-gradient(900px 480px at 102% -4%, rgba(224, 242, 254, .8), transparent 58%),
    radial-gradient(800px 700px at 50% 110%, rgba(219, 234, 254, .45), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 520px at 8% -12%, rgba(30, 64, 175, .25), transparent 60%),
    radial-gradient(900px 480px at 102% -4%, rgba(8, 47, 73, .5), transparent 58%);
}

[data-theme="dark"] a,
[data-theme="dark"] .btn-link,
[data-theme="dark"] .link-more,
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .page-btn:hover,
[data-theme="dark"] .member-name .you,
[data-theme="dark"] .dm-member-go,
[data-theme="dark"] .admin-pager button:hover,
[data-theme="dark"] .settings-section-title { color: var(--brand-600); }
[data-theme="dark"] .btn-soft:hover { background: #17345c; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img { max-width: 100%; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0; }
::selection { background: rgba(37, 99, 235, .18); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* ---------- 基础控件 ---------- */

.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer;
  background: var(--btn-bg); color: var(--ink-2); text-decoration: none;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn .ico { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 12px 26px -14px rgba(37, 99, 235, .85);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 32px -14px rgba(37, 99, 235, .95); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--brand-600); }
.btn-soft { background: var(--brand-soft); color: var(--brand-600); border-color: transparent; }
.btn-soft:hover { background: #dfeaff; color: var(--brand-600); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; background: #b91c1c; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; min-height: 34px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-lg { padding: 14px 26px; min-height: 50px; font-size: 15px; border-radius: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  cursor: pointer; transition: .18s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--brand-600); }
.icon-btn .ico { width: 19px; height: 19px; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm .ico { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 999px; line-height: 1.4;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-600); }
.badge-owner { background: #fff7e6; color: #b45309; }
.badge-mod { background: #eef2ff; color: #4f46e5; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--surface-3); color: var(--muted-2); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--muted); background: var(--surface-3);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.chip .ico { width: 13px; height: 13px; }
.chip-lock { background: #eef6ff; color: #1d4ed8; }
.chip-muted { color: var(--muted-2); }

.avatar {
  --av-color: #2563eb;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(140deg, var(--av-color), color-mix(in srgb, var(--av-color) 62%, #fff));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  user-select: none;
}
.avatar-xs { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 15px; font-size: 19px; }
.avatar-xl { width: 68px; height: 68px; border-radius: 20px; font-size: 26px; }

.spinner {
  display: inline-block; width: 18px; height: 18px; flex: none;
  border: 2px solid rgba(37, 99, 235, .22); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 60px 20px; color: var(--muted); font-size: 13.5px;
}

.empty-state {
  text-align: center; padding: 56px 20px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.empty-state > .ico { width: 38px; height: 38px; color: var(--muted-2); margin-bottom: 12px; opacity: .8; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--ink-2); }
.empty-state p { font-size: 13.5px; max-width: 380px; margin: 0 auto 16px; }

/* ---------- 头部 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; flex: none; display: block; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-sub { font-size: 10px; font-weight: 600; color: var(--muted-2); letter-spacing: .14em; text-transform: uppercase; display: block; margin-top: -2px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); transition: .18s ease;
}
.nav-link:hover { background: var(--surface-3); color: var(--ink); }
.nav-link.active { color: var(--brand-600); background: var(--brand-soft); }
.nav-link .ico { width: 16px; height: 16px; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-divider { width: 1px; height: 22px; background: var(--line); margin-inline: 4px; }

.lang-select {
  appearance: none; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  padding: 7px 28px 7px 11px; border-radius: 9px; cursor: pointer;
}
[dir="rtl"] .lang-select { background-position: left 10px center; padding: 7px 11px 7px 28px; }

.user-chip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.user-chip:hover { border-color: var(--line-strong); }
.user-chip-name { font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 208px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 80;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: .16s ease;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 9px; border: 0; background: none;
  font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-align: start;
}
.menu-item:hover { background: var(--surface-3); color: var(--ink); }
.menu-item .ico { width: 16px; height: 16px; color: var(--muted); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-head { padding: 10px 11px 8px; }
.menu-head strong { display: block; font-size: 13px; }
.menu-head span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.mobile-only { display: none; }

/* ---------- 首页 ---------- */

.announce-bar {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #eff6ff, #f0f9ff);
  border-bottom: 1px solid #dbeafe;
  color: #1e40af; font-size: 13px; padding: calc(9px + env(safe-area-inset-top, 0px)) 0 9px;
}
[data-theme="dark"] .announce-bar { background: #0b1e38; color: #bfdbfe; border-color: #17345c; }
body.has-announcement .site-header { padding-top: 0; height: var(--header-h); }
.announce-bar .ico { width: 16px; height: 16px; flex: none; }
.announce-bar span { flex: 1; }

.hero { position: relative; padding: 80px 0 76px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border: 1px solid var(--line); color: var(--brand-600);
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 6px 13px; border-radius: 999px; box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); }
.hero-title {
  font-size: clamp(38px, 5.1vw, 62px);
  line-height: 1.06; letter-spacing: -.045em; font-weight: 800;
  margin-bottom: 22px;
}
.grad-text {
  background: linear-gradient(100deg, #1d4ed8 0%, #3b82f6 45%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .grad-text { background: linear-gradient(100deg, #93c5fd, #60a5fa 50%, #7dd3fc); -webkit-background-clip: text; background-clip: text; }
.hero-sub { font-size: clamp(15px, 1.4vw, 17.5px); color: var(--muted); max-width: 520px; line-height: 1.8; }
html[lang="ja"] .hero-title { font-size: clamp(34px, 4.6vw, 55px); letter-spacing: -.035em; line-height: 1.14; }
[dir="rtl"] .room-back .ico, [dir="rtl"] .page-back .ico, [dir="rtl"] #dm-back .ico, [dir="rtl"] .link-more .ico { transform: scaleX(-1); }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 12.5px; color: var(--muted-2); }
.hero-note .ico { width: 14px; height: 14px; color: #22c55e; }
.hero-stats { display: flex; gap: 28px; margin-top: 38px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }
.stat-num { font-size: 23px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--muted-2); }

.hero-stage { position: relative; min-height: 430px; display: flex; align-items: center; justify-content: center; }
.glow { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; pointer-events: none; }
.glow-a { width: 330px; height: 330px; background: #bfdbfe; top: 6%; right: 4%; }
.glow-b { width: 260px; height: 260px; background: #bae6fd; bottom: 2%; left: 2%; }
[data-theme="dark"] .glow-a { background: #1e3a8a; opacity: .5; }
[data-theme="dark"] .glow-b { background: #0c4a6e; opacity: .5; }

.chat-preview {
  position: relative; width: min(400px, 100%);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden;
  transform: rotate(-1.4deg); animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: rotate(-1.4deg) translateY(0); } 50% { transform: rotate(-.6deg) translateY(-9px); } }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.dots { display: flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #fca5a5; display: block; }
.dots i:nth-child(2) { background: #fcd34d; }
.dots i:nth-child(3) { background: #86efac; }
.preview-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-inline: auto; display: flex; align-items: center; gap: 6px; }
.preview-title .ico { width: 13px; height: 13px; color: #22c55e; }
.preview-body { padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 13px; background: radial-gradient(600px 200px at 50% 0%, var(--surface-2), var(--surface)); }
.preview-msg { display: flex; gap: 9px; align-items: flex-start; max-width: 88%; }
.preview-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.preview-msg .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.preview-bubble { background: var(--surface-3); border-radius: 4px 14px 14px 14px; padding: 9px 13px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.preview-msg.me .preview-bubble { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border-radius: 14px 4px 14px 14px; }
.preview-name { font-size: 10px; color: var(--muted-2); margin-bottom: 3px; display: flex; gap: 5px; align-items: center; }
.preview-input { display: flex; align-items: center; gap: 8px; margin: 14px 16px 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted-2); font-size: 12px; background: var(--surface-2); }
.preview-input .send-dot { margin-inline-start: auto; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #2563eb, #60a5fa); display: grid; place-items: center; color: #fff; }
.preview-input .send-dot .ico { width: 13px; height: 13px; }
.float-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-md); animation: floaty 6s ease-in-out infinite;
}
.float-chip .ico { width: 14px; height: 14px; color: var(--brand); }
.float-chip.a { top: 7%; left: -2%; animation-delay: -2s; }
.float-chip.b { bottom: 9%; right: -3%; animation-delay: -4s; }

.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.section-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.section-title { font-size: clamp(24px, 3vw, 33px); letter-spacing: -.03em; font-weight: 800; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 560px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }
.link-more .ico { width: 15px; height: 15px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); transition: .22s ease; position: relative; overflow: hidden;
}
.feature::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(280px 120px at 100% 0%, rgba(96, 165, 250, .12), transparent 70%);
  opacity: 0; transition: .22s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.feature:hover::after { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(140deg, #eff6ff, #dbeafe); color: #1d4ed8; margin-bottom: 16px;
  border: 1px solid #dbeafe;
}
[data-theme="dark"] .feature-icon { background: linear-gradient(140deg, #12294b, #173a68); border-color: #1d3f6b; color: #93c5fd; }
.feature-icon .ico { width: 21px; height: 21px; }
.feature h3 { font-size: 15.5px; margin-bottom: 7px; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.7; }

.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.room-card {
  min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 19px; box-shadow: var(--shadow-sm); color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 178px;
}
.room-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.room-card-top { display: flex; gap: 13px; align-items: flex-start; }
.room-mark {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff;
  background: linear-gradient(140deg, #2563eb, #60a5fa);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 10px 20px -12px rgba(37, 99, 235, .8);
}
.room-card-title { min-width: 0; }
.room-card-title h3 { font-size: 15.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card-title p { font-size: 12.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 19px; }
.room-card-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.meta-item .ico { width: 14px; height: 14px; color: var(--muted-2); }
.room-card-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 13px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.room-owner { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-inline-start: auto; max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.how-step { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.how-step .n {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: var(--brand-600); background: var(--brand-soft);
  margin-bottom: 14px;
}
.how-step h3 { font-size: 15px; margin-bottom: 6px; }
.how-step p { font-size: 13px; color: var(--muted); }

.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #1e40af, #2563eb 45%, #38bdf8 110%);
  border-radius: 26px; padding: 46px 48px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  box-shadow: 0 30px 70px -38px rgba(37, 99, 235, .8);
}
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none;
}
.cta-band::before { width: 260px; height: 260px; top: -120px; right: 10%; }
.cta-band::after { width: 180px; height: 180px; bottom: -110px; right: 32%; }
.cta-band h2 { color: #fff; font-size: clamp(23px, 3vw, 31px); margin-bottom: 8px; letter-spacing: -.03em; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: 14px; }
.cta-band .btn { position: relative; z-index: 1; background: #fff; color: #1d4ed8; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .5); }
.cta-band .btn:hover { color: #1e40af; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 24px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand strong { display: block; font-size: 14px; }
.footer-brand span { display: block; font-size: 11.5px; color: var(--muted-2); }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); }

/* ---------- 列表页 ---------- */

.page-shell { padding: 44px 0 70px; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.035em; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box .ico { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); pointer-events: none; }
.search-box input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--ink); outline: none; transition: .18s; }
[dir="rtl"] .search-box input { padding: 11px 40px 11px 14px; }
.search-box input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59, 130, 246, .1); }
.tabs { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.tab { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .16s; white-space: nowrap; }
.tab:hover { color: var(--ink-2); }
.tab.active { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-sm); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 34px; }
.page-btn { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.page-btn:hover { border-color: var(--line-strong); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 表单 ---------- */

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.form-card + .form-card { margin-top: 18px; }
.field { margin-bottom: 18px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field-label small { font-weight: 500; color: var(--muted-2); font-size: 11px; }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 11px 13px; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .textarea:focus, .select:focus { border-color: #93c5fd; background: var(--surface); box-shadow: 0 0 0 4px rgba(59, 130, 246, .1); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-inline-end: 34px; }
[dir="rtl"] .select { background-position: left 13px center; }
.input.is-invalid, .textarea.is-invalid { border-color: #fca5a5; box-shadow: 0 0 0 4px rgba(248, 113, 113, .1); }
.field-error { display: none; font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.field-error.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.form-actions .btn-primary { margin-inline-start: auto; }
.help { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.6; }
.hp-field { position: absolute !important; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check span small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong { display: block; font-size: 13.5px; font-weight: 600; }
.switch-row small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(19px); }
[dir="rtl"] .switch input:checked + i::after { transform: translateX(-19px); }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-btn { position: relative; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 10px; cursor: pointer; text-align: start; transition: .16s; }
.seg-btn strong { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 2px; }
.seg-btn small { display: block; font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.seg-btn:has(input:checked) strong { color: var(--brand-600); }

.captcha-box { display: flex; flex-direction: column; gap: 8px; }
.captcha-visual { position: relative; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 58px; }
.captcha-img { height: 46px; width: auto; border-radius: 8px; display: block; }
.captcha-math { font-size: 18px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); padding: 6px 12px; font-variant-numeric: tabular-nums; }
.captcha-refresh { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: var(--surface); }
.captcha-input { display: flex; align-items: center; gap: 10px; }
.captcha-input input { flex: 1; font: inherit; font-size: 14px; letter-spacing: .12em; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); outline: none; }
.captcha-input input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59, 130, 246, .1); }
.captcha-loading { padding: 8px; }
.captcha-error { color: var(--danger); font-size: 12px; padding: 4px 8px; }
.pow-state { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.pow-state .ico { width: 12px; height: 12px; }
.pow-state.ok { color: var(--success); }
.pow-state.fail { color: var(--danger); white-space: normal; }
.pow-state.fallback { white-space: normal; }

/* ---------- 登录 / 注册 ---------- */

.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1.02fr .98fr; align-items: stretch; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(700px 420px at 10% 0%, #3b82f6 0%, transparent 55%), linear-gradient(150deg, #1e40af 0%, #2563eb 45%, #38bdf8 120%);
  padding: 64px 56px; display: flex; flex-direction: column; justify-content: center;
}
.auth-aside::before, .auth-aside::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.auth-aside::before { width: 300px; height: 300px; top: -100px; right: -80px; }
.auth-aside::after { width: 220px; height: 220px; bottom: -90px; left: -40px; }
.auth-aside-inner { position: relative; z-index: 1; max-width: 440px; margin-inline: auto; }
.auth-aside h2 { color: #fff; font-size: clamp(27px, 3vw, 38px); line-height: 1.25; margin: 22px 0 14px; letter-spacing: -.035em; }
.auth-aside p { color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.85; }
.auth-points { display: flex; flex-direction: column; gap: 13px; margin-top: 30px; }
.auth-point { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: rgba(255, 255, 255, .9); }
.auth-point .ico { width: 17px; height: 17px; color: #bfdbfe; margin-top: 2px; }
.auth-quote { margin-top: 36px; padding: 18px 20px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; font-size: 13px; color: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); }
.auth-quote strong { color: #fff; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: min(430px, 100%); }
.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-size: clamp(24px, 3vw, 31px); letter-spacing: -.035em; margin-bottom: 8px; }
.auth-head p { color: var(--muted); font-size: 13.5px; }
.auth-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-md); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-switch a, .auth-switch button { font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 11px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-note { display: flex; gap: 9px; align-items: flex-start; background: var(--brand-softer); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 11.5px; color: var(--muted); line-height: 1.65; margin-bottom: 18px; }
.auth-note .ico { width: 15px; height: 15px; color: var(--brand); flex: none; margin-top: 1px; }
.auth-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; justify-content: center; }
.auth-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; background: var(--surface); }
.auth-badge .ico { width: 12px; height: 12px; color: var(--brand); }

/* ---------- 创建房间 ---------- */

.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.create-aside { position: sticky; top: calc(var(--header-h) + 22px); display: flex; flex-direction: column; gap: 16px; }
.tip-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.tip-card h3 { font-size: 13.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.tip-card h3 .ico { width: 16px; height: 16px; color: var(--brand); }
.tip-card ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.tip-card p { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.preview-room { background: linear-gradient(150deg, #1e40af, #2563eb 55%, #38bdf8); border-radius: 18px; padding: 22px; color: #fff; box-shadow: 0 22px 44px -30px rgba(37, 99, 235, .9); }
.preview-room .room-mark { background: rgba(255, 255, 255, .18); box-shadow: none; border: 1px solid rgba(255, 255, 255, .28); }
.preview-room h3 { color: #fff; font-size: 17px; margin-bottom: 5px; }
.preview-room p { color: rgba(255, 255, 255, .78); font-size: 12px; }
.preview-room .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.preview-room .chip { background: rgba(255, 255, 255, .16); color: #fff; }
.section-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; margin: 26px 0 14px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-label:first-child { margin-top: 0; }

/* ---------- 个人中心 ---------- */

.dash-page { padding: 40px 0 72px; }
.dash-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: clamp(25px, 3vw, 33px); }
.dash-head .dash-head-actions { margin-inline-start: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 17px 19px; box-shadow: var(--shadow-sm); }
.stat-card span { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card strong { display: block; font-size: 25px; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card .ico { width: 14px; height: 14px; color: var(--brand); }
.dash-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.dash-tab { border: 0; background: none; padding: 10px 4px; margin-inline-end: 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-tab.active { color: var(--brand-600); border-bottom-color: var(--brand); }
.dash-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dash-room { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 13px; }
.dash-room-top { display: flex; gap: 12px; align-items: flex-start; }
.dash-room-top h3 { font-size: 15px; margin-bottom: 3px; }
.dash-room-top p { font-size: 12px; color: var(--muted); }
.dash-room .room-info { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.dash-room .room-info span { display: inline-flex; align-items: center; gap: 5px; }
.dash-room .room-info .ico { width: 13px; height: 13px; }
.dash-room-actions { display: flex; gap: 7px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.dash-room-actions .btn { flex: none; }
.dash-room-actions .spacer { flex: 1; }
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 20px); }
.side-link { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: start; }
.side-link .ico { width: 16px; height: 16px; }
.side-link:hover { background: var(--surface-3); color: var(--ink); }
.side-link.active { background: var(--brand-soft); color: var(--brand-600); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 15.5px; }
.panel-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-body { padding: 22px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.profile-head h2 { font-size: 18px; }
.profile-head p { font-size: 12.5px; color: var(--muted); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); }
.danger-zone .panel-head h2 { color: var(--danger); }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); }
.kv-row strong { font-weight: 600; text-align: end; }

/* ---------- 弹层 / 提示 ---------- */

.toast-wrap { position: fixed; top: 84px; inset-inline-end: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  min-width: 220px; max-width: 360px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 12.5px; color: var(--ink-2);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-8px) scale(.98);
  transition: .22s ease;
}
.toast.in { opacity: 1; transform: none; }
.toast .ico { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast-success .ico { color: var(--success); }
.toast-error .ico { color: var(--danger); }
.toast-info .ico { color: var(--brand); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(9, 23, 45, .45); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
.modal-overlay.in { opacity: 1; }
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 40px 100px -30px rgba(6, 24, 51, .5);
  transform: translateY(10px) scale(.98); transition: .22s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-overlay.in .modal { transform: none; }
.modal.wide { width: min(680px, 100%); }
.modal.xwide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 4px 20px 18px; overflow-y: auto; }
.modal-text { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }

.lightbox { position: fixed; inset: 0; z-index: 210; background: rgba(7, 18, 36, .86); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); background: #fff; }

/* ---------- 骨架 / 启动 ---------- */

.boot-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -12%, rgba(191, 219, 254, .55), transparent 60%),
    radial-gradient(900px 480px at 102% -4%, rgba(224, 242, 254, .8), transparent 58%);
  transition: opacity .18s ease, visibility .18s ease;
  animation: bootSafety 0s 8s forwards;
}
@keyframes bootSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.boot-splash.is-hide { opacity: 0; visibility: hidden; pointer-events: none; }
[data-theme="dark"] .boot-splash {
  background-image:
    radial-gradient(1100px 520px at 8% -12%, rgba(30, 64, 175, .25), transparent 60%),
    radial-gradient(900px 480px at 102% -4%, rgba(8, 47, 73, .5), transparent 58%);
}
.boot-logo { width: 58px; height: 58px; animation: floaty 3s ease-in-out infinite; }
.boot-logo svg { width: 100%; height: 100%; }
.boot-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.boot-bar { width: 150px; height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); animation: bootbar 1.2s ease-in-out infinite; }
@keyframes bootbar { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.noscript-card { position: relative; z-index: 10000; max-width: 520px; margin: 80px auto; padding: 30px; background: #fff; border: 1px solid #e2ecfa; border-radius: 18px; text-align: center; }

.skeleton-page { padding: 40px 0; }
.sk { background: linear-gradient(100deg, var(--surface-3) 20%, var(--surface-2) 45%, var(--surface-3) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-hero { height: 300px; margin-bottom: 26px; }
.sk-head { height: 72px; margin-bottom: 22px; }
.sk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sk-cards .sk { height: 170px; }
.sk-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.sk-aside { height: 500px; }
.sk-main { height: 500px; }

.maintenance-body, .center-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.maintenance-card { max-width: 480px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 42px 34px; box-shadow: var(--shadow-lg); }
.brand-mark.big { width: 64px; height: 64px; margin: 0 auto 20px; }
.brand-mark.big svg { width: 100%; height: 100%; }
.maintenance-card h1 { font-size: 24px; margin-bottom: 10px; }
.maintenance-card p { color: var(--muted); font-size: 13.5px; line-height: 1.8; margin-bottom: 22px; }

/* ---------- 房间聊天（布局见 chat.css） ---------- */

.room-shell {
  display: flex; flex-direction: column;
  height: calc(var(--app-height, 100dvh) - var(--header-h));
  min-height: 0;
  background: var(--bg);
}
html.route-room, body.route-room {
  height: var(--app-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}
.route-room .site-header { display: none; }
.route-room .site-footer { display: none; }
.route-room .announce-bar { display: none; }
.route-room .room-shell { height: var(--app-height, 100dvh); }

.join-wrap { flex: 1; display: grid; place-items: center; padding: 30px 20px; overflow-y: auto; }
.join-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-md); }
.join-room-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.join-room-head h1 { font-size: 21px; letter-spacing: -.025em; }
.join-room-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.join-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.join-divider { height: 1px; background: var(--line); margin: 20px 0; }
.join-terms { font-size: 11.5px; color: var(--muted-2); line-height: 1.7; text-align: center; margin-top: 14px; }

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero-grid { gap: 34px; }
  .hero-stage { min-height: 380px; }
  .float-chip.a { left: 0; }
  .float-chip.b { right: 0; }
  .feature-grid, .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-grid { grid-template-columns: 1fr; }
  .create-layout { grid-template-columns: 1fr; }
  .create-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .create-aside > * { flex: 1 1 260px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .auth-aside { padding: 48px 36px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-nav { display: none; }
  .site-nav.mobile-open {
    display: flex; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px; flex-wrap: wrap; gap: 6px; box-shadow: var(--shadow-md); margin: 0;
  }
  .mobile-only { display: inline-flex; }
  .hero { padding: 52px 0 42px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { order: 2; min-height: 340px; }
  .hero-sub { max-width: 100%; }
  .hero-stats { gap: 20px; }
  .stat + .stat { padding-inline-start: 20px; }
  .chat-preview { width: min(380px, 100%); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 32px 20px; }
  .dash-list { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side-link { width: auto; white-space: nowrap; }
  .sk-grid { grid-template-columns: 1fr; }
  .sk-aside { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 34px 28px; }
  .footer-inner { flex-direction: column; gap: 20px; }
}

@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .side-nav { flex-wrap: wrap; overflow: visible; }
  .side-link { flex: 1 1 calc(50% - 4px); justify-content: center; padding-inline: 8px; }
  .container { width: calc(100% - 28px); }
  .header-inner { gap: 8px; }
  .logo { font-size: 15px; gap: 8px; flex: none; }
  .logo > span:last-child { white-space: nowrap; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-sub { display: none; }
  .header-actions { gap: 4px; }
  .header-divider { display: none; }
  #theme-toggle { display: none; }
  .header-actions .btn { padding: 8px 11px; min-height: 36px; }
  .user-chip { padding: 4px; border: 0; background: none; }
  .user-chip-name { display: none; }
  .btn { padding: 9px 14px; min-height: 39px; font-size: 13px; }
  .btn-lg { padding: 12px 20px; min-height: 46px; }
  .hero { padding: 38px 0 30px; }
  .hero-title { font-size: clamp(32px, 9vw, 44px); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { gap: 16px; margin-top: 26px; }
  .stat-num { font-size: 19px; }
  .stat + .stat { padding-inline-start: 16px; }
  .feature-grid, .room-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 46px 0; }
  .section-head { margin-bottom: 22px; }
  .form-card { padding: 22px 18px; border-radius: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
  .auth-form { padding: 22px 18px; }
  .auth-main { padding: 24px 16px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-page { padding: 26px 0 52px; }
  .dash-head .dash-head-actions { width: 100%; }
  .dash-head .dash-head-actions .btn { flex: 1; }
  .cta-band { padding: 28px 22px; border-radius: 20px; }
  .toolbar { gap: 8px; }
  .tabs { overflow-x: auto; max-width: 100%; }
  .page-shell { padding: 28px 0 50px; }
  .join-card { padding: 24px 20px; }
  .toast-wrap { top: 72px; left: 14px; right: 14px; }
  .toast { max-width: none; }
  .modal { max-height: calc(100vh - 24px); }
  .modal-overlay { padding: 12px; }
  .float-chip { display: none; }
}

/* ---------- 细节补充 ---------- */

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

.auth-aside .brand { display: flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, .95); font-size: 11.5px; letter-spacing: .14em; }
.auth-aside .brand .ico { width: 19px; height: 19px; color: #bfdbfe; }
.header-inner { position: relative; }
.site-nav.mobile-open { top: 100%; left: 0; right: 0; }
.chev { font-size: 9px; color: var(--muted-2); margin-inline-start: 1px; }
.route-auth .site-footer { display: none; }
.route-auth .site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }

.key-box {
  font-family: var(--mono); font-size: 13.5px; word-break: break-all; line-height: 1.7;
  background: var(--brand-softer); border: 1px dashed var(--line-strong);
  border-radius: 12px; padding: 14px; letter-spacing: .04em; color: var(--ink-2); user-select: all;
}
.key-box.small { font-size: 11px; padding: 9px 11px; line-height: 1.6; }
.alert { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--line)); color: var(--danger); padding: 12px 14px; border-radius: 11px; font-size: 12.5px; line-height: 1.65; }
.notice { background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 22%, var(--line)); color: var(--success); padding: 12px 14px; border-radius: 11px; font-size: 12.5px; }

@media (max-width: 420px) {
  html[lang="ja"] .logo > span:last-child,
  html[lang="es"] .logo > span:last-child { display: none; }
}
@media (max-width: 360px) {
  .header-actions a[href="#/register"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
