/* Theme entry is shared; the established Collector material rules stay in styles.css. */
.theme-picker { position:absolute; right:0; top:0; text-align:left; width:12rem }
.theme-picker label { display:flex; align-items:center; gap:.45rem; color:var(--text-2); font-size:.75rem; margin-bottom:.3rem }
.theme-picker select { width:100%; min-height:44px; padding:.5rem .65rem; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--text); cursor:pointer; font-size:.8125rem }
.theme-picker select:hover { border-color:var(--gold) }
.theme-swatch { width:1.1rem; height:.65rem; border:1px solid var(--gold); background:linear-gradient(90deg,var(--gold) 50%,var(--bg) 50%) }
.lumen-emblem { display:none }
.emblem .lumen-emblem { display:none }
.result-medal { position:relative }
@media(max-width:1200px) {
  .theme-picker { position:relative; margin:1rem auto 0; width:12rem }
}

/* LUMEN — porcelain instruments / optical glass / measured spectral color.
   Scope contains palette, materials, hierarchy, combat and responsive variants. */
html[data-theme=lumen] {
  color-scheme:light;
  --bg:#edf2f5; --text:#1c3547; --text-2:#4c6373; --text-3:#566c7b;
  --gold:#275eb0; --blue:#2463a6; --red:#af3d4b; --green:#166d50;
  --line:#bacbd6; --surface:#fafdff; --surface-muted:#e7eff4;
  --focus:#174ea5; --shadow:0 12px 32px #27435b1a;
  --display:"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif;
}
[data-theme=lumen] * { scrollbar-color:#8aabbf #e8eff4 }
[data-theme=lumen] ::selection { background:#c0d9f3; color:#173757 }
[data-theme=lumen] input { caret-color:var(--focus) }
[data-theme=lumen] :is(button,input,select,[tabindex]):focus-visible { outline-color:var(--focus) }
[data-theme=lumen] input[aria-invalid=true] { outline-color:var(--red) }
[data-theme=lumen] .lab-backdrop {
  background:#edf2f5 url('assets/lumen-optics.webp') center top/cover no-repeat;
}
[data-theme=lumen] .lab-backdrop::after {
  background:linear-gradient(180deg,#edf2f522 0%,#edf2f577 60%,#edf2f5e8 100%);
}
[data-theme=lumen] .app { padding-top:1.8rem }
[data-theme=lumen] .site-header { margin-bottom:2rem }
[data-theme=lumen] .site-header h1 {
  font:600 1.6rem/1.3 var(--font); letter-spacing:.15em; color:var(--text);
}
[data-theme=lumen] .site-header h1::before,[data-theme=lumen] .site-header h1::after { background:#8aa6b9; width:2rem }
[data-theme=lumen] .site-header p { color:var(--text-2); letter-spacing:.25em }
[data-theme=lumen] .brand-motto { color:var(--text-2); font-family:var(--font); letter-spacing:.14em }
[data-theme=lumen] .theme-picker select { background:var(--surface) }
[data-theme=lumen] .selection-bar { margin:0 0 .8rem }
[data-theme=lumen] .card-picker { border-color:var(--line); border-radius:6px; background:var(--line); box-shadow:none }
[data-theme=lumen] .card-picker :is(input,select) { background:var(--surface); color:var(--text); border-radius:5px }
[data-theme=lumen] input::placeholder { color:var(--text-3); opacity:1 }
[data-theme=lumen] .card-picker:focus-within { border-color:var(--focus) }
[data-theme=lumen] .pcard { color:var(--text) }
[data-theme=lumen] .card-face {
  padding:1.3rem 1.8rem 1.2rem; border-radius:14px;
  background:linear-gradient(145deg,#ffffff 18%,#f6fafd 60%,#e5eef4);
  box-shadow:var(--shadow),inset 0 1px 0 #fff; filter:none;
}
[data-theme=lumen] .card-face::before {
  inset:0; background:none; border:1px solid #b7cbd9; border-radius:14px;
  filter:none; z-index:0; clip-path:none; box-shadow:none;
}
[data-theme=lumen] .card-rail { color:var(--text-3); padding:0; min-height:1.8rem }
[data-theme=lumen] .micro-brand { margin:0; font-family:var(--font); letter-spacing:.1em }
[data-theme=lumen] .card-serial::before { color:var(--text-3) }
[data-theme=lumen] .rarity-letter { top:3.2rem; left:1.8rem; color:var(--lumen-rank); font-size:1.7rem; text-shadow:none; font-weight:300; opacity:1 }
[data-theme=lumen] .card-ornament { inset:2.8rem 1rem 48%; opacity:.35 }
[data-theme=lumen] .card-ornament::before { background:linear-gradient(110deg,transparent 30%,#d7e8f455 50%,transparent 70%); animation:none }
[data-theme=lumen] .card-reflection { background:radial-gradient(circle,#d4e5f3aa,transparent 65%) }
[data-theme=lumen] .card-frame { inset:.8rem; color:#94b2c5; opacity:.5 }
[data-theme=lumen] .card-frame i { width:.7rem; height:.7rem }
[data-theme=lumen] .card-frame i::after { display:none }
[data-theme=lumen] .card-edge-light { inset:2.6rem 1.8rem auto; height:1px; border:0; background:var(--team); clip-path:none }
[data-theme=lumen] .ambient-particles { display:none }
[data-theme=lumen] .rarity-art { max-width:17rem; margin:.5rem auto .1rem }
[data-theme=lumen] .rarity-art::before { background:radial-gradient(ellipse,#c5dfef66,transparent 65%); animation:none; opacity:.6 }
[data-theme=lumen] .emblem { filter:drop-shadow(0 9px 7px #365a7218) }
[data-theme=lumen] .collector-emblem { display:none }
[data-theme=lumen] .emblem .lumen-emblem,[data-theme=lumen] .result-medal .lumen-emblem { display:block }
[data-theme=lumen] .cname { color:var(--text); font-size:1.6rem; font-weight:600; letter-spacing:.03em }
[data-theme=lumen] .rar-badge { color:var(--lumen-rank); font-weight:600; letter-spacing:.06em }
[data-theme=lumen] .rar-badge::before { box-shadow:none; background:var(--lumen-rank); width:5px; height:5px }
[data-theme=lumen] .card-english { color:var(--text-3); font-family:var(--font); letter-spacing:.13em }
[data-theme=lumen] .power-strip { background:none; border-color:var(--line); padding:.8rem 0; margin-top:1rem }
[data-theme=lumen] .bp-value { color:var(--text); font-family:var(--font); font-weight:300; font-size:2.25rem; letter-spacing:-.04em }
[data-theme=lumen] .lvl-val input { border-color:#9db4c3; background:#fff; color:var(--text); min-height:36px }
[data-theme=lumen] input[type=range]::-webkit-slider-runnable-track { height:3px; background:linear-gradient(90deg,var(--blue) var(--level-fill),#c5d3df var(--level-fill)) }
[data-theme=lumen] input[type=range]::-webkit-slider-thumb { width:17px; height:17px; border:2px solid #fff; background:var(--blue); border-radius:50%; box-shadow:0 1px 4px #31577866 }
[data-theme=lumen] input[type=range]::-moz-range-track { background:#b9cbd8 }
[data-theme=lumen] input[type=range]::-moz-range-thumb { border:2px solid #fff; background:var(--blue); border-radius:50% }
[data-theme=lumen] .power-pulse { background:linear-gradient(90deg,transparent,#307acb22,transparent) }
[data-theme=lumen] .core-stats { border-color:var(--line) }
[data-theme=lumen] .stat-code { color:var(--text-3) }
[data-theme=lumen] .stat-tile .v,[data-theme=lumen] .stat-row .v { color:var(--text) }
[data-theme=lumen] .hpbar-wrap { background:#d9e3ea; box-shadow:none; height:.4rem; border-radius:2px }
[data-theme=lumen] .hpbar { background:var(--team) }
[data-theme=lumen] .hp-trail { background:#8ca3b2 }
[data-theme=lumen] .card-signature { border-color:var(--line); color:var(--text-3) }
[data-theme=lumen] .card-material { font-size:0 }
[data-theme=lumen] .card-signature .card-material { font-size:0 }
[data-theme=lumen] .card-material::after { content:'OPTICAL CERAMIC'; font-size:.52rem; letter-spacing:.12em }
[data-theme=lumen] .card-config { margin:1rem 0 0; background:#f8fbfce8; box-shadow:none; border-color:var(--line); border-radius:6px }
[data-theme=lumen] .archive-heading { color:var(--text) }
[data-theme=lumen] .command-core { padding-top:4rem }
[data-theme=lumen] .simulation-number { display:none }
[data-theme=lumen] .core-caption { color:var(--text-2); margin-bottom:1.7rem; letter-spacing:.2em }
[data-theme=lumen] .round-center {
  background:radial-gradient(circle at 35% 25%,#fff 10%,#f4f9fc 60%,#d5e2ec);
  border:1px solid #adc3d2; border-radius:50%; box-shadow:0 12px 26px #2d577423,inset 0 0 0 7px #ffffffa0;
}
[data-theme=lumen] .round-center::before {
  content:''; position:absolute; inset:14%; border:1px solid #a9bfce; border-radius:50%;
}
[data-theme=lumen] .round-value { color:var(--text); font-weight:300; text-shadow:none; top:0 }
[data-theme=lumen] .hud-state { color:var(--blue); top:0; margin-top:.35rem; font-weight:600 }
[data-theme=lumen] .arena-dial { inset:5%; border-color:#a7bed0; border-style:dashed }
[data-theme=lumen] .arena-dial::after { width:5px; height:5px; border-radius:50%; box-shadow:none; background:var(--blue) }
[data-theme=lumen] .core-footnote,[data-theme=lumen] .core-note { color:var(--text-2) }
[data-theme=lumen] .core-footnote { margin-top:1.2rem }
[data-theme=lumen] .btn.primary,[data-theme=lumen] #startBtn {
  background:#275eb0; color:#fff; border:1px solid #275eb0; border-radius:6px;
  box-shadow:0 5px 12px #234e8c24; clip-path:none;
}
[data-theme=lumen] #startBtn { font-size:1.2rem; letter-spacing:.08em; min-height:4rem }
[data-theme=lumen] #startBtn small { font-family:var(--font); opacity:.85 }
[data-theme=lumen] .spdbtn { background:#f7fbfd; color:var(--text-2); border-color:var(--line); border-radius:4px; min-height:44px }
[data-theme=lumen] .spdbtn.on { color:#1b509a; background:#dceaf7; border-color:#6997c7; box-shadow:inset 0 -2px #275eb0 }
[data-theme=lumen] .spdbtn:hover:not(.on) { background:#e7f0f7 }
[data-theme=lumen] .match-config input { color:var(--text); background:#fff; border-color:#9db4c3; border-radius:4px }
[data-theme=lumen] .text-btn:hover { color:#173757; text-decoration:underline; text-underline-offset:4px }
[data-theme=lumen] .text-btn:disabled:hover { text-decoration:none }
[data-theme=lumen] .event-readout { background:#f8fbfbe6; border:1px solid var(--line); border-radius:6px; padding:.6rem 1rem }
[data-theme=lumen] .event-readout.heal :is(.event-tag,#eventAmount) { color:var(--green) }
[data-theme=lumen] .event-readout.crit :is(.event-tag,#eventAmount) { color:#935216 }
[data-theme=lumen] .event-readout.miss .event-tag { color:#6d5095 }
[data-theme=lumen] .float-number { color:#184f87; text-shadow:0 2px 2px #fff,0 0 7px #fff; background:#ffffffdc; border-radius:4px }
[data-theme=lumen] .float-number.crit { color:#934a16 }
[data-theme=lumen] .float-number.heal { color:var(--green) }
[data-theme=lumen] .float-number.miss { color:#6d5095 }
[data-theme=lumen] .pcard[data-action=impact] .card-face { filter:none; box-shadow:0 8px 24px #aa4d4626 }
[data-theme=lumen] .pcard[data-action=recover] .card-face { filter:none; box-shadow:0 8px 24px #24745926 }
[data-theme=lumen] .pcard[data-action=fallen] .card-face { filter:saturate(.5) }
[data-theme=lumen] .victorious .card-face::before { filter:none; border-color:var(--team); box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--team) 12%,transparent) }
[data-theme=lumen] .fallen .identity { opacity:.55 }
[data-theme=lumen] .telemetry { background:#fbfdfeeF; border-color:var(--line); border-radius:10px; box-shadow:none; padding:1.2rem 1.5rem }
[data-theme=lumen] .log-head { color:var(--text) }
[data-theme=lumen] .log-empty svg { stroke:#8daec4 }
[data-theme=lumen] .le { color:var(--text-2); border-color:#dce6ec }
[data-theme=lumen] .le.current { background:#edf4fa }
[data-theme=lumen] .le.crit .amt { color:#90501a }
[data-theme=lumen] .le.death { color:var(--red) }
[data-theme=lumen] .summary-panel :is(th,td) { border-color:#dce6ec }
[data-theme=lumen] .summary-metrics strong { color:var(--text) }
[data-theme=lumen] .result-panel {
  background:linear-gradient(110deg,#fff,#edf5fb); color:var(--text); border:1px solid #98b7cd;
  border-radius:10px; box-shadow:var(--shadow); --result-accent:var(--blue);
}
[data-theme=lumen] .result-panel.win1 { --result-accent:var(--red); background:linear-gradient(110deg,#fff,#fcf0f1); border-color:#c8a1a6 }
[data-theme=lumen] .result-panel.draw { --result-accent:var(--text-2); background:#f5f8fa; border-color:#adbfc9 }
[data-theme=lumen] .result-panel::before { content:''; position:absolute; top:0; left:1.5rem; right:1.5rem; height:2px; background:var(--result-accent) }
[data-theme=lumen] .result-verdict { color:var(--result-accent); font-size:1.8rem; font-weight:300; letter-spacing:.04em }
[data-theme=lumen] .result-title { color:var(--result-accent); font-weight:600 }
[data-theme=lumen] .result-medal { color:var(--result-accent) }
[data-theme=lumen] .result-medal>span { display:grid; place-items:center; height:100%; font-size:1.8rem; border:1px solid var(--line); border-radius:50% }
[data-theme=lumen] .result-hp>span { display:block }
[data-theme=lumen] .site-footer { color:var(--text-2) }
/* Functional annotations remain readable; tiny engraving is confined to the SVG. */
[data-theme=lumen] :is(.selection-heading>span,.lvl-head label,.fighter-label,.hud-foot,.hud-hp small,.log-count,.summary-metrics small,.summary-panel caption,.archive-heading span,.card-english,.brand-motto small,.site-footer) { font-size:.6875rem }
[data-theme=lumen] :is(.rar-badge,.role-badge,.bp-comparison,.text-btn) { font-size:.75rem }
[data-theme=lumen] .stats-grid .stat-row { font-size:.75rem }

@media(min-width:1001px) and (max-width:1200px) {
  [data-theme=lumen] .card-face { padding:1.2rem }
  [data-theme=lumen] .bp-value { font-size:1.8rem }
  [data-theme=lumen] .rarity-letter { left:1.2rem; font-size:1.4rem }
  [data-theme=lumen] .cname { font-size:1.35rem }
}
@media(max-width:1000px) {
  [data-theme=lumen] .app { padding-top:1.25rem }
  [data-theme=lumen] .site-header { margin-bottom:1.5rem }
  [data-theme=lumen] .site-header h1 { font-size:1.05rem; letter-spacing:.08em }
  [data-theme=lumen] .lab-backdrop { background-position:60% top; background-size:auto 100vh }
  [data-theme=lumen] .lab-backdrop::after { background:#edf2f577 }
  [data-theme=lumen] .card-face { padding:1.2rem 1.35rem }
  [data-theme=lumen] .bp-value { font-size:2rem }
  [data-theme=lumen] .rarity-letter { left:1.35rem }
  [data-theme=lumen] .command-core { padding-top:0 }
  [data-theme=lumen] .match-config { background:#f8fbfc; border-radius:6px }
  [data-theme=lumen] :is(.ctrl-btns,.speed-seg) { background:#f5f9fc; border-top-color:#a9bfce; box-shadow:0 -4px 16px #2e547318 }
  [data-theme=lumen] #startBtn { min-height:3.7rem; font-size:1.05rem }
  [data-theme=lumen] .round-value { font-size:2.6rem }
  [data-theme=lumen] .telemetry { padding:.75rem 1rem }
  [data-theme=lumen] .app:not([data-phase=ready]) .card-face::before {
    inset:0; background:none; border:1px solid #afc5d4; border-radius:14px; box-shadow:none; clip-path:none;
  }
  [data-theme=lumen] .app:not([data-phase=ready]) .rarity-art { margin:0 }
  [data-theme=lumen] .app:not([data-phase=ready]) :is(.rar-badge,.role-badge) { font-size:.6875rem }
  [data-theme=lumen] .result-right { flex-wrap:wrap }
  [data-theme=lumen] .result-actions { min-width:8rem }
  [data-theme=lumen] #replayBtn,[data-theme=lumen] .lvl-val input { min-height:44px }
}
@media(max-width:370px) {
  [data-theme=lumen] .site-header h1 { font-size:.9rem }
  [data-theme=lumen] .card-face { padding:1.1rem }
  [data-theme=lumen] .bp-value { font-size:1.65rem }
  [data-theme=lumen] #startBtn { font-size:.95rem }
  [data-theme=lumen] .summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem }
}

/* Shared finishing: functional information has a readable floor in every world.
   Engraving remains decorative; no gameplay value is hidden inside an image. */
html[data-theme=collector] { --text-3:#a4afaa }
html[data-theme=collector] .lab-backdrop::after { background:linear-gradient(#050a0c22,#050a0c66 75%,#050a0cb3) }
html[data-theme] :is(.selection-heading>span,.lvl-head label,.fighter-label,.hud-foot,.hud-hp small,.log-count,.summary-metrics small,.summary-panel caption,.archive-heading span,.card-english,.site-footer,.speed-label,.match-config label,.round-label,.hud-state,.result-hp-label,.result-meta) { font-size:.75rem }
html[data-theme] :is(.text-btn,.stats-toggle,.spdbtn,.lvl-val input) { min-height:44px }
html[data-theme] #replayBtn { min-height:44px }
html[data-theme] :is(.text-btn,#replayBtn) { font-size:.75rem }
html[data-theme] .summary-panel :is(th,td) { font-size:.8125rem }
html[data-theme] :is(.bp-value,.hud-hp,.stat-tile .v,.summary-metrics strong) { font-variant-numeric:tabular-nums }
html[data-theme=lumen] .card-face { box-shadow:0 14px 30px #27435b21,inset 0 1px 0 #fff }
html[data-theme=lumen] .card-english { letter-spacing:.08em }
html[data-theme=lumen] .card-material::after { font-size:.625rem }
/* Defeat is conveyed by HP and the crest; identity text must stay readable. */
html[data-theme] .fallen .identity { opacity:1 }
html[data-theme] .fallen .rarity-art { opacity:.45 }
.emblem .edition-emblem,.result-medal .edition-emblem { display:none }

/* FOLIO — uncoated print stock, forest ink, registration and ranked impressions. */
html[data-theme=folio] {
  --bg:#eee8d9; --surface:#faf6eb; --surface-muted:#e6e0d0;
  --text:#203c32; --text-2:#4d5d4f; --text-3:#596353; --line:#b5b9a7;
  --gold:#26503c; --blue:#245c83; --red:#a13836; --green:#29653d;
  --focus:#224c38; --edition:#29513b; --display:Georgia,"Songti SC",SimSun,serif;
  --shape:2px; --panel-shadow:0 7px 18px #51462a16;
}
/* PULSE — polymer cartridges, amber phosphor and discrete signal gates. */
html[data-theme=pulse] {
  --bg:#18121d; --surface:#241c2c; --surface-muted:#312536;
  --text:#f4e6d8; --text-2:#cbbbcb; --text-3:#b7a6b7; --line:#65516b;
  --gold:#ffc28b; --blue:#97d5f4; --red:#ffa6a8; --green:#b3e2ac;
  --focus:#ffe0bd; --edition:#ffc28b; --display:Consolas,"Cascadia Mono",monospace;
  --shape:12px; --panel-shadow:0 14px 25px #07050d55;
}
[data-theme=folio] .lab-backdrop { background:var(--bg) url('assets/folio-paper.webp') center top/cover no-repeat }
[data-theme=pulse] .lab-backdrop { background:var(--bg) url('assets/pulse-surface.webp') center top/cover no-repeat }
[data-surface=edition] .lab-backdrop::after { background:linear-gradient(transparent,var(--bg)) }
[data-surface=edition] * { scrollbar-color:var(--line) var(--surface) }
[data-surface=edition] ::selection { background:var(--gold); color:var(--bg) }
[data-surface=edition] input { caret-color:var(--focus) }
[data-surface=edition] :is(button,input,select,[tabindex]):focus-visible { outline-color:var(--focus) }
[data-surface=edition] .app { padding-top:1.7rem }
[data-surface=edition] .site-header { margin-bottom:2rem }
[data-surface=edition] .site-header h1 { color:var(--text); font-size:1.7rem; letter-spacing:.08em }
[data-surface=edition] :is(.brand-motto,.site-header p,.core-caption,.core-note,.core-footnote) { color:var(--text-2) }
[data-surface=edition] .site-header h1::before,
[data-surface=edition] .site-header h1::after { background:var(--line); width:2rem }
[data-surface=edition] :is(.wall-copy,.simulation-number,.card-aside,.arena-ambient) { display:none }
[data-surface=edition] .selection-bar { margin:0 0 .8rem }
[data-surface=edition] .card-picker { border:1px solid var(--line); background:var(--line); border-radius:var(--shape); box-shadow:none; overflow:hidden }
[data-surface=edition] .card-picker :is(input,select) { background:var(--surface); color:var(--text); min-height:44px; border-radius:0 }
[data-surface=edition] input::placeholder { color:var(--text-3); opacity:1 }
[data-surface=edition] .card-picker:focus-within { border-color:var(--focus) }
[data-surface=edition] .card-face {
  padding:1.3rem 1.8rem; border-radius:var(--shape); background:var(--surface);
  box-shadow:var(--panel-shadow); filter:none;
}
[data-surface=edition] .card-face::before { inset:0; background:none; border:1px solid var(--line); border-radius:var(--shape); filter:none; clip-path:none; box-shadow:none }
[data-surface=edition] :is(.card-ornament,.ambient-particles,.card-frame,.card-edge-light) { display:none }
[data-surface=edition] .card-rail { color:var(--text-3); min-height:1.8rem; padding:0; border-bottom:1px solid var(--line) }
[data-surface=edition] .micro-brand { margin:0; letter-spacing:.07em }
[data-surface=edition] .card-serial::before { color:var(--text-3) }
[data-surface=edition] .rarity-letter { display:none }
[data-surface=edition] .rarity-art { max-width:17rem; margin:.8rem auto .2rem }
[data-surface=edition] .rarity-art::before { display:none }
[data-surface=edition] .emblem { filter:none; color:var(--edition) }
[data-surface=edition] .collector-emblem { display:none }
[data-theme=folio] :is(.emblem,.result-medal) .folio-emblem,
[data-theme=pulse] :is(.emblem,.result-medal) .pulse-emblem { display:block; color:var(--edition) }
[data-theme=folio] .edition-glyph { font-family:Georgia,"Times New Roman",serif }
[data-theme=pulse] .edition-glyph { font-family:Consolas,"Cascadia Mono",monospace; letter-spacing:-.04em }
[data-surface=edition] .cname { color:var(--text); font-size:1.65rem; letter-spacing:.03em; font-weight:650 }
[data-surface=edition] .rar-badge { color:var(--edition); font-size:.75rem }
[data-surface=edition] .rar-badge::before { background:var(--edition); box-shadow:none; width:5px; height:5px }
[data-surface=edition] .card-english { color:var(--text-3); letter-spacing:.08em }
[data-surface=edition] .power-strip { background:none; border-color:var(--line); margin-top:1rem; padding:1rem 0 }
[data-surface=edition] .bp-value { font-family:var(--display); color:var(--text); font-size:2.3rem; letter-spacing:-.04em }
[data-surface=edition] .lvl-val input { color:var(--text); background:var(--surface); border-color:var(--line) }
[data-surface=edition] input[type=range]::-webkit-slider-runnable-track { background:var(--line); height:3px }
[data-surface=edition] input[type=range]::-webkit-slider-thumb { background:var(--gold); border:2px solid var(--surface); width:16px; height:20px; border-radius:2px; box-shadow:0 1px 3px #0003 }
[data-surface=edition] input[type=range]::-moz-range-track { background:var(--line) }
[data-surface=edition] input[type=range]::-moz-range-thumb { background:var(--gold); border-color:var(--surface); border-radius:2px }
[data-surface=edition] .core-stats { border-color:var(--line) }
[data-surface=edition] .stat-code { color:var(--text-3) }
[data-surface=edition] :is(.stat-tile .v,.stat-row .v) { color:var(--text) }
[data-surface=edition] .hpbar-wrap { background:var(--surface-muted); height:6px; box-shadow:none; border-radius:0 }
[data-surface=edition] .hpbar { background:var(--team) }
[data-surface=edition] .hp-trail { background:var(--text-3) }
[data-surface=edition] .card-signature { border-color:var(--line); color:var(--text-3) }
[data-surface=edition] .card-signature .card-material { font-size:0 }
[data-surface=edition] .card-material::after { font-size:.625rem; letter-spacing:.1em }
[data-theme=folio] .card-material::after { content:'棉纸压印 / COTTON STOCK' }
[data-theme=pulse] .card-material::after { content:'信号卡匣 / SIGNAL MODULE' }
[data-surface=edition] .card-config { margin:1rem 0 0; background:var(--surface); border-color:var(--line); border-radius:var(--shape); box-shadow:none }
[data-surface=edition] .archive-heading { color:var(--text) }
[data-surface=edition] .command-core { padding-top:4rem }
[data-surface=edition] .core-caption { margin-bottom:1.7rem; letter-spacing:.16em }
[data-surface=edition] .round-center { background:var(--surface); border:1px solid var(--line); border-radius:var(--shape); box-shadow:var(--panel-shadow) }
[data-surface=edition] .round-center::before { content:''; position:absolute; inset:7%; border:1px solid var(--line); border-radius:var(--shape) }
[data-surface=edition] .arena-dial { display:none }
[data-surface=edition] .round-value { color:var(--gold); font-family:var(--display); text-shadow:none; top:0 }
[data-surface=edition] .hud-state { top:0; margin-top:.35rem; color:var(--gold) }
[data-surface=edition] .core-footnote { margin-top:1.2rem }
[data-surface=edition] .btn.primary,
[data-surface=edition] #startBtn { color:var(--surface); background:var(--gold); border:1px solid var(--gold); border-radius:var(--shape); clip-path:none; box-shadow:0 5px 10px #0002; min-height:4rem; font-size:1.2rem; letter-spacing:.05em }
[data-surface=edition] #startBtn small { opacity:.85 }
[data-surface=edition] .spdbtn { background:var(--surface); color:var(--text-2); border-color:var(--line); border-radius:var(--shape) }
[data-surface=edition] .spdbtn.on { color:var(--text); background:var(--surface-muted); border-color:var(--gold); box-shadow:inset 0 -2px var(--gold) }
[data-surface=edition] .match-config input { background:var(--surface); color:var(--text); border-color:var(--line); border-radius:var(--shape) }
[data-surface=edition] .text-btn:hover { color:var(--text); text-decoration:underline; text-underline-offset:4px }
[data-surface=edition] .event-readout { background:var(--surface); border:1px solid var(--line); border-radius:var(--shape); padding:.7rem 1rem }
[data-surface=edition] .float-number { color:var(--blue); background:var(--surface); padding:0 .3rem; text-shadow:none }
[data-surface=edition] .float-number.crit { color:var(--red) }
[data-surface=edition] .float-number.heal { color:var(--green) }
[data-surface=edition] .float-number.miss { color:var(--text-2) }
[data-surface=edition] .pcard[data-action=impact] .card-face { filter:none; outline:2px solid var(--red); outline-offset:-2px }
[data-surface=edition] .pcard[data-action=recover] .card-face { filter:none; outline:2px solid var(--green); outline-offset:-2px }
[data-surface=edition] .pcard[data-action=fallen] .card-face { filter:saturate(.5) }
[data-surface=edition] .victorious .card-face::before { border-color:var(--team); filter:none; box-shadow:inset 0 0 0 1px var(--team) }
[data-surface=edition] .telemetry { background:var(--surface); border-color:var(--line); border-radius:var(--shape); box-shadow:none; padding:1.4rem 1.5rem }
[data-surface=edition] .log-head { color:var(--text) }
[data-surface=edition] .log-empty svg { stroke:var(--text-3) }
[data-surface=edition] .le { color:var(--text-2); border-color:var(--line) }
[data-surface=edition] .le.current { background:var(--surface-muted) }
[data-surface=edition] .le.crit .amt { color:var(--red) }
[data-surface=edition] .le.death { color:var(--red) }
[data-surface=edition] .summary-panel :is(th,td) { border-color:var(--line) }
[data-surface=edition] .summary-metrics strong { color:var(--text) }
[data-surface=edition] .result-panel { background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:var(--shape); box-shadow:var(--panel-shadow); --result-accent:var(--blue) }
[data-surface=edition] .result-panel.win1 { --result-accent:var(--red) }
[data-surface=edition] .result-panel.draw { --result-accent:var(--text-2) }
[data-surface=edition] .result-panel::before { background:none; border:0 }
[data-surface=edition] .result-verdict { font-family:var(--display); color:var(--result-accent); letter-spacing:0; font-size:2.25rem }
[data-surface=edition] .result-title { color:var(--result-accent) }
[data-surface=edition] .result-medal>span { display:grid; place-items:center; height:100%; font:2rem var(--display); border:1px solid var(--line) }
[data-surface=edition] .result-hp>span { display:block }
[data-surface=edition] .site-footer { color:var(--text-2) }

/* Two independent constructions, beyond their shared component semantics. */
[data-theme=folio] .card-face { background:linear-gradient(#faf6ebed,#faf6ebed),url('assets/folio-paper.webp') center/cover }
[data-theme=folio] .card-face::before { inset:.55rem; border:1px solid #81917e }
[data-theme=folio] .identity { text-align:left }
[data-theme=folio] .name-row { justify-content:flex-start }
[data-theme=folio] .cname { font-family:"Songti SC",SimSun,Georgia,serif; font-weight:700 }
[data-theme=folio] .card-english { text-align:left }
[data-theme=folio] .power-strip { border-top:2px solid var(--gold); border-bottom:1px solid var(--line) }
[data-theme=folio] .round-center { border:0; background:transparent; box-shadow:none; border-radius:0 }
[data-theme=folio] .round-center::before { inset:8% 0; border:0; border-top:3px double var(--gold); border-bottom:3px double var(--gold); border-radius:0 }
[data-theme=folio] .round-value { font-style:italic; font-size:5rem; font-weight:400 }
[data-theme=folio] .round-label { color:var(--text-2) }
[data-theme=folio] .result-verdict { font-style:italic; border-bottom:1px solid var(--result-accent); padding-bottom:.3rem }
[data-theme=folio] .result-panel { border-top:3px double var(--result-accent) }
[data-theme=folio] .telemetry { border-top:3px double var(--gold) }
[data-theme=folio] .log-head { font-family:var(--display); font-weight:600 }
[data-theme=folio] .pcard[data-action=attack] .edition-emblem { animation:ink-strike 240ms ease-out }
[data-theme=pulse] .site-header h1 { font-family:var(--display); font-weight:600; letter-spacing:.02em }
[data-theme=pulse] .card-face { border-top:6px solid #59455d; border-bottom:6px solid #59455d }
[data-theme=pulse] .card-rail { border-bottom:0; border-radius:3px; background:#15111b; padding:0 .5rem }
[data-theme=pulse] .power-strip { background:#16111d; padding:1rem .7rem; border:1px solid #65516b; border-radius:5px }
[data-theme=pulse] .bp-value { font-size:2.05rem; color:var(--gold) }
[data-theme=pulse] .round-center { background:#100e17; border:6px solid #59455d; border-radius:22px }
[data-theme=pulse] .round-center::before { border-color:#7d5c50; border-radius:12px; inset:6% }
[data-theme=pulse] .round-center::after { content:''; position:absolute; bottom:17%; left:28%; right:28%; height:3px; background:var(--gold); opacity:.65 }
[data-theme=pulse] .round-value { font-size:3.5rem }
[data-theme=pulse] .hud-state { margin-top:.5rem }
[data-theme=pulse] .card-config { border-style:dashed }
[data-theme=pulse] .summary-metrics strong { font-family:var(--display); color:var(--gold) }
[data-theme=pulse] .result-panel { background:#211928; border-top:6px solid #59455d }
[data-theme=pulse] .result-verdict { font-size:1.9rem; letter-spacing:.04em }
[data-theme=pulse] .pcard[data-action=attack] .signal-trace { animation:signal-fire 280ms steps(4,end) }
@keyframes ink-strike { 0% { opacity:.5; transform:translateY(-3px) } 55% { opacity:1; transform:translateY(2px) } 100% { transform:translateY(0) } }
@keyframes signal-fire { 0%,50% { stroke-width:4; opacity:.35 } 25%,75%,100% { stroke-width:1.5; opacity:1 } }
@media(min-width:1001px) and (max-width:1200px) {
  [data-surface=edition] .card-face { padding:1.2rem }
  [data-surface=edition] .bp-value { font-size:1.65rem }
}
@media(max-width:1000px) {
  html[data-theme] .theme-picker { width:min(100%,18rem); display:flex; align-items:center; gap:.65rem }
  html[data-theme] .theme-picker label { flex-shrink:0; margin:0 }
  html[data-theme] .theme-picker select { min-width:0; font-size:16px }
  [data-surface=edition] .app { padding-top:1.25rem }
  [data-surface=edition] .site-header h1 { font-size:1.05rem }
  [data-surface=edition] .card-face { padding:1.2rem 1.35rem }
  [data-surface=edition] .command-core { padding-top:0 }
  [data-surface=edition] .match-config { background:var(--surface); border-radius:var(--shape) }
  [data-surface=edition] :is(.ctrl-btns,.speed-seg) { background:var(--bg); border-color:var(--line); box-shadow:0 -4px 12px #0002 }
  [data-surface=edition] #startBtn { min-height:3.7rem; font-size:1rem }
  [data-surface=edition] .round-value { font-size:2.6rem }
  [data-surface=edition] .telemetry { padding:.75rem 1rem }
  [data-surface=edition] .app:not([data-phase=ready]) .card-face::before { inset:0; background:none; clip-path:none; border:1px solid var(--line); border-radius:var(--shape); box-shadow:none }
  [data-surface=edition] .app:not([data-phase=ready]) .rarity-art { margin:0 }
  html[data-theme] .app:not([data-phase=ready]) :is(.rar-badge,.role-badge) { font-size:.6875rem }
  [data-surface=edition] .result-right { flex-wrap:wrap }
  [data-surface=edition] .result-actions { min-width:8rem }
  [data-theme=pulse] .round-center { border-width:3px; border-radius:12px }
  [data-theme=pulse] .round-center::before { border-radius:7px }
  [data-theme=pulse] .round-center::after { bottom:12% }
  [data-theme=folio] .round-center::before { inset:5% 0 }
}
@media(max-width:370px) {
  [data-surface=edition] .site-header h1 { font-size:.9rem }
  [data-surface=edition] .card-face { padding:1.1rem }
  [data-surface=edition] .bp-value { font-size:1.65rem }
  html[data-theme] .summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem }
  html[data-theme] .theme-picker { gap:.4rem }
}
@media(prefers-reduced-motion:reduce) {
  [data-surface=edition] .pcard[data-action=attack] :is(.edition-emblem,.signal-trace) { animation:none }
}
.page-hidden .pcard[data-action=attack] :is(.edition-emblem,.signal-trace),
.pcard:not(.in-view)[data-action=attack] :is(.edition-emblem,.signal-trace) { animation-play-state:paused }

/* A text-size-aware fallback: pixel breakpoints alone miss 200% text zoom. */
.app { container:app-space / inline-size }
@media(min-width:1001px) {
  @container app-space (max-width:50rem) {
    .setup { grid-template-columns:minmax(0,1fr); max-width:34rem; margin-inline:auto }
    html[data-theme] .theme-picker { position:relative; margin:1rem auto 0 }
    html[data-theme] .site-header h1 { overflow-wrap:anywhere }
    .site-header h1::before,.site-header h1::after { display:none }
    html[data-theme] .command-core { max-width:24rem; width:100%; justify-self:center; padding-top:0 }
    .telemetry { grid-template-columns:minmax(0,1fr) }
    .simulation-summary { border-left:0; padding-left:0 }
    html[data-theme] .result-panel { flex-wrap:wrap }
    .result-right { margin-left:0; flex-wrap:wrap; width:100%; justify-content:space-between }
    .card-rail { flex-wrap:wrap }
  }
}
@media(max-width:1000px) {
  html[data-theme] .result-actions .btn.primary { font-size:.875rem; min-height:44px; padding:.65rem }
  .result-panel { scroll-margin-bottom:6rem }
}
/* Collector V3 details and PULSE V1 signal traces share the existing lifecycle. */
.collector-emblem .rank-core,.collector-emblem .rank-detail { transform-origin:120px 120px }
.collector-emblem .rank-detail { opacity:.35 }
.collector-emblem .rank-detail { animation:rank-metal 12s ease-in-out infinite }
.pulse-emblem[data-tier="6"] .signal-trace,
.pulse-emblem[data-tier="8"] .signal-trace { stroke-dasharray:60 15; animation:rank-signal 6s linear infinite }
.pulse-emblem[data-tier="7"] .signal-trace { stroke-dasharray:20 8; animation:rank-signal 4s steps(8) infinite }
.pulse-emblem[data-tier="11"] .signal-trace { stroke-dasharray:120 24; animation:rank-signal 8s linear infinite }
.rank-label { paint-order:stroke fill; stroke-width:.3px }
[data-theme=folio] .rank-label { font-family:Georgia,serif }
[data-theme=pulse] .rank-glyph { font-family:Consolas,"Cascadia Mono",monospace }
.pcard[data-action=impact] .collector-emblem .rank-core { opacity:.7 }
.pcard[data-action=recover] .collector-emblem .rank-detail { stroke:var(--green); opacity:.85 }
.pcard.victorious .collector-emblem .rank-detail { opacity:.8 }
.pcard.fallen .collector-emblem .rank-detail { animation:none; opacity:.12 }
.page-hidden .collector-emblem :is(.rank-detail,.rank-core),.page-hidden .signal-trace,
.pcard:not(.in-view) .collector-emblem :is(.rank-detail,.rank-core),.pcard:not(.in-view) .signal-trace { animation-play-state:paused }
@keyframes rank-metal { 0%,65%,100%{opacity:.18} 78%{opacity:.7} }
@keyframes rank-signal { to{stroke-dashoffset:-150} }
@media(prefers-reduced-motion:reduce) {
  .collector-emblem :is(.rank-detail,.rank-core),.signal-trace { animation:none!important; transform:none!important }
}
/* The compact crest must fit inside identity, above the HP row, including long names. */
@media(max-width:1000px) {
  html[data-theme] .app:not([data-phase=ready]) .identity { height:auto; min-height:5.4rem; padding-right:5.4rem }
  html[data-theme] .app:not([data-phase=ready]) .rarity-art { top:0; right:-.1rem; width:5.2rem; height:5.2rem }
}

/* V1 text stays crisp; the native rarity badge remains the accessible label. */
.edition-glyph,.rank-certification { pointer-events:none }

/* The catalogue carries no full crests or external images. It is idle when closed. */
.theme-browser { margin:1rem auto 0; max-width:64rem; text-align:left }
.theme-browser summary { width:fit-content; margin:auto; min-height:44px; padding:.6rem .9rem; cursor:pointer; color:var(--text-2); font-size:.8125rem }
.theme-browser summary:hover { color:var(--gold) }
.theme-browser summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px }
.theme-gallery { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.7rem; padding:1rem 0 }
.theme-gallery button { display:grid; grid-template-columns:2.4rem minmax(0,1fr); grid-template-rows:auto auto; gap:.3rem .65rem; align-items:center; text-align:left; padding:.85rem; border:1px solid var(--line); border-radius:4px; background:var(--bg); color:var(--text) }
.theme-gallery button>span:last-child { grid-column:2; font-size:.75rem; line-height:1.6; color:var(--text-2) }
.theme-gallery strong { font-size:.8125rem; overflow-wrap:anywhere }
.theme-gallery button[aria-pressed=true] { outline:2px solid var(--gold); outline-offset:2px }
.theme-gallery button:hover { border-color:var(--gold) }
.theme-preview { grid-row:1 / 3; width:2.4rem; height:2.7rem; background:#111b1d; border:3px double #d8bd88; clip-path:polygon(20% 0,80% 0,100% 20%,100% 80%,80% 100%,20% 100%,0 80%,0 20%) }
[data-theme-id=lumen] .theme-preview { background:#f7fcff; border:5px double #809eaf; border-radius:50%; clip-path:none }
[data-theme-id=folio] .theme-preview { background:#f7efd9; border:4px double #315540; clip-path:none }
[data-theme-id=pulse] .theme-preview { background:#261b30; border:5px solid #7c5d59; border-radius:8px; clip-path:none }
[data-theme-id=nocturne] .theme-preview { background:#162940; border:1px solid #b6cce1; clip-path:polygon(50% 0,100% 40%,83% 100%,17% 100%,0 40%) }
[data-theme-id=sumi] .theme-preview { background:#f4f5f1; border:3px solid #2e3438; border-radius:38% 4% 30% 5%; clip-path:none; transform:rotate(-6deg) }
[data-theme-id=arcade] .theme-preview { background:#f5bb42; border:4px solid #4550a1; clip-path:polygon(20% 0,80% 0,80% 20%,100% 20%,100% 80%,80% 80%,80% 100%,20% 100%,20% 80%,0 80%,0 20%,20% 20%) }
[data-theme-id=verdant] .theme-preview { background:#e0e4cd; border:2px solid #65765b; border-radius:0 65% 0 65%; clip-path:none; transform:rotate(-15deg) }

/* NOCTURNE — a quiet blue survey plate; axial stars, silver coordinates. */
html[data-theme=nocturne] {
  --bg:#101e32; --surface:#182b43; --surface-muted:#223d57;
  --text:#e5edf4; --text-2:#bccddc; --text-3:#aec3d4; --line:#59738d;
  --gold:#c4d9ee; --blue:#91d4ff; --red:#ffaaaa; --green:#98e2b8;
  --focus:#e0f1ff; --edition:#c6dcf0; --display:"Segoe UI","Microsoft YaHei",sans-serif;
  --shape:3px; --panel-shadow:0 12px 28px #040d1c44;
}
/* SUMI — cool white fibre, asymmetrical ink impressions, quiet open margins. */
html[data-theme=sumi] {
  --bg:#eeefed; --surface:#fafbf8; --surface-muted:#e0e3e0;
  --text:#242e34; --text-2:#4e5a60; --text-3:#5b656a; --line:#a3aeae;
  --gold:#343e43; --blue:#235f92; --red:#ab393c; --green:#216b4a;
  --focus:#245981; --edition:#343e43; --display:"Songti SC",SimSun,Georgia,serif;
  --shape:1px; --panel-shadow:0 6px 20px #313e4410;
}
/* ARCADE — warm plastic body, stepped dies, tactile indigo buttons. */
html[data-theme=arcade] {
  --bg:#ecebe5; --surface:#fffdf6; --surface-muted:#e2e3ed;
  --text:#292e46; --text-2:#51566c; --text-3:#606477; --line:#969db5;
  --gold:#424b9b; --blue:#255ca1; --red:#ac3549; --green:#26703e;
  --focus:#343d8c; --edition:#424b9b; --display:"Segoe UI","Microsoft YaHei",sans-serif;
  --shape:8px; --panel-shadow:0 9px 18px #40456820;
}
/* VERDANT — chalk, terracotta and botanical sections; organic, not green paper. */
html[data-theme=verdant] {
  --bg:#eeeee5; --surface:#fafaf1; --surface-muted:#e2e7d6;
  --text:#384238; --text-2:#56614e; --text-3:#626a58; --line:#a5af97;
  --gold:#875340; --blue:#2c6189; --red:#a33e43; --green:#206d48;
  --focus:#73432f; --edition:#536b42; --display:Georgia,"Songti SC",SimSun,serif;
  --shape:16px; --panel-shadow:0 9px 24px #5f67451c;
}
[data-surface=edition] .extension-emblem { display:block; color:var(--edition) }
.extension-emblem .rank-detail,.extension-emblem .rank-core { transform-origin:120px 120px }
[data-theme=nocturne] .lab-backdrop { background:radial-gradient(ellipse at 95% 0,#2c4260 0,transparent 43%),var(--bg) }
[data-theme=sumi] .lab-backdrop { background:linear-gradient(112deg,#d8dedb 0,transparent 19%,transparent 85%,#dfe3e0),var(--bg) }
[data-theme=arcade] .lab-backdrop { background:linear-gradient(135deg,#d8dbed 0,transparent 30%,transparent 75%,#e5d6ba),var(--bg) }
[data-theme=verdant] .lab-backdrop { background:radial-gradient(ellipse at 0 0,#dce3ca 0,transparent 55%),linear-gradient(120deg,transparent 70%,#e8d9cc),var(--bg) }
[data-surface=edition] .extension-glyph { font-family:var(--display); letter-spacing:-.03em }
[data-surface=edition] .pcard[data-action=recover] .extension-emblem .rank-detail { stroke:var(--green); stroke-width:4 }
[data-surface=edition] .pcard[data-action=evade] .extension-emblem { opacity:.6 }
[data-surface=edition] .pcard[data-action=fallen] .extension-emblem { opacity:.4 }
[data-surface=edition] .pcard[data-action=recover] .extension-emblem { color:var(--edition) }
[data-surface=edition] .pcard[data-action=recover] .card-face { outline-color:var(--green) }

[data-theme=nocturne] .site-header h1 { font:500 1.6rem/1.4 var(--font); letter-spacing:.16em }
[data-theme=nocturne] .card-face { background:linear-gradient(115deg,#1f354e,var(--surface) 52%); border:1px solid var(--line); border-radius:3px 22px 3px 3px }
[data-theme=nocturne] .card-face::before { inset:.6rem; border:0; border-top:1px solid #7892a966; border-bottom:1px solid #7892a966 }
[data-theme=nocturne] .card-rail { border-bottom:0; font-family:Consolas,monospace }
[data-theme=nocturne] .identity { position:relative }
[data-theme=nocturne] .cname { font-weight:450; letter-spacing:.14em }
[data-theme=nocturne] .card-material::after { content:'天文测绘 / CELESTIAL SURVEY' }
[data-theme=nocturne] .power-strip { border-top:1px dashed var(--line); border-bottom:1px solid var(--line) }
[data-theme=nocturne] .bp-value { font-weight:300 }
[data-theme=nocturne] .card-config { border-left:0; border-right:0; background:#15263c }
[data-theme=nocturne] .round-center { border:0; background:transparent; box-shadow:none }
[data-theme=nocturne] .round-center::before { inset:8%; border:1px solid var(--line); border-radius:0; transform:rotate(45deg) }
[data-theme=nocturne] .round-center::after { content:''; position:absolute; inset:0; background:linear-gradient(var(--line),var(--line)) center/1px 100% no-repeat,linear-gradient(90deg,var(--line),var(--line)) center/100% 1px no-repeat; opacity:.3; pointer-events:none }
[data-theme=nocturne] .round-value { font-size:4rem; font-weight:250; z-index:1 }
[data-theme=nocturne] .hud-state { background:var(--bg); z-index:1; padding:0 .6rem }
[data-theme=nocturne] #startBtn { background:#c4d9ee; color:#172b42; border-radius:2px; box-shadow:0 4px 18px #06102144 }
[data-theme=nocturne] .result-panel { border:1px solid var(--result-accent); background:#15283f; border-radius:0 24px 0 0 }
[data-theme=nocturne] .result-verdict { font-size:1.7rem; font-weight:350; letter-spacing:.12em }
[data-theme=nocturne] .result-medal .draw-mark { border-radius:0; transform:rotate(0); border-style:dashed }
[data-theme=nocturne] .pcard[data-action=attack] .rank-detail { animation:star-fix 320ms ease-out }
@keyframes star-fix { from { stroke-dasharray:2 12; opacity:.35 } to { stroke-dasharray:14 0; opacity:1 } }

[data-theme=sumi] .site-header h1 { font-weight:400; letter-spacing:.14em }
[data-theme=sumi] .site-header h1::before { width:1rem; height:3px; background:var(--text) }
[data-theme=sumi] .site-header h1::after { display:none }
[data-theme=sumi] .card-face { border-top:3px solid var(--text); background:linear-gradient(98deg,#e9edeb88,transparent 6%),var(--surface) }
[data-theme=sumi] .card-face::before { inset:.7rem .65rem; border:0; border-right:1px solid #8f9d9a77; border-radius:0 }
[data-theme=sumi] .card-rail { border-bottom:0 }
[data-theme=sumi] .cname { font:500 1.9rem/1.5 var(--display); letter-spacing:.18em }
[data-theme=sumi] .card-english { letter-spacing:.17em }
[data-theme=sumi] .rar-badge::before { width:7px; height:7px; border-radius:0 }
[data-theme=sumi] .power-strip { border:0; border-top:1px solid var(--text); padding-top:1.2rem }
[data-theme=sumi] .card-material::after { content:'墨线印面 / INK IMPRESSION' }
[data-theme=sumi] .card-config { border:0; border-top:1px solid var(--line); background:transparent }
[data-theme=sumi] .round-center { width:11rem; height:12rem; margin:auto; border:0; background:transparent; box-shadow:none }
[data-theme=sumi] .round-center::before { inset:12% 6%; border:3px solid var(--text); border-radius:41% 3% 33% 6%; transform:rotate(-8deg) }
[data-theme=sumi] .round-center::after { content:''; position:absolute; right:5%; bottom:12%; width:1rem; height:1.7rem; border:2px solid #9c5147; background:var(--surface) }
[data-theme=sumi] .round-value { font:400 4.8rem/1 var(--display) }
[data-theme=sumi] #startBtn { border-radius:1px; letter-spacing:.18em; box-shadow:0 4px 12px #36404720 }
[data-theme=sumi] .event-readout { border:0; border-block:1px solid var(--line); background:transparent }
[data-theme=sumi] .telemetry { border:0; border-top:2px solid var(--text); background:var(--surface) }
[data-theme=sumi] .result-panel { border:0; border-block:1px solid var(--text); padding-block:1.8rem; background:var(--surface) }
[data-theme=sumi] .result-verdict { font-style:normal; font-weight:400; letter-spacing:.06em }
[data-theme=sumi] .result-medal .draw-mark { border-radius:42% 5% 33% 6%; border:2px solid var(--text-2) }
[data-theme=sumi] .pcard[data-action=attack] .rank-detail { animation:ink-cut 280ms ease-out }
@keyframes ink-cut { from { stroke-dasharray:1 120; stroke-width:5 } to { stroke-dasharray:120 0; stroke-width:3 } }

[data-theme=arcade] .site-header h1 { font-family:var(--font); font-weight:800; letter-spacing:.02em }
[data-theme=arcade] .card-face { border:2px solid #979db3; border-radius:10px; box-shadow:inset 0 -7px 0 #d3d3cf,0 10px 20px #44496920 }
[data-theme=arcade] .card-face::before { inset:8px; border:1px solid #d1d2da; border-radius:4px }
[data-theme=arcade] .card-rail { border:0; background:#e4e4ee; border-radius:3px; padding:0 .4rem; color:#51566c }
[data-theme=arcade] .cname { font-weight:800; letter-spacing:.02em }
[data-theme=arcade] .rar-badge::before { border-radius:0; width:7px; height:7px }
[data-theme=arcade] .power-strip { background:#f1eedf; border:1px solid #bbbdbd; padding:1rem .65rem; border-radius:3px }
[data-theme=arcade] .bp-value { font-family:Consolas,"Cascadia Mono",monospace; font-weight:700; font-size:2.1rem }
[data-theme=arcade] .card-material::after { content:'塑料机壳 / MOLDED SHELL' }
[data-theme=arcade] .core-stats { border:0; gap:.35rem }
[data-theme=arcade] .stat-tile { background:#f0efe9; padding:.5rem; border:0; border-radius:3px }
[data-theme=arcade] .round-center { border:2px solid #989fba; border-bottom-width:8px; background:#e0e2ee; border-radius:18px }
[data-theme=arcade] .round-center::before { inset:13%; background:#fff5cf; border:1px solid #a5a8b6; border-radius:5px }
[data-theme=arcade] .round-value { z-index:1; font:800 3.8rem/1 Consolas,monospace }
[data-theme=arcade] .hud-state { z-index:1; font-weight:750 }
[data-theme=arcade] #startBtn { border-bottom:5px solid #293375; background:#4b56ae; border-radius:10px; color:#fff; box-shadow:0 5px 9px #404a7b22; font-weight:750 }
[data-theme=arcade] #startBtn:active:not(:disabled) { transform:translateY(3px); border-bottom-width:2px }
[data-theme=arcade] .spdbtn.on { background:#fce4a7; color:#363955; border-color:#8e7d51 }
[data-theme=arcade] .result-panel { border:2px solid #989fb1; border-bottom-width:6px; border-radius:8px; background:#fffdf6 }
[data-theme=arcade] .result-verdict { font:800 1.85rem/1.2 Consolas,monospace }
[data-theme=arcade] .result-medal .draw-mark { background:var(--surface-muted); border:2px dashed var(--text-2) }
[data-theme=arcade] .pcard[data-action=attack] .rank-detail { animation:pixel-pop 240ms steps(3,end) }
@keyframes pixel-pop { from { transform:translateY(3px); opacity:.6 } to { transform:translateY(0); opacity:1 } }

[data-theme=verdant] .site-header h1 { font-weight:400; letter-spacing:.06em }
[data-theme=verdant] .card-face { border-radius:36px 12px 32px 12px; background:linear-gradient(120deg,#fffef8,var(--surface) 65%,#e9eddf); border:1px solid #b1b99f }
[data-theme=verdant] .card-face::before { inset:.6rem; border:0; border-bottom:1px solid #b3ba9e; border-radius:24px 8px }
[data-theme=verdant] .card-rail { border-bottom:0 }
[data-theme=verdant] .cname { font-family:var(--display); font-weight:500; letter-spacing:.09em }
[data-theme=verdant] .rar-badge::before { width:9px; height:6px; border-radius:0 80% }
[data-theme=verdant] .power-strip { border:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:#eef0e433; border-radius:0 0 16px 0 }
[data-theme=verdant] .card-material::after { content:'植物标本 / BOTANICAL STUDY' }
[data-theme=verdant] .card-config { border-radius:12px 26px 12px 26px; border:1px solid #b6bca9; background:#f5f5e9 }
[data-theme=verdant] .round-center { border-radius:45% 55% 48% 52%; border:1px solid #a4b18c; background:#e6eadb; box-shadow:0 8px 24px #5967421a }
[data-theme=verdant] .round-center::before { inset:10%; border-radius:55% 42% 52% 46%; border-color:#acb798; transform:rotate(-18deg) }
[data-theme=verdant] .round-center::after { content:''; position:absolute; inset:4% 45%; border:1px solid #a4b18c; border-radius:50%; transform:rotate(38deg); opacity:.5 }
[data-theme=verdant] .round-value { z-index:1; font-weight:400; font-size:4.5rem }
[data-theme=verdant] .hud-state { z-index:1; background:#e6eadb; padding:0 .4rem }
[data-theme=verdant] #startBtn { border-radius:16px 6px; background:#875340; color:#fffdf5; box-shadow:0 5px 12px #6b4e3122 }
[data-theme=verdant] .event-readout { border-radius:14px 4px; background:#f8f9ee }
[data-theme=verdant] .result-panel { border:1px solid #a7af94; border-radius:26px 6px 26px 6px; background:#fafaf1 }
[data-theme=verdant] .result-verdict { font-size:2rem; font-weight:400 }
[data-theme=verdant] .result-medal .draw-mark { border-radius:50% 10%; border:1px solid var(--text-2) }
[data-theme=verdant] .pcard[data-action=attack] .rank-detail { animation:leaf-release 300ms ease-out }
@keyframes leaf-release { from { transform:scaleX(.65); opacity:.4 } to { transform:scaleX(1); opacity:1 } }

@media(max-width:1200px) { .theme-gallery { grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media(max-width:1000px) {
  .theme-browser { margin-top:.2rem }
  .theme-browser summary { padding:.4rem .8rem }
  html:is([data-theme=nocturne],[data-theme=sumi],[data-theme=arcade],[data-theme=verdant]) .site-header h1 { font-size:1.05rem; letter-spacing:.05em }
  html:is([data-theme=nocturne],[data-theme=sumi],[data-theme=arcade],[data-theme=verdant]) .round-value { font-size:2.6rem }
  [data-theme=sumi] .round-center { width:8rem; height:8rem }
  [data-theme=sumi] .round-center::after { right:-.65rem; bottom:18%; width:.65rem; height:1.2rem }
  [data-theme=arcade] .round-center { border-width:2px 2px 5px; border-radius:12px }
  html:is([data-theme=nocturne],[data-theme=sumi],[data-theme=arcade],[data-theme=verdant]) .app:not([data-phase=ready]) .cname { letter-spacing:.03em }
  [data-theme=sumi] .result-panel { padding-block:1rem }
}
@media(max-width:480px) {
  .theme-gallery { grid-template-columns:minmax(0,1fr); gap:.5rem }
  .theme-gallery button { padding:.6rem .75rem }
  html[data-theme] .summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem }
  .summary-metrics small { white-space:normal }
}
@media(prefers-reduced-motion:reduce) {
  .extension-emblem .rank-detail { animation:none!important }
}
.page-hidden .extension-emblem .rank-detail,.pcard:not(.in-view) .extension-emblem .rank-detail { animation-play-state:paused }

/* ==========================================================================
   Finishing pass — 2026-10-31. Shared interaction states and reading rhythm,
   material refinements per edition, then four atelier editions. Structure,
   crest geometry and business DOM are untouched; motion stays event-driven.
   ========================================================================== */

/* Shared controls: one state language, each edition supplies the tokens. */
html[data-theme] .theme-picker select,
[data-surface=edition] .card-picker select {
  appearance:none; -webkit-appearance:none; padding-right:2.1rem;
  background-image:linear-gradient(45deg,transparent 50%,var(--text-2) 50%),linear-gradient(135deg,var(--text-2) 50%,transparent 50%);
  background-position:calc(100% - 1.15rem) 52%,calc(100% - .8rem) 52%;
  background-size:.35rem .35rem; background-repeat:no-repeat
}
html[data-theme] .theme-picker select:focus-visible { outline:2px solid var(--focus,var(--gold)); outline-offset:2px }
[data-surface=edition] { accent-color:var(--gold) }
[data-surface=edition] :is(.spdbtn,.text-btn,.stats-toggle,#startBtn,.btn,.theme-gallery button,.card-picker,.lvl-val input,.match-config input) {
  transition:background-color 160ms,color 160ms,border-color 160ms,box-shadow 180ms,transform 180ms var(--ease),filter 160ms
}
[data-surface=edition] .spdbtn:hover:not(:disabled):not(.on) { color:var(--text); border-color:var(--text-3) }
[data-surface=edition] #startBtn:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.06) }
[data-surface=edition] #startBtn:active:not(:disabled) { transform:translateY(1px); filter:brightness(.97) }
[data-surface=edition] :is(button,input,select,summary,[tabindex]):focus-visible { outline:2px solid var(--focus); outline-offset:2px }
[data-surface=edition] .card-picker:focus-within { box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 22%,transparent) }
[data-surface=edition] :is(.lvl-val input,.match-config input):focus { border-color:var(--focus); box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 18%,transparent); outline:0 }
[data-surface=edition] input[type=range] { cursor:pointer }
[data-surface=edition] input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 35%,transparent) }
[data-surface=edition] .stats-toggle { color:var(--text-2) }
[data-surface=edition] .stats-toggle:hover { color:var(--text) }

/* Float numbers: a surface-coloured halo instead of a full-width band over the crest. */
[data-surface=edition] .float-number { background:none; padding:0; text-shadow:0 0 2px var(--surface),0 0 6px var(--surface),0 0 12px var(--surface) }

/* Log and summary: round dividers, a current-row marker, ledger rows. */
html[data-theme] .log-round { font-size:.6875rem; letter-spacing:.14em; padding:.85rem 0 .35rem; border-bottom:1px solid var(--line); margin-bottom:.15rem }
html[data-theme] .le { padding:.45rem .5rem; line-height:1.55 }
html[data-theme] .le .amt { font-variant-numeric:tabular-nums }
html[data-theme] .le.current { box-shadow:inset 2px 0 var(--gold) }
html[data-theme] .le.crit .txt { font-weight:600 }
[data-surface=edition] .le:hover { background:color-mix(in srgb,var(--surface-muted) 55%,transparent) }
[data-surface=edition] .log-round { color:var(--gold) }
[data-surface=edition] .summary-panel tbody tr:nth-child(even) { background:color-mix(in srgb,var(--surface-muted) 45%,transparent) }
[data-surface=edition] .summary-panel thead th { font-size:.6875rem; letter-spacing:.12em; color:var(--text-2) }
[data-surface=edition] .summary-metrics strong { font-family:var(--display); font-size:1.3rem; letter-spacing:-.01em }

/* Settlement: verdict, then winner, then remaining HP; one entrance per result. */
[data-surface=edition] .result-verdict { font-size:2.6rem; line-height:1.05 }
[data-surface=edition] .result-name { font-size:1.4rem; letter-spacing:.03em }
[data-surface=edition] .result-hp { font-family:var(--display); font-size:1.5rem; color:var(--text) }
[data-surface=edition] .result-hp-label { letter-spacing:.08em }
html[data-theme] .result-panel:is(.win0,.win1,.draw) { animation:result-arrive 460ms var(--ease) both }
@keyframes result-arrive { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:none } }
@media(prefers-reduced-motion:reduce) { html[data-theme] .result-panel:is(.win0,.win1,.draw) { animation:none } }

/* Catalogue: twelve tiles, each with a four-colour palette strip. */
.theme-gallery button { grid-template-rows:auto auto auto; position:relative }
.theme-gallery button::after { content:''; grid-column:2; height:4px; border-radius:2px;
  background:linear-gradient(90deg,var(--p1,#080c0d) 0 25%,var(--p2,#e6e7df) 25% 50%,var(--p3,#e8c98c) 50% 75%,var(--p4,#88cef1) 75%) }
.theme-gallery button:hover:not([aria-pressed=true]) { transform:translateY(-1px) }
.theme-preview { grid-row:1 / 4 }
[data-theme-id=collector] { --p1:#080c0d; --p2:#e6e7df; --p3:#e8c98c; --p4:#88cef1 }
[data-theme-id=lumen] { --p1:#edf2f5; --p2:#1c3547; --p3:#275eb0; --p4:#af3d4b }
[data-theme-id=folio] { --p1:#eee8d9; --p2:#203c32; --p3:#26503c; --p4:#a13836 }
[data-theme-id=pulse] { --p1:#18121d; --p2:#f4e6d8; --p3:#ffc28b; --p4:#97d5f4 }
[data-theme-id=nocturne] { --p1:#101e32; --p2:#e5edf4; --p3:#c4d9ee; --p4:#91d4ff }
[data-theme-id=sumi] { --p1:#eeefed; --p2:#242e34; --p3:#9c5147; --p4:#235f92 }
[data-theme-id=arcade] { --p1:#ecebe5; --p2:#292e46; --p3:#424b9b; --p4:#fce4a7 }
[data-theme-id=verdant] { --p1:#eeeee5; --p2:#384238; --p3:#875340; --p4:#536b42 }
[data-theme-id=brutal] { --p1:#e3e1dc; --p2:#141414; --p3:#ad3307; --p4:#1f4fa0 }
[data-theme-id=lacquer] { --p1:#170e0d; --p2:#f3e6d0; --p3:#d9b25f; --p4:#ff9c8a }
[data-theme-id=blueprint] { --p1:#f1f4f7; --p2:#11335a; --p3:#173f6e; --p4:#1b6fc0 }
[data-theme-id=aurora] { --p1:#0e1219; --p2:#e8f1f6; --p3:#c9b8ff; --p4:#7ff0cf }
[data-theme-id=brutal] .theme-preview { background:#d6d3cc; border:4px solid #141414; border-radius:0; clip-path:none; box-shadow:4px 4px 0 #ad3307 }
[data-theme-id=lacquer] .theme-preview { background:radial-gradient(circle at 40% 35%,#4a1d14,#1d0e0b 70%); border:2px solid #d9b25f; border-radius:50%; clip-path:none }
[data-theme-id=blueprint] .theme-preview { background:linear-gradient(#1d5fae22 1px,transparent 1px) 0 0/6px 6px,linear-gradient(90deg,#1d5fae22 1px,transparent 1px) 0 0/6px 6px,#fbfcfd; border:1px solid #1a4f86; border-radius:2px; clip-path:none }
[data-theme-id=aurora] .theme-preview { background:linear-gradient(140deg,#7ff0cf,#5b7bd6 55%,#c9b8ff); border:1px solid #ffffff55; clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%) }

/* ---- Material refinements for the eight established editions ---- */
/* Collector: quieter dark panels with a fine metal rule; geometry untouched. */
[data-theme=collector] .le.current { background:#c3a66b14 }
[data-theme=collector] .log-round { color:#d6bf8f; border-color:#b7a67b33 }
[data-theme=collector] .result-panel { box-shadow:inset 0 0 0 1px #00000080,inset 0 0 0 4px #0b110f,inset 0 0 0 5px #b3a07755,0 .8rem 1.8rem #0009 }
[data-theme=collector] .result-verdict { letter-spacing:.06em; text-shadow:0 1px 0 #000 }
[data-theme=collector] .summary-panel tbody tr:nth-child(even) { background:#ffffff05 }

/* LUMEN: ambient + directional light on porcelain; crisp glass rims. */
[data-theme=lumen] .card-face { box-shadow:0 1px 2px #27435b14,0 22px 44px -16px #27435b40,inset 0 1px 0 #fff,inset 0 -1px 0 #bacbd666 }
[data-theme=lumen] .round-center { box-shadow:0 1px 2px #27435b1a,0 18px 40px -14px #27435b40,inset 0 1px 0 #fff }
[data-theme=lumen] #startBtn { box-shadow:0 1px 0 #ffffff55 inset,0 10px 22px -8px #275eb099 }
[data-theme=lumen] .summary-panel tbody tr:nth-child(even) { background:#e7eff499 }

/* FOLIO: the same cotton stock carries through settlement and archive. */
[data-theme=folio] :is(.telemetry,.result-panel,.card-config) { background:linear-gradient(#faf6ebf0,#faf6ebf0),url('assets/folio-paper.webp') center/cover }
[data-theme=folio] .le .rnd { font-family:Georgia,serif; font-style:italic }
[data-theme=folio] .log-round { font-family:Georgia,serif; letter-spacing:.2em; border-bottom:3px double var(--line) }
[data-theme=folio] .summary-metrics strong { font-weight:400 }

/* PULSE: recessed signal windows and one restrained phosphor glow. */
[data-theme=pulse] .card-face { box-shadow:var(--panel-shadow),inset 0 1px 0 #ffffff12 }
[data-theme=pulse] .power-strip { box-shadow:inset 0 2px 8px #00000099 }
[data-theme=pulse] :is(.bp-value,.round-value) { text-shadow:0 0 14px #ffc28b40 }
[data-theme=pulse] .round-center { box-shadow:inset 0 3px 14px #000c,var(--panel-shadow) }
[data-theme=pulse] .log-round { font-family:var(--display); letter-spacing:.06em }

/* NOCTURNE: static star field and survey grid (no animation). */
[data-theme=nocturne] .lab-backdrop { background:
  radial-gradient(1px 1px at 23px 41px,#dbe9ff 50%,transparent 51%) 0 0/233px 211px,
  radial-gradient(1px 1px at 151px 97px,#c4d9ee 50%,transparent 51%) 0 0/233px 211px,
  radial-gradient(1.5px 1.5px at 97px 173px,#eef5ff 50%,transparent 51%) 0 0/317px 263px,
  radial-gradient(1px 1px at 211px 29px,#9fb9d6 50%,transparent 51%) 0 0/317px 263px,
  linear-gradient(#59738d14 1px,transparent 1px) 0 0/160px 160px,
  linear-gradient(90deg,#59738d14 1px,transparent 1px) 0 0/160px 160px,
  radial-gradient(ellipse at 95% 0,#2c4260 0,transparent 43%),var(--bg) }
[data-theme=nocturne] .card-face { box-shadow:var(--panel-shadow),inset 0 1px 0 #c4d9ee1f }
[data-theme=nocturne] .round-value { text-shadow:0 0 18px #91d4ff33 }

/* SUMI: fine paper fibre and an ink-wash head on each sheet. */
[data-theme=sumi] .lab-backdrop { background:
  repeating-linear-gradient(83deg,transparent 0 7px,#5a666a08 7px 8px),
  repeating-linear-gradient(171deg,transparent 0 13px,#5a666a06 13px 14px),
  linear-gradient(112deg,#d8dedb 0,transparent 19%,transparent 85%,#dfe3e0),var(--bg) }
[data-theme=sumi] .card-face { background:linear-gradient(180deg,#e3e8e566,transparent 9rem),linear-gradient(98deg,#e9edeb88,transparent 6%),var(--surface) }
[data-theme=sumi] .log-round { font-family:var(--display); letter-spacing:.3em }
[data-theme=sumi] .result-verdict { font-family:var(--display) }

/* ARCADE: molded speckle, deeper key travel, warm display window. */
[data-theme=arcade] .lab-backdrop { background:
  radial-gradient(circle at 3px 3px,#4045680d 1px,transparent 1.5px) 0 0/11px 11px,
  linear-gradient(135deg,#d8dbed 0,transparent 30%,transparent 75%,#e5d6ba),var(--bg) }
[data-theme=arcade] #startBtn { box-shadow:inset 0 1px 0 #ffffff40,0 6px 12px #404a7b33 }
[data-theme=arcade] #startBtn:hover:not(:disabled) { filter:brightness(1.08) }
[data-theme=arcade] .round-center::before { box-shadow:inset 0 0 22px #ffd97a99,inset 0 2px 0 #fff }
[data-theme=arcade] .spdbtn { border-bottom-width:3px }
[data-theme=arcade] .spdbtn:active:not(:disabled) { transform:translateY(2px); border-bottom-width:1px }

/* VERDANT: chalk grain and a pressed terracotta key. */
[data-theme=verdant] .lab-backdrop { background:
  radial-gradient(circle at 2px 2px,#5f674514 .8px,transparent 1.2px) 0 0/7px 7px,
  radial-gradient(ellipse at 0 0,#dce3ca 0,transparent 55%),linear-gradient(120deg,transparent 70%,#e8d9cc),var(--bg) }
[data-theme=verdant] #startBtn:active:not(:disabled) { transform:translateY(2px); box-shadow:0 2px 4px #6b4e3133 }
[data-theme=verdant] .log-round { font-family:var(--display); letter-spacing:.12em }

/* ---- BRUTAL — board-marked concrete, heavy black type, signal orange ---- */
html[data-theme=brutal] {
  --bg:#e3e1dc; --surface:#f1f0ec; --surface-muted:#d6d3cc;
  --text:#141414; --text-2:#3a3a38; --text-3:#4f4e4b; --line:#8d8a83;
  --gold:#ad3307; --blue:#1f4fa0; --red:#a8173a; --green:#1d6b3a;
  --focus:#141414; --edition:#141414; --display:"Arial Black","Segoe UI Black","Microsoft YaHei",sans-serif;
  --shape:0px; --panel-shadow:8px 8px 0 #14141422;
}
[data-theme=brutal] .lab-backdrop { background:
  radial-gradient(circle at 36px 30px,#00000026 3px,transparent 4px) 0 0/360px 180px,
  linear-gradient(90deg,#0000000d 1px,transparent 1px) 0 0/360px 180px,
  linear-gradient(#00000012 1px,transparent 1px) 0 0/360px 180px,
  radial-gradient(circle at 2px 2px,#00000010 .7px,transparent 1.1px) 0 0/5px 5px,
  linear-gradient(170deg,#ebe9e4,#d9d6cf),var(--bg) }
[data-theme=brutal] .site-header h1 { font:900 2.3rem/1.1 var(--display); letter-spacing:-.02em }
[data-theme=brutal] .site-header h1::before,[data-theme=brutal] .site-header h1::after { display:none }
[data-theme=brutal] .site-header p { font-weight:700; letter-spacing:.3em; color:var(--text) }
[data-theme=brutal] .card-picker { border:2px solid var(--text); background:var(--text) }
[data-theme=brutal] .card-face { border:3px solid var(--text); box-shadow:8px 8px 0 var(--text) }
[data-theme=brutal] .card-face::before { display:none }
[data-theme=brutal] .card-rail { background:var(--text); color:var(--surface); border:0; padding:0 .55rem; text-transform:uppercase; font-weight:700 }
[data-theme=brutal] .card-serial::before { color:#bdbab3 }
[data-theme=brutal] .cname { font:900 2rem/1.25 var(--display); letter-spacing:0 }
[data-theme=brutal] .rar-badge::before { border-radius:0; width:8px; height:8px; background:var(--gold) }
[data-theme=brutal] .card-english { font-weight:700; color:var(--text-2) }
[data-theme=brutal] .power-strip { border-top:3px solid var(--text); border-bottom:3px solid var(--text) }
[data-theme=brutal] .bp-value { font:900 2.5rem/1.1 var(--display); letter-spacing:-.04em }
[data-theme=brutal] input[type=range]::-webkit-slider-thumb { border-radius:0; background:var(--text); border:0; width:14px; height:22px; box-shadow:3px 3px 0 var(--gold) }
[data-theme=brutal] .hpbar-wrap { height:10px; border:2px solid var(--text); background:var(--surface) }
[data-theme=brutal] .card-material::after { content:'清水混凝土 / RAW CONCRETE' }
[data-theme=brutal] .card-config { border:2px solid var(--text); box-shadow:6px 6px 0 #14141422 }
[data-theme=brutal] .archive-heading { font-weight:900; text-transform:uppercase }
[data-theme=brutal] .round-center { background:var(--text); border:3px solid var(--text); box-shadow:8px 8px 0 var(--gold) }
[data-theme=brutal] .round-center::before { inset:9%; border:2px solid #3b3b39 }
[data-theme=brutal] .round-value { color:#ff6a2b; font:900 4.4rem/1 var(--display); letter-spacing:-.04em }
[data-theme=brutal] .round-label { color:#bdbab3 }
[data-theme=brutal] .hud-state { color:var(--surface); letter-spacing:.24em; font-weight:700 }
[data-theme=brutal] #startBtn { background:var(--gold); color:#fff; border:3px solid var(--text); box-shadow:6px 6px 0 var(--text); font-weight:900 }
[data-theme=brutal] #startBtn:hover:not(:disabled) { transform:translate(-2px,-2px); box-shadow:8px 8px 0 var(--text); filter:none }
[data-theme=brutal] #startBtn:active:not(:disabled) { transform:translate(4px,4px); box-shadow:2px 2px 0 var(--text) }
[data-theme=brutal] .spdbtn { border:2px solid var(--text); color:var(--text); font-weight:700 }
[data-theme=brutal] .spdbtn.on { background:var(--text); color:var(--surface); box-shadow:none }
[data-theme=brutal] :is(.match-config input,.lvl-val input) { border:2px solid var(--text) }
[data-theme=brutal] .event-readout { border:2px solid var(--text) }
[data-theme=brutal] .telemetry { border:3px solid var(--text); box-shadow:8px 8px 0 #14141422 }
[data-theme=brutal] .log-head { font-weight:900; text-transform:uppercase }
[data-theme=brutal] .log-round { font-weight:900; border-bottom:2px solid var(--text); color:var(--gold) }
[data-theme=brutal] .le.current { box-shadow:inset 4px 0 var(--gold) }
[data-theme=brutal] .summary-metrics strong { font-weight:900 }
[data-theme=brutal] .result-panel { border:3px solid var(--text); box-shadow:10px 10px 0 var(--result-accent) }
[data-theme=brutal] .result-verdict { font:900 3rem/1 var(--display); letter-spacing:-.03em; text-transform:uppercase }
[data-theme=brutal] .result-medal .draw-mark { border:3px solid var(--text); border-radius:0 }
[data-theme=brutal] .extension-glyph { letter-spacing:-.05em }
[data-theme=brutal] .pcard[data-action=attack] .rank-detail { animation:slab-drop 220ms steps(2,end) }
@keyframes slab-drop { from { transform:translateY(-6px); opacity:.4 } to { transform:none; opacity:1 } }

/* ---- LACQUER — black-red urushi, gold line, Songti identity ---- */
html[data-theme=lacquer] {
  --bg:#170e0d; --surface:#24130f; --surface-muted:#351a13;
  --text:#f3e6d0; --text-2:#d6c1a5; --text-3:#c0a98b; --line:#6e4b33;
  --gold:#d9b25f; --blue:#8cc8f0; --red:#ff9c8a; --green:#9fd8a8;
  --focus:#f2d48c; --edition:#d9b25f; --display:"Songti SC",SimSun,STSong,Georgia,serif;
  --shape:6px; --panel-shadow:0 18px 40px #0a040399;
}
[data-theme=lacquer] .lab-backdrop { background:
  radial-gradient(ellipse 70% 45% at 50% -8%,#4f1c13 0,transparent 70%),
  radial-gradient(ellipse 45% 40% at 100% 100%,#3b130d,transparent 70%),
  radial-gradient(ellipse 40% 35% at 0 70%,#2a0f0b,transparent 70%),var(--bg) }
[data-theme=lacquer] .site-header h1 { font-family:var(--display); font-weight:400; letter-spacing:.22em; color:#f6e7c8 }
[data-theme=lacquer] .site-header h1::before { background:linear-gradient(90deg,transparent,var(--gold)); height:1px }
[data-theme=lacquer] .site-header h1::after { background:linear-gradient(90deg,var(--gold),transparent); height:1px }
[data-theme=lacquer] .card-face { background:linear-gradient(160deg,#3d1b13 0,var(--surface) 38%,#1b0d0b); border:1px solid #8a6436;
  box-shadow:var(--panel-shadow),inset 0 0 0 4px #24130f,inset 0 0 0 5px #d9b25f44,inset 0 1px 0 #ffffff12 }
[data-theme=lacquer] .card-face::before { inset:.6rem; border:1px solid #d9b25f30; border-radius:3px }
[data-theme=lacquer] .card-rail { border-bottom-color:#d9b25f33; color:#c9ab7d }
[data-theme=lacquer] .cname { font:600 1.9rem/1.4 var(--display); letter-spacing:.16em; color:#f6e7c8 }
[data-theme=lacquer] .card-english { font-family:Georgia,serif; letter-spacing:.12em }
[data-theme=lacquer] .rar-badge::before { border-radius:50%; background:var(--gold) }
[data-theme=lacquer] .power-strip { border-color:#d9b25f55 }
[data-theme=lacquer] .bp-value { font-family:Georgia,var(--display); font-weight:400; color:var(--gold) }
[data-theme=lacquer] .hpbar-wrap { background:#120807; box-shadow:inset 0 1px 2px #000 }
[data-theme=lacquer] .card-material::after { content:'大漆描金 / GOLD LACQUER' }
[data-theme=lacquer] .card-config { background:#1e100d; border-color:#5a3a26 }
[data-theme=lacquer] .round-center { border-radius:50%; background:radial-gradient(circle at 50% 32%,#40190f,#1c0d0a 72%); border:1px solid #d9b25f88;
  box-shadow:0 0 0 6px #1d0f0c,0 0 0 7px #d9b25f40,var(--panel-shadow) }
[data-theme=lacquer] .round-center::before { inset:9%; border:1px dashed #d9b25f50; border-radius:50% }
[data-theme=lacquer] .round-value { font:400 4.4rem/1 var(--display); color:var(--gold); text-shadow:0 2px 0 #0008 }
[data-theme=lacquer] .hud-state { color:#e9cf96; letter-spacing:.3em }
[data-theme=lacquer] #startBtn { background:linear-gradient(180deg,#ecca82,#c08f42) #d4a95e; color:#2a120c; border:1px solid #f2d48c; box-shadow:inset 0 1px 0 #fff7,0 10px 22px #000a; letter-spacing:.2em }
[data-theme=lacquer] .spdbtn.on { background:#3a1c14; color:#f6e7c8 }
[data-theme=lacquer] .event-readout { background:#1f100d; border-color:#5a3a26 }
[data-theme=lacquer] .telemetry { background:#1e100d; border-color:#4f3322; box-shadow:inset 0 1px 0 #d9b25f22 }
[data-theme=lacquer] .log-round { font-family:var(--display); letter-spacing:.24em; border-color:#d9b25f33 }
[data-theme=lacquer] .summary-panel tbody tr:nth-child(even) { background:#ffffff06 }
[data-theme=lacquer] .result-panel { background:linear-gradient(#2b1611,#1d0e0b); border-color:#d9b25f66;
  box-shadow:inset 0 0 0 5px #1d0e0b,inset 0 0 0 6px #d9b25f30,var(--panel-shadow) }
[data-theme=lacquer] .result-verdict { font-weight:400; letter-spacing:.18em }
[data-theme=lacquer] .result-medal .draw-mark { border-radius:50%; border:1px solid var(--gold) }
[data-theme=lacquer] .pcard[data-action=attack] .rank-detail { animation:gold-glint 300ms ease-out }
@keyframes gold-glint { from { stroke-width:5; opacity:.35 } to { stroke-width:1.2; opacity:1 } }

/* ---- BLUEPRINT — white drafting sheet, cobalt line, dimensioned parts ---- */
html[data-theme=blueprint] {
  --bg:#f1f4f7; --surface:#fbfcfd; --surface-muted:#e4ecf4;
  --text:#11335a; --text-2:#33557b; --text-3:#4a6788; --line:#9fb5cc;
  --gold:#173f6e; --blue:#1b6fc0; --red:#b3323f; --green:#1d6b49;
  --focus:#0f4c99; --edition:#1a4f86; --display:Consolas,"Cascadia Mono","Microsoft YaHei",monospace;
  --shape:2px; --panel-shadow:0 1px 0 #9fb5cc,0 12px 26px -10px #11335a26;
}
[data-theme=blueprint] .lab-backdrop { background:
  linear-gradient(#1d5fae12 1px,transparent 1px) 0 0/24px 24px,
  linear-gradient(90deg,#1d5fae12 1px,transparent 1px) 0 0/24px 24px,
  linear-gradient(#1d5fae20 1px,transparent 1px) 0 0/120px 120px,
  linear-gradient(90deg,#1d5fae20 1px,transparent 1px) 0 0/120px 120px,var(--bg) }
[data-theme=blueprint] .site-header h1 { font:600 1.6rem/1.3 var(--display); letter-spacing:.14em }
[data-theme=blueprint] .site-header h1::before,[data-theme=blueprint] .site-header h1::after { background:var(--edition); height:1px }
[data-theme=blueprint] .card-face { border:1px solid var(--edition) }
[data-theme=blueprint] .card-face::before { inset:.45rem; border:1px solid var(--line) }
[data-theme=blueprint] .card-rail { font-family:var(--display); border-bottom:1px dashed var(--line) }
[data-theme=blueprint] .cname { font-weight:650; letter-spacing:.08em }
[data-theme=blueprint] .card-english { font-family:var(--display); letter-spacing:.1em }
[data-theme=blueprint] .rar-badge::before { border-radius:0; transform:rotate(45deg) }
[data-theme=blueprint] .power-strip { border-top:1px solid var(--edition); border-bottom:0;
  background:repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 12px) left bottom/100% 6px no-repeat }
[data-theme=blueprint] .bp-value { font:700 2.2rem/1.1 var(--display); letter-spacing:-.03em }
[data-theme=blueprint] :is(.stat-tile .v,.summary-metrics strong,.hud-hp,.le .amt) { font-family:var(--display) }
[data-theme=blueprint] .card-material::after { content:'工程图纸 / TECHNICAL DRAWING' }
[data-theme=blueprint] .card-config { border-style:dashed }
[data-theme=blueprint] .round-center { border-radius:50%; border:1px solid var(--edition); background:var(--surface) }
[data-theme=blueprint] .round-center::before { inset:9%; border:1px dashed var(--line); border-radius:50% }
[data-theme=blueprint] .round-center::after { content:''; position:absolute; inset:-6%; pointer-events:none; opacity:.55;
  background:linear-gradient(var(--edition),var(--edition)) center/1px 100% no-repeat,linear-gradient(90deg,var(--edition),var(--edition)) center/100% 1px no-repeat }
[data-theme=blueprint] .round-value { z-index:1; font:700 3.8rem/1 var(--display); background:var(--surface); padding:0 .4rem }
[data-theme=blueprint] .hud-state { z-index:1; background:var(--surface); padding:0 .5rem; letter-spacing:.2em }
[data-theme=blueprint] #startBtn { color:#fff; box-shadow:0 0 0 1px var(--gold),0 0 0 4px var(--bg),0 0 0 5px var(--line); letter-spacing:.12em }
[data-theme=blueprint] .spdbtn.on { background:#e4ecf4; box-shadow:inset 0 -2px var(--gold) }
[data-theme=blueprint] .event-readout { border-style:dashed }
[data-theme=blueprint] .log-round { font-family:var(--display); border-bottom-style:dashed }
[data-theme=blueprint] .result-panel { border:1px solid var(--edition); border-left:6px solid var(--result-accent) }
[data-theme=blueprint] .result-verdict { font:700 2.3rem/1 var(--display); letter-spacing:.06em }
[data-theme=blueprint] .result-medal .draw-mark { border:1px dashed var(--edition); border-radius:50% }
[data-theme=blueprint] .pcard[data-action=attack] .rank-detail { animation:measure-trace 320ms ease-out }
@keyframes measure-trace { from { stroke-dashoffset:60; opacity:.4 } to { stroke-dashoffset:0; opacity:1 } }

/* ---- AURORA — frosted ice over a polar night, lavender action light ---- */
html[data-theme=aurora] {
  --bg:#0e1219; --surface:#171f2c; --surface-muted:#1f2a3a;
  --text:#e8f1f6; --text-2:#bccbd8; --text-3:#a3b5c6; --line:#3f526a;
  --gold:#c9b8ff; --blue:#8fc8ff; --red:#ff9fb5; --green:#a8f0b0;
  --focus:#e5dcff; --edition:#d6e6f5; --display:"Segoe UI Light","Segoe UI","Microsoft YaHei",sans-serif;
  --shape:18px; --panel-shadow:0 22px 50px #02050b8c;
}
[data-theme=aurora] .lab-backdrop { background:
  radial-gradient(ellipse 55% 38% at 18% -4%,#2bd6a03d,transparent 70%),
  radial-gradient(ellipse 48% 34% at 86% 6%,#8a6bff38,transparent 70%),
  radial-gradient(ellipse 70% 40% at 50% 112%,#1d8fb026,transparent 70%),var(--bg) }
[data-theme=aurora] .site-header h1 { font:300 1.8rem/1.3 var(--display); letter-spacing:.24em }
[data-theme=aurora] .site-header h1::before,[data-theme=aurora] .site-header h1::after { background:linear-gradient(90deg,#7ff0cf,#c9b8ff); height:1px }
[data-theme=aurora] :is(.card-face,.card-config,.telemetry,.result-panel,.event-readout) { border:1px solid #ffffff1c; box-shadow:var(--panel-shadow),inset 0 1px 0 #ffffff24 }
/* Frost only where the fixed mobile transport cannot be covered by a new stacking context. */
@media(min-width:1001px) {
  @supports (backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px)) {
    [data-theme=aurora] :is(.card-face,.card-config,.telemetry,.result-panel,.event-readout) { background:#18212fc4; -webkit-backdrop-filter:blur(18px) saturate(1.25); backdrop-filter:blur(18px) saturate(1.25) }
  }
}
@media(max-width:1000px) {
  [data-theme=aurora] :is(.card-face,.card-config,.telemetry,.result-panel,.event-readout) { background:linear-gradient(160deg,#1c2738,var(--surface) 60%) }
}
[data-theme=aurora] .card-face::before { inset:0; border:0; border-radius:var(--shape); pointer-events:none;
  background:linear-gradient(115deg,transparent 28%,#9ef5d50c 44%,#b9a6ff12 56%,transparent 72%) }
[data-theme=aurora] .card-rail { border-bottom-color:#ffffff14 }
[data-theme=aurora] .cname { font:300 1.95rem/1.4 var(--display); letter-spacing:.14em }
[data-theme=aurora] .rar-badge::before { border-radius:50%; background:linear-gradient(135deg,#7ff0cf,#c9b8ff) }
[data-theme=aurora] .power-strip { border-color:#ffffff1a }
[data-theme=aurora] .bp-value { font:200 2.6rem/1.1 var(--display); color:#fff; letter-spacing:-.02em }
[data-theme=aurora] .hpbar-wrap { border-radius:3px; background:#0b1018 }
[data-theme=aurora] .hpbar { border-radius:3px }
[data-theme=aurora] .card-material::after { content:'冰晶磨砂 / FROSTED CRYSTAL' }
[data-theme=aurora] .round-center { border-radius:50%; background:radial-gradient(circle at 50% 28%,#2a3a52,#111823 72%); border:1px solid #ffffff22;
  box-shadow:0 0 44px #7ff0cf1c,0 0 90px #8a6bff1a,inset 0 1px 0 #ffffff33 }
[data-theme=aurora] .round-center::before { inset:9%; border:1px solid #ffffff14; border-radius:50% }
[data-theme=aurora] .round-value { font:200 4.4rem/1 var(--display); color:#f2f8ff; text-shadow:0 0 22px #9ef5d559 }
[data-theme=aurora] .hud-state { color:#d9ccff; letter-spacing:.3em }
[data-theme=aurora] #startBtn { background:linear-gradient(110deg,#8ff3d6,#c9b8ff) #acd6ea; color:#0e1219; border:0; box-shadow:0 12px 30px -8px #7ff0cf55; font-weight:600; letter-spacing:.14em }
[data-theme=aurora] .spdbtn { border-radius:12px; background:#1a2230 }
[data-theme=aurora] .spdbtn.on { background:#2a3448; color:#fff }
[data-theme=aurora] :is(.match-config input,.lvl-val input,.card-picker :is(input,select)) { background-color:#121925 }
[data-theme=aurora] .card-picker { border-color:#ffffff22; background:#ffffff22; border-radius:12px }
[data-theme=aurora] .log-round { letter-spacing:.24em; border-color:#ffffff14 }
[data-theme=aurora] .le { border-color:#ffffff0d }
[data-theme=aurora] .summary-panel tbody tr:nth-child(even) { background:#ffffff06 }
[data-theme=aurora] .result-verdict { font-weight:200; letter-spacing:.24em }
[data-theme=aurora] .result-medal .draw-mark { border-radius:50%; border:1px solid #ffffff44 }
[data-theme=aurora] .pcard[data-action=attack] .rank-detail { animation:crystal-flare 320ms ease-out }
@keyframes crystal-flare { from { stroke-width:4; opacity:.3 } to { stroke-width:1.2; opacity:1 } }

/* New editions on compact screens. */
@media(max-width:1000px) {
  html:is([data-theme=brutal],[data-theme=lacquer],[data-theme=blueprint],[data-theme=aurora]) .site-header h1 { font-size:1.1rem; letter-spacing:.05em }
  html:is([data-theme=brutal],[data-theme=lacquer],[data-theme=blueprint],[data-theme=aurora]) .round-value { font-size:2.6rem }
  html:is([data-theme=brutal],[data-theme=lacquer],[data-theme=blueprint],[data-theme=aurora]) .app:not([data-phase=ready]) .cname { letter-spacing:.03em }
  [data-theme=brutal] .card-face { box-shadow:5px 5px 0 var(--text) }
  [data-theme=brutal] .round-center { box-shadow:5px 5px 0 var(--gold) }
  [data-theme=brutal] .cname { font-size:1.55rem }
  [data-theme=brutal] .result-verdict { font-size:2.1rem }
  [data-theme=brutal] :is(.result-panel,.telemetry) { box-shadow:5px 5px 0 var(--result-accent,#14141422) }
  [data-theme=brutal] .card-config { box-shadow:4px 4px 0 #14141422 }
  [data-theme=lacquer] .round-center { box-shadow:0 0 0 4px #1d0f0c,0 0 0 5px #d9b25f40 }
  [data-theme=blueprint] .round-center::after { inset:0 }
  [data-surface=edition] .result-verdict { font-size:2rem }
  [data-surface=edition] .result-hp { font-size:1.25rem }
}
@media(prefers-reduced-motion:reduce) {
  [data-surface=edition] :is(#startBtn,.spdbtn,.theme-gallery button) { transition:none; transform:none!important }
}
