:root {
  color-scheme: dark;
  --base: #171913; --panel: #20221a; --panel-lift: #25261d; --line: #3b3c30;
  --ink: #f5eddb; --muted: #a9a495; --quiet: #8c887a; --gold: #f2c65c; --green: #a6bc74;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--base);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; background: radial-gradient(ellipse at 16% 0%, #2b2818 0, transparent 46rem), linear-gradient(90deg, #ffffff04 1px, transparent 1px), linear-gradient(#ffffff04 1px, transparent 1px); background-size: auto, 28px 28px, 28px 28px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.top { border-bottom: 1px solid #3a382c; background: #191b14ec; }
.top-in { height: 65px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #211e14; background: var(--gold); border-radius: 9px; box-shadow: inset 0 -3px #b5863d; }
.brand-icon svg { width: 22px; height: 22px; fill: currentColor; }
.brand-text { display: flex; align-items: baseline; gap: 10px; }
.brand-text b { font: 800 19px/1 var(--mono); letter-spacing: -.04em; }
.brand-text span { color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.top-link { color: #d2ccba; text-decoration: none; padding: 9px 11px; border: 1px solid #3b3b30; border-radius: 8px; font-size: 13px; }
.top-link span { color: var(--gold); margin-left: 5px; }
.top-link:hover { border-color: #8c713b; }
.intro { position: relative; min-height: 149px; display: flex; justify-content: space-between; align-items: center; padding: 23px 0 24px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font: 700 11px/1.4 var(--mono); letter-spacing: .15em; color: #d4ba79; }
.eyebrow-line { width: 17px; height: 2px; background: var(--gold); }
.tiny-sep, .divider-dot { display: inline-block; vertical-align: middle; width: 3px; height: 3px; border-radius: 50%; background: #817657; }
.intro h1 { margin: 7px 0 5px; font-size: clamp(39px, 5.7vw, 70px); font-weight: 900; line-height: 1.03; letter-spacing: -.055em; }
.intro h1 span { color: var(--gold); }
.intro h1 .title-dot { margin-left: 7px; font-family: var(--mono); }
.intro p { color: #bfb8a5; margin: 0; font-size: 14px; line-height: 1.6; }
.intro-mark { width: 104px; height: 88px; margin-right: 18px; display: grid; place-items: center; background: radial-gradient(ellipse, #d89d3724, transparent 66%); transform: rotate(-6deg); }
.intro-mark svg { width: 91px; image-rendering: pixelated; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(236px, 282px); align-items: start; gap: 18px; }
.machine { border: 1px solid #514c38; border-radius: 15px; overflow: hidden; background: var(--panel); box-shadow: 0 15px 38px #0b0c0a42, 0 0 0 4px #12140e55; }
.hud { min-height: 73px; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: center; padding: 10px 17px; background: #27281e; border-bottom: 1px solid #47402e; gap: 8px; }
.hud-cell { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hud-cell > span:first-child { font-size: 11px; color: #c0baa7; }
.hud-cell strong { font: 800 clamp(23px, 3vw, 31px)/1.02 var(--mono); color: var(--gold); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.timer-cell { align-items: center; }
.timer-cell strong { color: #f5ebd2; }
.timer-cell strong span { color: #c4b58b; font-size: .46em; margin-left: 3px; }
.timer-cell strong.urgent, .timer-cell strong.urgent span { color: #ffa281; }
.time-track { display: block; width: min(120px, 95%); height: 3px; margin-top: 2px; background: #4b4635; border-radius: 3px; overflow: hidden; }
.time-track > span { display: block; width: 100%; height: 100%; background: #eec555; transform-origin: left; }
.hud-actions { display: flex; justify-content: flex-end; gap: 7px; }
.icon-btn { display: grid; width: 39px; height: 39px; padding: 8px; place-items: center; background: #2f3025; color: #e3ddca; border: 1px solid #494938; border-radius: 8px; }
.icon-btn:hover:not(:disabled), .icon-btn[aria-pressed="true"] { color: var(--gold); border-color: #89733e; }
.icon-btn:disabled { opacity: .45; }
.icon-btn svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
.wave-mark, #sound[aria-pressed="true"] .muted-mark { display: none; }
#sound[aria-pressed="true"] .wave-mark { display: initial; }
.viewport { position: relative; aspect-ratio: 48 / 29; isolation: isolate; overflow: hidden; background: #281e19; }
#mine { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.mine-label { position: absolute; top: 11px; left: 11px; padding: 4px 7px; color: #e4d0a3; background: #211c16c9; border: 1px solid #685336; border-radius: 4px; font: 700 10px/1.1 var(--mono); pointer-events: none; }
.mine-label span, .status-dot { display: inline-block; width: 6px; height: 6px; background: #aec57e; border-radius: 50%; margin-right: 4px; box-shadow: 0 0 10px #a0b97654; }
.mine-tap { position: absolute; inset: 0; border: 0; background: transparent; touch-action: manipulation; }
.mine-tap:focus-visible { outline-offset: -5px; }
.mine-tap:disabled { pointer-events: none; }
.cover { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; background: radial-gradient(ellipse at 50% 50%, #100c08a3, #100c0820 90%); }
.cover-card { width: min(359px, 94%); text-align: center; padding: clamp(13px, 3.3vw, 27px) 16px; background: #211c15f5; border: 1px solid #8b7045; border-radius: 12px; box-shadow: 0 7px 0 #100e0ab0, 0 16px 48px #0e0b088f, inset 0 1px #d6ac5c26; }
.cover-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px; font: 700 11px/1.2 var(--mono); letter-spacing: .13em; color: #e7bf68; background: #3a2e1b; border: 1px solid #5e4829; border-radius: 4px; }
.cover-kicker > span { width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; }
.cover h2 { margin: 10px 0 6px; font-size: clamp(24px, 4.2vw, 36px); line-height: 1.14; font-weight: 900; letter-spacing: -.045em; color: #fff0cc; }
.cover p { margin: 0; color: #d0bfa1; font-size: 13px; line-height: 1.65; }
.cover-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.button { min-height: 43px; border: 1px solid transparent; border-radius: 7px; padding: 7px 16px; font-size: 14px; font-weight: 800; white-space: nowrap; touch-action: manipulation; }
.button.primary { background: var(--gold); color: #2a1f10; box-shadow: inset 0 -3px #ac7935; }
.button.primary:hover { background: #ffda7b; }
.button.primary span { margin-left: 5px; font-size: 11px; }
.button.secondary { background: #322b1f; color: #f5e5be; border-color: #6b5636; }
.button.secondary:hover { background: #493b28; }
.cover .copy-status:empty { display: none; }
.cover .copy-status:not(:empty) { margin-top: 7px; font-size: 11px; color: #eac96e; }
.machine-foot { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 7px 14px 7px 16px; gap: 10px; border-top: 1px solid #483d2a; color: #c4bdab; font-size: 12px; }
.desktop-controls { display: flex; align-items: center; gap: 8px; }
.touch-controls { display: none; }
kbd { padding: 3px 7px; background: #292b22; border: 1px solid #494c3b; border-bottom-width: 2px; border-radius: 4px; color: #eee6d0; font: 700 11px/1.1 var(--mono); white-space: nowrap; }
.hook-btn { min-width: 82px; min-height: 40px; padding: 6px 9px; border: 1px solid #826734; background: #3b3020; color: #f4cb6a; border-radius: 7px; font-weight: 800; touch-action: manipulation; }
.hook-btn:not(:disabled):hover { background: #564029; }
.hook-btn:disabled { opacity: .48; }
.hook-btn span { margin-left: 5px; }
.sidebar { display: grid; gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 17px; box-shadow: 0 8px 28px #10110c35; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.panel-tag { color: #d4ddba; font-size: 11px; letter-spacing: .05em; padding: 4px 6px; background: #2b3321; border: 1px solid #445132; border-radius: 5px; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; }
.date { color: #c1b497; font: 700 11px/1.3 var(--mono); letter-spacing: .03em; }
.record h2 { margin: 16px 0 2px; color: #d6ccb5; font-size: 13px; font-weight: 700; }
.record-score { display: flex; align-items: baseline; gap: 6px; }
.record-score strong { color: var(--gold); font: 800 43px/1.02 var(--mono); font-variant-numeric: tabular-nums; }
.record-score > span { color: #c7b887; font-size: 13px; }
.record p, .guide p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.goal { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: #d9d0bb; font-size: 12px; }
.goal strong { color: #eac368; font-weight: 700; }
.goal-track { height: 4px; margin-top: 7px; background: #424031; border-radius: 4px; overflow: hidden; }
.goal-track span { display: block; height: 100%; width: 0; background: #ddb556; border-radius: 4px; transition: width .2s; }
.guide { scroll-margin-top: 14px; }
.guide h2 { font-size: 15px; margin: 0 0 6px; }
.ore-list { margin: 0; }
.ore-list > div { display: flex; justify-content: space-between; align-items: center; min-height: 32px; border-bottom: 1px solid #39392d; }
.ore-list dt { display: flex; align-items: center; gap: 8px; color: #e8deca; font-size: 13px; }
.ore-list dd { margin: 0; font: 700 13px/1.1 var(--mono); color: #ebc772; }
.ore-icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 18px; }
.ore-icon.gold { height: 16px; background: linear-gradient(155deg, #ffdf82 32%, #e6a743 35% 68%, #a66330 70%); clip-path: polygon(20% 17%, 75% 17%, 75% 27%, 94% 27%, 94% 70%, 78% 70%, 78% 88%, 16% 88%, 16% 74%, 5% 74%, 5% 35%, 20% 35%); }
.guide p { margin-top: 10px; }
.footer { display: flex; justify-content: space-between; gap: 9px; align-items: center; min-height: 63px; color: #a8a18c; font-size: 11px; letter-spacing: .03em; }
.footer .divider-dot { margin-inline: 5px; }
@media (max-width: 950px) {
  .shell { width: calc(100% - 42px); }
  .layout { grid-template-columns: minmax(0, 1fr) minmax(199px, 227px); gap: 12px; }
  .panel { padding: 13px; }
}
@media (max-width: 710px) {
  .shell { width: calc(100% - 26px); }
  .top-in { height: 52px; }
  .brand-icon { width: 32px; height: 32px; }
  .top-link { padding: 6px 8px; }
  .intro { min-height: 119px; padding: 14px 1px 16px; }
  .intro h1 { font-size: clamp(39px, 9vw, 55px); }
  .intro p { font-size: 13px; }
  .intro-mark { width: 64px; height: 60px; margin: 0 5px 0 0; }
  .intro-mark svg { width: 64px; }
  .layout { grid-template-columns: 1fr; }
  .hud { min-height: 65px; padding: 8px 11px; }
  .viewport { aspect-ratio: 48 / 36; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .mine-label { top: 7px; left: 7px; }
  .machine-foot { min-height: 51px; padding: 5px 10px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: flex-start; padding: 17px 0 16px; min-height: 0; }
}
@media (max-width: 375px) {
  .sidebar { grid-template-columns: 1fr; }
  .cover-card { width: min(310px, 100%); }
  .cover h2 { font-size: 23px; }
  .cover p { font-size: 12px; }
  .intro-mark { width: 50px; }
  .intro-mark svg { width: 50px; }
}
@media (pointer: coarse) {
  .desktop-controls { display: none; }
  .touch-controls { display: initial; }
  .icon-btn { width: 43px; height: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
