/* ============================================================
   逻辑推理谜题岛 · 黑金高奢主题
   设计规范（严格使用下列色值，定义为本站 CSS 变量）：
     主色   --c-primary   #69c96d
     辅助色 --c-secondary #5bb96c
     强调色 --c-accent    #6dd9cc
     背景   --c-bg        #0e150f
     卡片   --c-surface   #1a231a
     正文   --c-text      #eef2ee
     次要   --c-text-dim  #98ae99
     描边   --c-border    #304031
   气质：近黑底 + 翡翠金细线 + 低调光泽 + 衬线大字（圆角 6px）
   ============================================================ */

:root {
  --c-primary: #69c96d;
  --c-secondary: #5bb96c;
  --c-accent: #6dd9cc;
  --c-bg: #0e150f;
  --c-surface: #1a231a;
  --c-surface-2: #141d14;
  --c-text: #eef2ee;
  --c-text-dim: #98ae99;
  --c-border: #304031;
  --radius: 6px;

  --font-display: 'Noto Serif SC', 'Songti SC', Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;

  --glow: 0 0 24px rgba(109, 217, 204, .22);
  --hairline: linear-gradient(90deg, transparent, rgba(109, 217, 204, .75), transparent);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, .42);
  --shadow-lift: 0 20px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(109, 217, 204, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(109, 217, 204, .08), transparent 58%),
    radial-gradient(900px 520px at -8% 18%, rgba(105, 201, 109, .07), transparent 55%),
    radial-gradient(1000px 680px at 50% 112%, rgba(91, 185, 108, .055), transparent 60%),
    var(--c-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(109, 217, 204, .28); color: var(--c-text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 6px; border: 2px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-dim); }

.container { width: min(1160px, 92%); margin: 0 auto; }
.page-narrow { width: min(900px, 92%); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(180deg, rgba(14, 21, 15, .97), rgba(14, 21, 15, .86));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.topbar::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--hairline); opacity: .8;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 13px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(109, 217, 204, .6); border-radius: var(--radius);
  transform: rotate(45deg);
  background: linear-gradient(145deg, rgba(105, 201, 109, .14), rgba(109, 217, 204, .08));
  box-shadow: inset 0 0 14px rgba(109, 217, 204, .12);
}
.brand-mark svg { width: 18px; height: 18px; transform: rotate(-45deg); }
.brand-name {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: .14em; color: var(--c-text); line-height: 1.1;
}
.brand-en {
  display: block; font-family: var(--font-body); font-size: 9px;
  letter-spacing: .34em; text-transform: uppercase; color: var(--c-text-dim); margin-top: 2px;
}
.topnav { display: flex; gap: 4px; }
.nav-link {
  font-size: 14px; color: var(--c-text-dim); letter-spacing: .06em;
  padding: 8px 14px; border-radius: var(--radius); position: relative;
  transition: color .25s, background .25s;
}
.nav-link:hover { color: var(--c-text); background: rgba(105, 201, 109, .08); }
.nav-link.active { color: var(--c-accent); background: rgba(109, 217, 204, .1); }
.nav-link.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px;
  background: var(--hairline);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; font-size: 15px; letter-spacing: .06em;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-text);
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s, background .22s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(109, 217, 204, .55); box-shadow: var(--glow); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary {
  color: #0e150f; font-weight: 700; border: none;
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  box-shadow: 0 10px 24px rgba(105, 201, 109, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(105, 201, 109, .36), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-accent { color: #0e150f; font-weight: 700; border: none; background: linear-gradient(135deg, var(--c-accent), var(--c-primary)); box-shadow: 0 10px 24px rgba(109, 217, 204, .24); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(109, 217, 204, .07); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 通用标题 ---------- */
.eyebrow {
  font-family: var(--font-body); font-size: 11px; letter-spacing: .42em;
  text-transform: uppercase; color: var(--c-accent);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--hairline); }
.section-title {
  font-family: var(--font-display); font-size: clamp(24px, 3.8vw, 32px);
  font-weight: 700; letter-spacing: .12em; margin-top: 8px;
}
.section-sub { color: var(--c-text-dim); font-size: 14.5px; margin-top: 6px; }
.section-head { margin: 0 0 26px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 36px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(105, 201, 109, .1), transparent 65%);
}
.hero-frame {
  position: relative; text-align: center;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background:
    linear-gradient(165deg, rgba(105, 201, 109, .055), transparent 40%),
    linear-gradient(200deg, transparent 58%, rgba(109, 217, 204, .05)),
    var(--c-surface);
  padding: 52px 30px 44px;
}
.hero-frame::before, .hero-frame::after {
  content: ''; position: absolute; width: 36px; height: 36px; pointer-events: none;
}
.hero-frame::before { top: 10px; left: 10px; border-top: 1px solid rgba(109, 217, 204, .8); border-left: 1px solid rgba(109, 217, 204, .8); }
.hero-frame::after { bottom: 10px; right: 10px; border-bottom: 1px solid rgba(109, 217, 204, .8); border-right: 1px solid rgba(109, 217, 204, .8); }
.hero-frame > .eyebrow { justify-content: center; margin-bottom: 18px; }
.hero-frame > .eyebrow::after { content: ''; width: 34px; height: 1px; background: var(--hairline); }
.hero-title {
  font-family: var(--font-display); font-size: clamp(34px, 6.4vw, 60px);
  font-weight: 900; letter-spacing: .1em; line-height: 1.18;
  background: linear-gradient(120deg, var(--c-text) 18%, var(--c-primary) 58%, var(--c-accent) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 44px rgba(109, 217, 204, .16);
}
.hero-sub { color: var(--c-text-dim); font-size: 16px; margin-top: 16px; letter-spacing: .04em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.hero-note { margin-top: 24px; font-size: 12.5px; color: var(--c-text-dim); letter-spacing: .08em; }
.hero-note b { color: var(--c-accent); font-weight: 600; }

/* 岛徽装饰 */
.island-seal {
  width: 92px; height: 92px; margin: 0 auto 18px;
  display: grid; place-items: center;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(105, 201, 109, .1), rgba(109, 217, 204, .06));
  box-shadow: inset 0 0 26px rgba(109, 217, 204, .1);
  animation: floatY 6s ease-in-out infinite;
}
.island-seal svg { width: 58px; height: 58px; }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(105, 201, 109, .045), transparent 36%), var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: transform .28s var(--ease), box-shadow .3s, border-color .3s;
}
.card::before {
  content: ''; position: absolute; top: -1px; left: 14%; right: 14%; height: 1px;
  background: var(--hairline); opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: rgba(109, 217, 204, .45); box-shadow: var(--shadow-lift); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }

