/* The original 720 × 1280 arcade layout owns combat UI and scaling. */
#cb-market-hud[hidden] { display: none; }
#cb-market-hud { position: absolute; inset: 0; z-index: 35; pointer-events: none; font-family: 'Space Mono', monospace; color: #fff; }
.cb-screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cb-market-round #game-container #combat-screen #balance-track-bg { left: 45px; top: calc(945px + var(--cb-arena-extra, 0px) - var(--cb-picker-lift, 0px)); width: 630px; height: 18px; }
.cb-market-round #game-container #combat-screen #balance-label { left: 45px; top: calc(980px + var(--cb-arena-extra, 0px) - var(--cb-picker-lift, 0px)); width: 630px; font-size: 24px; }
.cb-parry-panel { position: absolute; left: 202.5px; top: calc(887px + var(--cb-arena-extra, 0px) - var(--cb-picker-lift, 0px)); width: 315px; text-align: center; }
#cb-parry-label { font-size: 18px; line-height: 20px; color: #00f0ff; text-shadow: 0 0 8px #00f0ff66; }
#cb-parry-detail { font-size: 12px; line-height: 14px; color: #c5d8df; }
.cb-parry-track { position: relative; height: 9px; width: 100%; background: #1e293bcc; border: 1px solid #334155; margin-top: 5px; overflow: hidden; border-radius: 3px; }
.cb-parry-track::after { content: ''; position: absolute; left: 50%; height: 100%; border-left: 1px solid white; }
#cb-parry-fill { position: absolute; height: 100%; transition: width .15s, left .15s; }
.cb-market-controls { position: absolute; top: calc(1035px + var(--cb-arena-extra, 0px)); left: 45px; width: 630px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; pointer-events: auto; }
.cb-market-controls .action-btn { width: 100%; height: 132px; min-width: 0; padding: 4px; flex-direction: column; color: inherit; touch-action: manipulation; }
.cb-market-controls .action-btn-green { color: #00ff41; }
.cb-market-controls .action-btn-cyan { color: #00f0ff; }
.cb-market-controls button[aria-pressed="true"] { border-color: #ffcc00; color: #ffcc00; box-shadow: 0 0 18px #ffcc0066; }
.cb-market-controls button:disabled { opacity: .55; cursor: wait; }
.cb-market-controls button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cb-move-icon { width: 70px; height: 62px; background-size: 1600% 100%; background-position: 46.6667% 0; background-repeat: no-repeat; image-rendering: pixelated; }
.cb-move-name, .cb-move-state { font-size: 16px; line-height: 18px; text-align: center; }
.cb-move-state { margin-top: 3px; font-weight: bold; }
.cb-market-controls kbd { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font: bold 18px 'Space Mono', monospace; background: #030712; padding: 1px 8px; border: 1px solid currentColor; border-radius: 5px; }
#cb-quick-status { position: absolute; top: calc(1170px + var(--cb-arena-extra, 0px)); left: 45px; width: 630px; text-align: center; font-size: 14px; line-height: 16px; color: #a8c4cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cb-flow { position:absolute;top:calc(840px + var(--cb-arena-extra, 0px) - var(--cb-picker-lift, 0px));left:45px;width:630px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:19px;line-height:25px;color:#b7d6d1; }
#cb-tick-wrap { display:flex;align-items:center;gap:10px; }
.cb-tick-gauge { position:relative;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0; }
.cb-tick-svg { position:absolute;transform:rotate(-90deg);width:26px;height:26px; }
.cb-tick-bg { fill:none;stroke:rgba(255,255,255,0.18);stroke-width:2.5; }
.cb-tick-circle { fill:none;stroke:#00f0ff;stroke-width:2.5;stroke-linecap:round;stroke-dasharray:81.68;stroke-dashoffset:0;transition:stroke-dashoffset .05s linear; }
#cb-tick-sec { position:absolute;font-size:8px;line-height:8px;color:#00f0ff;font-family:'Space Mono',monospace;font-weight:bold; }
#cb-flow.has-pending-orders .cb-tick-circle { stroke:#00ff41;filter:drop-shadow(0 0 6px #00ff41); }
#cb-flow.has-pending-orders #cb-tick-sec { color:#00ff41; }
#cb-flow.has-pending-orders #cb-open-trades { color:#00ff41;font-weight:bold;animation:cb-pending-pulse .6s infinite alternate; }
@keyframes cb-pending-pulse { from { opacity:.85;text-shadow:0 0 4px rgba(0,255,65,0.4); } to { opacity:1;text-shadow:0 0 12px rgba(0,255,65,0.9); } }
#cb-streak { color:#ffdc6b; }.cb-streak-hot { text-shadow:0 0 14px #ffcc00; }
.cb-market-controls .cb-recovering { background-image:linear-gradient(#ffe06618,#ffe06618); }
.cb-market-controls .cb-queued { outline:2px solid #ffcc00;outline-offset:2px; }
.cb-market-controls .cb-strike { animation:cb-button-strike .24s ease-out; }
@keyframes cb-button-strike { from { box-shadow:0 0 28px currentColor;background-color:#ffffff35;transform:translateY(2px); } to { transform:translateY(0); } }
@media(prefers-reduced-motion:reduce){.cb-market-controls .cb-strike{animation:none}}
.cb-market-round #cb-combat-hud, .cb-market-round #cb-live-run-hud, .cb-market-round #tutorial-callout { display: none !important; }
.cb-market-round #combat-screen #pause-btn { display: block !important; }
.cb-market-round .cb-practice { bottom: 190px; max-height: calc(100dvh - 270px); }
/* Four inline choices: no backdrop, modal, focus trap or blocked combat controls. */
#cb-parry-chooser[hidden] { display: none; }
#cb-parry-chooser { position: absolute; left: 45px; top: calc(915px + var(--cb-arena-extra, 0px)); width: 630px; height: 100px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; pointer-events: auto; }
#cb-parry-chooser button { min-width: 0; border: 2px solid #00ff41; border-radius: 6px; background: #071c13; color: #00ff41; font: bold 30px 'Space Mono', monospace; cursor: pointer; touch-action: manipulation; box-shadow: 0 0 12px #00ff4133; }
#cb-parry-chooser[data-direction="sell"] button { border-color: #ff6475; color: #ff8895; background: #220c15; box-shadow: 0 0 12px #ff647533; }
#cb-parry-chooser button:active { filter: brightness(1.5); }
#cb-parry-chooser button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#combat-screen:has(#cb-parry-chooser:not([hidden])) { --cb-picker-lift: 125px; }
#tutorial-modal .modal-content { max-height: calc(100dvh - 32px); overflow: hidden; }
#tutorial-modal .modal-content > div:nth-child(2) { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
#tutorial-modal .modal-header, #tutorial-dots, #tutorial-modal .modal-content > div:last-child { flex-shrink: 0; }
#tutorial-next-btn, #tutorial-prev-btn { min-height: 44px; }

#cb-market-hud #cb-move-cue { display:none; }
.cb-rookie-controls #cb-market-hud #cb-move-cue { display:block; position:absolute; top:calc(877px + var(--cb-arena-extra,0px)); left:45px; right:auto; transform:none; width:630px; min-height:58px; max-height:64px; padding:4px 8px; border:0; background:transparent; color:#d7f5bb; font-size:20px; line-height:24px; overflow:hidden; }
.cb-rookie-controls .cb-move-name { font-size:24px; line-height:26px; }
.cb-rookie-controls .cb-move-state { font-size:18px; line-height:21px; }
.cb-rookie-controls.cb-rookie-power .cb-move-name { font-size:20px; }
