.pinned > header {
 display: flex;
 flex-direction: row;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 min-height: 52px;
 padding: 5px 1px;
}
.game-links, .game-links nav, .popup-panel .language-buttons {
 display: flex;
 align-items: center;
 gap: 8px;
}
.game-links button, .game-popup summary {
 min-height: 42px;
 padding: 7px 12px;
 border: 1px solid #90a48e;
 border-radius: 9px;
 background: #f9faed;
 color: #294335;
 font-size: 13px;
 font-weight: 700;
 line-height: 1.15;
 white-space: nowrap;
}
.game-popup {position: relative}
.game-popup[open] {z-index: 20}
.game-popup summary {
 display: flex;
 align-items: center;
 gap: 5px;
 list-style: none;
 cursor: pointer;
 font-size: 13px;
 font-weight: 700;
}
.game-popup summary::-webkit-details-marker {display: none}
.game-popup summary::after {
 content: "";
 width: 6px;
 height: 6px;
 border-right: 1px solid currentColor;
 border-bottom: 1px solid currentColor;
 transform: translateY(-2px) rotate(45deg);
}
.game-popup[open] summary::after {transform: translateY(2px) rotate(225deg)}
.popup-panel {
 position: absolute;
 top: calc(100% + 5px);
 right: 0;
 min-width: 190px;
 padding: 8px;
 border: 1px solid #91a38c;
 border-radius: 12px;
 background: #f6f7ec;
 box-shadow: 0 8px 25px #20372832;
}
.game-links nav {display: grid; gap: 2px; padding: 0 0 5px}
.game-links nav a {display: block; padding: 9px 7px; font-size: 14px}
.game-links nav a:hover {background: #e1ecd5; border-radius: 6px}
.game-links .language-buttons {padding: 6px 2px 0; border-top: 1px solid #bbccae}
.pinned .phase-head {
 display: flex;
 flex-direction: row;
 justify-content: space-between;
 gap: 8px;
 min-height: 0;
 padding: 10px 12px;
 align-items: center;
 text-align: left;
}
.pinned .phase-head > div:first-child {padding-left: 0}
body:is([data-round=ideal],[data-round=guess]) #round-purpose {display: none}
#next-slot:empty, #play-next-slot:empty {display: none}
body[data-round] .phase-head h1 {font-size: clamp(22px, 3.4vw, 33px); line-height: 1.05}
body[data-round] #eyebrow {font-size: 10px; margin-bottom: 4px}

body.game-locked #allocation-console {
 display: grid;
 grid-template-columns: minmax(170px, .8fr) minmax(0, 1.2fr);
 gap: 12px;
 padding: 8px 11px;
 background: #294839;
 color: #f6f7e4;
 border: 1px solid #294839;
 border-radius: 0 0 12px 12px;
 z-index: 6;
}
body.game-locked #allocation-console[hidden] {display: none}
body.game-locked #allocation-console #tray-dock {
 justify-content: flex-start;
 min-height: 48px;
 gap: 10px;
 padding: 0;
}
body.game-locked #allocation-console #dock-svg {width: 76px; height: 42px; flex: none}
#allocation-console #tray-dock #tray-readout,
#allocation-console #dock-label-slot {width: auto; min-width: 0; text-align: left}
#allocation-console #tray-label {color: #d5e4c9; font-size: 10px; letter-spacing: .07em}
#allocation-console #tray-total {color: #fff7d5; font-size: clamp(19px, 3vw, 28px); line-height: 1.16}
#allocation-console #play-tools {
 display: flex;
 align-items: center;
 justify-content: end;
 flex-wrap: nowrap;
 gap: 7px;
 padding: 0;
 min-width: 0;
}
#allocation-console .nozzles {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 3px;
 border-radius: 11px;
 padding: 3px;
 background: #1c352b;
}
#allocation-console .nozzles button {
 min-height: 41px;
 padding: 6px 9px;
 background: #345643;
 color: #f6f6e7;
 border-color: transparent;
 font-size: 13px;
 font-weight: 700;
 box-shadow: none;
}
#allocation-console .nozzles button[aria-pressed=true] {
 background: #f5ce74;
 color: #2b3329;
 border-color: #e0b45c;
}
#allocation-console .popup-panel {color: #253c31; min-width: 220px}
#allocation-console .popup-panel .tool-group {flex-wrap: wrap; gap: 5px; padding: 3px 0; margin: 0}
#allocation-console .popup-panel button {min-height: 39px; padding: 7px; font-size: 12px}
#tool-menu-label {min-height: 41px; padding-inline: 8px}

