/*
 * 万剑归宗 · 移动 H5 灰盒骨架 v1
 * 这一层只验证流程、层级、触控尺寸和信息密度，不代表最终美术。
 */
:root {
  --g-bg: #111820;
  --g-panel: #1b2530;
  --g-panel-2: #222e3a;
  --g-line: #52606d;
  --g-line-soft: #34414d;
  --g-text: #f0f3f5;
  --g-muted: #a9b3bc;
  --g-accent: #d9b96e;
  --g-dark: #0c1218;
}

.graybox-v1 { color:var(--g-text);background:var(--g-bg); }
.graybox-v1 button { font-family:inherit; }
.graybox-v1 .panel.menu.hall {
  background:var(--g-bg)!important;
  background-image:none!important;
}
.graybox-v1 .panel.menu.hall::before {
  opacity:.28;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px)!important;
  background-size:24px 24px!important;
}
.graybox-v1 .hall-shell {
  width:min(100%,480px);
  max-height:none;
  background:var(--g-bg)!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.05)!important;
}
.graybox-v1 .hall-head {
  min-height:58px;
  gap:8px;
  padding:max(8px,env(safe-area-inset-top)) 12px 7px;
  border-bottom:1px solid var(--g-line-soft);
  background:#151e27;
}
.graybox-v1 .hall-brand { flex:1;min-width:0;text-align:left; }
.graybox-v1 .hall-brand small { display:block;color:var(--g-muted);font-size:8px;line-height:1;letter-spacing:1.5px; }
.graybox-v1 .hall-brand span { display:block;margin-top:3px;color:var(--g-text);font-size:18px;font-weight:850;line-height:1;letter-spacing:2px;text-shadow:none; }
.graybox-v1 .hall-currencies { gap:4px; }
.graybox-v1 .hall-currencies > span {
  min-width:56px;
  padding:4px 6px;
  clip-path:none;
  border:1px solid var(--g-line-soft);
  border-radius:6px;
  background:var(--g-panel);
  box-shadow:none;
}
.graybox-v1 .hall-currencies i { display:none; }
.graybox-v1 .hall-currencies em { display:block;color:var(--g-muted);font-size:7px; }
.graybox-v1 .hall-currencies small { color:var(--g-muted);font-size:7px; }
.graybox-v1 .hall-currencies b { color:var(--g-text);font-size:10px; }
.graybox-v1 .hall-utilities { gap:4px; }
.graybox-v1 .hall-utilities button {
  width:44px;height:44px;padding:0;
  clip-path:none;border:1px solid var(--g-line-soft);border-radius:7px;background:var(--g-panel);box-shadow:none;
}
.graybox-v1 .hall-utilities button i { display:none; }
.graybox-v1 #hall-settings::after { content:'设';color:var(--g-muted);font-size:12px;font-weight:800; }
.graybox-v1 #hall-daily span { color:var(--g-muted);font-size:10px; }
.graybox-v1 .hall-content { padding:10px 12px max(10px,env(safe-area-inset-bottom)); }
.graybox-v1 .hall-content.stage-view { overflow:hidden; }
.graybox-v1 .hall-toast { border:1px solid var(--g-line);border-radius:7px;background:#0c131a;color:var(--g-text);box-shadow:none; }

/* 首次进入的插画与排版统一由 h5-product-v2.css 管理。 */
.graybox-v1 .hall-shell.is-first-entry .hall-head { display:none; }
.graybox-v1 .hall-content.first-entry-view { padding:0;overflow:hidden; }
.graybox-v1 .hall-start.primary {
  display:flex;align-items:center;justify-content:center;min-height:58px;padding:9px 18px;
  clip-path:none;border:1px solid #dec783;border-radius:8px;background:var(--g-accent);color:#14181d;box-shadow:0 4px 0 #7f6a3c;
}
.graybox-v1 .hall-start.primary strong { font-size:17px;font-weight:900;letter-spacing:1px; }
.graybox-v1 .hall-start.primary small { margin-left:10px;color:#51462d;font-size:9px; }

/* 回流章节：地图是主内容，修炼/功法是独立入口，不使用应用式底栏。 */
.gray-chapter { display:grid;grid-template-rows:auto auto minmax(225px,1fr) auto auto;gap:8px;width:100%;height:100%;min-height:0; }
.gray-chapter-head { display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:7px;min-height:66px;text-align:center; }
.gray-chapter-head > div { min-width:0; }
.gray-chapter-head small { color:var(--g-muted);font-size:8px;letter-spacing:1px; }
.gray-chapter-head h2 { margin:3px 0 0!important;color:var(--g-text)!important;font-size:24px!important;font-weight:900!important;line-height:1!important;letter-spacing:2px!important;text-shadow:none!important; }
.gray-chapter-head p { margin:5px 0 0!important;overflow:hidden;color:var(--g-muted)!important;font-size:9px!important;line-height:1!important;text-overflow:ellipsis;white-space:nowrap; }
.graybox-v1 .chapter-step { width:44px;height:44px;clip-path:none;border:1px solid var(--g-line-soft);border-radius:7px;background:var(--g-panel);color:var(--g-text);font-size:22px;box-shadow:none; }
.graybox-v1 .chapter-step:disabled { opacity:.25; }
.gray-chapter-tools { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.gray-chapter-tools button { display:grid;grid-template-columns:34px 1fr;grid-template-rows:1fr 1fr;min-height:52px;padding:7px 9px;border:1px solid var(--g-line-soft);border-radius:8px;background:var(--g-panel);color:var(--g-text);text-align:left;box-shadow:none; }
.gray-chapter-tools button > i { grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;align-self:center;border:1px solid var(--g-line);border-radius:50%;color:var(--g-accent);font-size:11px;font-style:normal; }
.gray-chapter-tools button > span { align-self:end;font-size:12px;font-weight:850; }.gray-chapter-tools button > small { align-self:start;color:var(--g-muted);font-size:8px; }
.gray-chapter-tools button:disabled { opacity:.4; }
.gray-route-map { position:relative;min-height:225px;overflow:hidden;border:1px dashed var(--g-line);border-radius:10px;background:#17212a; }
.gray-map-note { position:absolute;left:10px;top:8px;color:#66727d;font-size:8px;letter-spacing:1px; }
.gray-route-map svg { position:absolute;inset:23px 0 5px;width:100%;height:calc(100% - 28px); }
.gray-route-map path { fill:none;stroke:#7b8790;stroke-width:2;stroke-dasharray:7 7; }
.gray-stage-node { position:absolute;display:grid;place-items:center;gap:2px;width:60px;padding:0;border:0;background:transparent;color:var(--g-muted);box-shadow:none; }
.gray-stage-node i { display:grid;place-items:center;width:35px;height:35px;border:2px solid #7b8790;border-radius:50%;background:#222d37;color:var(--g-text);font-size:12px;font-style:normal; }
.gray-stage-node span { padding:2px 5px;border-radius:4px;background:#151e26;color:var(--g-muted);font-size:8px; }
.gray-stage-node.selected i { border-color:var(--g-accent);background:#4a412c;color:#fff3c5;box-shadow:0 0 0 4px rgba(217,185,110,.12); }
.gray-stage-node.cleared i { border-color:#819a8f;background:#33443d; }.gray-stage-node.locked { opacity:.35; }
.gray-stage-node.route-1 { left:9%;bottom:1%; }.gray-stage-node.route-2 { right:19%;bottom:20%; }.gray-stage-node.route-3 { left:19%;bottom:41%; }.gray-stage-node.route-4 { right:12%;top:22%; }.gray-stage-node.route-5 { right:21%;top:1%; }
.gray-stage-summary { display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:7px 10px;border:1px solid var(--g-line-soft);border-radius:8px;background:var(--g-panel); }
.gray-stage-summary span { min-width:0; }.gray-stage-summary small,.gray-stage-summary b { display:block; }.gray-stage-summary small { color:var(--g-muted);font-size:8px; }.gray-stage-summary b { margin-top:2px;overflow:hidden;color:var(--g-text);font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.gray-stage-summary em { flex:none;color:var(--g-accent);font-size:9px;font-style:normal; }
.gray-chapter-actions { display:flex;gap:8px; }.gray-chapter-actions .hall-start { flex:1; }.gray-side-button { display:grid;place-items:center;width:58px;border:1px solid var(--g-line);border-radius:8px;background:var(--g-panel);color:var(--g-text); }.gray-side-button i,.gray-side-button span { display:block; }.gray-side-button i { font-size:18px;font-style:normal; }.gray-side-button span { font-size:8px; }

/* 二级模块保持灰盒，不出现大片白卡。 */
.graybox-v1 .gray-module-page { min-height:100%;padding:6px 0 14px;border:0;border-radius:0;background:transparent;color:var(--g-text);box-shadow:none; }
.gray-back { min-height:44px;margin-bottom:4px;padding:0 4px;border:0;background:transparent;color:var(--g-muted);font-size:11px;text-align:left; }
.graybox-v1 .casual-page-head { padding:4px 3px 9px;border-bottom:1px solid var(--g-line-soft); }
.graybox-v1 .casual-page-head small,.graybox-v1 .casual-page-lead { color:var(--g-muted)!important; }
.graybox-v1 .casual-page-head h3 { color:var(--g-text);font-size:23px; }
.graybox-v1 .casual-page-head > b { width:50px;height:42px;border:1px solid var(--g-line-soft);border-radius:7px;background:var(--g-panel);color:var(--g-text);font-size:18px; }
.graybox-v1 .growth-card,.graybox-v1 .collection-list article,.graybox-v1 .achievement-list article { border:1px solid var(--g-line-soft);border-radius:8px;background:var(--g-panel);color:var(--g-text);box-shadow:none; }
.graybox-v1 .growth-card-body h4,.graybox-v1 .collection-list b,.graybox-v1 .achievement-list b { color:var(--g-text); }
.graybox-v1 .growth-card-body p,.graybox-v1 .collection-list small,.graybox-v1 .achievement-list small { color:var(--g-muted)!important; }
.graybox-v1 .growth-mark { border:1px solid var(--g-line);border-radius:50%;background:var(--g-panel-2);color:var(--g-accent); }
.graybox-v1 .growth-card > button { border:1px solid #8c7848;border-radius:7px;background:#4c422d;color:#f5dda1;box-shadow:none; }
.graybox-v1 .growth-card.guide-locked { opacity:.38; }
.graybox-v1 .library-tabs,.graybox-v1 .school-pills { border-color:var(--g-line-soft);background:var(--g-dark); }
.graybox-v1 .library-tabs button,.graybox-v1 .school-pills button { color:var(--g-muted); }.graybox-v1 .library-tabs button.active,.graybox-v1 .school-pills button.active { background:var(--g-panel-2);color:var(--g-text); }

/* 战斗 HUD 与关键弹层只保留做决定需要的信息。 */
.graybox-v1 .hud { clip-path:none;border:1px solid rgba(255,255,255,.25);border-radius:8px;background:rgba(13,20,27,.88);background-image:none;box-shadow:none;backdrop-filter:blur(4px); }
.graybox-v1 .hud::before,.graybox-v1 .hud::after { display:none; }
.graybox-v1 .hud-top { border:0;background:none; }.graybox-v1 .hud-mission #stage-name { color:#aeb7bf; }.graybox-v1 .hud-mission #wave { color:#f2f3f4;font-family:inherit; }
.graybox-v1 .wave-progress,.graybox-v1 .hud .stat-track { border:0;border-radius:3px;background:#29343e;box-shadow:none; }
.graybox-v1 #battle-progress,.graybox-v1 .hud #xp { background:#bda25f; }.graybox-v1 .hud #hp { background:#b76565; }
.graybox-v1.tutorial-run .codex-fab,.graybox-v1.tutorial-run .combo-pop,.graybox-v1.tutorial-run .buff-bar,.graybox-v1.tutorial-run .ultimate-btn { display:none!important; }
.graybox-v1 .tutorial-tip { clip-path:none;border:1px solid var(--g-line);border-radius:7px;background:#111920;color:var(--g-text);box-shadow:none; }
.graybox-v1 #upgrade { background:rgba(7,11,15,.86); }
.graybox-v1 #upgrade .upgrade-heading h2 { color:var(--g-text);font-family:inherit;text-shadow:none; }
.graybox-v1 #upgrade .upgrade-heading small,.graybox-v1 #upgrade .upgrade-heading p { color:var(--g-muted)!important; }
.graybox-v1 .build-summary { border:1px solid var(--g-line-soft);border-radius:7px;background:var(--g-dark); }
.graybox-v1 .upgrade-btns .upgrade-card { clip-path:none!important;border:1px solid var(--g-line)!important;border-radius:8px!important;background:var(--g-panel)!important;color:var(--g-text)!important;box-shadow:none!important; }
.graybox-v1 .upgrade-btns .upgrade-card::before { display:none; }
.graybox-v1 .upgrade-card-head b { color:var(--g-text)!important;font-family:inherit!important; }.graybox-v1 .upgrade-card-head em { border-radius:4px;background:#303b45;color:var(--g-muted); }
.graybox-v1 .upgrade-summary { color:var(--g-muted)!important; }.graybox-v1 .upgrade-effect { border:1px solid var(--g-line-soft);border-radius:5px!important;background:#17212a!important;color:#d6dadd!important; }
.graybox-v1.tutorial-run #upgrade .build-summary,.graybox-v1.tutorial-run #upgrade .upgrade-actions,.graybox-v1.tutorial-run #upgrade .upgrade-summary,.graybox-v1.tutorial-run #upgrade .upgrade-sigil small { display:none!important; }
.graybox-v1.tutorial-run .upgrade-btns .upgrade-card { min-height:74px; }
.graybox-v1 #over { background:rgba(7,11,15,.88); }
.graybox-v1 .result-sheet { clip-path:none;border:1px solid var(--g-line);border-radius:10px;background:var(--g-panel);color:var(--g-text);box-shadow:none; }
.graybox-v1 .result-head > i { border:1px solid var(--g-line);border-radius:50%;background:var(--g-panel-2);color:var(--g-muted); }.graybox-v1 .panel#over .result-head h2,.graybox-v1 .panel#over.victory .result-head h2 { color:var(--g-text);font-family:inherit; }
.graybox-v1 .result-head p { color:var(--g-muted)!important; }.graybox-v1 .over-metrics div,.graybox-v1 .result-reward-main { border:1px solid var(--g-line-soft);border-radius:7px;background:#18222b; }
.graybox-v1 .result-primary-actions .primary { border:1px solid #dec783;border-radius:7px;background:var(--g-accent);color:#11161b;box-shadow:none; }
.graybox-v1 .result-primary-actions .ghost,.graybox-v1 .result-secondary-actions button { border:1px solid var(--g-line);border-radius:7px;background:transparent;color:var(--g-muted);box-shadow:none; }
.graybox-v1 #over.first-result .result-secondary-actions,.graybox-v1 #over.first-result #retry { display:none; }

@media (max-width:370px) {
  .graybox-v1 .hall-head { padding-inline:8px; }.graybox-v1 .hall-brand small { display:none; }.graybox-v1 .hall-brand span { font-size:16px;letter-spacing:1px; }
  .graybox-v1 .hall-currencies > span { min-width:50px;padding-inline:4px; }
  .gray-chapter { gap:6px; }.gray-route-map { min-height:205px; }.gray-stage-node i { width:31px;height:31px; }
  .gray-chapter-tools button { padding-inline:6px; }.gray-stage-summary em { display:none; }
}

@media (max-height:620px) {
  .graybox-v1 .hall-head { min-height:50px;padding-top:max(6px,env(safe-area-inset-top)); }.graybox-v1 .hall-content { padding-top:6px; }
  .gray-chapter { grid-template-rows:auto auto minmax(195px,1fr) auto auto;gap:5px; }.gray-chapter-head { min-height:54px; }.gray-chapter-head h2 { font-size:20px!important; }.gray-chapter-head p { display:none; }
  .gray-chapter-tools button { min-height:45px; }.gray-route-map { min-height:195px; }.gray-stage-summary { min-height:42px; }.graybox-v1 .hall-start.primary { min-height:50px; }
}