/* ---------- 区域卡片（地图页） ---------- */
.region-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.region-card { padding: 26px 24px; display: flex; gap: 18px; align-items: flex-start; }
.region-icon {
  width: 62px; height: 62px; flex: none; border-radius: var(--radius);
  border: 1px solid var(--c-border); display: grid; place-items: center;
  color: var(--c-accent);
  background: linear-gradient(145deg, rgba(109, 217, 204, .1), transparent 62%), var(--c-surface);
  box-shadow: 0 0 0 1px rgba(14, 21, 15, .4) inset;
}
.region-icon svg { width: 34px; height: 34px; }
.region-body { flex: 1; min-width: 0; }
.region-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.region-name { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: .1em; }
.region-en { font-size: 10px; letter-spacing: .3em; color: var(--c-text-dim); text-transform: uppercase; margin-top: 2px; }
.region-desc { color: var(--c-text-dim); font-size: 13.5px; margin: 10px 0 14px; }

.level-list { display: grid; gap: 9px; }
.level-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .4);
  transition: border-color .25s, background .25s;
}
.level-row:hover { border-color: rgba(109, 217, 204, .6); background: rgba(109, 217, 204, .05); }
.lv-badge {
  flex: none; min-width: 46px; height: 28px; padding: 0 8px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px; letter-spacing: .06em;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text-dim);
}
.lv-badge.l1 { color: var(--c-text-dim); }
.lv-badge.l2 { color: var(--c-primary); border-color: rgba(105, 201, 109, .5); }
.lv-badge.l3 { color: var(--c-accent); border-color: rgba(109, 217, 204, .55); }
.lv-name { flex: 1; font-size: 14px; letter-spacing: .06em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-stars { color: var(--c-border); font-size: 14px; letter-spacing: 2px; white-space: nowrap; }
.lv-stars .on { color: var(--c-accent); text-shadow: 0 0 10px rgba(109, 217, 204, .65); }
.lv-cta {
  flex: none; font-size: 12px; letter-spacing: .08em; padding: 6px 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text-dim); background: rgba(14, 21, 15, .45);
  transition: all .22s var(--ease);
}
.level-row:hover .lv-cta { border-color: rgba(109, 217, 204, .6); color: var(--c-accent); }
.level-row:hover .lv-cta { background: var(--c-accent); color: #0e150f; border-color: var(--c-accent); }
.lv-solved-tag { color: var(--c-secondary); }

/* 进度条 */
.progress-strip { margin-top: 30px; }
.progress-label { font-size: 12px; letter-spacing: .3em; color: var(--c-text-dim); display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress-label b { color: var(--c-accent); font-family: var(--font-display); font-size: 15px; }
.progress-track { height: 6px; border-radius: 6px; background: rgba(48, 64, 49, .6); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  border-radius: 6px; transition: width .8s var(--ease);
  box-shadow: 0 0 12px rgba(109, 217, 204, .5);
}

/* 怎么玩 */
.howto-list { list-style: none; display: grid; gap: 12px; counter-reset: step; }
.howto-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 18px; font-size: 14.5px; color: var(--c-text-dim);
  background: linear-gradient(180deg, var(--c-surface-2), var(--c-surface));
  border: 1px solid var(--c-border); border-radius: var(--radius);
  counter-increment: step;
}
.howto-list li::before {
  content: counter(step, decimal-leading-zero); flex: none;
  width: 34px; height: 34px; display: grid; place-items: center;
  font-family: var(--font-display); color: var(--c-accent); font-size: 14px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .55);
}
.howto-list li b { color: var(--c-text); font-family: var(--font-display); letter-spacing: .08em; }

