:root {
  --ink: #1a1208;
  --ink2: #3d3020;
  --ink3: #6b5c40;
  --paper: #f5f0e8;
  --paper2: #ede6d6;
  --paper3: #e0d8c4;
  --gold: #c8922a;
  --gold2: #e8b84b;
  --gold3: #f5d98a;
  --green: #2d5a3d;
  --green2: #4a8c60;
  --board: #dcb87a;
  --board2: #c9a55a;
  --black-stone: #1a1a1a;
  --white-stone: #f0ede6;
  --red: #c0392b;
  --shadow: rgba(26,18,8,0.15);
  --win-bg: rgba(116,240,210,0.16);
  --win-fg: #5fd9a6;
  --loss-bg: rgba(255,133,133,0.16);
  --loss-fg: #ff8585;
  --draw-bg: rgba(200,146,42,0.16);
  --draw-fg: var(--gold2);
  --font-sans: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', 'WenQuanYi Micro Hei', sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Source Han Serif SC', 'STSong', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; border-radius: 3px; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 顶部导航 ── */
#navbar {
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  width: 142px;
  flex: 0 0 142px;
  cursor: pointer;
}
.site-logo-image {
  display: block;
  width: 100%;
  height: auto;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-btn {
  background: none; border: 1px solid var(--gold);
  color: var(--gold2); padding: 6px 16px; border-radius: 4px;
  cursor: pointer; font-size: 13px; font-family: var(--font-sans);
  transition: all .2s;
}
.nav-btn:hover { background: var(--gold); color: var(--ink); }
.nav-btn.primary { background: var(--gold); color: var(--ink); font-weight: 500; }
.nav-btn.primary:hover { background: var(--gold2); }
.user-info { display: flex; align-items: center; gap: 10px; color: var(--paper2); font-size: 13px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar-text { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.profile-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--ink); color: var(--gold2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; margin: 0 auto 8px;
  overflow: hidden; border: 2px solid rgba(200,146,42,0.35);
}
.mini-link-btn {
  border: 1px solid rgba(200,146,42,0.45); background: rgba(200,146,42,0.08); color: var(--gold);
  font-size: 12px; cursor: pointer; padding: 6px 10px; border-radius: 6px;
  font-family: var(--font-sans);
}
.mini-link-btn:hover { background: rgba(200,146,42,0.18); }

.personal-card {
  background: var(--paper);
  border: 1px solid var(--paper3);
  border-radius: 8px;
  padding: 14px;
}
.personal-card-head { display: flex; align-items: center; gap: 12px; }
.personal-card .profile-avatar {
  width: 64px;
  height: 64px;
  margin: 0;
  flex-shrink: 0;
}
.personal-main { min-width: 0; flex: 1; }
.personal-title { font-size: 11px; color: var(--ink3); margin-bottom: 3px; }
.personal-name { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.personal-rank { color: var(--gold); font-size: 13px; margin-top: 3px; }
.personal-badges { margin-top: 4px; }
.personal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.personal-stats div {
  background: var(--paper2);
  border: 1px solid var(--paper3);
  border-radius: 6px;
  padding: 8px;
}
.personal-stats span { display: block; font-size: 11px; color: var(--ink3); margin-bottom: 3px; }
.personal-stats strong { font-size: 12px; color: var(--ink); }
.personal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.personal-toggle {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink2);
  cursor: pointer;
}

/* ── 视图容器 ── */
.hidden { display: none !important; }
.view { display: none; }
.view.active { display: block; }

/* ── 登录/注册 ── */
#auth-view {
  min-height: calc(100vh - 58px);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 20% 50%, #2d3a1e 0%, #1a1208 45%, #0f1a0a 100%);
  position: relative;
  overflow: hidden;
}
#auth-view::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(200,146,42,0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(45,90,61,0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(26,18,8,0) 0%, rgba(10,8,4,0.4) 100%);
  pointer-events: none;
}
#auth-view::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='2' fill='rgba(200,146,42,0.08)'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}
#auth-view.active { display: flex; }
.auth-card {
  background: rgba(255,252,245,0.06);
  border: 1px solid rgba(200,146,42,0.35);
  border-radius: 12px;
  padding: 40px 44px;
  width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
.auth-title {
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 700;
  color: var(--gold2); margin-bottom: 6px; text-align: center;
  letter-spacing: 4px;
  text-shadow: 0 2px 12px rgba(200,146,42,0.4);
}
.auth-sub { color: rgba(200,185,155,0.75); font-size: 13px; text-align: center; margin-bottom: 28px; letter-spacing: 2px; }
.tabs { display: flex; gap: 0; margin-bottom: 24px; border: 1px solid rgba(200,146,42,0.3); border-radius: 6px; overflow: hidden; }
.tab-btn {
  flex: 1; padding: 10px; background: none; border: none;
  cursor: pointer; font-size: 14px; font-family: var(--font-sans);
  color: rgba(200,185,155,0.6); transition: all .2s;
}
.tab-btn.active { background: rgba(200,146,42,0.25); color: var(--gold2); font-weight: 500; border-bottom: 2px solid var(--gold); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: rgba(200,185,155,0.8); margin-bottom: 6px; font-weight: 500; letter-spacing: 1px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(200,146,42,0.3);
  border-radius: 6px; background: rgba(255,252,245,0.08); color: var(--paper);
  font-size: 14px; font-family: var(--font-sans);
  transition: border-color .2s; outline: none;
}
.form-group input::placeholder { color: rgba(200,185,155,0.45); }
.form-group input:focus, .form-group select:focus { border-color: var(--gold); background: rgba(255,252,245,0.12); }
.form-group select option { background: #1a1208; color: var(--paper); }
.form-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, rgba(200,146,42,0.9), rgba(232,184,75,0.85));
  color: var(--ink); border: none; border-radius: 6px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: var(--font-serif); letter-spacing: 3px;
  transition: all .2s; margin-top: 8px;
  box-shadow: 0 4px 16px rgba(200,146,42,0.35);
}
.form-btn:hover { background: linear-gradient(135deg, var(--gold2), var(--gold3)); box-shadow: 0 6px 20px rgba(200,146,42,0.5); transform: translateY(-1px); }
.form-err { color: #ff8080; font-size: 12px; margin-top: 8px; text-align: center; min-height: 18px; }

/* 验证码行 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img {
  flex-shrink: 0; cursor: pointer; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(200,146,42,0.3); line-height: 0; user-select: none;
}
.captcha-img svg { display: block; }
.captcha-row input {
  flex: 1; padding: 9px 12px; border-radius: 6px;
  border: 1px solid rgba(200,146,42,0.3);
  background: rgba(255,252,245,0.06); color: var(--paper);
  font-size: 16px; letter-spacing: 4px; text-transform: uppercase;
  font-family: monospace;
}
.captcha-row input:focus { outline: none; border-color: var(--gold); background: rgba(255,252,245,0.12); }

/* ── AI 科技版登录首屏 ── */
body.auth-mode #navbar {
  display: none;
}

#auth-view {
  min-height: calc(100vh - 58px);
  padding: 44px clamp(20px, 4vw, 72px);
  align-items: stretch;
  justify-content: center;
  background:
    linear-gradient(112deg, rgba(4, 8, 7, 0.98) 0%, rgba(11, 22, 18, 0.96) 42%, rgba(8, 8, 7, 0.98) 100%);
}
#auth-view::before {
  background:
    linear-gradient(90deg, rgba(232,184,75,0.08), transparent 28%, rgba(74,140,96,0.10) 72%, transparent),
    repeating-linear-gradient(120deg, rgba(232,184,75,0.035) 0 1px, transparent 1px 92px);
  opacity: 0.9;
}
#auth-view::after {
  background:
    linear-gradient(180deg, transparent, rgba(0,0,0,0.35)),
    repeating-linear-gradient(90deg, rgba(74,140,96,0.045) 0 1px, transparent 1px 140px);
  opacity: 0.45;
}
.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}
.auth-panel { min-width: 0; }
.auth-brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}
.auth-brand-logo {
  display: block;
  width: min(348px, 86vw);
  height: auto;
}
.auth-sub {
  text-align: left;
  margin: -7px 0 0 110px;
  color: rgba(205,229,210,0.72);
  letter-spacing: 1px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18,26,22,0.82), rgba(10,12,10,0.72));
  border: 1px solid rgba(232,184,75,0.26);
  box-shadow: 0 24px 80px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
}
.tabs {
  border-radius: 8px;
  background: rgba(255,252,245,0.045);
}
.tab-btn { font-size: 13px; }
.form-group input,
.form-group select {
  min-height: 44px;
  border-radius: 8px;
}
.form-btn {
  border-radius: 8px;
  min-height: 46px;
  font-family: var(--font-sans);
  letter-spacing: 1px;
}
.auth-dev-note {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(200,185,155,0.38);
  text-align: center;
}
@media (max-width: 980px) {
  #auth-view { padding: 28px 18px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-card { width: 100%; }
}

/* ── AI 美女机器人登录首屏覆盖 ── */
body.auth-mode #auth-view {
  min-height: 100vh;
}

#auth-view {
  padding: 52px clamp(24px, 7vw, 118px);
  align-items: center;
  justify-content: flex-start;
  background: #020605;
}

.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #020605;
  background-image: url('/assets/ai-robot-go-hero.png');
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
  transform: scale(1.01);
  animation: authBgBreath 9s ease-in-out infinite;
}

#auth-view::before {
  z-index: 1;
  opacity: 1;
  background:
    radial-gradient(circle at 72% 42%, rgba(111,240,191,0.07), transparent 32%),
    linear-gradient(90deg, rgba(1,5,4,0.96) 0%, rgba(1,5,4,0.82) 32%, rgba(1,5,4,0.38) 56%, rgba(1,5,4,0.08) 100%);
}

#auth-view::after {
  z-index: 2;
  opacity: 0.25;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(90deg, rgba(232,184,75,0.05) 0 1px, transparent 1px 78px),
    repeating-linear-gradient(0deg, rgba(111,240,191,0.035) 0 1px, transparent 1px 78px);
  animation: authGridDrift 12s linear infinite;
}

.auth-motion-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  clip-path: inset(0 0 0 42%);
}

.auth-scan-beam {
  position: absolute;
  top: -18%;
  right: -18%;
  width: 68%;
  height: 138%;
  opacity: 0;
  transform: translateX(46%) rotate(7deg);
  background: linear-gradient(90deg, transparent 25%, rgba(111,240,191,0.04) 42%, rgba(111,240,191,0.34) 49%, rgba(240,199,101,0.20) 52%, rgba(111,240,191,0.05) 59%, transparent 76%);
  filter: blur(1px);
  animation: authScanSweep 6.5s ease-in-out infinite;
}

.auth-motion-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(224,255,241,0.88);
  border-radius: 50%;
  background: rgba(111,240,191,0.42);
  box-shadow: 0 0 10px rgba(111,240,191,0.95), 0 0 24px rgba(111,240,191,0.48);
  animation: authNodeFloat 4.8s ease-in-out infinite;
}

.auth-motion-node-a { top: 23%; right: 29%; }
.auth-motion-node-b { top: 49%; right: 9%; animation-delay: -1.7s; animation-duration: 5.6s; }
.auth-motion-node-c { top: 72%; right: 36%; animation-delay: -3.2s; animation-duration: 6.2s; }

.auth-motion-ring {
  position: absolute;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(111,240,191,0.30);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(111,240,191,0.07), 0 0 22px rgba(111,240,191,0.08);
  animation: authRingPulse 4s ease-out infinite;
}

.auth-motion-ring-a { top: 33%; right: 17%; }
.auth-motion-ring-b { top: 62%; right: 43%; animation-delay: -2s; transform: scale(.72); }
}

.auth-shell {
  z-index: 3;
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.auth-panel {
  width: min(432px, 100%);
  min-width: 0;
  padding: 2px 0;
}

.auth-brand {
  gap: 8px;
  margin-bottom: 24px;
}

.auth-sub {
  color: rgba(207,231,217,0.82);
}

.auth-card {
  width: min(420px, 100%);
  padding: 26px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14,24,21,0.86), rgba(4,8,7,0.78)),
    radial-gradient(circle at 16% 0%, rgba(111,240,191,0.08), transparent 40%);
  border: 1px solid rgba(240,199,101,0.34);
  box-shadow:
    0 28px 92px rgba(0,0,0,0.58),
    0 0 0 1px rgba(111,240,191,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
}

.tabs {
  height: 44px;
  margin-bottom: 22px;
  border: 1px solid rgba(240,199,101,0.30);
  background: rgba(4,9,8,0.52);
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 13px;
  color: rgba(210,226,217,0.62);
}

.tab-btn.active {
  background: linear-gradient(180deg, rgba(240,199,101,0.26), rgba(200,146,42,0.16));
  color: #f2cf72;
  border-bottom-color: #d7a93c;
}

.form-group {
  margin-bottom: 17px;
}

.form-group label {
  color: rgba(214,228,218,0.78);
}

.form-group input,
.form-group select {
  min-height: 46px;
  border-color: rgba(240,199,101,0.30);
  background: rgba(220,246,234,0.08);
  color: #f4f0e6;
  caret-color: #f0c765;
}

.form-group input:hover,
.form-group select:hover {
  border-color: rgba(240,199,101,0.46);
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(111,240,191,0.68);
  background: rgba(220,246,234,0.11);
  box-shadow: 0 0 0 3px rgba(111,240,191,0.08);
}

.form-btn {
  min-height: 48px;
  margin-top: 10px;
  background: linear-gradient(135deg, #bf8b25, #f0c765 48%, #c99a35);
  box-shadow: 0 14px 34px rgba(200,146,42,0.25), 0 0 28px rgba(111,240,191,0.08);
}

.form-btn:hover {
  background: linear-gradient(135deg, #d09b2e, #f7db8c 50%, #d1a33d);
  box-shadow: 0 18px 42px rgba(200,146,42,0.33), 0 0 34px rgba(111,240,191,0.12);
}

@keyframes authBgBreath {
  0%, 100% { transform: scale(1.01) translate3d(0, 0, 0); filter: saturate(1.02) contrast(1.03) brightness(.98); }
  50% { transform: scale(1.055) translate3d(-1.1%, -.4%, 0); filter: saturate(1.12) contrast(1.08) brightness(1.08); }
}

@keyframes authGridDrift {
  to { background-position: 78px 0, 0 78px; }
}

@keyframes authScanSweep {
  0%, 12% { opacity: 0; transform: translateX(46%) rotate(7deg); }
  24% { opacity: .72; }
  72% { opacity: .52; }
  88%, 100% { opacity: 0; transform: translateX(-92%) rotate(7deg); }
}

@keyframes authNodeFloat {
  0%, 100% { opacity: .30; transform: translate3d(0, 9px, 0) scale(.78); }
  48% { opacity: 1; transform: translate3d(-13px, -13px, 0) scale(1.2); }
}

@keyframes authRingPulse {
  0% { opacity: 0; transform: scale(.35); }
  28% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.65); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-bg,
  #auth-view::after,
  .auth-scan-beam,
  .auth-motion-node,
  .auth-motion-ring {
    animation: none;
  }
}

/* ═══════════════ 语音复盘一期、二期 ═══════════════ */
.voice-review-workspace {
  min-height: calc(100vh - 58px);
  flex-direction: column;
  overflow: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 4%, rgba(217,170,63,.12), transparent 27%),
    radial-gradient(circle at 82% 18%, rgba(68,216,183,.10), transparent 24%),
    linear-gradient(90deg, rgba(68,216,183,.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,.025) 1px, transparent 1px), #020a08;
  background-size: auto, auto, 54px 54px, 54px 54px, auto;
}
.voice-review-header {
  min-height: 112px;
  padding: 22px clamp(22px,5vw,76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(217,170,63,.24);
  background: linear-gradient(105deg,rgba(8,29,22,.98),rgba(3,14,11,.96));
}
.voice-review-header > div:first-child { min-width: 0; }
.voice-review-header small,.voice-review-section-title small,.voice-review-intro-card > div > small {
  color: rgba(116,240,210,.64); font-size: 10px; letter-spacing: 2px;
}
.voice-review-header h1 { margin: 3px 0 4px; color: #f0ca69; font: 800 27px 'Noto Serif SC',serif; letter-spacing: 2px; }
.voice-review-header p { margin: 0; color: rgba(226,239,232,.55); font-size: 12px; }
.voice-review-header-actions { display: flex; gap: 9px; flex-shrink: 0; }
.voice-review-header-actions button,.voice-review-panel header button {
  padding: 8px 13px; border: 1px solid rgba(217,170,63,.36); border-radius: 6px;
  background: rgba(217,170,63,.07); color: #f0ca69; cursor: pointer;
}
.voice-review-source-layout {
  width: min(1460px,calc(100% - 44px)); margin: 0 auto; padding: 30px 0 42px;
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(310px,.62fr); gap: 18px;
}
.voice-review-intro-card,.voice-review-import-card,.voice-review-library-card {
  border: 1px solid rgba(217,170,63,.22); border-radius: 12px;
  background: linear-gradient(145deg,rgba(8,29,22,.94),rgba(3,15,12,.97));
  box-shadow: 0 18px 54px rgba(0,0,0,.22); overflow: hidden;
}
.voice-review-intro-card {
  min-height: 276px; padding: 32px 34px; display: grid;
  grid-template-columns: 154px minmax(0,1fr); grid-template-rows: 1fr auto; gap: 20px 30px;
  position: relative;
}
.voice-review-intro-card::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(115deg,transparent 52%,rgba(116,240,210,.035)); }
.voice-review-orbit { width: 142px; height: 142px; display: grid; place-items: center; position: relative; align-self: center; border: 1px solid rgba(217,170,63,.34); border-radius: 50%; box-shadow: inset 0 0 36px rgba(217,170,63,.08),0 0 40px rgba(68,216,183,.06); }
.voice-review-orbit::before,.voice-review-orbit::after { content:""; position:absolute; border-radius:50%; border:1px solid rgba(116,240,210,.23); }
.voice-review-orbit::before { inset:17px; border-style:dashed; }
.voice-review-orbit::after { width:8px;height:8px;top:16px;right:28px;background:#74f0d2;box-shadow:0 0 15px #74f0d2; }
.voice-review-orbit i { position:absolute; width:70px;height:70px;border:2px solid rgba(217,170,63,.52);border-radius:50%;background:radial-gradient(circle,rgba(217,170,63,.18),rgba(4,17,13,.94)); }
.voice-review-orbit b { z-index:1;color:#f4d47e;font:800 21px Georgia,serif;letter-spacing:2px; }
.voice-review-intro-card h2 { margin: 8px 0 10px; color:#f4d47e; font:800 clamp(22px,2vw,34px) 'Noto Serif SC',serif; }
.voice-review-intro-card p { max-width:720px;margin:0;color:rgba(226,239,232,.64);font-size:13px;line-height:1.85; }
.voice-review-intro-card ol { grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0;padding:0;list-style:none; }
.voice-review-intro-card li { padding:10px 12px;display:flex;align-items:center;gap:10px;border-top:1px solid rgba(217,170,63,.15);color:rgba(226,239,232,.65);font-size:11px; }
.voice-review-intro-card li b { color:#d9aa3f;font-size:9px;letter-spacing:1px; }
.voice-review-import-card { grid-row:span 2;padding:22px;display:flex;flex-direction:column;gap:10px; }
.voice-review-section-title { display:flex;flex-direction:column;gap:3px;margin-bottom:5px; }
.voice-review-section-title strong { color:#f0ca69;font:700 17px 'Noto Serif SC',serif; }
.voice-review-source-btn { min-height:62px;padding:10px 14px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;border:1px solid rgba(217,170,63,.24);border-radius:8px;background:rgba(255,255,255,.025);color:rgba(226,239,232,.62);cursor:pointer; }
.voice-review-source-btn strong { color:#efce79;font-size:13px; }
.voice-review-source-btn.primary { background:linear-gradient(135deg,rgba(217,170,63,.18),rgba(217,170,63,.06));border-color:rgba(217,170,63,.4); }
.voice-review-link-field { margin-top:7px;display:flex;flex-direction:column;gap:6px;color:rgba(226,239,232,.52);font-size:10px; }
.voice-review-link-field input { width:100%;min-height:42px;padding:9px 11px;border:1px solid rgba(217,170,63,.3);border-radius:7px;background:#e9f0ec;color:#14231d;font-size:12px;outline:none; }
.voice-review-link-field input:focus { border-color:#d9aa3f;box-shadow:0 0 0 2px rgba(217,170,63,.12); }
.voice-review-import-card > p { margin:auto 0 0;padding-top:13px;border-top:1px solid rgba(217,170,63,.12);color:rgba(226,239,232,.38);font-size:9px;line-height:1.7; }
.voice-review-library-card { padding:22px;min-height:270px; }
.voice-review-game-list { max-height:350px;display:grid;gap:7px;overflow:auto;scrollbar-width:thin; }
.voice-review-game-row { width:100%;min-height:62px;padding:9px 12px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid rgba(217,170,63,.16);border-radius:8px;background:rgba(255,255,255,.018);color:var(--ink);text-align:left;cursor:pointer;transition:.18s ease; }
.voice-review-game-row:hover { transform:translateX(2px);border-color:rgba(116,240,210,.36);background:rgba(116,240,210,.045); }
.voice-review-game-row > span:nth-child(2) { min-width:0;display:flex;flex-direction:column;gap:4px; }
.voice-review-game-row strong { overflow:hidden;color:rgba(238,245,241,.9);font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.voice-review-game-row strong em { padding:0 5px;color:rgba(116,240,210,.55);font-size:9px;font-style:normal; }
.voice-review-game-row small { color:rgba(226,239,232,.43);font-size:9px; }
.voice-review-game-row > b { color:#d9aa3f;font-size:10px;white-space:nowrap; }
.voice-review-stones { width:35px;height:25px;position:relative; }
.voice-review-stones i { position:absolute;width:22px;height:22px;border-radius:50%; }
.voice-review-stones i:first-child { left:0;top:3px;background:radial-gradient(circle at 35% 30%,#555,#090909 65%); }
.voice-review-stones i:last-child { right:0;top:0;background:radial-gradient(circle at 35% 30%,#fff,#d9d5cc 68%);border:1px solid #aaa; }
.voice-review-list-empty { min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:rgba(226,239,232,.45);font-size:10px;text-align:center; }
.voice-review-list-empty strong { color:#f0ca69;font-size:13px; }

.voice-review-panel { display:none;min-height:0;flex:1;flex-direction:column;overflow:hidden;background:linear-gradient(180deg,rgba(8,29,22,.98),rgba(3,14,11,.98)); }
body.voice-review-mode .voice-review-panel { display:flex; }
body.voice-review-mode .rv-analysis-head,body.voice-review-mode .rv-analysis-controls,body.voice-review-mode .rv-tabs,body.voice-review-mode .rv-panel-scroll { display:none; }
body.voice-review-mode .rv-right { background:#04110d; }
.voice-board-tools { display:none; padding:14px; }
body.voice-review-mode .voice-board-tools { display:grid; gap:12px; }
.voice-board-tools label,.voice-variation-panel label { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; }
.voice-board-tools select,.voice-variation-panel select { min-width:95px; padding:7px; color:#d5c08a; background:#10291d; border:1px solid #596046; border-radius:6px; }
.voice-board-tools p,.voice-variation-panel p { color:#a8c3b5; font-size:12px; line-height:1.6; }
.voice-variation-panel { padding:14px; border:1px solid #405744; border-radius:10px; margin-top:10px; }
#voice-variation-steps { display:flex; flex-wrap:wrap; gap:8px; font-size:12px; color:#d3dfd5; }
#voice-variation-steps span { background:#153121; border-radius:4px; padding:5px 7px; }
#voice-variation-steps button { border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; padding:2px; }
#voice-variation-steps button:hover { color:#f3d795; }
/* 全盘精讲：先做全盘诊断，只播放少量关键局面；关键手列表可点击跳转。 */
.voice-plan-panel { padding:14px; border:1px solid #405744; border-radius:10px; margin-top:10px; }
.voice-plan-panel select { min-width:95px; padding:7px; color:#d5c08a; background:#10291d; border:1px solid #596046; border-radius:6px; }
.voice-plan-panel p { color:#a8c3b5; font-size:12px; line-height:1.6; }
.voice-plan-panel .voice-plan-intro { margin:6px 0 10px; color:rgba(211,223,213,.72); }
#voice-plan-audio { background:#173a28!important;border-color:#526d59!important;color:#ead8a8!important;font-weight:700; }
#voice-plan-steps { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
#voice-plan-steps button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left;
  background:#153121; border:1px solid #2f4c3a; border-radius:6px; padding:7px 9px; color:#d3dfd5; font:inherit; cursor:pointer; }
#voice-plan-steps button:hover { border-color:#8d774a; color:#f3d795; }
#voice-plan-steps button b { font-size:12px; }
#voice-plan-steps button span { font-size:10px; color:rgba(211,223,213,.72); }
#voice-plan-build[disabled] { opacity:.5; cursor:not-allowed; }
/* 任意手数自然提问 */
.voice-ask-panel { padding:14px; border:1px solid #405744; border-radius:10px; margin-top:10px; }
.voice-ask-row { display:flex; gap:6px; align-items:center; margin-top:8px; }
.voice-ask-row input { flex:1 1 auto; min-width:0; padding:8px 10px; color:#e8f2ec; background:#10291d;
  border:1px solid #596046; border-radius:6px; font:inherit; }
.voice-ask-row input::placeholder { color:rgba(200,185,155,.55); }
.voice-ask-row button { flex:0 0 auto; min-height:36px; padding:8px 12px; border:1px solid #708564;
  border-radius:6px; color:#e3d3a4; background:#173a28; cursor:pointer; }
.voice-ask-meta { display:flex; gap:10px; align-items:center; margin-top:6px; color:#a8c3b5; font-size:11px; }
.voice-ask-clear { border:0; background:transparent; color:#d5c08a; cursor:pointer; font:inherit; padding:2px 4px; text-decoration:underline; }
.voice-ask-answer { margin-top:8px; }
.voice-ask-answer .voice-ask-question { color:rgba(211,223,213,.72); font-size:11px; margin:0 0 5px; }
.voice-ask-answer .voice-ask-reply { color:#e2efe8; font-size:14px; line-height:1.8; margin:0; }
/* 引擎验证过的变化逐步文本，和整句回答区分开，避免误读成结论。 */
.voice-ask-answer .voice-ask-step { color:#d5c08a; font-size:12px; line-height:1.7; margin:6px 0 0; padding-left:8px; border-left:2px solid #708564; }
.voice-ask-meta label { display:flex; gap:4px; align-items:center; }
.voice-ask-meta select { padding:2px 4px; color:#e8f2ec; background:#10291d; border:1px solid #405744; border-radius:4px; font:inherit; }
.voice-ask-answer small { color:rgba(211,223,213,.6); font-size:11px; }
body.voice-review-mode .voice-review-main-actions { grid-template-columns:1fr; }
body.voice-review-mode .voice-review-playback { display:flex; flex-wrap:wrap; gap:8px; }
body.voice-review-mode .voice-review-playback button { padding:8px 10px; min-height:36px; }
body.voice-review-mode .voice-review-narrative > p { color:#d3e2d8; line-height:1.8; font-size:14px; }
body.voice-review-mode .rv-board-stage { position:relative; }
#voice-coordinate-pulse { position:absolute; pointer-events:none; z-index:8; border:4px solid #005c30; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.9),0 0 14px 3px rgba(0,122,62,.75); transform:translate(-50%,-50%); animation:voice-coordinate-blink .85s ease-in-out infinite; }
#voice-coordinate-pulse[hidden],#voice-board-mode[hidden] { display:none!important; }
#voice-board-mode { position:absolute; top:3px; left:50%; transform:translateX(-50%); z-index:9; background:#173e29; color:#edf4dc; border:1px solid #688a53; border-radius:5px; padding:4px 12px; font-size:12px; pointer-events:none; }
@keyframes voice-coordinate-blink { 50% { opacity:.55; transform:translate(-50%,-50%) scale(1.22); } }
/* 自然讲解的棋盘标记：讲到哪里亮哪里，不再念坐标 */
#voice-mark-layer { position:absolute; inset:0; pointer-events:none; z-index:7; }
.voice-mark { position:absolute; transform:translate(-50%,-50%); border-radius:50%; box-sizing:border-box; }
.voice-mark-move { border:3px solid #e8b84b; box-shadow:0 0 8px rgba(232,184,75,.7); }
.voice-mark-best { border:4px solid #005c30; background:rgba(0,122,62,.22); box-shadow:0 0 0 2px rgba(255,255,255,.85),0 0 12px 2px rgba(0,122,62,.7); animation:voice-coordinate-blink 1.1s ease-in-out infinite; }
.voice-mark-reply { border:3px solid #3a78c2; box-shadow:0 0 8px rgba(58,120,194,.6); }
.voice-mark-danger { background:rgba(214,64,54,.75); box-shadow:0 0 6px rgba(214,64,54,.8); }
.voice-mark-safe { background:rgba(46,160,110,.7); box-shadow:0 0 6px rgba(46,160,110,.7); }
.voice-mark-region { transform:none; border-radius:6px; border:2px solid rgba(232,184,75,.85); background:rgba(232,184,75,.12); }
@media(prefers-reduced-motion:reduce) { .voice-mark-best { animation:none; } }
@media(prefers-reduced-motion:reduce) { #voice-coordinate-pulse { animation:none; } }
body.voice-review-mode .rv-chartbar { display:none; }
.voice-review-panel > header { flex:0 0 auto;padding:15px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(217,170,63,.2);background:linear-gradient(110deg,rgba(217,170,63,.12),rgba(116,240,210,.035)); }
.voice-review-panel > header > div { display:flex;flex-direction:column;gap:2px; }
.voice-review-panel > header small { color:rgba(116,240,210,.55);font-size:8px;letter-spacing:1.6px; }
.voice-review-panel > header strong { color:#f0ca69;font:800 16px 'Noto Serif SC',serif; }
.voice-review-panel header button { padding:6px 9px;font-size:9px; }
.voice-review-current { flex:0 0 auto;padding:12px 16px;display:grid;grid-template-columns:1fr auto;gap:3px 10px;border-bottom:1px solid rgba(217,170,63,.12); }
.voice-review-current > span { grid-column:1/-1;color:rgba(226,239,232,.4);font-size:8px;letter-spacing:1px; }
.voice-review-current strong { color:#f4d47e;font-size:17px; }
.voice-review-current em { align-self:center;padding:3px 7px;border-radius:12px;background:rgba(116,240,210,.08);color:#8cf5dc;font-size:8px;font-style:normal; }
.voice-review-main-actions { flex:0 0 auto;padding:11px 14px 7px;display:grid;grid-template-columns:minmax(0,1fr);gap:7px; }
.voice-review-main-actions button,.voice-review-playback button,.voice-review-playback select,.voice-review-command-strip button { border:1px solid rgba(217,170,63,.3);border-radius:7px;background:rgba(217,170,63,.06);color:#efd078;cursor:pointer; }
.voice-review-main-actions button:disabled { opacity:.42;cursor:default; }
.voice-review-analyze { min-height:46px;display:flex;align-items:center;justify-content:center;padding:8px 13px!important;background:linear-gradient(135deg,#c99327,#edc35a)!important;color:#142018!important;font-weight:800; }
.voice-review-analyze span { font-size:13px; }.voice-review-analyze small { margin-top:2px;font-size:8px;opacity:.66; }
/* 算力三档：只开放第一档，其余保留位置并说明原因，避免看起来可选却点了没用。 */
.voice-tier { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:11px 14px 0; }
.voice-tier-item { display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:7px 9px;border:1px solid rgba(217,170,63,.22);border-radius:7px;background:rgba(255,255,255,.025);color:#e6d7a6;cursor:pointer;text-align:left;font:inherit; }
.voice-tier-item span { font-size:12px;font-weight:700; }
.voice-tier-item strong { color:#d9b25f;font-size:9px;letter-spacing:1px; }
.voice-tier-item small { color:rgba(226,239,232,.66);font-size:8px;line-height:1.4; }
.voice-tier-item.on { border-color:rgba(232,179,65,.8);background:linear-gradient(135deg,rgba(200,146,42,.22),rgba(116,240,210,.06)); }
.voice-tier-item.on small { color:rgba(226,239,232,.82); }
.voice-tier-item:disabled { opacity:.68;cursor:not-allowed;filter:saturate(.6); }
/* 分析进度条：复用完整复盘的 rv-progress 视觉，放在按钮正下方。 */
.voice-analyze-progress { flex:0 0 auto;padding:6px 14px 2px; }
.voice-analyze-progress[hidden] { display:none; }
/* 提示文案：按钮下方小字，替代原来占一整块的状态条。 */
.voice-analyze-hint { flex:0 0 auto;margin:0 14px 6px;color:rgba(226,239,232,.45);font-size:9px;line-height:1.5; }
.voice-analyze-hint.warn { color:#ffaaaa; }
.voice-analyze-hint.done { color:#8cf5dc; }
.voice-analyze-hint.running { color:#79def7; }
#voice-review-listen-btn { display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px; }
#voice-review-listen-btn > span { font-size:18px; }
#voice-review-listen-btn.listening { border-color:#74f0d2;background:rgba(116,240,210,.14);color:#8cf5dc;box-shadow:0 0 0 2px rgba(116,240,210,.08); }
.voice-review-playback { flex:0 0 auto;padding:0 14px 8px;display:grid;grid-template-columns:1fr auto auto;gap:6px;align-items:center; }
.voice-review-playback button,.voice-review-playback select { min-height:32px;padding:6px 9px;font-size:9px; }
.voice-review-playback label { color:rgba(226,239,232,.43);font-size:8px;white-space:nowrap; }
.voice-review-playback label:not(.voice-review-auto) { display:flex;align-items:center;gap:5px; }
.voice-review-playback .voice-review-auto { grid-column:1/-1;display:flex;align-items:center;gap:5px;padding:3px 1px; }
.voice-review-status { flex:0 0 auto;margin:0 14px 8px;padding:8px 10px;border-radius:6px;background:rgba(255,255,255,.03);color:rgba(226,239,232,.5);font-size:9px;line-height:1.5; }
.voice-review-continuous { flex:0 0 auto;margin:0 14px 10px;padding:10px;border:1px solid rgba(217,170,63,.25);border-radius:9px;background:linear-gradient(135deg,rgba(23,65,49,.7),rgba(7,26,20,.85)); }
.voice-review-continuous-title { display:flex;justify-content:space-between;gap:8px;color:#efd078;font-size:12px; }
.voice-review-continuous-title small { color:#8bb8a5;font-size:9px; }
.voice-review-continuous-options { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:9px 0; }
.voice-review-continuous-options label { display:flex;flex-direction:column;gap:5px;font-size:10px;color:#b4c9bf;min-width:0; }
.voice-review-continuous-options input,.voice-review-continuous-options select { box-sizing:border-box;width:100%;min-width:0;min-height:34px;background:#0b2219;border:1px solid #526045;border-radius:5px;color:#e6ecdf;padding:5px; }
.voice-review-continuous-actions { display:grid;grid-template-columns:2fr 1fr 1fr;gap:6px; }
.voice-review-continuous-actions button { min-height:34px;border:1px solid #85713c;border-radius:6px;color:#efd078;background:#18372a;cursor:pointer; }
.voice-review-continuous-actions button:first-child { background:#bd9235;color:#10251a;font-weight:700; }
.voice-review-continuous-actions button:disabled { opacity:.45;cursor:default; }
.voice-review-continuous p { margin:8px 0 0;font-size:10px;line-height:1.5;color:#a1c5b4; }
body.voice-review-mode .voice-review-narrative section p { font-size:12px;line-height:1.85;color:#c2d6cc; }
body.voice-review-mode .voice-review-narrative section h3 { font-size:12px; }
@media (max-width:620px) { body.voice-review-mode .voice-review-narrative section p { font-size:13px; } }
.voice-review-status.running,.voice-review-status.listening { color:#79def7;background:rgba(57,208,255,.07); }
.voice-review-status.speaking { color:#f4d47e;background:rgba(217,170,63,.08); }
.voice-review-status.success { color:#8cf5dc;background:rgba(116,240,210,.07); }
.voice-review-status.error { color:#ffaaaa;background:rgba(255,100,100,.07); }
.voice-review-narrative { flex:1;min-height:0;margin:0 14px;padding:12px;overflow:auto;border:1px solid rgba(217,170,63,.17);border-radius:9px;background:rgba(0,0,0,.12);scrollbar-width:thin; }
.voice-review-empty { min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center; }
.voice-review-empty > span { width:46px;height:46px;display:grid;place-items:center;border:1px solid rgba(217,170,63,.35);border-radius:50%;color:#f0ca69;font:800 17px 'Noto Serif SC',serif;box-shadow:inset 0 0 18px rgba(217,170,63,.08); }
.voice-review-empty strong { color:rgba(240,202,105,.8);font-size:12px; }.voice-review-empty p { max-width:280px;margin:0;color:rgba(226,239,232,.38);font-size:9px;line-height:1.7; }
.voice-review-result-head { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px; }
.voice-review-result-head > div { display:flex;flex-direction:column;gap:2px; }.voice-review-result-head small { color:rgba(116,240,210,.54);font-size:8px; }.voice-review-result-head strong { color:#f0ca69;font-size:13px; }.voice-review-result-head > span { padding:3px 6px;border-radius:10px;background:rgba(116,240,210,.07);color:#8cf5dc;font-size:7px; }
.voice-review-metrics { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:10px; }
.voice-review-metrics > span { min-width:0;padding:8px;border-radius:6px;background:rgba(255,255,255,.03);display:flex;flex-direction:column;gap:3px; }.voice-review-metrics small { color:rgba(226,239,232,.38);font-size:7px; }.voice-review-metrics b { overflow:hidden;color:rgba(238,245,241,.88);font-size:11px;text-overflow:ellipsis;white-space:nowrap; }
.voice-review-narrative section { padding:9px 0;border-top:1px solid rgba(217,170,63,.1); }.voice-review-narrative h3 { margin:0 0 4px;color:#e3bd5c;font-size:10px; }.voice-review-narrative p { margin:0;color:rgba(226,239,232,.65);font-size:10px;line-height:1.75; }
.voice-review-candidates { padding:9px 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;border-top:1px solid rgba(217,170,63,.1); }
.voice-review-candidates > span { min-width:0;padding:6px 3px;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:5px;background:rgba(217,170,63,.045); }.voice-review-candidates i { color:rgba(116,240,210,.55);font-size:7px;font-style:normal; }.voice-review-candidates b { color:#f0ca69;font-size:10px; }.voice-review-candidates small { max-width:100%;overflow:hidden;color:rgba(226,239,232,.35);font-size:6px;text-overflow:ellipsis;white-space:nowrap; }
.voice-review-narrative footer { padding:9px 0 0;border-top:1px solid rgba(217,170,63,.1);color:rgba(226,239,232,.35);font-size:8px;line-height:1.65; }
.voice-review-command-strip { flex:0 0 auto;padding:9px 14px 12px;display:flex;align-items:center;gap:5px;overflow-x:auto;scrollbar-width:thin; }.voice-review-command-strip > span { color:rgba(226,239,232,.34);font-size:8px;white-space:nowrap; }.voice-review-command-strip button { padding:5px 7px;font-size:8px;white-space:nowrap; }
.voice-review-help-modal { width:min(680px,94vw); }.voice-review-help-content { display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0 16px; }.voice-review-help-content section { padding:12px;display:grid;grid-template-columns:25px 1fr;gap:9px;border:1px solid rgba(217,170,63,.16);border-radius:8px;background:rgba(255,255,255,.02); }.voice-review-help-content section > b { width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:rgba(217,170,63,.1);color:#efc65a;font-size:9px; }.voice-review-help-content strong { color:#f0ca69;font-size:11px; }.voice-review-help-content p { margin:4px 0 0;color:var(--ink3);font-size:10px;line-height:1.7; }.voice-review-help-content aside { grid-column:1/-1;padding:12px 14px;border-left:3px solid rgba(116,240,210,.5);background:rgba(116,240,210,.04); }

@media (max-width: 900px) {
  body.view-voice-review-view #navbar,body.voice-review-mode #navbar { display:none; }
  body.view-voice-review-view .voice-review-workspace,body.voice-review-mode .professional-review { min-height:100dvh; }
  .voice-review-header { padding:16px;align-items:flex-start; }
  .voice-review-header h1 { font-size:23px; }
  .voice-review-header p { max-width:520px; }
  .voice-review-source-layout { width:min(100% - 24px,720px);grid-template-columns:1fr;padding:16px 0 28px; }
  .voice-review-import-card { grid-row:auto; }
  body.voice-review-mode .rv-right { min-height:680px; }
  body.voice-review-mode .rv-board-stage { order:1; }
  body.voice-review-mode .rv-left { order:2; }
  body.voice-review-mode .rv-right { order:3; }
  .voice-review-panel { max-height:none; }
  .voice-review-narrative { min-height:370px; }
}
@media (max-width: 560px) {
  .voice-review-header { min-height:auto;flex-direction:column;gap:12px; }
  .voice-review-header-actions { width:100%; }.voice-review-header-actions button { flex:1; }
  .voice-review-intro-card { padding:22px;grid-template-columns:70px minmax(0,1fr);gap:15px; }
  .voice-review-orbit { width:68px;height:68px; }.voice-review-orbit i { width:36px;height:36px; }.voice-review-orbit::before { inset:8px; }.voice-review-orbit::after { top:4px;right:12px;width:5px;height:5px; }
  .voice-review-intro-card h2 { font-size:20px; }.voice-review-intro-card p { font-size:11px; }.voice-review-intro-card ol { grid-template-columns:1fr;gap:0; }
  .voice-review-help-content { grid-template-columns:1fr; }.voice-review-help-content aside { grid-column:auto; }
  .voice-review-main-actions { grid-template-columns:minmax(0,1fr) 105px; }
  .voice-review-playback { grid-template-columns:1fr auto; }.voice-review-playback label:not(.voice-review-auto) { grid-column:1/-1; }
  .voice-review-narrative { margin:0 9px; }.voice-review-status { margin-left:9px;margin-right:9px; }
}

@media (min-width: 1600px) {
  .auth-bg {
    background-size: auto 128%;
  }
}

@media (min-width: 2200px) {
  .auth-bg {
    background-size: auto 140%;
    background-position: 116% center;
  }
}

@media (max-width: 980px) {
  #auth-view {
    padding: 30px 18px;
    align-items: flex-start;
  }

  .auth-bg {
    background-size: auto 100%;
    background-position: 66% center;
  }

  .auth-motion-layer {
    clip-path: inset(0 0 45% 0);
    opacity: .72;
  }

  #auth-view::before {
    background:
      linear-gradient(180deg, rgba(2,5,4,0.52) 0%, rgba(2,5,4,0.86) 34%, rgba(2,5,4,0.97) 100%);
  }

  .auth-shell {
    width: 100%;
  }

  .auth-panel {
    width: 100%;
  }

  .auth-brand {
    margin-bottom: 22px;
  }

  .auth-brand-logo { width: min(330px, 88vw); }

  .auth-card {
    width: 100%;
    padding: 22px;
  }
}

@media (max-width: 520px) {
  #auth-view {
    padding: 24px 14px;
  }

  .auth-bg {
    background-size: auto 100%;
    background-position: 69% center;
  }

  .auth-motion-node-c,
  .auth-motion-ring-b { display: none; }

  .auth-brand {
    gap: 7px;
  }

  .auth-brand-logo { width: min(306px, 88vw); }

  .auth-sub { margin-left: 97px; }

  .auth-sub {
    font-size: 12px;
  }

  .tabs {
    height: 42px;
  }

  .tab-btn {
    font-size: 12px;
  }
}

/* ── 大厅 ── */
#lobby-view { display: none; }
#lobby-view.active { display: grid !important; grid-template-columns: 280px 1fr 280px; gap: 0; min-height: calc(100vh - 58px); }

.sidebar {
  background: var(--paper2);
  border-right: 1px solid var(--paper3);
  padding: 20px 16px;
}
.sidebar-right {
  background: var(--paper2);
  border-left: 1px solid var(--paper3);
  padding: 20px 16px;
}
.section-title {
  font-size: 11px; font-weight: 700;
  color: var(--ink3); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--paper3);
}
.online-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  transition: background .2s; margin-bottom: 4px;
}
.online-user:hover { background: var(--paper3); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green2); flex-shrink: 0; }
.user-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--gold2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  overflow: hidden;
}
body.auth-mode #auth-view {
  min-height: 100vh;
}
.user-avatar-sm.ai { background: var(--gold); color: var(--ink); }
.user-name-rank { flex: 1; min-width: 0; }
.uname { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urank { font-size: 11px; color: var(--ink3); }
.invite-btn-sm {
  font-size: 11px; padding: 3px 8px;
  background: var(--gold); color: var(--ink);
  border: none; border-radius: 3px; cursor: pointer;
  font-family: var(--font-sans); font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.invite-btn-sm:hover { background: var(--gold2); }
.invite-btn-sm.ai-btn { background: var(--green2); color: var(--on-jade); }
.invite-btn-sm.ai-btn:hover { background: var(--green); }

/* 自由对局：在线棋友申请面板 */
.free-match-panel {
  width: min(440px, 95vw);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
}
.free-match-panel .modal-title {
  position: sticky; top: -24px; z-index: 2;
  margin: -24px -24px 10px; padding: 22px 24px 14px;
  background: var(--paper2);
  border-bottom: 1px solid rgba(123,90,39,0.12);
}
.free-match-sub {
  font-size: 12px; color: var(--ink3); margin: 0 0 16px; line-height: 1.6;
}
.free-match-sub strong { color: var(--gold2); }
.free-match-list { display: flex; flex-direction: column; gap: 6px; }
.free-match-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--paper3);
}
.free-match-row .user-name-rank { flex: 1; min-width: 0; }
.free-match-diff {
  font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
  font-weight: 600;
}
.free-match-diff.ok { background: rgba(46,160,67,0.14); color: var(--green); }
.free-match-diff.no { background: rgba(150,150,150,0.14); color: var(--ink3); }
.free-match-panel .modal-actions {
  position: sticky; bottom: -24px; z-index: 2;
  margin: 16px -24px -24px; padding: 14px 24px 20px;
  background: linear-gradient(180deg, rgba(244,238,224,0.88), var(--paper2) 28%);
  border-top: 1px solid rgba(123,90,39,0.12);
  text-align: right;
}

/* 大厅中央 */
.lobby-center { padding: 24px; overflow-y: auto; }
.lobby-hero {
  background: linear-gradient(135deg, #1a1208 0%, #1e2410 50%, #141208 100%);
  border-radius: 12px; padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(200,146,42,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(200,146,42,0.1);
  position: relative; overflow: hidden;
}
.lobby-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(200,146,42,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.lobby-hero h1 {
  font-family: var(--font-serif);
  font-size: 28px; color: var(--gold2); font-weight: 700;
  margin-bottom: 8px; letter-spacing: 3px;
}
.lobby-hero p { color: var(--paper3); font-size: 14px; line-height: 1.7; }
.stats-row { display: flex; gap: 16px; margin-top: 20px; }
.stat-chip {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(200,146,42,0.3);
  border-radius: 6px; padding: 12px 20px; text-align: center; flex: 1;
}
.stat-num { font-size: 24px; font-weight: 700; color: var(--gold2); font-family: var(--font-serif); }
.stat-label { font-size: 11px; color: var(--paper3); margin-top: 2px; }

/* 聊天 */
.chat-box {
  background: var(--paper);
  border: 1px solid var(--paper3);
  border-radius: 8px; height: 200px;
  overflow-y: auto; padding: 12px; margin-bottom: 8px;
}
.chat-msg { font-size: 13px; line-height: 1.6; margin-bottom: 4px; }
.chat-from { font-weight: 700; color: var(--gold); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--paper3);
  border-radius: 6px; background: var(--paper); color: var(--ink);
  font-size: 13px; font-family: var(--font-sans);
}
.chat-send {
  padding: 8px 16px; background: var(--ink); color: var(--gold2);
  border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
}

/* 我的对局 */
.game-record {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 6px; background: var(--paper);
  border: 1px solid var(--paper3); margin-bottom: 8px;
  font-size: 12px;
}
.game-result-badge {
  padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.win { background: var(--win-bg); color: var(--win-fg); }
.loss { background: var(--loss-bg); color: var(--loss-fg); }
.playing { background: var(--draw-bg); color: var(--draw-fg); }

/* ── 对弈界面 ── */
#game-view { display: none; }
#game-view.active {
  display: flex !important;
  flex-direction: column;
  height: calc(100vh - 58px);
  min-height: 0;
  overflow: hidden;
}

.game-layout {
  display: grid;
  grid-template-columns: clamp(236px, 15vw, 268px) minmax(0, 1fr) clamp(288px, 18vw, 330px);
  gap: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.game-sidebar {
  background: var(--paper2);
  border-right: 1px solid var(--paper3);
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}
.game-sidebar-right {
  background: var(--paper2);
  border-left: 1px solid var(--paper3);
  padding: 14px 12px;
  display: grid;
  grid-template-rows: auto auto minmax(96px, 0.8fr) auto minmax(132px, 1fr);
  gap: 10px;
  overflow: hidden;
}
.game-sidebar .section-title,
.game-sidebar-right .section-title {
  margin: 0;
  padding-bottom: 7px;
  font-size: 12px;
  line-height: 1.2;
}

.player-card {
  background: var(--paper);
  border: 1px solid var(--paper3);
  border-radius: 8px; padding: 14px;
}
.player-card.active-turn { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200,146,42,0.2); }
.player-color-dot {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-right: 8px;
  vertical-align: middle;
}
.black-dot { background: var(--black-stone); box-shadow: inset 0 1px 2px rgba(255,255,255,0.1); }
.white-dot { background: var(--white-stone); border: 1px solid #ccc; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.player-name { font-size: 14px; font-weight: 700; }
.player-rank { font-size: 11px; color: var(--ink3); }
.capture-count { font-size: 12px; color: var(--ink3); margin-top: 6px; }
.seat-card {
  padding: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.seat-card-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.54), transparent 48%),
    radial-gradient(circle at 84% 12%, rgba(232,184,75,0.18), transparent 34%);
  pointer-events: none;
}
.seat-card-top {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  position: relative;
}
.seat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #3c2a14, #0e0b08);
  color: var(--gold2);
  border: 2px solid rgba(232,184,75,0.7);
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.seat-main { min-width: 0; }
.seat-eyebrow {
  color: rgba(76,60,34,0.68);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 2px;
}
.seat-name {
  font-size: 14px;
  font-weight: 800;
  color: #21160b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.seat-rank {
  margin-top: 3px;
  font-size: 10px;
  color: #b88722;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.seat-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  background: rgba(255,255,255,0.44);
  border: 1px solid rgba(123,90,39,0.13);
}
.seat-color .player-color-dot { display: block; margin: 0; }
.seat-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}
.seat-pill {
  border: 1px solid rgba(123,90,39,0.1);
  background: rgba(255,255,255,0.34);
  border-radius: 7px;
  padding: 5px 7px;
}
.seat-pill span { display: block; color: rgba(76,60,34,0.62); font-size: 11px; }
.seat-pill strong { display: block; color: #24180c; font-size: 12px; margin-top: 2px; }
.seat-clock-card {
  position: relative;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(37,26,17,0.88);
  border: 1px solid rgba(232,184,75,0.18);
  color: rgba(241,224,190,0.78);
}
.seat-clock-card span {
  font-size: 10px;
  font-weight: 700;
}
.seat-clock-card strong {
  color: #f3d36b;
  font-family: Consolas, monospace;
  font-size: 18px;
  line-height: 1;
}
.seat-clock-card em {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: 10px;
  color: rgba(241,224,190,0.58);
}
.seat-clock-card.active {
  border-color: rgba(232,184,75,0.72);
  box-shadow: inset 0 0 0 1px rgba(232,184,75,0.22), 0 0 12px rgba(232,184,75,0.16);
}
.seat-turn {
  margin-top: 7px;
  border-radius: 8px;
  padding: 5px 8px;
  text-align: center;
  font-size: 12px;
  color: rgba(76,60,34,0.72);
  background: rgba(36,24,12,0.06);
  position: relative;
}
.seat-turn.on {
  color: #1a1208;
  background: linear-gradient(135deg, #e3ab33, #f1c961);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(200,146,42,0.22);
}

.game-info-card {
  background: var(--paper);
  border: 1px solid var(--paper3);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px; color: var(--ink2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  align-content: start;
}
.game-info-card p { margin: 0; }
.game-info-card p:last-child { margin-bottom: 0; }
.info-label { color: var(--ink3); font-size: 11px; }

.clock-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 5px;
  background: #2a2017;
  border: 1px solid rgba(255,255,255,0.08);
  color: #e9dbc5;
  font-size: 12px;
}
.clock-row strong {
  color: #f3d36b;
  font-size: 18px;
  font-family: monospace;
}
.clock-row.active {
  border-color: #e8b84b;
  box-shadow: inset 0 0 0 1px rgba(232,184,75,0.35), 0 0 12px rgba(232,184,75,0.22);
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.game-btn {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 6px;
  border: 1px solid var(--paper3); background: var(--paper);
  color: var(--ink2); cursor: pointer; font-size: 13px;
  font-family: var(--font-sans);
  transition: all .2s;
}
.game-btn:hover { background: var(--paper3); }
.game-btn.danger { color: var(--red); border-color: #f5c6cb; }
.game-btn.danger:hover { background: #fde8e8; }
.game-btn.future {
  color: var(--ink3);
  border-style: dashed;
  cursor: default;
  opacity: .62;
}
.game-btn:disabled:hover { background: var(--paper); }

/* 棋盘容器 */
.board-area {
  display: flex; align-items: center; justify-content: center;
  padding: 24px 28px 46px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(56,78,36,0.62) 0%, transparent 52%),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(160deg, #13250d 0%, #0b1707 42%, #102009 100%);
  background-size: auto, 110px 110px, 110px 110px, auto;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}
.board-area::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.015) 49.5%, rgba(255,255,255,0.015) 50.5%, transparent 50.5%),
    linear-gradient(0deg,   transparent 49.5%, rgba(255,255,255,0.015) 49.5%, rgba(255,255,255,0.015) 50.5%, transparent 50.5%);
  background-size: 80px 80px;
  pointer-events: none;
}
.board-area::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

#go-board {
  cursor: default;
  border-radius: 4px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.42),
    0 0 0 10px rgba(125,87,42,0.34),
    0 0 26px rgba(232,184,75,0.28);
  max-width: min(70vw, calc(100vw - 680px));
  max-height: calc(100vh - 132px);
  transform: rotateX(2deg);
  position: relative;
  z-index: 2;
}

/* 手机端首次选点说明默认隐藏，电脑端不会显示。 */
.board-touch-guide {
  display: none;
}

.real-table-clock {
  width: 100%;
  padding: 11px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #5a3722, #2b1c13 58%, #1b120d),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.2), transparent 58%);
  border: 2px solid #6d4a2c;
  box-shadow: 0 16px 32px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.18);
  z-index: 4;
}
.real-clock-title {
  text-align: center;
  color: #ead5af;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.real-clock-foot {
  margin-top: 8px;
  text-align: center;
  color: rgba(233,219,197,0.72);
  font-size: 11px;
}
.real-clock-rule {
  margin-top: 7px;
  text-align: center;
  color: rgba(243,211,107,0.82);
  font-size: 11px;
}
.board-player-panel {
  position: static;
  z-index: 4;
  width: 100%;
}
.game-seat-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
}
.board-player-panel .player-card {
  background: rgba(245,239,225,0.9);
  border-color: rgba(218,177,87,0.82);
  box-shadow: 0 24px 42px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
}
.board-player-panel .player-card.active-turn {
  border-color: #d69b28;
  box-shadow: 0 24px 42px rgba(0,0,0,0.32), 0 0 0 2px rgba(232,184,75,0.42);
}

/* 聊天面板 */
.game-chat { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.game-chat-box {
  flex: 1; background: var(--paper);
  border: 1px solid var(--paper3); border-radius: 6px;
  padding: 10px; overflow-y: auto; font-size: 12px; line-height: 1.6;
  min-height: 0;
  max-height: none;
}

/* 棋谱记录 */
.moves-list {
  background: var(--paper);
  border: 1px solid var(--paper3); border-radius: 6px;
  padding: 10px; font-size: 11px; color: var(--ink2);
  min-height: 0;
  max-height: none; overflow-y: auto;
  font-family: var(--font-serif);
}
.ai-state-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(200,146,42,0.13);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}
.ai-state-badge.error {
  background: rgba(192,57,43,0.13);
  color: var(--red);
}
.move-entry { padding: 2px 0; border-bottom: 1px solid var(--paper3); }
.moves-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  color: var(--ink3);
  font-size: 12px;
}

/* ── 管理后台 ── */
#admin-view { display: none; padding: 24px; }
#admin-view.active { display: block !important; }
.admin-header { margin-bottom: 24px; }
.admin-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--ink); }
.admin-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--paper3); }
.admin-tab {
  padding: 10px 20px; background: none; border: none;
  cursor: pointer; font-size: 14px; font-family: var(--font-sans);
  color: var(--ink3); border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s;
}
.admin-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--paper2); border: 1px solid var(--paper3);
  border-radius: 8px; padding: 20px; text-align: center;
}
.stat-card .num { font-size: 32px; font-weight: 700; color: var(--ink); font-family: var(--font-serif); }
.stat-card .lbl { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; margin-bottom: 10px; }
.admin-table-wrap .admin-table { min-width: 720px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 10px 12px;
  background: var(--ink); color: var(--gold2);
  font-weight: 500; font-size: 12px; letter-spacing: 1px;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--paper3); }
.admin-table tr:hover td { background: var(--paper2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.badge-admin { background: var(--draw-bg); color: var(--draw-fg); }
.badge-ai { background: var(--win-bg); color: var(--win-fg); }
.badge-online { background: #d1ecf1; color: #0c5460; }
.badge-offline { background: #e2e3e5; color: #383d41; }
.admin-action-btn {
  padding: 3px 10px; border-radius: 3px; border: 1px solid var(--paper3);
  background: none; cursor: pointer; font-size: 11px; margin-right: 4px;
  font-family: var(--font-sans); transition: all .2s;
}
.admin-action-btn.del { color: var(--red); border-color: #f5c6cb; }
.admin-action-btn.del:hover { background: #fde8e8; }
.admin-action-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.admin-user-console {
  display: grid;
  gap: 14px;
}
.admin-user-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.5fr);
  gap: 16px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--paper3);
  border-radius: 8px;
  background: var(--paper2);
}
.admin-user-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.admin-user-subtitle {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink3);
}
.admin-user-filters {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(96px, .8fr)) auto;
  gap: 8px;
}
.admin-user-filters input,
.admin-user-filters select {
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--paper3);
  background: var(--paper);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
}
.admin-user-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--paper3);
  border-radius: 8px;
  background: var(--paper);
}
.admin-user-table th,
.admin-user-table td {
  vertical-align: top;
}
.admin-user-table tr.is-disabled td {
  opacity: .68;
}
.admin-user-name {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.admin-user-meta,
.admin-user-id {
  color: var(--ink3);
  font-size: 11px;
  line-height: 1.55;
}
.admin-user-id {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-user-actions {
  min-width: 230px;
}
.admin-user-actions .admin-action-btn {
  margin-bottom: 5px;
}
.admin-user-empty {
  text-align: center;
  color: var(--ink3);
  padding: 22px !important;
}
.admin-user-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--ink3);
  font-size: 12px;
}
.badge-super {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--ink);
  font-weight: 800;
}
.badge-banned { background: var(--loss-bg); color: var(--loss-fg); }
.badge-user {
  background: #eef1f4;
  color: #40505f;
}
.badge-danger {
  background: var(--loss-bg);
  color: var(--loss-fg);
}
.badge-warn {
  background: var(--draw-bg);
  color: var(--draw-fg);
}
.admin-user-detail-modal {
  width: min(760px, 94vw);
  max-height: min(820px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
}
.admin-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--paper3);
}
.admin-detail-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}
.admin-detail-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--paper3);
  border-radius: 8px;
  background: var(--paper);
}
.admin-detail-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-detail-grid div {
  padding: 10px;
  border-radius: 6px;
  background: var(--paper2);
}
.admin-detail-grid span {
  display: block;
  color: var(--ink3);
  font-size: 11px;
  margin-bottom: 4px;
}
.admin-detail-grid strong {
  color: var(--ink);
  font-size: 18px;
}
.admin-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  color: var(--ink2);
  font-size: 12px;
}
.admin-detail-games {
  display: grid;
  gap: 8px;
}
.admin-detail-games div {
  display: grid;
  grid-template-columns: 86px 120px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  background: var(--paper2);
  font-size: 12px;
}
.admin-detail-games span,
.admin-detail-games em {
  color: var(--ink3);
  font-style: normal;
}
.admin-detail-games strong {
  color: var(--ink);
}

/* ── 邀请对话框 ── */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26,18,8,0.6); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; /* 超高弹窗允许遮罩层滚动，避免标题栏被视口裁掉 */
}
.modal-overlay.hidden { display: none; }
/* margin:auto 在 flex 容器内同时实现居中与可滚动（替代 align/justify 居中导致的顶部裁切） */
.modal-overlay > .modal { margin: auto; flex-shrink: 0; }
.modal {
  background: var(--paper2);
  border: 1px solid var(--paper3);
  border-radius: 12px; padding: 32px;
  width: 400px; max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
/* 弹窗右上角统一关闭按钮 */
.modal-x {
  flex: 0 0 auto; margin-left: auto; width: 30px; height: 30px;
  border: none; border-radius: 6px; background: transparent;
  color: var(--ink3); font-size: 18px; line-height: 1; cursor: pointer;
  transition: all .15s;
}
.modal-x:hover { background: rgba(128,128,128,0.18); color: var(--ink); }
.invite-modal-panel {
  width: min(460px, 95vw);
  max-height: min(780px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
}
.invite-modal-panel .modal-title {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 18px;
  padding: 22px 24px 14px;
  background: var(--paper2);
  border-bottom: 1px solid rgba(123,90,39,0.12);
}
.invite-modal-panel .modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 16px -24px -24px;
  padding: 14px 24px 20px;
  background: linear-gradient(180deg, rgba(244,238,224,0.88), var(--paper2) 28%);
  border-top: 1px solid rgba(123,90,39,0.12);
}

/* ── 网页好友对弈分享 ── */
.friend-game-modal-panel {
  width: min(520px, 94vw);
  max-height: min(760px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: 24px;
}
.friend-game-modal-panel .modal-title {
  display: flex;
  align-items: center;
  margin: -24px -24px 18px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--paper3) 78%, transparent);
  background: var(--paper2);
}
.friend-game-lead { margin: 0 0 16px; color: var(--ink2); font-size: 13px; line-height: 1.7; }
.friend-game-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.friend-game-rule-grid .form-group { margin-bottom: 12px; }
.friend-game-rule-grid select { width: 100%; }
.friend-game-color { display: flex; align-items: center; gap: 18px; margin: 4px 0 12px; padding: 11px 13px; border: 1px solid var(--paper3); border-radius: 8px; color: var(--ink2); }
.friend-game-color legend { padding: 0 5px; color: var(--ink3); font-size: 12px; }
.friend-game-color label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.friend-game-color input { accent-color: var(--green); }
.friend-game-note, .friend-game-link-meta { margin: 6px 0 0; color: var(--ink3); font-size: 11px; line-height: 1.6; }
.friend-game-modal-panel .form-err { min-height: 18px; margin-top: 8px; }
.friend-game-modal-panel .modal-actions { margin: 18px -24px -24px; padding: 14px 24px 20px; border-top: 1px solid color-mix(in srgb, var(--paper3) 72%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--paper2) 80%, transparent), var(--paper2) 34%); }
.friend-game-inviter-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--paper3); border-radius: 10px; background: var(--paper); }
.friend-game-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.friend-game-inviter-card strong, .friend-game-inviter-card small { display: block; }
.friend-game-inviter-card strong { color: var(--ink); font-size: 15px; }
.friend-game-inviter-card small { margin-top: 4px; color: var(--ink3); font-size: 12px; }
.friend-game-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding: 13px; border-radius: 9px; background: var(--paper); color: var(--ink2); font-size: 12px; }
.friend-game-preview span { color: var(--ink3); }
.friend-game-success { padding: 12px 14px; border-radius: 8px; background: color-mix(in srgb, var(--green) 10%, var(--paper)); color: var(--green); font-size: 13px; }
.friend-game-link-label { display: block; margin-top: 16px; color: var(--ink3); font-size: 12px; }
.friend-game-link-row { display: flex; gap: 8px; margin-top: 6px; }
.friend-game-link-row input { min-width: 0; flex: 1; padding: 10px; border: 1px solid var(--paper3); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 12px; }
.friend-game-link-row .modal-btn { flex: 0 0 auto; }
@media (max-width: 560px) {
  .friend-game-modal-panel { padding: 18px; }
  .friend-game-modal-panel .modal-title { margin: -18px -18px 16px; padding: 16px 18px 12px; }
  .friend-game-rule-grid { grid-template-columns: 1fr; gap: 0; }
  .friend-game-modal-panel .modal-actions { margin: 16px -18px -18px; padding: 12px 18px 16px; }
  .friend-game-link-row { align-items: stretch; flex-direction: column; }
}
.modal .form-group.locked {
  opacity: 0.72;
}
.modal .form-group.locked input,
.modal .form-group.locked label {
  pointer-events: none;
}
.modal .form-group select:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--ink);
}
/* 对话框内的输入框和select强制浅色背景深色文字，覆盖全局深色input样式 */
.modal .form-group label { color: var(--ink3); }
.modal .form-group input,
.modal .form-group select {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1px solid var(--paper3) !important;
}
.modal .form-group input::placeholder { color: var(--ink3) !important; }
.modal .form-group select option { background: var(--paper); color: var(--ink); }

/* 外部棋谱链接必须能清楚确认是否已经粘贴成功。 */
#fairplay-kifu-link,
#dynamic-kifu-link,
#public-kifu-link,
.prompt-input {
  background: #f6f2e8 !important;
  color: #15251e !important;
  caret-color: #16765a !important;
  border-color: rgba(201,149,46,.72) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
}
#fairplay-kifu-link::placeholder,
#dynamic-kifu-link::placeholder,
#public-kifu-link::placeholder,
.prompt-input::placeholder { color: #68776f !important; opacity: 1; }

/* 执子颜色选择 */
.color-choice-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.color-choice-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--paper3);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink);
  transition: all .2s;
  user-select: none;
  flex: 1;
  justify-content: center;
}
.color-choice-opt:hover { border-color: rgba(217,170,63,0.4); }
.color-choice-opt.active {
  border-color: var(--gold2);
  background: rgba(217,170,63,0.08);
  box-shadow: 0 0 12px rgba(217,170,63,0.15);
}
.color-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.color-dot.black { background: radial-gradient(circle at 35% 35%, #444, #111); }
.color-dot.white { background: radial-gradient(circle at 35% 35%, #fff, #ddd); border: 1px solid rgba(0,0,0,0.15); }

.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-btn {
  flex: 1; padding: 10px; border-radius: 6px; border: 1px solid var(--paper3);
  background: none; cursor: pointer; font-size: 14px;
  font-family: var(--font-sans); transition: all .2s;
}
.modal-btn.primary { background: var(--ink); color: var(--gold2); border-color: var(--ink); }
.modal-btn.primary:hover { background: var(--ink2); }

/* 游戏结果弹窗 */
.result-modal { text-align: center; }
.result-modal .modal-actions { flex-wrap: wrap; }
.result-modal .modal-actions .modal-btn { flex: 1 1 calc(50% - 6px); }
.result-icon { font-size: 48px; margin-bottom: 16px; }
.result-text { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.result-detail { font-size: 14px; color: var(--ink3); margin-bottom: 20px; }

/* 通知 */
.toast-container { position: fixed; top: 70px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  position: relative;
  background: var(--ink); color: var(--paper);
  padding: 12px 28px 12px 20px; border-radius: 8px;
  border-left: 4px solid var(--gold); font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--green2); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 消息弹窗（邀请通知）*/
.invite-toast {
  background: var(--paper2); border: 1px solid var(--gold);
  border-radius: 10px; padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  max-width: 320px;
}
.invite-toast .title { font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: 14px; }
.invite-toast .detail { font-size: 12px; color: var(--ink3); margin-bottom: 12px; }
.invite-toast .btns { display: flex; gap: 8px; }
.accept-btn, .reject-btn { flex: 1; padding: 7px; background: var(--paper2); color: var(--green); border: 1px solid var(--green); border-radius: 4px; cursor: pointer; font-size: 12px; }
.accept-btn:hover, .reject-btn:hover { background: var(--paper); color: var(--green2); }

/* 响应式 */
@media (max-width: 1180px) {
  .game-layout {
    grid-template-columns: 224px minmax(0, 1fr) 282px;
  }
  .board-player-panel {
    width: 100%;
  }
  .seat-card {
    padding: 10px;
  }
  .seat-card-top {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 7px;
  }
  .seat-avatar {
    width: 38px;
    height: 38px;
  }
  .seat-name {
    font-size: 13px;
  }
  .seat-pill strong {
    font-size: 12px;
  }
  .game-actions {
    gap: 6px;
  }
  .game-btn {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  #lobby-view.active { grid-template-columns: 1fr; }
  #game-view.active {
    height: auto;
    min-height: auto;
    overflow: visible;
  }
  .game-layout {
    display: flex;
    flex-direction: column;
    min-height: auto;
    height: auto;
    overflow: visible;
  }
  .game-sidebar,
  .game-sidebar-right {
    display: flex;
    border: 0;
    border-top: 1px solid var(--paper3);
    padding: 14px 12px;
    max-height: none;
    overflow: visible;
  }
  .board-area {
    order: 1;
    min-height: auto;
    padding: 14px 12px 58px;
  }
  .game-sidebar {
    order: 2;
  }
  .game-sidebar-right {
    order: 3;
    display: flex;
  }
  .analyze-floating {
    left: 16px;
    right: 16px;
    bottom: 72px;
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
  }
  .board-player-panel {
    width: 100%;
  }
  .board-player-panel .player-card {
    padding: 10px;
  }
  .seat-card-top {
    grid-template-columns: 38px 1fr;
    gap: 8px;
  }
  .seat-avatar {
    width: 38px;
    height: 38px;
  }
  .seat-name { font-size: 13px; }
  .seat-rank { font-size: 11px; }
  .seat-color {
    display: none;
  }
  .seat-meta-row {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 8px;
  }
  .seat-pill {
    padding: 5px 7px;
  }
  .seat-turn {
    margin-top: 7px;
    padding: 5px 8px;
  }
  #go-board {
    max-width: calc(100vw - 24px);
    max-height: min(calc(100vh - 140px), calc(100vw - 24px));
  }
  .moves-list {
    min-height: 120px;
    max-height: 220px;
  }
  .game-chat-box {
    min-height: 140px;
    max-height: 240px;
  }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ── AI引擎管理面板 ── */
.ai-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ai-panel > div { min-width: 0; }
.ai-panel .ai-live-card,
.ai-panel .analysis-jobs-card { overflow-x: auto; }
.ai-card {
  background: var(--paper2); border: 1px solid var(--paper3);
  border-radius: 10px; padding: 20px;
}
.ai-card-title {
  font-size: 13px; font-weight: 700; color: var(--ink3);
  letter-spacing: 2px; margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--paper3);
}
.ai-status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.ai-status-dot.running { background: var(--green2); box-shadow: 0 0 6px var(--green2); }
.ai-status-dot.stopped { background: #aaa; }
.ai-status-dot.starting { background: var(--gold2); animation: pulse 1s infinite; }
.ai-status-dot.error { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.engine-select-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.engine-select-row select { flex:1; padding: 8px 10px; border: 1px solid var(--paper3); border-radius:6px; background:var(--paper); font-size:13px; }
.ai-field { margin-bottom: 12px; }
.ai-field label { display:block; font-size:11px; color:var(--ink3); margin-bottom:5px; font-weight:600; letter-spacing:1px; }
.ai-field input, .ai-field select {
  width:100%; padding:8px 10px; border:1px solid var(--paper3); border-radius:6px;
  background:var(--paper); color:var(--ink); font-size:13px;
}
.ai-field input:focus, .ai-field select:focus { border-color: var(--gold); outline:none; }
.ai-btn-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ai-btn {
  padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 13px; font-family: var(--font-sans); font-weight:500;
  transition: all .2s;
}
.ai-btn.start { background: var(--green2); color: var(--on-jade); }
.ai-btn.start:hover { background: var(--green); }
.ai-btn.stop { background: var(--red); color: white; }
.ai-btn.stop:hover { background: #a93226; }
.ai-btn.test { background: var(--gold); color: var(--ink); }
.ai-btn.test:hover { background: var(--gold2); }
.ai-btn.save { background: var(--ink); color: var(--gold2); }
.ai-btn.save:hover { background: var(--ink2); }
.exclusive-compute-card {
  border-color: rgba(217,170,63,.34);
  background: linear-gradient(145deg, rgba(10,31,25,.98), rgba(4,15,12,.98));
}
.exclusive-compute-summary {
  margin: 0 0 12px;
  color: var(--ink3);
  font-size: 12px;
  line-height: 1.65;
}
.exclusive-compute-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.exclusive-compute-btn {
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(217,170,63,.25);
  border-radius: 7px;
  color: var(--ink2);
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.exclusive-compute-btn strong { color: var(--gold2); font-size: 17px; }
.exclusive-compute-btn span { color: var(--ink3); font-size: 10px; }
.exclusive-compute-btn.active {
  border-color: rgba(116,240,210,.72);
  box-shadow: inset 0 0 0 1px rgba(116,240,210,.2), 0 0 16px rgba(47,183,145,.12);
  background: rgba(47,183,145,.12);
}
.exclusive-compute-btn.active strong { color: var(--teal2); }
.exclusive-compute-btn.off.active {
  border-color: rgba(208,98,83,.58);
  background: rgba(154,56,45,.12);
  box-shadow: inset 0 0 0 1px rgba(208,98,83,.12);
}
.exclusive-compute-btn.off.active strong { color: #e58b7d; }
.exclusive-compute-btn:disabled {
  opacity: .35;
  filter: grayscale(.7);
  cursor: not-allowed;
}
.exclusive-compute-status-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.exclusive-compute-status-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  overflow-wrap: anywhere;
  gap: 3px 8px;
  padding: 9px;
  border: 1px solid rgba(217,170,63,.16);
  border-radius: 6px;
  background: rgba(0,0,0,.14);
}
.exclusive-compute-status-list strong { color: var(--gold2); }
.exclusive-compute-status-list span { color: var(--ink2); font-size: 11px; }
.exclusive-compute-status-list em { grid-column: 1 / -1; color: var(--ink3); font-size: 10px; font-style: normal; }
.exclusive-compute-status-list em.ready { color: var(--teal2); }
.exclusive-compute-security,
.exclusive-compute-route-note {
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid rgba(217,170,63,.16);
  border-radius: 6px;
  color: var(--ink3);
  background: rgba(0,0,0,.14);
  font-size: 11px;
  line-height: 1.65;
}
.exclusive-compute-route-note { margin: 0 0 13px; }
@media (max-width: 900px) {
  .ai-panel { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .exclusive-compute-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exclusive-compute-btn { min-height: 56px; }
  .exclusive-compute-status-list { grid-template-columns: 1fr; }
}
.ai-log-box {
  background: var(--ink); color: #98e888; font-family: 'Courier New',monospace;
  font-size: 11px; padding: 12px; border-radius: 6px; height: 160px;
  overflow-y: auto; line-height: 1.6;
}
.ai-log-line { margin-bottom: 2px; }
.ai-log-line.err { color: #ff8585; }
.ai-log-line.info { color: var(--gold3); }
.toggle-row { display:flex; align-items:center; justify-content:space-between; padding: 10px 0; border-bottom:1px solid var(--paper3); }
.toggle-row:last-child { border-bottom:none; }
.toggle-label { font-size:13px; color:var(--ink2); }
.toggle-label small { display:block; font-size:11px; color:var(--ink3); margin-top:2px; }
.toggle-switch { position:relative; width:44px; height:24px; flex-shrink:0; }
.toggle-switch input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:#ccc; border-radius:24px; cursor:pointer; transition:.3s; }
.toggle-slider:before { content:''; position:absolute; width:18px; height:18px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--green2); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.komi-row { display:flex; gap:12px; }
.komi-row .ai-field { flex:1; }


/* ── 棋谱库 ── */
.kifu-filterbar {
  display: grid;
  grid-template-columns: 1fr 150px 130px;
  gap: 8px;
  margin: 2px 0 8px;
}
.kifu-filterbar input,
.kifu-filterbar select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--paper3);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-family: var(--font-sans);
}
.kifu-filter-count {
  margin: 0 0 10px;
  color: var(--ink3);
  font-size: 11px;
}
.kifu-card { margin-bottom: 8px; }
.kifu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 8px;
  border: 1px solid var(--paper3);
  background: var(--paper);
  transition: background .15s;
}
.kifu-item:hover { background: var(--paper2); }
.kifu-board-badge {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--board); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
  color: var(--ink2); flex-shrink: 0; border: 1px solid var(--board2);
}
.kifu-info { flex: 1; min-width: 0; }
.kifu-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.kifu-players {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.stone-label { font-weight: 800; }
.black-stone { color: #111; }
.white-stone { color: #f8f5ed; text-shadow: 0 0 2px #333; }
.kifu-rank {
  color: var(--ink3);
  font-size: 11px;
  font-weight: 500;
}
.kifu-vs { color: var(--ink3); margin: 0 4px; }
.kifu-meta { font-size: 11px; color: var(--ink3); }
.kifu-result { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.kifu-win  { background: var(--win-bg); color: var(--win-fg); }
.kifu-loss { background: var(--loss-bg); color: var(--loss-fg); }
.kifu-draw { background: var(--draw-bg); color: var(--draw-fg); }
.kifu-ongoing { background: #d1ecf1; color: #0c5460; }
.kifu-dl-btn {
  padding: 6px 14px; background: var(--ink); color: var(--gold2);
  border: none; border-radius: 5px; cursor: pointer; font-size: 12px;
  font-family: var(--font-sans); white-space: nowrap;
  transition: all .2s; flex-shrink: 0;
}
.kifu-dl-btn.secondary { background: var(--paper2); color: var(--ink2); border: 1px solid var(--paper3); }
.kifu-dl-btn:hover { background: var(--gold); color: var(--ink); }
.kifu-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.kifu-live-label {
  font-size: 11px;
  color: var(--ink3);
  padding: 6px 8px;
  text-align: center;
}
.kifu-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--paper3);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255,255,255,0.55);
}
.kifu-detail div {
  min-width: 0;
  font-size: 12px;
  color: var(--ink2);
}
.kifu-detail span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink3);
  font-size: 11px;
}
.kifu-detail strong {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 640px) {
  .kifu-filterbar { grid-template-columns: 1fr; }
  .kifu-item { align-items: flex-start; flex-wrap: wrap; }
  .kifu-actions { flex-direction: row; width: 100%; }
  .kifu-actions .kifu-dl-btn { flex: 1; }
  .kifu-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ── 形势判断面板 ── */
.analyze-btn {
  background: linear-gradient(135deg, var(--green2), var(--green));
  color: white !important; border-color: var(--green) !important;
  font-weight: 600;
}
.analyze-btn:hover { background: linear-gradient(135deg, var(--green), #1e3d28) !important; }
.analyze-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.analyze-floating {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  max-width: calc(100% - 48px);
  z-index: 5;
  background: var(--paper2);
  border: 1px solid var(--paper3);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  overflow: hidden;
}
.analyze-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--paper3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.analyze-panel-head button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--paper3);
  border-radius: 5px;
  background: var(--paper2);
  color: var(--ink3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.analyze-panel-head button:hover {
  background: var(--paper3);
  color: var(--ink);
}
.analyze-card {
  background: var(--paper); border: 0;
  border-radius: 0; padding: 14px; font-size: 12px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.analyze-title {
  font-size: 11px; font-weight: 700; color: var(--ink3);
  letter-spacing: 1px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}

/* 胜率条 */
.winrate-bar-wrap {
  margin: 10px 0; border-radius: 4px; overflow: hidden;
  height: 22px; background: white;
  border: 1px solid var(--paper3);
  display: flex; position: relative;
}
.winrate-black {
  background: linear-gradient(90deg, #1a1a1a, #3a3a3a);
  height: 100%; transition: width .6s ease;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px;
}
.winrate-white {
  flex: 1; background: linear-gradient(90deg, #e8e4dc, #f5f0e8);
  height: 100%; display: flex; align-items: center;
  padding-left: 6px;
}
.winrate-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
}
.winrate-black .winrate-label { color: rgba(255,255,255,0.9); }
.winrate-white .winrate-label { color: rgba(30,20,10,0.8); }

/* 分数行 */
.score-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--paper3);
}
.score-row:last-child { border-bottom: none; }
.score-label { color: var(--ink3); }
.score-value { font-weight: 700; color: var(--ink); }
.score-value.black { color: #1a1a1a; }
.score-value.white { color: #555; }
.score-value.winner-black { color: #1a1a1a; font-size: 13px; }
.score-value.winner-white { color: #555; font-size: 13px; }

/* 结论区 */
.analyze-conclusion {
  margin-top: 10px; padding: 10px 12px;
  border-radius: 6px; font-size: 12px; line-height: 1.6;
  font-weight: 500; text-align: center;
}
.conclude-black { background: #1a1a1a; color: #f0ede6; }
.conclude-white { background: #f0ede6; color: #1a1a1a; border: 1px solid #ccc; }
.conclude-draw  { background: #e8f5ec; color: #1a4a28; }
.conclude-unknown { background: var(--paper2); color: var(--ink3); }

.analyze-meta {
  margin-top: 8px; font-size: 10px; color: var(--ink3);
  text-align: right;
}


/* ── 棋盘工具栏 ── */
.board-toolbar {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 10;
  background: rgba(20,25,12,0.82); border: 1px solid rgba(200,146,42,0.35);
  border-radius: 20px; padding: 5px 12px; backdrop-filter: blur(8px);
}
.board-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: rgba(200,180,140,0.7);
  padding: 3px 8px; border-radius: 12px; transition: all .2s;
  font-family: var(--font-sans); white-space: nowrap;
}
.board-toggle.on { background: rgba(200,146,42,0.25); color: var(--gold2); }
.board-toggle:hover { color: var(--gold2); }


/* ── 复盘界面 ── */
.rv-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,146,42,0.25);
  color: rgba(200,180,140,0.85); cursor: pointer;
  border-radius: 5px; padding: 7px 4px; font-size: 14px;
  transition: all .15s; width: 100%;
}
.rv-btn:hover { background: rgba(200,146,42,0.2); color: var(--gold2); }
.rv-btn.active { background: rgba(200,146,42,0.3); color: var(--gold2); border-color: var(--gold); }
.rv-move-item {
  padding: 4px 8px; margin-bottom: 2px; border-radius: 4px; cursor: pointer;
  display: flex; gap: 7px; align-items: center; transition: background .1s;
}
.rv-move-item:hover { background: rgba(200,146,42,0.15); }
.rv-move-item.current { background: rgba(200,146,42,0.25); color: var(--gold2); }
.rv-move-num { color: rgba(200,180,140,0.5); min-width: 28px; text-align: right; }
.rv-move-stone { display:inline-block; width:10px; height:10px; border-radius:50%; flex-shrink:0; }


/* ── 数子系统 ── */
.score-btn {
  background: linear-gradient(135deg, #8B6914, #c8922a) !important;
  color: white !important; border-color: #a07820 !important;
  font-weight: 600;
}
.score-btn:hover { background: linear-gradient(135deg, #a07820, #e8a030) !important; }
.score-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 数子结果弹窗 */
.score-modal-body {
  background: var(--paper2);
  border-radius: 10px; padding: 0;
  overflow: hidden;
}
.score-modal-header {
  background: var(--ink); color: var(--gold2);
  padding: 16px 20px;
  font-family: var(--font-serif); font-size: 16px; font-weight: 700;
  letter-spacing: 2px; display: flex; align-items: center; gap: 10px;
}
.score-board-mini {
  width: 100%; position: relative;
  background: var(--board); border-radius: 4px; overflow: hidden;
}
.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 16px;
}
.score-side-card {
  border-radius: 8px; padding: 14px; text-align: center;
}
.score-side-card.black-side {
  background: #1a1a1a; color: #f5d98a;
}
.score-side-card.white-side {
  background: #f0ede6; color: #1a1a1a;
  border: 1px solid #ccc;
}
.score-side-title {
  font-size: 12px; margin-bottom: 8px; opacity: 0.7;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.score-side-num {
  font-size: 36px; font-weight: 700;
  font-family: var(--font-serif); line-height: 1;
}
.score-side-detail {
  font-size: 11px; opacity: 0.65; margin-top: 6px; line-height: 1.7;
}
.score-winner-banner {
  margin: 12px 16px; padding: 14px;
  border-radius: 8px; text-align: center;
  font-family: var(--font-serif);
}
.score-winner-banner.black-win {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: #f5d98a; border: 1px solid rgba(200,146,42,0.4);
}
.score-winner-banner.white-win {
  background: linear-gradient(135deg, #f0ede6, #e8e4dc);
  color: #1a1a1a; border: 1px solid #bbb;
}
.score-winner-name {
  font-size: 18px; font-weight: 700; margin-bottom: 4px;
}
.score-winner-margin {
  font-size: 14px; opacity: 0.8;
}
.score-territory-row {
  display: flex; justify-content: space-between;
  padding: 8px 16px; font-size: 12px; color: var(--ink2);
  border-bottom: 1px solid var(--paper3);
}
.score-territory-row:last-child { border-bottom: none; }
.score-agree-row {
  display: flex; gap: 10px; padding: 16px;
}
.score-agree-btn {
  flex: 1; padding: 12px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 14px; font-family: var(--font-serif); font-weight: 600;
  letter-spacing: 1px; transition: all .2s;
}
.score-agree-btn.agree {
  background: var(--green2); color: var(--on-jade);
}
.score-agree-btn.agree:hover { background: var(--green); }
.score-agree-btn.disagree {
  background: var(--paper3); color: var(--ink2);
  border: 1px solid var(--paper3);
}
.score-agree-btn.disagree:hover { background: var(--red); color: white; }
.score-agree-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.score-waiting {
  font-size: 12px; color: var(--ink3); text-align: center;
  padding: 8px 16px 4px;
}

/* 加载状态 */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--ink3); font-size: 14px; }
.empty { text-align: center; padding: 32px; color: var(--ink3); font-size: 13px; }

/* 空状态（带图标） */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; text-align: center; color: var(--ink3);
}
.empty-state .empty-icon {
  width: 46px; height: 46px; opacity: 0.5; color: var(--gold2);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-icon svg { width: 100%; height: 100%; }
.empty-state .empty-title { font-size: 14px; color: var(--ink2); font-weight: 600; }
.empty-state .empty-desc { font-size: 12px; line-height: 1.6; max-width: 280px; }

/* ── AI 科技版统一视觉层：大厅 / 对弈室 / 管理后台 ── */
body:not(.auth-mode) {
  --ink: #f7edcf;
  --ink2: #d8c9a8;
  --ink3: #8ea99f;
  --paper: rgba(9, 22, 18, 0.88);
  --paper2: rgba(5, 14, 12, 0.94);
  --paper3: rgba(217, 170, 63, 0.24);
  --gold: #d4a13b;
  --gold2: #ffe07a;
  --gold3: #fff0ad;
  --green: #143b31;
  --green2: #45d9b8;
  /* --green2 在浅色下是浅薄荷（#8ecab2），深色下是深墨绿；按钮文字需随主题取反 */
  --on-jade: #0d1712;
  --teal: #44d8b7;
  --teal2: #8df7df;
  --red: #ff756a;
  --shadow: rgba(0, 0, 0, 0.42);
  /* 语义色令牌：深浅两套值，供模板/JS 内联引用，避免把色值写死在内联样式里 */
  --g-brilliant: #00d2d2;
  --g-good: #00dc00;
  --g-normal: #8cca22;
  --g-doubt: #b48c14;
  --g-bad: #c88c32;
  --g-blunder: #d01013;
  --g-terrible: #9b1996;
  --g-score-good: #3fd6a0;
  --g-score-mid: #e8b341;
  --g-score-bad: #ff7b7b;
  --g-info: #39d0ff;
  --g-eval-plus: #f5d98a;
  --g-eval-minus: #74f0d2;
  --g-amt-neutral: #b4b2a9;
  --g-amt-refund: #fac775;
  --g-amt-spend: #f0997b;
  --g-amt-gain: #97c459;
  --g-fp-insufficient: #b8aa8b;
  --g-fp-ordinary: #74f0d2;
  --g-fp-some: #e8b341;
  --g-fp-noticeable: #ffad66;
  --g-fp-concentrated: #ff7b7b;
  background:
    linear-gradient(90deg, rgba(217,170,63,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(68,216,183,0.03) 1px, transparent 1px),
    linear-gradient(145deg, #020807 0%, #071511 45%, #030806 100%);
  background-size: 72px 72px, 72px 72px, auto;
  color: var(--ink);
}

body:not(.auth-mode) * {
  letter-spacing: 0 !important;
}

body:not(.auth-mode) #navbar {
  height: 58px;
  background: rgba(2, 8, 7, 0.92);
  border-bottom: 1px solid rgba(217, 170, 63, 0.28);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
  backdrop-filter: blur(16px);
}

body:not(.auth-mode) .logo {
  filter: drop-shadow(0 0 12px rgba(68,216,183,0.09));
}

body:not(.auth-mode) .nav-btn,
body:not(.auth-mode) .game-btn,
body:not(.auth-mode) .invite-btn-sm,
body:not(.auth-mode) .admin-action-btn,
body:not(.auth-mode) .modal-btn,
body:not(.auth-mode) .chat-send,
body:not(.auth-mode) .ai-btn,
body:not(.auth-mode) .board-toggle {
  border-radius: 6px;
}

body:not(.auth-mode) .nav-btn,
body:not(.auth-mode) .game-btn,
body:not(.auth-mode) .admin-action-btn,
body:not(.auth-mode) .modal-btn,
body:not(.auth-mode) .board-toggle {
  border: 1px solid rgba(217,170,63,0.30);
  background: rgba(8, 24, 20, 0.72);
  color: var(--ink2);
}

body:not(.auth-mode) .nav-btn:hover,
body:not(.auth-mode) .game-btn:hover,
body:not(.auth-mode) .admin-action-btn:hover,
body:not(.auth-mode) .modal-btn:hover,
body:not(.auth-mode) .board-toggle:hover {
  border-color: rgba(255,224,122,0.68);
  background: rgba(217,170,63,0.14);
  color: var(--gold2);
}

body:not(.auth-mode) .nav-btn.primary,
body:not(.auth-mode) .modal-btn.primary,
body:not(.auth-mode) .chat-send,
body:not(.auth-mode) .game-btn.analyze-btn,
body:not(.auth-mode) .score-btn,
body:not(.auth-mode) .ai-btn.save,
body:not(.auth-mode) .ai-btn.test {
  border-color: rgba(255,224,122,0.64) !important;
  background: linear-gradient(135deg, #b88523, #f0c765 52%, #bd8a28) !important;
  color: #0d1712 !important;
  font-weight: 800;
}

body:not(.auth-mode) .game-btn.danger,
body:not(.auth-mode) .admin-action-btn.del {
  border-color: rgba(255,117,106,0.48);
  color: #ffb2aa;
}

body:not(.auth-mode) .game-btn.future {
  border-style: dashed;
  color: rgba(216,201,168,0.48);
}

body:not(.auth-mode) .section-title {
  color: var(--teal2);
  border-bottom-color: rgba(68,216,183,0.16);
  text-transform: none;
}

body:not(.auth-mode) .sidebar,
body:not(.auth-mode) .sidebar-right,
body:not(.auth-mode) .game-sidebar,
body:not(.auth-mode) .game-sidebar-right {
  background:
    linear-gradient(180deg, rgba(9,25,20,0.96), rgba(4,11,10,0.98)),
    linear-gradient(90deg, rgba(68,216,183,0.07) 1px, transparent 1px);
  background-size: auto, 28px 28px;
  border-color: rgba(217,170,63,0.22);
}

body:not(.auth-mode) #lobby-view.active {
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr) minmax(286px, 318px);
  min-height: calc(100vh - 58px);
  height: calc(100vh - 58px);
  overflow: hidden;
}

body:not(.auth-mode) .lobby-center {
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  gap: 12px;
  overflow-y: auto;
}

body:not(.auth-mode) .lobby-hero {
  margin-bottom: 0;
  padding: 16px 18px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(15,35,29,0.96), rgba(5,13,11,0.96)),
    linear-gradient(90deg, rgba(217,170,63,0.08) 1px, transparent 1px);
  background-size: auto, 32px 32px;
  border: 1px solid rgba(217,170,63,0.26);
  box-shadow: 0 20px 44px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05);
}

body:not(.auth-mode) .lobby-command {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 16px;
}

body:not(.auth-mode) .lobby-hero h1 {
  margin-bottom: 5px;
  color: var(--gold2);
  font-size: clamp(22px, 2vw, 30px);
}

body:not(.auth-mode) .lobby-hero p {
  max-width: 740px;
  color: rgba(232,244,238,0.76);
  line-height: 1.65;
}

body:not(.auth-mode) .stats-row {
  margin-top: 0;
  gap: 10px;
}

body:not(.auth-mode) .stat-chip {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(6,17,14,0.68);
  border-color: rgba(68,216,183,0.20);
}

body:not(.auth-mode) .stat-num {
  color: var(--gold2);
  font-size: 21px;
}

body:not(.auth-mode) .stat-label {
  color: rgba(216,201,168,0.70);
}

.lobby-handicap-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(217,170,63,0.23);
  background:
    linear-gradient(180deg, rgba(7,25,20,0.95), rgba(4,13,11,0.98)),
    linear-gradient(90deg, rgba(68,216,183,0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,0.035) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  box-shadow: inset 0 0 44px rgba(68,216,183,0.035), 0 20px 44px rgba(0,0,0,0.20);
}

.challenge-panel-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.challenge-panel-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--gold2);
}

.challenge-panel-head p {
  margin: 4px 0 0;
  color: rgba(232,244,238,0.68);
  font-size: 12px;
}

.handicap-grade-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.challenge-card {
  min-height: 150px;
  padding: 14px 10px 10px;
  border: 1px solid rgba(217,170,63,0.20);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(13,29,24,0.86);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.challenge-card:hover,
.challenge-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255,224,122,0.70);
  background: rgba(21,39,30,0.96);
  box-shadow: inset 0 0 28px rgba(217,170,63,0.08), 0 14px 28px rgba(0,0,0,0.28);
  outline: none;
}

.mini-board {
  width: min(96px, 100%);
  aspect-ratio: 1;
  position: relative;
  border-radius: 4px;
  border: 1px solid rgba(68,216,183,0.22);
  background:
    linear-gradient(90deg, rgba(149,123,56,0.32) 1px, transparent 1px),
    linear-gradient(0deg, rgba(149,123,56,0.32) 1px, transparent 1px),
    linear-gradient(135deg, rgba(16,51,38,0.94), rgba(9,25,20,0.96));
  background-size: 12.5% 12.5%, 12.5% 12.5%, auto;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(68,216,183,0.06);
}

.mini-board::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,224,122,0.26) 0 3px, transparent 4px),
    radial-gradient(circle at 26% 26%, rgba(255,224,122,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 74% 26%, rgba(255,224,122,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 26% 74%, rgba(255,224,122,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 74% 74%, rgba(255,224,122,0.20) 0 3px, transparent 4px);
}

.mini-board::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,224,122,0.07), transparent 42%, rgba(68,216,183,0.09)),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(141,247,223,0.035) 8px);
}

.grade-mark {
  position: absolute;
  inset: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #ffe98d;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255,224,122,0.48), 0 0 18px rgba(68,216,183,0.25);
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(68,216,183,0.22) 17%, transparent 18% 82%, rgba(68,216,183,0.22) 83%, transparent 84%),
    linear-gradient(0deg, transparent 0 16%, rgba(255,224,122,0.13) 17%, transparent 18% 82%, rgba(255,224,122,0.13) 83%, transparent 84%);
  border: 1px solid rgba(255,224,122,0.18);
}

.grade-mark::before,
.grade-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal2);
  box-shadow: 0 0 12px rgba(141,247,223,0.82);
  transform: translateY(-50%);
}

.grade-mark::before { left: -4px; }
.grade-mark::after { right: -4px; }

.challenge-card[data-level="1"] .grade-mark {
  color: #fff4ad;
  border-color: rgba(255,224,122,0.38);
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255,224,122,0.22) 13%, transparent 14% 86%, rgba(255,224,122,0.22) 87%, transparent 88%);
}

.challenge-card[data-level="9"] .grade-mark {
  color: #d8c987;
  text-shadow: 0 0 8px rgba(255,224,122,0.32), 0 0 15px rgba(68,216,183,0.18);
}

.game-type-label {
  display: grid;
  place-items: center;
  gap: 1px;
}

.game-type-label strong {
  color: var(--gold2);
  font-size: 14px;
  line-height: 1.1;
}

.game-type-label span {
  color: rgba(232,244,238,0.56);
  font-size: 10px;
}

.cloud-compute-card {
  grid-template-rows: auto auto 1fr;
  padding-top: 10px;
  border-color: rgba(68,216,183,0.34);
  background:
    linear-gradient(180deg, rgba(11,37,32,0.96), rgba(8,19,16,0.96));
}

.cloud-compute-card b {
  color: var(--teal2);
  font-size: 15px;
}

.cloud-compute-card small {
  color: rgba(232,244,238,0.60);
  font-size: 10px;
}

.compute-visual {
  width: min(92px, 100%);
  aspect-ratio: 1;
  margin-top: 3px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid rgba(68,216,183,0.20);
  background:
    linear-gradient(90deg, rgba(68,216,183,0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(68,216,183,0.12) 1px, transparent 1px),
    rgba(7,19,16,0.86);
  background-size: 12.5% 12.5%;
}

.compute-visual svg {
  width: 70px;
  height: 70px;
  overflow: visible;
}

.compute-cloud {
  fill: rgba(68,216,183,0.08);
  stroke: var(--teal2);
  stroke-width: 2.4;
}

.compute-circuit,
.compute-nodes {
  fill: none;
  stroke: var(--gold2);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compute-core {
  fill: rgba(255,224,122,0.16);
  stroke: var(--gold2);
  stroke-width: 1.8;
}

.compute-nodes {
  fill: var(--teal2);
  stroke: none;
}

.challenge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: rgba(232,244,238,0.62);
  font-size: 11px;
}

body:not(.auth-mode) .online-user,
body:not(.auth-mode) .game-record,
body:not(.auth-mode) .personal-card,
body:not(.auth-mode) #leaderboard-card,
body:not(.auth-mode) .chat-box,
body:not(.auth-mode) .moves-list,
body:not(.auth-mode) .game-chat-box,
body:not(.auth-mode) .game-info-card {
  background: rgba(8,22,18,0.72) !important;
  border-color: rgba(217,170,63,0.20) !important;
  color: var(--ink2);
}

body:not(.auth-mode) .chat-input,
body:not(.auth-mode) .form-group input,
body:not(.auth-mode) .form-group select,
body:not(.auth-mode) .kifu-filterbar input,
body:not(.auth-mode) .kifu-filterbar select,
body:not(.auth-mode) .admin-user-filters input,
body:not(.auth-mode) .admin-user-filters select,
body:not(.auth-mode) .engine-select-row select,
body:not(.auth-mode) .ai-field input,
body:not(.auth-mode) .ai-field select {
  background: rgba(5,15,13,0.88) !important;
  border-color: rgba(217,170,63,0.30) !important;
  color: var(--ink) !important;
}

body:not(.auth-mode) .chat-input::placeholder,
body:not(.auth-mode) .form-group input::placeholder {
  color: rgba(216,201,168,0.50) !important;
}

body:not(.auth-mode) .board-area {
  background:
    linear-gradient(90deg, rgba(68,216,183,0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,0.040) 1px, transparent 1px),
    linear-gradient(160deg, #071914 0%, #020807 50%, #0a1c16 100%);
  background-size: 92px 92px, 92px 92px, auto;
}

body:not(.auth-mode) .board-area::after {
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.28) 100%);
}

body:not(.auth-mode) .board-player-panel .player-card,
body:not(.auth-mode) .seat-card {
  background:
    linear-gradient(180deg, rgba(12,30,25,0.96), rgba(5,14,12,0.96)) !important;
  border-color: rgba(217,170,63,0.34) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

body:not(.auth-mode) .seat-card-glow {
  background: linear-gradient(135deg, rgba(68,216,183,0.08), transparent 52%);
}

body:not(.auth-mode) .seat-eyebrow,
body:not(.auth-mode) .seat-pill span,
body:not(.auth-mode) .seat-turn {
  color: rgba(232,244,238,0.58);
}

body:not(.auth-mode) .seat-name,
body:not(.auth-mode) .seat-pill strong,
body:not(.auth-mode) .admin-user-name,
body:not(.auth-mode) .admin-detail-name,
body:not(.auth-mode) .admin-detail-title,
body:not(.auth-mode) .score-value,
body:not(.auth-mode) .score-label {
  color: var(--ink);
}

body:not(.auth-mode) .seat-rank {
  color: var(--gold2);
}

body:not(.auth-mode) .seat-pill {
  background: rgba(255,255,255,0.04);
  border-color: rgba(217,170,63,0.16);
}

body:not(.auth-mode) .game-actions {
  gap: 8px;
}

body:not(.auth-mode) .board-toolbar {
  background: rgba(2,8,7,0.84);
  border-color: rgba(217,170,63,0.34);
}

body:not(.auth-mode) .modal {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12,28,24,0.98), rgba(5,13,11,0.98));
  border-color: rgba(217,170,63,0.30);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

body:not(.auth-mode) .invite-modal-panel .modal-title,
body:not(.auth-mode) .invite-modal-panel .modal-actions {
  background:
    linear-gradient(180deg, rgba(12,28,24,0.98), rgba(5,13,11,0.98));
  border-color: rgba(217,170,63,0.20);
}

body:not(.auth-mode) .modal-title {
  color: var(--gold2);
}

.cloud-compute-modal-panel {
  width: min(560px, 94vw);
}

.handicap-rules-modal-panel {
  width: min(620px, 94vw);
  padding: 22px;
}

.handicap-rules-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.handicap-rules-modal-head .modal-title { margin: 0 0 5px; }
.handicap-rules-modal-head p { margin: 0; color: var(--ink3); font-size: 13px; line-height: 1.65; }
.handicap-rules-modal-head > button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(68,216,183,0.28);
  border-radius: 7px;
  background: rgba(7,22,18,0.9);
  color: var(--teal2);
  font-size: 22px;
  cursor: pointer;
}

.handicap-rules-list { display: grid; gap: 10px; }
.handicap-rules-list section {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgba(217,170,63,0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13,38,31,0.88), rgba(6,18,15,0.92));
}
.handicap-rule-index {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid rgba(68,216,183,0.34);
  border-radius: 7px;
  color: var(--gold2);
  background:
    linear-gradient(90deg, rgba(68,216,183,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(68,216,183,.08) 1px, transparent 1px),
    rgba(4,20,16,.9);
  background-size: 12px 12px;
  font-family: var(--font-serif);
  font-weight: 800;
}
.handicap-rules-list strong { display: block; color: var(--ink); font-size: 14px; }
.handicap-rules-list p { margin: 5px 0 0; color: var(--ink3); font-size: 13px; line-height: 1.7; }
.handicap-rules-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  color: rgba(232,244,238,.70);
  background: rgba(217,170,63,.08);
  font-size: 12px;
  line-height: 1.65;
}

.cloud-modal-grid {
  display: grid;
  gap: 10px;
}

.cloud-modal-grid div {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(68,216,183,0.18);
  background: rgba(8,22,18,0.74);
}

.cloud-modal-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gold2);
}

.cloud-modal-grid span {
  color: rgba(232,244,238,0.70);
  font-size: 13px;
  line-height: 1.65;
}

body.software-modal-open { overflow: hidden; }

.software-center-modal-panel {
  width: min(1080px, 96vw);
  max-height: min(88dvh, 920px);
  padding: 0;
  overflow: auto;
}

.software-center-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(217,170,63,0.22);
  background: rgba(5,16,13,0.98);
}

.software-center-header .modal-title { margin: 0 0 6px; }
.software-center-header p { margin: 0; color: var(--ink3); font-size: 13px; line-height: 1.7; }
.software-close-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(217,170,63,0.32);
  border-radius: 7px;
  background: rgba(8,25,20,0.86);
  color: var(--gold2);
  font-size: 24px;
  cursor: pointer;
}

.software-center-tools {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(217,170,63,0.14);
}

.software-search { min-width: min(360px, 100%); }
.software-search span { display: block; margin-bottom: 6px; color: var(--ink3); font-size: 12px; }
.software-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(217,170,63,0.30);
  border-radius: 6px;
  background: rgba(2,11,9,0.8);
  color: var(--ink);
  font: inherit;
}

.software-platform-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.software-platform-tab {
  padding: 8px 12px;
  border: 1px solid rgba(68,216,183,0.22);
  border-radius: 999px;
  background: rgba(8,24,20,0.72);
  color: var(--ink3);
  cursor: pointer;
}
.software-platform-tab.active {
  border-color: var(--gold);
  background: rgba(217,170,63,0.16);
  color: var(--gold2);
}

.software-center-status { padding: 52px 24px; text-align: center; color: var(--ink3); }
.software-catalog { display: grid; gap: 14px; padding: 18px 24px; }
.software-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(68,216,183,0.16);
  border-radius: 9px;
  background: rgba(5,20,16,0.74);
}
.software-card.featured { border-color: rgba(217,170,63,0.42); box-shadow: inset 3px 0 0 rgba(217,170,63,0.72); }
.software-card-main { display: flex; min-width: 0; gap: 15px; }
.software-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(217,170,63,0.38);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(217,170,63,0.18), rgba(68,216,183,0.08));
  color: var(--gold2);
  font-weight: 800;
  font-size: 14px;
}
.software-card-content { min-width: 0; }
.software-card-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.software-card-title-row h3 { margin: 0; color: var(--ink); font-size: 19px; }
.software-featured-badge { padding: 2px 7px; border-radius: 10px; background: var(--gold); color: #1a1208; font-size: 11px; font-weight: 800; }
.software-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.software-meta span, .software-tags span { padding: 3px 7px; border-radius: 4px; background: rgba(68,216,183,0.08); color: rgba(232,244,238,0.72); font-size: 11px; }
.software-summary { margin: 11px 0 0; color: var(--ink2); font-size: 14px; line-height: 1.7; }
.software-description { margin: 7px 0 0; color: var(--ink3); font-size: 13px; line-height: 1.65; white-space: pre-line; }
.software-requirements { margin-top: 9px; color: var(--ink3); font-size: 12px; line-height: 1.6; }
.software-requirements strong { color: var(--gold2); }
.software-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.software-publisher { margin-top: 10px; color: rgba(232,244,238,0.46); font-size: 11px; }
.software-card-actions { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding-left: 18px; border-left: 1px solid rgba(217,170,63,0.16); }
.software-download-row { display: grid; gap: 5px; }
.software-download-btn {
  display: block;
  padding: 10px 14px;
  border: 1px solid rgba(217,170,63,0.46);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(217,170,63,0.20), rgba(68,216,183,0.08));
  color: var(--gold2);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.software-download-btn:hover { border-color: var(--gold); background: rgba(217,170,63,0.24); }
.software-extract-code { color: var(--ink3); font-size: 11px; text-align: center; }
.software-extract-code strong { color: var(--ink); letter-spacing: 1px; }
.software-extract-code button { border: 0; background: transparent; color: var(--jade); cursor: pointer; }
.software-tutorial-link { color: var(--jade); font-size: 12px; text-align: center; text-decoration: none; }
.software-link-empty { color: var(--ink3); font-size: 12px; text-align: center; }
.software-center-notice { margin: 0 24px 22px; padding: 11px 13px; border-left: 3px solid rgba(217,170,63,0.55); background: rgba(217,170,63,0.06); color: var(--ink3); font-size: 12px; line-height: 1.7; }

  .software-center-modal-panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0 !important; }
  .software-center-header { padding: 16px 14px 12px; }
  .software-center-header p { font-size: 12px; }
  .software-center-tools { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px 14px; }
  .software-search { min-width: 0; }
  .software-platform-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .software-platform-tab { flex: 0 0 auto; }
  .software-catalog { padding: 12px 10px; }
  .software-card { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .software-card-main { gap: 10px; }
  .software-card-icon { flex-basis: 46px; width: 46px; height: 46px; font-size: 12px; }
  .software-card-title-row h3 { font-size: 17px; }
  .software-card-actions { padding: 13px 0 0; border-left: 0; border-top: 1px solid rgba(217,170,63,0.16); }
  .software-download-btn { min-height: 44px; }
  .software-center-notice { margin: 0 10px 16px; }
}

.admin-software-toolbar, .admin-software-editor-head, .admin-software-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.admin-software-toolbar { margin-bottom: 16px; padding: 16px; border: 1px solid rgba(217,170,63,0.22); border-radius: 8px; background: rgba(5,20,16,0.72); }
.admin-software-toolbar h3, .admin-software-editor h3 { margin: 0 0 4px; color: var(--gold2); }
.admin-software-toolbar p { margin: 0; color: var(--ink3); font-size: 12px; line-height: 1.6; }
.admin-software-list { display: grid; gap: 10px; }
.admin-software-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(68,216,183,0.17);
  border-radius: 8px;
  background: rgba(5,18,15,0.72);
}
.admin-software-row.disabled { opacity: 0.62; }
.admin-software-row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--ink); font-weight: 700; }
.admin-software-summary { margin-top: 6px; color: var(--ink3); font-size: 12px; line-height: 1.5; }
.admin-software-row-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.admin-software-editor { margin-bottom: 18px; padding: 18px; border: 1px solid rgba(217,170,63,0.34); border-radius: 8px; background: rgba(6,22,18,0.92); }
.admin-software-editor-head { margin-bottom: 16px; }
.admin-software-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.admin-software-form-grid label, .admin-software-link-row label { display: grid; gap: 6px; color: var(--ink3); font-size: 12px; }
.admin-software-form-grid label.wide { grid-column: 1 / -1; }
.admin-software-form-grid input, .admin-software-form-grid select, .admin-software-form-grid textarea,
.admin-software-link-row input, .admin-software-link-row select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(217,170,63,0.25);
  border-radius: 5px;
  background: rgba(2,11,9,0.82);
  color: var(--ink);
  font: inherit;
}
.admin-software-form-grid textarea { resize: vertical; line-height: 1.6; }
.admin-software-form-grid small { color: rgba(232,244,238,0.42); }
.admin-software-checks { display: flex; gap: 20px; margin: 15px 0; color: var(--ink2); font-size: 13px; }
.admin-software-checks input, .admin-software-link-row .enabled input { width: auto; }
.admin-software-links-head { margin: 15px 0 9px; }
.admin-software-links-head strong { display: block; color: var(--gold2); }
.admin-software-links-head span { color: var(--ink3); font-size: 11px; }
#admin-software-links { display: grid; gap: 9px; }
.admin-software-link-row { display: grid; grid-template-columns: 130px 160px minmax(220px, 1fr) 100px auto auto; align-items: end; gap: 8px; padding: 11px; border: 1px solid rgba(68,216,183,0.14); border-radius: 6px; background: rgba(2,12,10,0.58); }
.admin-software-link-row .enabled { display: flex; align-items: center; min-height: 38px; white-space: nowrap; }
.admin-software-editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 900px) {
  .admin-software-form-grid { grid-template-columns: 1fr; }
  .admin-software-form-grid label.wide { grid-column: auto; }
  .admin-software-link-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-software-link-row .url { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .admin-software-toolbar, .admin-software-row, .admin-software-editor-head, .admin-software-links-head { align-items: stretch; flex-direction: column; }
  .admin-software-row-actions { width: 100%; }
  .admin-software-row-actions button { flex: 1; }
  .admin-software-link-row { grid-template-columns: 1fr; }
  .admin-software-link-row .url { grid-column: auto; }
}

@media (max-width: 520px) {
  body.view-admin-view #navbar { padding: 0 8px; gap: 7px; }
  body.view-admin-view .logo { min-width: 0; width: 110px; flex: 0 1 110px; }
  body.view-admin-view .nav-right,
  body.view-admin-view #nav-user,
  body.view-admin-view #nav-user .user-info { min-width: 0; width: auto; }
  body.view-admin-view #nav-user .user-info { gap: 5px; }
  body.view-admin-view #nav-username,
  body.view-admin-view #nav-rank,
  body.view-admin-view #nav-super-badge,
  body.view-admin-view #myprofile-nav-btn,
  body.view-admin-view #admin-nav-btn { display: none !important; }
  body.view-admin-view #nav-user .nav-btn { min-width: 0; padding: 5px 7px; font-size: 11px; white-space: nowrap; }
  body.view-admin-view #admin-view.active { padding: 10px; overflow-x: hidden; }
  body.view-admin-view .admin-tabs { max-width: 100%; }
}

body:not(.auth-mode) #admin-view.active {
  min-height: calc(100vh - 58px);
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(68,216,183,0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,0.035) 1px, transparent 1px),
    linear-gradient(145deg, #020807 0%, #071511 45%, #030806 100%);
  background-size: 72px 72px, 72px 72px, auto;
}

body:not(.auth-mode) .admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(217,170,63,0.22);
  border-radius: 8px;
  background: rgba(7,22,18,0.76);
}

body:not(.auth-mode) .admin-title {
  color: var(--gold2);
  font-size: 26px;
}

body:not(.auth-mode) .admin-tabs {
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid rgba(217,170,63,0.20);
  border-radius: 8px;
  background: rgba(5,14,12,0.82);
  overflow-x: auto;
}

body:not(.auth-mode) .admin-tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(216,201,168,0.70);
  margin: 0;
}

body:not(.auth-mode) .admin-tab.active {
  border-color: rgba(255,224,122,0.48);
  background: rgba(217,170,63,0.16);
  color: var(--gold2);
}

body:not(.auth-mode) .stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body:not(.auth-mode) .stat-card,
body:not(.auth-mode) .admin-user-toolbar,
body:not(.auth-mode) .admin-user-table-wrap,
body:not(.auth-mode) .admin-detail-section,
body:not(.auth-mode) .ai-card,
body:not(.auth-mode) .kifu-item,
body:not(.auth-mode) .kifu-detail,
body:not(.auth-mode) .analyze-floating,
body:not(.auth-mode) .analyze-card,
body:not(.auth-mode) .analyze-panel-head {
  background: rgba(8,22,18,0.78) !important;
  border-color: rgba(217,170,63,0.22) !important;
  color: var(--ink2);
}

body:not(.auth-mode) .stat-card .num {
  color: var(--gold2);
}

body:not(.auth-mode) .stat-card .lbl,
body:not(.auth-mode) .admin-user-subtitle,
body:not(.auth-mode) .admin-user-meta,
body:not(.auth-mode) .admin-user-id,
body:not(.auth-mode) .admin-detail-grid span,
body:not(.auth-mode) .admin-detail-games span,
body:not(.auth-mode) .admin-detail-games em,
body:not(.auth-mode) .toggle-label small,
body:not(.auth-mode) .kifu-meta,
body:not(.auth-mode) .kifu-rank {
  color: rgba(216,201,168,0.62);
}

body:not(.auth-mode) .admin-table {
  color: var(--ink2);
}

body:not(.auth-mode) .admin-table th {
  background: rgba(3,10,9,0.96);
  color: var(--gold2);
  border-bottom: 1px solid rgba(217,170,63,0.22);
}

body:not(.auth-mode) .admin-table td {
  border-bottom-color: rgba(217,170,63,0.12);
}

body:not(.auth-mode) .admin-table tr:hover td {
  background: rgba(68,216,183,0.06);
}

body:not(.auth-mode) .badge-user,
body:not(.auth-mode) .badge-offline {
  background: rgba(216,201,168,0.12);
  color: rgba(232,244,238,0.74);
}

body:not(.auth-mode) .badge-admin,
body:not(.auth-mode) .badge-warn {
  background: rgba(217,170,63,0.18);
  color: var(--gold2);
}

body:not(.auth-mode) .badge-ai,
body:not(.auth-mode) .badge-online {
  background: rgba(68,216,183,0.16);
  color: var(--teal2);
}

body:not(.auth-mode) .badge-danger {
  background: rgba(255,117,106,0.16);
  color: #ffb2aa;
}

body:not(.auth-mode) .ai-log-box {
  background: rgba(2,7,6,0.94);
  border: 1px solid rgba(68,216,183,0.16);
}

@media (max-width: 1280px) {
  body:not(.auth-mode) #lobby-view.active {
    grid-template-columns: 220px minmax(0, 1fr) 282px;
  }

  body:not(.auth-mode) .challenge-card {
    min-height: 138px;
  }

  body:not(.auth-mode) .mini-board,
  body:not(.auth-mode) .compute-visual {
    width: min(82px, 100%);
  }
}

@media (max-width: 1080px) {
  body:not(.auth-mode) .lobby-command {
    grid-template-columns: 1fr;
  }

  body:not(.auth-mode) .stats-row {
    margin-top: 8px;
  }

  body:not(.auth-mode) .handicap-grade-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.auth-mode) .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body:not(.auth-mode) #lobby-view.active {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  body:not(.auth-mode) .lobby-center {
    order: 1;
    overflow: visible;
  }

  body:not(.auth-mode) .sidebar {
    order: 2;
    display: block;
  }

  body:not(.auth-mode) .sidebar-right {
    order: 3;
    display: block;
  }

  body:not(.auth-mode) .handicap-grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.auth-mode) .challenge-foot {
    display: grid;
  }

  body:not(.auth-mode) .game-sidebar,
  body:not(.auth-mode) .game-sidebar-right {
    border-color: rgba(217,170,63,0.22);
  }

  body:not(.auth-mode) .admin-user-toolbar {
    grid-template-columns: 1fr;
  }

  body:not(.auth-mode) .admin-user-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  body:not(.auth-mode) .handicap-grade-grid,
  body:not(.auth-mode) .stats-grid,
  body:not(.auth-mode) .admin-detail-grid,
  body:not(.auth-mode) .admin-detail-list {
    grid-template-columns: 1fr;
  }

  body:not(.auth-mode) .lobby-center,
  body:not(.auth-mode) #admin-view.active {
    padding: 12px;
  }
}

/* 大厅正式页采用自然文档流，避免中等宽度下顶部模块被网格行压缩。 */
body:not(.auth-mode) .lobby-center {
  display: block;
}

body:not(.auth-mode) .lobby-hero,
body:not(.auth-mode) .lobby-handicap-panel {
  margin-bottom: 12px;
}

body:not(.auth-mode) .lobby-center > .section-title {
  margin-top: 16px;
}

/* ── 大厅：参考图式 AI 棋院工作台 ── */
.top-lobby-tabs {
  display: none;
}

body.view-lobby-view {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(68,216,183,0.12), transparent 34%),
    linear-gradient(145deg, #020806 0%, #071711 48%, #020706 100%);
}

body.view-lobby-view #navbar {
  height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(217,170,63,0.32);
  background:
    linear-gradient(90deg, rgba(2,8,7,0.98), rgba(8,25,19,0.96) 50%, rgba(3,9,8,0.98));
}

body.view-lobby-view .logo {
  min-width: 174px;
  font-size: 21px;
  letter-spacing: 2px;
}

body.view-lobby-view .top-lobby-tabs {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  margin-left: 22px;
  gap: 0;
}

body.view-lobby-view .top-lobby-tab {
  min-width: 82px;
  border: 0;
  border-left: 1px solid rgba(217,170,63,0.12);
  background: transparent;
  color: rgba(216,201,168,0.72);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

body.view-lobby-view .top-lobby-tab:last-child {
  border-right: 1px solid rgba(217,170,63,0.12);
}

body.view-lobby-view .top-lobby-tab.active,
body.view-lobby-view .top-lobby-tab:hover {
  color: var(--gold2);
  background: linear-gradient(180deg, rgba(217,170,63,0.12), rgba(217,170,63,0.03));
  box-shadow: inset 0 -2px 0 rgba(255,224,122,0.72);
}

body.view-lobby-view #nav-user::before {
  content: none;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin-right: 10px;
  border: 1px solid rgba(255,224,122,0.42);
  border-radius: 999px;
  color: var(--gold2);
  background: rgba(217,170,63,0.10);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body.view-lobby-view #nav-user .user-info {
  color: rgba(232,244,238,0.76);
}

body.view-lobby-view #nav-user .nav-btn:first-of-type {
  display: none;
}

body.view-lobby-view #nav-user .nav-btn {
  padding: 5px 10px;
}

body.view-lobby-view #lobby-view.active {
  grid-template-columns: 196px minmax(720px, 1fr) 342px;
  min-height: calc(100vh - 58px);
  height: calc(100vh - 58px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(68,216,183,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,0.026) 1px, transparent 1px),
    radial-gradient(circle at 58% 6%, rgba(68,216,183,0.08), transparent 24%);
  background-size: 64px 64px, 64px 64px, auto;
}

body.view-lobby-view .lobby-nav-rail,
body.view-lobby-view .lobby-side-panel {
  height: 100%;
  min-height: 0;
  border-color: rgba(217,170,63,0.22);
  background:
    linear-gradient(180deg, rgba(7,22,18,0.98), rgba(2,8,7,0.98)),
    linear-gradient(90deg, rgba(68,216,183,0.06) 1px, transparent 1px);
  background-size: auto, 34px 34px;
}

body.view-lobby-view .lobby-nav-rail {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 12px 14px;
  overflow: hidden;
}

body.view-lobby-view .lobby-nav-item {
  height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: rgba(232,244,238,0.68);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

body.view-lobby-view .lobby-nav-item:hover,
body.view-lobby-view .lobby-nav-item.active {
  border-color: rgba(255,224,122,0.28);
  background: linear-gradient(90deg, rgba(217,170,63,0.25), rgba(217,170,63,0.06));
  color: var(--gold2);
}

body.view-lobby-view .lobby-nav-item:hover {
  transform: translateX(2px);
}

body.view-lobby-view .lobby-nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(68,216,183,0.22);
  color: rgba(141,247,223,0.82);
  background:
    linear-gradient(90deg, rgba(68,216,183,0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(68,216,183,0.10) 1px, transparent 1px),
    rgba(5,16,13,0.8);
  background-size: 7px 7px;
  font-size: 11px;
  font-weight: 900;
}

body.view-lobby-view .lobby-ai-online {
  margin-top: auto;
  padding: 14px 10px 8px;
  border-top: 1px solid rgba(217,170,63,0.16);
  color: rgba(232,244,238,0.74);
  font-size: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

body.view-lobby-view .ai-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal2);
  box-shadow: 0 0 14px rgba(141,247,223,0.75);
}

body.view-lobby-view .ai-online-wave {
  grid-column: 1 / -1;
  height: 24px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(68,216,183,0.22) 5% 7%, transparent 7% 12%, rgba(68,216,183,0.46) 12% 14%, transparent 14% 20%, rgba(68,216,183,0.28) 20% 22%, transparent 22% 28%, rgba(68,216,183,0.62) 28% 30%, transparent 30% 36%, rgba(68,216,183,0.30) 36% 38%, transparent 38% 46%, rgba(68,216,183,0.52) 46% 48%, transparent 48% 58%, rgba(68,216,183,0.24) 58% 60%, transparent 60% 72%, rgba(68,216,183,0.44) 72% 74%, transparent 74% 100%),
    linear-gradient(180deg, transparent 49%, rgba(68,216,183,0.25) 50%, transparent 51%);
  opacity: .82;
}

body.view-lobby-view .lobby-main {
  position: relative;
  display: grid !important;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px 18px;
  overflow-y: auto;
}

body.view-lobby-view .lobby-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 4%, rgba(68,216,183,0.12), transparent 22%),
    linear-gradient(135deg, transparent 0 42%, rgba(217,170,63,0.04) 42% 42.2%, transparent 42.2% 100%);
}

body.view-lobby-view .mobile-lobby-modules {
  display: none;
}

body.view-lobby-view .lobby-handicap-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 14px 18px 10px;
  margin: 0;
  overflow: visible;
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 12%, rgba(68,216,183,0.14), transparent 20%),
    linear-gradient(180deg, rgba(8,28,22,0.96), rgba(4,13,11,0.98));
  border-color: rgba(217,170,63,0.24);
  box-shadow: inset 0 0 44px rgba(68,216,183,0.04), 0 22px 48px rgba(0,0,0,0.23);
}

body.view-lobby-view .lobby-circuit-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .58;
  mix-blend-mode: screen;
}

body.view-lobby-view .lobby-circuit-frame path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.view-lobby-view .lobby-circuit-frame .circuit-lines path {
  stroke: rgba(68,216,183,0.35);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(68,216,183,0.35));
}

body.view-lobby-view .lobby-circuit-frame .circuit-branches path {
  stroke: rgba(217,170,63,0.24);
  stroke-width: 1.4;
}

body.view-lobby-view .lobby-circuit-frame circle {
  fill: rgba(141,247,223,0.92);
  filter: drop-shadow(0 0 8px rgba(141,247,223,0.82));
}

body.view-lobby-view .lobby-circuit-frame .node-ring {
  fill: rgba(7,28,23,0.92);
  stroke: rgba(68,216,183,0.95);
  stroke-width: 2;
}

body.view-lobby-view .challenge-panel-head {
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

body.view-lobby-view .challenge-panel-head h2 {
  font-size: 21px;
  letter-spacing: .5px;
  margin: 0;
  flex-shrink: 0;
}

body.view-lobby-view .handicap-guide-inline {
  color: rgba(255,244,199,0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.5;
  text-shadow: 0 0 10px rgba(217,170,63,0.20);
  white-space: nowrap;
  margin: 0 12px;
}

body.view-lobby-view .lobby-ghost-btn,
body.view-lobby-view .lobby-card-head button,
body.view-lobby-view .online-tabs button,
body.view-lobby-view .ai-match-row button,
body.view-lobby-view .enter-hall-btn {
  border: 1px solid rgba(217,170,63,0.28);
  border-radius: 6px;
  background: rgba(8,24,20,0.78);
  color: rgba(232,244,238,0.78);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 800;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

body.view-lobby-view .lobby-ghost-btn {
  padding: 7px 13px;
  color: var(--teal2);
  border-color: rgba(68,216,183,0.34);
}

body.view-lobby-view .lobby-ghost-btn:hover,
body.view-lobby-view .lobby-card-head button:hover,
body.view-lobby-view .online-tabs button:hover,
body.view-lobby-view .ai-match-row button:hover {
  border-color: rgba(255,224,122,0.62);
  background: rgba(217,170,63,0.14);
  color: var(--gold2);
}

body.view-lobby-view .handicap-grade-grid {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 10px;
}

body.view-lobby-view .challenge-card {
  min-height: 100px;
  padding: 8px 8px 7px;
  border-color: rgba(217,170,63,0.22);
  background:
    linear-gradient(180deg, rgba(11,31,25,0.92), rgba(6,17,14,0.95));
  box-shadow: inset 0 0 18px rgba(68,216,183,0.025);
}

body.view-lobby-view .handicap-grade-card {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(92px, 7.4vw, 112px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: 0 10px 26px rgba(0,0,0,0.24);
}

body.view-lobby-view .handicap-card-art {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
  pointer-events: none;
}

body.view-lobby-view .handicap-rules-card-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
  pointer-events: none;
}

body.view-lobby-view .handicap-rules-card {
  box-shadow: 0 10px 26px rgba(0,0,0,0.24), 0 0 0 1px rgba(68,216,183,0.10);
}

body.view-lobby-view .handicap-grade-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,224,122,0.08);
  box-shadow: inset 0 0 20px rgba(68,216,183,0.03);
  pointer-events: none;
}

body.view-lobby-view .challenge-card:hover,
body.view-lobby-view .challenge-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255,224,122,0.65);
}

body.view-lobby-view .handicap-grade-card:hover,
body.view-lobby-view .handicap-grade-card:focus-visible {
  border-color: transparent;
  filter: saturate(1.08) brightness(1.07);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32), 0 0 0 1px rgba(255,224,122,0.28);
}

body.view-lobby-view .mini-board {
  width: 60px;
  border-color: rgba(68,216,183,0.28);
  background-size: 12.5% 12.5%, 12.5% 12.5%, auto;
}

body.view-lobby-view .grade-mark {
  inset: 8px;
  font-size: 20px;
  letter-spacing: 1px;
}

body.view-lobby-view .game-type-label strong {
  font-size: 13px;
}

body.view-lobby-view .game-type-label span {
  font-size: 9px;
}

body.view-lobby-view .cloud-compute-card {
  min-height: 100px;
  padding-top: 8px;
}

body.view-lobby-view .compute-visual {
  width: 54px;
}

body.view-lobby-view .compute-visual svg {
  width: 48px;
  height: 48px;
}

body.view-lobby-view .challenge-foot {
  position: relative;
  z-index: 2;
  margin-top: 9px;
  font-size: 10px;
}

body.view-lobby-view .challenge-foot i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--teal2);
  box-shadow: 0 0 10px rgba(141,247,223,0.78);
  vertical-align: middle;
}

body.view-lobby-view .lobby-lower-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 210px;
  grid-auto-rows: minmax(210px, auto);
}

body.view-lobby-view .lobby-card,
body.view-lobby-view .lobby-side-card {
  border: 1px solid rgba(217,170,63,0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,24,20,0.88), rgba(4,13,11,0.94));
  color: rgba(232,244,238,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

body.view-lobby-view .lobby-card {
  min-height: 210px;
  padding: 12px;
  overflow: hidden;
}

body.view-lobby-view .lobby-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.view-lobby-view .lobby-card-head h3 {
  margin: 0;
  color: var(--gold2);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .5px;
}

body.view-lobby-view .lobby-card-head button {
  min-height: 25px;
  padding: 4px 10px;
  font-size: 11px;
}

body.view-lobby-view .featured-kifu-row,
body.view-lobby-view .ai-match-row {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 7px;
  border: 1px solid rgba(217,170,63,0.12);
  border-radius: 6px;
  background: rgba(8,22,18,0.70);
  color: rgba(232,244,238,0.78);
  text-align: left;
}

body.view-lobby-view .featured-kifu-row {
  grid-template-columns: 48px 1fr;
  cursor: pointer;
  font-family: var(--font-sans);
}

body.view-lobby-view .featured-kifu-row:hover {
  border-color: rgba(255,224,122,0.42);
  background: rgba(217,170,63,0.08);
}

body.view-lobby-view .featured-kifu-row strong,
body.view-lobby-view .ai-match-row strong,
body.view-lobby-view .side-game-main strong {
  display: block;
  color: rgba(255,244,199,0.92);
  font-size: 12px;
  line-height: 1.25;
}

body.view-lobby-view .featured-kifu-row em,
body.view-lobby-view .ai-match-row em,
body.view-lobby-view .side-game-main em {
  display: block;
  margin-top: 2px;
  color: rgba(216,201,168,0.58);
  font-size: 10px;
  font-style: normal;
}

body.view-lobby-view .kifu-board-thumb,
body.view-lobby-view .side-game-thumb {
  width: 40px;
  aspect-ratio: 1;
  border-radius: 5px;
  border: 1px solid rgba(217,170,63,0.28);
  background:
    radial-gradient(circle at 24% 24%, #111 0 4px, transparent 4.6px),
    radial-gradient(circle at 62% 30%, #f3eee2 0 4px, transparent 4.6px),
    radial-gradient(circle at 42% 64%, #111 0 4px, transparent 4.6px),
    linear-gradient(90deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    linear-gradient(0deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    rgba(26,54,39,0.9);
  background-size: auto, auto, auto, 20% 20%, 20% 20%, auto;
}

body.view-lobby-view .kifu-board-thumb.alt {
  background:
    radial-gradient(circle at 42% 24%, #f3eee2 0 4px, transparent 4.6px),
    radial-gradient(circle at 68% 52%, #111 0 4px, transparent 4.6px),
    radial-gradient(circle at 28% 70%, #f3eee2 0 4px, transparent 4.6px),
    linear-gradient(90deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    linear-gradient(0deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    rgba(26,54,39,0.9);
  background-size: auto, auto, auto, 20% 20%, 20% 20%, auto;
}

body.view-lobby-view .kifu-board-thumb.dense {
  background:
    radial-gradient(circle at 24% 24%, #111 0 3.5px, transparent 4px),
    radial-gradient(circle at 44% 24%, #f3eee2 0 3.5px, transparent 4px),
    radial-gradient(circle at 64% 44%, #111 0 3.5px, transparent 4px),
    radial-gradient(circle at 34% 64%, #f3eee2 0 3.5px, transparent 4px),
    radial-gradient(circle at 70% 70%, #111 0 3.5px, transparent 4px),
    linear-gradient(90deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    linear-gradient(0deg, rgba(149,123,56,0.42) 1px, transparent 1px),
    rgba(26,54,39,0.9);
  background-size: auto, auto, auto, auto, auto, 20% 20%, 20% 20%, auto;
}

body.view-lobby-view .leaderboard-card-shell #leaderboard-card {
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

body.view-lobby-view .leaderboard-tabs {
  display: flex;
  gap: 4px;
}

body.view-lobby-view .leaderboard-tabs .invite-btn-sm {
  min-width: 42px;
  color: rgba(232,244,238,0.72);
  background: rgba(7,22,18,0.76);
}

body.view-lobby-view .leaderboard-tabs .invite-btn-sm.active {
  border-color: rgba(255,224,122,0.82);
  background: linear-gradient(135deg, #f2cf6a, #d59d2e);
  color: #07110d;
  box-shadow: 0 0 16px rgba(217,170,63,0.24);
}

body.view-lobby-view #leaderboard-period {
  width: 100%;
  height: 30px;
  margin-bottom: 8px;
  border: 1px solid rgba(217,170,63,0.22);
  border-radius: 6px;
  color: rgba(232,244,238,0.76);
  background: rgba(5,15,13,0.86);
}

body.view-lobby-view #leaderboard-list {
  display: grid;
  gap: 6px;
}

body.view-lobby-view #leaderboard-list .game-record {
  min-height: 36px;
  padding: 6px 8px;
}

body.view-lobby-view .ai-match-row {
  grid-template-columns: 40px 1fr auto;
}

body.view-lobby-view .ai-match-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(68,216,183,0.24);
  color: var(--gold2);
  background:
    linear-gradient(90deg, rgba(68,216,183,0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217,170,63,0.12) 1px, transparent 1px),
    rgba(5,16,13,0.9);
  background-size: 9px 9px;
  font-weight: 900;
}

body.view-lobby-view .ai-match-row button {
  min-width: 52px;
  height: 30px;
  color: var(--gold2);
}

body.view-lobby-view .lobby-chat-panel {
  min-height: 174px;
}

body.view-lobby-view .lobby-chat-panel .chat-box {
  height: 86px;
  margin-bottom: 8px;
}

body.view-lobby-view .lobby-side-panel {
  display: grid;
  grid-template-rows: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 12px;
  padding: 14px 12px;
  overflow: hidden;
}

body.view-lobby-view .lobby-side-card {
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

body.view-lobby-view .online-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  border: 1px solid rgba(217,170,63,0.18);
  border-radius: 6px;
  padding: 3px;
  background: rgba(4,13,11,0.7);
}

body.view-lobby-view .online-tabs button {
  min-height: 26px;
  font-size: 11px;
  border-color: transparent;
}

body.view-lobby-view .online-tabs button.active {
  border-color: rgba(255,224,122,0.44);
  background: linear-gradient(135deg, rgba(217,170,63,0.34), rgba(217,170,63,0.12));
  color: var(--gold2);
}

body.view-lobby-view .online-count-line {
  margin-bottom: 6px;
  color: rgba(216,201,168,0.58);
  font-size: 11px;
}

body.view-lobby-view #online-users-list,
body.view-lobby-view #my-games-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

body.view-lobby-view #online-users-list {
  height: calc(100% - 86px);
}

body.view-lobby-view #my-games-list {
  height: calc(100% - 126px);
}

body.view-lobby-view .lobby-online-user {
  min-height: 46px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 7px;
  margin-bottom: 6px;
}

body.view-lobby-view .lobby-online-user .user-avatar-sm {
  width: 34px;
  height: 34px;
}

body.view-lobby-view .lobby-user-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

body.view-lobby-view .lobby-user-state {
  color: #66dc8b;
  font-size: 10px;
  white-space: nowrap;
}

body.view-lobby-view .lobby-user-state.ai {
  color: var(--teal2);
}

body.view-lobby-view .lobby-user-actions .invite-btn-sm {
  padding: 3px 7px;
  font-size: 10px;
}

body.view-lobby-view .lobby-user-actions .invite-btn-sm.ai-btn {
  min-width: 58px;
  color: #06120e;
  background: linear-gradient(135deg, #8df7df, #35d59d);
}

body.view-lobby-view .lobby-game-record {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px;
  margin-bottom: 8px;
}

body.view-lobby-view .side-game-main {
  min-width: 0;
}

body.view-lobby-view .side-game-thumb {
  width: 38px;
}

body.view-lobby-view .quick-match-zone {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

body.view-lobby-view .quick-match-hint {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink3);
  padding: 8px 10px;
  border: 1px dashed rgba(217,170,63,0.22);
  border-radius: 6px;
  background: rgba(5,15,13,0.5);
  transition: opacity .2s ease;
}

body.view-lobby-view .quick-match-zone.matching .quick-match-hint {
  opacity: 0;
  height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

body.view-lobby-view .quick-match-zone.is-pulsing {
  animation: lobbyPulse 1.2s ease;
}

@keyframes lobbyPulse {
  0%, 100% { filter: none; }
  45% { filter: drop-shadow(0 0 14px rgba(255,224,122,0.35)); }
}

body.view-lobby-view #quick-match-size {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(217,170,63,0.26);
  border-radius: 6px;
  background: rgba(5,15,13,0.88);
  color: rgba(232,244,238,0.82);
}

body.view-lobby-view #quick-match-btn {
  height: 34px;
  padding: 0 12px;
}

body.view-lobby-view #quick-match-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(68,216,183,0.22);
  border-radius: 6px;
  color: rgba(232,244,238,0.74);
  background: rgba(4,15,13,0.78);
  font-size: 12px;
}

body.view-lobby-view #quick-match-panel.hidden {
  display: none !important;
}

body.view-lobby-view .enter-hall-btn {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  color: #09130f;
  border-color: rgba(255,224,122,0.72);
  background: linear-gradient(135deg, #b88324, #f0c765 52%, #c3902d);
}

body.view-lobby-view .lobby-hidden-cache {
  display: none !important;
}

@media (min-width: 1900px) {
  body.view-lobby-view #lobby-view.active {
    grid-template-columns: 220px minmax(900px, 1fr) 390px;
  }

  body.view-lobby-view .lobby-main {
    padding: 18px 22px 22px;
    gap: 16px;
  }

  body.view-lobby-view .handicap-grade-card {
    height: 98px;
  }

  body.view-lobby-view .mini-board {
    width: 78px;
  }

  body.view-lobby-view .lobby-card {
    min-height: 248px;
  }
}

@media (max-width: 1280px) {
  body.view-lobby-view #lobby-view.active {
    grid-template-columns: 176px minmax(650px, 1fr) 300px;
  }

  body.view-lobby-view .top-lobby-tab {
    min-width: 68px;
  }

  body.view-lobby-view .lobby-nav-item {
    padding: 0 9px;
    gap: 8px;
  }

  body.view-lobby-view .lobby-main {
    padding: 12px;
  }
}

@media (max-width: 1100px) {
  body.view-lobby-view {
    overflow: auto;
  }

  body.view-lobby-view #navbar {
    position: sticky;
  }

  body.view-lobby-view .top-lobby-tabs {
    display: none;
  }

  body.view-lobby-view #lobby-view.active {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 58px);
    overflow: visible;
  }

  body.view-lobby-view .lobby-nav-rail,
  body.view-lobby-view .lobby-side-panel {
    height: auto;
  }

  body.view-lobby-view .lobby-nav-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.view-lobby-view .lobby-ai-online {
    display: none;
  }

  body.view-lobby-view .lobby-side-panel {
    grid-template-rows: auto auto;
    overflow: visible;
  }

  body.view-lobby-view #online-users-list,
  body.view-lobby-view #my-games-list {
    height: auto;
    max-height: 280px;
  }
}

@media (max-width: 760px) {
  body.view-lobby-view .lobby-handicap-panel {
    min-height: auto;
    overflow: visible;
  }

  body.view-lobby-view .lobby-nav-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.view-lobby-view .handicap-grade-grid,
  body.view-lobby-view .lobby-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 520px) {
  body.view-lobby-view #navbar {
    padding: 0 12px;
  }

  body.view-lobby-view #nav-user::before {
    display: none;
  }

  body.view-lobby-view .handicap-grade-grid,
  body.view-lobby-view .lobby-lower-grid,
  body.view-lobby-view .lobby-nav-rail {
    grid-template-columns: 1fr;
  }

}

/* ── 对弈室：参考图高端 AI 科技棋室 ── */
body.view-game-view {
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 47%, rgba(34, 115, 86, 0.20), transparent 34%),
    linear-gradient(90deg, rgba(116, 240, 210, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(217, 170, 63, 0.026) 1px, transparent 1px),
    #020807;
  background-size: auto, 34px 34px, 34px 34px, auto;
}

body.view-game-view #navbar {
  height: 58px;
  padding: 0 18px;
  background: rgba(2, 9, 8, 0.94);
  border-bottom: 1px solid rgba(217, 170, 63, 0.32);
  box-shadow: 0 12px 28px rgba(0,0,0,0.34);
}

body.view-game-view .logo {
  min-width: 250px;
  font-size: 24px;
}

body.view-game-view .logo::after {
  content: none;
  margin-left: 34px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: rgba(232,244,238,0.78);
  text-shadow: none;
}

body.view-game-view #nav-user {
  align-items: center;
}

body.view-game-view #nav-user::before {
  content: none;
  display: none;
}

body.view-game-view .user-info {
  gap: 10px;
}

/* 对局页只保留明确的“用户名 + 段位”，避免文字头像重复且挤压姓名。 */
body.view-game-view #nav-avatar {
  display: none;
}

body.view-game-view #nav-username {
  display: inline-block;
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.94);
  font-size: 13px;
  font-weight: 800;
}

body.view-game-view #nav-rank {
  flex: 0 0 auto;
  padding-left: 9px;
  border-left: 1px solid rgba(217,170,63,0.26);
  color: var(--gold2) !important;
  font-weight: 800;
}

body.view-game-view .nav-btn {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

body.view-game-view #game-view.active {
  height: calc(100vh - 58px);
  min-height: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(41, 132, 96, 0.18), transparent 35%),
    radial-gradient(circle at 82% 48%, rgba(217,170,63,0.09), transparent 25%),
    linear-gradient(90deg, rgba(116,240,210,0.034) 1px, transparent 1px),
    linear-gradient(0deg, rgba(116,240,210,0.022) 1px, transparent 1px),
    linear-gradient(135deg, #030908 0%, #071712 44%, #030807 100%);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

body.view-game-view .room-layout {
  grid-template-columns: clamp(172px, 11vw, 194px) minmax(0, 1fr) clamp(294px, 18vw, 326px);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.view-game-view .game-action-rail,
body.view-game-view .room-info-rail {
  position: relative;
  background:
    linear-gradient(180deg, rgba(8, 25, 20, 0.95), rgba(2, 8, 7, 0.98)),
    linear-gradient(90deg, rgba(116,240,210,0.06) 1px, transparent 1px);
  background-size: auto, 30px 30px;
  border-color: rgba(217,170,63,0.30);
  box-shadow: inset 0 0 38px rgba(0,0,0,0.22);
}

body.view-game-view .game-action-rail {
  padding: 14px 10px;
  gap: 11px;
  overflow-x: hidden;
  overflow-y: auto;
}

body.view-game-view .room-info-rail {
  padding: 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

body.view-game-view .room-info-card-wrap {
  grid-row: 1;
}

body.view-game-view .room-record-card {
  grid-row: 2;
}

.room-panel-title {
  color: rgba(232,244,238,0.72);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.room-sub-title {
  margin-top: 18px;
  color: rgba(232,244,238,0.58);
}

.room-primary-actions,
.room-secondary-actions {
  display: grid;
  gap: 10px;
}

.room-analyze-tool {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.view-game-view .room-analyze-tool > .room-tool-btn {
  width: 100%;
}

body.view-game-view .room-action-btn,
body.view-game-view .room-tool-btn {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  min-height: 66px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(217,170,63,0.24);
  background: rgba(11, 29, 23, 0.82) !important;
  color: rgba(232,244,238,0.82) !important;
  font-weight: 700;
  box-shadow: inset 0 0 18px rgba(116,240,210,0.026);
}

/* 功能扩展按钮标签强制单行显示（避免「形势分析」等四字折行） */
body.view-game-view .room-action-btn > span:not([class]),
body.view-game-view .room-action-btn > span:not(.room-action-icon):not(.room-tool-icon),
body.view-game-view .room-tool-btn > span:not(.room-tool-icon):not(.room-action-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body.view-game-view .room-action-btn:hover,
body.view-game-view .room-tool-btn:hover {
  border-color: rgba(255,224,122,0.52);
  background: rgba(17, 42, 32, 0.92) !important;
  color: #ffe07a !important;
}

body.view-game-view .room-action-btn.danger {
  color: #f1c765 !important;
}

body.view-game-view .room-action-btn.score-btn {
  border-color: rgba(217,170,63,0.30) !important;
  background: rgba(11, 29, 23, 0.82) !important;
  color: #f1c765 !important;
}

body.view-game-view .room-tool-btn {
  min-height: 56px;
  opacity: 0.82;
  /* 改 flex 布局：图标+文字单行不换行（修正「形势分析」等文字错行）*/
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
  grid-template-columns: none;
}

body.view-game-view .room-tool-btn.future {
  color: rgba(216,201,168,0.42) !important;
  border-color: rgba(217,170,63,0.14);
  opacity: 0.56;
}

body.view-game-view .room-tool-btn.analyze-btn {
  border-color: rgba(217,170,63,0.24) !important;
  background: rgba(11, 29, 23, 0.82) !important;
  color: rgba(232,244,238,0.82) !important;
}

.room-action-icon,
.room-tool-icon {
  position: relative;
  width: 30px;
  height: 30px;
  color: #d9aa3f;
}

.room-tool-icon {
  width: 26px;
  height: 26px;
  color: rgba(217,170,63,0.62);
}

.icon-flag::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 3px;
  height: 23px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(217,170,63,0.34);
}

.icon-flag::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  width: 18px;
  height: 11px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}

.icon-score::before,
.icon-score::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0,0,0,0.30);
}

.icon-score::before {
  left: 3px;
  top: 4px;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 30%, #4f5652, #030403 72%);
}

.icon-score::after {
  right: 2px;
  bottom: 2px;
  width: 17px;
  height: 17px;
  background: radial-gradient(circle at 35% 30%, #fffef7, #d8d2c2 72%);
  border: 1px solid rgba(255,255,255,0.52);
}

.icon-exit::before {
  content: "";
  position: absolute;
  inset: 5px 8px 5px 2px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.icon-exit::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  width: 17px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon-analyze::before,
.icon-study::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-analyze::after,
.icon-study::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.icon-pass::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.icon-pass::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(28deg);
}

.icon-review::before,
.icon-life::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  background:
    linear-gradient(90deg, transparent 46%, currentColor 48% 52%, transparent 54%),
    linear-gradient(0deg, transparent 46%, currentColor 48% 52%, transparent 54%);
  opacity: 0.72;
}

.icon-variation::before {
  content: "";
  position: absolute;
  inset: 4px;
  background:
    radial-gradient(circle at 16% 22%, currentColor 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, currentColor 0 2px, transparent 3px),
    radial-gradient(circle at 82% 28%, currentColor 0 2px, transparent 3px),
    radial-gradient(circle at 72% 82%, currentColor 0 2px, transparent 3px),
    linear-gradient(30deg, transparent 0 28%, currentColor 29% 31%, transparent 32%),
    linear-gradient(145deg, transparent 0 32%, currentColor 33% 35%, transparent 36%);
}

.room-more-btn {
  margin-top: auto;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: rgba(232,244,238,0.62);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: default;
}

.game-table-shell {
  position: relative;
  display: grid;
  grid-template-columns: clamp(142px, 10.6vw, 184px) minmax(500px, 1fr) clamp(142px, 10.6vw, 184px);
  grid-template-rows: minmax(0, 1fr) 42px;
  align-items: center;
  justify-items: center;
  gap: 0 clamp(12px, 1.4vw, 24px);
  min-height: 0;
  height: 100%;
  padding: 18px clamp(14px, 1.4vw, 28px) 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 47%, rgba(79, 205, 165, 0.13), transparent 34%),
    linear-gradient(90deg, rgba(116,240,210,0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(116,240,210,0.020) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
}

.room-circuit-frame {
  position: absolute;
  inset: 18px clamp(30px, 3.4vw, 62px) 58px;
  width: auto;
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.88;
  overflow: visible;
}

.room-circuit-frame path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.room-circuit-frame .circuit-lines path {
  stroke: rgba(96, 230, 203, 0.38);
  stroke-width: 0.95;
  filter: drop-shadow(0 0 6px rgba(96,230,203,0.24));
}

.room-circuit-frame .circuit-branches path {
  stroke: rgba(96, 230, 203, 0.22);
  stroke-width: 0.72;
  filter: drop-shadow(0 0 4px rgba(96,230,203,0.18));
}

.room-circuit-frame .circuit-lines path:nth-child(5),
.room-circuit-frame .circuit-lines path:nth-child(10),
.room-circuit-frame .circuit-branches path:nth-child(3),
.room-circuit-frame .circuit-branches path:nth-child(10) {
  opacity: 0.55;
}

.room-circuit-frame circle {
  fill: rgba(96, 230, 203, 0.34);
  stroke: rgba(130, 255, 224, 0.82);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(96,230,203,0.64));
}

.room-circuit-frame .node-ring {
  fill: transparent;
  stroke-width: 1.4;
}

body.view-game-view .room-board-area {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 0 50px;
  overflow: visible;
  background: transparent;
  perspective: none;
  z-index: 2;
}

body.view-game-view .room-board-area::before,
body.view-game-view .room-board-area::after {
  display: none;
}

body.view-game-view #go-board {
  max-width: none;
  max-height: none;
  transform: none;
  border-radius: 8px;
  box-shadow:
    0 26px 54px rgba(0,0,0,0.50),
    0 0 0 10px rgba(133, 90, 42, 0.34),
    inset 0 0 0 1px rgba(255,255,255,0.10);
}

body.view-game-view .board-toolbar {
  bottom: 6px;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(6, 18, 15, 0.88);
  border-color: rgba(217,170,63,0.32);
}

.room-player-slot {
  width: 100%;
  max-width: 184px;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 3;
}

#player1-card.room-player-slot {
  grid-column: 1;
  grid-row: 1;
}

#player2-card.room-player-slot {
  grid-column: 3;
  grid-row: 1;
}

.room-player-card {
  position: relative;
  min-height: 362px;
  width: 100%;
  padding: 18px 10px 14px;
  display: grid;
  grid-template-rows: auto 92px auto auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid rgba(217,170,63,0.34);
  background:
    linear-gradient(180deg, rgba(16, 34, 28, 0.92), rgba(4, 15, 13, 0.97)),
    radial-gradient(circle at 50% 32%, rgba(116,240,210,0.13), transparent 35%);
  box-shadow: 0 24px 42px rgba(0,0,0,0.26), inset 0 0 32px rgba(116,240,210,0.04);
  overflow: hidden;
}

.room-player-card.active-turn {
  border-color: rgba(116,240,210,0.70);
  box-shadow: 0 24px 44px rgba(0,0,0,0.30), 0 0 24px rgba(116,240,210,0.14), inset 0 0 32px rgba(116,240,210,0.08);
}

.room-player-card .seat-card-glow {
  background:
    radial-gradient(circle at 50% 32%, rgba(116,240,210,0.16), transparent 32%),
    linear-gradient(180deg, rgba(255,224,122,0.05), transparent 45%);
}

.room-player-color {
  font-family: var(--font-serif);
  color: rgba(255,255,255,0.92);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  z-index: 1;
}

.room-player-stone {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  z-index: 1;
}

.room-player-stone.black {
  background: radial-gradient(circle at 32% 26%, #555b57 0%, #202221 40%, #050505 72%);
  box-shadow: 0 0 0 5px rgba(116,240,210,0.26), 0 0 28px rgba(116,240,210,0.34), 0 16px 26px rgba(0,0,0,0.48);
}

.room-player-stone.white {
  background: radial-gradient(circle at 35% 30%, #fffef8 0%, #e5dfd1 52%, #c8c0af 100%);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 0 0 5px rgba(116,240,210,0.26), 0 0 28px rgba(116,240,210,0.34), 0 16px 26px rgba(0,0,0,0.35);
}

.room-player-name {
  position: relative;
  z-index: 1;
  max-width: 100%;
  color: rgba(255,255,255,0.90);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.22;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-player-rank {
  position: relative;
  z-index: 1;
  min-height: 18px;
  color: rgba(216,201,168,0.68);
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

body.view-game-view .room-player-card .seat-clock-card {
  width: calc(100% - 6px);
  min-height: 78px;
  grid-template-columns: 1fr;
  justify-items: center;
  margin: 8px 0 0;
  padding: 12px 8px;
  border-radius: 8px;
  background: rgba(5, 20, 16, 0.82);
  border: 1px solid rgba(116,240,210,0.12);
  box-shadow: inset 0 0 20px rgba(116,240,210,0.035);
}

body.view-game-view .room-player-card .seat-clock-card strong {
  color: #91f2ad;
  font-size: clamp(24px, 2.1vw, 32px);
  font-family: Consolas, "Courier New", monospace;
  line-height: 1;
}

body.view-game-view .room-player-card .seat-clock-card em {
  grid-column: auto;
  color: rgba(232,244,238,0.46);
  font-size: 13px;
  margin-top: 4px;
}

.room-player-foot {
  color: #f2c653;
  font-size: 16px;
  font-weight: 800;
  border-top: 1px solid rgba(217,170,63,0.22);
  padding-top: 11px;
  min-width: 96px;
  text-align: center;
}

.room-captures {
  color: rgba(232,244,238,0.46);
  font-size: 12px;
}

.room-turn-indicator {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 20px;
  border: 1px solid rgba(217,170,63,0.38);
  border-radius: 8px;
  background: rgba(7, 19, 16, 0.88);
  color: rgba(232,244,238,0.84);
  font-size: 14px;
  font-weight: 800;
  z-index: 3;
}

.turn-stone {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.turn-stone.black {
  background: radial-gradient(circle at 35% 28%, #535a55, #050505 72%);
}

.turn-stone.white {
  background: radial-gradient(circle at 35% 28%, #fffdf7, #d8d1c2 72%);
  border: 1px solid rgba(255,255,255,0.62);
}

.room-info-card-wrap,
.room-record-card {
  border: 1px solid rgba(217,170,63,0.26);
  border-radius: 8px;
  background: rgba(7, 22, 18, 0.78);
  box-shadow: inset 0 0 24px rgba(116,240,210,0.03);
  overflow: hidden;
}

.room-info-card-wrap {
  padding: 13px 13px 11px;
}

body.view-game-view .game-info-card {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(232,244,238,0.82);
  font-size: 13px;
}

.room-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-info-row span,
.room-winrate span {
  color: rgba(216,201,168,0.60);
  white-space: nowrap;
}

.room-info-row strong {
  color: rgba(232,244,238,0.92);
  text-align: right;
  font-weight: 800;
}

.room-info-row .ai-state-badge {
  color: #7dffb0;
  background: transparent;
  padding: 0;
}

.room-info-row .ai-state-badge.error {
  color: #ff9a8f;
}

.room-winrate {
  margin-top: 7px;
  padding-top: 11px;
  border-top: 1px solid rgba(217,170,63,0.16);
  display: grid;
  grid-template-columns: 1fr 42px auto;
  align-items: center;
  gap: 10px;
}

.room-winrate strong {
  color: rgba(232,244,238,0.88);
  font-size: 15px;
}

.winrate-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    conic-gradient(#91f2ad 0 61%, rgba(216,201,168,0.24) 61% 100%);
  position: relative;
}

.winrate-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #081511;
}

.winrate-ring.white {
  background: conic-gradient(#e6dfd2 0 61%, rgba(116,240,210,0.24) 61% 100%);
}

.winrate-ring.pending {
  background: rgba(116,240,210,0.16);
}
.winrate-ring.pending::after {
  inset: 10px;
  background: rgba(216,201,168,0.28);
}

/* 复盘页移动端：右侧面板改为下方纵向，避免挤压棋盘 */
@media (max-width: 768px) {
  .review-main { flex-direction: column !important; }
  .review-side {
    width: 100% !important;
    max-height: 42vh;
    border-left: 0 !important;
    border-top: 1px solid rgba(200,146,42,0.2) !important;
  }
}

/* toast 关闭按钮 */
.toast-close {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.45;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}
.toast-close:hover { opacity: 1; }
.invite-toast .toast-close { top: 6px; transform: none; }

.room-record-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(128px, 0.52fr);
}

.game-panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(217,170,63,0.20);
}

.game-panel-tab {
  height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: rgba(6,18,15,0.68);
  color: rgba(232,244,238,0.58);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.game-panel-tab.active {
  color: #f2c653;
  border-bottom-color: #d9aa3f;
  background: rgba(14,35,27,0.82);
}

.record-section {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 8px 10px 10px;
}

body.view-game-view .moves-list {
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: rgba(12, 31, 25, 0.68);
  border-radius: 6px;
  overflow-y: auto;
  color: rgba(232,244,238,0.76);
  font-family: Consolas, "Noto Sans SC", monospace;
  font-size: 13px;
}

body.view-game-view .move-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 5px 9px;
  border-bottom: 1px solid rgba(217,170,63,0.08);
  color: rgba(232,244,238,0.70);
}

body.view-game-view .move-entry:nth-child(odd) {
  background: rgba(255,255,255,0.018);
}

body.view-game-view .moves-empty {
  padding: 18px 10px;
  color: rgba(216,201,168,0.50);
}

.move-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.move-controls button {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(217,170,63,0.20);
  background: rgba(18, 38, 31, 0.92);
  color: rgba(232,244,238,0.66);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
}

.move-controls button:hover {
  border-color: rgba(255,224,122,0.46);
  color: #ffe07a;
}

body.view-game-view .game-chat {
  min-height: 0;
  padding: 0 10px 10px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}

body.view-game-view .game-chat-box {
  min-height: 0;
  height: auto;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(217,170,63,0.14);
  background: rgba(6,18,15,0.72);
  color: rgba(232,244,238,0.72);
  overflow-y: auto;
}

body.view-game-view .chat-msg {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.6;
}

body.view-game-view .chat-input-row {
  gap: 8px;
}

body.view-game-view .chat-input {
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(217,170,63,0.16);
  background: rgba(232,244,238,0.08);
  color: rgba(232,244,238,0.86);
}

body.view-game-view .chat-send {
  width: 64px;
  border-radius: 6px;
}

.room-record-card.chat-focus {
  grid-template-rows: auto minmax(108px, 0.42fr) minmax(0, 1fr);
}

.room-record-card.moves-focus {
  grid-template-rows: auto minmax(0, 1fr) minmax(128px, 0.52fr);
}

body.view-game-view .analyze-floating {
  position: relative;
  inset: auto;
  transform: none;
  width: 100%;
  max-width: none;
  max-height: min(48vh, 430px);
  z-index: 1;
  border-radius: 8px;
  background: rgba(7,22,18,0.94) !important;
  border-color: rgba(116,240,210,0.30) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.24);
  overflow: auto;
}

body.view-game-view .room-analyze-tool .analyze-card {
  padding: 10px 8px;
}

body.view-game-view .room-analyze-tool .az-overview {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

body.view-game-view .room-analyze-tool .az-winrate-ring {
  align-self: center;
}

body.view-game-view .room-analyze-tool .az-terr-legend {
  flex-wrap: wrap;
  gap: 5px 8px;
}

body.view-game-view .room-analyze-tool .az-stats {
  grid-template-columns: 1fr;
  gap: 4px;
}

@media (min-width: 2200px) {
  body.view-game-view .room-layout {
    grid-template-columns: 202px minmax(0, 1fr) 340px;
  }

  .game-table-shell {
    grid-template-columns: 200px minmax(760px, 1fr) 200px;
  }

  .room-player-slot {
    max-width: 200px;
  }

  .room-player-card {
    min-height: 420px;
  }
}

@media (max-width: 1440px) {
  .game-table-shell {
    grid-template-columns: 142px minmax(500px, 1fr) 142px;
    gap: 0 12px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .room-player-card {
    min-height: 328px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .room-player-stone {
    width: 64px;
    height: 64px;
  }

  .room-player-name {
    font-size: 16px;
  }

  body.view-game-view .room-player-card .seat-clock-card strong {
    font-size: 24px;
  }

  body.view-game-view .game-action-rail {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-height: 820px) and (min-width: 1051px) {
  body.view-game-view .room-action-btn {
    min-height: 56px;
  }

  body.view-game-view .room-tool-btn {
    min-height: 46px;
  }

  .room-sub-title {
    margin-top: 10px;
  }

  .room-player-card {
    min-height: 302px;
    gap: 7px;
  }

  .room-player-stone {
    width: 58px;
    height: 58px;
  }

  body.view-game-view .room-player-card .seat-clock-card {
    min-height: 66px;
    padding: 9px 8px;
  }

  .room-player-foot {
    padding-top: 8px;
  }
}

@media (max-width: 1050px) {
  body.view-game-view {
    overflow: auto;
  }

  body.view-game-view #game-view.active {
    height: auto;
    min-height: calc(100vh - 58px);
    overflow: visible;
  }

  body.view-game-view .room-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  body.view-game-view .room-info-rail {
    grid-template-rows: none;
  }

  body.view-game-view .analyze-floating {
    max-height: none;
  }

  body.view-game-view .room-analyze-tool .az-overview {
    flex-direction: row;
    align-items: center;
  }

  body.view-game-view .room-analyze-tool .az-stats {
    grid-template-columns: 1fr 1fr;
  }

  .game-table-shell {
    min-height: 720px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 12px;
  }

  #player1-card.room-player-slot,
  #player2-card.room-player-slot,
  body.view-game-view .room-board-area,
  .room-turn-indicator {
    grid-column: 1;
  }

  #player2-card.room-player-slot {
    grid-row: 1;
  }

  body.view-game-view .room-board-area {
    grid-row: 2;
    min-height: 520px;
  }

  #player1-card.room-player-slot {
    grid-row: 3;
  }

  .room-turn-indicator {
    grid-row: 4;
  }

  .room-player-slot {
    max-width: min(480px, 100%);
  }

  .room-player-card {
    min-height: auto;
    grid-template-rows: auto;
  }

  body.view-game-view .game-action-rail,
  body.view-game-view .room-info-rail {
    min-height: auto;
  }
}

/* ═══════════════════════════════════════════════
   科技版主题对比度修复 — 浅底金字不可见问题
   根因：body:not(.auth-mode) 将 --ink 重定义为 #f7edcf（浅色），
   导致 background:var(--ink)+color:var(--gold2) 组合变成浅底+浅黄字
   ═══════════════════════════════════════════════ */
body:not(.auth-mode) .profile-avatar,
body:not(.auth-mode) .user-avatar-sm {
  background: rgba(30, 60, 48, 0.92); color: #f7edcf;
  border-color: rgba(200, 146, 42, 0.5);
}
body:not(.auth-mode) .kifu-dl-btn {
  background: rgba(30, 60, 48, 0.92); color: #f7edcf; border: 1px solid rgba(200, 146, 42, 0.35);
}
body:not(.auth-mode) .kifu-dl-btn:hover {
  background: var(--gold); color: #1a1208;
}
body:not(.auth-mode) .kifu-board-badge {
  background: rgba(40, 32, 16, 0.88); color: #f0dca8; border-color: rgba(200, 146, 42, 0.4);
}
body:not(.auth-mode) .modal-btn.primary {
  background: rgba(30, 60, 48, 0.92); color: #f7edcf; border-color: rgba(200, 146, 42, 0.35);
}
body:not(.auth-mode) .chat-send {
  background: rgba(30, 60, 48, 0.92); color: #f7edcf;
}
body:not(.auth-mode) .score-modal-header {
  background: rgba(30, 60, 48, 0.95); color: #f7edcf;
}
body:not(.auth-mode) .admin-table th {
  background: rgba(30, 60, 48, 0.94); color: #f7edcf;
}
body:not(.auth-mode) .ai-btn.save {
  background: rgba(30, 60, 48, 0.92); color: #f7edcf;
}
body:not(.auth-mode) .avatar {
  background: var(--gold); color: #1a1208;
}

/* ═══════════════════════════════════════════════
   个人资料编辑面板
   ═════════════════════════════════════════════ */
.my-profile-modal { padding: 0; overflow: hidden; }
.my-profile-modal .modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid rgba(123, 90, 39, 0.14);
  background: var(--paper2);
}
.my-profile-modal .modal-title { margin: 0; font-size: 17px; }
.my-profile-modal .modal-close {
  border: none; background: var(--paper3); width: 30px; height: 30px;
  border-radius: 6px; cursor: pointer; color: var(--ink3);
  font-size: 18px; line-height: 1; transition: all .15s;
}
.my-profile-modal .modal-close:hover { background: var(--paper); color: var(--ink); }
.my-profile-modal .modal-body {
  padding: 18px 22px 22px; max-height: calc(100vh - 130px); overflow-y: auto;
  scrollbar-width: thin;
}
.mp-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed rgba(123, 90, 39, 0.16); }
.mp-section:last-of-type { border-bottom: none; }
.mp-label { font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 10px; }

/* 头像 */
.mp-avatar-row { display: flex; align-items: center; gap: 14px; }
.mp-avatar-preview {
  width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0;
  overflow: hidden; background: var(--paper3);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(123, 90, 39, 0.2);
}
.mp-avatar-preview .avatar-text,
.mp-avatar-preview .avatar-img { width: 64px; height: 64px; }
.mp-avatar-preview .avatar-text { font-size: 22px; }
.mp-avatar-preview .avatar-img { object-fit: cover; }
.mp-avatar-actions { display: flex; flex-direction: column; gap: 7px; }

/* 通用按钮 */
.mp-btn {
  padding: 7px 14px; border-radius: 6px; border: 1px solid var(--paper3);
  background: var(--paper); color: var(--ink2); cursor: pointer;
  font-size: 12px; font-family: var(--font-sans); transition: all .15s; white-space: nowrap;
}
.mp-btn:hover { border-color: var(--gold); color: var(--ink); }
.mp-btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--ink); border-color: var(--gold); font-weight: 700;
}
.mp-btn.primary:hover { background: linear-gradient(135deg, var(--gold2), var(--gold3)); color: var(--ink); }
.mp-btn.ghost { background: transparent; color: var(--ink3); }
.mp-btn.danger { background: rgba(180, 60, 50, 0.12); color: #c0524a; border-color: rgba(180, 60, 50, 0.3); }
.mp-btn.danger:hover { background: rgba(180, 60, 50, 0.2); color: #a83e36; }
.mp-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 输入行 */
.mp-row { display: flex; gap: 10px; align-items: center; }
.mp-input {
  flex: 1; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--paper3);
  background: var(--paper); color: var(--ink); font-size: 14px;
  font-family: var(--font-sans);
}
.mp-input:focus { outline: none; border-color: var(--gold); }
.mp-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 500; color: var(--gold3); background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.3); vertical-align: middle; }

/* 财务记录 Tab */
.finance-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 14px; padding: 14px 16px; background: var(--paper2); border: 1px solid var(--paper3); border-radius: 10px; }
.fin-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink3); }
.fin-field select, .fin-field input { padding: 7px 9px; border-radius: 6px; border: 1px solid var(--paper3); background: var(--paper); color: var(--ink); font-size: 13px; font-family: var(--font-sans); min-width: 150px; }
.fin-field input[type="text"] { min-width: 180px; }
.fin-summary { align-self: center; font-size: 12px; color: var(--ink3); }
.fin-empty { text-align: center; color: var(--ink3); padding: 26px; }
.fin-error { text-align: center; color: #c0524a; padding: 18px; }

/* 提示 */
.mp-hint { font-size: 11px; color: var(--ink3); margin-top: 8px; line-height: 1.6; }
.mp-hint b { color: var(--gold2); font-weight: 700; }

/* 战绩 */
.mp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.mp-stat {
  background: var(--paper3); border-radius: 8px; padding: 10px 4px; text-align: center;
}
.mp-stat-num { display: block; font-size: 20px; font-weight: 800; color: var(--ink); }
.mp-stat-label { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; }

/* 爱点余额 */
.mp-coin {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 10px 14px; border-radius: 8px; background: rgba(200, 146, 42, 0.1);
  border: 1px solid rgba(200, 146, 42, 0.25); font-size: 13px; color: var(--ink2);
}
.mp-coin b { color: var(--gold2); font-size: 15px; }
.mp-coin-icon { color: var(--gold2); font-size: 16px; }

/* ════════════════ 复盘研究 · 四项功能 UI ════════════════ */
.review-side > div { flex-shrink: 0; }
.review-side > div[style*="flex:1"] { flex-shrink: 1; }
.review-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 20px; background: rgba(20,15,8,0.6);
  border-bottom: 1px solid rgba(200,146,42,0.2); flex-shrink: 0;
}
.rv-tool-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(200,146,42,0.35);
  color: var(--ink); font-size: 13px; padding: 8px 14px; border-radius: 6px;
  cursor: pointer; transition: all .15s; white-space: nowrap; font-weight: 500;
}
.rv-tool-btn:hover { background: rgba(200,146,42,0.22); border-color: rgba(200,146,42,0.6); color: var(--gold3); }
.rv-tool-btn.primary { background: linear-gradient(135deg,#c8922a,#e8b341); color: #1a130a; font-weight: 700; border: none; }
.rv-tool-btn.primary:hover { filter: brightness(1.1); color: #1a130a; }
.rv-tool-btn.primary:disabled { opacity: .6; cursor: default; }
.rv-tool-btn.warn { background: rgba(255,90,90,0.18); border-color: rgba(255,90,90,0.55); color: #ffb3b3; }
.rv-tool-btn.fairplay { background: rgba(116,240,210,0.08); border-color: rgba(116,240,210,0.42); color: #8cf5dc; font-weight: 700; }
.rv-tool-btn.fairplay:hover { background: rgba(116,240,210,0.16); border-color: rgba(116,240,210,0.7); color: #b5ffed; }
.rv-tool-btn.fairplay:disabled { opacity: .55; cursor: default; }

.rv-section-title { font-size: 13px; font-weight: 700; color: var(--gold2); margin-bottom: 8px; }
.rv-sub-title { font-size: 11px; color: rgba(200,180,140,0.7); margin: 10px 0 5px; border-left: 2px solid var(--gold); padding-left: 6px; }

.rv-score-row { display: flex; align-items: center; gap: 10px; }
.rv-score-num { font-size: 30px; font-weight: 800; line-height: 1; font-family: 'Noto Serif SC',serif; }
.rv-score-label { font-size: 12px; color: rgba(200,180,140,0.8); }
.rv-score-label small { display: block; font-size: 10px; color: var(--ink3); margin-top: 2px; }

.rv-keymove {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px; margin-bottom: 4px;
  background: rgba(255,255,255,0.04); border-radius: 5px; cursor: pointer; font-size: 11px;
}
.rv-keymove:hover { background: rgba(200,146,42,0.15); }
.rv-grade {
  flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  border: 1px solid; background: rgba(0,0,0,0.2);
}
.rv-keymove-info { color: rgba(200,180,140,0.85); line-height: 1.4; }
.rv-keymove-info b { color: var(--gold2); }

.rv-eval-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 3px 0; color: rgba(200,180,140,0.8); }
.rv-eval-row strong { font-size: 13px; }

.rv-cand-tip { font-size: 11px; color: rgba(200,180,140,0.8); margin-bottom: 6px; }
.rv-cand {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 5px;
  background: rgba(116,240,210,0.1); border: 1px solid rgba(116,240,210,0.35);
  color: var(--ink); border-radius: 6px; padding: 7px 10px; cursor: pointer; transition: all .15s;
}
.rv-cand:hover { background: rgba(116,240,210,0.2); border-color: rgba(116,240,210,0.6); }
.rv-cand-rank {
  width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #1a130a;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rv-cand-co { font-weight: 700; font-family: monospace; font-size: 13px; }
.rv-cand-wr { color: #f5d98a; font-size: 12px; }
.rv-cand-diff { margin-left: auto; color: rgba(200,180,140,0.85); font-size: 11px; }

/* ═══ 复盘·超级鹰眼新布局样式（三栏 + 底部图带）═══ */
.rv-sep { display: inline-block; width: 1px; height: 18px; background: rgba(200,146,42,0.25); margin: 0 2px; }

.rv-product-selector { display: grid; grid-template-columns: repeat(auto-fit,minmax(0,1fr)); gap: 6px; margin-bottom: 10px; }
.rv-product {
  min-width: 0; padding: 8px 9px; border: 1px solid rgba(200,146,42,.28); border-radius: 6px;
  background: rgba(255,255,255,.035); color: rgba(232,244,238,.78); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 11px;
}
.rv-product strong { color: var(--gold); letter-spacing: 1px; font-size: 9px; white-space: nowrap; }
.rv-product.on { border-color: rgba(232,179,65,.88); background: linear-gradient(135deg,rgba(200,146,42,.24),rgba(116,240,210,.08)); box-shadow: inset 0 0 0 1px rgba(232,179,65,.14); color: var(--gold2); font-weight: 700; }
.rv-product:not(.on):hover { border-color: rgba(200,146,42,.55); background: rgba(200,146,42,.1); }
.rv-product:disabled { opacity:.48; cursor:not-allowed; filter:saturate(.55); }
.rv-product:disabled:hover { border-color:rgba(200,146,42,.2); background:rgba(255,255,255,.025); }

.rv-progress-track { width: 100%; height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.rv-progress-fill { height: 100%; background: linear-gradient(90deg,#c8922a,#e8b341,#f5d98a); border-radius: 3px; transition: width .2s; box-shadow: 0 0 8px rgba(232,184,75,0.5); }

/* 右栏 Tab */
.rv-tabs { display: flex; border-bottom: 1px solid rgba(200,146,42,0.2); flex-shrink: 0; background: rgba(15,10,4,0.6); }
.rv-tab { flex: 1; background: none; border: none; color: rgba(200,180,140,0.6); font-size: 12px; padding: 11px 0; cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; font-family: 'Noto Serif SC',serif; }
.rv-tab:hover { color: var(--gold2); }
.rv-tab.on { color: var(--gold2); border-bottom-color: var(--gold); background: rgba(200,146,42,0.08); font-weight: 700; }
.rv-tab-panel { padding: 0; }
.rv-tab-panel.rv-panel-activated {
  animation: rvPanelActivated .42s ease-out;
}
@keyframes rvPanelActivated {
  0% { box-shadow: inset 0 0 0 2px rgba(116,240,210,.72); background: rgba(116,240,210,.10); }
  100% { box-shadow: inset 0 0 0 0 rgba(116,240,210,0); background: transparent; }
}

/* 底部胜率图带 */
.rv-chartbar-legend { width: 118px; padding: 10px 12px; border-right: 1px solid rgba(200,146,42,0.15); display: flex; flex-direction: column; justify-content: center; gap: 4px; flex-shrink: 0; }
.rv-chartbar-title { font-size: 10px; color: rgba(200,180,140,0.5); letter-spacing: 1px; }
.rv-chartbar-eval { font-size: 11px; color: var(--gold3); line-height: 1.5; }
.rv-chartbar-legend2 { font-size: 10px; color: rgba(200,180,140,0.55); }

/* 当前手文字解读 */
.rv-explain { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,0.03); }
.rv-explain-row { display: flex; gap: 8px; padding: 4px 0; font-size: 12px; line-height: 1.65; color: rgba(232,244,238,0.82); }
.rv-explain-row + .rv-explain-row { border-top: 1px dashed rgba(200,146,42,0.12); }
.rv-explain-title { font-weight: 700; color: var(--gold2); font-size: 12px; }
.rv-explain-k { flex-shrink: 0; width: 56px; color: rgba(200,180,140,0.6); font-size: 11px; }
.rv-explain-t { flex: 1; }

/* 全局总结报告 */
.rv-sum-overall { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 12px; border: 1px solid rgba(200,146,42,0.18); }
.rv-sum-rank { display: flex; align-items: center; gap: 10px; }
.rv-sum-rank strong { font-size: 15px; color: var(--gold2); }
.rv-sum-stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; }
.rv-sum-phase { display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 5px; background: rgba(255,255,255,0.03); border-radius: 5px; flex-wrap: wrap; }
.rv-sum-ph-name { font-size: 12px; font-weight: 700; color: var(--gold3); width: 32px; }
.rv-sum-ph-score { font-size: 18px; font-weight: 800; font-family: 'Noto Serif SC',serif; }
.rv-sum-ph-score small { font-size: 10px; font-weight: 400; color: rgba(200,180,140,0.5); margin-left: 2px; }
.rv-sum-ph-meta { font-size: 10px; color: rgba(200,180,140,0.6); flex: 1; min-width: 80px; }
.rv-sum-worst { font-size: 10px; color: #ff9a9a; background: rgba(255,90,90,0.1); padding: 1px 6px; border-radius: 3px; }
.rv-turning-list { display: flex; flex-direction: column; gap: 6px; }
.rv-turning { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(200,146,42,0.15); border-radius: 5px; padding: 7px 10px; color: rgba(232,244,238,0.8); font-size: 11px; cursor: pointer; transition: all .15s; text-align: left; }
.rv-turning:hover { background: rgba(200,146,42,0.12); border-color: rgba(200,146,42,0.4); }
.rv-sum-diag { background: rgba(116,240,210,0.06); border-left: 3px solid #74f0d2; padding: 8px 11px; border-radius: 4px; font-size: 11px; color: rgba(232,244,238,0.8); line-height: 1.7; }
.rv-score-rank { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: rgba(200,180,140,0.75); }
.rv-score-rank .rv-sum-stars { font-size: 12px; }

/* 棋谱项左侧分级色条 */
.rv-move-item { position: relative; }
.rv-move-bar { display: inline-block; width: 3px; height: 18px; border-radius: 2px; background: rgba(200,180,140,0.2); flex-shrink: 0; }
.rv-grade-legend { font-size: 9px; color: rgba(200,180,140,0.4); letter-spacing: 1px; }

/* 算力提示 */
.rv-power-tip { margin-top: 12px; padding: 8px 10px; background: rgba(116,240,210,0.06); border-left: 2px solid rgba(116,240,210,0.4); border-radius: 4px; font-size: 10px; color: rgba(200,180,140,0.65); line-height: 1.6; }
.rv-tier-guide { margin-top:8px; border:1px solid rgba(200,146,42,.24); border-radius:7px; background:rgba(0,18,15,.42); }
.rv-tier-guide summary { padding:9px 10px; cursor:pointer; color:var(--gold2); font-size:10px; }
.rv-tier-guide-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:0 8px 9px; }
.rv-tier-guide-grid article { padding:9px; border:1px solid rgba(116,240,210,.13); border-radius:6px; background:rgba(255,255,255,.025); }
.rv-tier-guide-grid b,.rv-tier-guide-grid em,.rv-tier-guide-grid span { display:block; }
.rv-tier-guide-grid b { color:var(--gold2); font-size:10px; }
.rv-tier-guide-grid em { margin:3px 0 5px; color:#74f0d2; font-size:9px; font-style:normal; }
.rv-tier-guide-grid span { color:rgba(220,226,220,.7); font-size:9px; line-height:1.55; }

/* 左栏工具按钮（覆写：确保文字可读 + 纵向铺满）*/
.rv-left .rv-tool-btn { width: 100%; justify-content: center; }

/* 关键胜负手按钮（默认收起，点击展开，节省空间让AI推荐一眼可见）*/
.rv-keymove-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; background: rgba(200,146,42,0.1); border: 1px solid rgba(200,146,42,0.3); color: var(--gold2); font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 5px; cursor: pointer; transition: all .15s; font-family: 'Noto Serif SC',serif; }
.rv-keymove-btn:hover { background: rgba(200,146,42,0.2); border-color: rgba(200,146,42,0.5); }
.rv-keymove-btn em { font-style: normal; color: var(--gold3); margin-left: 3px; font-size: 11px; background: rgba(200,146,42,0.18); padding: 0 5px; border-radius: 8px; }
.rv-keymove-arrow { font-size: 10px; color: rgba(200,180,140,0.7); font-weight: 400; }
.rv-keymove-list { margin-top: 6px; }

/* ═══ Lizzie 实时分析点 · 工具栏与分析点 ═══ */
#rv-lizzie-btn.on { background: rgba(57,208,255,0.22); color: #39d0ff; border-color: rgba(57,208,255,0.55); box-shadow: 0 0 8px rgba(57,208,255,0.3); }
#rv-lizzie-btn.on:hover { color: #39d0ff; }
#rv-engine-btn.on { background: rgba(58,209,58,0.22); color: #5be65b; border-color: rgba(58,209,58,0.55); box-shadow: 0 0 8px rgba(58,209,58,0.3); }
#rv-engine-btn.on:hover { color: #5be65b; }
@keyframes rv-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Lizzie 设置面板 */
#lizzie-settings-modal .lz-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
#lizzie-settings-modal .lz-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); font-size: 13px; }
#lizzie-settings-modal .lz-switch input { width: 16px; height: 16px; accent-color: #39d0ff; cursor: pointer; }
#lizzie-settings-modal .lz-val { font-weight: 700; color: #39d0ff; font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
#lizzie-settings-modal .lz-hint { display: block; font-size: 10px; color: rgba(200,180,140,0.45); font-family: monospace; margin: 2px 0 10px; }
#lizzie-settings-modal .lz-sep { height: 1px; background: rgba(200,146,42,0.2); margin: 12px 0; }
#lizzie-settings-modal input[type=range] { width: 100%; accent-color: #39d0ff; cursor: pointer; }
#lizzie-settings-modal label { color: var(--ink2); font-size: 13px; }

/* ═══ 对弈·形势判断面板（参考 Lizzie 鹰眼）═══ */
.az-overview { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.az-winrate-ring { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(200,146,42,0.18); }
.az-winrate-inner { width: 48px; height: 48px; border-radius: 50%; background: rgba(15,10,4,0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.az-winrate-inner strong { font-size: 16px; font-weight: 800; color: var(--gold2); line-height: 1; }
.az-winrate-inner small { font-size: 9px; color: rgba(200,180,140,0.6); margin-top: 2px; }
.az-overview-info { flex: 1; min-width: 0; }
.az-diff { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(200,180,140,0.7); margin-bottom: 6px; }
.az-diff strong { font-size: 14px; font-weight: 800; }
.az-wr-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.az-wr-black { background: linear-gradient(90deg,#3a3a3a,#1a1a1a); color: #f5d98a; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; min-width: 0; }
.az-wr-white { background: linear-gradient(90deg,#f0ede6,#d8d4cc); color: #4a2e06; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; min-width: 0; }
.az-wr-source { font-size: 9px; color: rgba(200,180,140,0.5); margin-top: 3px; }

.az-section-title { font-size: 11px; font-weight: 700; color: var(--gold2); margin: 10px 0 6px; border-left: 2px solid var(--gold); padding-left: 6px; }
.az-terr-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,0.04); }
.az-terr-black { background: linear-gradient(90deg,#f5d98a,#c8922a); display: block; transition: width .3s; }
.az-terr-white { background: linear-gradient(90deg,#74f0d2,#3aa68a); display: block; transition: width .3s; }
.az-terr-dame { background: rgba(200,180,140,0.3); display: block; transition: width .3s; }
.az-terr-legend { display: flex; gap: 12px; margin-top: 6px; font-size: 10px; color: rgba(200,180,140,0.75); }
.az-terr-legend span { display: flex; align-items: center; gap: 4px; }
.az-terr-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }

.az-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 10px 0; }
.az-stats > div { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(200,180,140,0.7); padding: 4px 8px; background: rgba(255,255,255,0.03); border-radius: 4px; }
.az-stats > div b { font-size: 11px; color: var(--ink); font-weight: 700; }

/* ═══ 对弈室入场：AI 战术锁定（仅 GAME_START 短时启用）═══ */
#game-view {
  position: relative;
}

.game-entrance-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: none;
  overflow: hidden;
  pointer-events: none;
  color: rgba(232, 244, 238, 0.96);
}

.game-entrance-overlay.is-running {
  display: block;
}

.game-entrance-overlay.is-turn-running {
  animation: gameEntranceTurnOverlay 1.52s ease-out both;
}

.game-entrance-vignette,
.game-entrance-grid,
.game-entrance-corners,
.game-entrance-trails {
  position: absolute;
  inset: 0;
}

.game-entrance-vignette {
  background:
    radial-gradient(circle at 50% 48%, rgba(34, 115, 86, 0.08), rgba(2, 8, 7, 0.26) 48%, rgba(2, 8, 7, 0.60));
}

.game-entrance-grid {
  opacity: 0;
  background-image:
    linear-gradient(rgba(116, 240, 210, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 240, 210, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 48%, #000 0 24%, transparent 70%);
}

.game-entrance-overlay.is-room-enter .game-entrance-vignette {
  animation: gameEntranceVignette 2.1s ease-out both;
}

.game-entrance-overlay.is-room-enter .game-entrance-grid {
  animation: gameEntranceGrid 1.5s ease-out 0.18s both;
}

.game-entrance-corners i {
  position: absolute;
  width: 54px;
  height: 54px;
  border-style: solid;
  border-color: rgba(116, 240, 210, 0.62);
  filter: drop-shadow(0 0 8px rgba(116, 240, 210, 0.30));
}

.game-entrance-corners i:nth-child(1) { left: 20px; top: 18px; border-width: 1px 0 0 1px; }
.game-entrance-corners i:nth-child(2) { right: 20px; top: 18px; border-width: 1px 1px 0 0; }
.game-entrance-corners i:nth-child(3) { right: 20px; bottom: 18px; border-width: 0 1px 1px 0; }
.game-entrance-corners i:nth-child(4) { left: 20px; bottom: 18px; border-width: 0 0 1px 1px; }

.game-entrance-overlay.is-room-enter .game-entrance-corners {
  animation: gameEntranceCorners 2.9s ease-out 0.12s both;
}

.game-entrance-trails {
  inset: 24% auto auto;
  width: 31%;
  height: 54%;
}

.entrance-trails-left { left: 0; }
.entrance-trails-right { right: 0; transform: scaleX(-1); }

.game-entrance-trails i {
  position: absolute;
  right: 0;
  height: 1px;
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 210, 0.76));
}

.game-entrance-trails i:nth-child(1) { top: 8%; width: 94%; }
.game-entrance-trails i:nth-child(2) { top: 34%; width: 68%; }
.game-entrance-trails i:nth-child(3) { top: 70%; width: 100%; }
.game-entrance-trails i:nth-child(4) { top: 92%; width: 52%; }

.game-entrance-overlay.is-room-enter .game-entrance-trails i {
  animation: gameEntranceSpeedLine 0.76s cubic-bezier(.18,.76,.2,1) 0.22s both;
}

.game-entrance-overlay.is-room-enter .game-entrance-trails i:nth-child(2) { animation-delay: 0.28s; }
.game-entrance-overlay.is-room-enter .game-entrance-trails i:nth-child(3) { animation-delay: 0.34s; }
.game-entrance-overlay.is-room-enter .game-entrance-trails i:nth-child(4) { animation-delay: 0.40s; }

/* 引擎加载舱：在棋室入场完成后、先行权模块之前显示 */
.game-engine-loader,
.game-engine-error {
  position: absolute;
  left: var(--game-entrance-center-x, 50%);
  top: var(--game-entrance-center-y, 48%);
  width: min(680px, 62vw);
  min-height: 202px;
  padding: 22px 30px;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(110deg, rgba(116, 240, 210, 0.12), transparent 34% 72%, rgba(217, 170, 63, 0.07)),
    rgba(2, 10, 8, 0.94);
  border: 1px solid rgba(116, 240, 210, 0.52);
  clip-path: polygon(0 20px, 20px 0, 82% 0, 85% 8px, calc(100% - 14px) 8px, 100% 22px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 16% 100%, 13% calc(100% - 8px), 12px calc(100% - 8px), 0 calc(100% - 20px));
  box-shadow: inset 0 0 46px rgba(116, 240, 210, 0.08), 0 20px 62px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(15px);
}

.game-engine-loader {
  grid-template-columns: 142px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 10px 25px;
}

.game-entrance-overlay.is-loading .game-engine-loader {
  visibility: visible;
  animation: gameEngineModuleIn 0.52s cubic-bezier(.18,.78,.2,1) both;
}

.game-entrance-overlay.is-loading .game-entrance-vignette,
.game-entrance-overlay.is-error .game-entrance-vignette {
  animation: gameEngineBackdropIn 0.34s ease-out both;
}

.game-engine-loader::before,
.game-engine-loader::after,
.game-engine-error::before,
.game-engine-error::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 210, 0.82), transparent);
}

.game-engine-loader::before,
.game-engine-error::before { top: 8px; }
.game-engine-loader::after,
.game-engine-error::after { bottom: 8px; }

.engine-module-scan,
.engine-error-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -16%;
  z-index: 6;
  width: 14%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 210, 0.48), transparent);
  transform: skewX(-12deg);
  pointer-events: none;
}

.game-entrance-overlay.is-loading .engine-module-scan {
  animation: gameEngineScan 1.65s ease-in-out 0.12s infinite;
}

.engine-module-rays {
  position: absolute;
  inset: 0;
  opacity: 0.46;
  pointer-events: none;
}

.engine-module-rays i {
  position: absolute;
  left: 22%;
  top: 50%;
  width: 72%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(116, 240, 210, 0.38), transparent);
}

.engine-module-rays i:nth-child(1) { transform: rotate(12deg); }
.engine-module-rays i:nth-child(2) { transform: rotate(-12deg); }
.engine-module-rays i:nth-child(3) { transform: rotate(24deg); opacity: .52; }
.engine-module-rays i:nth-child(4) { transform: rotate(-24deg); opacity: .52; }

.engine-core-visual {
  position: relative;
  grid-row: 1 / 3;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.engine-core-visual::before,
.engine-core-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -12%;
  bottom: -12%;
  width: 1px;
  background: linear-gradient(transparent, rgba(116, 240, 210, 0.42), transparent);
}

.engine-core-visual::after { transform: rotate(90deg); }

.engine-core-visual > b {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #6d8178, #16362d 42%, #020807 78%);
  color: #a2f8d8;
  border: 1px solid rgba(116, 240, 210, 0.56);
  font-family: monospace;
  font-size: 13px;
  letter-spacing: .08em;
  box-shadow: 0 0 0 6px rgba(116, 240, 210, 0.08), 0 0 34px rgba(116, 240, 210, 0.34);
}

.engine-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(116, 240, 210, 0.64);
}

.engine-orbit-a { inset: 3px; border-left-color: transparent; border-bottom-color: transparent; }
.engine-orbit-b { inset: 17px; border-right-color: transparent; border-top-color: transparent; border-style: dashed; }
.engine-orbit-c { inset: 31px; border-left-color: transparent; }

.game-entrance-overlay.is-loading .engine-orbit-a { animation: gameEngineOrbitA 2.2s linear infinite; }
.game-entrance-overlay.is-loading .engine-orbit-b { animation: gameEngineOrbitB 1.7s linear infinite; }
.game-entrance-overlay.is-loading .engine-orbit-c { animation: gameEngineOrbitA 1.15s linear infinite; }

.engine-core-pulse {
  position: absolute;
  inset: 43px;
  border-radius: 50%;
  border: 1px solid rgba(116, 240, 210, 0.78);
}

.game-entrance-overlay.is-loading .engine-core-pulse {
  animation: gameEngineCorePulse 1.35s ease-out infinite;
}

.engine-loading-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.engine-loading-copy > span,
.engine-error-copy > span {
  display: block;
  color: rgba(188, 215, 205, 0.62);
  font-size: 10px;
  letter-spacing: .22em;
}

.engine-loading-copy > strong,
.engine-error-copy > strong {
  display: block;
  margin: 7px 0 6px;
  color: #eef8f3;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.35vw, 34px);
  letter-spacing: .12em;
  text-shadow: 0 0 22px rgba(116, 240, 210, 0.30);
}

.engine-loading-copy > p,
.engine-error-copy > p {
  margin: 0;
  color: rgba(218, 234, 227, 0.76);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: .04em;
}

.engine-data-stream {
  height: 18px;
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.engine-data-stream i {
  width: 10%;
  height: 3px;
  background: linear-gradient(90deg, rgba(116, 240, 210, 0.28), rgba(116, 240, 210, 0.88));
  transform-origin: left center;
}

.engine-data-stream i:nth-child(2) { width: 19%; }
.engine-data-stream i:nth-child(3) { width: 6%; }
.engine-data-stream i:nth-child(4) { width: 15%; }
.engine-data-stream i:nth-child(5) { width: 9%; }
.engine-data-stream i:nth-child(6) { width: 4%; }

.game-entrance-overlay.is-loading .engine-data-stream i {
  animation: gameEngineData 1.12s ease-in-out infinite alternate;
}

.game-entrance-overlay.is-loading .engine-data-stream i:nth-child(2) { animation-delay: .12s; }
.game-entrance-overlay.is-loading .engine-data-stream i:nth-child(3) { animation-delay: .24s; }
.game-entrance-overlay.is-loading .engine-data-stream i:nth-child(4) { animation-delay: .36s; }
.game-entrance-overlay.is-loading .engine-data-stream i:nth-child(5) { animation-delay: .48s; }
.game-entrance-overlay.is-loading .engine-data-stream i:nth-child(6) { animation-delay: .60s; }

.engine-loading-status {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(116, 240, 210, 0.18);
}

.engine-loading-status span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(188, 215, 205, 0.58);
  font-size: 9px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.engine-loading-status i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #74f0d2;
  box-shadow: 0 0 8px rgba(116, 240, 210, 0.72);
}

.game-entrance-overlay.is-loading .engine-loading-status span:nth-child(1) i { animation: gameEngineNode 1.2s ease-in-out infinite; }
.game-entrance-overlay.is-loading .engine-loading-status span:nth-child(2) i { animation: gameEngineNode 1.2s ease-in-out .22s infinite; }
.game-entrance-overlay.is-loading .engine-loading-status span:nth-child(3) i { animation: gameEngineNode 1.2s ease-in-out .44s infinite; }

/* 引擎失败舱：与加载/先行模块保持同一视觉体系 */
.game-engine-error {
  grid-template-columns: 122px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 10px 24px;
  border-color: rgba(217, 86, 68, 0.64);
  background:
    linear-gradient(110deg, rgba(217, 86, 68, 0.14), transparent 38% 72%, rgba(217, 170, 63, 0.08)),
    rgba(24, 8, 7, 0.95);
  box-shadow: inset 0 0 46px rgba(217, 86, 68, 0.09), 0 20px 62px rgba(0, 0, 0, 0.60);
}

.game-engine-error::before,
.game-engine-error::after {
  background: linear-gradient(90deg, transparent, rgba(236, 104, 84, 0.82), transparent);
}

.game-entrance-overlay.is-error .game-engine-error {
  visibility: visible;
  animation: gameEngineErrorIn 0.50s cubic-bezier(.18,.78,.2,1) both;
}

.game-entrance-overlay.is-error .engine-error-scan {
  background: linear-gradient(90deg, transparent, rgba(236, 104, 84, 0.44), transparent);
  animation: gameEngineScan 2.1s ease-in-out .18s infinite;
}

.engine-error-core {
  position: relative;
  grid-row: 1 / 3;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
}

.engine-error-core > b {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffd7cf;
  border: 1px solid rgba(236, 104, 84, 0.68);
  background: radial-gradient(circle, rgba(217, 86, 68, 0.30), rgba(24, 8, 7, 0.92));
  font-size: 22px;
  box-shadow: 0 0 0 6px rgba(217, 86, 68, 0.08), 0 0 30px rgba(217, 86, 68, 0.30);
}

.engine-error-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(236, 104, 84, 0.62);
}

.engine-error-ring-a { inset: 4px; border-left-color: transparent; border-bottom-color: transparent; }
.engine-error-ring-b { inset: 18px; border-right-color: transparent; border-top-color: transparent; border-style: dashed; }

.game-entrance-overlay.is-error .engine-error-ring-a { animation: gameEngineOrbitA 3.2s linear infinite; }
.game-entrance-overlay.is-error .engine-error-ring-b { animation: gameEngineOrbitB 2.5s linear infinite; }

.engine-error-copy {
  position: relative;
  z-index: 7;
}

.engine-error-copy > span { color: rgba(255, 194, 182, 0.62); }
.engine-error-copy > strong {
  color: #ffe8e2;
  text-shadow: 0 0 22px rgba(217, 86, 68, 0.26);
}
.engine-error-copy > p { color: rgba(255, 226, 219, 0.74); }

.engine-error-back {
  min-width: 116px;
  margin-top: 14px;
  padding: 9px 18px;
  border-radius: 5px;
  border: 1px solid rgba(236, 143, 124, 0.54);
  background: rgba(217, 86, 68, 0.10);
  color: #ffe8e2;
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color .18s, background .18s, transform .18s;
}

.engine-error-back:hover {
  border-color: rgba(255, 204, 189, 0.82);
  background: rgba(217, 86, 68, 0.22);
  transform: translateY(-1px);
}

.engine-error-code {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid rgba(236, 104, 84, 0.18);
  color: rgba(255, 194, 182, 0.52);
  font-size: 9px;
  letter-spacing: .14em;
}

.engine-error-code b {
  color: #ff9b88;
  font-weight: 700;
}

.game-entrance-lock {
  position: absolute;
  left: var(--game-entrance-center-x, 50%);
  top: var(--game-entrance-center-y, 48%);
  width: min(620px, 58vw);
  min-height: 168px;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 8px 22px;
  opacity: 0;
  overflow: hidden;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(90deg, rgba(116, 240, 210, 0.12), transparent 25% 74%, rgba(217, 170, 63, 0.08)),
    rgba(2, 10, 8, 0.91);
  border: 1px solid rgba(116, 240, 210, 0.54);
  clip-path: polygon(0 20px, 20px 0, 82% 0, 85% 8px, calc(100% - 14px) 8px, 100% 22px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 16% 100%, 13% calc(100% - 8px), 12px calc(100% - 8px), 0 calc(100% - 20px));
  box-shadow: inset 0 0 42px rgba(116, 240, 210, 0.08), 0 18px 56px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(14px);
}

.game-entrance-lock::before,
.game-entrance-lock::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 210, 0.82), transparent);
}

.game-entrance-lock::before { top: 8px; }
.game-entrance-lock::after { bottom: 8px; }

.game-entrance-overlay.is-turn-running .game-entrance-lock {
  animation: gameEntranceLock 1.42s cubic-bezier(.18,.76,.2,1) both;
}

.entrance-ai-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.entrance-ai-rays i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(116, 240, 210, 0.52), transparent);
}

.entrance-ai-rays i:nth-child(1) { transform: rotate(16deg); }
.entrance-ai-rays i:nth-child(2) { transform: rotate(-16deg); }
.entrance-ai-rays i:nth-child(3) { left: 0; transform: rotate(164deg); }
.entrance-ai-rays i:nth-child(4) { left: 0; transform: rotate(196deg); }

.game-entrance-overlay.is-turn-running .entrance-ai-rays {
  animation: gameEntranceRays 1.1s ease-out 0.12s both;
}

.entrance-ai-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14%;
  z-index: 6;
  width: 13%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 210, 0.52), transparent);
  transform: skewX(-12deg);
}

.game-entrance-overlay.is-turn-running .entrance-ai-scan {
  animation: gameEntranceAiScan 0.76s ease-in-out 0.18s both;
}

.entrance-ai-core {
  position: relative;
  grid-row: 1 / 3;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
}

.entrance-ai-core::before,
.entrance-ai-core::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -16%;
  bottom: -16%;
  width: 1px;
  background: linear-gradient(transparent, rgba(116, 240, 210, 0.46), transparent);
}

.entrance-ai-core::after { transform: rotate(90deg); }

.entrance-color-stone {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #68706c, #151918 36%, #020303 74%);
  box-shadow: 0 0 0 5px rgba(116, 240, 210, 0.10), 0 0 32px rgba(116, 240, 210, 0.34);
}

.game-entrance-overlay.is-white-turn .entrance-color-stone {
  background: radial-gradient(circle at 34% 28%, #fffdf5, #ded8ca 62%, #9c9485);
}

.entrance-ai-ring {
  position: absolute;
  border: 1px solid rgba(116, 240, 210, 0.68);
  border-radius: 50%;
}

.entrance-ai-ring-a { inset: 4px; border-left-color: transparent; border-bottom-color: transparent; }
.entrance-ai-ring-b { inset: 17px; border-right-color: transparent; border-top-color: transparent; }
.entrance-ai-ring-c { inset: 30px; border-left-style: dashed; border-bottom-color: transparent; }

.game-entrance-overlay.is-turn-running .entrance-ai-core {
  animation: gameEntranceCore 1.16s cubic-bezier(.18,.76,.2,1) 0.08s both;
}

.game-entrance-overlay.is-turn-running .entrance-ai-ring-a {
  animation: gameEntranceRingA 1.10s ease-out 0.10s both;
}

.game-entrance-overlay.is-turn-running .entrance-ai-ring-b {
  animation: gameEntranceRingB 1.10s ease-out 0.10s both;
}

.game-entrance-overlay.is-turn-running .entrance-ai-ring-c {
  animation: gameEntranceRingA 0.92s ease-out 0.16s both;
}

.entrance-ai-copy {
  position: relative;
  min-width: 0;
}

.entrance-ai-copy > span,
.entrance-ai-copy > strong,
.entrance-ai-copy > em {
  display: block;
}

.entrance-ai-copy > span,
.entrance-ai-copy > em {
  color: rgba(188, 215, 205, 0.66);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.22em;
}

.entrance-ai-copy > strong {
  position: relative;
  width: max-content;
  margin: 5px 0;
  color: #eef8f3;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-shadow: 0 0 24px rgba(116, 240, 210, 0.42);
}

.entrance-ai-copy > strong::before,
.entrance-ai-copy > strong::after {
  content: attr(data-copy);
  position: absolute;
  inset: 0;
  opacity: 0;
}

.entrance-ai-copy > strong::before {
  color: #74f0d2;
  transform: translateX(-4px);
  clip-path: inset(0 0 58% 0);
}

.entrance-ai-copy > strong::after {
  color: #d9aa3f;
  transform: translateX(4px);
  clip-path: inset(55% 0 0 0);
}

.game-entrance-overlay.is-turn-running .entrance-ai-copy > strong::before,
.game-entrance-overlay.is-turn-running .entrance-ai-copy > strong::after {
  animation: gameEntranceGlitch 0.64s steps(2, jump-none) 0.30s both;
}

.entrance-ai-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  margin-top: 9px;
}

.entrance-ai-bars i {
  width: 12%;
  height: 3px;
  background: rgba(116, 240, 210, 0.42);
  transform-origin: left center;
}

.entrance-ai-bars i:nth-child(2) { width: 22%; }
.entrance-ai-bars i:nth-child(3) { width: 7%; }
.entrance-ai-bars i:nth-child(4) { width: 16%; }
.entrance-ai-bars i:nth-child(5) { width: 5%; }

.game-entrance-overlay.is-turn-running .entrance-ai-bars i {
  animation: gameEntranceBar 0.5s cubic-bezier(.18,.76,.2,1) 0.32s both;
}

.game-entrance-overlay.is-turn-running .entrance-ai-bars i:nth-child(2) { animation-delay: 0.38s; }
.game-entrance-overlay.is-turn-running .entrance-ai-bars i:nth-child(3) { animation-delay: 0.44s; }
.game-entrance-overlay.is-turn-running .entrance-ai-bars i:nth-child(4) { animation-delay: 0.50s; }
.game-entrance-overlay.is-turn-running .entrance-ai-bars i:nth-child(5) { animation-delay: 0.56s; }

.entrance-ai-status {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 5px 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(116, 240, 210, 0.20);
  color: rgba(188, 215, 205, 0.62);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.entrance-ai-status b {
  color: #eef8f3;
  font-weight: 700;
}

/* 真实界面元素只在入场期间获得动画，结束后类名被清理 */
#game-view.game-entrance-active #player1-card {
  animation: gameEntrancePlayerLeft 0.88s cubic-bezier(.14,.82,.18,1) 0.24s both;
}

#game-view.game-entrance-active #player2-card {
  animation: gameEntrancePlayerRight 0.88s cubic-bezier(.14,.82,.18,1) 0.24s both;
}

#game-view.game-entrance-active .room-board-area {
  transform-origin: center center;
  animation: gameEntranceBoard 0.96s cubic-bezier(.14,.76,.22,1) 0.90s both;
}

#game-view.game-entrance-active .game-action-rail,
#game-view.game-entrance-active .room-info-rail {
  animation: gameEntranceRail 0.58s ease-out 0.72s both;
}

#game-view.game-entrance-active .room-circuit-frame path {
  stroke-dasharray: 110;
  animation: gameEntranceCircuit 1.1s ease-out 0.76s both;
}

@keyframes gameEntranceTurnOverlay {
  0% { opacity: 1; }
  92% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes gameEngineBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gameEngineModuleIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.90); filter: blur(7px) brightness(1.35); }
  62% { opacity: 1; transform: translate(-50%, -50%) scale(1.015); filter: blur(0) brightness(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}

@keyframes gameEngineErrorIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.92); filter: blur(6px) brightness(1.35); }
  42% { opacity: 1; transform: translate(-50%, -50%) scale(1.018); filter: blur(0) brightness(1.10); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}

@keyframes gameEngineScan {
  0% { left: -16%; opacity: 0; }
  18% { opacity: 1; }
  76%, 100% { left: 105%; opacity: 0; }
}

@keyframes gameEngineOrbitA {
  to { transform: rotate(360deg); }
}

@keyframes gameEngineOrbitB {
  to { transform: rotate(-360deg); }
}

@keyframes gameEngineCorePulse {
  0% { opacity: .86; transform: scale(.72); }
  100% { opacity: 0; transform: scale(2.25); }
}

@keyframes gameEngineData {
  from { opacity: .25; transform: scaleX(.26); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes gameEngineNode {
  0%, 100% { opacity: .32; transform: scale(.72); }
  48% { opacity: 1; transform: scale(1.28); }
}

@keyframes gameEntranceVignette {
  0% { opacity: 0; }
  15%, 76% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes gameEntranceGrid {
  0% { opacity: 0; transform: scale(1.08); }
  34% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes gameEntranceCorners {
  0% { opacity: 0; transform: scale(0.96); }
  20%, 78% { opacity: 0.78; transform: scale(1); }
  100% { opacity: 0; }
}

@keyframes gameEntranceSpeedLine {
  0% { opacity: 0; transform: scaleX(0.04); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes gameEntrancePlayerLeft {
  0% { opacity: 0; transform: translateX(-190%) scale(.74) skewX(-13deg); filter: blur(7px) brightness(1.65); }
  50% { opacity: 1; transform: translateX(11%) scale(1.02) skewX(-4deg); filter: blur(0) brightness(1.16); }
  74% { transform: translateX(-4%) scale(1); filter: none; }
  100% { opacity: 1; transform: none; filter: none; }
}

@keyframes gameEntrancePlayerRight {
  0% { opacity: 0; transform: translateX(190%) scale(.74) skewX(13deg); filter: blur(7px) brightness(1.65); }
  50% { opacity: 1; transform: translateX(-11%) scale(1.02) skewX(4deg); filter: blur(0) brightness(1.16); }
  74% { transform: translateX(4%) scale(1); filter: none; }
  100% { opacity: 1; transform: none; filter: none; }
}

@keyframes gameEntranceBoard {
  0% { opacity: 0; clip-path: inset(48% 48% 48% 48%); transform: scale(.76) perspective(700px) rotateX(20deg); filter: blur(4px) brightness(1.55); }
  58% { opacity: 1; clip-path: inset(0); transform: scale(1.018); filter: blur(0) brightness(1.08); }
  100% { opacity: 1; clip-path: inset(0); transform: scale(1); filter: none; }
}

@keyframes gameEntranceRail {
  from { opacity: 0; filter: blur(4px); }
  to { opacity: 1; filter: none; }
}

@keyframes gameEntranceCircuit {
  from { stroke-dashoffset: 110; opacity: 0; }
  38% { opacity: 1; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes gameEntranceLock {
  0% { opacity: 0; clip-path: polygon(50% 48%, 50% 48%, 50% 52%, 50% 52%); transform: translate(-50%, -50%) scaleX(.14); filter: blur(6px) brightness(1.7); }
  18% { opacity: 1; clip-path: polygon(0 20px, 20px 0, 82% 0, 85% 8px, calc(100% - 14px) 8px, 100% 22px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 16% 100%, 13% calc(100% - 8px), 12px calc(100% - 8px), 0 calc(100% - 20px)); transform: translate(-50%, -50%) scaleX(1.025); filter: blur(0) brightness(1.2); }
  28%, 76% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
  88% { opacity: 1; transform: translate(-50%, -51%) scale(.99); filter: brightness(1.10); }
  100% { opacity: 0; transform: translate(-50%, -57%) scale(.96); filter: blur(5px); }
}

@keyframes gameEntranceAiScan {
  0% { left: -14%; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 104%; opacity: 0; }
}

@keyframes gameEntranceCore {
  0% { opacity: 0; transform: scale(1.7) rotate(-32deg); filter: blur(5px); }
  34% { opacity: 1; transform: scale(.92) rotate(3deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes gameEntranceRingA {
  from { opacity: 0; transform: rotate(-320deg) scale(1.4); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes gameEntranceRingB {
  from { opacity: 0; transform: rotate(300deg) scale(.7); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes gameEntranceGlitch {
  0%, 100% { opacity: 0; }
  18% { opacity: .86; transform: translateX(-4px); }
  34% { opacity: 0; }
  48% { opacity: .72; transform: translateX(4px); }
  64% { opacity: 0; }
  78% { opacity: .5; transform: translateX(-2px); }
}

@keyframes gameEntranceBar {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes gameEntranceRays {
  0% { opacity: 0; transform: scaleX(.2); }
  30% { opacity: .8; }
  100% { opacity: 0; transform: scaleX(1.4); }
}

@media (max-width: 900px) {
  .game-entrance-lock,
  .game-engine-loader,
  .game-engine-error {
    width: min(620px, 78vw);
  }
}

@media (max-width: 620px) {
  body.view-game-view #result-modal > .result-modal {
    position: fixed;
    left: var(--result-modal-center-x, 50vw);
    top: var(--result-modal-center-y, 50vh);
    width: min(370px, calc(100vw - 20px));
    margin: 0;
    transform: translate(-50%, -50%);
  }
  .game-entrance-trails { display: none; }
  .game-entrance-lock {
    width: 88vw;
    min-height: 118px;
    padding: 13px 15px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 6px 10px;
  }
  .entrance-ai-core { width: 72px; height: 72px; }
  .entrance-ai-core .entrance-color-stone { width: 32px; height: 32px; }
  .entrance-ai-ring-a { inset: 2px; }
  .entrance-ai-ring-b { inset: 10px; }
  .entrance-ai-ring-c { inset: 18px; }
  .entrance-ai-copy > span,
  .entrance-ai-copy > em { font-size: 8px; letter-spacing: .1em; }
  .entrance-ai-copy > strong { font-size: 23px; letter-spacing: .12em; }
  .entrance-ai-status { display: none; }
  .game-engine-loader,
  .game-engine-error {
    width: 90vw;
    min-height: 148px;
    padding: 15px 16px;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 7px 11px;
  }
  .engine-core-visual { width: 76px; height: 76px; }
  .engine-core-visual > b { width: 30px; height: 30px; font-size: 9px; }
  .engine-orbit-a { inset: 1px; }
  .engine-orbit-b { inset: 10px; }
  .engine-orbit-c { inset: 19px; }
  .engine-core-pulse { inset: 24px; }
  .engine-loading-copy > span,
  .engine-error-copy > span { font-size: 8px; letter-spacing: .10em; }
  .engine-loading-copy > strong,
  .engine-error-copy > strong { margin: 5px 0 4px; font-size: 19px; letter-spacing: .06em; }
  .engine-loading-copy > p,
  .engine-error-copy > p { font-size: 11px; line-height: 1.55; }
  .engine-loading-status,
  .engine-error-code { display: none; }
  .engine-error-core { width: 74px; height: 74px; }
  .engine-error-core > b { width: 30px; height: 30px; font-size: 17px; }
  .engine-error-ring-a { inset: 1px; }
  .engine-error-ring-b { inset: 11px; }
  .engine-error-back { min-width: 94px; margin-top: 9px; padding: 7px 12px; font-size: 11px; }
}

/* 2026-08-24：复盘分析、独立棋力画像、批量SGF分析 */
.kifu-center-panel { display: none; min-height: 300px; }
.kifu-center-panel.active { display: block; }
.review-workbench-body { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 10px; min-height: 0; }
.review-workbench-tools { display: flex; flex-direction: column; gap: 7px; padding-top: 10px; }
.review-workbench-tools button { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 9px; border: 1px solid rgba(217,170,63,.18); border-radius: 6px; background: rgba(0,0,0,.16); color: var(--ink3); font: 600 10px var(--font-sans); cursor: pointer; text-align: left; }.review-workbench-tools button.active,.review-workbench-tools button:hover { border-color: rgba(217,170,63,.42); color: var(--gold2); }.review-workbench-tools span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(116,240,210,.24); border-radius: 5px; color: #8cf5dc; }
.review-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 10px 0 14px; }
.review-source-grid article,.review-source-grid > button { display: grid; min-width: 0; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; min-height: 70px; padding: 10px; border: 1px solid rgba(217,170,63,.22); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--ink2); text-align: left; }
.review-source-grid > button { cursor: pointer; }
.review-source-grid article.active { border-color: rgba(116,240,210,.34); background: rgba(116,240,210,.055); }
.review-source-grid b { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(217,170,63,.42); border-radius: 50%; color: var(--gold2); font-size: 12px; }
.review-source-grid strong,.review-source-grid small,.review-source-grid span { display: block; }
.review-source-grid strong { color: var(--gold2); font-size: 11px; }.review-source-grid small,.review-source-grid article span { margin-top: 3px; color: var(--ink3); font-size: 9px; line-height: 1.45; }
.sgf-import-tabs { display: flex; gap: 6px; margin-bottom: 12px; padding: 3px; border: 1px solid rgba(217,170,63,.18); border-radius: 7px; }
.sgf-import-tabs button { flex: 1; min-height: 36px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink3); cursor: pointer; }.sgf-import-tabs button.active { border-color: rgba(217,170,63,.4); background: rgba(217,170,63,.1); color: var(--gold2); }
.public-kifu-help { margin: 4px 0 10px; color: var(--ink3); font-size: 10px; line-height: 1.6; }
.modal-toolbar-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-toolbar-title > div { display: flex; align-items: center; gap: 8px; }.modal-toolbar-title > div > button:last-child { border: 0; background: transparent; color: var(--ink3); font-size: 20px; cursor: pointer; }
.profile-import-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 10px 0 12px; padding: 12px 14px; border: 1px solid rgba(116,240,210,.22); border-radius: 8px; background: rgba(116,240,210,.035); }
.profile-import-toolbar > div { display: flex; flex-direction: column; gap: 3px; }.profile-import-toolbar strong { color: var(--gold2); font-size: 12px; }.profile-import-toolbar span { color: var(--ink3); font-size: 10px; }
.profile-import-preview { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid rgba(217,170,63,.28); border-radius: 8px; background: rgba(217,170,63,.045); }
.profile-import-preview.hidden { display: none; }.profile-import-preview > div { min-width: 0; }.profile-import-preview strong,.profile-import-preview span { display: block; }.profile-import-preview strong { overflow: hidden; color: var(--ink2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.profile-import-preview span,.profile-import-preview small { color: var(--ink3); font-size: 9px; }.profile-import-preview small { grid-column: 1/-1; }.profile-import-preview label { color: var(--ink3); font-size: 10px; }.profile-import-preview select,.batch-color-select select { margin-left: 4px; padding: 5px; border: 1px solid rgba(217,170,63,.25); border-radius: 4px; background: #09150f; color: var(--ink2); }
.go-profile-content,.batch-analysis-content { min-height: 330px; max-height: min(66vh,650px); overflow-y: auto; padding: 2px 4px 10px; }
.go-profile-head,.batch-analysis-head,.batch-professional-report header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid rgba(217,170,63,.2); border-radius: 8px; background: rgba(116,240,210,.035); }
.go-profile-head > div,.batch-analysis-head > div:first-child,.batch-professional-report header > div { display: flex; flex-direction: column; gap: 3px; }
.go-profile-head strong,.batch-analysis-head strong,.batch-professional-report header strong { color: var(--gold2); font-size: 15px; }
.go-profile-head span,.batch-analysis-head span,.batch-professional-report header span { color: var(--ink3); font-size: 11px; }
.go-profile-head em { padding: 5px 9px; border: 1px solid rgba(116,240,210,.3); border-radius: 20px; color: #8cf5dc; font: normal 600 11px var(--font-sans); }
.go-profile-record-grid,.batch-report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.go-profile-record-grid article,.batch-report-metrics article { padding: 12px 8px; border: 1px solid rgba(217,170,63,.16); border-radius: 7px; background: rgba(255,255,255,.025); text-align: center; }
.go-profile-record-grid strong,.batch-report-metrics strong { display: block; color: var(--gold2); font-size: 20px; }
.go-profile-score-hero { display: grid; grid-template-columns: auto auto minmax(180px,1fr); align-items: center; gap: 16px; margin: 12px 0; padding: 15px 18px; border: 1px solid rgba(240,200,92,.46); border-radius: 10px; background: radial-gradient(circle at 12% 50%,rgba(240,200,92,.15),rgba(116,240,210,.045) 58%,rgba(255,255,255,.018)); }
.go-profile-score-hero div { display: grid; grid-template-columns: auto auto; align-items: end; }
.go-profile-score-hero small { grid-column: 1/-1; color: rgba(232,244,238,.58); font-size: 9px; }
.go-profile-score-hero strong { color: #f5d77f; font-size: 38px; line-height: 1; }
.go-profile-score-hero em { color: rgba(240,200,92,.7); font-size: 11px; font-style: normal; }
.go-profile-score-hero > span { padding: 7px 12px; border: 1px solid rgba(116,240,210,.35); border-radius: 18px; color: #8cf5dc; font-weight: 800; letter-spacing: 2px; text-align: center; }
.go-profile-score-hero p { margin: 0; color: var(--ink3); font-size: 9px; line-height: 1.65; }
.go-profile-record-grid span,.batch-report-metrics span { color: var(--ink3); font-size: 10px; }
.go-profile-split { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: center; padding: 14px; border: 1px solid rgba(217,170,63,.16); border-radius: 8px; }
.go-profile-radar-wrap { text-align: center; }
.go-profile-radar { width: 210px; max-width: 100%; }
.radar-grid polygon,.radar-grid line { fill: none; stroke: rgba(217,170,63,.24); stroke-width: 1; }
.radar-value { fill: rgba(116,240,210,.22); stroke: #74f0d2; stroke-width: 2; }
.go-profile-radar-wrap small { display: block; color: var(--ink3); font-size: 9px; }
.go-profile-dimensions { display: grid; gap: 10px; }
.go-profile-dimension { display: grid; grid-template-columns: 60px minmax(80px,1fr) 30px 44px; gap: 8px; align-items: center; color: var(--ink2); font-size: 11px; }
.go-profile-dimension > div { height: 7px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.07); }
.go-profile-dimension i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2d9f82,#e2b54b); }
.go-profile-dimension strong { color: var(--gold2); text-align: right; }
.go-profile-dimension small { color: var(--ink3); text-align: right; }
.go-profile-summary { margin: 12px 0; padding: 13px 15px; border-left: 3px solid #d9aa3f; background: rgba(217,170,63,.06); }
.go-profile-summary strong { color: var(--gold2); }
.go-profile-summary p { margin: 5px 0 0; color: var(--ink2); font-size: 12px; line-height: 1.7; }
.go-profile-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.go-profile-facts span { padding: 8px 9px; border: 1px solid rgba(217,170,63,.13); border-radius: 5px; color: var(--ink3); font-size: 10px; text-align: center; }
.go-profile-footnote,.board-scanner-note { color: var(--ink3); font-size: 10px; line-height: 1.7; }
.go-profile-actions { display: flex; flex-flow: row wrap; justify-content: flex-end; gap: 5px; }
.go-profile-actions button { padding: 5px 8px; border: 1px solid rgba(217,170,63,.22); border-radius: 5px; background: rgba(255,255,255,.025); color: var(--ink3); font-size: 9px; cursor: pointer; }
.go-profile-actions button.on { border-color: rgba(116,240,210,.5); background: rgba(116,240,210,.09); color: #8cf5dc; }
.go-profile-actions button:disabled { opacity: .45; cursor: default; }
.go-profile-section-title { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 15px 1px 7px; }
.go-profile-section-title strong { color: var(--gold2); font-size: 12px; }.go-profile-section-title span { color: var(--ink3); font-size: 9px; }
.go-profile-growth { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 11px 12px; border: 1px solid rgba(217,170,63,.16); border-left: 3px solid rgba(217,170,63,.55); border-radius: 7px; background: rgba(255,255,255,.022); }
.go-profile-growth strong { width: 100%; color: var(--ink2); font-size: 11px; line-height: 1.65; }.go-profile-growth span { color: var(--ink3); font-size: 9px; }
.go-profile-growth.improving { border-left-color: #74f0d2; background: rgba(116,240,210,.035); }.go-profile-growth.attention { border-left-color: #ef9c73; background: rgba(239,156,115,.035); }
.go-profile-trend { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid rgba(217,170,63,.14); border-radius: 7px; }
.go-profile-trend-row { display: grid; grid-template-columns: 70px minmax(90px,1fr) 32px 70px; gap: 8px; align-items: center; color: var(--ink3); font-size: 9px; }
.go-profile-trend-row > div { height: 7px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.06); }.go-profile-trend-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2d9f82,#e2b54b); }.go-profile-trend-row strong { color: var(--gold2); text-align: right; }.go-profile-trend-row small { text-align: right; }
.go-profile-issue-grid,.go-profile-task-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.go-profile-issue-grid article,.go-profile-task-grid article { min-width: 0; padding: 10px 11px; border: 1px solid rgba(217,170,63,.14); border-radius: 7px; background: rgba(255,255,255,.022); }
.go-profile-issue-grid article.repeated { border-color: rgba(239,156,115,.24); }.go-profile-issue-grid strong,.go-profile-task-grid strong { display: block; color: var(--gold2); font-size: 11px; }.go-profile-issue-grid span,.go-profile-task-grid em { color: #8cf5dc; font-size: 8px; font-style: normal; }.go-profile-issue-grid p,.go-profile-task-grid p { margin: 5px 0; color: var(--ink2); font-size: 9px; line-height: 1.55; }.go-profile-issue-grid small,.go-profile-task-grid small,.go-profile-task-grid span { display: block; color: var(--ink3); font-size: 8px; line-height: 1.5; }
.go-profile-monthly,.go-profile-learner-card { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(116,240,210,.2); border-radius: 8px; background: rgba(116,240,210,.035); }
.go-profile-monthly header { display: flex; justify-content: space-between; gap: 10px; }.go-profile-monthly strong,.go-profile-learner-card strong { color: #8cf5dc; }.go-profile-monthly header span,.go-profile-monthly div span { color: var(--ink3); font-size: 9px; }.go-profile-monthly p,.go-profile-learner-card p { color: var(--ink2); font-size: 10px; line-height: 1.65; }.go-profile-monthly div { display: flex; flex-wrap: wrap; gap: 12px; }
.go-profile-weekly { padding: 13px 14px; border: 1px solid rgba(217,170,63,.22); border-radius: 9px; background: linear-gradient(135deg,rgba(217,170,63,.07),rgba(116,240,210,.035)); }
.go-profile-weekly header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.go-profile-weekly header div { display: grid; gap: 2px; }.go-profile-weekly header strong { color: var(--gold2); font-size: 12px; }.go-profile-weekly header span,.go-profile-weekly header em { color: var(--ink3); font-size: 8px; font-style: normal; }.go-profile-weekly p { margin: 9px 0; color: var(--ink2); font-size: 10px; }.go-profile-weekly > div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }.go-profile-weekly > div span { display: grid; gap: 2px; padding: 7px; border-radius: 6px; background: rgba(255,255,255,.03); color: var(--ink3); font-size: 8px; }.go-profile-weekly > div b { color: #8cf5dc; font-size: 13px; }.go-profile-weekly > small { display: block; margin-top: 9px; color: rgba(232,244,238,.64); font-size: 9px; }
.go-profile-seven-day { display: grid; gap: 6px; }.go-profile-seven-day article { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid rgba(217,170,63,.15); border-radius: 7px; background: rgba(255,255,255,.022); }.go-profile-seven-day em { color: #8cf5dc; font-size: 9px; font-style: normal; }.go-profile-seven-day strong { color: var(--gold2); font-size: 10px; }.go-profile-seven-day p { margin: 2px 0; color: var(--ink2); font-size: 9px; line-height: 1.5; }.go-profile-seven-day small { color: var(--ink3); font-size: 8px; }.go-profile-seven-day button { padding: 6px 9px; border: 1px solid rgba(116,240,210,.28); border-radius: 5px; background: rgba(116,240,210,.06); color: #8cf5dc; font-size: 8px; cursor: pointer; }
.go-profile-learner-card span,.go-profile-learner-card small { display: block; margin-top: 7px; color: var(--ink3); font-size: 9px; line-height: 1.6; }.go-profile-empty { grid-column: 1/-1; padding: 10px; color: var(--ink3); font-size: 9px; text-align: center; }
.go-profile-measure-note { display:block; margin-top:8px; color:var(--ink3); font-size:9px; line-height:1.6; }
.go-profile-teacher-note { margin-top:8px; padding:11px 13px; border-left:3px solid var(--gold2); border-radius:6px; background:rgba(217,170,63,.05); }
.go-profile-teacher-note strong { color:var(--gold2); font-size:11px; }.go-profile-teacher-note p { margin:5px 0 0; color:var(--ink2); font-size:9px; line-height:1.7; }
.batch-analysis-head > div:last-child { display: flex; gap: 6px; }
.batch-analysis-head button,.batch-professional-report header button { padding: 7px 10px; border: 1px solid rgba(217,170,63,.3); border-radius: 5px; background: transparent; color: var(--gold2); cursor: pointer; }
.batch-analysis-rules { margin: 10px 0; padding: 10px 12px; border-left: 3px solid rgba(116,240,210,.5); background: rgba(116,240,210,.035); color: var(--ink3); font-size: 10px; line-height: 1.7; }
.batch-fairplay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }.batch-fairplay-options button { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid rgba(217,170,63,.18); border-radius: 7px; background: rgba(255,255,255,.02); color: var(--ink3); text-align: left; cursor: pointer; }.batch-fairplay-options button.on { border-color: rgba(116,240,210,.52); background: rgba(116,240,210,.07); }.batch-fairplay-options button:disabled { opacity: .48; cursor: default; }.batch-fairplay-options strong { color: var(--gold2); font-size: 11px; }.batch-fairplay-options span { font-size: 9px; line-height: 1.5; }
.batch-fairplay-conclusion { margin: 11px 0; padding: 12px 14px; border-left: 3px solid #d9aa3f; background: rgba(217,170,63,.045); }.batch-fairplay-conclusion strong { color: var(--gold2); font-size: 17px; }.batch-fairplay-conclusion p { margin: 5px 0 0; color: var(--ink2); font-size: 10px; line-height: 1.65; }.batch-fairplay-games { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }.batch-fairplay-games article { padding: 9px 10px; border: 1px solid rgba(217,170,63,.14); border-radius: 6px; background: rgba(255,255,255,.02); }.batch-fairplay-games strong,.batch-fairplay-games span,.batch-fairplay-games small { display: block; }.batch-fairplay-games strong { color: var(--gold2); font-size: 10px; }.batch-fairplay-games span,.batch-fairplay-games small { margin-top: 3px; color: var(--ink3); font-size: 8px; }.batch-fairplay-method,.batch-fairplay-warning { margin-top: 9px; padding: 9px 10px; border-radius: 6px; color: var(--ink3); font-size: 9px; line-height: 1.6; }.batch-fairplay-method { background: rgba(255,255,255,.025); }.batch-fairplay-warning { border-left: 3px solid rgba(217,170,63,.55); background: rgba(217,170,63,.05); }
.batch-fairplay-score { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 5px; margin: 12px 0; padding: 15px; border: 1px solid rgba(232,179,65,.44); border-radius: 9px; background: linear-gradient(135deg,rgba(232,179,65,.12),rgba(116,240,210,.035)); }
.batch-fairplay-score > span { align-self: center; color: var(--gold2); font-size: 12px; font-weight: 800; }
.batch-fairplay-score span small { display: block; margin-top: 3px; color: var(--ink3); font-size: 8px; font-weight: 400; }
.batch-fairplay-score strong { color: #ffd75a; font-size: 42px; line-height: .9; }
.batch-fairplay-score em { color: rgba(232,179,65,.78); font-size: 13px; font-style: normal; }
.batch-fairplay-score p { grid-column: 1/-1; margin: 5px 0 0; color: var(--ink3); font-size: 8px; }
.batch-game-list { max-height: 280px; overflow-y: auto; border: 1px solid rgba(217,170,63,.14); border-radius: 7px; }
.batch-game-row { display: grid; grid-template-columns: 22px minmax(0,1fr) 54px; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.batch-game-row + .batch-game-row { border-top: 1px solid rgba(217,170,63,.1); }
.batch-game-row.active { background: rgba(116,240,210,.07); }
.batch-game-row input { accent-color: #d9aa3f; }
.batch-game-row span { display: flex; min-width: 0; flex-direction: column; }
.batch-game-row strong { overflow: hidden; color: var(--ink2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-game-row small { color: var(--ink3); font-size: 9px; }
.batch-game-row em { color: #8cf5dc; font: normal 10px var(--font-sans); text-align: right; }
.batch-import-row { grid-template-columns: 22px minmax(0,1fr) auto 28px 48px; }
.batch-color-select { color: var(--ink3); font-size: 9px; white-space: nowrap; }.batch-color-select select { padding: 3px; font-size: 9px; }
.batch-remove { width: 26px; height: 26px; border: 1px solid rgba(255,154,154,.22); border-radius: 4px; background: transparent; color: #ffadad; cursor: pointer; }
.batch-analysis-run { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.batch-analysis-run > span { color: var(--ink3); font-size: 11px; }
.batch-professional-report { margin-top: 14px; }
.batch-professional-report > p { padding: 12px; border-left: 3px solid #d9aa3f; background: rgba(217,170,63,.05); color: var(--ink2); font-size: 12px; line-height: 1.7; }
.batch-phase-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.batch-phase-grid > div { padding: 10px; border: 1px solid rgba(217,170,63,.15); border-radius: 6px; }
.batch-phase-grid span,.batch-phase-grid strong,.batch-phase-grid small { display: block; }
.batch-phase-grid span { color: var(--ink3); font-size: 10px; }.batch-phase-grid strong { color: var(--gold2); font-size: 18px; }.batch-phase-grid small { color: var(--ink3); font-size: 9px; }
.batch-report-warning,.batch-failures { display: block; margin-top: 9px; padding: 8px; color: #ffadad; font-size: 10px; }
.system-ai-games-only { display: flex; align-items: baseline; justify-content: center; gap: 9px; padding: 22px; border: 1px solid rgba(217,170,63,.22); border-radius: 8px; background: rgba(217,170,63,.06); }
.system-ai-games-only strong { color: var(--gold2); font-size: 34px; }.system-ai-games-only span { color: var(--ink3); font-size: 12px; }

/* 拍照识别入口严格只在触控手机尺寸显示。 */
.mobile-board-scan-entry { display: none; }
.board-scanner-modal-panel { width: min(94vw,720px); max-height: 94dvh; overflow-y: auto; }
.board-scanner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.board-scanner-head p { margin: 4px 0 0; color: var(--ink3); font-size: 11px; }
.board-scanner-head > button { border: 0; background: transparent; color: var(--ink3); font-size: 24px; cursor: pointer; }
.board-scanner-empty { display: flex; min-height: 340px; align-items: center; justify-content: center; flex-direction: column; gap: 9px; margin-top: 12px; border: 1px dashed rgba(217,170,63,.35); border-radius: 10px; text-align: center; }
.board-scanner-empty.hidden,.board-scanner-work.hidden { display: none; }
.board-scanner-empty > span { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(116,240,210,.35); border-radius: 14px; color: #8cf5dc; font-size: 25px; }
.board-scanner-empty strong { color: var(--gold2); }.board-scanner-empty small { max-width: 280px; color: var(--ink3); }
#board-scanner-canvas { display: block; width: 100%; height: auto; max-height: 68vh; margin-top: 12px; border: 1px solid rgba(217,170,63,.3); border-radius: 8px; background: #07110d; touch-action: none; }
.board-scanner-status { padding: 8px 3px; color: #8cf5dc; font-size: 10px; }
.board-scanner-actions,.board-scanner-brushes,.board-scanner-final-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 7px 0; }
.board-scanner-actions button,.board-scanner-brushes button { min-height: 36px; padding: 7px 11px; border: 1px solid rgba(217,170,63,.28); border-radius: 5px; background: rgba(0,0,0,.18); color: var(--ink2); }
.board-scanner-brushes span { color: var(--ink3); font-size: 11px; }
.board-scanner-brushes button.active { border-color: #74f0d2; color: #8cf5dc; }
.board-scanner-brushes i { display: inline-block; width: 13px; height: 13px; margin-right: 4px; border-radius: 50%; vertical-align: -2px; }.board-scanner-brushes i.black { background:#111; }.board-scanner-brushes i.white { background:#eee; border:1px solid #999; }
.board-scanner-final-actions .modal-btn { flex: 1; }

@media (max-width: 760px) and (hover: none), (max-width: 760px) and (pointer: coarse) {
  .mobile-board-scan-entry { display: block; margin-bottom: 10px; }
  .mobile-board-scan-entry > button { display: grid; width: 100%; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(116,240,210,.25); border-radius: 9px; background: linear-gradient(120deg,rgba(116,240,210,.08),rgba(217,170,63,.08)); color: var(--ink2); text-align: left; }
  .mobile-board-scan-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(116,240,210,.35); border-radius: 9px; color: #8cf5dc; font-size: 18px; }
  .mobile-board-scan-entry strong,.mobile-board-scan-entry small { display: block; }.mobile-board-scan-entry strong { color: var(--gold2); font-size: 13px; }.mobile-board-scan-entry small { margin-top: 2px; color: var(--ink3); font-size: 9px; }.mobile-board-scan-entry b { color: var(--gold2); font-size: 11px; }
}

@media (max-width: 560px) {
  .kifu-center-panel.active { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  #kifu-center-library.active { display: flex; flex-direction: column; }
  .go-profile-content,.batch-analysis-content { height: 100%; max-height: none; }
  .go-profile-record-grid,.batch-report-metrics { grid-template-columns: repeat(2,1fr); }
  .go-profile-split { grid-template-columns: 1fr; }
  .go-profile-radar-wrap { display: none; }
  .go-profile-facts { grid-template-columns: repeat(2,1fr); }
  .go-profile-head { align-items: stretch; flex-direction: column; }.go-profile-actions { justify-content: flex-start; }.go-profile-actions button { flex: 1; }
  .go-profile-issue-grid,.go-profile-task-grid { grid-template-columns: 1fr; }
  .go-profile-trend-row { grid-template-columns: 58px minmax(70px,1fr) 28px 58px; gap: 5px; }
  .go-profile-section-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .go-profile-weekly > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .go-profile-seven-day article { grid-template-columns: 42px minmax(0,1fr); }.go-profile-seven-day button { grid-column: 2; justify-self: start; }
  .batch-phase-grid { grid-template-columns: 1fr; }
  .batch-analysis-run { align-items: stretch; flex-direction: column; }
  .batch-fairplay-options,.batch-fairplay-games { grid-template-columns: 1fr; }
  .review-source-grid { grid-template-columns: 1fr; }
  .review-workbench-body { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }.review-workbench-tools { flex: 0 0 auto; flex-direction: row; padding-top: 4px; }.review-workbench-tools button { flex: 1; justify-content: center; }
  .review-source-grid article,.review-source-grid > button { min-height: 58px; }
  .profile-import-toolbar { align-items: stretch; flex-direction: column; }.profile-import-toolbar .modal-btn { width: 100%; }
  .profile-import-preview { grid-template-columns: 1fr 1fr; }.profile-import-preview > div,.profile-import-preview small { grid-column: 1/-1; }.profile-import-preview .modal-btn { min-width: 0; }
  .batch-analysis-head { align-items: stretch; flex-direction: column; }.batch-analysis-head > div:last-child { flex-wrap: wrap; }.batch-analysis-head button { flex: 1; }
  .batch-import-row { grid-template-columns: 22px minmax(0,1fr) 28px; }.batch-import-row .batch-color-select { grid-column: 2; }.batch-import-row .batch-remove { grid-column: 3; grid-row: 1; }.batch-import-row em { grid-column: 3; grid-row: 2; }
  .board-scanner-modal-panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0 !important; padding: 12px; }
}

/* ═══════════════ 专业复盘工作台（第三、四期整合） ═══════════════ */
.professional-review {
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  color: rgba(232,244,238,0.9);
  background:
    radial-gradient(circle at 52% 40%, rgba(38,118,83,0.17), transparent 34%),
    linear-gradient(135deg,#06110d 0%,#0a1710 52%,#050b08 100%);
}

.rv-header {
  min-height: 54px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  background: rgba(5,14,11,0.96);
  border-bottom: 1px solid rgba(217,170,63,0.28);
}

.rv-header-title,
.rv-header > div:last-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-back { flex-shrink: 0; padding: 7px 11px; border: 1px solid rgba(217,170,63,0.34); border-radius: 6px; background: rgba(217,170,63,0.07); color: var(--gold2); cursor: pointer; }
.rv-title-wrap { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.rv-title-wrap small { color: rgba(116,240,210,0.58); font-size: 9px; letter-spacing: 1.4px; }
#review-title { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold2); font: 700 14px 'Noto Serif SC',serif; }
#review-result-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 4px; font-size: 10px; }

.rv-workspace {
  display: grid;
  grid-template-columns: clamp(300px, 17vw, 340px) minmax(420px, 1fr) clamp(450px, 26vw, 510px);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.rv-left,
.rv-right {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(7,18,14,0.94);
}
.rv-left { border-right: 1px solid rgba(217,170,63,0.2); }
.rv-right { border-left: 1px solid rgba(217,170,63,0.2); }
.rv-analysis-head { flex: 0 0 auto; display: grid; grid-template-columns: minmax(82px,.72fr) minmax(0,1.28fr); align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid rgba(217,170,63,.2); background: linear-gradient(120deg,rgba(217,170,63,.11),rgba(116,240,210,.035)); }
.rv-analysis-head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-analysis-head small { color: rgba(116,240,210,.58); font-size: 8px; letter-spacing: 1.2px; }
.rv-analysis-head strong { color: var(--gold2); font: 800 16px 'Noto Serif SC',serif; }
.rv-analysis-head > span { min-width: 0; max-width: 100%; color: rgba(216,201,168,.5); font-size: 9px; line-height: 1.5; text-align: right; overflow-wrap: anywhere; }
.rv-analysis-controls { flex: 0 0 auto; min-height: 0; max-height: min(42vh,360px); overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; border-bottom: 1px solid rgba(217,170,63,.2); scrollbar-width: thin; }
.rv-level-label { color: rgba(216,201,168,0.64); font-size: 10px; letter-spacing: 1px; }
.rv-level-select { width: 100%; padding: 8px 9px; border-radius: 6px; border: 1px solid rgba(217,170,63,0.3); background: #0a1813; color: rgba(232,244,238,0.9); }
.rv-analysis-status { min-height: 34px; padding: 7px 9px; border-radius: 5px; background: rgba(255,255,255,0.035); color: rgba(216,201,168,0.62); font-size: 10px; line-height: 1.5; }
.rv-analysis-status.status-running,.rv-analysis-status.status-queued { color: #71ddff; background: rgba(57,208,255,0.08); }
.rv-analysis-status.status-completed { color: #74f0d2; background: rgba(116,240,210,0.08); }
.rv-analysis-status.status-failed,.rv-analysis-status.status-cancelled { color: #ff9a9a; background: rgba(255,90,90,0.08); }
.rv-file-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.rv-file-actions .rv-tool-btn { width: auto; padding: 7px 5px; font-size: 10px; }
.rv-file-actions .rv-tool-btn:first-child { grid-column: 1 / -1; }
.rv-right .rv-file-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rv-right .rv-file-actions .rv-tool-btn:first-child { grid-column: auto; }

.rv-board-stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 9px; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
.rv-board-stage #review-board { max-width: 100%; max-height: 100%; box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.rv-variation-return { position: absolute; top: 10px; left: 50%; z-index: 4; transform: translateX(-50%); padding: 7px 12px; border: 1px solid rgba(116,240,210,0.46); border-radius: 18px; background: rgba(5,20,15,0.94); color: #74f0d2; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.28); }
.rv-practice-panel { z-index: 5; width: min(720px,100%); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid rgba(116,240,210,.42); border-radius: 9px; background: linear-gradient(135deg,rgba(7,31,23,.98),rgba(12,42,32,.96)); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.rv-practice-panel > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-practice-panel strong { color: #8cf5dc; font-size: 12px; }
.rv-practice-panel span { color: rgba(232,244,238,.65); font-size: 9px; }
.rv-practice-panel .practice-result { width: fit-content; margin-top: 2px; padding: 2px 6px; border-radius: 10px; font-size: 8px; font-style: normal; }.rv-practice-panel .practice-result.correct { background: rgba(63,214,160,.12); color: #8cf5dc; }.rv-practice-panel .practice-result.incorrect { background: rgba(255,123,123,.12); color: #ffaaaa; }
.rv-practice-actions { display: flex; gap: 5px; flex-shrink: 0; }
.rv-practice-actions button { padding: 6px 8px; border: 1px solid rgba(217,170,63,.34); border-radius: 5px; background: rgba(217,170,63,.09); color: var(--gold2); font-size: 9px; cursor: pointer; }

.rv-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.rv-tab { padding: 12px 2px; font-size: 11px; }
.rv-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rv-panel-empty { padding: 34px 20px; color: rgba(216,201,168,0.46); font-size: 11px; line-height: 1.8; text-align: center; }
.rv-panel-empty.compact { padding: 14px 6px; }

.rv-coverage-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(217,170,63,0.2); border-radius: 8px; background: rgba(255,255,255,0.03); }
.rv-coverage-card > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.rv-coverage-card strong { color: var(--gold2); font-size: 12px; }
.rv-coverage-card small { color: rgba(216,201,168,0.55); font-size: 9px; line-height: 1.5; }
.rv-dual-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.rv-dual-mini > span { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 5px; padding: 7px; border-radius: 6px; background: rgba(255,255,255,0.03); font-size: 10px; }
.rv-dual-mini b { color: var(--gold2); font-size: 14px; }
.rv-dual-mini small { grid-column: 2 / -1; color: rgba(216,201,168,0.5); }
.rv-stone { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; vertical-align: -1px; }
.rv-stone.black { background: #111; border: 1px solid #777; }
.rv-stone.white { background: #f4f1e8; border: 1px solid #aaa; }
.rv-keymove { width: 100%; border: 1px solid rgba(217,170,63,0.14); text-align: left; }
.rv-keymove-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rv-keymove-info small { color: rgba(216,201,168,0.56); font-size: 9px; }
.rv-keymove-jump { color: #74f0d2; font-size: 10px; flex-shrink: 0; }

.rv-report-section { margin-top: 16px; }
.rv-report-score { display: flex; align-items: center; gap: 12px; }
.rv-report-score > strong { color: var(--gold2); font-size: 40px; line-height: 1; }
.rv-report-score > span { display: flex; flex-direction: column; color: rgba(232,244,238,0.9); font-weight: 700; }
.rv-report-score small,.rv-report-source { color: rgba(216,201,168,0.54); font-size: 9px; font-weight: 400; }
.rv-sum-overall p { color: rgba(232,244,238,0.72); font-size: 11px; line-height: 1.7; }
.rv-player-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rv-player-report { padding: 9px; border-radius: 7px; border: 1px solid rgba(217,170,63,0.16); background: rgba(255,255,255,0.028); }
.rv-player-report header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.rv-player-report header span { display: flex; align-items: center; gap: 5px; }
.rv-player-report header strong { font-size: 20px; }
.rv-player-report header small { font-size: 9px; }
.rv-metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.rv-metric-grid span { display: flex; flex-direction: column; }
.rv-metric-grid small { color: rgba(216,201,168,0.48); font-size: 8px; }
.rv-metric-grid b { color: rgba(232,244,238,0.84); font-size: 11px; }
.rv-phase-table { border: 1px solid rgba(217,170,63,0.16); border-radius: 7px; overflow: hidden; }
.rv-phase-row { display: grid; grid-template-columns: 46px 1fr 1fr; align-items: center; gap: 6px; padding: 7px 9px; font-size: 10px; }
.rv-phase-row + .rv-phase-row { border-top: 1px solid rgba(217,170,63,0.12); }
.rv-phase-row > strong { color: var(--gold2); }
.rv-phase-row > span { display: flex; justify-content: space-between; gap: 4px; }
.rv-phase-row small { color: rgba(216,201,168,0.45); font-size: 8px; }
.rv-report-footnote { margin-top: 8px; padding: 7px 9px; border-left: 2px solid rgba(232,179,65,0.55); background: rgba(232,179,65,0.06); color: rgba(216,201,168,0.54); font-size: 9px; line-height: 1.55; }
.rv-report-jump-list { display: grid; gap: 6px; }
.rv-report-jump { width: 100%; min-width: 0; border: 1px solid rgba(200,146,42,.2); border-radius: 6px; background: rgba(255,255,255,.03); color: rgba(232,244,238,.84); padding: 8px 9px; text-align: left; cursor: pointer; display: grid; gap: 3px; }
.rv-report-jump b { color: var(--gold2); font-size: 10px; }
.rv-report-jump span { min-width: 0; color: rgba(216,201,168,.65); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.rv-report-jump small { color:rgba(232,244,238,.64); font-size:9px; line-height:1.55; overflow-wrap:anywhere; }
.rv-report-jump .rv-causal-note { padding-left:7px; border-left:2px solid rgba(255,123,123,.58); color:rgba(255,206,206,.78); }
.rv-report-jump .rv-variation-note { padding-left:7px; border-left:2px solid rgba(116,240,210,.55); color:rgba(172,244,226,.76); }
.rv-report-jump.positive { border-left: 3px solid rgba(63,214,160,.75); }
.rv-report-jump.problem { border-left: 3px solid rgba(255,123,123,.72); }
.rv-report-jump:hover { background: rgba(200,146,42,.1); border-color: rgba(200,146,42,.45); }
.rv-problem-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px; }.rv-problem-action > button:last-child { padding: 6px 9px; border: 1px solid rgba(116,240,210,.28); border-radius: 6px; background: rgba(116,240,210,.055); color: #8cf5dc; font-size: 8px; cursor: pointer; }
.rv-training-task-card { overflow: hidden; border: 1px solid rgba(116,240,210,.17); border-radius: 7px; background: rgba(116,240,210,.025); }
.rv-training-task-card .rv-report-jump { border: 0; border-radius: 0; background: transparent; }
.rv-training-task-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 0 8px 8px; }
.rv-training-task-card > div button { padding: 6px; border: 1px solid rgba(116,240,210,.25); border-radius: 5px; background: rgba(116,240,210,.055); color: #8cf5dc; font-size: 8px; cursor: pointer; }
.rv-training-task-card > div button:disabled { opacity: .65; cursor: default; }
.rv-training-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rv-training-list li { display: flex; gap: 7px; align-items: flex-start; padding: 7px 8px; border-radius: 5px; background: rgba(116,240,210,0.045); color: rgba(232,244,238,0.74); font-size: 10px; line-height: 1.55; }
.rv-training-list .rv-stone { margin-top: 3px; }
.rv-training-list strong { color: var(--gold); margin-right: 6px; }
.rv-report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.rv-quality-breakdown { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:8px 0 10px; }
.rv-quality-chip { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:8px 9px; border:1px solid rgba(200,146,42,.2); border-radius:6px; background:rgba(255,255,255,.035); font-size:10px; }
.rv-quality-chip b { color:var(--ink); font-weight:600; }
.rv-quality-chip em { color:var(--gold2); font-style:normal; white-space:nowrap; }
.rv-recovery-card { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:baseline; padding:10px 11px; border-left:3px solid var(--teal); border-radius:5px; background:rgba(43,191,157,.07); font-size:10px; }
.rv-recovery-card strong { color:var(--ink); }
.rv-recovery-card span { color:rgba(232,244,238,.78); }
.rv-recovery-card em { color:var(--gold2); font-style:normal; }
.rv-story-summary { padding:10px 11px; border-left:3px solid var(--gold2); border-radius:6px; background:rgba(232,179,65,.065); }
.rv-story-summary strong { color:var(--gold2); font-size:12px; }
.rv-story-summary p { margin:5px 0 0; color:rgba(232,244,238,.7); font-size:9px; line-height:1.6; }
.rv-story-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:7px; }
.rv-story-grid article { min-width:0; padding:9px; border:1px solid rgba(217,170,63,.16); border-radius:7px; background:rgba(255,255,255,.025); }
.rv-story-grid b { display:block; color:var(--gold2); font-size:10px; }
.rv-story-grid span { color:rgba(216,201,168,.5); font-size:8px; }
.rv-story-grid p { margin:5px 0 0; color:rgba(232,244,238,.68); font-size:9px; line-height:1.55; }
.rv-causal-list { display:grid; gap:6px; }
.rv-causal-chain { padding:9px 10px; border:1px solid rgba(255,123,123,.18); border-left:3px solid rgba(255,123,123,.64); border-radius:7px; background:rgba(255,123,123,.035); }
.rv-causal-chain b { display:block; color:#ffc0c0; font-size:10px; }
.rv-causal-chain span { color:rgba(216,201,168,.56); font-size:8px; }
.rv-causal-chain p { margin:5px 0 0; color:rgba(232,244,238,.7); font-size:9px; line-height:1.6; }
.rv-opportunity-grid,.rv-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rv-opportunity-grid article,.rv-profile-grid article{display:flex;flex-direction:column;gap:5px;padding:11px;border:1px solid rgba(201,149,46,.25);border-radius:8px;background:rgba(255,255,255,.025)}
.rv-opportunity-grid article>b,.rv-profile-grid article>strong{color:var(--gold2);font-size:11px}
.rv-opportunity-grid article>strong{font-size:22px;color:var(--ink)}
.rv-opportunity-grid span,.rv-opportunity-grid small,.rv-profile-grid small{color:rgba(232,244,238,.68);font-size:9px;line-height:1.55}
.rv-profile-grid article>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.rv-profile-grid article>div span{display:flex;flex-direction:column;gap:2px;padding:5px 3px;text-align:center;border-radius:5px;background:rgba(43,191,157,.07)}
.rv-profile-grid article>div b{font-size:8px;color:rgba(232,244,238,.72)}
.rv-profile-grid article>div em{font-size:13px;color:var(--gold2);font-style:normal}
.rv-report-branding-settings { margin-top:2px; border:1px solid rgba(200,146,42,.18); border-radius:6px; padding:5px 8px; color:rgba(232,244,238,.78); font-size:10px; }
.rv-report-branding-settings summary { cursor:pointer; color:var(--gold2); padding:2px 0 4px; }
.rv-report-branding-settings label { display:block; margin:4px 0; }
.rv-report-branding-settings input { display:block; width:100%; box-sizing:border-box; margin-top:3px; padding:5px 7px; border:1px solid rgba(200,146,42,.2); border-radius:4px; background:rgba(255,255,255,.04); color:var(--ink); font-size:10px; }

/* AI鉴定：普通结论与高算力深度报告使用同一首位页签。 */
.rv-fp-intro { padding: 11px 12px; border: 1px solid rgba(116,240,210,0.2); border-radius: 8px; background: rgba(116,240,210,0.045); }
.rv-fp-intro strong { color: #8cf5dc; font-size: 14px; }
.rv-fp-intro p { margin: 5px 0 0; color: rgba(232,244,238,0.68); font-size: 10px; line-height: 1.65; }
.rv-fp-scope-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.rv-fp-scope-tabs button { padding: 8px 7px; border: 1px solid rgba(116,240,210,.22); border-radius: 5px; background: rgba(255,255,255,.025); color: rgba(232,244,238,.62); font-size: 9px; cursor: pointer; }
.rv-fp-scope-tabs button.on { border-color: rgba(232,179,65,.72); background: linear-gradient(135deg,rgba(232,179,65,.18),rgba(116,240,210,.06)); color: var(--gold2); font-weight: 800; }
.rv-fp-label { margin: 12px 0 6px; color: rgba(216,201,168,0.58); font-size: 9px; letter-spacing: 1px; }
.rv-fp-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rv-fp-side { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 8px; border: 1px solid rgba(217,170,63,0.22); border-radius: 6px; background: rgba(255,255,255,0.025); color: rgba(232,244,238,0.7); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-fp-side.on { border-color: rgba(232,179,65,0.7); background: rgba(232,179,65,0.12); color: var(--gold2); font-weight: 700; }
.rv-fp-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.rv-fp-mode-grid article { display: flex; flex-direction: column; min-width: 0; padding: 10px; border: 1px solid rgba(217,170,63,0.2); border-radius: 8px; background: rgba(255,255,255,0.025); }
.rv-fp-mode-grid article.deep { border-color: rgba(116,240,210,0.25); background: linear-gradient(145deg,rgba(116,240,210,0.055),rgba(255,255,255,0.018)); }
.rv-fp-mode-grid header { display: flex; flex-direction: column; gap: 2px; }
.rv-fp-mode-grid strong { color: var(--gold2); font-size: 12px; }
.rv-fp-mode-grid em { color: rgba(116,240,210,0.7); font-size: 8px; font-style: normal; }
.rv-fp-mode-grid p { flex: 1; margin: 7px 0; color: rgba(232,244,238,0.6); font-size: 9px; line-height: 1.6; }
.rv-fp-mode-grid button,.rv-fp-job button { padding: 7px 8px; border: 1px solid rgba(217,170,63,0.4); border-radius: 5px; background: rgba(217,170,63,0.12); color: var(--gold2); cursor: pointer; }
.rv-fp-mode-grid button:disabled { opacity: .45; cursor: default; }
.rv-fp-mode-grid article > small { margin-top: 5px; color: rgba(216,201,168,0.45); font-size: 8px; line-height: 1.45; }
.rv-fp-job { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 9px 10px; border-radius: 7px; background: rgba(57,208,255,0.07); color: #71ddff; font-size: 10px; }
.rv-fp-job span { color: rgba(232,244,238,0.62); }
.rv-fp-job button { align-self: flex-start; margin-top: 3px; }
.rv-fp-job.failed { color: #ff9a9a; background: rgba(255,90,90,0.07); }
.rv-fp-result { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(217,170,63,0.18); }
.rv-fp-score-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 3px; margin-bottom: 11px; padding: 12px; border: 1px solid rgba(232,179,65,.48); border-radius: 9px; background: radial-gradient(circle at 90% 25%,rgba(232,179,65,.2),rgba(116,240,210,.045) 54%,rgba(255,255,255,.018)); box-shadow: inset 0 0 22px rgba(232,179,65,.04); }
.rv-fp-score-card > div { align-self: center; display: flex; flex-direction: column; gap: 3px; }
.rv-fp-score-card span { color: var(--gold2); font-size: 11px; font-weight: 800; }
.rv-fp-score-card small { color: rgba(232,244,238,.55); font-size: 8px; line-height: 1.4; }
.rv-fp-score-card strong { color: #ffd75a; font-size: 38px; line-height: .9; text-shadow: 0 0 16px rgba(255,215,90,.22); }
.rv-fp-score-card em { color: rgba(232,179,65,.75); font-size: 12px; font-style: normal; font-weight: 700; }
.rv-fp-score-card p { grid-column: 1 / -1; margin: 7px 0 0; padding-top: 7px; border-top: 1px solid rgba(232,179,65,.13); color: rgba(216,201,168,.52); font-size: 8px; line-height: 1.55; }
.rv-fp-result-head { display: flex; flex-direction: column; gap: 3px; }
.rv-fp-result-head span { color: rgba(216,201,168,0.52); font-size: 9px; }
.rv-fp-result-head strong { font-size: 19px; }
.rv-fp-verdict { margin: 4px 0 12px; padding: 14px 15px; border: 1px solid rgba(116,240,210,.28); border-radius: 9px; background: linear-gradient(120deg,rgba(116,240,210,.095),rgba(217,170,63,.07)); text-align: center; }
.rv-fp-verdict strong { display: block; color: #f5d77f; font: 900 30px/1.15 var(--font-serif); letter-spacing: 6px; text-shadow: 0 0 18px rgba(240,200,92,.2); }
.rv-fp-verdict small { display: block; margin-top: 8px; color: rgba(232,244,238,.68); font-size: 9px; line-height: 1.65; }
.rv-fp-verdict.concentrated { border-color: rgba(228,101,83,.5); background: linear-gradient(120deg,rgba(173,50,39,.17),rgba(217,170,63,.08)); }
.rv-fp-result > p { margin: 6px 0 10px; color: rgba(232,244,238,0.7); font-size: 10px; line-height: 1.65; }
.rv-fp-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.rv-fp-metrics span,.rv-fp-deep-summary span,.rv-fp-distribution span { min-width: 0; padding: 7px 6px; border-radius: 6px; background: rgba(255,255,255,0.035); }
.rv-fp-metrics small,.rv-fp-deep-summary small,.rv-fp-distribution small { display: block; color: rgba(216,201,168,0.45); font-size: 8px; line-height: 1.35; }
.rv-fp-metrics b,.rv-fp-deep-summary b,.rv-fp-distribution b { display: block; margin-top: 2px; color: rgba(232,244,238,0.88); font-size: 12px; }
.rv-fp-deep-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.rv-fp-timing { margin-top: 6px; padding: 7px 8px; border-radius: 5px; background: rgba(255,255,255,.025); color: rgba(216,201,168,.55); font-size: 8px; line-height: 1.55; }
.rv-fp-exclusions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }.rv-fp-exclusions span { padding: 6px 7px; border-radius: 5px; background: rgba(255,255,255,.025); color: rgba(216,201,168,.52); font-size: 8px; }.rv-fp-exclusions b { float: right; color: rgba(232,244,238,.82); }
.rv-fp-phases { border: 1px solid rgba(217,170,63,0.16); border-radius: 7px; overflow: hidden; }
.rv-fp-phase { display: grid; grid-template-columns: 44px repeat(3,1fr); gap: 4px; padding: 7px 8px; font-size: 8px; }
.rv-fp-phase + .rv-fp-phase { border-top: 1px solid rgba(217,170,63,0.12); }
.rv-fp-phase strong { color: var(--gold2); font-size: 9px; }
.rv-fp-phase span { color: rgba(232,244,238,0.62); }
.rv-fp-distribution { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rv-fp-evidence { display: grid; gap: 5px; }
.rv-fp-evidence button { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid rgba(116,240,210,0.18); border-radius: 5px; background: rgba(116,240,210,0.035); color: rgba(232,244,238,0.75); text-align: left; cursor: pointer; }
.rv-fp-evidence button:hover { border-color: rgba(116,240,210,0.5); }
.rv-fp-evidence button b { color: #8cf5dc; font-size: 9px; }
.rv-fp-evidence button span,.rv-fp-evidence p { color: rgba(216,201,168,0.5); font-size: 8px; }
.rv-fp-evidence.counter button { border-color: rgba(255,154,154,0.17); background: rgba(255,90,90,0.025); }
.rv-fp-evidence.counter button b { color: #ffadad; }
.rv-fp-evidence.intervals button { border-color: rgba(232,179,65,.22); background: rgba(232,179,65,.04); }.rv-fp-evidence.intervals button b { color: var(--gold2); }
.rv-fp-method,.rv-fp-disclaimer { margin-top: 9px; padding: 8px 9px; border-radius: 5px; color: rgba(216,201,168,0.55); font-size: 9px; line-height: 1.6; }
.rv-fp-method { background: rgba(255,255,255,0.025); }
.rv-fp-method b { color: rgba(232,244,238,0.72); }
.rv-fp-disclaimer { border-left: 2px solid rgba(232,179,65,0.55); background: rgba(232,179,65,0.055); }
.rv-fp-export { width: 100%; margin-top: 13px; }
.rv-fp-narrative { padding: 10px 11px; border: 1px solid rgba(116,240,210,.17); border-radius: 7px; background: rgba(116,240,210,.035); }
.rv-fp-narrative p { margin: 0 0 7px; color: rgba(232,244,238,.72); font-size: 9px; line-height: 1.7; }
.rv-fp-narrative p:last-child { margin-bottom: 0; }
.rv-fp-verification { padding: 9px 10px; border: 1px solid rgba(57,208,255,.2); border-radius: 7px; background: rgba(57,208,255,.035); }
.rv-fp-verification > p { margin: 0 0 7px; color: rgba(232,244,238,.7); font-size: 9px; line-height: 1.6; }
.rv-fp-verification > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.rv-fp-verification span { padding: 6px 7px; border-radius: 5px; background: rgba(255,255,255,.025); color: rgba(216,201,168,.52); font-size: 8px; }
.rv-fp-verification b { float: right; color: #71ddff; }
.rv-fp-dimensions { display: grid; gap: 7px; }
.rv-fp-dimension { padding: 8px 9px; border: 1px solid rgba(217,170,63,.14); border-radius: 6px; background: rgba(255,255,255,.018); }
.rv-fp-dimension > div { display: flex; align-items: center; justify-content: space-between; color: var(--gold2); font-size: 9px; }
.rv-fp-dimension > div b { color: #8cf5dc; font-size: 12px; }
.rv-fp-dimension i { display: block; height: 3px; margin: 5px 0; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.08); }
.rv-fp-dimension i span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--gold2),#74f0d2); }
.rv-fp-dimension p { margin: 0; color: rgba(216,201,168,.46); font-size: 8px; line-height: 1.5; }
.rv-fp-limitations { margin: 0; padding: 9px 10px 9px 24px; border-left: 2px solid rgba(232,179,65,.5); border-radius: 5px; background: rgba(232,179,65,.04); }
.rv-fp-limitations li { margin: 0 0 5px; color: rgba(216,201,168,.58); font-size: 8px; line-height: 1.55; }
.rv-fp-limitations li:last-child { margin-bottom: 0; }

.rv-chartbar { height: 112px; display: flex; align-items: stretch; flex-shrink: 0; background: rgba(3,10,8,0.96); border-top: 1px solid rgba(217,170,63,0.23); }

.review-workbench-modal { width: 780px; max-width: 96vw; }
.review-workbench-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 10px 0 14px; padding: 13px 15px; border: 1px solid rgba(217,170,63,0.2); border-radius: 8px; background: rgba(116,240,210,0.045); }
.review-workbench-intro > div { display: flex; flex-direction: column; gap: 3px; }
.review-workbench-intro strong { color: var(--gold2); font-size: 13px; }
.review-workbench-intro span { color: var(--ink3); font-size: 11px; }
.review-workbench-list { max-height: min(52vh,520px); overflow-y: auto; }
.review-workbench-lobby-btn { display: none; }
.training-library-modal { width: 860px; }
.training-library-intro { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid rgba(116,240,210,.2); border-radius: 8px; background: rgba(116,240,210,.045); }
.training-library-intro strong { color: #8cf5dc; font-size: 13px; }
.training-library-intro span { color: var(--ink3); font-size: 10px; line-height: 1.6; }
.training-library-content { max-height: min(66vh,650px); overflow-y: auto; }
.training-library-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.training-library-summary strong { color: var(--gold2); font-size: 32px; line-height: 1; }
.training-library-summary span { color: var(--ink3); font-size: 9px; line-height: 1.5; }
.training-library-summary button { margin-left: auto; padding: 7px 10px; border: 1px solid rgba(116,240,210,.3); border-radius: 5px; background: rgba(116,240,210,.06); color: #8cf5dc; font-size: 9px; cursor: pointer; }
.training-library-filters { display: flex; gap: 6px; margin: -2px 0 12px; }.training-library-filters button { padding: 7px 11px; border: 1px solid rgba(217,170,63,.2); border-radius: 6px; background: rgba(255,255,255,.025); color: var(--ink3); font-size: 9px; cursor: pointer; }.training-library-filters button.on { border-color: rgba(116,240,210,.38); background: rgba(116,240,210,.08); color: #8cf5dc; }
.training-library-generator { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid rgba(232,179,65,.22); border-radius: 8px; background: rgba(232,179,65,.045); }
.training-library-generator > div { display: flex; flex-direction: column; gap: 3px; }
.training-library-generator strong { color: var(--gold2); font-size: 11px; }
.training-library-generator span { color: var(--ink3); font-size: 9px; line-height: 1.5; }
.training-library-generator label { display: flex; flex-direction: column; gap: 3px; color: var(--ink3); font-size: 8px; }
.training-library-generator select,.training-library-generator button { min-height: 32px; padding: 6px 9px; border: 1px solid rgba(217,170,63,.3); border-radius: 5px; background: #0a1813; color: var(--gold2); font-size: 9px; }
.training-library-generator button { cursor: pointer; }
.training-library-generator button:disabled,.training-library-generator select:disabled { opacity: .45; cursor: default; }
.training-library-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.training-library-card { display: flex; flex-direction: column; gap: 9px; padding: 13px; border: 1px solid rgba(217,170,63,.2); border-radius: 9px; background: rgba(4,18,13,.72); }
.training-library-card header { display: flex; justify-content: space-between; gap: 10px; }
.training-library-card header > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.training-library-card header strong { color: var(--gold2); font-size: 12px; }
.training-library-card header span { color: var(--ink3); font-size: 9px; }
.training-library-card header em { align-self: flex-start; padding: 3px 6px; border-radius: 12px; background: rgba(217,170,63,.1); color: var(--gold2); font-size: 8px; font-style: normal; white-space: nowrap; }
.training-library-card header em.status-completed { background: rgba(116,240,210,.1); color: #8cf5dc; }
.training-library-card p { flex: 1; margin: 0; color: rgba(232,244,238,.66); font-size: 10px; line-height: 1.65; }
.training-library-card dl { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin: 0; }
.training-library-card dl div { padding: 6px; border-radius: 5px; background: rgba(255,255,255,.03); }
.training-library-card dt { color: var(--ink3); font-size: 8px; }
.training-library-card dd { margin: 2px 0 0; color: rgba(232,244,238,.85); font-size: 11px; }
.training-review-due { color: var(--ink3); font-size: 8px; }.training-library-card footer { display: grid; grid-template-columns: 1.35fr 1fr .65fr; gap: 5px; }
.training-library-card footer button { padding: 7px 5px; border: 1px solid rgba(217,170,63,.3); border-radius: 5px; background: rgba(217,170,63,.08); color: var(--gold2); font-size: 8px; cursor: pointer; }
.training-library-card footer button.primary { border-color: rgba(116,240,210,.38); background: rgba(116,240,210,.08); color: #8cf5dc; }
.training-library-card footer button.danger { border-color: rgba(255,123,123,.22); color: #ffaaaa; }

/* 对弈页形势判断只展示核心摘要，不在左栏产生内部滚动。 */
body.view-game-view .analyze-floating { max-height: none; overflow: hidden; }
body.view-game-view .room-analyze-tool .analyze-card { padding: 8px; }
body.view-game-view .room-analyze-tool .analyze-panel-head { padding: 7px 9px; font-size: 11px; }
.az-compact-result { display: grid; gap: 7px; }
.az-compact-lead { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; padding: 2px 1px; }
.az-compact-lead small { color: rgba(216,201,168,0.55); font-size: 9px; }
.az-compact-lead strong { font-size: 13px; }
.az-compact-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.az-compact-metrics span { min-width: 0; padding: 5px 3px; border-radius: 4px; background: rgba(255,255,255,0.035); text-align: center; }
.az-compact-metrics small { display: block; overflow: hidden; color: rgba(216,201,168,0.48); font-size: 8px; white-space: nowrap; }
.az-compact-metrics b { display: block; overflow: hidden; color: rgba(232,244,238,0.88); font-size: 11px; text-overflow: ellipsis; }
.az-wr-bar.compact { height: 7px; margin: 0; }
.az-wr-bar.compact span { min-width: 0; padding: 0; font-size: 0; }
.az-compact-territory { display: flex; justify-content: space-between; gap: 5px; color: rgba(216,201,168,0.58); font-size: 8px; }
.az-compact-territory b { color: rgba(232,244,238,0.82); }
.az-compact-result .analyze-meta { margin-top: 0; padding-top: 5px; border-top: 1px solid rgba(217,170,63,0.1); font-size: 8px; }

@media (max-width: 1180px) and (min-width: 901px) {
  .rv-workspace { grid-template-columns: 240px minmax(300px,1fr) 350px; }
  #review-title { max-width: 240px; }
  .rv-player-report-grid { grid-template-columns: 1fr; }
  .rv-story-grid { grid-template-columns: 1fr; }
  .rv-fp-mode-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .professional-review { height: auto; min-height: 100dvh; overflow-y: auto; }
  .rv-header { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
  .rv-header > div:last-child { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .rv-workspace { display: flex; flex-direction: column; overflow: visible; }
  .rv-left,.rv-right { width: 100%; height: auto; overflow: visible; border: 0; border-bottom: 1px solid rgba(217,170,63,0.2); }
  .rv-left { order: 1; }
  .rv-board-stage { order: 2; width: 100%; min-height: min(92vw,660px); padding: 10px; }
  .rv-right { order: 3; min-height: 520px; }
  .rv-analysis-controls { max-height: none; overflow: visible; }
  .rv-panel-scroll { min-height: 470px; overflow: visible; }
  .rv-chartbar { height: 104px; }
  .training-library-list { grid-template-columns: 1fr; }
  .training-library-generator { grid-template-columns: 1fr; align-items: stretch; }
  .rv-quality-breakdown { grid-template-columns:1fr; }
  .rv-opportunity-grid,.rv-profile-grid { grid-template-columns:1fr; }
  .rv-profile-grid article>div { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rv-report-branding-settings input { min-height:34px; font-size:12px; }
}

@media (max-width: 560px) {
  .rv-practice-panel { align-items: stretch; flex-direction: column; }
  .rv-practice-actions { display: grid; grid-template-columns: repeat(2,1fr); }
  .training-library-card footer { grid-template-columns: 1fr 1fr; }
  .training-library-card footer button.primary { grid-column: 1 / -1; }
  body.view-review-view #navbar {
    height: 54px;
    padding: 0 7px;
    gap: 5px;
  }
  body.view-review-view .logo {
    min-width: 0;
    width: 106px;
    flex: 0 1 106px;
  }
  body.view-review-view .nav-right,
  body.view-review-view #nav-user,
  body.view-review-view #nav-user .user-info { min-width: 0; width: auto; }
  body.view-review-view .nav-right,
  body.view-review-view #nav-user .user-info { gap: 4px; }
  body.view-review-view #nav-avatar,
  body.view-review-view #nav-super-badge { display: none !important; }
  body.view-review-view #nav-username {
    display: inline-block;
    max-width: 4.5em;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.view-review-view #nav-rank { flex-shrink: 0; font-size: 10px !important; }
  body.view-review-view #nav-user .nav-btn {
    min-width: 0;
    padding: 6px 7px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
    writing-mode: horizontal-tb;
  }
  #kifu-modal,#go-profile-modal,#batch-analysis-modal {
    align-items: flex-start;
    padding: 8px;
    overflow: hidden;
  }
  .review-workbench-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    padding: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .review-workbench-modal > .modal-title { flex: 0 0 auto; gap: 8px; }
  .review-workbench-modal #kifu-modal-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .review-workbench-modal #kifu-modal-user { display: none; }
  .review-workbench-lobby-btn {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 6px 8px;
    border: 1px solid rgba(217,170,63,0.42);
    border-radius: 5px;
    background: rgba(217,170,63,0.08);
    color: var(--gold2);
    font: 600 11px var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
  }
  .review-workbench-modal #kifu-filters { flex: 0 0 auto; }
  .review-workbench-list { flex: 1 1 auto; min-height: 0; max-height: none; }
  .rv-header { padding: 7px 9px; }
  .rv-title-wrap small,#review-result-badge { display: none; }
  #review-title { max-width: calc(100vw - 125px); font-size: 12px; }
  .rv-back { padding: 6px 8px; font-size: 10px; }
  .rv-sep { display: none; }
  .rv-product-selector { grid-template-columns: 1fr; }
  .rv-header > div:last-child .board-toggle { font-size: 10px; padding: 5px 7px; }
  .rv-left > div:first-child { padding: 9px !important; }
  .rv-player-report-grid { grid-template-columns: 1fr; }
  .rv-story-grid { grid-template-columns: 1fr; }
  .rv-fp-mode-grid { grid-template-columns: 1fr; }
  .review-workbench-intro { align-items: stretch; flex-direction: column; }
  .review-workbench-intro .modal-btn { width: 100%; }
  .az-compact-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  #game-view.game-entrance-active #player1-card,
  #game-view.game-entrance-active #player2-card,
  #game-view.game-entrance-active .room-board-area,
  #game-view.game-entrance-active .game-action-rail,
  #game-view.game-entrance-active .room-info-rail,
  #game-view.game-entrance-active .room-circuit-frame path,
  .game-entrance-overlay.is-running,
  .game-entrance-overlay.is-running * {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}

/* ===== 爱点中心面板 ===== */
.aiqi-center-modal { background: #14142a; border: 1px solid #3C3489; border-radius: 14px; overflow: hidden; }
.aiqi-center-body { padding: 16px 20px 20px; max-height: 76vh; overflow-y: auto; }
.aiqi-balance-card { background: linear-gradient(135deg, #26215C, #3C3489); border-radius: 10px; padding: 16px; margin-bottom: 14px; text-align: center; }
.aiqi-balance-label { font-size: 11px; color: #AFA9EC; margin-bottom: 4px; }
.aiqi-balance-num { font-size: 28px; color: #FAC775; font-weight: 500; }
.aiqi-balance-num small { font-size: 12px; color: #888780; font-weight: 400; }
.aiqi-balance-meta { font-size: 11px; color: #888780; margin-top: 6px; }
.aiqi-tabs { display: flex; gap: 4px; border-bottom: 1px solid #3C3489; margin-bottom: 14px; }
.aiqi-tab { background: transparent; color: #888780; border: none; border-bottom: 2px solid transparent; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.aiqi-tab.active { color: #E6E1FB; border-bottom-color: #534AB7; font-weight: 500; }
.aiqi-tab-pane { animation: none; }
.aiqi-contact-card { background: rgba(250,199,117,0.06); border: 1px solid rgba(250,199,117,0.2); border-radius: 8px; padding: 14px; margin-bottom: 14px; text-align: center; color: #E6E1FB; font-size: 13px; line-height: 1.7; }
.aiqi-wechat-line { margin-top: 6px; color: #FAC775; font-size: 14px; }
.aiqi-wechat-line strong { font-weight: 600; }
.aiqi-copy-btn { background: #534AB7; color: #E6E1FB; border: none; border-radius: 4px; padding: 2px 8px; font-size: 11px; cursor: pointer; margin-left: 6px; }
.aiqi-copy-btn:hover { background: #3C3489; }
.aiqi-contact-tip { font-size: 10px; color: #888780; margin-top: 6px; }

/* ═════════════════════════ 动态棋谱 · 浏览器本地 GIF 工作区 ═════════════════════════ */
body.view-dynamic-kifu-view {
  overflow: hidden;
  background: #04100c;
}

#dynamic-kifu-view {
  min-height: calc(100vh - 58px);
  flex-direction: column;
  color: #eaf1ed;
  background:
    radial-gradient(circle at 51% 15%, rgba(34,128,98,.16), transparent 37%),
    linear-gradient(90deg, rgba(64,207,171,.027) 1px, transparent 1px),
    linear-gradient(0deg, rgba(64,207,171,.027) 1px, transparent 1px), #04100c;
  background-size: auto, 32px 32px, 32px 32px, auto;
}

.dynamic-kifu-header {
  min-height: 92px;
  padding: 15px clamp(18px, 2.4vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(217,170,63,.27);
  background: linear-gradient(90deg, rgba(3,15,11,.98), rgba(10,38,28,.94), rgba(3,14,10,.98));
}
.dynamic-kifu-header small { color: #48d1aa; font-size: 9px; letter-spacing: 2px; }
.dynamic-kifu-header h1 { margin: 2px 0 3px; color: #f0c65b; font: 700 24px var(--font-serif); letter-spacing: 3px; }
.dynamic-kifu-header p { color: rgba(224,239,232,.58); font-size: 11px; }
.dynamic-kifu-header button,
.dynamic-btn,
.dynamic-preview-controls button,
.dynamic-cancel-btn {
  border: 1px solid rgba(217,170,63,.38);
  border-radius: 7px;
  background: rgba(217,170,63,.065);
  color: #edc961;
  font: 600 11px var(--font-sans);
  cursor: pointer;
}
.dynamic-kifu-header button { padding: 9px 14px; white-space: nowrap; }
.dynamic-kifu-header button:hover,
.dynamic-btn:hover,
.dynamic-preview-controls button:hover { border-color: rgba(217,170,63,.76); background: rgba(217,170,63,.12); }
.dynamic-kifu-header button:disabled,
.dynamic-btn:disabled { opacity: .45; cursor: not-allowed; }

.dynamic-kifu-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(230px, 285px) minmax(500px, 1fr) minmax(250px, 310px);
  overflow: hidden;
}
.dynamic-kifu-panel { min-width: 0; padding: 18px; overflow-y: auto; background: rgba(2,12,9,.78); }
.dynamic-source-panel { border-right: 1px solid rgba(217,170,63,.16); }
.dynamic-export-panel { border-left: 1px solid rgba(217,170,63,.16); }
.dynamic-panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.dynamic-panel-title > span {
  width: 31px; height: 31px; display: grid; place-items: center;
  border: 1px solid rgba(217,170,63,.45); border-radius: 8px; color: #efc65f; font: 700 9px/1 var(--font-sans);
}
.dynamic-panel-title > div { display: flex; flex-direction: column; }
.dynamic-panel-title strong { color: #f2cb69; font-size: 14px; }
.dynamic-panel-title small { margin-top: 2px; color: rgba(222,237,230,.42); font-size: 9px; }
.dynamic-field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 8px; color: rgba(226,239,232,.66); font-size: 10px; }
.dynamic-field input,
.dynamic-field select {
  width: 100%; min-width: 0; height: 38px; padding: 0 10px;
  border: 1px solid rgba(217,170,63,.25); border-radius: 7px;
  outline: 0; background: #061711; color: #e8efeb; font: 11px var(--font-sans);
}
.dynamic-field input:focus,
.dynamic-field select:focus { border-color: rgba(217,170,63,.7); box-shadow: 0 0 0 2px rgba(217,170,63,.08); }
.dynamic-btn { width: 100%; padding: 9px 11px; }
.dynamic-source-divider { position: relative; height: 27px; display: grid; place-items: center; color: rgba(226,239,232,.3); font-size: 9px; }
.dynamic-source-divider:before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(217,170,63,.13); }
.dynamic-source-divider span { position: relative; padding: 0 8px; background: #04110d; }
.dynamic-link-field { margin-top: 16px; }
.dynamic-source-summary {
  margin-top: 18px; padding: 12px; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid rgba(61,207,163,.32); border-radius: 8px; background: rgba(61,207,163,.07);
}
.dynamic-source-summary strong { color: #a9eed8; font-size: 11px; overflow-wrap: anywhere; }
.dynamic-source-summary span { color: rgba(222,237,230,.48); font-size: 9px; line-height: 1.55; }
.dynamic-source-summary.empty { border-style: dashed; border-color: rgba(217,170,63,.23); background: rgba(217,170,63,.025); }
.dynamic-source-summary.empty strong { color: rgba(232,239,235,.6); }

.dynamic-preview-panel {
  min-width: 0; min-height: 0; padding: 14px clamp(16px, 2vw, 34px) 18px;
  display: flex; flex-direction: column; align-items: center; overflow: auto;
}
.dynamic-preview-head { width: min(100%, 620px); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.dynamic-preview-head > div { min-width: 0; display: flex; flex-direction: column; }
.dynamic-preview-head small { color: #46cda7; font-size: 9px; letter-spacing: 1.5px; }
.dynamic-preview-head strong { margin-top: 2px; overflow: hidden; color: #f0c65b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dynamic-preview-head > span { flex-shrink: 0; color: #eac05a; font: 700 13px var(--font-sans); }
.dynamic-canvas-shell {
  width: min(100%, 570px); padding: 10px; border: 1px solid rgba(217,170,63,.27); border-radius: 11px;
  background: linear-gradient(145deg, rgba(16,47,36,.78), rgba(2,12,9,.94)); box-shadow: 0 18px 50px rgba(0,0,0,.32);
}
#dynamic-kifu-canvas { width: 100%; height: auto; display: block; border-radius: 5px; background: #dcb87a; }
.dynamic-preview-controls { width: min(100%, 620px); margin-top: 12px; }
.dynamic-preview-controls input { width: 100%; accent-color: #d9aa3f; }
.dynamic-preview-controls > div { margin-top: 8px; display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.dynamic-preview-controls button { padding: 7px 12px; }

.dynamic-fixed-rule {
  margin-bottom: 12px; padding: 11px 12px; display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(61,207,163,.28); border-radius: 8px; background: rgba(61,207,163,.055);
}
.dynamic-range-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }.dynamic-range-grid .dynamic-field { margin: 0 0 8px; }.dynamic-range-grid .dynamic-field span { min-height: 24px; display: flex; align-items: end; }.dynamic-range-grid input { padding: 0 7px; text-align: center; }
.dynamic-fixed-rule b { color: #f0c65b; font: 700 29px/1 var(--font-serif); }
.dynamic-fixed-rule > span { color: #dfeae5; font-size: 11px; }
.dynamic-fixed-rule small { display: block; margin-top: 3px; color: rgba(222,237,230,.43); font-size: 8px; }
.dynamic-check { margin: 12px 0; display: flex; align-items: center; gap: 8px; color: rgba(226,239,232,.72); font-size: 10px; cursor: pointer; }
.dynamic-check input { accent-color: #d9aa3f; }
.dynamic-generate-btn {
  width: 100%; margin-top: 10px; padding: 12px;
  border: 1px solid #e0ad36; border-radius: 8px; background: linear-gradient(135deg, #d49b20, #f0c555);
  color: #152018; font: 800 13px var(--font-sans); cursor: pointer;
}
.dynamic-generate-btn:disabled { filter: grayscale(.5); opacity: .42; cursor: not-allowed; }
.dynamic-cancel-btn { width: 100%; margin-top: 7px; padding: 8px; color: #ffb0a5; border-color: rgba(211,89,72,.45); }
.dynamic-cancel-btn.hidden { display: none; }
.dynamic-generate-progress { min-height: 18px; margin-top: 10px; color: #72dab9; font-size: 9px; line-height: 1.55; }
.dynamic-generate-progress.error { color: #ff9e90; }
.dynamic-gif-results { display: flex; flex-direction: column; gap: 7px; }
.dynamic-gif-results article {
  padding: 8px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid rgba(217,170,63,.18); border-radius: 7px; background: rgba(255,255,255,.025);
}
.dynamic-gif-results article > img { width: 42px; height: 49px; flex: 0 0 auto; border-radius: 4px; object-fit: cover; object-position: top; background: #dcb87a; }
.dynamic-gif-results article > div { min-width: 0; display: flex; flex-direction: column; }
.dynamic-gif-results strong { color: #e8eee9; font-size: 10px; }
.dynamic-gif-results span { color: rgba(222,237,230,.42); font-size: 8px; }
.dynamic-gif-results a {
  flex-shrink: 0; padding: 6px 8px; border: 1px solid rgba(61,207,163,.38); border-radius: 5px;
  background: rgba(61,207,163,.08); color: #7be2c1; font-size: 9px; text-decoration: none;
}
.dynamic-local-note { margin-top: 12px; color: rgba(222,237,230,.38); font-size: 8px; line-height: 1.65; }

@media (max-width: 1050px) {
  body.view-dynamic-kifu-view { overflow: auto; }
  .dynamic-kifu-workspace { grid-template-columns: 230px minmax(470px, 1fr); overflow: visible; }
  .dynamic-export-panel { grid-column: 1 / -1; border-top: 1px solid rgba(217,170,63,.16); border-left: 0; }
  .dynamic-export-panel { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
  .dynamic-export-panel .dynamic-panel-title,
  .dynamic-export-panel .dynamic-fixed-rule,
  .dynamic-export-panel .dynamic-generate-btn,
  .dynamic-export-panel .dynamic-cancel-btn,
  .dynamic-export-panel .dynamic-generate-progress,
  .dynamic-export-panel .dynamic-gif-results,
  .dynamic-export-panel .dynamic-local-note { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .rv-tier-guide-grid { grid-template-columns:1fr; }
  body.view-dynamic-kifu-view { overflow: auto; }
  #dynamic-kifu-view { min-height: calc(100dvh - 54px); }
  .dynamic-kifu-header { min-height: 74px; padding: 10px 12px; gap: 10px; }
  .dynamic-kifu-header h1 { font-size: 19px; }
  .dynamic-kifu-header p { display: none; }
  .dynamic-kifu-header button { padding: 7px 9px; font-size: 10px; }
  .dynamic-kifu-workspace { display: flex; flex-direction: column; overflow: visible; }
  .dynamic-kifu-panel { overflow: visible; padding: 14px 12px; }
  .dynamic-source-panel { border-right: 0; border-bottom: 1px solid rgba(217,170,63,.16); }
  .dynamic-preview-panel { padding: 10px 5px 14px; overflow: visible; }
  .dynamic-preview-head { padding: 0 7px; }
  .dynamic-canvas-shell { width: 100%; padding: 4px; border-radius: 7px; }
  .dynamic-preview-controls { padding: 0 7px; }
  .dynamic-export-panel { display: block; border-top: 1px solid rgba(217,170,63,.16); }
  .dynamic-panel-title { margin-bottom: 12px; }
}

/* ═══════════════ 机构复盘专用 · 教学报告工作台 ═══════════════ */
body.view-institution-view,
body.view-institution-public-view {
  background: #071510;
}

#institution-view {
  min-height: calc(100vh - 58px);
  flex-direction: column;
  color: #e9f0ec;
  background:
    radial-gradient(circle at 68% 0%, rgba(36,134,103,.16), transparent 33%),
    linear-gradient(90deg, rgba(68,216,183,.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(68,216,183,.025) 1px, transparent 1px), #06120e;
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.institution-workspace-header {
  min-height: 108px;
  padding: 20px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid rgba(217,170,63,.28);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(90deg, rgba(4,18,13,.98), rgba(10,37,27,.95), rgba(4,16,12,.98));
}
.institution-workspace-header small { color: #d8a936; letter-spacing: 2px; font-size: 10px; }
.institution-workspace-header h1 { margin-top: 3px; color: #f0c65b; font: 700 25px var(--font-serif); letter-spacing: 2px; }
.institution-workspace-header p { margin-top: 5px; color: rgba(226,239,232,.58); font-size: 12px; }
.institution-header-actions { display: flex; gap: 10px; }
.institution-header-actions button,
.institution-editor-actions button,
.institution-source-actions button,
.institution-share-box button,
.institution-share-box select,
.institution-public-toolbar button,
.institution-public-toolbar a,
.institution-wide-btn {
  border: 1px solid rgba(217,170,63,.45); border-radius: 7px; padding: 9px 14px;
  background: rgba(217,170,63,.08); color: #f2ca68; font: 600 12px var(--font-sans); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.institution-header-actions button:last-child,
.institution-editor-actions .primary,
.institution-wide-btn.primary {
  color: #152018; border-color: #d9aa3f; background: linear-gradient(135deg,#d5a02e,#f1c857);
}
.institution-workspace button:disabled,
.institution-workspace select:disabled { opacity: .42; cursor: not-allowed; }

.institution-workspace-content {
  position: relative;
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: 245px minmax(470px, 1fr) minmax(430px, 560px);
  overflow: hidden;
}
.institution-analysis-overlay { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 18px; background: rgba(1,8,6,.82); backdrop-filter: blur(8px); }
.institution-analysis-dialog { width: min(520px,94vw); padding: 18px; border: 1px solid rgba(240,200,92,.5); border-radius: 14px; background: linear-gradient(145deg,#092119,#04110d); box-shadow: 0 28px 80px rgba(0,0,0,.55),inset 0 0 32px rgba(116,240,210,.035); }
.institution-analysis-dialog header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.institution-analysis-dialog header div { display: grid; gap: 2px; }.institution-analysis-dialog header small { color: #74f0d2; font-size: 8px; letter-spacing: 2px; }.institution-analysis-dialog header strong { color: #f0c85c; font: 800 19px var(--font-serif); }.institution-analysis-dialog header em { color: #f5d77f; font: normal 800 24px var(--font-sans); }
.institution-analysis-dialog canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 9px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.institution-analysis-meter { height: 6px; margin-top: 14px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.07); }.institution-analysis-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2bbf9d,#f0c85c); transition: width .25s ease; }
.institution-analysis-dialog p { margin: 10px 0 4px; color: rgba(232,244,238,.8); font-size: 11px; line-height: 1.6; }.institution-analysis-dialog > span { color: rgba(232,244,238,.46); font-size: 9px; }
.institution-history-panel,
.institution-editor-panel,
.institution-preview-panel { min-width: 0; overflow-y: auto; }
.institution-history-panel { padding: 18px 13px; border-right: 1px solid rgba(217,170,63,.19); background: rgba(2,12,9,.8); }
.institution-editor-panel { padding: 22px clamp(18px,2.2vw,34px) 50px; border-right: 1px solid rgba(217,170,63,.16); }
.institution-preview-panel { padding: 18px; background: rgba(0,7,5,.68); }
.institution-panel-title,.institution-preview-head { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px; }
.institution-panel-title div,.institution-preview-head div { display:flex;flex-direction:column;gap:2px; }
.institution-panel-title small,.institution-preview-head small { color:rgba(226,239,232,.43);font-size:9px;letter-spacing:1px; }
.institution-panel-title strong,.institution-preview-head strong { color:#efc65f;font-size:15px; }
.institution-panel-title>span { width:26px;height:26px;display:grid;place-items:center;border:1px solid rgba(217,170,63,.35);border-radius:50%;font-size:11px;color:#efc65f; }
.institution-preview-head>span { padding:4px 9px;border-radius:12px;font-size:10px;border:1px solid rgba(217,170,63,.3);color:#d9aa3f; }
.institution-preview-head>span.confirmed { border-color:rgba(55,195,153,.5);color:#7ae7c4;background:rgba(55,195,153,.08); }
.institution-wide-btn { width:100%;margin-bottom:13px; }
.institution-history-list { display:flex;flex-direction:column;gap:8px; }
.institution-history-item { display:grid;grid-template-columns:minmax(0,1fr) 28px;border:1px solid rgba(217,170,63,.15);border-radius:8px;overflow:hidden;background:rgba(255,255,255,.025); }
.institution-history-item.active { border-color:rgba(217,170,63,.65);background:rgba(217,170,63,.1); }
.institution-history-item>button:first-child { border:0;background:none;color:inherit;text-align:left;padding:10px;cursor:pointer;display:flex;flex-direction:column;min-width:0; }
.institution-history-item strong { color:#edf4f0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.institution-history-item span,.institution-history-item small { color:rgba(226,239,232,.46);font-size:9px;margin-top:3px; }
.institution-history-item .danger { border:0;border-left:1px solid rgba(199,83,69,.18);background:none;color:rgba(246,139,126,.7);cursor:pointer; }
.institution-empty-small { padding:22px 12px;text-align:center;border:1px dashed rgba(217,170,63,.25);border-radius:8px;color:rgba(226,239,232,.45);font-size:11px;line-height:1.8; }

.institution-progress,.institution-error { position:sticky;top:0;z-index:4;margin-bottom:14px;padding:10px 12px;border-radius:7px;background:#15382c;border:1px solid rgba(73,222,176,.35);color:#91efd2;font-size:11px; }
.institution-progress-label { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.institution-progress-label b { color:var(--gold2); font-size:12px; }
.institution-progress-track { height:6px; margin-top:8px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.12); }
.institution-progress-track i { display:block; height:100%; border-radius:inherit; background:var(--green2); transition:width .25s ease; }
.analyze-quota { padding:6px 10px; color:var(--ink2); font-size:11px; background:rgba(116,240,210,.06); border-bottom:1px solid rgba(116,240,210,.16); }
.service-profile-card { display:flex; flex-direction:column; align-items:center; gap:8px; padding:24px 16px; text-align:center; color:var(--ink2); }
.service-profile-card strong { color:var(--ink); font-size:16px; }
.service-profile-card p { margin:0 0 8px; color:var(--ink3); font-size:12px; }
.service-profile-avatar { display:grid; place-items:center; width:64px; height:64px; overflow:hidden; border-radius:50%; background:var(--green); color:var(--paper); font-size:24px; }
.service-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.batch-game-row small, .profile-import-toolbar span, .profile-import-preview span, .profile-import-preview small { color:var(--ink2); }
.profile-source-link-label { display:grid; gap:6px; margin:6px 0 10px; color:var(--ink2); font-size:12px; }
.profile-source-link-label input { padding:9px 10px; border:1px solid var(--paper3); border-radius:6px; background:var(--paper); color:var(--ink); font:inherit; }
.profile-import-preview { position:relative; }
.profile-import-close { position:absolute; top:5px; right:5px; width:22px; height:22px; padding:0; border:1px solid var(--paper3); border-radius:50%; background:var(--paper); color:var(--ink2); cursor:pointer; line-height:18px; }
.profile-import-close:hover { background:var(--paper2); color:var(--green); }
.rv-fairplay-actions { display:flex; justify-content:flex-start; margin:14px 0 10px; }
.rv-fairplay-actions .modal-btn { background:#f5f8f2!important; border-color:#b8cbbb!important; color:#275b46!important; box-shadow:none!important; }
.rv-fairplay-actions .modal-btn:hover:not(:disabled) { background:#e8f0e5!important; border-color:#709880!important; }
.rv-fairplay-actions .modal-btn:disabled { background:#eef1eb!important; color:#63766b!important; border-color:#d0d9d1!important; opacity:1; }
.dynamic-generate-btn { background:var(--green2) !important; border-color:var(--green2) !important; color:var(--paper) !important; }
.institution-error { background:#40201c;border-color:rgba(236,112,93,.4);color:#ffc0b7; }
.institution-section-head { margin:26px 0 13px;padding-bottom:9px;border-bottom:1px solid rgba(217,170,63,.18);display:flex;align-items:center;justify-content:space-between;gap:14px; }
.institution-section-head:first-child { margin-top:0; }
.institution-section-head>div { display:flex;align-items:center;gap:9px; }
.institution-section-head b { width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(217,170,63,.5);border-radius:7px;color:#f0c45a;font-size:10px; }
.institution-section-head span { display:flex;flex-direction:column; }
.institution-section-head strong { color:#f1f5f2;font-size:14px; }
.institution-section-head small { color:rgba(226,239,232,.43);font-size:9px;margin-top:2px; }
.institution-section-head em { color:#d9aa3f;font-style:normal;font-size:10px; }
.institution-form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.institution-field { display:flex;flex-direction:column;gap:6px;margin-bottom:11px;color:rgba(226,239,232,.67);font-size:10px; }
.institution-required { margin-right:4px;color:#ff8f80;font:800 12px var(--font-sans); }
.institution-field.full { grid-column:1/-1; }
.institution-field input,.institution-field textarea {
  width:100%;border:1px solid rgba(217,170,63,.22);border-radius:7px;background:rgba(0,9,7,.75);color:#edf4f0;padding:10px 11px;font:12px/1.55 var(--font-sans);resize:vertical;
}
.institution-field input:focus,.institution-field textarea:focus { outline:0;border-color:rgba(217,170,63,.72);box-shadow:0 0 0 2px rgba(217,170,63,.08); }
.institution-template-group { margin: -2px 0 15px; padding: 12px; border: 1px solid rgba(55,195,153,.24); border-radius: 8px; background: rgba(55,195,153,.045); }
.institution-template-group > div:first-child { display: flex; flex-direction: column; gap: 3px; margin-bottom: 9px; }
.institution-template-group strong { color: #98ecd1; font-size: 11px; }
.institution-template-group span { color: rgba(226,239,232,.46); font-size: 9px; line-height: 1.5; }
.institution-template-actions { display: grid; grid-template-columns: minmax(150px,1fr) repeat(4,auto); gap: 6px; }
.institution-template-actions select,.institution-template-actions button { min-height: 32px; padding: 6px 8px; border: 1px solid rgba(55,195,153,.28); border-radius: 5px; background: #0b2119; color: #bcebdc; font-size: 9px; }
.institution-template-actions button { cursor: pointer; }
.institution-template-actions button.danger { border-color: rgba(199,83,69,.32); color: #ffb0a5; }
.institution-template-actions button:disabled { opacity: .42; cursor: not-allowed; }
.institution-source-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:11px; }
.institution-source-actions span { color:rgba(226,239,232,.42);font-size:9px; }
.institution-analysis-chooser { margin:10px 0 12px;padding:12px;border:1px solid rgba(217,170,63,.2);border-radius:8px;background:rgba(217,170,63,.035); }
.institution-analysis-chooser>div:first-child { display:flex;flex-direction:column;gap:3px;margin-bottom:9px; }
.institution-analysis-chooser>div:first-child strong { color:#f0ca69;font-size:11px; }
.institution-analysis-chooser>div:first-child span { color:rgba(226,239,232,.44);font-size:9px; }
.institution-analysis-products { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px; }
.institution-analysis-products button { min-width:0;padding:9px 7px;display:grid;grid-template-columns:1fr auto;gap:3px 6px;text-align:left;border:1px solid rgba(217,170,63,.22);border-radius:7px;background:#071914;color:#dce9e3;cursor:pointer; }
.institution-analysis-products button span { font-weight:700;font-size:11px; }
.institution-analysis-products button strong { color:#d9aa3f;font-size:9px;letter-spacing:1px; }
.institution-analysis-products button small { grid-column:1/-1;color:rgba(226,239,232,.4);font-size:8px; }
.institution-analysis-products button.selected { border-color:#e0b344;background:rgba(217,170,63,.12);box-shadow:0 0 0 1px rgba(217,170,63,.12); }
.institution-analysis-products button.selected span { color:#f5d47e; }
.institution-analysis-products button:disabled { filter:grayscale(.75);opacity:.4;cursor:not-allowed; }
.institution-pending-imports { margin:0 0 12px;padding:11px;border:1px solid rgba(61,207,163,.3);border-radius:8px;background:rgba(61,207,163,.055); }
.institution-pending-imports header { display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:8px; }
.institution-pending-imports header>div { display:flex;flex-direction:column;gap:2px; }
.institution-pending-imports header strong { color:#9aead2;font-size:11px; }
.institution-pending-imports header span { color:rgba(226,239,232,.45);font-size:8px; }
.institution-pending-imports header button,.institution-pending-imports article button { border:1px solid rgba(199,83,69,.3);border-radius:5px;background:rgba(199,83,69,.06);color:#ffaaa0;cursor:pointer; }
.institution-pending-imports>div { max-height:145px;overflow:auto;display:flex;flex-direction:column;gap:5px; }
.institution-pending-imports article { padding:7px 8px;display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:6px;background:rgba(0,9,7,.5); }
.institution-pending-imports article>span { min-width:0;display:flex;flex-direction:column; }
.institution-pending-imports article strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7efeb;font-size:10px; }
.institution-pending-imports article small { margin-top:2px;color:rgba(226,239,232,.4);font-size:8px; }
.institution-start-analysis { width:100%;margin-top:9px;padding:10px!important;color:#142018!important;border-color:#d9aa3f!important;background:linear-gradient(135deg,#d4a02f,#efc65a)!important;font-weight:800!important; }
.institution-sample-list { max-height:340px;overflow:auto;display:flex;flex-direction:column;gap:7px;padding-right:3px; }
.institution-sample { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px;border:1px solid rgba(217,170,63,.14);border-radius:8px;background:rgba(255,255,255,.022); }
.institution-sample.selected { border-color:rgba(55,195,153,.55);background:rgba(55,195,153,.07); }
.institution-sample>label { min-width:0;display:flex;align-items:center;gap:9px;cursor:pointer; }
.institution-sample input { accent-color:#d9aa3f; }
.institution-sample label>span:last-child { min-width:0;display:flex;flex-direction:column; }
.institution-sample strong { color:#ecf3ef;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.institution-sample small { color:rgba(226,239,232,.42);font-size:9px;margin-top:3px; }
.institution-sample select,.institution-sample>button { flex-shrink:0;border:1px solid rgba(217,170,63,.3);border-radius:5px;background:#0b2119;color:#e9c35f;padding:6px 8px;font-size:10px;cursor:pointer; }
.institution-sample-wait { padding:3px 6px;border-radius:4px;background:rgba(217,170,63,.12);color:#e9c35f;font-size:9px; }
.institution-editor-actions { position:sticky;bottom:-1px;z-index:3;margin-top:18px;padding:12px 0;display:flex;flex-wrap:wrap;gap:8px;background:linear-gradient(180deg,transparent,#06120e 18%); }
.institution-share-box { margin-top:6px;padding:13px;border:1px solid rgba(55,195,153,.28);border-radius:9px;background:rgba(55,195,153,.055);display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.institution-share-box.locked { border-color:rgba(217,170,63,.18);background:rgba(217,170,63,.035); }
.institution-share-box>div { flex:1;min-width:200px;display:flex;flex-direction:column; }
.institution-share-box strong { font-size:12px;color:#a8f1da; }.institution-share-box span { font-size:9px;color:rgba(226,239,232,.46);margin-top:3px; }
.institution-share-box input { flex:1;min-width:230px;border:1px solid rgba(55,195,153,.25);border-radius:6px;background:#06130f;color:#bcddcf;padding:8px;font-size:10px; }
.institution-share-box .danger { color:#ffb0a5;border-color:rgba(199,83,69,.4); }.institution-share-box>small { width:100%;color:rgba(226,239,232,.4);font-size:9px; }

/* 家长报告纸张：屏幕与打印共用同一信息层级 */
.institution-report-paper { color:#17231e;background:#fbfaf6;border-radius:5px;box-shadow:0 16px 38px rgba(0,0,0,.28);overflow:hidden;font:12px/1.7 var(--font-sans); }
.institution-report-cover { min-height:270px;padding:35px 34px;color:#fff;background:radial-gradient(circle at 82% 12%,rgba(68,216,183,.24),transparent 30%),linear-gradient(145deg,#061a13,#123c2d 68%,#071813);position:relative; }
.institution-report-cover:after { content:"";position:absolute;inset:14px;border:1px solid rgba(235,192,87,.26);pointer-events:none; }
.institution-report-brand { display:flex;align-items:baseline;gap:9px;color:#f2ce70;position:relative;z-index:1; }.institution-report-brand>span { font-size:8px;letter-spacing:1px; }.institution-report-brand>strong { font:700 19px var(--font-serif);letter-spacing:2px; }.institution-report-brand>small { margin-left:auto;color:rgba(255,255,255,.55);font-size:8px; }
.institution-report-cover>p { position:relative;z-index:1;margin-top:38px;color:#f0c65b;font-size:10px;letter-spacing:1px; }.institution-report-cover h1 { position:relative;z-index:1;margin:8px 0 30px;font:700 25px/1.35 var(--font-serif); }.institution-report-cover>div:last-child { position:relative;z-index:1;display:flex;gap:12px;flex-wrap:wrap;color:rgba(255,255,255,.65);font-size:8px; }
.institution-report-section { padding:28px 32px;border-bottom:1px solid #e5decf; }.institution-report-title { display:flex;align-items:center;gap:10px;margin-bottom:18px; }.institution-report-title>b { width:29px;height:29px;display:grid;place-items:center;border-radius:7px;background:#143d2e;color:#f1ca68;font-size:9px; }.institution-report-title>span { display:flex;flex-direction:column; }.institution-report-title strong { font:700 16px var(--font-serif);color:#16372a; }.institution-report-title small { color:#7a8982;font-size:8px;margin-top:1px; }.institution-report-title.compact { margin-bottom:12px; }
.institution-parent-summary .lead { font-size:13px;line-height:1.9;color:#233b32;border-left:4px solid #d4a331;padding:9px 13px;background:#f7f1e2; }
.institution-report-metrics { display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0; }.institution-report-metrics article { padding:12px 5px;border:1px solid #e5dece;border-radius:7px;text-align:center;background:#fff; }.institution-report-metrics strong { display:block;color:#173d2e;font-size:19px; }.institution-report-metrics span { display:block;color:#7b8882;font-size:8px;margin-top:3px; }
.institution-growth-card { padding:13px;border-radius:8px;background:#eaf6f1;border:1px solid #cde6dc; }.institution-growth-card strong { color:#17664e; }.institution-growth-card p { margin-top:3px;color:#5f746b;font-size:10px; }.institution-growth-card ul { margin:7px 0 0 18px;color:#305e4d;font-size:9px; }
.institution-table-wrap { overflow-x:auto; }.institution-report-paper table { width:100%;border-collapse:collapse; }.institution-report-paper th,.institution-report-paper td { padding:8px 7px;border:1px solid #ded7c7;text-align:left;vertical-align:top;font-size:9px; }.institution-report-paper th { color:#294c3f;background:#f2eee3; }.institution-report-note { margin-top:9px;color:#7b8782;font-size:8px; }
.institution-two-column { display:grid;grid-template-columns:1fr 1fr;gap:20px; }.institution-evidence-list { list-style:none;display:flex;flex-direction:column;gap:8px; }.institution-evidence-list li { display:flex;gap:9px;padding:10px;border-radius:7px;background:#edf7f3;border:1px solid #d7e9e2; }.institution-evidence-list.priorities li { background:#fbf3e4;border-color:#eadcc1; }.institution-evidence-list li>b { width:21px;height:21px;display:grid;place-items:center;flex-shrink:0;border-radius:50%;background:#1b765a;color:#fff;font-size:8px; }.institution-evidence-list.priorities li>b { background:#ba8030; }.institution-evidence-list li>span { display:flex;flex-direction:column; }.institution-evidence-list strong { color:#1c3a2e;font-size:10px; }.institution-evidence-list small,.institution-evidence-list em { color:#66776f;font-size:8px;font-style:normal;margin-top:3px; }
.institution-key-grid { display:grid;grid-template-columns:1fr;gap:12px; }.institution-key-position { display:grid;grid-template-columns:minmax(0,62%) minmax(180px,1fr);gap:15px;border:1px solid #ded7c7;border-radius:8px;padding:10px;background:#fff; }.institution-board-pair { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }.institution-board-pair figure { min-width:0;margin:0; }.institution-key-position canvas { width:100%;aspect-ratio:1;display:block;border-radius:5px; }.institution-board-pair figcaption { margin-top:3px;color:#718078;font-size:8px;text-align:center; }.institution-key-position>div:last-child { display:flex;flex-direction:column;justify-content:center; }.institution-key-position small { color:#78877f;font-size:8px; }.institution-key-position strong { color:#b55445;font-size:17px;margin:7px 0; }.institution-key-position p { color:#3f554c;font-size:9px;margin-bottom:7px; }.institution-key-position em { color:#147b60;font-size:9px;font-style:normal;word-break:break-word; }
.institution-teacher-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px; }.institution-teacher-grid article,.institution-teacher-comment { padding:13px;border-radius:8px;background:#edf7f3;border:1px solid #d4e9e1; }.institution-teacher-grid article:last-child { background:#fbf3e4;border-color:#eadcc1; }.institution-teacher-grid strong,.institution-teacher-comment strong { color:#1e4f3d;font-size:10px; }.institution-teacher-grid p,.institution-teacher-comment p { color:#53685f;font-size:9px;margin-top:5px; }.institution-teacher-comment { margin-top:10px;background:#f4f1e9;border-color:#e1dbc9; }
.institution-report-footer { padding:25px 32px 32px;color:#aebdb6;background:#0a2018; }.institution-report-footer strong { color:#eac45f; }.institution-report-footer p { margin-top:7px;font-size:8px; }.institution-report-footer small { display:block;margin-top:8px;color:#e5b8ae;font-size:8px; }
.institution-preview-empty { min-height:620px;padding:90px 36px;text-align:center;background:linear-gradient(160deg,#f9f5ea,#fff); }.institution-preview-empty>span { width:62px;height:62px;display:grid;place-items:center;margin:auto;border-radius:15px;background:#153d2e;color:#edc55f;font:700 27px var(--font-serif); }.institution-preview-empty h2 { margin:19px 0 9px;font:700 22px var(--font-serif);color:#1c3c30; }.institution-preview-empty p { color:#687870;line-height:1.9; }.institution-preview-empty ol { display:inline-block;margin-top:22px;text-align:left;color:#53675e;line-height:2; }

#institution-public-view { min-height:100vh;padding:24px;background:linear-gradient(145deg,#061510,#0d2e22); }
.institution-public-route #auth-view,.institution-public-route #navbar { display:none!important; }
.institution-public-route #institution-public-view { display:block!important; }
body.view-institution-public-view #navbar { display:none; }
.institution-public-content { max-width:900px;margin:0 auto; }.institution-public-toolbar { position:sticky;top:12px;z-index:10;margin-bottom:14px;padding:12px 15px;border:1px solid rgba(217,170,63,.32);border-radius:9px;background:rgba(5,21,15,.94);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:space-between;gap:15px;color:#edf4f0;box-shadow:0 8px 24px rgba(0,0,0,.25); }.institution-public-toolbar>div:first-child { display:flex;flex-direction:column; }.institution-public-toolbar strong { color:#efc65f; }.institution-public-toolbar span { color:rgba(231,242,236,.5);font-size:9px;margin-top:2px; }.institution-public-toolbar>div:last-child { display:flex;gap:8px; }.institution-report-public { max-width:794px;margin:0 auto; }.institution-public-error { max-width:600px;margin:15vh auto;padding:40px;border:1px solid rgba(217,170,63,.35);border-radius:12px;background:#0b241a;color:#eaf1ed;text-align:center; }.institution-public-error h1 { color:#efc65f;margin-bottom:10px; }

@media (max-width: 1280px) {
  .institution-workspace-content { grid-template-columns:220px minmax(440px,1fr);overflow:auto; }
  .institution-preview-panel { grid-column:1/-1;padding:24px max(24px,calc((100% - 820px)/2));border-top:1px solid rgba(217,170,63,.18); }
  .institution-history-panel,.institution-editor-panel { max-height:calc(100vh - 166px); }
}
@media (max-width: 760px) {
  body.view-institution-view #navbar { display:none; }
  #institution-view { min-height:100vh; }
  .institution-workspace-header { align-items:flex-start;padding:15px; }.institution-workspace-header p { max-width:65vw; }.institution-header-actions { flex-direction:column; }.institution-workspace-content { display:block;overflow:visible; }.institution-history-panel,.institution-editor-panel,.institution-preview-panel { max-height:none;overflow:visible;border:0;padding:15px; }.institution-history-panel { border-bottom:1px solid rgba(217,170,63,.18); }.institution-history-list { max-height:200px;overflow:auto; }.institution-form-grid { grid-template-columns:1fr; }.institution-template-actions { grid-template-columns:1fr 1fr; }.institution-template-actions select { grid-column:1/-1; }.institution-sample { align-items:flex-start; }.institution-sample>label { flex:1; }.institution-editor-actions { position:static;background:none; }.institution-preview-panel { border-top:1px solid rgba(217,170,63,.2); }.institution-report-section { padding:22px 18px; }.institution-report-cover { padding:30px 21px; }.institution-report-metrics { grid-template-columns:repeat(2,1fr); }.institution-two-column,.institution-teacher-grid { grid-template-columns:1fr; }.institution-key-position { grid-template-columns:1fr; }.institution-board-pair { grid-template-columns:1fr 1fr; }.institution-public-view { padding:8px!important; }.institution-public-toolbar { top:5px;align-items:flex-start; }.institution-public-toolbar>div:last-child { flex-direction:column; }.institution-report-cover h1 { font-size:21px; }.institution-report-paper th,.institution-report-paper td { min-width:80px; }
}

@media print {
  @page { size:A4; margin:12mm; }
  body.institution-printing { background:#fff!important;overflow:visible!important; }
  body.institution-printing #navbar,
  body.institution-printing .institution-workspace-header,
  body.institution-printing .institution-history-panel,
  body.institution-printing .institution-editor-panel,
  body.institution-printing .institution-preview-head { display:none!important; }
  body.institution-printing #institution-view { display:block!important;background:#fff!important;min-height:0!important; }
  body.institution-printing .institution-workspace-content { display:block!important;overflow:visible!important; }
  body.institution-printing .institution-preview-panel { display:block!important;padding:0!important;overflow:visible!important; }
  body.institution-printing .institution-report-paper,
  body.view-institution-public-view .institution-report-paper { box-shadow:none!important;border-radius:0!important; }
  body.view-institution-public-view #institution-public-view { padding:0!important;background:#fff!important; }
  body.view-institution-public-view .institution-public-toolbar { display:none!important; }
  .institution-report-section,.institution-key-position,.institution-teacher-grid article,.institution-growth-card { break-inside:avoid;page-break-inside:avoid; }
  .institution-report-cover { break-after:page;page-break-after:always; }
}
.aiqi-packages-title { font-size: 12px; color: #AFA9EC; margin-bottom: 8px; font-weight: 500; }
.aiqi-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.aiqi-pkg-card { position: relative; background: #26215C; border: 1px solid #3C3489; border-radius: 8px; padding: 10px 4px; text-align: center; }
.aiqi-pkg-card.recommended { background: rgba(83,74,183,0.15); border-color: #534AB7; }
.aiqi-pkg-badge { position: absolute; top: -6px; right: 4px; font-size: 8px; background: #534AB7; color: #E6E1FB; padding: 1px 5px; border-radius: 6px; }
.aiqi-pkg-yuan { font-size: 15px; color: #FAC775; font-weight: 500; }
.aiqi-pkg-coins { font-size: 10px; color: #AFA9EC; margin-top: 2px; }
.aiqi-pkg-label { font-size: 9px; color: #888780; margin-top: 2px; }
.aiqi-tips { font-size: 10px; color: #5F5E5A; line-height: 1.8; padding: 10px; background: rgba(255,255,255,0.02); border-radius: 6px; margin-bottom: 14px; }
.aiqi-ok-btn { width: 100%; padding: 10px; background: #534AB7; color: #E6E1FB; border: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.aiqi-ok-btn:hover { background: #3C3489; }
.aiqi-bill-filter { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.aiqi-filter-tab { background: #26215C; color: #AFA9EC; border: 1px solid #3C3489; border-radius: 12px; padding: 4px 12px; font-size: 11px; cursor: pointer; }
.aiqi-filter-tab.active { background: #534AB7; color: #E6E1FB; border-color: #534AB7; }
.aiqi-bill-summary { display: flex; gap: 14px; font-size: 11px; margin-bottom: 10px; padding: 8px 10px; background: rgba(255,255,255,0.02); border-radius: 6px; }
.aiqi-bill-summary .inc { color: #97C459; }
.aiqi-bill-summary .exp { color: #F0997B; }
.aiqi-bill-summary .net { color: #FAC775; }
.aiqi-bill-list { border-top: 1px solid #26215C; }
.aiqi-bill-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #26215C; }
.aiqi-bill-icon { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.04); display: flex; align-items: center; justify-content: center; margin-right: 10px; font-size: 12px; font-weight: 600; }
.aiqi-bill-info { flex: 1; min-width: 0; }
.aiqi-bill-reason { font-size: 13px; color: #E6E1FB; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiqi-bill-time { font-size: 10px; color: #888780; margin-top: 2px; }
.aiqi-bill-amount { font-size: 14px; font-weight: 500; min-width: 60px; text-align: right; }
.aiqi-bill-bal { font-size: 10px; color: #5F5E5A; min-width: 56px; text-align: right; }
.aiqi-bill-loading, .aiqi-bill-empty { text-align: center; color: #888780; font-size: 12px; padding: 24px 0; }
.aiqi-bill-pager { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; font-size: 11px; color: #888780; }
.aiqi-bill-pager button { background: #26215C; color: #AFA9EC; border: 1px solid #3C3489; border-radius: 6px; padding: 4px 12px; font-size: 11px; cursor: pointer; }
.aiqi-bill-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.mp-coin-btn { background: #534AB7; color: #E6E1FB; border: none; border-radius: 4px; padding: 2px 10px; font-size: 11px; cursor: pointer; margin-left: 8px; }
.mp-coin-btn:hover { background: #3C3489; }

/* ===== 后台爱点充值管理 ===== */
.admin-action-btn.coin { background: #854F0B; color: #FAEEDA; border: 1px solid #854F0B; }
.admin-action-btn.coin:hover { background: #633806; }

/* 文档需求：独立AI鉴定、我的对局与按时计费操作。 */
.fairplay-workspace {
  min-height: calc(100vh - 58px);
  padding: 18px;
  background: radial-gradient(circle at 70% 15%, rgba(30, 114, 89, .14), transparent 38%), #03120e;
  color: var(--ink);
}
.fairplay-workspace-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1440px; margin: 0 auto 14px; padding: 16px 20px;
  border: 1px solid rgba(200,146,42,.32); border-radius: 10px; background: rgba(4,27,21,.94);
}
.fairplay-workspace-header small { color: var(--mint); letter-spacing: 1px; }
.fairplay-workspace-header h1 { margin: 3px 0; color: var(--gold2); font-family: var(--font-serif); }
.fairplay-workspace-header p { margin: 0; color: var(--ink3); font-size: 12px; }
.fairplay-workspace-header button,
.fairplay-source-panel > button {
  border: 1px solid rgba(200,146,42,.45); border-radius: 7px; padding: 9px 14px;
  background: rgba(16,48,38,.9); color: var(--gold3); cursor: pointer;
}
.fairplay-workspace-main {
  display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 14px;
  max-width: 1440px; margin: auto;
}
.fairplay-source-panel,
.fairplay-analysis-stage {
  border: 1px solid rgba(200,146,42,.28); border-radius: 10px; background: rgba(4,25,19,.96); padding: 16px;
}
.fairplay-source-panel h2 { margin: 0 0 12px; color: var(--gold2); font-size: 17px; }
.fairplay-source-panel label { display: grid; gap: 5px; margin: 12px 0 8px; color: var(--ink3); font-size: 11px; }
.fairplay-source-panel input { min-width: 0; padding: 9px; border: 1px solid rgba(200,146,42,.3); border-radius: 6px; background: #071a14; color: var(--ink); }
.fairplay-game-list { display: grid; gap: 7px; margin-top: 18px; max-height: 58vh; overflow: auto; }
.fairplay-game-list h3 { margin: 0 0 4px; color: var(--ink2); font-size: 12px; }
.fairplay-game-row { display: grid; gap: 3px; width: 100%; text-align: left; padding: 10px; border: 1px solid rgba(116,240,210,.2); border-radius: 7px; background: rgba(8,39,30,.8); color: var(--ink); cursor: pointer; }
.fairplay-game-row span { color: var(--ink3); font-size: 10px; }
.fairplay-current-summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid rgba(116,240,210,.2); border-radius: 7px; color: var(--ink3); }
.fairplay-current-summary strong { color: var(--gold2); }
.fairplay-analysis-stage #rv-fairplay-content { max-width: 980px; margin: auto; }
.rv-analysis-run-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.rv-analysis-pdf { width: 100%; min-height: 36px; border-color: rgba(116,240,210,.34)!important; background: linear-gradient(135deg,rgba(24,106,82,.25),rgba(217,170,63,.08))!important; color: #9cefd7!important; }
.rv-analysis-pdf:disabled { border-color: rgba(255,255,255,.08)!important; background: rgba(255,255,255,.025)!important; color: rgba(226,239,232,.28)!important; cursor: not-allowed; }
.rv-tool-btn.danger { border-color: rgba(255,123,123,.55); color: #ffaaaa; }
.rv-tool-btn.hidden { display: none !important; }
.my-games-workspace-modal { width: min(820px, 94vw); }
.my-games-workspace-note { margin: 0 0 12px; color: var(--ink3); font-size: 12px; }
.saved-games-list { display: grid; gap: 10px; max-height: 68vh; overflow: auto; }
.saved-game-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px; border: 1px solid rgba(200,146,42,.28); border-radius: 8px; background: rgba(8,34,26,.86); }
.saved-game-card > div { display: grid; gap: 4px; }
.saved-game-card > div > span { width: max-content; padding: 2px 8px; border-radius: 10px; background: rgba(232,179,65,.16); color: var(--gold2); font-size: 10px; }
.saved-game-card small { color: var(--ink3); }
.saved-game-card footer { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.saved-game-card button { border: 1px solid rgba(200,146,42,.42); border-radius: 6px; padding: 8px 11px; background: rgba(12,48,37,.9); color: var(--ink); cursor: pointer; }
.saved-game-card button.primary { color: var(--gold2); }
.saved-game-card button.danger { color: #ffaaaa; border-color: rgba(255,123,123,.42); }
.game-result-badge.suspended { background: rgba(232,179,65,.16); color: var(--gold2); }
.icon-pause::before { content: 'Ⅱ'; font-weight: 900; letter-spacing: 1px; }

@media (max-width: 760px) {
  .fairplay-workspace { padding: 8px; }
  .fairplay-workspace-header { align-items: flex-start; padding: 12px; }
  .fairplay-workspace-header p { display: none; }
  .fairplay-workspace-main { grid-template-columns: 1fr; }
  .fairplay-source-panel { max-height: none; }
  .fairplay-game-list { max-height: 34vh; }
  .fairplay-current-summary { flex-direction: column; }
  .saved-game-card { align-items: stretch; flex-direction: column; }
  .saved-game-card footer { justify-content: stretch; }
  .saved-game-card footer button { flex: 1; }
}
.recharge-form-modal { width: min(440px, calc(100vw - 24px)); max-width: 100%; overflow: hidden; box-sizing: border-box; background: #14142a; border: 1px solid #3C3489; border-radius: 12px; padding: 20px; }
.recharge-target { font-size: 13px; color: #E6E1FB; padding: 10px 12px; background: #26215C; border-radius: 8px; margin-bottom: 14px; }
.recharge-target strong { color: #FAC775; }
.recharge-packages-title { font-size: 12px; color: #AFA9EC; margin-bottom: 8px; font-weight: 500; }
.recharge-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.recharge-pkg-btn { position: relative; background: #26215C; color: #E6E1FB; border: 1px solid #3C3489; border-radius: 8px; padding: 10px 4px; font-size: 14px; cursor: pointer; text-align: center; }
.recharge-pkg-btn small { display: block; font-size: 10px; color: #AFA9EC; margin-top: 2px; }
.recharge-pkg-btn em { position: absolute; top: -6px; right: 4px; font-size: 8px; background: #534AB7; color: #E6E1FB; padding: 1px 5px; border-radius: 6px; font-style: normal; }
.recharge-pkg-btn.recommended { background: rgba(83,74,183,0.15); border-color: #534AB7; }
.recharge-pkg-btn.selected { background: #534AB7; border-color: #AFA9EC; }
.recharge-pkg-btn:hover { border-color: #AFA9EC; }
.recharge-custom { margin-bottom: 14px; }
.recharge-custom label, .recharge-note-wrap label { display: block; font-size: 12px; color: #AFA9EC; margin-bottom: 6px; }
.recharge-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; }
.recharge-input-row input { min-width: 0; width: 100%; box-sizing: border-box; background: #26215C; border: 1px solid #3C3489; border-radius: 6px; padding: 8px 10px; color: #E6E1FB; font-size: 14px; }
.recharge-input-row span { color: #888780; font-size: 12px; }
.recharge-input-row input[readonly] { color: #FAC775; font-weight: 500; }
.recharge-note-wrap { margin-bottom: 16px; }
.recharge-note-wrap :is(input, select) { width: 100%; min-width: 0; box-sizing: border-box; background: #26215C; border: 1px solid #3C3489; border-radius: 6px; padding: 8px 10px; color: #E6E1FB; font-size: 13px; }
.admin-tx-body { padding: 12px 0; }
.admin-tx-user { font-size: 12px; color: #AFA9EC; padding: 8px 0 12px; border-bottom: 1px solid #26215C; margin-bottom: 8px; }
.admin-tx-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #26215C; font-size: 12px; }
.admin-tx-type { min-width: 36px; font-weight: 500; }
.admin-tx-reason { flex: 1; color: #E6E1FB; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-tx-time { color: #888780; font-size: 11px; min-width: 90px; }
.admin-tx-amount { min-width: 50px; text-align: right; font-weight: 500; }
.admin-tx-bal { color: #5F5E5A; font-size: 11px; min-width: 50px; text-align: right; }

/* ===== 实时观战大厅 ===== */
/* 中央区使用内容高度生成隐式网格行，禁止固定视口高度把卡片行压扁后溢出到下一模块。 */
body.view-lobby-view .lobby-main {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
}
body.view-lobby-view .lobby-handicap-panel {
  height: max-content;
  min-height: 0;
}
body.view-lobby-view .lobby-lower-grid {
  height: max-content;
}
body.view-lobby-view .live-games-card {
  min-height: 190px;
  overflow: hidden;
}
.live-games-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 132px; overflow-y: auto; }
body.view-lobby-view .lobby-lower-grid .live-games-list {grid-template-columns:1fr;}
.live-game-row {
  min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid rgba(217,170,63,.16); border-radius: 7px;
  background: rgba(8,22,18,.72);
}
.live-game-board {
  display: grid; place-items: center; min-height: 38px; border-radius: 6px;
  background: rgba(217,170,63,.12); color: var(--gold2); font-weight: 800; font-size: 12px;
}
.live-game-players { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 5px; }
.live-game-players strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,244,199,.92); font-size: 12px; }
.live-game-players em { color: rgba(232,244,238,.42); font-size: 10px; font-style: normal; }
.live-game-players small { grid-column: 1 / -1; color: rgba(232,244,238,.52); font-size: 10px; }
.live-game-row button {
  border: 1px solid rgba(141,247,223,.35); border-radius: 5px; padding: 6px 9px;
  background: rgba(46,133,111,.17); color: var(--teal2); cursor: pointer; font-size: 11px;
}
.live-game-row button:hover { background: rgba(46,133,111,.32); }
.live-games-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: rgba(232,244,238,.5); font-size: 12px; }
.spectator-status {
  margin: 0 0 12px; padding: 8px 10px; border: 1px solid rgba(141,247,223,.28);
  border-radius: 6px; background: rgba(46,133,111,.13); color: var(--teal2); font-size: 11px;
}

/* ===== 管理后台实时 AI 实例 ===== */
.ai-panel-monitor { grid-template-columns: 1fr; }
.ai-live-card { padding: 16px; }
.ai-live-summary { margin: -7px 0 12px; color: var(--ink3); font-size: 11px; }
.ai-live-table { min-width: 760px; }
.ai-live-table td { vertical-align: top; }
.ai-live-table code { color: var(--gold); font-size: 11px; }

@media (max-width: 760px) {
  body.view-lobby-view .lobby-handicap-panel { height: max-content; min-height: 0; }
  .live-games-list { grid-template-columns: 1fr; }
  .live-game-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
}

@media (max-width: 520px) {
  body.view-lobby-view #navbar,
  body.view-game-view #navbar { padding: 0 8px; gap: 8px; }
  body.view-lobby-view .logo,
  body.view-game-view .logo {
    min-width: 0;
    width: 110px;
    flex: 0 1 110px;
  }
  body.view-game-view .logo::after,
  body.view-game-view #nav-user::before { display: none; }
  body.view-lobby-view .nav-right,
  body.view-lobby-view #nav-user,
  body.view-lobby-view #nav-user .user-info,
  body.view-game-view .nav-right,
  body.view-game-view #nav-user,
  body.view-game-view #nav-user .user-info { min-width: 0; width: auto; }
  body.view-lobby-view .nav-right,
  body.view-lobby-view #nav-user .user-info,
  body.view-game-view .nav-right,
  body.view-game-view #nav-user .user-info { gap: 5px; }
  body.view-lobby-view #nav-username,
  body.view-lobby-view #nav-rank,
  body.view-lobby-view #nav-super-badge,
  body.view-lobby-view #myprofile-nav-btn,
  body.view-game-view #nav-username,
  body.view-game-view #nav-rank,
  body.view-game-view #nav-super-badge,
  body.view-game-view #myprofile-nav-btn { display: none !important; }
  body.view-lobby-view #nav-user .nav-btn,
  body.view-game-view #nav-user .nav-btn { padding: 5px 7px; font-size: 11px; }
  body.view-lobby-view .challenge-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }
  body.view-lobby-view .challenge-panel-head h2 { white-space: nowrap; }
  body.view-lobby-view .handicap-guide-inline {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    white-space: normal;
  }
  body.view-lobby-view .challenge-panel-head .lobby-ghost-btn {
    grid-column: 2;
    grid-row: 1;
  }
}

/* 手机端：让子挑战九宫格与紧凑完整的双方信息条。仅覆盖手机宽度，不改变电脑端。 */
@media (max-width: 620px) {
  body.view-lobby-view .handicap-grade-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body.view-lobby-view .handicap-grade-card {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 474 / 253;
  }

  body.view-lobby-view .handicap-card-art {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  body.view-lobby-view .handicap-rules-card {
    display: none;
  }

  body.view-game-view .game-table-shell {
    order: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-items: stretch;
    justify-items: stretch;
    gap: 8px;
    padding: 8px 4px 10px;
  }

  body.view-game-view .game-action-rail { order: 2; }
  body.view-game-view .room-info-rail { order: 3; }

  body.view-game-view #player1-card.room-player-slot,
  body.view-game-view #player2-card.room-player-slot {
    grid-column: 1;
    width: 100%;
    max-width: none;
  }

  body.view-game-view #player1-card.room-player-slot { grid-row: 1; }
  body.view-game-view #player2-card.room-player-slot { grid-row: 2; }

  body.view-game-view .room-board-area {
    grid-column: 1;
    grid-row: 3;
    height: min(660px, calc(100vw + 40px));
    min-height: 0;
    padding: 0 0 42px;
    overflow: hidden;
  }

  body.view-game-view #go-board {
    max-width: calc(100vw - 8px);
    max-height: none;
    border-radius: 5px;
    touch-action: none;
    box-shadow:
      0 14px 30px rgba(0,0,0,0.48),
      0 0 0 4px rgba(133,90,42,0.36),
      inset 0 0 0 1px rgba(255,255,255,0.10);
  }

  body.view-game-view .board-toolbar {
    bottom: 2px;
    padding: 5px 6px;
  }

  body.view-game-view .board-touch-guide.active {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(260px, calc(100% - 40px));
    padding: 18px 20px 15px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,218,103,0.88);
    border-radius: 14px;
    background: rgba(5,20,16,0.94);
    box-shadow: 0 16px 42px rgba(0,0,0,0.58), 0 0 0 2px rgba(207,160,49,0.16);
    color: #ffe192;
    pointer-events: none;
  }

  body.view-game-view .board-touch-guide strong {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(255,203,65,0.22);
  }

  body.view-game-view .board-touch-guide label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    color: #d8cda9;
    font: 500 13px var(--font-sans);
    pointer-events: auto;
  }

  body.view-game-view .board-touch-guide input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #d6aa3f;
  }

  body.view-game-view .room-turn-indicator {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
  }

  body.view-game-view .room-player-card {
    min-height: 66px;
    padding: 7px 8px;
    grid-template-columns: 38px 30px minmax(0, 1fr) 78px 48px;
    grid-template-rows: minmax(22px, auto) minmax(22px, auto);
    grid-template-areas:
      "color stone name clock foot"
      "color stone rank clock captures";
    align-content: center;
    align-items: center;
    justify-items: start;
    gap: 2px 6px;
  }

  body.view-game-view .room-player-color {
    grid-area: color;
    justify-self: center;
    font-size: 14px;
    line-height: 17px;
    white-space: nowrap;
  }

  body.view-game-view .room-player-stone {
    grid-area: stone;
    width: 28px;
    height: 28px;
    justify-self: center;
    box-shadow: 0 0 0 2px rgba(116,240,210,0.20), 0 5px 10px rgba(0,0,0,0.30);
  }

  body.view-game-view .room-player-name {
    grid-area: name;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
  }

  body.view-game-view .room-player-rank {
    grid-area: rank;
    width: 100%;
    min-width: 0;
    min-height: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10px;
  }

  body.view-game-view .room-player-card .seat-clock-card {
    grid-area: clock;
    align-self: stretch;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 5px 4px;
    gap: 2px;
  }

  body.view-game-view .room-player-card .seat-clock-card strong {
    font-size: 17px;
  }

  body.view-game-view .room-player-card .seat-clock-card em {
    margin-top: 1px;
    font-size: 9px;
    white-space: nowrap;
  }

  body.view-game-view .room-player-foot {
    grid-area: foot;
    min-width: 0;
    padding: 0;
    border-top: 0;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body.view-game-view .room-captures {
    grid-area: captures;
    justify-self: center;
    font-size: 10px;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  body.view-game-view .room-player-name { font-size: 11px; }
  body.view-game-view .room-player-rank { font-size: 9px; }
}

/* 手机首页：保留常用功能导航，信息模块按使用频率形成单列稳定顺序。 */
@media (max-width: 620px) {
  body.view-lobby-view .lobby-home-nav {
    display: none;
  }

  body.view-lobby-view .lobby-main > .lobby-nav-rail {
    order: 0;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    border: 1px solid rgba(217,170,63,0.22);
    border-radius: 8px;
  }

  body.view-lobby-view .mobile-lobby-modules {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.view-lobby-view .mobile-lobby-modules > .mobile-ordered-module {
    width: auto;
    height: auto;
    min-height: 190px;
    margin: 0;
  }

  body.view-lobby-view .mobile-lobby-modules > .online-card,
  body.view-lobby-view .mobile-lobby-modules > .current-games-card {
    padding: 12px;
  }

  body.view-lobby-view .mobile-lobby-modules #online-users-list,
  body.view-lobby-view .mobile-lobby-modules #my-games-list,
  body.view-lobby-view .mobile-lobby-modules .live-games-list {
    height: auto;
    max-height: 320px;
  }

  body.view-lobby-view .lobby-lower-grid,
  body.view-lobby-view .lobby-side-panel {
    display: none !important;
  }
}
/* 个人棋谱智能检索 */
.kifu-advanced-filters {
  margin: 10px 0 4px;
  border: 1px solid rgba(201, 146, 42, .35);
  border-radius: 8px;
  background: rgba(4, 25, 20, .72);
  color: var(--ink2);
}
.kifu-advanced-filters summary { cursor: pointer; padding: 10px 12px; color: var(--gold2); font-weight: 700; }
.kifu-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 9px; padding: 0 12px 12px; }
.kifu-filter-grid label { display: grid; gap: 5px; font-size: 11px; color: var(--ink3); }
.kifu-filter-grid select, .kifu-filter-grid input {
  min-width: 0; width: 100%; padding: 7px 8px; border-radius: 6px;
  border: 1px solid var(--paper3); background: var(--paper); color: var(--ink);
}
@media (max-width: 720px) {
  .kifu-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.game-pause-notice {
  position: absolute; z-index: 30; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  display: grid; gap: 6px; min-width: 220px; padding: 16px 22px; text-align: center;
  border: 1px solid var(--gold); border-radius: 10px; background: rgba(2, 18, 14, .94);
  color: var(--gold2); box-shadow: 0 12px 38px rgba(0,0,0,.45); pointer-events: none;
}
.game-pause-notice strong { font-size: 20px; }
.game-pause-notice span { color: var(--ink2); font-size: 12px; }
.admin-game-timeline { display: grid; gap: 8px; max-height: 55vh; overflow: auto; text-align: left; }
.admin-game-event { display: grid; grid-template-columns: 120px 100px minmax(0,1fr); gap: 8px; padding: 8px; border-bottom: 1px solid var(--paper3); font-size: 12px; }
.admin-game-event time { color: var(--ink3); }
.admin-game-event strong { color: var(--gold2); }
.admin-game-event span { color: var(--ink2); }

/* Hide economy surfaces until the server explicitly enables them. */
html:not([data-economy="on"]) [data-economy-only] { display: none !important; }
#admin-coins .finance-toolbar { flex-wrap: wrap; }
#admin-coins .fin-field { min-width: 0; max-width: 100%; }
#admin-coins select, #admin-coins input { max-width: 100%; }
#admin-coins details { margin: 18px 0; padding: 14px; border: 1px solid var(--paper3); border-radius: 10px; }
#admin-coins p, #coin-account-balances, #coin-status { overflow-wrap: anywhere; line-height: 1.7; font-size: 13px; }
@media (max-width: 640px) { #admin-coins .finance-toolbar { align-items: stretch; } #admin-coins .fin-field { width: 100%; } #admin-coins .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }

/* Compact voice workspace: no empty report area, no duplicate analysis controls. */
body.voice-review-mode .voice-review-narrative { flex:0 0 auto; min-height:0; margin-bottom:12px; }
body.voice-review-mode .voice-review-panel { flex:0 0 auto; overflow:visible; }
body.voice-review-mode .rv-right { min-height:0; overflow:auto; }
body.voice-review-mode #rv-engine-btn,body.voice-review-mode .board-toggle[onclick="openLizzieSettings()"],body.voice-review-mode #review-toggle-movenum,body.voice-review-mode .rv-sep { display:none; }
.voice-review-panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px; border-bottom:1px solid #405744; }
.voice-review-panel-head > div { display:grid; gap:5px; }
.voice-review-panel-head small { color:#89ad98; font-size:9px; letter-spacing:1.2px; }
.voice-review-panel-head strong { color:#d9c18b; font-size:17px; }

#voice-board-playback { position:absolute; bottom:3px; left:50%; transform:translateX(-50%); z-index:12; display:flex; gap:8px; padding:4px; background:#102f20; border-radius:8px; }
#voice-board-playback[hidden] { display:none!important; }
#voice-board-playback button { border:1px solid #708564; border-radius:6px; color:#e3d3a4; background:#173a28; padding:8px 12px; cursor:pointer; white-space:nowrap; }

.voice-ask-panel[hidden] { display:none!important; }
.voice-plan-detail { margin:10px 0; padding:12px; border:1px solid var(--border, #526047); border-radius:10px; line-height:1.75; }

/* Voice review: readable guidance in the site's light palette. */
html[data-theme="light"] body.voice-review-mode .voice-analyze-hint,
html[data-theme="light"] body.voice-review-mode .voice-plan-intro,
html[data-theme="light"] body.voice-review-mode .voice-plan-detail { color:#385849; }
html[data-theme="light"] body.voice-review-mode .voice-review-narrative { background:#f3f6ee; }
html[data-theme="light"] body.voice-review-mode .voice-review-narrative p,
html[data-theme="light"] body.voice-review-mode .voice-review-narrative section p,
html[data-theme="light"] body.voice-review-mode .voice-review-narrative footer { color:#385849; }
html[data-theme="light"] body.voice-review-mode .voice-review-narrative h3 { color:#80601e; }
body.voice-review-mode .voice-review-narrative:empty { display:none; }
/* 分析算力只在用户点击开始后显示，避免长期占用复盘工作区。 */
.analysis-tier-modal-panel { width:min(680px,94vw); padding:0; overflow:hidden; }
.analysis-tier-title-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px 14px; }
.analysis-tier-title-row > div { display:grid; gap:4px; }
.analysis-tier-title-row small { color:var(--ink3); font-size:10px; letter-spacing:.14em; }
.analysis-tier-title-row strong { color:var(--ink); font-size:20px; }
.analysis-tier-description,.analysis-tier-footnote { margin:0; padding:0 20px 14px; color:var(--ink3); font-size:12px; line-height:1.7; }
.analysis-tier-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:4px 20px 16px; }
.analysis-tier-loading { grid-column:1/-1; padding:28px; color:var(--ink3); text-align:center; border:1px dashed var(--paper3); border-radius:12px; }
.analysis-tier-option { min-width:0; min-height:132px; padding:16px; text-align:left; color:var(--ink); background:var(--paper2); border:1px solid var(--paper3); border-radius:13px; cursor:pointer; }
.analysis-tier-option:hover:not(:disabled) { transform:translateY(-1px); border-color:var(--gold); }
.analysis-tier-option:disabled { cursor:not-allowed; opacity:.68; }
.analysis-tier-option-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:14px; white-space:normal; }
.analysis-tier-option-head b { font-size:16px; }
.analysis-tier-option-head i { display:block; margin-top:4px; color:var(--gold); font-size:11px; font-style:normal; letter-spacing:.08em; }
.analysis-tier-option-head em { flex:0 0 auto; padding:4px 8px; border-radius:999px; font-size:11px; font-style:normal; font-weight:700; }
.analysis-tier-option small { display:block; color:var(--ink3); line-height:1.65; overflow-wrap:anywhere; }
.analysis-tier-option.is-available .analysis-tier-option-head em { color:#177245; background:rgba(41,160,102,.14); }
.analysis-tier-option.is-busy .analysis-tier-option-head em { color:#d64545; background:rgba(214,69,69,.14); }
.analysis-tier-option.is-unavailable .analysis-tier-option-head em { color:var(--ink3); background:var(--paper3); }
@media (max-width:640px) { .analysis-tier-options { grid-template-columns:1fr; } .analysis-tier-option { min-height:0; } }
/* 登录页保留底部备案；大厅备案位于主内容滚动区域末尾。 */
.site-filing-footer {
  position:fixed;
  z-index:45;
  left:50%;
  bottom:max(6px, env(safe-area-inset-bottom));
  transform:translateX(-50%);
  padding:4px 10px;
  border:1px solid rgba(154,184,164,.2);
  border-radius:999px;
  background:rgba(4,18,12,.78);
  box-shadow:0 4px 16px rgba(0,0,0,.16);
  backdrop-filter:blur(8px);
  font-size:11px;
  line-height:1.35;
  white-space:nowrap;
}
.site-filing-footer a { color:#b7c9bd; text-decoration:none; }
body:not(.auth-mode) .auth-filing-footer { display:none; }
#lobby-view .lobby-filing-footer {
  position:static;
  inset:auto;
  transform:none;
  z-index:auto;
  order:100;
  flex:0 0 auto;
  align-self:stretch;
  margin-top:auto;
  padding:18px 10px max(18px, env(safe-area-inset-bottom));
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  text-align:center;
}
html[data-theme="light"] #lobby-view .lobby-filing-footer { background:transparent; }
.site-filing-footer a:hover,
.site-filing-footer a:focus-visible { color:#dfc16e; text-decoration:underline; }
html[data-theme="light"] .site-filing-footer {
  border-color:rgba(50,91,70,.18);
  background:rgba(250,248,240,.9);
}
html[data-theme="light"] .site-filing-footer a { color:#385849; }
@media (max-width:620px) {
  .site-filing-footer { bottom:max(3px, env(safe-area-inset-bottom)); font-size:10px; padding:3px 8px; }
}
/* 复盘弹窗避免继承按钮单行省略；棋谱列表在桌面保持可读宽度。 */
.analysis-tier-modal-panel { max-height:calc(100dvh - 32px); overflow-y:auto; }
.analysis-tier-option { white-space:normal; height:auto; overflow:visible; }
.analysis-tier-option small { white-space:normal; height:auto; max-height:none; }
.institution-analysis-dialog { box-sizing:border-box; max-height:calc(100dvh - 32px); overflow-y:auto; }
.institution-analysis-dialog header { gap:12px; flex-wrap:wrap; }
.institution-analysis-dialog p,.institution-analysis-dialog > span { overflow-wrap:anywhere; }
#profile-source-options { margin:12px 0; padding:12px; border:1px solid var(--paper3); border-radius:10px; }
#profile-source-content { display:flex; flex-direction:column; gap:8px; max-height:36vh; overflow:auto; }
#profile-source-content button { white-space:normal; overflow-wrap:anywhere; text-align:left; }
@media (min-width:769px) {
  #kifu-modal .review-workbench-modal { width:min(1060px,96vw); }
  #kifu-modal .kifu-center-panel { min-width:0; width:100%; }
}
#rv-product-selector[hidden],#voice-tier-picker[hidden] { display:none !important; }

/* ── 对话讲解（语音复盘 P2/P3）：位于「当前局面后续变化」内 ── */
.voice-variation-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:8px 0; }
.voice-talk { margin-top:12px; padding:12px; border:1px solid rgba(217,170,63,.28); border-radius:12px; background:rgba(8,30,21,.55); display:flex; flex-direction:column; gap:8px; }
.voice-talk-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.voice-talk-head > div { display:flex; flex-direction:column; gap:2px; margin-right:auto; }
.voice-talk-head small { color:rgba(211,223,213,.6); font-size:11px; letter-spacing:.08em; }
.voice-talk-head strong { color:#f0ca69; font:700 16px 'Noto Serif SC',serif; }
.voice-talk-point { font-size:12px; color:rgba(211,223,213,.65); padding:3px 8px; border:1px dashed rgba(211,223,213,.3); border-radius:999px; }
.voice-talk-point.on { color:#e9fff2; background:#0a6b3c; border:1px solid #005c30; }
.voice-talk-clear { border:0; background:transparent; color:#d5c08a; font-size:12px; text-decoration:underline; cursor:pointer; padding:2px; }
.voice-talk-log { display:flex; flex-direction:column; gap:8px; max-height:300px; min-height:92px; overflow-y:auto; padding:2px 2px 4px; overscroll-behavior:contain; }
.voice-talk-empty { display:flex; flex-direction:column; gap:3px; color:rgba(211,223,213,.62); font-size:12px; line-height:1.6; padding:6px 4px; }
.voice-talk-empty b { color:#d5c08a; font-weight:600; }
.voice-talk-msg { display:flex; flex-direction:column; max-width:88%; }
.voice-talk-msg p { margin:0; padding:8px 11px; font-size:14px; line-height:1.75; border-radius:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.voice-talk-msg.me { align-self:flex-end; }
.voice-talk-msg.me p { background:#0a6b3c; color:#fff !important; border-bottom-right-radius:4px; }
.voice-talk-msg.ai { align-self:flex-start; }
.voice-talk-msg.ai p { background:#15372a; color:#e7f2ec; border:1px solid #2f5341; border-bottom-left-radius:4px; }
.voice-talk-msg.ai.error p { color:#ffd2c4; border-color:#8a4a3a; }
.voice-talk-msg.pending p { display:flex; gap:5px; align-items:center; min-height:22px; }
.voice-talk-msg.pending i { width:7px; height:7px; border-radius:50%; background:#8fc6a8; animation:voiceTalkDot 1s infinite ease-in-out; }
.voice-talk-msg.pending i:nth-child(2) { animation-delay:.15s; } .voice-talk-msg.pending i:nth-child(3) { animation-delay:.3s; }
@keyframes voiceTalkDot { 0%,80%,100% { opacity:.25; transform:translateY(0); } 40% { opacity:1; transform:translateY(-3px); } }
.voice-talk-actions { display:flex; gap:6px; align-items:center; margin-top:4px; flex-wrap:wrap; }
.voice-talk-actions button { min-height:28px; padding:3px 10px; font-size:12px; border-radius:999px; border:1px solid rgba(217,170,63,.35); background:transparent; color:#e0c77f; cursor:pointer; }
.voice-talk-actions em { font-style:normal; font-size:11px; color:rgba(211,223,213,.55); }
.voice-talk-divider { display:flex; align-items:center; gap:8px; color:rgba(211,223,213,.5); font-size:11px; }
.voice-talk-divider::before,.voice-talk-divider::after { content:''; flex:1; height:1px; background:rgba(211,223,213,.18); }
.voice-talk-chips { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:2px; }
.voice-talk-chips::-webkit-scrollbar { display:none; }
.voice-talk-chips button { flex:0 0 auto; min-height:32px; padding:5px 12px; font-size:13px; border-radius:999px; border:1px solid rgba(217,170,63,.35); background:rgba(217,170,63,.08); color:#e0c77f; cursor:pointer; white-space:nowrap; }
.voice-talk-chips button:disabled { opacity:.4; cursor:not-allowed; }
.voice-talk-input { display:flex; gap:8px; align-items:center; }
.voice-talk-input input { flex:1 1 auto; min-width:0; min-height:42px; padding:8px 12px; font-size:15px; color:#e8f2ec; background:#10291d; border:1px solid #405744; border-radius:999px; }
.voice-talk-send { flex:0 0 auto; min-height:42px; padding:0 16px; border-radius:999px; border:1px solid #005c30; background:#0a6b3c; color:#fff; font-weight:600; cursor:pointer; }
.voice-talk-send:disabled { opacity:.6; cursor:progress; }
.voice-talk-mic { position:relative; flex:0 0 auto; width:46px; height:46px; border-radius:50%; border:0; background:#0a6b3c; cursor:pointer; touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.voice-talk-mic span { position:absolute; left:50%; top:50%; width:12px; height:19px; margin:-12px 0 0 -6px; border:2.5px solid #fff; border-radius:7px; box-sizing:border-box; }
.voice-talk-mic span::after { content:''; position:absolute; left:50%; bottom:-9px; width:18px; height:8px; margin-left:-9px; border:2.5px solid #fff; border-top:0; border-radius:0 0 10px 10px; box-sizing:border-box; }
.voice-talk-mic:disabled { background:#5b6b62; cursor:not-allowed; }
.voice-talk-mic.recording { background:#c0392b; animation:voiceTalkRec 1.1s infinite; }
@keyframes voiceTalkRec { 0% { box-shadow:0 0 0 0 rgba(192,57,43,.55); } 100% { box-shadow:0 0 0 14px rgba(192,57,43,0); } }
.voice-talk-status { min-height:18px; margin:0; font-size:12px; line-height:1.5; color:rgba(211,223,213,.7); }
.voice-talk-status.listening { color:#ff8b7a; font-weight:600; }
.voice-talk-status.speaking { color:#9fe0bb; }
.voice-talk-status.warn { color:#f0b36a; }
@media (max-width:620px) {
  .voice-talk { padding:10px; margin-left:-4px; margin-right:-4px; }
  .voice-talk-log { max-height:46vh; }
  .voice-talk-msg { max-width:92%; }
  .voice-talk-chips { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .voice-talk-chips::-webkit-scrollbar { display:none; }
  .voice-talk-input { gap:6px; }
  .voice-talk-mic { width:48px; height:48px; }
  .voice-talk-input input { font-size:16px; padding:8px 10px; }
  .voice-talk-send { padding:0 12px; }
}

/* 公安备案与 ICP 备案共享显隐和主题，窄屏自动换行。 */
.site-filing-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px 14px; width:max-content; max-width:calc(100% - 24px); box-sizing:border-box; }
.site-filing-footer a { display:inline-flex; align-items:center; gap:5px; }
.site-filing-footer img { width:18px; height:20px; object-fit:contain; flex-shrink:0; }
#lobby-view .lobby-filing-footer { width:100%; max-width:100%; }

/* 收费说明默认隐藏，避免配置请求完成前闪现；同时覆盖深浅两种主题。 */
html:not([data-billing-prompts="visible"]) [data-billing-only] { display: none !important; }
/* Super-admin controls for the rotating lobby account pool. */
#admin-lobby-presence .admin-controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; padding:16px; margin:16px 0; background:var(--paper2); border:1px solid var(--paper3); border-radius:12px; }
#admin-lobby-presence .admin-controls label { display:flex; align-items:center; gap:8px; }
#admin-lobby-presence .admin-controls button { padding:9px 16px; border:1px solid #789d8d; border-radius:8px; background:#edf3ee; color:#244f42; cursor:pointer; font:inherit; }
#admin-lobby-presence input[type="checkbox"] { accent-color:#285d49; width:16px; height:16px; }
#admin-lobby-presence .admin-controls button:disabled { opacity:.65; cursor:wait; }
#admin-lobby-presence [data-lobby-feedback] { min-height:24px; }
#admin-lobby-presence [data-lobby-count] { width:110px; padding:8px; border:1px solid #789d8d; border-radius:6px; color:var(--ink); background:var(--paper); font:inherit; }
#admin-lobby-presence [data-lobby-delete] { padding:6px 12px; border:1px solid #789d8d; border-radius:6px; color:#244f42; background:#edf3ee; font:inherit; cursor:pointer; }
#admin-lobby-presence [data-lobby-delete]:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:600px) { #admin-lobby-presence .admin-controls { align-items:stretch; flex-direction:column; } }
/* Live-game entry uses an opaque dark green action in both themes. */
html[data-theme] #live-games-list .live-game-row button { background:#1b4f40 !important; background-color:#1b4f40 !important; color:#f4fff7 !important; border-color:#28604f !important; }
html[data-theme] #live-games-list .live-game-row button:hover { background:#123d31 !important; background-color:#123d31 !important; color:#fff !important; }
html[data-theme] #live-games-list .live-game-row button:focus-visible { outline:2px solid #4a9879; outline-offset:3px; }
html[data-theme] body.view-lobby-view .lobby-user-actions .invite-btn-sm:not(:disabled) { background:#d9e9df !important; background-color:#d9e9df !important; color:#164537 !important; border:1px solid #709b83 !important; opacity:1; }
html[data-theme] body.view-lobby-view .lobby-user-actions .invite-btn-sm:not(:disabled):hover { background:#eef6f1 !important; background-color:#eef6f1 !important; color:#123729 !important; }
html[data-theme="dark"] body.view-lobby-view .lobby-user-actions .invite-btn-sm:disabled { background:#223c30 !important; background-color:#223c30 !important; color:#bdd0c3 !important; border:1px solid #617769 !important; opacity:1; }
html[data-theme="light"] body.view-lobby-view .lobby-user-actions .invite-btn-sm:disabled { background:#e7ece7 !important; background-color:#e7ece7 !important; color:#64756a !important; border:1px solid #aab9ae !important; opacity:1; }
html[data-theme] body.view-lobby-view .lobby-user-actions .invite-btn-sm:focus-visible { outline:2px solid #9fd3bc; outline-offset:2px; }
html[data-theme="light"] body.view-lobby-view .online-user .invite-btn-sm.invite-declined:disabled { background:#e6e8e7 !important; background-color:#e6e8e7 !important; color:#707874 !important; border:1px solid #b9c0bc !important; opacity:1; cursor:not-allowed; }
html[data-theme="dark"] body.view-lobby-view .online-user .invite-btn-sm.invite-declined:disabled { background:#303733 !important; background-color:#303733 !important; color:#b3bbb6 !important; border:1px solid #66716a !important; opacity:1; cursor:not-allowed; }
/* Platform AI action: selected graphite-purple palette (proposal D). */
html[data-theme] body.view-lobby-view .lobby-user-actions .invite-btn-sm.ai-btn:not(:disabled) { background:linear-gradient(150deg,#60566e,#3e3748) !important; color:#f3faf7 !important; border-color:#7b7088 !important; box-shadow:inset 0 1px 0 #ffffff25,0 2px 4px #0c261015; }
html[data-theme="dark"] body.view-lobby-view .lobby-user-actions .invite-btn-sm.ai-btn:not(:disabled) { border-color:#9585a4 !important; }
html[data-theme] body.view-lobby-view .lobby-user-actions .invite-btn-sm.ai-btn:not(:disabled):hover { background:linear-gradient(150deg,#726680,#51465f) !important; color:#fff !important; }
/* Dark game-room analysis action: no gold background, text or icon. */
html[data-theme="dark"] body.view-game-view #analyze-btn { background:#d9e9df !important; background-color:#d9e9df !important; color:#164537 !important; border-color:#709b83 !important; box-shadow:none !important; }
html[data-theme="dark"] body.view-game-view #analyze-btn:not(:disabled):hover { background:#eef6f1 !important; background-color:#eef6f1 !important; color:#123729 !important; }
html[data-theme="dark"] body.view-game-view #analyze-btn .room-tool-icon { color:inherit !important; }
html[data-theme="dark"] body.view-game-view #analyze-btn:disabled { background:#223c30 !important; background-color:#223c30 !important; color:#bdd0c3 !important; border-color:#617769 !important; opacity:1; }
html[data-theme="dark"] body.view-game-view #analyze-btn:focus-visible { outline:2px solid #9fd3bc; outline-offset:2px; }
html[data-theme="dark"] body.view-game-view #analyze-btn:not(:disabled):active { background:#c4ddcf !important; color:#123729 !important; border-color:#6b9b80 !important; box-shadow:none !important; }

/* 手机落子方式与轻量确认窗：棋盘保持可见。 */
.board-touch-mode-label,.board-touch-confirm {display:none}
.board-touch-confirm.active {display:block;position:absolute;z-index:30;bottom:52px;left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(300px,calc(100% - 24px));padding:14px 16px;background:#fffdf7;color:#163d34;border:1px solid #c7d6c8;border-radius:12px;box-shadow:0 6px 24px #061d1733;text-align:center}
.board-touch-confirm strong {font-size:15px}
.board-touch-confirm>div {display:flex;gap:10px;margin-top:12px}
.board-touch-confirm button {flex:1;min-height:44px;border:1px solid #bdcbbb;border-radius:8px;background:#edf2e8;color:#163d34;font-size:14px}
.board-touch-confirm button:last-child {background:#dcebdc;font-weight:700}
@media(max-width:620px),(pointer:coarse) {.board-touch-mode-label {display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--ink)}.board-touch-mode-label select {max-width:106px;min-height:32px;border:1px solid var(--paper3);border-radius:6px;background:var(--paper);color:var(--ink);font-size:12px}}
/* 机构报告：可选“老师确认与说明”页 */
.institution-check { display:flex;align-items:center;gap:8px;margin:4px 0 12px;font-size:13px;line-height:1.5;cursor:pointer; }
.institution-check input { width:16px;height:16px;flex:none; }

/* Desktop confirmation remains independent from the phone double-tap preference. */
.board-desktop-mode-label {display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--ink)}
.board-desktop-mode-label select {max-width:106px;min-height:32px;border:1px solid var(--paper3);border-radius:6px;background:var(--paper);color:var(--ink);font-size:12px}
@media(max-width:620px),(pointer:coarse) {.board-desktop-mode-label {display:none}}
.room-avatar-profile {border:0;padding:0;background:transparent;color:inherit;cursor:pointer;font:inherit;flex-shrink:0}
.room-avatar-profile:focus-visible {outline:2px solid var(--ink);outline-offset:3px;border-radius:50%}
.mp-frame-choices {display:flex;flex-wrap:wrap;gap:12px;margin-top:10px}
.mp-frame-choice {display:flex;flex-direction:column;align-items:center;gap:8px;min-width:100px;padding:16px 12px;border:1px solid var(--paper3);border-radius:12px;background:var(--paper);color:var(--ink);cursor:pointer}
.mp-frame-choice.selected {border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.mp-frame-choice .mp-frame-preview {width:54px;height:54px;display:grid;place-items:center}

.room-avatar-profile > .avatar-text,.mp-frame-preview > .avatar-text {display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:var(--paper2);color:var(--ink)}
.room-avatar-profile > .avatar-img,.mp-frame-preview > .avatar-img {width:100%;height:100%;border-radius:50%;object-fit:cover}

/* Imported kifu preview: readable metadata and guidance in both themes. */
html[data-theme] #profile-import-preview {padding:14px 16px;gap:12px;border-color:#829c8e!important;opacity:1}
html[data-theme] #profile-import-preview strong {font-size:14px;line-height:1.5;font-weight:700;opacity:1}
html[data-theme] #profile-import-preview span,
html[data-theme] #profile-import-preview small {font-size:12px;line-height:1.6;opacity:1;overflow-wrap:anywhere}
html[data-theme] #profile-import-preview label {font-size:13px;line-height:1.5;opacity:1}
html[data-theme="dark"] #profile-import-preview {background:#1d4137!important;background-color:#1d4137!important}
html[data-theme="dark"] #profile-import-preview strong {color:#f1f7f3!important}
html[data-theme="dark"] #profile-import-preview :is(span,small,label) {color:#d4e3db!important}
html[data-theme="light"] #profile-import-preview {background:#f0f5ef!important;background-color:#f0f5ef!important}
html[data-theme="light"] #profile-import-preview strong {color:#183c32!important}
html[data-theme="light"] #profile-import-preview :is(span,small,label) {color:#405c50!important}
html[data-theme] #profile-import-preview select {background:#fffdf8!important;color:#183c32!important;font-size:13px}

/* 管理员身份与入口使用浅色，不用金色强调。 */
#nav-super-badge,
body.view-lobby-view #admin-nav-btn {
  background: #e7eee5;
  color: #23483d;
  border: 1px solid #c8d8c9;
  box-shadow: none;
}
body.view-lobby-view #admin-nav-btn:hover { background: #f1f5ee; color: #173d32; }
.pdf-theme-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: inherit; opacity: .9; margin: 0 6px 0 0; }
.pdf-theme-pick select { min-height: 30px; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(169,128,62,.55); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
#review-view .pdf-theme-pick { width: 100%; justify-content: space-between; margin: 6px 0; }

/* 精选棋谱与当前对局共用浅金木色图标，保留各主题的列表样式。 */
body.view-lobby-view #featured-kifu-list .kifu-board-thumb,
body.view-lobby-view #my-games-list .side-game-thumb {
  background: #ead4a8 url('/assets/kifu-board-warm.svg?v=20261016') center / cover no-repeat !important;
  border-color: #bea16e !important;
  box-shadow: 0 1px 2px rgba(99, 76, 37, .10), inset 0 0 0 1px rgba(255, 252, 240, .35) !important;
}
