/* Hub screens (name, lobby, waiting room, chat). Colours come from the tokens in style.css, so dark mode follows. */
/* Korean lines break between words, not inside them */
body { word-break: keep-all; overflow-wrap: break-word; }
a { color: var(--lapis); }
textarea { font: inherit; color: inherit; resize: vertical; }
.input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ground); }
.input:focus-visible { outline: 3px solid var(--glow); outline-offset: 1px; }
.field-row { display: flex; gap: 8px; align-items: stretch; }
.field-row .btn { flex: none; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.stack { display: grid; gap: 14px; }
.divider { height: 1px; background: var(--line); margin: 22px 0 18px; }
.empty { color: var(--muted); padding: 18px 0; }

/* name */
.name-panel { max-width: 520px; }
.name-panel .small { margin-top: 10px; }

/* lobby */
.me-box { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-box .btn { padding: 6px 12px; font-size: 14px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
/* who is here (lobby), and people to invite (waiting room): a green dot is someone free in the lobby */
.ppl-panel { margin-bottom: 20px; padding: 14px 18px; }
.ppl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel .ppl-head h2 { font-size: 18px; margin: 0; }
.ppl-head h2 b { color: var(--lapis); }
.ppl-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ppl-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ppl-chip::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ppl-chip.at-lobby::before { background: var(--olive); }
.ppl-chip.me { border-color: var(--lapis); }
.ppl-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl-where { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ppl-more { align-self: center; font-size: 13px; color: var(--muted); }
.ppl-note { margin: 8px 0 0; }
.ppl-invite { margin-top: 16px; }
.ppl-invite .ppl-list { margin: 0 0 6px; }
.ppl-ask { padding: 2px 12px; font-size: 13px; }
/* someone else's name opens what can be done about them: report, hide, send out of my room */
.ppl-who { min-width: 0; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; text-decoration: underline dotted var(--line-strong); text-underline-offset: 3px; }
.ppl-who:hover { text-decoration-color: currentColor; }
.seat-name .ppl-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl-menu { display: grid; gap: 8px; margin: 4px 0 10px; }
.ppl-danger { color: var(--pome); border-color: currentColor; }
.ppl-reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; margin: 4px 0 12px; }
.ppl-reasons label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.ppl-reasons label:has(input:checked) { border-color: var(--lapis); background: var(--surface-2); }
.game-pick { display: grid; gap: 8px; }
.game-card { text-align: left; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; }
.game-card b { font-family: var(--font-display); font-size: 19px; }
.game-card[aria-pressed="true"] { border-color: var(--lapis); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--lapis); }
.game-blurb { font-size: 14px; color: var(--muted); }
/* a game's marks on its tile and in its details: 추천, 어린이 추천, 성경 공부 */
.gm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.gm-tag { padding: 0 7px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1.6; }
.gm-tag.pick { color: var(--saffron); }
.gm-tag.kids { color: var(--olive); }
.gm-tag.study { color: var(--lapis); }
.gm-tag.bots { color: var(--muted); }
/* a game's hall of fame (in its details and from the waiting room), and the waiting room's word about the settings */
.fm-box { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.fm-box .h-sub { margin-bottom: 4px; }
.fm-about { margin: 0 0 8px; }
.fm-list li > span small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.fm-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fm-teams li { display: grid; gap: 1px; padding: 6px 10px; border-radius: 10px; background: var(--surface); }
.fm-teams li.you { box-shadow: inset 0 0 0 1.5px var(--lapis); }
.fm-teams small { font-size: 12px; color: var(--muted); }
.fm-empty { margin: 4px 0; }
.fm-mine { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 8px 0 0; }
.fm-rule { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.fm-rule.ok { background: color-mix(in srgb, var(--glow) 28%, var(--surface)); }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; max-width: 180px; }
.session-list { display: grid; gap: 10px; }
.session-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.si-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.si-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.status, .opt-tag, .who-tag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.status.wait { color: var(--olive); border-color: currentColor; }
.status.play { color: var(--saffron); border-color: currentColor; }

/* waiting room */
.code-box { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.code-box b { font-size: 20px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.code-box .btn { padding: 6px 12px; font-size: 14px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.seat-list { display: grid; gap: 8px; margin-bottom: 16px; }
.seat-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.seat-row.is-me { background: var(--surface-2); }
.seat-name { display: grid; min-width: 0; }
.seat-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.who-tag.me { color: var(--lapis); border-color: currentColor; }
.who-tag.off { color: var(--pome); border-color: currentColor; }
.seat-row select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--ground); }
.seat-row select:disabled { opacity: .7; }
.icon-btn { padding: 6px 0; width: 36px; }
.room-actions { justify-content: flex-start; }
.watchers { width: 100%; }
.my-char { margin-top: 16px; }
.my-char .char-card { background: var(--surface-2); }
.option + .option { margin-top: 16px; }
.option-label { font-weight: 600; margin-bottom: 6px; }
.choice-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; margin-bottom: 6px; max-width: 100%; }
.choice-seg button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.choice-seg button + button { border-left: 1px solid var(--line-strong); }
.choice-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.choice-seg button:disabled { cursor: default; }
.choice-seg button:disabled:not([aria-pressed="true"]) { color: var(--muted); }
.chars-more { margin-top: 16px; }
.chars-more summary { cursor: pointer; font-weight: 600; }
.chars-more .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.invite-url { font-weight: 600; word-break: break-all; user-select: all; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }

/* game additions */
.watch-note { font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: -6px 0 16px; }
.turn-panel.mine { border-color: var(--lapis); box-shadow: 0 0 0 2px var(--lapis), 0 6px 20px var(--shade); }
.pcard.is-me { background: var(--surface-2); }
.give-box { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.give-box .ch-title { font-size: 22px; }
.given-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.give-btn.chosen { border-color: var(--olive); background: var(--surface-2); opacity: 1; }
.actions .small { align-self: center; margin-right: auto; }

/* sound button and dice effect */
.sound-btn { gap: 6px; }
.sound-btn span { font-size: 13.5px; }
/* above card sheets (50), so a faith check can roll over its card; below connection notices (60) */
.dice-fx { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 55; }
.dice-fx-box { display: grid; justify-items: center; gap: 14px; padding: 26px 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 70px var(--shade); }
.dice-fx.landed .dice-fx-box { animation: fx-fade 1.3s ease forwards; }
.die.xl { width: 108px; height: 108px; padding: 15px; gap: 6px; border-radius: 22px; border-width: 3px; background: var(--surface-2); }
.dice-fx.spinning .die { animation: tumble .38s linear infinite; }
.dice-fx.landed .die { animation: land .55s cubic-bezier(.2, 1.5, .4, 1); border-color: var(--glow); box-shadow: 0 0 0 6px rgba(233, 178, 58, .35), 0 0 36px rgba(233, 178, 58, .55); }
.dice-fx-label { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
@keyframes tumble { 0% { transform: rotate(0) translateY(0); } 25% { transform: rotate(90deg) translateY(-16px) scale(.95); } 50% { transform: rotate(180deg) translateY(0); } 75% { transform: rotate(270deg) translateY(-9px) scale(.97); } 100% { transform: rotate(360deg); } }
@keyframes land { 0% { transform: scale(1.45) rotate(-28deg); } 60% { transform: scale(.94) rotate(5deg); } 100% { transform: none; } }
@keyframes fx-fade { 0%, 72% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.dice-fx.landed.pass .die { border-color: var(--olive); box-shadow: 0 0 0 6px rgba(85, 114, 50, .35), 0 0 36px rgba(120, 170, 70, .6); }
.dice-fx.landed.fail .die { border-color: var(--pome); box-shadow: 0 0 0 6px rgba(168, 52, 58, .3), 0 0 30px rgba(168, 52, 58, .45); animation: land .55s cubic-bezier(.2, 1.5, .4, 1), fx-shake .45s .5s ease; }

/* 믿음의 갈림길 card effects: each stage animates once (.fx); --d delays a reveal until a faith-check die has landed */
.fx .ch { animation: fx-drop .45s ease both; }
.fx .opts .opt, .fx .qopts .qopt, .fx .pray-grid .pray-btn, .fx .give-row .give-btn { animation: fx-up .4s ease both; }
.fx .opts .opt:nth-child(2), .fx .qopts .qopt:nth-child(2), .fx .pray-grid .pray-btn:nth-child(2), .fx .give-row .give-btn:nth-child(2) { animation-delay: .08s; }
.fx .opts .opt:nth-child(3), .fx .qopts .qopt:nth-child(3), .fx .pray-grid .pray-btn:nth-child(3), .fx .give-row .give-btn:nth-child(3) { animation-delay: .16s; }
.fx .pray-grid .pray-btn:nth-child(4), .fx .give-row .give-btn:nth-child(4) { animation-delay: .24s; }
.fx .reveal .your, .fx-trial.fx .your, .fx-comm.fx .your, .fx-quiz.fx .your { animation: fx-flip .6s cubic-bezier(.2, .8, .3, 1) both; animation-delay: var(--d, 0s); transform-origin: top center; }
.fx .your .chips .chip { animation: fx-chip .35s ease both; animation-delay: calc(var(--d, 0s) + .45s); }
.fx .your .chips .chip:nth-child(2) { animation-delay: calc(var(--d, 0s) + .55s); }
.fx .your .chips .chip:nth-child(3) { animation-delay: calc(var(--d, 0s) + .65s); }
.fx .your .chips .chip:nth-child(4) { animation-delay: calc(var(--d, 0s) + .75s); }
.fx .your .chips .chip:nth-child(n+5) { animation-delay: calc(var(--d, 0s) + .85s); }
.fx .badge { position: relative; animation: fx-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--d, 0s) + .3s); }
.fx .badge.ok::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid var(--glow); animation: fx-ring .9s ease-out both; animation-delay: calc(var(--d, 0s) + .6s); }
.fx .hidden-res .chips .chip { animation: fx-unveil .7s ease both; animation-delay: calc(var(--d, 0s) + 1.1s); }
.fx .hidden-res .lbl { animation: fx-glow-text 1.2s ease both; animation-delay: calc(var(--d, 0s) + .9s); }
.fx .story { animation: fx-up .5s ease both; animation-delay: calc(var(--d, 0s) + .9s); }
.fx .result-word { display: inline-block; }
.fx .result-word.pass { animation: fx-pass .9s ease both; animation-delay: calc(var(--d, 0s) + .2s); }
.fx .result-word.fail { animation: fx-shake .5s ease both; animation-delay: calc(var(--d, 0s) + .2s); }
.fx .check-line { animation: fx-up .4s ease both; animation-delay: var(--d, 0s); }
.fx .qopt.right { animation: fx-pulse 1s ease 2; }
.fx .qopt.wrong { animation: fx-shake .45s ease; }
.fx .pray-btn.chosen { animation: fx-glow 1.1s ease both; }
.fx .ch-end { animation: fx-pop .7s ease both; }
@keyframes fx-drop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fx-up { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fx-flip { from { transform: perspective(900px) rotateX(-75deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fx-chip { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes fx-pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes fx-ring { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@keyframes fx-unveil { from { filter: blur(8px); opacity: .15; transform: scale(.9); } to { filter: none; opacity: 1; transform: none; } }
@keyframes fx-glow-text { 0% { color: var(--muted); } 50% { color: var(--saffron); text-shadow: 0 0 12px rgba(233, 178, 58, .7); } 100% { color: var(--muted); } }
@keyframes fx-pass { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 18px rgba(233, 178, 58, .8); } 100% { transform: none; opacity: 1; } }
@keyframes fx-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes fx-pulse { 50% { box-shadow: 0 0 0 6px rgba(85, 114, 50, .35); } }
@keyframes fx-glow { 0% { box-shadow: 0 0 0 0 rgba(233, 178, 58, 0); } 50% { box-shadow: 0 0 0 7px rgba(233, 178, 58, .45); } 100% { box-shadow: 0 0 0 0 rgba(233, 178, 58, 0); } }

/* faith-check game (믿음의 갈림길) */
.mg-bar { position: relative; height: 34px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line-strong); overflow: hidden; }
.mg-zone { position: absolute; top: 0; bottom: 0; background: linear-gradient(180deg, rgba(233, 178, 58, .85), rgba(233, 178, 58, .55)); box-shadow: 0 0 18px rgba(233, 178, 58, .7); }
.mg-mark { position: absolute; top: -2px; bottom: -2px; width: 8px; margin-left: -4px; border-radius: 4px; background: var(--ink); box-shadow: 0 0 10px rgba(255, 255, 255, .8); }
.mg-mark.stopped.in { background: var(--olive); }
.mg-mark.stopped.out { background: var(--pome); }
.mg-stop { min-width: 180px; font-size: 20px; }
.mg-bar.mini { height: 14px; flex: 1; min-width: 120px; }
.mg-bar.mini .mg-mark { width: 6px; margin-left: -3px; }
.mg-results { display: grid; gap: 6px; }
.mg-try { display: flex; align-items: center; gap: 10px; }
.mg-try > .small { min-width: 72px; }

/* shared minigames (public/js/minigames.js) */
.mg { position: relative; display: grid; gap: 12px; }
.mg-how { font-size: 15px; }
.mg-body { display: grid; gap: 12px; }
.mg .actions { justify-content: center; }
.mg-go { min-width: 180px; font-size: 20px; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mg-go.bump { animation: mg-bump .15s ease; }
.mg-holdbtn.holding { filter: brightness(1.15); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lapis) 35%, transparent); }
.mg-ringart { width: min(220px, 70vw); height: auto; justify-self: center; }
.mg-band { fill: none; stroke: var(--glow); opacity: .45; transition: opacity .08s; }
.mg-band.in { opacity: .95; }
.mg-target { fill: none; stroke: var(--saffron); stroke-width: 1.5; stroke-dasharray: 4 4; }
.mg-ring { fill: none; stroke: var(--lapis); stroke-width: 5; }
.mg-gauge .mg-fill, .mg-timer .mg-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--lapis); opacity: .8; }
.mg-gauge .mg-zone { z-index: 1; opacity: .8; }
.mg-timer { height: 14px; }
.mg-timer .mg-fill { width: 100%; background: var(--olive); }
.mg-count { text-align: center; font-size: 16px; }
.mg-count b { font-size: 26px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.mg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(300px, 100%); justify-self: center; }
.mg-cell { aspect-ratio: 1; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface-2); font-size: 34px; cursor: pointer; touch-action: manipulation; padding: 0; }
.mg-cell .fruit { display: inline-block; animation: fx-pop .25s ease both; }
.mg-cell .fruit.got { color: var(--olive); font-weight: 700; }
.mg-cell .fruit.miss { color: #D23F4A; font-weight: 700; animation: fx-shake .3s ease; }
.mg-grid.pairs { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); width: min(calc(var(--cols, 3) * 96px), 100%); }
.mg-card { aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--lapis); color: var(--on-accent); font-size: 32px; font-weight: 700; cursor: pointer; touch-action: manipulation; padding: 0; }
.mg-card.up { background: var(--surface); color: var(--ink); animation: card-flip .25s ease; }
.mg-card.done { background: var(--surface-2); border-color: var(--olive); box-shadow: inset 0 0 0 2px var(--olive); }
.mg-lamps { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.mg-lamp { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--lc); background: var(--surface-2); color: var(--lc); display: grid; place-items: center; cursor: pointer; touch-action: manipulation; padding: 0; transition: transform .12s, box-shadow .12s; }
.mg-lamp .ic { width: 30px; height: 30px; }
.mg-lamp.lit { background: var(--lc); color: var(--surface); box-shadow: 0 0 24px var(--lc); transform: scale(1.12); }
.mg-lamp:disabled { cursor: default; opacity: 1; }
/* the success or failure moment that covers a finished game */
.mg-outcome { position: absolute; inset: -6px; display: grid; place-items: center; border-radius: 16px; background: var(--surface); z-index: 3; overflow: hidden; animation: fx-up .25s ease both; }
.mg-outcome b { font-family: var(--font-display); font-size: 46px; line-height: 1; }
.mg-outcome.win b { color: var(--saffron); animation: fx-pass .8s ease both; text-shadow: 0 0 18px rgba(233, 178, 58, .6); }
.mg-outcome.lose { background: var(--surface-2); }
.mg-outcome.lose b { color: var(--pome); animation: fx-shake .6s .1s ease both, mg-sink 1.2s .5s ease forwards; }
.mg-outcome .burst { position: absolute; left: 50%; top: 50%; }
.mg-outcome .burst i { position: absolute; width: 9px; height: 9px; border-radius: 2px; background: var(--c); transform: rotate(var(--a)); animation: confetti 1s ease-out forwards; }
@keyframes confetti { from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateY(calc(-1 * var(--d) - 30px)) scale(.6); opacity: 0; } }
@keyframes mg-sink { to { transform: translateY(8px); opacity: .75; } }
@keyframes mg-bump { 50% { transform: scale(.94); } }
@keyframes card-flip { from { transform: scaleX(.1); } to { transform: none; } }
.a-jobslot:empty { display: none; }

/* admin page */
.admin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.admin-link { margin-left: 8px; font-size: 12px; color: var(--muted); }
.admin .panel h2 { margin-bottom: 12px; }
.ad-sessions, .ad-feedback { display: grid; gap: 10px; }
.ad-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ad-people { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ad-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ad-filters .choice-seg { margin-bottom: 0; grid-auto-columns: max-content; max-width: 100%; overflow-x: auto; }
.ad-filters .choice-seg button { padding: 8px 11px; }
.ad-game { width: auto; }
.ad-item { border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.ad-item.seen { border-left-color: var(--lapis); }
.ad-item.done { border-left-color: var(--olive); opacity: .75; }
.ad-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ad-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }

/* rules, sound and leave stay reachable while a game card covers the top bar */
.sheet-tools { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 14px 0; }
.sheet-tools .btn { padding: 5px 11px; font-size: 13px; }
.sheet-tools .sound-btn span { display: none; }

/* quiz */
.quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.quiz-main { display: grid; gap: 16px; min-height: 420px; align-content: start; }
.q-ready { display: grid; justify-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.q-count { font-family: var(--font-display); font-size: 96px; font-weight: 700; line-height: 1; color: var(--saffron); animation: pop .35s ease; }
.q-head { display: flex; align-items: center; gap: 10px; }
.q-no { font-weight: 700; color: var(--muted); }
.q-sec { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; }
.q-question { font-size: clamp(22px, 3.6vw, 30px); line-height: 1.4; }
.q-timer { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.q-timer i { display: block; height: 100%; width: 100%; background: var(--olive); border-radius: inherit; }
.q-timer i.low { background: var(--pome); }
.q-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.q-ans { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; text-align: left; border: 0; border-radius: 16px; padding: 18px 16px; min-height: 76px; cursor: pointer; font-weight: 600; font-size: 17px; color: var(--on-accent); transition: transform .12s ease, opacity .2s; }
.q-ans:hover:not(:disabled) { transform: translateY(-2px); }
.q-ans:disabled { cursor: default; }
.q-c0 { background: var(--lapis); } .q-c1 { background: var(--pome); } .q-c2 { background: var(--olive); } .q-c3 { background: var(--saffron); }
.q-mark { font-size: 22px; line-height: 1; }
.q-text { overflow-wrap: anywhere; }
.q-ans.chosen { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--ink); }
.q-ans.dim { opacity: .35; }
.q-ans.right { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--glow); }
.q-who { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.q-who .pdot { width: 24px; height: 24px; font-size: 11.5px; box-shadow: 0 0 0 2px var(--surface); }
.q-status { color: var(--muted); }
.q-status b { color: var(--ink); }
.q-reveal { display: grid; gap: 12px; }
.q-reveal .result-word { font-size: 20px; font-family: var(--font-display); }
.q-board h2 { font-size: 20px; margin-bottom: 10px; }
.q-scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.q-scores li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.q-scores li.is-me { background: var(--surface-2); }
.q-scores strong { text-align: right; font-size: 18px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.q-name { display: grid; min-width: 0; }
.q-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-name small { font-size: 12px; color: var(--muted); }
.q-done { font-size: 12.5px; font-weight: 700; color: var(--olive); }
.q-wait { font-size: 12.5px; color: var(--muted); }
.q-gain { font-weight: 700; color: var(--olive); }
.q-miss { color: var(--muted); }

/* 하만의 음모 */
.haman-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.h-main { display: grid; gap: 14px; min-height: 360px; align-content: start; }
.h-kind { color: var(--pome); }
.h-sub { font-size: 16px; margin-bottom: 10px; }
.h-sub small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.h-story { font-size: 15px; line-height: 1.75; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.h-stage-list li { font-size: 14px; }
.h-rolecard { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; margin-bottom: 10px; border: 2px solid var(--line-strong); }
.h-rolecard b { font-family: var(--font-display); font-size: 24px; }
.h-rolecard.loyal { border-color: var(--lapis); }
.h-rolecard.loyal b { color: var(--lapis); }
.h-rolecard.haman { border-color: var(--pome); }
.h-rolecard.haman b { color: var(--pome); }
.h-rolebig { max-width: 460px; }
.h-known { font-size: 14px; margin-bottom: 6px; }
.h-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.h-cell { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border-radius: 12px; border: 1.5px solid var(--line-strong); text-align: center; }
.h-cell b { font-size: 16px; font-family: var(--font-display); }
.h-cell span { font-size: 11px; color: var(--muted); }
.h-cell.now { border-color: var(--ink); box-shadow: 0 0 0 2px var(--glow); }
.h-cell.win { background: var(--lapis); border-color: var(--lapis); }
.h-cell.lose { background: var(--pome); border-color: var(--pome); }
.h-cell.win b, .h-cell.win span, .h-cell.lose b, .h-cell.lose span { color: var(--on-accent); }
.h-rej { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.h-rej-dots { display: inline-flex; gap: 4px; }
.h-rej-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.h-rej-dots i.on { background: var(--pome); border-color: var(--pome); }
.h-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.h-players li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 10px; }
.h-players li.is-me { background: var(--surface-2); }
.h-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.h-tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.h-tag.lead { color: var(--saffron); border-color: currentColor; }
.h-tag.team { color: var(--ink); border-color: var(--ink); }
.h-tag.yes, .h-tag.loyal { color: var(--lapis); border-color: currentColor; }
.h-tag.no, .h-tag.haman { color: var(--pome); border-color: currentColor; }
.h-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.h-chip .pdot { width: 26px; height: 26px; }
.h-team, .h-pick, .h-votes, .h-reveal { display: flex; flex-wrap: wrap; gap: 8px; }
.h-pickbtn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer; font-weight: 600; }
.h-pickbtn.on { border-color: var(--lapis); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--lapis); }
.h-vote-row { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); }
.h-vote-row .pdot { width: 24px; height: 24px; font-size: 11.5px; }
.h-vote .btn { min-width: 120px; }
.h-no { border-color: var(--pome); color: var(--pome); }
.h-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.h-cards.small-cards { display: flex; flex-wrap: wrap; }
.h-card { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 12px; border-radius: 16px; border: 2px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.h-card b { font-family: var(--font-display); font-size: 24px; }
.h-card span { font-size: 13px; color: var(--muted); }
.h-card.ok b { color: var(--lapis); }
.h-card.fail b { color: var(--pome); }
.h-card.ok:hover:not(:disabled) { border-color: var(--lapis); }
.h-card.fail:hover:not(:disabled) { border-color: var(--pome); }
.h-card:disabled { opacity: .45; cursor: not-allowed; }
.h-card.shown { cursor: default; padding: 16px 18px; animation: pop .35s ease both; }
.h-card.shown.ok { border-color: var(--lapis); }
.h-card.shown.fail { border-color: var(--pome); background: var(--surface-2); }
.h-card.shown:nth-child(2) { animation-delay: .25s; } .h-card.shown:nth-child(3) { animation-delay: .5s; } .h-card.shown:nth-child(4) { animation-delay: .75s; } .h-card.shown:nth-child(5) { animation-delay: 1s; }

/* 방주를 완성하라 */
.ark-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ark-main { display: grid; gap: 16px; }
.ark-svg { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.ark-svg .hull { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.ark-svg .planks rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; transition: fill .4s; }
.ark-svg .planks rect.on { fill: var(--saffron); stroke: rgba(0, 0, 0, .15); }
.ark-svg .cabin rect, .ark-svg .cabin path { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 5; }
.ark-svg .cabin.on rect, .ark-svg .cabin.on path { fill: var(--saffron); stroke: var(--ink); stroke-dasharray: none; }
.ark-svg .cabin.on .door { fill: var(--ink); }
.ark-svg .water { fill: var(--lapis); opacity: .35; transition: transform 1.2s ease; }
.ark-svg .water.high { transform: translateY(-30px); opacity: .5; }
.ark-svg .rain line { stroke: var(--lapis); stroke-width: 2; opacity: .5; stroke-linecap: round; }
.ark-goals { display: grid; gap: 8px; }
.a-goal { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
.a-goal small { grid-column: 2 / 4; font-size: 12px; color: var(--muted); margin-top: -4px; }
.a-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.a-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.a-bar i { display: block; height: 100%; background: var(--saffron); border-radius: inherit; transition: width .5s ease; }
.a-goal.met .a-bar i { background: var(--olive); }
.a-goal.locked { opacity: .6; }
.a-goal b { text-align: right; font-variant-numeric: tabular-nums; }
.a-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding-top: 4px; }
.a-courage .lamp-bar { margin-left: 4px; }
.a-courage.low b { color: var(--pome); }
.a-courage.low .lamp-bar i.on { background: var(--pome); }
.a-event { border: 1px solid var(--line); border-left: 4px solid var(--pome); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; background: var(--surface-2); }
.a-event .ch-kind { color: var(--pome); }
.a-event h3 { font-size: 19px; }
.a-effect { font-weight: 700; }
.a-choose { display: grid; gap: 10px; }
.a-choose h3 { font-size: 18px; }
.a-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.a-act { display: grid; justify-items: start; gap: 2px; text-align: left; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px; cursor: pointer; }
.a-act .ic { width: 22px; height: 22px; color: var(--saffron); }
.a-act b { font-size: 15px; }
.a-act span { font-size: 12.5px; color: var(--muted); }
.a-act:hover:not(:disabled) { border-color: var(--ink); }
.a-act.on { border-color: var(--lapis); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--lapis); }
.a-act:disabled { opacity: .45; cursor: not-allowed; }
.a-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.a-slot { display: inline-flex; align-items: center; gap: 5px; min-width: 90px; justify-content: center; padding: 6px 12px; border-radius: 999px; border: 1.5px dashed var(--line-strong); color: var(--muted); font-weight: 600; background: transparent; }
.a-slot.on { border-style: solid; border-color: var(--lapis); color: var(--ink); cursor: pointer; }
.a-pick { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.a-day { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.a-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.a-results li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.a-results .pdot { width: 26px; height: 26px; }
.a-lines { font-size: 14px; color: var(--muted); }
.a-effect { font-weight: 600; color: var(--muted); }
.a-reveal { display: grid; gap: 2px; border-radius: 12px; padding: 10px 14px; border: 1.5px solid var(--saffron); background: var(--surface-2); }
.a-reveal b { font-size: 16px; }
.a-reveal.bad { border-color: var(--pome); }
.a-reveal.bad b { color: var(--pome); }
.a-reveal.fx-on { animation: fx-unveil .7s .35s ease both; }
.a-pick.ok { border-color: var(--olive); color: var(--olive); }
.a-pick.no { border-color: var(--pome); color: var(--pome); border-style: dashed; }
.a-job { display: grid; gap: 10px; border: 1.5px solid var(--saffron); border-radius: 14px; padding: 14px; background: var(--surface); animation: fx-up .35s ease both; }
.a-job .ch-kind { color: var(--saffron); font-size: 15px; }

/* the event picture shown large when its outcome is revealed */
.ark-fx { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 55; }
.ark-fx-box { display: grid; justify-items: center; gap: 6px; width: min(360px, calc(100vw - 32px)); padding: 18px 20px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 70px var(--shade); animation: fx-pop .5s cubic-bezier(.2, 1.4, .4, 1) both, fx-fade 2.9s ease forwards; }
.ark-fx.bad .ark-fx-box { border-color: var(--pome); }
.ark-fx-art { width: 100%; height: auto; }
.ark-fx-box b { font-family: var(--font-display); font-size: 21px; }
.ark-fx-box span { font-weight: 600; text-align: center; }
.ark-fx.bad .ark-fx-box span { color: var(--pome); }
.ark-fx svg * { vector-effect: non-scaling-stroke; }
.sc-storm .clouds ellipse { fill: var(--muted); opacity: .75; animation: cloud-drift 2.8s ease-in-out infinite alternate; }
.sc-storm .rainfall line { stroke: var(--lapis); stroke-width: 2; stroke-linecap: round; animation: rain-fall .5s linear infinite; }
.sc-storm .gust { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 40 30; animation: gust-blow 1s linear infinite; }
.sc-storm .gust.g2 { animation-duration: 1.3s; }
.sc-crack .hull2 { fill: var(--saffron); stroke: var(--ink); stroke-width: 2.5; }
.sc-crack line { stroke: rgba(0, 0, 0, .2); stroke-width: 2; }
.sc-crack .crackline { fill: none; stroke: var(--pome); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: crack-draw .9s .3s ease forwards; }
.sc-crack .crackline.c2 { animation-delay: .8s; }
.sc-rats .sack { fill: var(--saffron); opacity: .85; }
.sc-rats .tie { stroke: var(--ink); stroke-width: 3; }
.sc-rats .rat ellipse, .sc-rats .rat circle { fill: var(--muted); }
.sc-rats .rat path { fill: none; stroke: var(--muted); stroke-width: 2; }
.sc-rats .r1 { animation: rat-run 1.4s ease-in-out infinite alternate; }
.sc-rats .r2 { animation: rat-run2 1.1s ease-in-out infinite alternate; }
.sc-tools .hammer { fill: var(--muted); transform-origin: 99px 110px; animation: hammer-hit .6s ease-in-out infinite alternate; }
.sc-tools .hammer rect:last-child { fill: var(--ink); }
.sc-tools .sparks line { stroke: var(--glow); stroke-width: 3; stroke-linecap: round; animation: spark 0.6s ease-in-out infinite alternate; }
.sc-sun circle { fill: var(--glow); }
.sc-sun .rays { stroke: var(--glow); stroke-width: 4; stroke-linecap: round; transform-origin: 100px 66px; animation: sun-turn 6s linear infinite; }
.sc-sun .hill, .sc-family .hill, .sc-tired .hill { fill: var(--olive); opacity: .5; }
.sc-fruit .trunk { fill: var(--saffron); }
.sc-fruit .canopy { fill: var(--olive); opacity: .85; }
.sc-fruit .fr { fill: var(--pome); animation: fruit-drop 1.6s ease-in infinite; }
.sc-family .pp, .sc-crowd .pp, .sc-tired .pp { fill: var(--lapis); opacity: .85; }
.sc-family .pp { animation: bob 1s ease-in-out infinite alternate; }
.sc-family .p1, .sc-family .p3 { animation-delay: .3s; }
.sc-animals .paw { fill: var(--saffron); opacity: 0; animation: paw-in 2.4s ease forwards; }
.sc-lamp .glow { fill: var(--glow); opacity: .25; animation: glow-pulse 1.2s ease-in-out infinite alternate; }
.sc-lamp g { fill: var(--saffron); }
.sc-crowd .pp { fill: var(--muted); }
.sc-crowd .bubble rect { fill: var(--surface-2); stroke: var(--line-strong); }
.sc-crowd .bubble text { fill: var(--ink); font: 700 16px var(--font-body); text-anchor: middle; }
.sc-crowd .bubble { opacity: 0; animation: bubble-in 2.4s ease forwards; }
.sc-tired .setsun { fill: var(--pome); opacity: .7; animation: sun-set 2.6s ease forwards; }
.sc-tired .drop { fill: var(--lapis); animation: fruit-drop 1.4s ease-in infinite; }
@keyframes cloud-drift { to { transform: translateX(8px); } }
@keyframes rain-fall { from { transform: translate(0, -20px); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-6px, 30px); opacity: 0; } }
@keyframes gust-blow { to { stroke-dashoffset: -140; } }
@keyframes crack-draw { to { stroke-dashoffset: 0; } }
@keyframes rat-run { from { transform: translate(28px, 124px); } to { transform: translate(78px, 124px) scaleX(-1); } }
@keyframes rat-run2 { from { transform: translate(170px, 126px) scaleX(-1); } to { transform: translate(128px, 126px); } }
@keyframes hammer-hit { from { transform: rotate(-30deg); } to { transform: rotate(8deg); } }
@keyframes spark { from { opacity: .1; } to { opacity: 1; } }
@keyframes sun-turn { to { transform: rotate(360deg); } }
@keyframes fruit-drop { 0% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }
@keyframes bob { to { transform: translateY(-5px); } }
@keyframes paw-in { 0% { opacity: 0; transform: scale(.6); } 30%, 80% { opacity: 1; } 100% { opacity: .7; } }
@keyframes glow-pulse { to { opacity: .55; transform: scale(1.06); } }
@keyframes bubble-in { 0% { opacity: 0; transform: translateY(6px); } 25%, 85% { opacity: 1; transform: none; } 100% { opacity: .6; } }
@keyframes sun-set { to { transform: translateY(26px); } }
.ark-svg.shake { animation: ark-shake .7s ease; }
.ark-svg.shake .planks rect.on { animation: ark-flash .7s ease; }
@keyframes ark-shake { 0%, 100% { transform: none; } 15% { transform: translateX(-8px) rotate(-1.2deg); } 35% { transform: translateX(7px) rotate(1deg); } 55% { transform: translateX(-5px) rotate(-.6deg); } 75% { transform: translateX(3px); } }
@keyframes ark-flash { 40% { fill: var(--pome); } }

/* chat */
.chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-height: 0; }
.chat-slot .chat { height: min(640px, calc(100vh - 140px)); position: sticky; top: 16px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head h3 { font-size: 17px; }
.chat-close { padding: 4px 10px; font-size: 13px; }
.chat-slot .chat-close { display: none; }
.chat-log { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-msg { display: grid; gap: 2px; max-width: 88%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.cm-head { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.chat-msg.mine .cm-head { justify-content: flex-end; }
.cm-head b { color: var(--ink); font-weight: 600; }
.cm-text { background: var(--surface-2); border-radius: 12px; padding: 7px 11px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.chat-msg.mine .cm-text { background: var(--lapis); color: var(--on-accent); }
.chat-msg.sys { align-self: center; max-width: 100%; font-size: 12.5px; color: var(--muted); text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form .btn { flex: none; white-space: nowrap; }
.chat-dock { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 76px; width: min(360px, calc(100vw - 32px)); height: min(480px, calc(100vh - 120px)); z-index: 40; box-shadow: 0 16px 48px var(--shade); border-radius: 16px; }
.chat-dock .chat { height: 100%; }
.chat-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 41; display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px var(--shade); }
.unread { background: var(--pome); color: #fff; border-radius: 999px; min-width: 20px; padding: 0 6px; font-size: 12px; line-height: 20px; text-align: center; }

/* status messages */
/* how long I have been here: small, in the page's top margin, never in the way of a tap */
.play-time { position: fixed; top: 3px; right: max(8px, env(safe-area-inset-right, 0px)); z-index: 20; pointer-events: none; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line); }
.play-time.long { color: var(--saffron); border-color: currentColor; }
.conn, .notice { position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px var(--shade); }
.conn { top: max(12px, env(safe-area-inset-top, 0px)); background: var(--pome); color: var(--on-accent); }
.notice { bottom: 84px; background: var(--ink); color: var(--surface); }

@media (max-width: 980px) {
  .lobby-grid, .room-grid, .quiz-grid, .haman-grid, .ark-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-slot .chat { height: 420px; position: static; }
}
@media (max-width: 620px) {
  .me-box, .code-box { margin-left: 0; }
  .seat-row { grid-template-columns: 30px minmax(0, 1fr) 36px; }
  .seat-row select { grid-column: 2 / 3; grid-row: 2; }
  .seat-row .icon-btn, .seat-row > span:last-child { grid-column: 3; grid-row: 1; }
  .chars-more .char-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-dock { left: 0; right: 0; bottom: 0; width: 100%; height: min(70vh, 520px); border-radius: 16px 16px 0 0; }
  .chat-dock .chat { border-radius: 16px 16px 0 0; }
  /* the open chat fills the bottom of the screen; its own 접기 button closes it, so the floating button steps aside */
  .chat-open .chat-fab { display: none; }
  .session-item { flex-wrap: wrap; }
  .session-item .btn { width: 100%; }
  .sound-btn span { display: none; }
  .q-answers { grid-template-columns: minmax(0, 1fr); }
  .q-ans { min-height: 60px; padding: 14px; }
  .a-goal { grid-template-columns: 76px minmax(0, 1fr) 56px; }
  .a-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions { flex-wrap: wrap; }
}

/* land games (약속의 땅을 차지하라, 성경 지명 여행): board, title-deed cards, pictures and maps */
:root { --map-land: #EADFC4; --map-sea: #A9CBE0; --map-coast: #86ADC6; --map-river: #6FA0C4; --map-ink: #2A2016; --map-halo: #FFFFFF; --map-mark: #8A3A3A; --art-dim: none; }
:root[data-theme="dark"] { --map-land: #3A3427; --map-sea: #22405A; --map-coast: #34607F; --map-river: #4E86B0; --map-ink: #F1E9D8; --map-halo: #141A26; --map-mark: #E7787D; --art-dim: brightness(.82) saturate(.9); }

.land-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 18px; align-items: start; }
@media (max-width: 960px) { .land-grid { grid-template-columns: minmax(0, 1fr); } }
.land-board { display: grid; grid-template-columns: repeat(var(--s), minmax(0, 1fr)); grid-template-rows: repeat(var(--s), minmax(0, 1fr)); gap: 2px; aspect-ratio: 1; width: 100%; max-width: 780px; margin-inline: auto; background: var(--line-strong); border: 2px solid var(--line-strong); border-radius: 14px; overflow: hidden; container-type: inline-size; }
.lc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; min-height: 0; padding: 0 1px 2px; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: clamp(8px, 1.5cqw, 13px); line-height: 1.15; text-align: center; overflow: hidden; }
.lc:hover { background: var(--surface-2); }
.lc-band { width: 100%; height: 17%; flex: none; background: var(--gc); }
.lc-name { font-weight: 700; word-break: break-all; padding-top: 2px; }
.lc-price { color: var(--muted); font-size: .9em; font-variant-numeric: tabular-nums; }
.lc-built { color: var(--oc); font-size: .85em; letter-spacing: -1px; }
.lc.owned { background: color-mix(in srgb, var(--oc) 18%, var(--surface)); box-shadow: inset 0 -4px 0 var(--oc); }
.lc.corner, .lc:not(.place) { background: var(--surface-2); }
.lc-icon { width: 72%; flex: none; padding-top: 3px; }
.lc-icon .ld-art { border-radius: 4px; }
.lc-pawns { position: absolute; left: 2px; right: 2px; bottom: 3px; display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; pointer-events: none; }
.lc-pawns .pawn { width: clamp(7px, 1.7cqw, 14px); aspect-ratio: 1; border-radius: 50%; background: var(--pc); border: 1.5px solid var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.lc-pawns .pawn.cur { outline: 2px solid var(--glow); animation: pawn-bob 1s ease-in-out infinite; }
@keyframes pawn-bob { 50% { transform: translateY(-2px); } }
.lc-center { background: var(--surface); display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 4px; padding: 6px; min-width: 0; min-height: 0; }
.lc-center .ld-map { width: 100%; height: 100%; min-height: 0; }
.lc-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; font-size: clamp(10px, 1.7cqw, 13px); color: var(--muted); }
.lc-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: clamp(9px, 1.5cqw, 12px); color: var(--muted); }
.lc-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lc-legend i { width: 9px; height: 9px; border-radius: 3px; }
@container (max-width: 480px) { .lc-legend { display: none; } }
.l-who { display: inline-flex; align-items: center; gap: 6px; }
.l-dice { display: inline-flex; gap: 6px; }
#dice-fx-die.l-dice { gap: 16px; }
.l-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.l-players li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.l-players li.is-cur { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--glow); }
.l-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.l-stats b { margin-left: auto; font-size: 15px; }
.neg { color: var(--pome); }

/* the title deed */
.deed { border: 2px solid var(--gc, var(--line-strong)); border-radius: 16px; overflow: hidden; background: var(--surface); margin: 6px 0 12px; }
.deed-band { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 14px; background: var(--gc); color: #fff; font-weight: 700; font-size: 14px; }
.deed.plain .deed-band { background: var(--surface-2); color: var(--ink); }
.deed-pics { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; padding: 10px 12px 0; }
.deed-art, .deed-map { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.deed-art.wide { margin: 10px 12px 0; }
.deed-map { background: var(--map-land); display: grid; place-items: center; max-height: 210px; }
.deed-map .ld-map { width: 100%; height: 100%; max-height: 210px; }
.deed-name { font-family: var(--font-display); font-size: 26px; margin: 10px 14px 2px; }
.deed-about { margin: 0 14px 8px; font-size: 14.5px; line-height: 1.65; }
.deed-story { margin: 0 12px 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.deed-story .lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--saffron); }
.deed-story p { margin: 2px 0; font-weight: 600; line-height: 1.6; }
.deed-story .ref { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.deed-story.hidden p { color: var(--muted); font-weight: 400; font-size: 14px; }
.deed-owner { display: flex; align-items: center; gap: 8px; margin: 0 14px 8px; }
.deed-line { margin: 0 14px 10px; font-weight: 600; }
.deed-tolls { width: calc(100% - 20px); margin: 0 10px; border-collapse: separate; border-spacing: 4px 0; table-layout: fixed; }
.deed-tolls caption { text-align: left; font-size: 12.5px; color: var(--muted); padding: 0 4px 4px; }
.deed-tolls td { background: var(--surface-2); border-radius: 8px; padding: 5px 2px; text-align: center; font-size: 11.5px; line-height: 1.3; }
.deed-tolls td span { display: block; color: var(--muted); }
.deed-tolls td b { font-size: 16px; font-variant-numeric: tabular-nums; }
.deed-tolls td.now { box-shadow: inset 0 0 0 2px var(--gc); }
.deed > .small { margin: 6px 14px 12px; }
.deed.jubilee .deed-name { color: var(--saffron); }
.l-result { font-weight: 700; margin: 6px 0 10px; }
.l-result.good { color: var(--olive); }
.l-poor { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.l-quiz { margin: 6px 0 10px; }
.l-quiz h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 8px; }
.l-choices { display: grid; gap: 8px; margin-bottom: 8px; }
.l-choice { text-align: left; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; line-height: 1.5; }
button.l-choice:not(:disabled) { cursor: pointer; }
button.l-choice:not(:disabled):hover { border-color: var(--lapis); }
.l-choice.right { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 16%, var(--surface)); }
.l-choice.wrong { border-color: var(--pome); background: color-mix(in srgb, var(--pome) 12%, var(--surface)); }
.l-glean { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.l-glean .btn { flex-direction: column; gap: 2px; }
.l-glean small { font-weight: 500; color: var(--muted); }
@media (max-width: 480px) { .l-glean { grid-template-columns: minmax(0, 1fr); } .deed-name { font-size: 23px; } }
.l-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.l-tiles.many { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.l-tile { display: grid; gap: 2px; align-content: start; text-align: left; padding: 6px; border: 2px solid var(--gc); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.l-tile:not(:disabled) { cursor: pointer; }
.l-tile:not(:disabled):hover { background: var(--surface-2); }
.l-tile:disabled { opacity: 1; }
.l-tile .ld-art { border-radius: 8px; }
.l-tile b { font-size: 14px; line-height: 1.3; }
.l-tile .small { font-size: 11.5px; }
.l-tile.right { box-shadow: 0 0 0 3px var(--olive); }
.l-tile.wrong { box-shadow: 0 0 0 3px var(--pome); }
.l-tile.here { opacity: .55; }
.l-tile-own { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.l-tile-own .pdot { width: 18px; height: 18px; font-size: 10px; }
.l-answer { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; margin: 8px 0; }
.l-answer p { font-size: 14px; }
.l-rank { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 18px; font-variant-numeric: tabular-nums; }
.l-rank th, .l-rank td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.l-rank th:nth-child(2), .l-rank td:nth-child(2) { text-align: left; width: 100%; }
.l-rank th { color: var(--muted); font-weight: 600; }
.l-rank tr.is-me td { background: var(--surface-2); }
.l-rank .pdot { width: 20px; height: 20px; font-size: 11px; vertical-align: middle; }
.l-recap { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.l-recap li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px; border-left: 4px solid var(--gc); background: var(--surface-2); border-radius: 8px; }
.l-recap .ld-art { border-radius: 6px; }
.l-recap p { margin-top: 2px; font-size: 14px; }

/* pictures */
.ld-art { display: block; width: 100%; height: auto; filter: var(--art-dim); }
.s-sky { fill: #CFE4F0; } .s-night { fill: #24324A; } .s-dusk { fill: #E9B58C; } .s-wall { fill: #E6D8BF; } .s-floor { fill: #C7AE88; }
.s-sun { fill: #F4C24C; } .s-moon { fill: #F3EBD2; } .s-moonday { fill: #FFFFFF; opacity: .75; } .s-cloud { fill: #FFFFFF; opacity: .9; }
.s-hill { fill: #9CBF7C; } .s-hill2 { fill: #7DA163; } .s-sand { fill: #EBD3A0; } .s-sand2 { fill: #D9B979; }
.s-stone { fill: #D6C8AE; } .s-stone2 { fill: #BFAF92; } .s-col { fill: #EEE6D3; } .s-roof { fill: #A88A63; } .s-dark { fill: #4E3F31; }
.s-wood, .s-door, .s-rod { fill: #8B5A33; } .s-trunk, .s-post { fill: none; stroke: #8B5A33; stroke-width: 4.5; stroke-linecap: round; } .s-mast { stroke: #6E4526; stroke-width: 2.5; }
.s-leaf { fill: #5E9149; } .s-leaf2 { fill: #4C7B3B; } .s-olive { fill: #8FA27A; } .s-olive2 { fill: #A9BA94; } .s-reed { fill: none; stroke: #4C7B3B; stroke-width: 2.5; stroke-linecap: round; }
.s-water { fill: #6DAAD0; } .s-wave { fill: none; stroke: #E8F3FA; stroke-width: 1.5; opacity: .8; } .s-white, .s-snow, .s-paper { fill: #FBF8EF; }
.s-fire { fill: #EC7A2E; } .s-fire2 { fill: #F7C24A; } .s-smoke { fill: #7E7A76; opacity: .75; } .s-dust { fill: #D9B979; opacity: .7; }
.s-grain { fill: #D7A23A; stroke: #C38E2A; stroke-width: 2.5; stroke-linecap: round; } .s-band { stroke: #8B5A33; } .s-grain2 { fill: #EBCB7A; } .s-row { stroke: #C38E2A; stroke-width: 1.4; opacity: .45; }
.s-grape { fill: #6E3B7C; } .s-tent { fill: #C9A57A; } .s-tent2 { fill: #A9855C; } .s-line { fill: none; stroke: #4E3F31; stroke-width: 1.3; }
.s-light, .s-beam { fill: #F4C24C; opacity: .45; } .s-step { fill: #E2B652; } .s-road { fill: #D9B979; } .s-person { fill: #4E3F31; } .s-text { stroke: #4E3F31; stroke-width: 2; opacity: .45; }
.ld-art:not(.icon):not(.thumb) .s-wave { animation: s-wave 3s ease-in-out infinite alternate; }
.ld-art:not(.icon):not(.thumb) .s-fire, .ld-art:not(.icon):not(.thumb) .s-light, .ld-art:not(.icon):not(.thumb) .s-beam { animation: s-glow 1.6s ease-in-out infinite alternate; }
@keyframes s-wave { to { transform: translateX(-10px); } }
@keyframes s-glow { to { opacity: .7; } }

/* maps */
.ld-map { display: block; }
.ld-map .m-land, .ld-map .m-inset { fill: var(--map-land); }
.ld-map .m-land2 { fill: var(--map-land); stroke: var(--map-coast); stroke-width: .7; }
.ld-map .m-sea { fill: var(--map-sea); stroke: var(--map-coast); stroke-width: .8; }
.ld-map .m-river { fill: none; stroke: var(--map-river); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ld-map .m-river.thin { stroke-width: 1.1; }
.ld-map .m-water { font-size: 10px; fill: var(--map-river); text-anchor: middle; font-style: italic; }
.ld-map .m-pin { fill: var(--surface); stroke: var(--map-ink); stroke-width: 1.2; opacity: .85; }
.ld-map .m-pin.own { stroke: var(--map-halo); stroke-width: 1.4; opacity: 1; }
.ld-map .m-hi { fill: var(--pome); stroke: var(--map-halo); stroke-width: 1.6; }
.ld-map .m-ring { fill: none; stroke: var(--pome); stroke-width: 2.2; transform-box: fill-box; transform-origin: center; animation: m-ring 1.4s ease-out infinite; }
.ld-map .m-label { font-size: 15px; font-weight: 700; fill: var(--map-ink); paint-order: stroke; stroke: var(--map-halo); stroke-width: 4px; stroke-linejoin: round; }
.ld-map .m-box, .ld-map .m-frame { fill: none; stroke: var(--map-mark); stroke-width: 1.3; }
.ld-map .m-frame { stroke-width: 3; }
.ld-map .m-lead { fill: none; stroke: var(--map-mark); stroke-width: 1; stroke-dasharray: 3 3; }
@keyframes m-ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld-art *, .ld-map .m-ring, .lc-pawns .pawn.cur { animation: none !important; } }

/* people sharing one device: the "add a seat" row in the waiting room, and whose turn it is on this device */
.room-actions { display: grid; gap: 10px; }
.seat-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.seat-add-label { font-weight: 700; font-size: 14px; margin-right: 4px; }
.seat-add .btn { padding: 7px 12px; font-size: 14px; }
.seat-add-hint { margin-top: -4px; }
.room-actions .start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.who-tag.dev, .dev-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--lapis); }
.who-tag.dev .ic, .dev-tag .ic { width: 13px; height: 13px; }
.local-turn, .sheet-who { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; color: #3A2A00; background: var(--glow); border-radius: 999px; }
.local-turn { position: sticky; top: 8px; z-index: 30; width: fit-content; margin: 0 auto 10px; padding: 8px 18px; font-size: 16px; box-shadow: 0 4px 14px var(--shade); }
.sheet-who { margin-right: auto; padding: 4px 12px; font-size: 14px; }
.local-turn .ic, .sheet-who .ic { width: 18px; height: 18px; fill: currentColor; }
.local-turn.flash, .sheet-who.flash { animation: turn-flash .9s ease; }
@keyframes turn-flash { 0% { transform: scale(.8); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .local-turn.flash, .sheet-who.flash { animation: none; } }

/* minigame announcement: the game's name, then 3, 2, 1, 시작! */
.mg { position: relative; }
/* below the instructions, in the flow, so they can be read during the count and nothing is covered or cut */
.mg-intro { display: grid; justify-items: center; gap: 4px; padding: 14px 0 18px; text-align: center; }
.mg-intro b { font-family: var(--font-display); font-size: 30px; color: var(--lapis); }
.mg-num { font-family: var(--font-display); font-size: 64px; line-height: 1; color: var(--saffron); min-height: 64px; }
.mg-num.pop { animation: mg-count .6s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes mg-count { from { transform: scale(1.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mg-num.pop { animation: none; } }

/* a folded game card: the board shows, and a bar at the bottom opens the card again */
.modal.folded { background: transparent; pointer-events: none; place-items: end start; }
.modal.folded .sheet { display: none; }
.sheet-mini { pointer-events: auto; display: grid; gap: 1px; text-align: left; max-width: min(360px, calc(100vw - 150px)); margin: 0 0 16px; padding: 9px 16px; border-radius: 16px; border: 1.5px solid var(--lapis); background: var(--surface); color: var(--ink); box-shadow: 0 8px 24px var(--shade); font: inherit; cursor: pointer; }
.sheet-mini b { color: var(--lapis); font-size: 14px; }
.sheet-mini span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-mini.need { border-color: var(--saffron); background: color-mix(in srgb, var(--glow) 22%, var(--surface)); animation: mini-pulse 1.4s ease-in-out infinite; }
.sheet-mini.need b { color: var(--saffron); }
@keyframes mini-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--glow) 45%, transparent), 0 8px 24px var(--shade); } }
@media (prefers-reduced-motion: reduce) { .sheet-mini.need { animation: none; } }
.option select.input { max-width: 420px; }

/* land board: the start, the way round, and my pawn */
.lc.start, .lc[aria-label*="출발"] { background: color-mix(in srgb, var(--glow) 38%, var(--surface)); box-shadow: inset 0 0 0 2px var(--saffron); }
.lc-flag { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2; padding: 0 6px 1px; border-radius: 0 0 7px 7px; background: var(--saffron); color: #fff; font-size: .8em; font-weight: 800; line-height: 1.35; }
.lc-dir { position: absolute; bottom: 1px; left: 3px; z-index: 2; color: var(--saffron); font-size: .95em; font-weight: 800; }
.lc.here-me { box-shadow: inset 0 0 0 3px var(--mc); }
.lc-me { position: absolute; top: 1px; right: 1px; z-index: 2; padding: 0 4px; border-radius: 6px; background: var(--mc); color: #fff; font-size: .78em; font-weight: 800; line-height: 1.4; animation: pawn-bob 1s ease-in-out infinite; }
.lc-pawns .pawn.me { transform: scale(1.35); box-shadow: 0 0 0 2px var(--ink), 0 1px 3px rgba(0, 0, 0, .35); }
.lc-pawns .pawn.me.cur { animation: none; }
.l-where { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.l-where b { color: var(--ink); }
.pdot-mini { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); flex: none; }
.l-at { padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .lc-me { animation: none; } }

/* land games: chance cards, taking land */
.chance-card { margin: 6px 0 12px; padding: 0 0 14px; border-radius: 18px; overflow: hidden; text-align: center; background: linear-gradient(160deg, #FFF3C4, #FFE08A); color: #3A2A00; border: 2px solid #E0A82E; box-shadow: 0 10px 28px var(--shade); animation: chance-in .55s cubic-bezier(.2, 1.3, .4, 1); }
.chance-band { padding: 7px 14px; background: #E0A82E; color: #fff; font-weight: 800; letter-spacing: .04em; }
.chance-card h2 { font-family: var(--font-display); font-size: 26px; margin: 14px 16px 6px; }
.chance-card p { margin: 0 18px 8px; line-height: 1.6; }
.chance-card .small { color: #7A5A10; }
.chance-line { font-weight: 800; color: #6A3A00; }
.chance-die { display: flex; justify-content: center; margin: 4px 0 8px; }
@keyframes chance-in { from { transform: rotateY(90deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chance-card { animation: none; } }
.l-take { display: grid; gap: 8px; margin: 4px 0 10px; }
.l-take .ch-kind { color: var(--saffron); font-weight: 800; }
.l-result.bad { color: var(--pome); }
.l-home { color: var(--olive); font-weight: 600; }
.l-pass { color: var(--olive); font-weight: 600; }
.lc-flag { font-size: .95em; padding: 1px 7px 2px; }
.lc-dir { font-size: 1.3em; }

/* lobby: games as picture tiles; "자세히" opens the description */
.game-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.game-tile { position: relative; display: grid; }
.game-tile .game-card { display: grid; gap: 4px; align-content: start; padding: 8px 8px 36px; text-align: left; }
.game-tile .game-card .ld-art { border-radius: 10px; }
.game-tile .game-card b { font-size: 17px; line-height: 1.25; }
.game-tile .game-card .small { font-size: 12px; }
.game-tile.on .game-card { border-color: var(--lapis); box-shadow: inset 0 0 0 2px var(--lapis); background: var(--surface-2); }
.game-info { position: absolute; right: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--lapis); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.game-info:hover { border-color: var(--lapis); }
.game-info-head { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 10px; }
.game-info-head .ld-art { border-radius: 12px; }
@media (max-width: 480px) { .game-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .game-info-head { grid-template-columns: 100px minmax(0, 1fr); } }

/* the admin's notice, on top of every screen */
.hub-notice { position: fixed; top: 0; left: 0; right: 0; z-index: 80; display: flex; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: #FFE59A; color: #3A2A00; border-bottom: 2px solid #E0A82E; box-shadow: 0 4px 16px var(--shade); animation: notice-in .4s ease; }
.hn-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #E0A82E; color: #fff; font-weight: 900; }
.hn-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.5; }
.hn-text em { font-style: normal; font-weight: 800; color: #A33A00; }
.hub-notice .btn { flex: none; padding: 5px 12px; font-size: 13px; border-color: #C9962B; color: #3A2A00; }
@keyframes notice-in { from { transform: translateY(-100%); } to { transform: none; } }
.ad-notice-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 8px; }
.ad-notice-row .field { min-width: 140px; }
.ad-notice-live { padding: 8px 12px; border-radius: 10px; background: #FFF1C2; color: #3A2A00; margin: 8px 0; }

/* admin: accounts */
.ad-users { display: grid; gap: 6px; }
/* a long list of people scrolls in its own box */
.ad-users.ad-scroll { max-height: min(60vh, 480px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.ad-user { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.ad-user .btn { padding: 4px 10px; font-size: 13px; }
/* reports and bans */
.ad-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad-acts .choice-seg { margin: 0; }
.ad-acts .btn { padding: 4px 10px; font-size: 13px; }
.ad-banned { color: var(--pome); font-size: 13px; }
.ad-on { color: var(--olive); }
.ad-ways { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#ad-routes .h-sub { margin: 12px 0 6px; font-size: 15px; }
.ad-user.banned { opacity: .8; }
.ad-sub { margin-top: 18px; }
.ad-chat summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ad-chat ol { list-style: none; margin: 8px 0 0; padding: 8px 10px; display: grid; gap: 3px; max-height: 260px; overflow: auto; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.ad-chat li { overflow-wrap: anywhere; }
.ad-chat li.hit { background: color-mix(in srgb, var(--pome) 14%, transparent); border-radius: 6px; padding: 0 4px; }
.ad-chat li.sys { color: var(--muted); }
/* on a phone the name, what is known and the buttons (up to three) each take their own line */
@media (max-width: 480px) { .ad-user { grid-template-columns: minmax(0, 1fr); } .ad-user > .btn { justify-self: start; } }

/* sign-in */
.pin-input { max-width: 160px; letter-spacing: .3em; font-weight: 700; }
.name-error { color: var(--pome); font-weight: 600; min-height: 1em; }

/* 믿음의 탑: the lobby's challenge panel and the climb */
.challenge-panel h2 { margin-bottom: 10px; }
.challenge-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.challenge-card .ld-art { border-radius: 12px; }
.challenge-text b { font-family: var(--font-display); font-size: 21px; }
.challenge-best { margin-top: 6px; font-size: 14px; }
.challenge-best b { color: var(--saffron); font-size: 18px; }
.challenge-mine { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.link-btn { padding: 2px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.challenge-panel .actions { margin: 10px 0 12px; }
.t-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.t-board li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.t-board li.you { box-shadow: inset 0 0 0 2px var(--lapis); }
.t-board li:nth-child(1) .t-rank { background: #E0A82E; color: #fff; }
.t-board li:nth-child(2) .t-rank { background: #A9B2C0; color: #fff; }
.t-board li:nth-child(3) .t-rank { background: #C27A45; color: #fff; }
.t-board .t-none { display: block; color: var(--muted); }
.t-rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--surface); }
.tower-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.tower-side { display: grid; gap: 12px; }
.tower-col { display: grid; gap: 3px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.t-top .ld-art { border-radius: 10px; }
.t-floor { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 14px; }
.t-floor b { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.t-floor.done { background: color-mix(in srgb, var(--glow) 30%, var(--surface)); color: var(--ink); }
.t-floor.boss { box-shadow: inset 0 0 0 2px #E0A82E; }
.t-floor.cur { background: var(--lapis); color: #fff; }
.t-floor.cur b { color: #fff; }
.t-me { width: 14px; height: 14px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 3px #fff; animation: pawn-bob 1s ease-in-out infinite; }
.t-ground { height: 10px; border-radius: 6px; background: var(--line-strong); }
.t-lamps { display: flex; gap: 6px; }
.t-lamp .ic { width: 34px; height: 34px; fill: var(--line-strong); }
.t-lamp.on .ic { fill: var(--saffron); filter: drop-shadow(0 0 6px var(--glow)); }
.t-lamps.lost { animation: fx-shake .45s ease; }
.tower-main { display: grid; gap: 8px; min-height: 360px; }
.t-head h2 { font-family: var(--font-display); font-size: 34px; }
.t-boss { font-size: 15px; padding: 2px 10px; border-radius: 999px; background: #E0A82E; color: #fff; vertical-align: middle; }
.t-quiz { display: grid; gap: 10px; }
.t-q { font-size: 19px; font-weight: 700; line-height: 1.55; }
.t-quiz .q-timer i { display: block; height: 100%; background: var(--lapis); border-radius: inherit; transition: width .1s linear; }
.t-quiz .q-timer i.low { background: var(--pome); }
.t-choices { display: grid; gap: 8px; }
.t-choice { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.t-choice:not(:disabled):hover { border-color: var(--lapis); }
.t-choice.right { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 16%, var(--surface)); }
.t-choice.wrong { border-color: var(--pome); background: color-mix(in srgb, var(--pome) 12%, var(--surface)); }
.t-reveal .small { display: block; font-weight: 400; margin-top: 4px; }
.t-clear { display: grid; place-items: center; gap: 6px; padding: 40px 10px; text-align: center; animation: fx-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.t-clear b { font-family: var(--font-display); font-size: 44px; color: var(--saffron); }
.t-over { display: grid; gap: 10px; justify-items: center; text-align: center; }
.t-over-art { width: min(260px, 70%); }
.t-over-art .ld-art { border-radius: 14px; }
.t-over h2 { font-family: var(--font-display); font-size: 32px; }
.t-new { font-family: var(--font-display); font-size: 24px; color: var(--saffron); }
.t-over .t-board { width: min(420px, 100%); text-align: left; }

/* 믿음의 탑: the sky behind the climb */
#game-root:has(.tower-sky) { position: relative; isolation: isolate; }
.tower-sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; transition: background 1.2s ease; }
.tower-sky svg { width: 100%; height: 100%; display: block; }
.tower-sky.day { background: linear-gradient(180deg, #8EC9F2 0%, #D6EEFF 70%); }
.tower-sky.sunset { background: linear-gradient(180deg, #F59E6B 0%, #FFD08A 55%, #FFE8C2 80%); }
.tower-sky.dusk { background: linear-gradient(180deg, #3D3F7A 0%, #8A5C9E 50%, #E7A07A 85%); }
.tower-sky.night { background: linear-gradient(180deg, #0B1230 0%, #1E2A5A 60%, #3A3A6A 100%); }
.sky-stars { fill: #FFFFFF; opacity: 0; transition: opacity 1.2s; }
.tower-sky.dusk .sky-stars { opacity: .35; }
.tower-sky.night .sky-stars { opacity: .9; }
.sky-sun { fill: #FFE07A; opacity: .9; }
.tower-sky.sunset .sky-sun { fill: #FF9C55; transform: translateY(160px); }
.tower-sky.dusk .sky-sun, .tower-sky.night .sky-sun { fill: #F4EBD2; transform: translateY(-40px); opacity: .85; }
.sky-hill { fill: #7FA868; } .sky-hill2 { fill: #9CC07E; }
.tower-sky.dusk .sky-hill, .tower-sky.night .sky-hill { fill: #2C3B37; } .tower-sky.dusk .sky-hill2, .tower-sky.night .sky-hill2 { fill: #3C4E48; }
.sky-tower { fill: #CDBFA6; } .sky-win { fill: #6B5A45; }
.tower-sky.night .sky-tower { fill: #5C5A6E; } .tower-sky.night .sky-win, .tower-sky.dusk .sky-win { fill: #FFD36B; }
.sky-glow { fill: #FFD36B; opacity: .35; animation: s-glow 1.6s ease-in-out infinite alternate; }
.sky-flame { fill: #F28C2E; }
.tower-sky ~ .topbar, .tower-sky ~ .tower-grid .panel, .tower-sky ~ .tower-grid .tower-col { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(4px); }
.tower-sky ~ .topbar { border-radius: 14px; padding: 10px 14px; }
@media (prefers-reduced-motion: reduce) { .sky-glow { animation: none; } }

/* 믿음의 탑 on a phone: the challenge first, the lamps beside the floor number */
.t-mini-lamps { display: none; }
@media (max-width: 760px) {
  .tower-grid { grid-template-columns: minmax(0, 1fr); }
  .tower-main { order: -1; min-height: 0; }
  .tower-col { display: none; }
  .t-mini-lamps { display: flex; gap: 2px; float: right; }
  .t-mini-lamps .ic { width: 24px; height: 24px; }
}

/* 랑제 퀴즈: the topic's picture behind, and connecting key points with scriptures */
.ranje-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ranje-bg .ld-art { width: 100%; height: 100%; }
.ranje-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .55)); }
.ranje-bg ~ .topbar, .ranje-bg ~ .quiz-grid .panel { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(4px); }
.ranje-bg ~ .topbar { border-radius: 14px; padding: 10px 14px; }
.s-animal { fill: #D9A441; } .s-animal path { fill: none; stroke: #B07A20; stroke-width: 3; }
.r-ask { margin-top: 4px; }
.q-question.r-refs { font-family: var(--font-body); font-weight: 800; color: var(--lapis); }
.q-answers.long .q-text { font-size: 15px; line-height: 1.5; }
.r-match { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin: 8px 0; }
.r-col { display: grid; gap: 8px; align-content: start; }
.r-pt, .r-ref { position: relative; display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.45; cursor: pointer; }
.r-pt:disabled, .r-ref:disabled { cursor: default; opacity: 1; }
.r-tag { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; font-size: 12px; font-weight: 800; }
.r-pt.sel { border-color: var(--pc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 35%, transparent); }
.r-pt.paired, .r-ref.paired { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, var(--surface)); }
.r-pt.right { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 14%, var(--surface)); }
.r-pt.wrong { border-color: var(--pome); background: color-mix(in srgb, var(--pome) 10%, var(--surface)); }
.r-to { margin-left: auto; flex: none; padding: 0 6px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.r-ref .q-mark { flex: none; color: var(--muted); }
.r-truths { display: grid; gap: 8px; margin: 8px 0; }
.r-truth { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--saffron); }
.r-truth p { margin: 4px 0; font-weight: 600; }
.r-truth b { color: var(--lapis); }
@media (max-width: 560px) { .r-match { grid-template-columns: minmax(0, 1fr); } }

/* admin: visits and games */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.st-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.st-tile b { font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-tile span { font-size: 13px; color: var(--ink); }
.st-tile small { font-size: 12px; color: var(--muted); }
.st-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.st-fig { margin: 0; }
.st-fig figcaption { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.st-fig figcaption small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.st-bars { display: flex; align-items: stretch; gap: 2px; height: 150px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.st-col { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; outline: none; }
.st-bar { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--lapis); }
.st-col:hover .st-bar, .st-col:focus-visible .st-bar { background: color-mix(in srgb, var(--lapis) 75%, var(--ink)); }
.st-num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 14px; }
.st-x { position: absolute; bottom: -18px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.st-col[data-tip]:hover::after, .st-col[data-tip]:focus-visible::after, .st-hrow[data-tip]:hover::after, .st-hrow[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%); z-index: 5; padding: 4px 8px; border-radius: 8px; background: var(--ink); color: var(--surface); font-size: 12px; white-space: nowrap; pointer-events: none; }
.st-hbars { display: grid; gap: 6px; }
.st-hrow { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 13px; outline: none; }
.st-hrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-hrow i { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--lapis); min-width: 2px; }
.st-hrow b { font-variant-numeric: tabular-nums; text-align: right; }
.st-hrow[data-tip]:hover::after, .st-hrow[data-tip]:focus-visible::after { bottom: 100%; }
.st-table { margin-top: 14px; font-size: 13px; }
.st-table summary { cursor: pointer; color: var(--lapis); font-weight: 600; }
.st-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.st-table th, .st-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.r-not { color: var(--pome); }

/* land games: a place's card comes up from the bottom when someone stops there, and goes down again */
.l-arrive { position: fixed; left: 50%; bottom: max(10vh, 72px); z-index: 56; width: min(340px, calc(100vw - 32px)); pointer-events: none; transform: translate(-50%, 0); }
.l-arrive .arr-who { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--surface); box-shadow: 0 6px 18px var(--shade); font-size: 14px; }
.l-arrive .arr-card { margin: 0; box-shadow: 0 26px 70px var(--shade), 0 4px 14px var(--shade); }
.l-arrive .deed-art { margin: 10px 12px 0; }
.l-arrive .deed-art .ld-art { height: 104px; }
.l-arrive .deed-name { font-size: 23px; margin-top: 8px; }
.l-arrive .deed-about { font-size: 13.5px; line-height: 1.55; margin-bottom: 6px; }
.l-arrive .deed-owner { font-size: 14px; margin-bottom: 10px; }
.l-arrive .arr-free { color: var(--muted); }
.l-arrive.up { animation: arr-up .5s cubic-bezier(.2, 1.25, .35, 1) both; }
.l-arrive.down { animation: arr-down .42s cubic-bezier(.5, 0, .9, .5) both; }
@keyframes arr-up { from { transform: translate(-50%, calc(100% + 12vh)) rotate(-4deg); } to { transform: translate(-50%, 0) rotate(0); } }
@keyframes arr-down { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, calc(100% + 12vh)) rotate(3deg); opacity: .6; } }

/* a hidden event on the card: it stamps in after the card is up, with sparks for a good one and a shake for a bad one */
.arr-ev { position: relative; margin: 0 10px 10px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--glow); background: linear-gradient(160deg, rgba(255, 197, 61, .22), rgba(255, 197, 61, .06)); animation: arr-ev-in .5s .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.arr-ev.bad { border-color: var(--pome); background: linear-gradient(160deg, rgba(210, 63, 74, .18), rgba(210, 63, 74, .05)); animation: arr-ev-in .5s .5s cubic-bezier(.2, 1.4, .4, 1) both, fx-shake .5s 1s ease; }
.arr-ev-head { display: flex; }
.arr-ev-tag { position: relative; display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--glow); color: #3A2A00; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; animation: arr-stamp .45s .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.arr-ev.bad .arr-ev-tag { background: var(--pome); color: #fff; }
.arr-ev-title { display: block; margin: 6px 0 2px; font-family: var(--font-display); font-size: 19px; }
.arr-ev p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.arr-ev .ref { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.arr-ev-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.arr-ev-lines span { padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 15px; color: var(--olive); animation: arr-pop .45s 1.05s cubic-bezier(.2, 1.8, .4, 1) both; }
.arr-ev.bad .arr-ev-lines span { color: var(--pome); }
.l-arrive.ev-good .arr-card { animation: arr-glow 1.6s .55s ease-out; }
@keyframes arr-ev-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes arr-stamp { from { opacity: 0; transform: scale(2.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes arr-pop { from { opacity: 0; transform: translateY(8px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes arr-glow { 0% { box-shadow: 0 0 0 0 rgba(255, 197, 61, .9), 0 26px 70px var(--shade); } 100% { box-shadow: 0 0 0 26px rgba(255, 197, 61, 0), 0 26px 70px var(--shade); } }
.arr-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.arr-burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; background: var(--glow); transform: rotate(var(--a)) translateX(0) scale(0); animation: arr-spark .9s calc(.6s + var(--t)) ease-out both; }
.arr-burst i:nth-child(3n) { background: #fff3c4; border-radius: 50%; }
.arr-burst i:nth-child(3n+1) { background: var(--saffron); }
@keyframes arr-spark { 0% { transform: rotate(var(--a)) translateX(0) scale(.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) scale(1) rotate(180deg); opacity: 0; } }
/* the whole screen flashes once: gold for a good event, red for a bad one */
.l-flash { position: fixed; inset: 0; z-index: 55; pointer-events: none; animation: arr-flash .9s ease-out both; }
.l-flash.good { background: radial-gradient(circle at 50% 70%, rgba(255, 197, 61, .45), rgba(255, 197, 61, 0) 65%); }
.l-flash.bad { background: radial-gradient(circle at 50% 70%, rgba(210, 63, 74, .35), rgba(210, 63, 74, 0) 65%); }
@keyframes arr-flash { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 560px) { .l-arrive { bottom: max(6vh, 64px); } .l-arrive .deed-art .ld-art { height: 84px; } .l-arrive .deed-about { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }
@media (prefers-reduced-motion: reduce) { .l-arrive.up, .l-arrive.down, .arr-ev, .arr-ev-tag, .arr-ev-lines span, .l-arrive.ev-good .arr-card, .arr-burst i { animation: none !important; } .l-flash { display: none; } .l-arrive.down { opacity: 0; } }

/* ---------- 성경 이야기 탐험 ---------- */
.ex-sky { position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, #CFE8FF 0%, #EAF6FF 45%, #FFF6DD 100%); }
.ex-sky::before, .ex-sky::after { content: ""; position: absolute; width: 140px; height: 44px; border-radius: 40px; background: rgba(255, 255, 255, .85); box-shadow: 40px -16px 0 6px rgba(255, 255, 255, .85); animation: ex-cloud 46s linear infinite; }
.ex-sky::before { top: 12%; left: -200px; }
.ex-sky::after { top: 30%; left: -200px; animation-duration: 64s; animation-delay: -30s; transform: scale(.7); }
@keyframes ex-cloud { to { left: calc(100% + 200px); } }
[data-theme="dark"] .ex-sky { background: linear-gradient(180deg, #14213A 0%, #18294A 60%, #2A2A3A 100%); }
[data-theme="dark"] .ex-sky::before, [data-theme="dark"] .ex-sky::after { background: rgba(255, 255, 255, .08); box-shadow: 40px -16px 0 6px rgba(255, 255, 255, .08); }
.ex-sky ~ .topbar { background: transparent; }
.ex-sky ~ .ex-grid .panel { background: color-mix(in srgb, var(--surface) 94%, transparent); }

/* the trail of stops */
.ex-trail-wrap { overflow-x: auto; margin: 0 0 14px; padding: 4px 4px 10px; scrollbar-width: thin; }
.ex-trail { list-style: none; margin: 0; padding: 26px 10px 4px; display: flex; min-width: max-content; }
.ex-node { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; width: 84px; flex: none; }
.ex-node::before { content: ""; position: absolute; top: 27px; left: -42px; width: 84px; border-top: 5px dotted #C9A86A; z-index: 0; }
.ex-node:first-child::before { display: none; }
.ex-node.past::before, .ex-node.here::before { border-top-style: solid; border-color: #E0A82E; }
.ex-dotimg { position: relative; z-index: 1; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; border: 4px solid var(--surface); box-shadow: 0 0 0 2px #C9A86A, 0 4px 10px var(--shade); background: var(--surface-2); }
.ex-dotimg .ld-art { width: 100%; height: 100%; }
.ex-node:not(.past):not(.here) .ex-dotimg { filter: grayscale(.55) brightness(1.05); opacity: .8; }
.ex-node.here .ex-dotimg { box-shadow: 0 0 0 3px #E0A82E, 0 0 0 9px rgba(224, 168, 46, .25), 0 6px 14px var(--shade); animation: ex-glow 1.6s ease-in-out infinite alternate; }
@keyframes ex-glow { to { box-shadow: 0 0 0 3px #E0A82E, 0 0 0 14px rgba(224, 168, 46, .08), 0 6px 14px var(--shade); } }
.ex-stampmark { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 72%, transparent); color: #FFE27A; font-size: 12px; letter-spacing: -1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); font-weight: 900; }
.ex-node-t { font-size: 11.5px; text-align: center; line-height: 1.25; color: var(--muted); max-width: 80px; word-break: keep-all; }
.ex-node.here .ex-node-t { color: var(--ink); font-weight: 700; }
.ex-pawn { position: absolute; top: -24px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; font-weight: 800; font-size: 14px; border: 3px solid #fff; box-shadow: 0 4px 10px var(--shade); }
.ex-pawn::after { content: ""; position: absolute; bottom: -9px; border: 6px solid transparent; border-top-color: #fff; }
.ex-pawn.hop { animation: ex-hop .9s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes ex-hop { 0% { transform: translate(-80px, 0); } 30% { transform: translate(-40px, -26px); } 60% { transform: translate(0, 0) scale(1.15, .85); } 80% { transform: translateY(-8px); } 100% { transform: none; } }

.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .ex-grid { grid-template-columns: minmax(0, 1fr); } }
.ex-stage { min-height: 360px; padding: 18px 20px 22px; overflow: hidden; }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.ex-kind { padding: 4px 12px; border-radius: 999px; background: #E0A82E; color: #3A2A00; font-weight: 800; font-size: 13px; }
.k-who .ex-kind { background: #B583CF; color: #fff; } .k-order .ex-kind { background: #45B8BF; color: #fff; } .k-ox .ex-kind { background: #E58F5F; color: #fff; } .k-result .ex-kind { background: #3D8B32; color: #fff; }
.ex-title { font-family: var(--font-display); font-size: 20px; }
.ex-no { margin-left: auto; font-size: 13px; color: var(--muted); }
.ex-art { border-radius: 16px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 6px 18px var(--shade); }
.ex-art .ld-art { width: 100%; height: 100%; display: block; }
.ex-art.big { height: 190px; }
.ex-art.slide { animation: ex-slide .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes ex-slide { from { transform: translateX(60px) rotate(4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ex-big { font-family: var(--font-display); font-size: 28px; text-align: center; margin: 14px 0 6px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ex-big.bounce { animation: ex-bounce 1.2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes ex-bounce { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
.ex-sub { text-align: center; font-size: 18px; margin: 0; }
.ex-walk .ex-big { animation: ex-bounce .8s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-ready-art .ex-art { max-width: 460px; margin: 0 auto; }
.center { text-align: center; } .actions.center { justify-content: center; margin-top: 16px; } .actions.center .small { margin: 0 4px; }
.ex-go { font-size: 19px; padding: 14px 28px; border-radius: 999px; box-shadow: 0 6px 0 #1F4FB5, 0 10px 20px var(--shade); transition: transform .1s, box-shadow .1s; animation: ex-nudge 2.4s 1.5s ease-in-out infinite; }
.ex-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #1F4FB5; }
@keyframes ex-nudge { 0%, 85%, 100% { transform: none; } 90% { transform: scale(1.06) rotate(-1deg); } 95% { transform: scale(1.06) rotate(1deg); } }

/* the story card */
.ex-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: center; animation: fx-up .45s ease both; }
.ex-story.small-art { grid-template-columns: 130px minmax(0, 1fr); margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.ex-story.small-art .ex-art { height: 90px; }
.ex-story.small-art .ex-read { font-size: 15px; }
@media (max-width: 620px) { .ex-story { grid-template-columns: minmax(0, 1fr); } .ex-art.big { height: 150px; } .ex-story.small-art { grid-template-columns: 96px minmax(0, 1fr); } .ex-story.small-art .ex-art { height: 70px; } }
.ex-read { font-size: 19px; line-height: 1.75; margin: 0; word-break: keep-all; }
.ex-ref { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.ex-say { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 2px solid #E0A82E; background: #FFF4D6; color: #6A4A00; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.ex-say:active { transform: scale(.95); }
[data-theme="dark"] .ex-say { background: #3A3018; color: #FFE2A0; }

/* 누구일까요? */
.ex-ask { font-family: var(--font-display); font-size: 21px; margin: 4px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ex-ask .ex-say { margin: 0; }
.ex-clues { display: grid; gap: 8px; margin-bottom: 12px; }
.ex-clue { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 14px; background: #F3E9FF; border: 2px solid #D9C2F0; }
[data-theme="dark"] .ex-clue { background: #2C2440; border-color: #4A3C66; }
.ex-clue p { margin: 0; font-size: 17px; line-height: 1.55; }
.ex-clue-no { flex: none; padding: 2px 8px; border-radius: 999px; background: #B583CF; color: #fff; font-size: 12px; font-weight: 800; }
.ex-clue.new { animation: ex-flip .55s cubic-bezier(.2, 1.3, .4, 1) both; transform-origin: top; }
@keyframes ex-flip { from { transform: rotateX(80deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ex-try { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: #FFF0D9; color: #8A5200; font-weight: 700; animation: fx-shake .45s ease; }
.ex-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ex-opts.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ex-opts.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 620px) { .ex-opts.n4, .ex-opts.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex-opt { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 18px; border: 3px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; box-shadow: 0 4px 0 var(--line); transition: transform .12s, box-shadow .12s, border-color .12s; animation: ex-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-opt:nth-child(2) { animation-delay: .06s; } .ex-opt:nth-child(3) { animation-delay: .12s; } .ex-opt:nth-child(4) { animation-delay: .18s; } .ex-opt:nth-child(5) { animation-delay: .24s; }
.ex-opt:not(:disabled):hover { transform: translateY(-3px); border-color: #B583CF; }
.ex-opt:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.ex-opt b { font-family: var(--font-display); font-size: 19px; word-break: keep-all; text-align: center; }
.ex-opt.plain { padding: 18px 6px; }
.ex-opt .em { width: 64px; height: 64px; }
.ex-opt.wrong { opacity: .35; filter: grayscale(1); animation: fx-shake .45s ease; }
@keyframes ex-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* 순서 맞추기 */
.ex-cards { display: grid; gap: 10px; }
.ex-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 3px solid #A9DDE0; background: #EAF8F9; color: var(--ink); font: inherit; font-size: 17px; text-align: left; cursor: pointer; box-shadow: 0 4px 0 #A9DDE0; transition: transform .12s; animation: ex-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-card:nth-child(2) { animation-delay: .06s; } .ex-card:nth-child(3) { animation-delay: .12s; } .ex-card:nth-child(4) { animation-delay: .18s; } .ex-card:nth-child(5) { animation-delay: .24s; }
[data-theme="dark"] .ex-card { background: #17323A; border-color: #2D5A63; box-shadow: 0 4px 0 #2D5A63; }
.ex-card:not(:disabled):active { transform: translateY(3px); }
.ex-card.picked { border-color: #45B8BF; background: #D2F1F3; }
[data-theme="dark"] .ex-card.picked { background: #1F4A52; }
.ex-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #45B8BF; color: #fff; font-weight: 900; font-size: 18px; animation: ex-stampin .35s cubic-bezier(.3, 1.8, .5, 1) both; }
.ex-num.empty { background: none; border: 3px dashed #A9DDE0; animation: none; }
@keyframes ex-stampin { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* O/X */
.ex-dots { display: inline-flex; gap: 6px; margin-left: auto; }
.ex-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.ex-dots i.now { background: #E58F5F; animation: ex-glow2 1s ease-in-out infinite alternate; } .ex-dots i.good { background: #3D8B32; } .ex-dots i.bad { background: #D23F4A; }
@keyframes ex-glow2 { to { transform: scale(1.3); } }
.ex-bubble { position: relative; margin: 6px auto 14px; max-width: 560px; padding: 18px 22px; border-radius: 22px; background: var(--surface); border: 3px solid #E58F5F; font-size: 21px; line-height: 1.6; text-align: center; font-weight: 700; word-break: keep-all; box-shadow: 0 8px 20px var(--shade); }
.ex-bubble::after { content: ""; position: absolute; bottom: -14px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-top-color: #E58F5F; border-bottom: 0; }
.ex-bubble.pop { animation: ex-bounce .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-bubble.done { opacity: .75; font-size: 18px; }
.ex-bubble + .ex-say { display: flex; width: max-content; margin: 0 auto 12px; }
.ex-ox { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 460px; margin: 0 auto; }
.ex-ox-btn { display: grid; justify-items: center; gap: 2px; padding: 14px 8px 12px; border-radius: 24px; border: 0; font: inherit; color: #fff; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.ex-ox-btn span { font-family: var(--font-display); font-size: 64px; line-height: 1; }
.ex-ox-btn small { font-size: 16px; font-weight: 800; }
.ex-ox-btn.o { background: #3D9B45; box-shadow: 0 7px 0 #276B2D; } .ex-ox-btn.x { background: #D9474F; box-shadow: 0 7px 0 #9A2A31; }
.ex-ox-btn:not(:disabled):hover { transform: translateY(-3px) rotate(-1deg); }
.ex-ox-btn:not(:disabled):active { transform: translateY(6px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.ex-ox-btn:disabled { opacity: .5; }
.ex-verdict { max-width: 520px; margin: 0 auto; padding: 14px 18px; border-radius: 18px; text-align: center; animation: ex-bounce .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-verdict b { display: block; font-family: var(--font-display); font-size: 30px; }
.ex-verdict span { font-weight: 700; } .ex-verdict p { margin: 6px 0 0; font-size: 16px; }
.ex-verdict.good { background: #E3F5E1; color: #23622A; } .ex-verdict.bad { background: #FDE6E7; color: #9A2A31; }
[data-theme="dark"] .ex-verdict.good { background: #1D3A1F; color: #A8E0A0; } [data-theme="dark"] .ex-verdict.bad { background: #3E1F22; color: #F2A9AE; }

/* the result: stars pop in one by one, and a stamp lands on it */
.ex-result-top { position: relative; display: grid; justify-items: center; }
.ex-stars { display: inline-flex; gap: 6px; }
.ex-stars i { font-style: normal; color: var(--line-strong); font-size: 20px; }
.ex-stars i.on { color: #F5B700; text-shadow: 0 2px 0 #C98A00; }
.ex-stars.big i { font-size: 54px; }
.ex-stars.pop-in i.on { animation: ex-star .55s calc(.35s + var(--i) * .33s) cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes ex-star { 0% { transform: scale(0) rotate(-120deg); opacity: 0; } 70% { transform: scale(1.35) rotate(10deg); opacity: 1; } 100% { transform: none; } }
.ex-result.try .ex-big { color: var(--muted); }
.ex-stamp { position: absolute; right: 4%; top: 0; width: 96px; height: 96px; border-radius: 50%; border: 5px double var(--pc); color: var(--pc); display: grid; place-items: center; transform: rotate(-14deg); font-family: var(--font-display); font-size: 16px; text-align: center; line-height: 1.1; animation: ex-stamp .5s 1.4s cubic-bezier(.3, 1.6, .5, 1) both; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ex-stamp span { width: 60px; }
@keyframes ex-stamp { 0% { transform: scale(3) rotate(-40deg); opacity: 0; } 60% { transform: scale(.9) rotate(-10deg); opacity: 1; } 100% { transform: rotate(-14deg); } }
@media (max-width: 620px) { .ex-stamp { width: 72px; height: 72px; font-size: 13px; right: 0; } .ex-stars.big i { font-size: 42px; } }
.ex-answer { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px auto; padding: 10px 18px; border-radius: 18px; background: #F3E9FF; width: max-content; max-width: 100%; animation: ex-pop .5s .3s both; }
[data-theme="dark"] .ex-answer { background: #2C2440; }
.ex-answer .em { width: 56px; height: 56px; }
.ex-answer div { display: grid; } .ex-answer b { font-family: var(--font-display); font-size: 24px; }
.ex-right-order { margin: 8px auto; max-width: 520px; padding-left: 26px; display: grid; gap: 4px; font-size: 16px; }
.ex-ox-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.ex-ox-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.ex-ox-list li b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #3D9B45; }
.ex-ox-list li.bad b { background: #D9474F; }
.ex-ox-list small { display: block; color: var(--muted); }
.ex-lesson { margin-top: 12px; padding: 12px 16px; border-radius: 14px; border: 2px dashed #E0A82E; background: #FFF8E6; }
[data-theme="dark"] .ex-lesson { background: #2E2818; }
.ex-lesson .lbl { font-size: 13px; font-weight: 800; color: #A06A00; }
.ex-lesson p { margin: 4px 0 0; font-size: 17px; line-height: 1.6; font-weight: 600; }

/* the timer */
.ex-timer { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); margin: 18px 0 12px; }
.ex-timer i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #45B8BF, #3D8B32); }
.ex-timer i.low { background: #D9474F; }
.ex-timer span { position: absolute; right: 0; top: -20px; font-size: 12px; color: var(--muted); }

/* the people */
.ex-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-players li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; }
.ex-players li.is-cur { background: #FFF4D6; box-shadow: inset 0 0 0 2px #E0A82E; }
[data-theme="dark"] .ex-players li.is-cur { background: #3A3018; }
.ex-score { display: grid; justify-items: end; line-height: 1.2; }
.ex-score b { color: #C98A00; font-size: 17px; } .ex-score small { color: var(--muted); font-size: 12px; }

/* the end: everyone's story book */
.ex-books { display: grid; gap: 12px; margin-top: 12px; }
.ex-book { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); animation: ex-pop .5s both; }
.ex-book:nth-child(2) { animation-delay: .15s; } .ex-book:nth-child(3) { animation-delay: .3s; } .ex-book:nth-child(4) { animation-delay: .45s; }
.ex-book-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ex-book-head .ex-score { margin-left: auto; }
.ex-crown { font-size: 22px; animation: ex-bounce 1s .8s both; }
.ex-book-stamps { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-bstamp { position: relative; display: grid; justify-items: center; width: 78px; gap: 2px; }
.ex-bstamp .ld-art { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #E0A82E; }
.ex-bstamp small { font-size: 11px; text-align: center; line-height: 1.2; word-break: keep-all; }
.ex-bstamp i { position: absolute; top: 36px; font-style: normal; color: #F5B700; font-size: 12px; text-shadow: 0 1px 0 #fff; }

/* confetti */
.ex-fx { position: fixed; inset: 0; pointer-events: none; z-index: 58; overflow: hidden; }
.cf { position: absolute; top: -12px; left: var(--x); width: var(--w); height: calc(var(--w) * 1.6); background: var(--c); border-radius: 2px; animation: cf-fall var(--t) var(--d) cubic-bezier(.25, .6, .5, 1) both; }
.cf.mid { top: 55%; animation-name: cf-burst; }
@keyframes cf-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(calc(var(--dx) * .4), 105vh) rotate(var(--r)); opacity: .9; } }
@keyframes cf-burst { 0% { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; } 40% { transform: translate(calc(var(--dx) * .5), -28vh) rotate(calc(var(--r) / 2)) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), 30vh) rotate(var(--r)); opacity: 0; } }

/* emblems */
.em { display: block; }
.em .e-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; } .em .e-thick { stroke-width: 4.5; }
.em .e-wood { fill: #A86B3C; } .em .e-wood2 { fill: #C98E55; } .em .e-roof { fill: #7A4A28; } .em .e-dark { fill: #3A2E25; }
.em .e-line.e-wood { stroke: #8A5530; fill: none; } .em .e-line.e-dark { stroke: #3A2E25; fill: none; }
.em .e-water { fill: #5AA9E6; } .em .e-white { fill: #fff; } .em .e-line.e-white { stroke: #fff; fill: none; }
.em .e-cord, .em .e-line.e-cord { stroke: #8A6A3A; fill: none; } .em .e-stone { fill: #A9A49A; } .em .e-stone2 { fill: #CFC9BC; }
.em .e-fish { fill: #6C8EBF; } .em .e-mane { fill: #C9822E; } .em .e-gold { fill: #F2C14E; } .em .e-gold2 { fill: #D9A12E; } .em .e-line.e-gold { stroke: #E0A82E; fill: none; }
.em .e-gem { fill: #D23F4A; } .em .e-gem2 { fill: #2E6BE6; } .em .e-leaf, .em .e-leaf path { fill: #5BA34A; } .em .e-stalk, .em .e-line.e-stalk { stroke: #B08A3A; fill: none; }
.em .e-fire { fill: #F28C28; } .em .e-fire2 { fill: #FFD23F; } .em .e-clay { fill: #C8794A; } .em .e-paper { fill: #F4E7C6; }
.em .e-cloth { fill: #8E6A4E; } .em .e-cloth2 { fill: #6E4F38; } .em .e-coat { fill: #D9474F; } .em .e-coat2 { fill: #2E6BE6; } .em .e-coat3 { fill: #F2C14E; }
.em .e-string { stroke: #E9DFC6; fill: none; } .em .e-star, .em .e-line.e-star { fill: #F5C518; stroke: #F5C518; } .em .e-night { fill: #1E2A4A; }
.em .e-donkey { fill: #9A8E80; } .em .e-red { fill: #D23F4A; } .em .e-line.e-red { stroke: #D23F4A; fill: none; }
.em .e-brick { fill: #C9774E; } .em .e-skin { fill: #E9B98F; } .em .e-r1 { stroke: #E5484D; } .em .e-r2 { stroke: #F5B700; } .em .e-r3 { stroke: #3D9B45; }
.em .e-bread { fill: #D9A25E; } .em .e-crust { stroke: #9A6A2E; } .em .e-wool { fill: #F4F1EA; stroke: #CFC9BC; stroke-width: 1; } .em .e-horn { fill: #E9D7B0; }
.em .e-metal { stroke: #7E8794; } .em .e-salt { fill: #EDEBE6; stroke: #BDB8AE; stroke-width: 1; } .em .e-fruit { fill: #D23F4A; } .em .e-letter { fill: #6A4A00; font: 700 20px var(--font-display); }
.s-fish { fill: #6C8EBF; } .s-mane { fill: #C9822E; }
.s-wind { fill: none; stroke: #FFFFFF; stroke-width: 2.5; opacity: .75; stroke-linecap: round; }
.s-ark { fill: #B98250; } .s-ark2 { fill: #8B5A33; } .s-trail { fill: none; stroke: #E0A82E; stroke-width: 3; stroke-dasharray: 2 5; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .ex-sky::before, .ex-sky::after, .ex-node.here .ex-dotimg, .ex-pawn.hop, .ex-art.slide, .ex-big.bounce, .ex-walk .ex-big, .ex-go, .ex-story, .ex-clue.new, .ex-try, .ex-opt, .ex-card, .ex-num, .ex-dots i.now,
  .ex-bubble.pop, .ex-verdict, .ex-stars.pop-in i.on, .ex-stamp, .ex-answer, .ex-book, .ex-crown { animation: none !important; }
  .ex-fx { display: none; }
}
.em .e-cloth3 { fill: #F1E6CF; } .em .e-cloth4 { stroke: #C9B48A; fill: none; } .em .e-skin2 { fill: #DDA97E; } .em .e-stew { fill: #B5502E; } .em .e-camel { fill: #C9A06A; }
.em .e-grape { fill: #7B4FA6; } .em .e-clay2 { fill: #A8603A; } .em .e-honey { fill: #F2B632; } .em .e-bee { fill: #F2C14E; stroke: #3A2E25; stroke-width: 1.5; }
.game-genre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: -4px 0 12px; font-size: 14px; color: var(--muted); }
.game-genre span { padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 700; }

/* voice chat: a button above the chat button (in its place in the waiting room) and a small panel of who is in the call */
.voice-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 41; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px var(--shade); }
.voice-fab.stack { bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 58px); }
.voice-fab.on { border-color: #3D9B45; background: #E8F6E6; color: #1E5A24; }
.voice-fab.on.muted { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); }
.voice-fab.talk { box-shadow: 0 0 0 4px rgba(61, 155, 69, .35), 0 8px 24px var(--shade); }
[data-theme="dark"] .voice-fab.on { background: #1D3A1F; color: #A8E0A0; }
.voice-dock { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 58px); z-index: 42; width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; padding: 12px 14px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 16px 48px var(--shade); display: grid; gap: 10px; }
.voice-dock.stack { bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 116px); }
.voice-head { display: flex; align-items: center; justify-content: space-between; }
.voice-head b { font-family: var(--font-display); font-size: 18px; }
.voice-err { margin: 0; padding: 8px 10px; border-radius: 10px; background: #FDE6E7; color: #9A2A31; font-size: 14px; }
[data-theme="dark"] .voice-err { background: #3E1F22; color: #F2A9AE; }
.voice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.voice-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; background: var(--surface-2); }
.voice-ava { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--lapis); color: #fff; font-weight: 800; transition: box-shadow .12s; }
.voice-row.talk .voice-ava { box-shadow: 0 0 0 3px #3D9B45, 0 0 12px rgba(61, 155, 69, .7); }
.voice-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.voice-name b { overflow-wrap: anywhere; }
.voice-name small { font-size: 12px; color: var(--muted); }
.voice-off { color: #B85A00 !important; } .voice-st.bad { color: #C0392B !important; }
.voice-ctl { display: flex; align-items: center; gap: 4px; }
.voice-ctl input { width: 72px; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-actions .btn { flex: 1 1 auto; }
.voice-dock .small { margin: 0; }

/* 성경 이야기 탐험: 짝 맞추기 */
.k-memory .ex-kind { background: #D9478F; color: #fff; }
.ex-mem-count { margin-left: auto; font-family: var(--font-body, inherit); font-size: 14px; color: var(--muted); }
.ex-mem-msg { margin: 0 0 10px; text-align: center; font-weight: 700; color: var(--muted); min-height: 1.6em; }
.ex-mem-msg.good { color: #2E7D32; animation: ex-bounce .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.ex-mem-msg.bad { color: #B23A3F; }
.ex-mems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 420px; margin: 0 auto; }
.ex-mems.c8 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 540px; }
.ex-mems.c10 { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 640px; }
@media (max-width: 520px) { .ex-mems.c10 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ex-mem { aspect-ratio: 3 / 4; max-width: 100%; display: grid; place-items: center; padding: 6px; border-radius: 16px; border: 3px solid #E9B7D1; background: linear-gradient(145deg, #F6A6CB, #B583CF); color: #fff; font: inherit; cursor: pointer; box-shadow: 0 5px 0 #C27FB0; transition: transform .12s; }
.ex-mem:not(:disabled):hover { transform: translateY(-3px) rotate(-1deg); }
.ex-mem:not(:disabled):active { transform: translateY(3px); }
.ex-mem-back { font-size: clamp(22px, 5vw, 34px); text-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.ex-mem.up { background: var(--surface); border-color: #E0A82E; color: var(--ink); box-shadow: 0 5px 0 #E0C27A; cursor: default; }
.ex-mem.flip { animation: ex-memflip .38s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes ex-memflip { 0% { transform: scaleX(0); } 100% { transform: none; } }
.ex-mem.done { border-color: #3D9B45; box-shadow: 0 5px 0 #8CCB8F, 0 0 0 4px rgba(61, 155, 69, .25); animation: ex-memdone .5s ease both; }
@keyframes ex-memdone { 50% { transform: scale(1.08); } }
.ex-mem.miss { border-color: #D9474F; animation: fx-shake .45s .1s ease; }
.ex-mem-face { display: grid; justify-items: center; gap: 4px; width: 100%; }
.ex-mem-face b { font-family: var(--font-display); font-size: clamp(14px, 3.6vw, 19px); text-align: center; word-break: keep-all; line-height: 1.2; }
.ex-mem-face .em { width: 72%; max-width: 64px; height: auto; aspect-ratio: 1; }
.ex-mem-face small { font-size: 11px; color: var(--muted); text-align: center; word-break: keep-all; }
.ex-pairs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0; }
.ex-pairs span { display: grid; justify-items: center; gap: 2px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.ex-pairs .em { width: 40px; height: 40px; }
.ex-pairs b { font-size: 13px; }
[data-theme="dark"] .ex-mem { border-color: #6A3C5A; box-shadow: 0 5px 0 #4A2A40; }
@media (prefers-reduced-motion: reduce) { .ex-mem.flip, .ex-mem.done, .ex-mem.miss, .ex-mem-msg.good { animation: none !important; } }

/* ---------- 첫째와 꼴찌 ---------- */
.lf-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "table log" "hand log"; gap: 16px; align-items: start; }
.lf-table { grid-area: table; display: grid; gap: 14px; }
.lf-hand { grid-area: hand; display: grid; gap: 10px; transition: box-shadow .2s; }
.lf-hand.turn { box-shadow: 0 0 0 3px var(--glow), 0 10px 30px var(--shade); }
.lf-log { grid-area: log; max-height: 70vh; overflow: auto; }
.lf-log ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.lf-log li.round { font-weight: 800; margin-top: 6px; } .lf-log li.good { color: var(--olive); }
@media (max-width: 900px) { .lf-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "table" "hand" "log"; } .lf-log { max-height: 240px; } }
.lf-seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lf-seat { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); border: 2px solid transparent; }
.lf-seat.cur { border-color: var(--glow); background: color-mix(in srgb, var(--glow) 14%, var(--surface)); }
.lf-seat.out { opacity: .7; }
.lf-seat .pdot { grid-row: span 2; }
.lf-name { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; min-width: 0; }
.lf-name b { overflow-wrap: anywhere; } .lf-name small { color: var(--muted); font-size: 11.5px; }
.lf-count { font-weight: 800; font-variant-numeric: tabular-nums; }
.lf-pts { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.lf-place { padding: 2px 8px; border-radius: 999px; background: var(--olive); color: #fff; font-size: 12px; }
.lf-was { position: absolute; top: -9px; left: 10px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.lf-was.first { background: #FFE9A8; color: #6A4A00; border-color: #E0A82E; } .lf-was.last { background: #E3EEFF; color: #1F4FB5; border-color: #9CB8F0; }
.lf-pass { position: absolute; right: 8px; top: -10px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 700; animation: ex-pop .3s both; }
.lf-pile { display: grid; justify-items: center; gap: 8px; min-height: 190px; padding: 14px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, #3D8B32 18%, var(--surface)), var(--surface-2)); text-align: center; align-content: center; }
.lf-pile.flash { animation: lf-flash 1.2s ease both; }
@keyframes lf-flash { 0% { background: #FFE27A; } 100% { background: var(--surface-2); } }
.lf-big { margin: 0; font-family: var(--font-display); font-size: 28px; }
.lf-big.bounce { animation: ex-bounce .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.lf-played { display: flex; justify-content: center; }
.lf-played .lf-card { margin-left: -18px; animation: lf-in .45s calc(var(--k, 0) * 70ms) cubic-bezier(.2, 1.4, .4, 1) both; }
.lf-played .lf-card:first-child { margin-left: 0; }
@keyframes lf-in { from { transform: translateY(70px) rotate(-12deg) scale(.6); opacity: 0; } to { transform: rotate(calc((var(--k, 0) - 1) * 4deg)); opacity: 1; } }
.lf-serve { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lf-serve li { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.lf-serve small { flex-basis: 100%; color: var(--muted); }
.lf-fly { display: inline-block; font-size: 22px; color: #B98250; animation: lf-fly 1.2s ease-in-out infinite alternate; }
@keyframes lf-fly { from { transform: translateX(-6px); } to { transform: translateX(8px); } }
.lf-res { border-collapse: collapse; min-width: min(100%, 360px); font-variant-numeric: tabular-nums; }
.lf-res th, .lf-res td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.lf-res tr.first td { background: color-mix(in srgb, #FFC53D 22%, transparent); font-weight: 700; }
.lf-res tr.last td { color: var(--muted); }
/* the cards */
.lf-hand-head { display: flex; align-items: baseline; gap: 8px; }
.lf-cards { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-card { --cc: #8A97A8; position: relative; width: 52px; height: 74px; flex: none; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 10px; border: 2px solid var(--cc); background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--cc) 18%, var(--surface))); color: var(--ink); font: inherit; box-shadow: 0 3px 0 color-mix(in srgb, var(--cc) 50%, transparent); padding: 0; }
.lf-card b { font-family: var(--font-display); font-size: 24px; line-height: 1; color: color-mix(in srgb, var(--cc) 75%, var(--ink)); }
.lf-card i { font-style: normal; font-size: 6px; letter-spacing: -1px; color: var(--cc); max-width: 44px; line-height: 1.1; word-break: break-all; text-align: center; }
.lf-card small { font-size: 9px; line-height: 1.1; font-weight: 700; }
.lf-card.n1 { --cc: #D9A400; } .lf-card.n2, .lf-card.n3 { --cc: #B583CF; } .lf-card.n4, .lf-card.n5 { --cc: #2E6BE6; } .lf-card.n6, .lf-card.n7 { --cc: #45B8BF; }
.lf-card.n8, .lf-card.n9 { --cc: #3D8B32; } .lf-card.n10, .lf-card.n11 { --cc: #E58F5F; } .lf-card.n12 { --cc: #8A97A8; }
.lf-card.wild { --cc: #D23F4A; background: linear-gradient(160deg, #FFE9A8, #F6A6CB); color: #6A1F2A; }
.lf-card.wild b { color: #D23F4A; }
.lf-cards.pick .lf-card { cursor: pointer; transition: transform .12s; }
.lf-cards.pick .lf-card:hover { transform: translateY(-4px); }
.lf-card.sel { transform: translateY(-12px); box-shadow: 0 0 0 3px var(--glow), 0 8px 14px var(--shade); }
.lf-cards.pick .lf-card.sel:hover { transform: translateY(-14px); }
.lf-why { margin: 0; color: var(--muted); font-size: 14px; } .lf-why.ok { color: var(--olive); font-weight: 700; }
.lf-hand .actions { justify-content: flex-start; }
@media (max-width: 480px) { .lf-card { width: 44px; height: 64px; } .lf-card b { font-size: 20px; } .lf-played .lf-card { margin-left: -14px; } }
@media (prefers-reduced-motion: reduce) { .lf-played .lf-card, .lf-fly, .lf-pile.flash, .lf-big.bounce, .lf-pass { animation: none !important; } }
.lf-pile p.small { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; margin: 0; }
@media (max-width: 520px) { .lf-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lf-seat { padding: 6px 8px; } .lf-pile { min-height: 150px; } }

/* 첫째와 꼴찌: cards with pictures, and the evening vineyard behind the table */
.lf-bg { position: fixed; inset: 0; z-index: -1; opacity: .75; }
.lf-bg .lf-bg-svg { width: 100%; height: 100%; display: block; }
[data-theme="dark"] .lf-bg { opacity: .18; }
.lf-bg ~ .topbar { background: transparent; }
.lf-bg ~ .lf-wrap .panel { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(3px); }
.lf-card { width: 60px; height: 88px; padding: 4px 3px; gap: 0; grid-template-rows: auto 1fr auto; }
.lf-card .lf-n { position: absolute; top: 2px; left: 5px; font-size: 16px; }
.lf-card .lf-n2 { position: absolute; bottom: 2px; right: 5px; font-size: 12px; transform: rotate(180deg); opacity: .7; }
.lf-card .em { width: 40px; height: 40px; grid-row: 2; align-self: center; margin-top: 8px; }
.lf-card small { grid-row: 3; font-size: 9.5px; font-weight: 700; color: color-mix(in srgb, var(--cc) 70%, var(--ink)); white-space: nowrap; letter-spacing: -.02em; margin-bottom: 9px; }
.lf-card i { display: none; }
.em .e-cloth4f { fill: #7A4A9A; } .em .e-silver { fill: #C9CED6; } .em .e-silver2 { fill: #9AA3B0; stroke: #9AA3B0; } .em .e-line.e-silver2 { fill: none; }
.em .e-metal2 { fill: #A9B4C2; } .em .e-dusk { fill: #F2B27A; } .em .e-hill { fill: #7DA163; } .em .e-line.e-clay2 { stroke: #A8603A; fill: none; }
@media (max-width: 480px) { .lf-card { width: 50px; height: 76px; } .lf-card .em { width: 32px; height: 32px; } .lf-card small { font-size: 8.5px; } .lf-card .lf-n { font-size: 14px; } }

/* ---------- 히스기야의 수로 ---------- */
/* behind the board: layers of rock under Jerusalem */
.tn-bg { position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, #CFE4F0 0, #E9D9B8 18%, #D9C29A 40%, #C9AE84 70%, #B89A72 100%); }
.tn-bg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(176deg, transparent 0 46px, rgba(120, 90, 50, .12) 46px 49px), repeating-linear-gradient(4deg, transparent 0 80px, rgba(255, 255, 255, .08) 80px 83px); }
[data-theme="dark"] .tn-bg { background: linear-gradient(180deg, #14213A 0, #2A2418 30%, #241E14 100%); }
.tn-bg ~ .topbar { background: transparent; }
.tn-bg ~ .tn-wrap .panel { background: color-mix(in srgb, var(--surface) 92%, transparent); }
.tn-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "main side" "hand side"; gap: 16px; align-items: start; }
.tn-main { grid-area: main; display: grid; gap: 10px; } .tn-wrap > .side { grid-area: side; } .tn-hand { grid-area: hand; display: grid; gap: 10px; }
.tn-hand.turn { box-shadow: 0 0 0 3px var(--glow), 0 10px 30px var(--shade); }
@media (max-width: 900px) { .tn-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "hand" "side"; } }
.tn-logp ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; max-height: 280px; overflow: auto; }
.tn-logp li.round { font-weight: 800; } .tn-logp li.good { color: var(--olive); }
/* my role */
.tn-role { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 2px solid; }
.tn-role.worker { border-color: #5AA9E6; background: color-mix(in srgb, #5AA9E6 14%, var(--surface)); }
.tn-role.spy { border-color: #A8343A; background: color-mix(in srgb, #D23F4A 12%, var(--surface)); }
.tn-role-ic { font-size: 30px; }
.tn-role div { display: grid; } .tn-role small { color: var(--muted); font-size: 12px; } .tn-role b { font-family: var(--font-display); font-size: 20px; } .tn-role span { font-size: 14px; }
.tn-turn { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tn-turn .small { margin-left: auto; }
.tn-banner { display: grid; justify-items: center; gap: 6px; padding: 14px; border-radius: 16px; text-align: center; background: var(--surface-2); }
.tn-banner b { font-family: var(--font-display); font-size: 24px; }
.tn-banner .bounce { animation: ex-bounce .8s cubic-bezier(.3, 1.6, .5, 1) both; }
.tn-banner.win { background: color-mix(in srgb, #5AA9E6 22%, var(--surface)); }
.tn-banner.lose { background: color-mix(in srgb, #D23F4A 16%, var(--surface)); }
.tn-banner.rock { background: color-mix(in srgb, #A9A49A 30%, var(--surface)); animation: fx-shake .45s ease; }
.tn-roles, .tn-rank { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tn-roles li, .tn-rank li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface); }
.tn-roles li.spy b { color: #A8343A; } .tn-roles li.worker b { color: #1F6FB5; }
/* the board */
.tn-board-wrap { overflow-x: auto; }
.tn-board { --cols: 10; display: grid; grid-template-columns: repeat(var(--cols), minmax(30px, 1fr)); gap: 3px; padding: 8px; border-radius: 16px; background: #8C6E4A; min-width: 330px; }
.tn-board .cell { aspect-ratio: 1; border-radius: 6px; background: #A88A63; border: 0; padding: 0; display: block; position: relative; overflow: hidden; }
.tn-board button.cell { cursor: pointer; }
.tn-board .cell.can { box-shadow: inset 0 0 0 3px #FFE27A; animation: tn-can 1.2s ease-in-out infinite alternate; }
.tn-board .cell.can.fall { box-shadow: inset 0 0 0 3px #FF8A8A; }
.tn-board .cell.other { box-shadow: inset 0 0 0 2px rgba(255, 226, 122, .45); }
@keyframes tn-can { to { box-shadow: inset 0 0 0 3px #FFF6C8; } }
.tn-board .cell.just { animation: tn-just .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes tn-just { from { transform: scale(.6); } to { transform: none; } }
.tn-piece { display: block; width: 100%; height: 100%; }
.tn-piece.ghost { opacity: .55; }
.tn-rock { fill: #9C7D58; } .tn-rock2 { fill: #7E6446; } .tn-ch { fill: #E2CDA2; } .tn-block { fill: #6E5A42; stroke: #4E3F31; stroke-width: 1.5; }
.tn-piece.wet .tn-ch { fill: #5AA9E6; }
.tn-flow { fill: none; stroke: #CDEBFF; stroke-width: 2.5; stroke-dasharray: 3 5; stroke-linecap: round; animation: tn-flow .9s linear infinite; }
@keyframes tn-flow { to { stroke-dashoffset: -16; } }
.tn-pool { fill: #5AA9E6; } .tn-drop { fill: #CDEBFF; } .tn-stone { fill: #B3A48C; } .tn-crack { fill: none; stroke: #5E4E3A; stroke-width: 1.5; }
.tn-q { fill: #F4E7C6; font: 700 18px var(--font-display); text-anchor: middle; }
.tn-sky { fill: #CFE4F0; } .tn-wall { fill: #E2D2B0; } .tn-wall2 { fill: #CDBB94; } .tn-dark { fill: #4E3F31; }
.tn-board .cell.city { box-shadow: 0 0 0 3px #5AA9E6, 0 0 18px rgba(90, 169, 230, .9); animation: tn-just .8s cubic-bezier(.3, 1.6, .5, 1) both; z-index: 1; }
.tn-board .cell.spring { box-shadow: 0 0 0 2px #5AA9E6; }
.tn-known { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); padding: 0 5px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.tn-known.city { background: #5AA9E6; color: #fff; } .tn-known.rock { background: #4E3F31; color: #F4E7C6; }
/* people */
.tn-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tn-people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.tn-people li.is-cur { background: color-mix(in srgb, var(--glow) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--glow); }
.tn-tools { display: inline-flex; gap: 2px; }
.tn-broken { position: relative; font-size: 16px; }
.tn-broken i { position: absolute; inset: -2px 0 0 4px; color: #D23F4A; font-style: normal; font-weight: 900; }
.tn-cnt { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tn-target { padding: 4px 10px; font-size: 13px; animation: ex-pop .3s both; }
/* my cards */
.tn-hand-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tn-warn { color: #A8343A; font-size: 13px; font-weight: 700; }
.tn-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-card { width: 74px; display: grid; justify-items: center; gap: 4px; padding: 6px 4px 7px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform .12s; }
.tn-card:disabled { cursor: default; }
.tn-card .tn-card-art { width: 50px; height: 50px; display: grid; place-items: center; position: relative; }
.tn-card .tn-card-art .tn-piece { border-radius: 6px; }
.tn-card small { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; }
.tn-card.break { border-color: #E39A9E; } .tn-card.fix { border-color: #8CCB8F; } .tn-card.fall { border-color: #B3A48C; } .tn-card.map { border-color: #9CB8F0; }
.tn-card.sel { transform: translateY(-8px); box-shadow: 0 0 0 3px var(--glow), 0 8px 14px var(--shade); }
.tn-card.cant { opacity: .55; }
.tn-ic { font-size: 30px; line-height: 1; }
.tn-x, .tn-ok { position: absolute; right: 2px; bottom: 0; font-weight: 900; font-size: 18px; }
.tn-x { color: #D23F4A; } .tn-ok { color: #3D8B32; }
.tn-why { margin: 0; color: var(--muted); font-size: 14px; }
.tn-hand .actions { justify-content: flex-start; }
@media (max-width: 480px) { .tn-card { width: 62px; } .tn-card .tn-card-art { width: 42px; height: 42px; } .tn-ic { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .tn-flow, .tn-board .cell.can, .tn-board .cell.just, .tn-board .cell.city, .tn-banner .bounce, .tn-banner.rock { animation: none !important; } }
.tn-board { min-width: 0; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
@media (max-width: 480px) { .tn-board { gap: 2px; padding: 5px; border-radius: 12px; } .tn-board .cell { border-radius: 4px; } .tn-role-ic { font-size: 24px; } }
