/* Scoped game skin. Data Factory shares binary.css, but keeps its own layout. */
@font-face { font-family: BinaryClassroom; src: url('../../onbatang/brand/noto-sans-kr.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
body.binary-adventure {
  --primary: #00835d; --primary-dark: #12484d; --text: #153f48; --muted: #496c78;
  --line: #b9ddd5; --soft: #e4f3ee; --ok: #00835d; --ok-soft: #d9f6e6;
  --warn: #a64236; --warn-soft: #fff0e6; --lit: #ffe579; --lit-edge: #e8bd38;
  color: var(--text); background: #d8f0fa url('../../digital/procedure/assets/theme-adventure.webp') center center / cover fixed;
  font-family: BinaryClassroom, var(--font); font-size: clamp(16px, 1.05vw, 40px); line-height: 1.5;
}
.binary-adventure *, .binary-adventure *::before, .binary-adventure *::after { box-sizing: border-box; }
.binary-adventure [hidden] { display: none !important; }
.binary-adventure .pc-stage-icon { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
.binary-adventure .pc-stage-icon svg { width: 100%; height: 100%; }
.binary-adventure .bin-world-head, .binary-adventure .green-main { width: calc(100% - 3em); max-width: 3400px; margin: 0 auto; }
.binary-adventure .green-main { padding: .6em 0 1em; zoom: 1; }
.bin-world-head { display: grid; grid-template-columns: 1fr auto; gap: .6em 1em; padding: .8em 0 .2em; }
.bin-world-title { display: flex; gap: .7em; align-items: center; }
.bin-world-title p { margin: 0; font-size: .72em; font-weight: 750; color: #345e69; }
.bin-world-title h1 { margin: 0; font-size: 1.5em; line-height: 1.25; color: #123e48; letter-spacing: -.04em; }
.bin-back { display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%; background: #f4fffcde; color: var(--text); text-decoration: none; }
.bin-world-tools { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; justify-content: end; }
.bin-world-goal { grid-column: 1/-1; position: relative; justify-self: center; min-width: 65%; max-width: 100%; padding: .65em 1.6em; margin-top: .3em; border: 1.5px solid #ffe595; border-radius: 1.1em; background: #f6fffaed; box-shadow: 0 .3em 1.2em #246c6312; text-align: center; }
.bin-world-goal > span { position: absolute; left: 50%; top: -.65em; transform: translateX(-50%); border-radius: 1em; padding: 0 1em; background: #f6fffa; font-size: .65em; letter-spacing: .12em; font-weight: 850; white-space: nowrap; }
.bin-world-goal p { margin: 0; font-size: 1.05em; font-weight: 750; }
.bin-world-goal strong { display: inline-block; padding: .08em .6em; border-radius: 1em; background: var(--lit); margin-right: .25em; }
.bin-world-goal b { text-decoration: underline; text-decoration-color: #f1d36c; text-decoration-thickness: .16em; text-underline-offset: .2em; }
.binary-adventure .btn, .binary-adventure .pg-opt { font: inherit; font-weight: 750; border: 1px solid var(--line); border-radius: 1em; min-height: 2.7em; padding: .5em 1em; background: #f7fffc; color: var(--text); box-shadow: 0 2px 0 #114e4210; display: inline-flex; justify-content: center; align-items: center; gap: .4em; text-decoration: none; cursor: pointer; }
.binary-adventure .btn-primary { color: white; background: linear-gradient(150deg,#2ba67c,#008157 65%); border-color: #008357; box-shadow: inset 0 2px 1px #ffffff60, 0 3px 0 #00664d, 0 5px 12px #00664d20; }
.binary-adventure .btn-primary:hover:not(:disabled) { color: white; background: linear-gradient(150deg,#31aa80,#008157 65%); border-color: #008357; }
.binary-adventure .btn:hover:not(:disabled), .binary-adventure .pg-opt:hover:not(:disabled) { filter: brightness(1.04); transform: translateY(-1px); }
.binary-adventure .btn:active:not(:disabled) { transform: translateY(1px); }
.binary-adventure .btn:disabled { opacity: .5; cursor: default; }
.binary-adventure .btn.bin-tool, .binary-adventure .btn.small { min-height: 2.5em; font-size: .8em; padding: .4em .8em; }
.binary-adventure :is(button, a, input, summary):focus-visible { outline: 3px solid #3155c2; outline-offset: 4px; }
.binary-adventure .green-main > .bin-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); padding: .3em; gap: .3em; border: 1px solid #ffffffcf; border-radius: 2em; background: #f3fffbed; margin: 0 0 .7em; }
.binary-adventure .green-main > .bin-tabs .tab { min-height: 2.7em; padding: .45em .5em; border: 0; border-radius: 2em; font-size: .9em; font-weight: 800; white-space: normal; display: flex; align-items: center; justify-content: center; gap: .45em; color: var(--muted); background: transparent; }
.binary-adventure .green-main > .bin-tabs .tab[aria-selected=true] { background: linear-gradient(145deg,#2da47e,#00845b 65%); color: white; box-shadow: inset 0 2px 2px #ffffff6b; }
.binary-adventure .tab-mark { font-size: .72em; color: #875d00; white-space: nowrap; }
.binary-adventure .tab[aria-selected=true] .tab-mark { color: #ffe998; }
.bin-adventure-layout { display: grid; grid-template-columns: minmax(180px,.24fr) minmax(0,1fr); gap: 1em; align-items: start; }
.bin-workspace { min-width: 0; }
.bin-companion { display: flex; flex-direction: column; align-items: center; gap: .4em; padding-top: .5em; }
.bin-mascot { position: relative; width: 100%; display: grid; place-items: center; }
.bin-mascot::after { content: ''; position: absolute; bottom: 0; z-index: -1; width: 85%; height: 10%; border-radius: 50%; background: #c9eee1bd; border: 3px solid #9ad1bea1; }
.bin-mascot img { height: clamp(160px, 25vh, 650px); width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px #1e635a27); }
.bin-speech { position: relative; width: 100%; padding: .8em 1em 1em; border: 1px solid #ffffff; border-radius: 1.4em; background: #f1fffaed; box-shadow: 0 10px 25px #2d6d7a15; backdrop-filter: blur(16px); }
.bin-speech::before { content: ''; position: absolute; top: -.4em; left: calc(50% - .4em); width: .8em; height: .8em; transform: rotate(45deg); background: #f1fffa; border-left: 1px solid white; border-top: 1px solid white; }
.bin-speaker { display: flex; justify-content: center; align-items: center; gap: .4em; color: #00794f; font-size: .83em; }
.bin-dialogue { margin: .4em 0 0; font-size: 1.04em; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.6; text-align: center; }
.bin-companion[data-mood=success] .bin-speech { box-shadow: 0 0 0 2px #3ca97b, 0 10px 25px #2d6d7a15; }
.binary-adventure .card { margin: 0; padding: 1.2em; border: 1px solid #fff; border-radius: 1.6em; background: linear-gradient(130deg,#f5fffaed,#f3fcffed); box-shadow: 0 .6em 2em #245a7020, inset 0 1px 0 white; backdrop-filter: blur(18px); }
.binary-adventure h2 { font-size: 1.2em; line-height: 1.35; margin: 0 0 .5em; color: var(--text); letter-spacing: -.03em; }
.bin-eyebrow { margin: 0 0 .25em; color: #317260; font-size: .74em; font-weight: 800; letter-spacing: .06em; }
.bin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.bin-legend { display: flex; gap: .6em; font-size: .7em; white-space: nowrap; }
.bin-legend b { background: #ffeb91; border-radius: 1em; padding: .2em .6em; }
.bin-legend span { padding: .2em 0; }
.binary-adventure .bin-stagebox { background: linear-gradient(180deg,#cfe9e54d,#d4eae94f); border: 1px solid #b8d7d36e; border-radius: 1.3em; margin: .5em 0; padding: 1em .6em; }
.binary-adventure .bit-board { max-width: calc(var(--cards) * clamp(68px, 6.6vw, 165px)); gap: clamp(5px,1vw,18px); }
.binary-adventure .bin-lab .bit-board { max-width: calc(var(--cards) * clamp(82px,8.5vw,260px)); }
.binary-adventure .bit-card { aspect-ratio: 1 / 1.13; }
.binary-adventure .bit-face { border-radius: .85em; }
.binary-adventure .bit-front { background: linear-gradient(145deg,#fffef0,#fff8cf); border: 2px solid #d4af39; box-shadow: 0 3px 0 #b7b076, 0 6px 12px #2455481c; }
.binary-adventure .bit-back { background: linear-gradient(135deg,#316b71,#1d4c56); box-shadow: inset 0 0 0 2px #ffffff40, 0 3px 0 #153e48; }
.binary-adventure .bit-back .bit-value { color: #d8ecef; font-size: 1.2em; }
.binary-adventure .bit-front .bit-value { font-size: 1em; }
.binary-adventure .no-dots .bit-front .bit-value { font-size: 1.8em; }
.binary-adventure .bit-digit { height: 1.8em; font-size: 1.55em; border-radius: .6em; background: #ffffffa6; }
.binary-adventure .bit-digit.on { background: #ffe579; }
.binary-adventure .bit-dots { fill: #23614f; }
.binary-adventure .bin-sum { margin: .4em 0 0; gap: .35em .6em; padding: .4em; background: #ffffff9e; border-radius: .9em; }
.binary-adventure .bin-sum-label { font-size: .75em; }
.binary-adventure .bin-sum-math, .binary-adventure .bin-sum-bits { font-size: 1.35em; }
.binary-adventure .bin-tools { gap: .5em; margin-top: .65em; font-size: .85em; }
.binary-adventure .bin-count { font-size: .9em; }
.binary-adventure .bin-say { margin-top: .5em; min-height: 0; font-size: .85em; }
.binary-adventure .bin-say:empty { display: none; }
.binary-adventure input.bin-input { font-size: 1.1em; min-height: 2.6em; width: 4em; color: var(--text); }
.bin-lab-bottom { display: flex; justify-content: space-between; align-items: center; gap: .6em; border-top: 1px solid #bcded3; margin-top: .8em; padding-top: .7em; }
.bin-lab-bottom p { font-size: .85em; margin: 0; }
.binary-adventure .bin-levels { padding: .75em 1em; margin-bottom: .65em; }
.bin-levels h2 { font-size: .85em; margin-bottom: .5em; }
.binary-adventure .bin-stages { gap: .45em; }
.binary-adventure .bin-stage { padding: .5em .7em; font-size: .9em; border-width: 1px; border-radius: .9em; grid-template-columns: 1fr auto; gap: 0 .3em; background: #ffffff91; }
.binary-adventure .bin-stage b { font-size: .95em; }
.binary-adventure .bin-stage small { grid-column: 1/-1; font-size: .73em; }
.binary-adventure .bin-stars { grid-column: 2; grid-row: 1; font-size: .85em; margin: 0; }
.binary-adventure .bin-stage.on { background: #cceee1; border-color: #07875c; box-shadow: inset 0 -2px 0 #00835d; }
.binary-adventure .bin-play { gap: .4em; }
.binary-adventure .bin-progress { font-size: .8em; }
.binary-adventure .bin-target { display: flex; align-items: center; justify-content: center; gap: 1em; }
.binary-adventure .bin-target-label { font-size: .95em; }
.binary-adventure .bin-target-number { padding: .04em .4em; border-radius: .3em; background: #ffe57f; font-size: 2.8em; }
.binary-adventure .bin-live { font-size: .85em; }
.binary-adventure .bin-live b { font-size: 1.1em; }
.binary-adventure .bin-actions { gap: .6em; margin: .5em 0 0; }
.binary-adventure .bin-feedback { padding: .6em .8em; font-size: .92em; border: 1px solid transparent; border-radius: 1em; }
.binary-adventure .bin-feedback.ok { border-color: #79cba3; }
.binary-adventure .bin-feedback.bad { border-color: #e1a18c; }
.binary-adventure .bin-explain { font-size: 1.1em; }
.binary-adventure .bin-foot { padding: .7em; text-align: right; font-size: .72em; }
.bin-foot summary { display: inline; cursor: pointer; }
.bin-help { width: min(90vw, 720px); max-height: 88dvh; border: 1px solid white; border-radius: 1.5em; padding: 1.5em; color: var(--text); background: #f0fffaed; box-shadow: 0 20px 80px #143e4860; backdrop-filter: blur(24px); font: inherit; }
.bin-help::backdrop { background: #173c5070; backdrop-filter: blur(8px); }
.bin-help-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1em; }
.bin-help-head h2 { margin: 0; }
.binary-adventure .bin-hints { padding: 0; background: transparent; }
.binary-adventure .bin-hint-head { font-size: 1.05em; margin-bottom: .6em; }
.binary-adventure .bin-hint-list { list-style: none; padding: 1em; margin-bottom: 1em; background: #ffffffc2; border-radius: 1em; }
.binary-adventure .bin-q-ask { font-size: 1.25em; }
.binary-adventure .pg-opt.right { background: #c1ecd6; border-color: #00845b; }
.binary-adventure .pg-opt.wrong { background: #ffe6de; border-color: #b75741; }
.bin-companion.compact { flex-direction: row; padding: 0; gap: .8em; }
.bin-companion.compact .bin-mascot { width: 4em; flex: none; }
.bin-companion.compact .bin-mascot img { height: 5em; }
.bin-companion.compact .bin-speech { padding: .65em; font-size: .83em; }
.bin-companion.compact .bin-speech::before { display: none; }
.binary-adventure .race-hostmain { max-width: 3400px; }
.binary-adventure .race-hostmain.is-setup { max-width: 2200px; display: grid; grid-template-columns: .28fr 1fr; gap: 1.5em; align-items: center; padding-top: 1.5em; }
.binary-adventure .race-hostmain.is-lobby { max-width: 3400px; display: grid; grid-template-columns: .7fr 1fr; gap: 1em; }
.race-lobby-settings { grid-column: 1/-1; }
.race-lobby-settings summary { cursor: pointer; font-weight: 750; }
.binary-adventure .race-setupbox { gap: 1em; margin: 1em 0; }
.binary-adventure .race-pick { gap: .6em; }
.binary-adventure .race-pick-name { width: 5em; }
.binary-adventure .race-chips { gap: .45em; }
.binary-adventure .chip[aria-pressed=true] { color: white; background: #00835d; border-color: #00835d; }
.binary-adventure .race-card h2 { margin-bottom: .5em; }
.binary-adventure .race-roomno b { font-size: 4em; color: #006e4d; }
.binary-adventure .race-door { color: var(--text); }
.binary-adventure .race-door :is(.race-kicker, .race-roomno span, .race-note) { color: var(--muted); }
.binary-adventure .race-joinsteps { text-align: left; font-size: .85em; }
.binary-adventure .race-note { font-size: .75em; }
.binary-adventure .race-seats { display: grid; grid-template-columns: repeat(auto-fill,minmax(6em,1fr)); gap: .5em; }
.binary-adventure .race-seats li { border: 1px solid #c5e4d9; border-radius: .8em; background: #fafffd; text-align: center; padding: .6em; }
.binary-adventure .race-seats li.mine { background: #00835d; color: white; }
.binary-adventure .race-seats.host li { padding: 0; }
.binary-adventure .race-seatbtn { border-radius: .8em; padding: .6em .3em; width: 100%; font-size: 1em; background: #e3f4eb; }
.binary-adventure .race-lane, .binary-adventure .race-row { font-size: .95em; border-radius: .7em; }
.binary-adventure .race-bit { font-size: .95em; }
.binary-adventure .race-lead-label { font-size: .8em; }
.binary-adventure .race-lead-name { font-size: 1.2em; }
.binary-adventure .race-lead-slot.first .race-lead-name { font-size: 1.65em; }
.binary-adventure .race-lead-slot.hot .race-lead-name { font-size: 1em; }
.binary-adventure .race-lead-score, .binary-adventure .race-lead-slot.first .race-lead-score { font-size: 1em; }
.binary-adventure .race-clock, .binary-adventure .race-trackhead .race-clock { font-size: 1.2em; }
.binary-adventure .race-lead-slot { border-radius: 1em; }
.binary-adventure .race-stage { gap: .6em; }
.binary-adventure .race-feedback { font-size: .9em; min-height: 2.6em; padding: .5em; }
.binary-adventure .race-key { font-size: 1.25em; }
.binary-adventure .race-typed { font-size: 2em; }
.binary-adventure .race-countdown { color: #00835d; }
.binary-adventure .race-door .race-kicker { margin-top: .7em; }
.binary-adventure .gate { background: #f3fffaed; border-radius: 1.5em; }
.data-badges { display: flex; flex-wrap: wrap; gap: .4em; margin: 0; font-size: .63em; }
.data-badges span { padding: .25em .6em; border-radius: 1em; background: #e5eeeb; color: #46646c; }
.data-badges .earned { background: #d3f5df; color: #006e47; }
.data-topics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6em; margin: .65em 0 .9em; }
.binary-adventure .data-topic { font-size: .85em; border-radius: .9em; }
.binary-adventure .data-topic[aria-pressed=true] { background: #143f4b; color: #fff; border-color: #143f4b; }
.data-topic-icon { font-size: 1.3em; color: #d69811; }
.data-topic[aria-pressed=true] .data-topic-icon { color: #ffe579; }
.data-room { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1em; }
.data-editor { min-width: 0; }
.data-task { font-weight: 800; margin: 0 0 .5em; font-size: .95em; }
.binary-adventure .data-editor .bit-board { gap: .3em; }
.binary-adventure .data-editor .bit-card { aspect-ratio: 1 / 1.3; }
.binary-adventure .data-editor .bit-front .bit-value { font-size: 1.05em; }
.binary-adventure .data-editor .bit-back .bit-value { font-size: .85em; }
.binary-adventure .data-editor .bit-digit { font-size: 1.1em; }
.data-pipe { display: flex; align-items: center; justify-content: center; gap: .7em; padding: .5em; font-size: .8em; background: #ffffffb8; border-radius: .8em; }
.data-pipe b, .data-pipe code { font-size: 1.15em; color: #006e4d; font-weight: 850; }
.data-small { font-size: .72em; color: var(--muted); margin: .65em 0 .35em; }
.data-codebook { display: grid; grid-template-columns: repeat(6,1fr); gap: .35em; }
.data-codebook > span { display: grid; text-align: center; border-radius: .65em; background: #e0f0e9; padding: .3em; }
.data-codebook b { font-size: 1.15em; }
.data-codebook span span { font-size: .75em; color: var(--muted); }
.data-result { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #b9dcd5; border-radius: 1.3em; padding: 1em; background: radial-gradient(ellipse at top,#fffced,#e1f4ed); }
.data-result[data-state=success] { border-color: #35ad77; box-shadow: inset 0 0 0 1px #35ad77; }
.data-output { width: 100%; min-height: 9em; display: grid; place-items: center; }
.data-glyph { font-size: 7em; line-height: 1.2; color: #13734f; text-shadow: 0 .04em 0 #98d9b4; }
.data-status { font-size: .85em; text-align: center; margin: .6em 0 0; word-break: keep-all; }
.data-result .bin-actions { font-size: .7em; }
.data-principle { font-size: .78em; margin: .85em 0 0; padding-top: .7em; border-top: 1px solid #c5dfd6; text-align: center; }
.data-note-book { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .3em; }
.data-note-book > span { display: grid; text-align: center; padding: .3em; background: #e0f0e9; border-radius: .7em; }
.data-note-book b { font-size: .8em; }
.data-note-book code { font-size: .65em; color: var(--muted); }
.data-staff { display: flex; justify-content: center; width: 100%; gap: .4em; padding: 1em 0; background: repeating-linear-gradient(0deg,transparent 0,transparent 19%,#93c8b570 19%,#93c8b570 20%); }
.data-note { display: grid; place-items: center; padding: .6em .5em; min-width: 2.6em; border-radius: .7em; background: #ffdf75; box-shadow: 0 4px 0 #d8b856; color: #274a40; }
.data-note span { font-size: 1.5em; font-weight: 850; }
.data-note code { font-size: .8em; }
.data-note.empty { background: #fafff7; box-shadow: 0 4px 0 #b9d2ca; color: #8ba99c; }
.data-pixels { display: grid; grid-template-columns: repeat(8,1fr); width: min(100%,13em); aspect-ratio: 1; gap: 2px; padding: .5em; background: #b1d9cc; border-radius: .8em; }
.data-pixels i { background: #f4fff9; border-radius: 2px; }
.data-pixels i.on { background: #009463; }
.data-pixels i.selected { outline: 1px solid #e6b732; outline-offset: -1px; }
.data-row-buttons { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: .25em; margin-bottom: .6em; }
.binary-adventure .data-row-buttons .btn { padding: .3em; min-height: 2.1em; font-size: .68em; border-radius: .55em; }
.data-row-buttons [aria-pressed=true] { background: #ffe579; border-color: #d3af3d; }
.data-blueprint { display: flex; justify-content: center; gap: .8em; padding: .45em; margin-top: .5em; border-radius: .7em; background: #fff2c6; font-size: .9em; }
.data-blueprint code { font-size: 1.1em; letter-spacing: .12em; font-weight: 800; }
@media (max-width: 1100px) { .data-room { grid-template-columns: 1fr; } .data-result { min-height: 12em; } .data-output { min-height: 6em; } .data-glyph { font-size: 5em; } .data-pixels { width: 11em; } }
@media (max-width: 600px) { .data-topics { gap: .3em; } .binary-adventure .data-topic { font-size: .74em; padding: .5em .3em; } .data-topic-icon { display: none; } .data-pipe { flex-wrap: wrap; } }
html:fullscreen .binary-adventure > :is(.tl-nav, .primary-header) { display: none; }
html:fullscreen .binary-adventure .bin-foot { display: none; }
@media (min-width: 1600px) { .binary-adventure .bin-play .bit-board { max-width: calc(var(--cards) * 7.5em); } .bin-help { width: min(80vw, 1050px); } }
@media (max-height: 850px) and (min-width: 901px) {
  .bin-world-head { padding-top: .5em; gap: .35em; }
  .binary-adventure .card { padding: .85em 1em; }
  .binary-adventure .bit-board { max-width: calc(var(--cards) * 82px); }
  .binary-adventure .bin-lab .bit-board { max-width: calc(var(--cards) * 96px); }
  .binary-adventure .bit-digit { height: 1.45em; font-size: 1.35em; }
  .binary-adventure .bin-stagebox { padding: .65em; }
  .binary-adventure .bin-tools { margin-top: .45em; }
  .binary-adventure .bin-lab-bottom { margin-top: .5em; padding-top: .5em; }
  .bin-world-title h1 { font-size: 1.25em; }
  .binary-adventure .bin-levels { padding: .5em .8em; margin-bottom: .45em; }
  .binary-adventure .bin-levels h2 { display: none; }
}
@media (max-width: 900px) {
  .binary-adventure .bin-world-head, .binary-adventure .green-main { width: calc(100% - 1.5em); }
  .bin-world-head { grid-template-columns: 1fr; }
  .bin-world-title { justify-content: center; }
  .bin-world-tools { justify-content: center; }
  .bin-world-goal { width: 100%; font-size: .85em; padding: .9em .6em .6em; }
  .bin-adventure-layout { grid-template-columns: 1fr; gap: .7em; }
  .bin-companion { flex-direction: row; padding: 0; gap: .7em; }
  .bin-mascot { width: 4.5em; flex: none; }
  .bin-mascot img { height: 5.3em; }
  .bin-speech { padding: .5em .8em; }
  .bin-speech::before { display: none; }
  .bin-speaker { justify-content: start; }
  .bin-dialogue { font-size: .9em; text-align: left; margin-top: .15em; }
  .binary-adventure .bin-stagebox { padding: .75em .4em; }
  .binary-adventure .race-hostmain.is-setup { grid-template-columns: 1fr; padding-top: .8em; }
  .binary-adventure .race-hostmain.is-lobby { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .binary-adventure .green-main > .bin-tabs { grid-auto-flow: row; grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 1.2em; }
  .binary-adventure .green-main > .bin-tabs .tab { font-size: .82em; padding: .6em .3em; }
  .binary-adventure .card { padding: .8em; border-radius: 1.2em; }
  .bin-panel-head { align-items: start; flex-direction: column; gap: .3em; }
  .binary-adventure .bin-panel-head h2 { font-size: 1.05em; margin: 0; }
  .bin-lab-bottom { flex-direction: column; }
  .binary-adventure .bit-face { border-radius: .45em; }
  .binary-adventure .bit-board { gap: 4px; }
  .binary-adventure .no-dots .bit-front .bit-value { font-size: 1em; }
  .binary-adventure .bit-back .bit-value { font-size: .85em; }
  .binary-adventure .bit-digit { font-size: 1.15em; }
  .binary-adventure .bin-sum-math, .binary-adventure .bin-sum-bits { font-size: 1.2em; }
  .binary-adventure .bin-typed { gap: .4em; }
  .binary-adventure .bin-typed .btn { font-size: .85em; }
  .bin-help { padding: 1em; }
}
@media (prefers-reduced-motion: reduce) { .binary-adventure *, .binary-adventure *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Mission map, decoding arena and the same classroom companion. */
.bin-mascot { position:relative; }
.bin-mascot-3d { position:absolute; inset:-.6em -.8em; pointer-events:none; }
.bin-mascot-3d canvas { display:block; width:100%; height:100%; }
.bin-mascot:has(img[hidden]) { min-height:17em; }
.bin-reaction-mark { position:absolute; z-index:2; top:0; right:4%; display:grid; place-items:center; background:#ffdf66; color:#134d43; width:1.35em; height:1.35em; border:3px solid #fff; border-radius:50% 50% 50% 15%; font-size:clamp(28px,3vw,64px); box-shadow:0 8px 20px #15584525; }
.bin-reaction-mark[data-kind=retry] { background:#e0e5ff; color:#51418b; }
.bin-reaction-mark[hidden] { display:none; }
.data-map-head { display:flex; justify-content:space-between; gap:.5em; margin:.6em 0; font-weight:700; font-size:.85em; }
.data-collection { color:#9a6900; }
.data-mission-list { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.45em; margin-bottom:.9em; }
.binary-adventure .data-mission { display:flex; flex-direction:column; gap:.15em; padding:.6em .2em; font-size:.72em; border-radius:.9em; background:#ffffffb5; }
.data-mission-icon { display:grid; place-items:center; width:1.7em; height:1.7em; background:#e2f5e9; border-radius:.5em; font-size:1.3em; font-weight:900; }
.binary-adventure .data-mission[aria-pressed=true] { border-color:#00875e; background:linear-gradient(140deg,#e4ffef,#fff8d8); box-shadow:0 3px 0 #60a38d55,inset 0 1px 0 white; transform:translateY(-2px); }
.data-mission small { color:#9b7000; letter-spacing:.1em; }
.data-game-hud { margin-bottom:.6em; font-size:.8em; }
.data-game-hud>div { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.4em; }
.data-combo { color:#007d5b; }
.data-game-hud progress { width:100%; height:.5em; accent-color:#009c69; }
.data-message { display:flex; gap:.25em; justify-content:center; flex-wrap:wrap; }
.data-message span { border-radius:.4em; padding:.15em .4em; background:#d4e8df; font-weight:900; color:#4a695f; }
.data-message .sent { background:#ffdf74; color:#183f37; }
.data-reward { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:.4em; padding:.65em; border-radius:1em; background:#fff4c8; }
.data-reward[hidden] { display:none; }.data-reward-stars { color:#9b6a00; font-size:1.4em; letter-spacing:.15em; }
.data-race-question { width:100%; max-width:45em; margin:auto; text-align:center; }
.data-race-question h3 { margin:.1em 0 .6em; font-size:1.35em; }
.data-race-signal { display:flex; justify-content:center; flex-wrap:wrap; gap:.5em; background:linear-gradient(125deg,#153c46,#1d6963); border:2px solid #fff; border-radius:1em; padding:.7em; color:#fff5bd; box-shadow:0 8px 20px #134b4320; }
.data-race-signal code { letter-spacing:.16em; font-size:1.6em; font-weight:800; }
.data-race-signal.pixels { display:grid; gap:.05em; width:fit-content; margin:auto; padding:.35em 1.3em; }
.data-race-signal.pixels code { font-size:1.1em; letter-spacing:.45em; }
.data-race-book { display:flex; gap:.5em; justify-content:center; flex-wrap:wrap; padding:.65em 0; font-size:.8em; }
.data-race-book span { background:#ffffffa8; border:1px solid #c0ddd3; border-radius:.4em; padding:.2em .5em; }
.data-answers { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65em; margin-top:.7em; }
.data-option { display:flex; flex-direction:column; gap:.3em; min-width:0; }
.binary-adventure .data-answer { min-height:4.2em; position:relative; padding:.7em .3em; background:linear-gradient(150deg,#fff,#e4fff1); border:2px solid #acd3c5; box-shadow:0 5px 0 #b8d7cb; border-radius:1em; }
.data-answer>small { position:absolute; top:.3em; left:.5em; color:#6d8b80; font-size:.65em; }
.data-answer>b { font-size:1.45em; }.data-answer:has(+.data-listen)>b { font-size:.85em; }
.data-answer-pixels { display:grid; grid-template-columns:repeat(4,1fr); gap:2px; width:4em; aspect-ratio:1; margin:auto; background:#b4cebf; padding:3px; border-radius:.3em; }
.data-answer-pixels i { background:#f5fff8; }.data-answer-pixels .on { background:#008965; }
.binary-adventure .data-listen { font-size:.7em; padding:.35em; }
.data-audio-status { min-height:1.2em; font-size:.75em; margin:.4em; }
.binary-class-tools { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:.4em; margin:.4em 0; }
.binary-class-tools[hidden] { display:none; }
.binary-room-clock.tl-time-buddy { position:relative; inset:auto; z-index:6; width:auto; }
.binary-room-clock .tl-time-control { min-width:0; }
.binary-room-clock .tl-time-face { width:2.2em; height:2.6em; }
.binary-room-clock .tl-time-words strong { font-size:1.1em; }
.binary-pause { position:fixed; inset:0; z-index:10000; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1em; padding:2em; text-align:center; background:#e6fff3d9; backdrop-filter:blur(18px); color:#12493d; }
.binary-pause[hidden] { display:none; }.binary-pause b { font-size:clamp(36px,6vw,100px); }.binary-pause p { font-size:clamp(18px,2vw,34px); }
.binary-time-editor { display:grid; gap:1em; }.binary-time-editor input { width:5em; padding:.5em; border:1px solid #91b9ab; border-radius:.5em; font:inherit; }
.binary-timer-value { font-size:3em; text-align:center; font-variant-numeric:tabular-nums; }
.binary-tools-grid { display:grid; grid-template-columns:1fr 1fr; gap:.8em; }.binary-tools-grid p { grid-column:1/-1; }
#app[data-role=teacher][data-activity=race] .bin-adventure-layout { grid-template-columns:1fr; }
#app[data-role=teacher][data-activity=race] .bin-adventure-layout>.bin-companion { display:none; }
#panel-race .race-hostmain { width:100%; margin:0; }
.binary-adventure .race-pick [hidden] { display:none; }
@media(min-width:1101px){.data-room .data-output { min-height:7em; }.data-room .data-result { min-height:15em; }.data-room .data-glyph { font-size:5em; }}
@media(max-width:900px){.bin-mascot:has(img[hidden]) { min-height:5.3em; }.bin-reaction-mark { font-size:1.5em; }.data-mission-list { grid-template-columns:repeat(3,minmax(0,1fr)); }}
@media(max-width:600px){.data-answers { grid-template-columns:repeat(2,minmax(0,1fr)); }.data-race-signal code { font-size:1.15em; }.binary-class-tools { justify-content:center; }.binary-tools-grid { grid-template-columns:1fr; }}
.bin-coach-button { font-size:.8em; width:100%; background:#fff9df; white-space:normal; }
.bin-coach-button.needs-help { outline:3px solid #eac856; box-shadow:0 0 0 6px #fff5c7; }
.binary-adventure .onba-tour-shade { position:fixed; inset:0; z-index:12000; pointer-events:none; }
.binary-adventure .onba-tour-shade>i { position:absolute; background:#16453a77; pointer-events:auto; }
.binary-adventure .onba-tour-shade>b { position:absolute; border:3px solid #ffe06d; border-radius:16px; box-shadow:0 0 0 3px #ffffffab,0 0 30px #fff1ae; }
.binary-adventure .onba-tour { position:fixed; z-index:12001; box-sizing:border-box; background:linear-gradient(135deg,#fffffff5,#e9fff6f5); backdrop-filter:blur(18px); color:#173e35; border:2px solid white; box-shadow:0 16px 60px #153c4155; border-radius:22px; padding:18px; font-size:17px; max-height:calc(100vh - 24px); overflow:auto; }
.binary-adventure .onba-tour-top { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; color:#48796a; font-weight:800; }
.binary-adventure .onba-tour button { border:1px solid #bfded2; background:#fffdf2; border-radius:12px; padding:9px 12px; color:#174f3c; cursor:pointer; font:inherit; }
.binary-adventure .onba-tour button:focus-visible { outline:3px solid #167957; outline-offset:2px; }
.binary-adventure .onba-tour button.primary { background:#00865c; color:white; }
.binary-adventure .onba-tour button:disabled { opacity:.4; }
.binary-adventure .onba-tour-msg { display:flex; gap:12px; padding:16px 0; }
.binary-adventure .onba-tour-msg img { object-fit:contain; width:44px; height:72px; flex:none; }
.binary-adventure .onba-tour-msg h3 { margin:0 0 10px; font-size:21px; }
.binary-adventure .onba-tour-msg p { margin:0; line-height:1.65; }
.binary-adventure .onba-tour-steps { display:flex; gap:5px; margin:0 0 14px; }
.binary-adventure .onba-tour-steps i { height:5px; flex:1; background:#c9e3d7; border-radius:10px; }
.binary-adventure .onba-tour-steps .now { background:#e7bd34; }.binary-adventure .onba-tour-steps .done { background:#009768; }
.binary-adventure .onba-tour-nav { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }.binary-adventure .onba-tour-nav small { width:100%; color:#426f60; font-size:12px; }
.binary-adventure .onba-tour-play[hidden] { display:none; }
@media(max-width:900px){.bin-companion { flex-wrap:wrap; }.bin-coach-button { width:auto; margin-left:auto; }}
