.stack-job { --stack-acid: #e1ff16; --stack-blue: #5cccf5; --stack-red: #ff715d; --stack-gold: #ebc468; max-width: 560px; margin: 16px auto 28px; }
.arcade-selector { display:flex; gap:8px; max-width:560px; margin:0 auto 12px; }
.arcade-selector button { flex:1; min-width:0; min-height:48px; padding:10px 8px; border:1px solid #60664e; border-radius:2px; color:#f7f5e7; background:#14180f; font:800 .875rem/1.3 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; cursor:pointer; }
.arcade-selector button[hidden],.arcade-page>[hidden] { display:none !important; }
.arcade-selector button[aria-pressed="true"] { background:#e1ff16; color:#0b1004; border-color:#e1ff16; box-shadow:3px 3px 0 #808c20; }
.arcade-selector button:focus-visible { outline:3px solid #fff; outline-offset:3px; }
#arcade-stakeout-panel .stakeout-game { margin:0 0 24px; }
#arcade-stakeout-panel .stakeout-game>summary { min-height:44px; padding:10px 16px; font-size:1rem; }
#arcade-stakeout-panel .stakeout-game nav { margin-bottom:12px; }
#screen-arcade .arcade-heading, #screen-arcade > .page > #arcade-lede { display: none; }
.stack-job [hidden] { display: none !important; }
.stack-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stack-heading .page-kicker { font-size: .8rem; letter-spacing: .03em; margin: 0 0 4px; color: #babca7; }
.stack-heading h3 { font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(2.4rem, 8vw, 3.5rem); line-height: 1; letter-spacing: -.025em; margin: 0; color: #f7f5e7; }
.stack-job button { font: 800 .875rem/1.25 ui-monospace, Consolas, monospace; cursor: pointer; }
.stack-job button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; z-index: 2; }
.stack-job button:disabled { cursor: default; opacity: .45; }
.stack-quiet { min-height: 44px; border: 1px solid #535744; padding: 9px 12px; color: #f7f5e7; background: #181c13; border-radius: 3px; }
.stack-quiet:hover:not(:disabled) { border-color: var(--stack-acid); }
.stack-modes { display: flex; gap: 8px; margin: 18px 0 14px; }
.stack-mode { flex: 1; min-height: 44px; border: 1px solid #535744; background: #14170f; color: #c6c9b7; border-radius: 3px; }
.stack-mode[aria-pressed="true"] { color: #0c1006; background: var(--stack-acid); border-color: var(--stack-acid); box-shadow: 3px 3px 0 #6b7624; }
.stack-hud { display: grid; grid-template-columns: 1.3fr 1fr .7fr; align-items: end; padding: 0 4px 13px; gap: 12px; }
.stack-hud span { display: block; font-size: .875rem; color: #b7bba5; }
.stack-hud strong { color: #f7f5e7; font: 900 1.45rem/1.2 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.stack-hud > :first-child strong { font-size: 2.4rem; color: var(--stack-acid); }
.stack-hud > :last-child { text-align: right; }
.stack-board-wrap { position: relative; max-width: 420px; margin: auto; padding: 10px; background: #2a3020; border: 1px solid #70775a; border-bottom: 5px solid #0c1007; border-right: 4px solid #0c1007; border-radius: 6px; box-shadow: 0 0 0 3px #14180d, 0 12px 28px #0008; }
.stack-board { display: grid; grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; gap: 3px; touch-action: manipulation; }
.stack-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; min-height: 0; }
.stack-cell { min-width: 0; padding: 0; border: 1px solid #323e27; border-radius: 2px; background: #0b1008; box-shadow: inset 0 2px 2px #0007; }
.stack-cell:nth-child(2n) { background: #10170d; }
.stack-cell[data-tone="1"], .stack-bit[data-tone="1"] { background: var(--stack-acid); border-color: #efff7e #818f15 #6e790e #efff7e; }
.stack-cell[data-tone="2"], .stack-bit[data-tone="2"] { background: var(--stack-blue); border-color: #c0eaff #277698 #206581 #c0eaff; }
.stack-cell[data-tone="3"], .stack-bit[data-tone="3"] { background: var(--stack-red); border-color: #ffb9a8 #a74136 #94382e #ffb9a8; }
.stack-cell[data-tone="4"], .stack-bit[data-tone="4"] { background: var(--stack-gold); border-color: #ffeab0 #9b7831 #805f24 #ffeab0; }
.stack-cell[data-tone]:not([data-tone="0"]) { border-width: 3px; box-shadow: inset 0 0 0 1px #ffffff20, 0 2px 1px #0007; }
.stack-cell.preview { background: #819128 !important; border: 2px solid var(--stack-acid); box-shadow: inset 0 0 0 2px #0004; }
.stack-cell.preview-invalid { background: #66362c !important; border: 2px solid #ff715d; }
.stack-cell.line-preview { box-shadow: inset 0 0 0 2px #fff; filter: brightness(1.35); }
.stack-start { position: absolute; inset: 10px; background: #080d05ec; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 22px; gap: 14px; text-align: center; border: 1px solid #495534; }
.stack-start p { font-size: 1rem; line-height: 1.45; max-width: 260px; color: #e7e7d8; margin: 0; }
.stack-job .btn { border: 1px solid var(--stack-acid); min-height: 48px; padding: 12px 20px; color: #0b1004; background: var(--stack-acid); box-shadow: 3px 3px 0 #8a951f; border-radius: 2px; }
.stack-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; max-width: 420px; margin: 17px auto 0; }
.stack-piece { position: relative; min-height: 94px; display: flex; align-items: center; justify-content: center; background: #171d11; border: 1px solid #3b492d; border-bottom-width: 3px; border-radius: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.stack-piece[aria-pressed="true"] { border-color: var(--stack-acid); background: #30381a; }
.stack-piece[data-empty="true"] { border-style: dashed; background: transparent; }
.stack-piece small { font-size: .8rem; color: #a8ae95; }
.stack-shape { display: grid; gap: 2px; pointer-events: none; }
.stack-bit { width: 19px; height: 19px; border: 2px solid; border-radius: 2px; box-shadow: 0 2px 1px #0008; }
.stack-help { margin: 13px 0; text-align: center; color: #bfc3ae; font-size: .875rem; line-height: 1.5; }
.stack-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.stack-status { min-height: 2.8em; margin: 12px 0 8px; color: #c9cdbb; font-size: .875rem; text-align: center; line-height: 1.45; }
.stack-result { margin: 14px 0; padding: 20px; background: #242c16; border-left: 4px solid var(--stack-acid); }
.stack-result h4 { font-size: 1.5rem; margin: 0 0 8px; }.stack-result p { font-size: 1rem; }
.stack-rewards { border-block: 1px solid #3e4730; font-size: .875rem; }.stack-rewards summary { cursor: pointer; padding: 17px 0; display: flex; justify-content: space-between; gap: 10px; font-weight: 800; }.stack-rewards summary > :last-child { color: var(--stack-acid); }.stack-reward-body { padding: 0 0 12px; }.stack-reward-body p { font-size: .875rem; line-height: 1.5; color: #c5cab4; }
.arcade-prototypes { border-top: 1px solid #424632; padding-top: 15px; }.arcade-prototypes > summary { cursor: pointer; font-weight: 800; font-size: 1rem; }.arcade-prototypes > summary span { display: block; font-size: .875rem; color: #b8bda5; margin: 5px 0 16px; font-weight: 400; }
.stack-ghost { position: fixed; pointer-events: none; z-index: 1200; opacity: .92; filter: drop-shadow(0 12px 7px #0009); }
.stack-ghost .stack-bit { width: var(--ghost-cell); height: var(--ghost-cell); border-width: 3px; }.stack-ghost.invalid { opacity: .5; }
.stack-fx { position: absolute; inset: 10px; pointer-events: none; overflow: hidden; }
.stack-flash { position: absolute; background: #fff7c9; border: 2px solid #fff; border-radius: 2px; animation: stack-clear .42s ease-out forwards; }
.stack-points { position: absolute; top: 40%; left: 0; width: 100%; text-align: center; font: 950 1.9rem/1.1 ui-monospace, Consolas, monospace; color: #fff; text-shadow: 0 3px 1px #000, 2px 0 0 #000; animation: stack-points .7s ease-out forwards; }
@keyframes stack-clear { 0% { opacity: 1; transform: scale(1); } 35% { opacity: 1; transform: scale(.9); } 100% { opacity: 0; transform: scale(.2) rotate(30deg); } }
@keyframes stack-points { 0% { opacity: 0; transform: translateY(12px) scale(.8); } 20% { opacity: 1; transform: translateY(0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-35px); } }
@media (max-width: 430px) { .stack-heading .page-kicker { max-width: 200px; }.stack-hud strong { font-size: 1.15rem; }.stack-heading { gap: 8px; }.stack-board-wrap { padding: 7px; }.stack-start { inset: 7px; }.stack-piece { min-height: 84px; }.stack-bit { width: 17px; height: 17px; } }
@media (prefers-reduced-motion: reduce) { .stack-flash, .stack-points { animation-duration: .08s; } }