/* ---------- 挑战页 ---------- */
.crumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--c-text-dim); margin: 34px 0 22px; flex-wrap: wrap; }
.crumb a { color: var(--c-accent); }
.crumb-sep { color: var(--c-border); }
.challenge-head { margin-bottom: 24px; }
.ch-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  padding: 4px 12px; font-size: 12px; letter-spacing: .16em;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text-dim); background: rgba(26, 35, 26, .5);
  font-family: var(--font-display);
}
.badge.on { color: var(--c-accent); border-color: rgba(109, 217, 204, .55); }
.challenge-head h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: .1em; margin: 10px 0 0; }

.challenge-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .challenge-layout { grid-template-columns: 1fr; } }

.puzzle-panel { padding: clamp(20px, 3.6vw, 32px); box-shadow: var(--shadow-card); animation: fadeUp .5s var(--ease) both; }
.puzzle-intro { color: var(--c-text-dim); font-size: 15px; margin: 0 0 22px; line-height: 1.9; }
.card-inner { margin-top: 20px; }

/* 找规律 */
.pattern-stage.seq { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.pattern-stage.matrix { display: grid; gap: 10px; justify-content: center; }
.pattern-stage.matrix[data-cols="3"] { grid-template-columns: repeat(3, 72px); }
.tile {
  width: 72px; height: 72px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .55);
  animation: pop .4s var(--ease) both;
}
.tile-q { color: var(--c-accent); border-color: rgba(109, 217, 204, .6); border-style: dashed; text-shadow: 0 0 12px rgba(109, 217, 204, .5); animation: pulseQ 1.6s ease-in-out infinite; }
@keyframes pulseQ { 0%, 100% { box-shadow: 0 0 0 0 rgba(109, 217, 204, .25); } 50% { box-shadow: 0 0 0 8px rgba(109, 217, 204, 0); } }

.option-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 24px; }
.opt-btn {
  padding: 14px 10px; font-size: 18px; letter-spacing: .04em;
  font-family: var(--font-display); font-weight: 700; color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .45);
  transition: all .22s var(--ease); touch-action: manipulation;
}
.opt-btn:hover { border-color: rgba(109, 217, 204, .6); transform: translateY(-2px); }
.opt-btn.selected { border-color: var(--c-accent); background: rgba(109, 217, 204, .12); color: var(--c-accent); box-shadow: 0 0 0 1px rgba(109, 217, 204, .4); }
.opt-btn.correct { border-color: var(--c-primary); background: rgba(105, 201, 109, .14); color: var(--c-primary); }
.opt-btn.wrong { border-color: var(--c-border); color: var(--c-text-dim); text-decoration: line-through; }