body.game-locked:not([data-round=actual]) .pinned {overflow-y: auto; overscroll-behavior: contain}
body.game-locked:not([data-round=actual]) .game-board {flex: 1 0 auto; min-height: 0}
body.game-locked:not([data-round=actual]) .scene-scroll.chart {flex: 1 0 230px}
body:is([data-round=ideal],[data-round=guess]) .game-board .board-top {display: none}
#pour-prompt {
 margin: 9px 0 0;
 padding: 0 7px;
 font-size: clamp(13px, 2.8vw, 15px);
 font-weight: 700;
 line-height: 1.25;
 color: #355343;
 text-align: center;
}
#rain-zone[aria-disabled=true] {pointer-events: none}
#rain-zone {cursor: crosshair; touch-action: none}
#aim-guide {opacity: 0}
body.pouring #aim-guide, #chart-scene:focus-within #aim-guide {opacity: .45}
#money-axis span {
 transform: translateY(-50%);
 line-height: 1.15;
 color: #3e5f47;
}
#money-axis [data-zero=true] {font-weight: 800; color: #244332}
.scene-scroll.chart {border-radius: 9px; background: linear-gradient(#f5f6e986,#ecf1de70)}
#stage-actions:not([hidden]) {
 display: grid;
 grid-template-columns: minmax(0,1fr) minmax(0,1fr);
 align-items: center;
 gap: 9px;
 width: min(100%, 480px);
 margin: 9px auto 4px;
}
#stage-actions button {
 width: 100%;
 min-height: 46px;
 padding: 8px 9px;
 font-size: 14px;
}
#stage-actions #advance {background: #e6ecdd; border-color: #90a48e; box-shadow: none}
#stage-actions #advance.ready {background: #f6ce72; border-color: #a98b49; box-shadow: 0 3px 0 #aa975b}
#view-controls {
 display: block;
 width: 100%;
 margin: 5px 0;
 padding: 0 4px;
 background: transparent;
}
#view-controls[hidden] {display: none}
#control-title {
 width: fit-content;
 padding: 8px 2px;
 min-height: 33px;
 font-size: 13px;
 font-weight: 700;
 cursor: pointer;
}
#chart-settings, #camera-controls {padding: 4px 0}
#statistics header {min-height: 0}

@media (max-width: 700px) {
 .pinned > header {min-height: 49px; display: flex}
 .game-links {gap: 5px}
 .game-links button, .game-popup summary {padding-inline: 8px}
 .pinned .brand-copy strong {font-size: 18px}
 .pinned .line-mark {width: 26px; height: 26px}
 .pinned .phase-head {padding: 8px 9px}
 body.game-locked #allocation-console {grid-template-columns: 1fr; gap: 4px; padding: 6px 8px}
 body.game-locked #allocation-console #tray-dock {min-height: 36px}
 body.game-locked #allocation-console #dock-svg {width: 58px; height: 34px}
 #allocation-console #play-tools {justify-content: stretch}
 #allocation-console .nozzles {flex: 1; min-width: 0}
 #allocation-console .nozzles button {min-height: 41px; font-size: 12px; padding: 5px 2px}
 #tool-menu-label {font-size: 12px}
 body.game-locked:not([data-round=actual]) .pinned {display: flex}
 body.game-locked:not([data-round=actual]) .scene-scroll.chart {
  flex-basis: clamp(190px, 42svh, 380px);
  height: auto;
 }
 body.game-locked[data-round=actual] .scene-scroll.chart {height: clamp(232px, 42svh, 375px)}
 .scene-scroll.chart {margin-left: 60px; width: calc(100% - 60px)}
 #money-axis span {width: 59px; font-size: 10px; letter-spacing: -.02em}
 #phone-axis:not([hidden]) {margin: -7px 0 0 60px}
 #round-purpose {text-wrap: pretty}
 #stage-actions button {font-size: 13px}
 #view-controls #chart-settings {display: flex; flex-wrap: wrap; gap: 5px}
 #view-controls #camera-controls {flex-wrap: wrap}
}
