.forge-preview {
  color-scheme: light;
  --paper: #f4e8cf;
  --ink: #231c18;
  --accent: #a5321f;
  --teal: #117770;
  --line: #30231b;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.45;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
.forge-preview .wrap {
  width: min(1040px, calc(100% - 24px));
  margin-inline: auto;
}
.forge-preview .masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding-block: 10px;
  border-bottom: 2px solid var(--line);
}
.forge-preview .wordmark {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.forge-preview .wordmark span {
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  margin-left: 0.35rem;
  color: var(--accent);
}
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
}
.page-head {
  padding-block: 12px 10px;
}
.page-head h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  line-height: 1.05;
}
.page-head p {
  margin: 4px 0 0;
  font-size: 0.94rem;
  max-width: 66ch;
}
.cabinet {
  --amber: #ffd276;
  width: min(100%, 1040px);
  background: #231c18;
  color: #fff3da;
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 #b47b49;
}
.hud {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0;
  background: #33241a;
  border-bottom: 2px solid #8a5e38;
}
.hud > div[hidden] { display: none; }
.hud > div {
  padding: 6px 4px;
  text-align: center;
}
.hud > div + div {
  border-left: 1px solid #593e2b;
}
.hud dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f0c993;
}
.hud dd {
  margin: 2px 0 0;
  font-size: clamp(0.95rem, 2.6vw, 1.3rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.hud dd.is-hot { color: #ffd276; }
.hud dd.is-redline { color: #ff6b5b; }
.heat-bar {
  position: relative;
  height: 6px;
  width: min(88%, 92px);
  margin: 3px auto 0;
  background: #1a110c;
  border: 1px solid #8a5e38;
  overflow: hidden;
}
.heat-sweet {
  position: absolute;
  left: 50%;
  width: 35%;
  top: 0;
  bottom: 0;
  background: rgba(255, 210, 118, 0.25);
}
.heat-fill {
  position: relative;
  height: 100%;
  width: 22%;
  background: linear-gradient(90deg, #22bfae, #f3a633 55%, #ff3b1f 88%);
  transition: width 80ms linear;
}
.stage {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #231c18;
  touch-action: none;
  user-select: none;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.game-prompt {
  position: absolute;
  inset: auto 50% 6px auto;
  transform: translateX(50%);
  width: max-content;
  max-width: calc(100% - 16px);
  margin: 0;
  padding: 4px 9px;
  border: 2px solid #f5c784;
  border-radius: 5px;
  background: #2b1e16;
  color: #fff3da;
  box-shadow: 0 2px 5px #231c1877;
  font: 700 clamp(.75rem, 3.3vw, .95rem)/1.25 system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}
.game-prompt[hidden] { display: none; }
.game-prompt strong { color: #ffcd76; }
.game-prompt[data-cue='overheat'] { border-color: #ff9b7d; background: #4d1b14; }
.game-prompt[data-cue='overheat'] strong { color: #ffba9f; }
.voice-credit { margin: 5px 0; font-size: .75rem; color: #6e4931; }
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 16px;
  background: rgba(28, 18, 13, 0.88);
}
.overlay[hidden] { display: none; }
.overlay.is-cover {
  align-items: flex-start;
  text-align: left;
  padding-inline: clamp(18px, 5vw, 48px);
  background: linear-gradient(90deg, #141a1b 8%, #141a1bd9 38%, #11181814 76%),
    url('./assets/forge-title.webp') 72% 48% / cover;
}
.eyebrow {
  margin: 0;
  padding: 2px 7px;
  background: rgba(20, 26, 27, 0.72);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #f9bd76;
}
.overlay h2 {
  margin: 4px 0 6px;
  font-family: Georgia, serif;
  font-size: clamp(1.55rem, 4.8vw, 2.7rem);
  line-height: 1.02;
  color: #ffe3a8;
}
.overlay p {
  margin: 0 0 10px;
  max-width: 36ch;
  font-size: 0.94rem;
}
.overlay .movement-hint {
  font-size: 0.82rem;
  font-weight: 700;
}
.overlay:not(.is-cover) .movement-hint,
.touch-hint { display: none; }
@media (hover: none) and (pointer: coarse) {
  .keyboard-hint { display: none; }
  .touch-hint { display: inline; }
}
.report {
  padding: 8px 10px;
  background: rgba(244, 232, 207, 0.12);
  border-left: 3px solid var(--amber);
  font-size: 0.84rem !important;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  min-height: 44px;
  background: var(--amber);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 #140d09;
  font: 800 0.95rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.btn:hover { background: #ffe094; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #140d09; }
.cabinet .controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  border-top: 2px solid #8a5e38;
  background: #2b1e16;
}
.status {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #f4dbb4;
}
.status.is-covered { visibility: hidden; }
.cabinet .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-btn {
  min-height: 44px;
  padding: 6px 12px;
  border: 1.5px solid #c4986e;
  border-radius: 4px;
  background: #483328;
  color: #fff3da;
  font: 800 0.85rem/1 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.ctrl-btn[hidden] { display: none; }
.ctrl-btn:disabled { opacity: 0.5; cursor: default; }
.pounce-btn {
  --cd: 0;
  min-width: 108px;
  min-height: 48px;
  background: linear-gradient(
    90deg,
    #81583f calc(var(--cd) * 100%),
    var(--amber) calc(var(--cd) * 100%)
  );
  color: var(--ink);
  border-color: var(--line);
  font-size: 0.95rem;
}
.legend {
  margin: 10px 0 18px;
  font-size: 0.88rem;
}
@media (max-width: 640px) {
  .forge-preview .wrap { width: calc(100% - 12px); }
  .page-head p { display: none; }
  .stage { aspect-ratio: 4 / 3; }
  .overlay.is-cover {
    justify-content: flex-end;
    background: linear-gradient(0deg, #141a1b 10%, #141a1be0 42%, #11181810 80%),
      url('./assets/forge-title.webp') 68% 42% / cover;
  }
  .cabinet .controls { padding: 8px; }
  .pounce-btn { min-width: 120px; min-height: 52px; }
}