/* 文字题 */
.word-question {
  font-size: 18px; line-height: 2; color: var(--c-text);
  border-left: 2px solid rgba(109, 217, 204, .6);
  padding: 4px 0 4px 18px; margin-bottom: 24px;
}

/* 图形推理画布 */
.figure-stage { display: flex; justify-content: center; }
.figure-stage canvas { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--c-border); background: rgba(14, 21, 15, .55); }
.figure-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.figure-opt {
  display: flex; align-items: center; justify-content: center;
  padding: 8px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .45);
  transition: all .22s var(--ease); touch-action: manipulation;
}
.figure-opt canvas { width: 100%; height: auto; border-radius: 4px; }
.figure-opt:hover { border-color: rgba(109, 217, 204, .6); transform: translateY(-2px); }
.figure-opt.selected { border-color: var(--c-accent); background: rgba(109, 217, 204, .1); box-shadow: 0 0 0 1px rgba(109, 217, 204, .4); }
.figure-opt.correct { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.figure-opt.wrong { opacity: .45; }
@media (max-width: 560px) { .figure-options { grid-template-columns: repeat(2, 1fr); } }

/* 数独 */
.sudoku-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.sudoku-wrap { display: flex; justify-content: center; width: 100%; }
#sudokuCanvas {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: rgba(14, 21, 15, .55);
  box-shadow: 0 0 0 1px rgba(109, 217, 204, .08), 0 14px 30px rgba(0, 0, 0, .35);
  cursor: pointer; touch-action: manipulation; max-width: 100%; height: auto;
}
.numpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 340px; width: 100%; }
.num {
  height: 52px; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--c-text);
  background: rgba(14, 21, 15, .55); border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: all .2s var(--ease); touch-action: manipulation;
}
.num:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-2px); }
.num:active { transform: scale(.94); }
.num-erase { font-size: 16px; color: var(--c-text-dim); }
.sudoku-note { font-size: 12.5px; color: var(--c-text-dim); letter-spacing: .06em; margin: 0; text-align: center; }

