/* Shared geometry for every game's header, including compact viewports. */
.phone .game-header {
  --game-header-safe-top: 0px;
  box-sizing: border-box;
  height: calc(62px + var(--game-header-safe-top));
  min-height: calc(62px + var(--game-header-safe-top));
  max-height: calc(62px + var(--game-header-safe-top));
  flex: 0 0 calc(62px + var(--game-header-safe-top));
  padding-top: calc(8px + var(--game-header-safe-top));
  padding-bottom: 8px;
  align-items: center;
}
@media (max-width: 520px) {
  .phone .game-header {
    --game-header-safe-top: env(safe-area-inset-top, 0px);
  }
}
.phone .game-header.standard-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px;padding-left:8px;padding-right:8px}
.standard-header .game-nav,.standard-header .game-controls{display:flex;align-items:center;gap:3px}
.phone .standard-header h1{font-size:clamp(12px,3.6vw,17px);line-height:1.15;letter-spacing:-.3px;text-align:center;margin:0;min-width:0;overflow-wrap:normal}
.phone .standard-header h1 small{display:block;font-size:10px}
.phone .standard-header button{display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;min-width:34px;height:44px;min-height:44px;padding:4px;border:0;border-radius:12px;background:#e3f5f9;color:#005fc4;font-size:21px}
.phone .standard-header button:disabled{opacity:.35;cursor:default}
.game-menu{max-height:calc(100dvh - 32px);overflow:auto;text-align:center}
.game-menu button{display:block;width:100%;margin:12px 0 0;min-height:48px;border-radius:14px;font-size:15px;font-weight:800;padding:12px}
.game-menu .danger{background:#b9334c;color:white}
@media(max-width:350px){.phone .game-header.standard-header{gap:3px;padding-left:4px;padding-right:4px}.phone .standard-header button{width:30px;min-width:30px;flex-basis:30px}.standard-header .game-nav,.standard-header .game-controls{gap:2px}}
.visual-guide{margin:12px 0 18px;text-align:left}
.guide-equation,.guide-cards{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:18px 10px;border-radius:18px;background:#e3f5f9;font-size:25px;color:#005fc4}
.guide-equation em{font-style:normal;border:2px dashed #005fc4;border-radius:8px;padding:0 6px}
.guide-cards>span{display:grid;place-items:center;width:48px;height:58px;background:white;border:2px solid #d6cbb9;border-radius:10px}
.guide-grid{display:grid;grid-template-columns:repeat(3,40px);gap:4px;justify-content:center;padding:14px;background:#e3f5f9;border-radius:18px}
.guide-grid>*{display:grid;place-items:center;height:40px;font-size:27px;font-style:normal;border-radius:7px;background:white;color:#a52759}.guide-grid>b{background:#dcf5de;color:#005fc4}
.guide-steps{list-style:none;display:grid;gap:14px;margin:18px 0;padding:0}
.guide-steps li{display:flex;gap:12px;align-items:flex-start}
.guide-steps li>span{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:12px;background:#fff0cf;font-size:23px}
.guide-steps strong{font-size:15px;line-height:1.4}
.visual-guide .guide-steps p{margin:3px 0 0;font-size:13px;line-height:1.5}
.guide-details{border-top:1px solid #eadfce;padding-top:8px}.guide-details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:700;color:#005fc4}.visual-guide .guide-details p{font-size:12px;line-height:1.55}

.phone .standard-header button[hidden]{display:none}
.phone .standard-header .game-controls svg{width:23px;height:23px}
