.stack-page {
  --ink: #16221d;
  --orange: #ffc660;
  --chalk: #eef1df;
  background: #e9ecdd;
  color: var(--ink);
  color-scheme: light;
}
.stack-page button:focus-visible,.stack-page a:focus-visible { outline: 3px solid #14716e; outline-offset: 4px; }
.stack-head { color: var(--chalk); background: #172521; }
.stack-head .container,.stack-foot { display: flex; align-items: center; gap: 1.5rem; }
.stack-head .container { min-height: 66px; }
.stack-brand { font-size: 1.5rem; font-weight: 775; letter-spacing: -.065em; }
.stack-brand span { color: var(--orange); }
.stack-back { margin-left: auto; font-size: .93rem; text-underline-offset: .25em; }
.stack-head .langs a[aria-current] { color: var(--orange); }
.stack-layout { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.32fr); column-gap: clamp(1.4rem,6vw,6.8rem); row-gap: 1.75rem; padding-block: clamp(2.2rem,5.4vw,5.6rem); }
.stack-side { align-self: center; }
.stack-label { display: flex; align-items: center; gap: .65rem; color: #375e50; font: 600 .85rem/1.4 var(--mono); }
.stack-label::before { content: ""; background: currentColor; width: 1.3rem; height: 2px; }
.stack-page h1 { font-size: clamp(3.15rem,7vw,6.8rem); letter-spacing: -.077em; line-height: .95; margin: .2em 0 .24em; max-width: 9ch; font-weight: 740; }
.stack-page h1 em { color: #bf560e; }
.stack-page h2 { font-size: 1.22rem; font-weight: 650; line-height: 1.2; letter-spacing: -.028em; }
.stack-sub { font-size: clamp(1.05rem,1.48vw,1.35rem); line-height: 1.42; max-width: 33ch; }
.stack-side h2 { margin-top: clamp(1.9rem,3vw,2.6rem); }
.stack-rewards { list-style:none; padding:0; display:flex; gap:.35rem; margin:.85rem 0 0; max-width:350px; }
.stack-rewards li { display:grid; flex:1; gap:.3rem; border:1px solid #aab4a4; border-radius:.28rem; padding:.65rem .55rem; background:#f4f4e9; }
.stack-rewards span { font:500 .77rem/1.35 var(--mono); }
.stack-rewards strong { font-size:1.35rem; letter-spacing:-.04em; }
.stack-rewards .earned { background:#1d5344;color:#f0f5e6;border-color:#1d5344; }
.stack-disclosure { color:#4d5a50;line-height:1.47;font-size:.88rem;margin-top:.8rem;max-width:40ch; }
.stack-player { min-width:0;align-self:start;isolation:isolate;background:#13251f;color:var(--chalk);border-radius:14px;overflow:hidden;box-shadow:0 12px 30px #2738281d; }
.stack-meters { background:#20382e;padding:14px clamp(16px,2.3vw,29px);display:flex;justify-content:space-between;gap:1rem;border-bottom:1px solid #567062; }
.stack-meters div { display:flex;align-items:baseline;gap:.65rem; }
.stack-meters span { font:500 .83rem var(--mono);color:#d9e4d4; }
.stack-meters strong { font-size:1.3rem;letter-spacing:-.04em; }
.stack-meters strong b { font-weight:inherit; }.stack-meters div:last-child strong {color:var(--orange)}
.stack-field { display:block; width:100%; padding:0; border:0; background:#233c37; aspect-ratio:4/3; touch-action:manipulation; cursor:pointer; }
.stack-field canvas { display:block;width:100%;height:100%; }
.stack-page .stack-field:focus-visible { outline-offset:-4px;outline-color:var(--orange); }
.stack-controls { padding:1rem clamp(16px,2.3vw,29px) 1.1rem; border-top:1px solid #546657; }
.stack-controls p { color:#e0e8d8;font:500 .9rem/1.45 var(--mono);min-height:1.45em;margin-bottom:.8rem; }
.stack-controls>div { display:flex;align-items:center;gap:1rem; flex-wrap:wrap; }
.stack-controls button { border:0;font-weight:650; }
#stack-action { background:var(--orange);color:var(--ink);border-radius:.38rem;min-height:44px;padding:.65rem 1rem; }
#stack-action:hover {background:#ffda8e;}
#stack-restart { background:transparent;color:var(--chalk);border-bottom:1px solid #798c79;padding:.4rem 0; font-size:.9rem; }
.stack-guide { grid-column:2; border-top:1px solid #b8c1b1; padding:1rem 0 0; display:grid; grid-template-columns: .35fr 1fr; gap:1rem; }
.stack-guide p {color:#435046;line-height:1.5;font-size:.98rem;}
.stack-foot {border-top:1px solid #b5c0b0;justify-content:space-between;padding-block:1.2rem;font-size:.93rem;text-underline-offset:.25em;text-decoration:underline;}
@media(max-width:810px) {
  .stack-layout {grid-template-columns:1fr 1.22fr;gap:1.3rem;}
  .stack-guide {grid-column:1/-1;}
  .stack-page h1 {font-size:clamp(2.4rem,7.7vw,5rem);}
}
@media(max-width:650px) {
  .stack-layout {display:flex;flex-direction:column;gap:1.25rem;padding-block:1.5rem;}
  .stack-head .container {min-height:56px;gap:.8rem;}
  .stack-head .stack-back {font-size:.8rem;}
  .stack-side {align-self:stretch;display:contents;}
  .stack-side h1,.stack-side .stack-sub {margin-top:-.7rem;}
  .stack-page h1 {max-width:100%;margin-bottom:0;font-size:clamp(2.85rem,10vw,4.25rem);}
  .stack-side h2 {order:2;margin:0}
  .stack-rewards {order:3;margin-top:-.7rem;width:100%;}
  .stack-disclosure {order:4;margin-top:-.65rem;}
  .stack-player {align-self:stretch;order:1;}
  .stack-guide {order:5;display:block;}
  .stack-guide p {margin-top:.5rem;}
  .stack-sub {max-width:44ch;}
  .stack-controls p {font-size:.83rem;}
  .stack-foot {flex-wrap:wrap;}
}