/* 工具面板 */
.tool-panel { padding: 22px 20px; position: sticky; top: 84px; animation: fadeUp .5s var(--ease) both; }
.tool-title { font-family: var(--font-display); font-size: 16px; letter-spacing: .14em; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.tool-title::before { content: ''; width: 20px; height: 1px; background: var(--hairline); }
.tool-actions { display: flex; flex-direction: column; gap: 10px; }
.tool-actions .btn { width: 100%; }
.hint-box {
  margin-top: 16px; padding: 13px 15px; border-radius: var(--radius);
  border: 1px dashed rgba(109, 217, 204, .55); background: rgba(109, 217, 204, .06);
  color: var(--c-accent); font-size: 14px; letter-spacing: .04em; line-height: 1.8;
  animation: pop .35s var(--ease);
}
.feedback {
  margin-top: 14px; padding: 12px 15px; border-radius: var(--radius);
  font-size: 14.5px; letter-spacing: .04em; border: 1px solid;
  animation: pop .35s var(--ease);
}
.feedback.good { border-color: rgba(105, 201, 109, .6); background: rgba(105, 201, 109, .1); color: var(--c-primary); }
.feedback.warn { border-color: rgba(109, 217, 204, .5); background: rgba(109, 217, 204, .07); color: var(--c-accent); }
.feedback.bad { border-color: var(--c-border); background: rgba(48, 64, 49, .4); color: var(--c-text-dim); }
.shake { animation: shake .45s var(--ease); }

/* 结算浮层 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 9, .8); backdrop-filter: blur(6px); animation: fadeIn .35s ease; }
.modal-card {
  position: relative; width: min(430px, 92vw); text-align: center;
  background: linear-gradient(180deg, var(--c-surface-2), var(--c-surface));
  border: 1px solid var(--c-border); border-radius: var(--radius);
  border-top: 1px solid rgba(109, 217, 204, .5);
  padding: 40px 30px 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  animation: pop .45s var(--ease);
}
.modal-medal { font-family: var(--font-display); font-size: 54px; line-height: 1; color: var(--c-accent); text-shadow: 0 0 30px rgba(109, 217, 204, .6); }
.modal-title { font-size: 26px; letter-spacing: .14em; margin: 16px 0 8px; }
.modal-text { color: var(--c-text-dim); font-size: 14.5px; margin: 0 0 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-actions .btn, .modal-actions a.btn { width: 100%; }

/* 解析页 */
.page-head { text-align: center; padding: 50px 0 10px; animation: fadeUp .6s var(--ease) both; }
.page-title {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 42px);
  letter-spacing: .16em; font-weight: 900; margin: 0 0 10px;
  background: linear-gradient(120deg, var(--c-text) 18%, var(--c-primary) 58%, var(--c-accent) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(109, 217, 204, .16);
}
.page-head .section-sub { margin-top: 6px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 30px 0 28px; }
.tab {
  padding: 8px 18px; font-size: 14px; letter-spacing: .08em; color: var(--c-text-dim);
  border: 1px solid var(--c-border); border-radius: var(--radius); background: rgba(26, 35, 26, .4);
  transition: all .22s var(--ease);
}
.tab:hover { color: var(--c-text); border-color: rgba(109, 217, 204, .5); }
.tab.active { color: var(--c-accent); border-color: rgba(109, 217, 204, .6); background: rgba(109, 217, 204, .08); }
.sol-list { display: grid; gap: 16px; }
.sol-card { padding: 22px 24px; animation: fadeUp .5s var(--ease) both; }
.sol-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sol-head .st { font-family: var(--font-display); font-size: 18px; letter-spacing: .08em; }
.sol-q { font-size: 15px; color: var(--c-text-dim); line-height: 1.85; white-space: pre-line; margin: 0 0 14px; }
.sol-ans {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 16px; border: 1px solid rgba(109, 217, 204, .4); border-radius: var(--radius);
  background: rgba(109, 217, 204, .06);
}
.sol-ans .lb { font-size: 12px; letter-spacing: .2em; color: var(--c-accent); }
.sol-ans .val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--c-accent); }
.sol-hint { font-size: 13.5px; color: var(--c-text-dim); letter-spacing: .04em; margin: 0 0 12px; }
.sol-steps summary {
  cursor: pointer; font-size: 13.5px; letter-spacing: .14em; color: var(--c-text-dim);
  transition: color .2s; user-select: none;
}
.sol-steps summary:hover { color: var(--c-accent); }
.sol-steps[open] summary { margin-bottom: 10px; color: var(--c-accent); }
.steps-inner { color: var(--c-text); font-size: 14.5px; line-height: 1.9; }
.steps-inner ul { margin: 0; padding-left: 20px; }
.steps-inner li { margin: 0 0 6px; }
.sol-visual { margin: 14px 0; }
.sol-visual canvas { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--c-border); }
.sol-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 48px; border-top: 1px solid var(--c-border);
  padding: 30px clamp(16px, 4vw, 40px);
  text-align: center; color: var(--c-text-dim); font-size: 13px; letter-spacing: .1em;
  background: linear-gradient(180deg, transparent, rgba(26, 35, 26, .6));
}
.site-footer .mark { color: var(--c-accent); letter-spacing: .3em; font-size: 11px; margin-bottom: 6px; }
.site-footer p { margin: 0; }

/* 数据加载失败提示 */
.data-error {
  margin: 20px auto; padding: 18px 22px; max-width: 720px;
  border: 1px dashed rgba(109, 217, 204, .6); border-radius: var(--radius);
  background: rgba(109, 217, 204, .06); color: var(--c-accent); font-size: 14.5px;
  line-height: 1.9;
}
.data-error code {
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  background: rgba(14, 21, 15, .6); padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--c-border);
}

/* ---------- 动效 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.9); } 55% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .7; } }
.fade-up { animation: fadeUp .6s var(--ease) both; }

.confetti { position: fixed; top: -20px; z-index: 110; pointer-events: none; animation: fall linear forwards; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .topbar-inner { flex-direction: column; gap: 8px; padding: 11px 0; }
  .hero { padding: 40px 0 26px; }
  .hero-frame { padding: 36px 18px 32px; }
  .region-grid { grid-template-columns: 1fr; }
  .region-card { flex-direction: row; }
  .option-row { grid-template-columns: repeat(2, 1fr); }
  .tool-panel { position: static; }
  .numpad { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 420px) {
  .option-row { grid-template-columns: 1fr 1fr; }
  .lv-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
