:root{--ink:#242239;--muted:#59576a;--paper:#f8f5eb;--white:#fffdf5;--yellow:#ffdb5b;--accent:#a4dfc4;--rule:#ccc7ba;--shadow:4px 5px 0 var(--ink);color-scheme:light;font-family:DM Sans,Apple SD Gothic Neo,Malgun Gothic,system-ui,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,input,summary{font:inherit;color:inherit}button,summary{cursor:pointer}button{border:0;background:none}button:disabled{cursor:default;opacity:.52}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #166fb5;outline-offset:3px}button,input,summary{touch-action:manipulation}input:not([type=range]){min-width:0;background:var(--white);border:1.5px solid var(--ink);border-radius:8px;padding:10px 12px;font-size:16px}figure,h1,h2,h3,p{margin:0}h1,h2,h3{line-height:1.08;letter-spacing:-.055em;word-break:keep-all}h1:focus{outline:none}.skip-link:not(:focus),.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link:focus{position:fixed;z-index:20;background:white;padding:14px}.app-shell{min-height:100svh;display:flex;flex-direction:column;padding:env(safe-area-inset-top) max(16px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px,env(safe-area-inset-left))}.app-shell[data-game=cup]{--accent:#ffaf80}.app-shell[data-game=bomb]{--accent:#ffa6b0}.app-shell[data-game=polygon]{--accent:#a4cabe}.app-shell main,.pwa-strip,.site-header{width:100%;max-width:1120px;margin-inline:auto}.app-shell main{flex:1}.add-options,.brand,.console-heading,.cup-picker-actions,.header-actions,.modal-heading,.play-controls,.pwa-strip,.pwa-strip>div,.saved-picker>div:first-child,.setup-heading,.site-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.site-header{min-height:66px;border-bottom:2px solid var(--ink)}.brand{padding:0;gap:8px;font-size:clamp(21px,3vw,31px);font-weight:950;letter-spacing:-.085em;font-style:italic}.brand svg{width:40px;height:40px}.brand-bang{color:#ce4a38}.header-actions{gap:5px}.back-button,.pwa-strip button,.quiet-button,.text-button{min-height:36px;padding:5px 9px;font-weight:750;font-size:13px}.icon-button,.sound-settings summary{width:37px;height:37px;border:1.5px solid var(--ink);border-radius:50%;display:grid;place-items:center;background:var(--white);list-style:none}.icon-button svg{width:19px}.sound-settings summary::-webkit-details-marker{display:none}.sound-settings{position:relative}.sound-settings>div{position:absolute;right:0;z-index:10;width:210px;padding:14px;border:2px solid var(--ink);border-radius:12px;box-shadow:var(--shadow);background:var(--white)}.sound-settings input{width:100%;accent-color:var(--ink)}.sound-settings label{display:flex;justify-content:space-between;font-size:14px;font-weight:800}.animal-fairness,.muted,.purpose-field p,.sound-settings p,.start-note{color:var(--muted);font-size:13px;line-height:1.5}.count-badge{border-radius:12px;background:#e8e3d7;padding:2px 7px;font-variant-numeric:tabular-nums}.arcade-library{padding:clamp(18px,4vw,48px) 0 33px}.library-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:20px;gap:12px}.library-heading h1{font-size:clamp(35px,5.4vw,70px);font-weight:950;letter-spacing:-.085em}.library-heading h1 span{color:#ee7057}.library-heading p{color:var(--muted);font-size:14px}.library-heading p strong{display:inline-block;background:var(--yellow);color:var(--ink);border:1.5px solid var(--ink);border-radius:20px;padding:4px 10px;margin-left:4px}.poster-wall{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:stretch}.poster{position:relative;display:flex;flex-direction:column;min-width:0;text-align:left;border:2px solid var(--ink);border-radius:14px;box-shadow:var(--shadow);overflow:hidden;padding:0;background:var(--white);isolation:isolate;transition:transform .15s,box-shadow .15s}.poster:enabled:hover{transform:translate(-2px,-2px);box-shadow:6px 7px var(--ink)}.poster:enabled:active{transform:translate(2px,2px);box-shadow:1px 2px var(--ink)}.poster-window{width:100%;aspect-ratio:1.65;overflow:hidden;flex:none;min-height:80px;border-bottom:2px solid var(--ink)}.poster-art{display:block;width:100%;height:100%;object-fit:cover}.poster-label{padding:12px 55px 12px 15px;position:relative}.card-en,.eyebrow,.poster-meta,.timing-header{font-family:IBM Plex Mono,ui-monospace,monospace;font-weight:800}.card-en,.eyebrow{font-size:10px;letter-spacing:.08em}.poster-label h2{margin:4px 0 3px;font-size:clamp(18px,2.25vw,30px)}.poster-meta{font-size:11px;color:var(--muted)}.poster-play{position:absolute;right:15px;top:50%;transform:translateY(-50%);height:32px;width:32px;display:grid;place-items:center;border:1.5px solid var(--ink);border-radius:50%;background:var(--white);font-weight:900}.button{display:inline-flex;justify-content:center;align-items:center;gap:10px;min-height:42px;padding:9px 15px;border:1.7px solid var(--ink);border-radius:9px;font-weight:850;line-height:1.2;font-size:14px}.primary{background:var(--yellow);box-shadow:2px 3px var(--ink)}.secondary{background:var(--white)}.dark{background:var(--ink);color:white}.button:enabled:active{transform:translateY(2px);box-shadow:none}.button:disabled{box-shadow:none}.full,.start-button{width:100%}.back-button{padding-left:0}.back-button:hover,.pwa-strip button:hover,.text-button:not(:disabled):hover{text-decoration:underline}.result-layout,.setup-layout{max-width:990px;margin:30px auto;display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:clamp(18px,5vw,68px);align-items:start}.animal-picker,.cup-picker,.participant-fields,.play-layout,.result-copy,.setup-form,.setup-intro{min-width:0}.setup-art{border:2px solid var(--ink);border-radius:14px;overflow:hidden;aspect-ratio:1.8;margin:8px 0 17px;box-shadow:var(--shadow)}.pick-marquee h1,.setup-intro h1{font-size:clamp(28px,4vw,45px);margin:5px 0 9px}.game-rule{line-height:1.6;word-break:keep-all;font-size:15px}.console-heading>span,.participant-count,.setup-time{display:inline-block;font-size:12px;border:1px solid var(--ink);background:var(--accent);padding:4px 9px;border-radius:20px;font-weight:800}.setup-time{margin-top:10px}.modal,.result-copy,.round-console,.setup-form{background:var(--white);border:2px solid var(--ink);border-radius:16px;box-shadow:var(--shadow);padding:clamp(16px,2.8vw,32px)}.setup-heading h2{font-size:clamp(21px,3vw,30px)}.setup-form>.muted{margin:8px 0 15px}.participant-fields{padding:0;margin:0;border:0}.setup-composer{scroll-margin-top:5px}.add-person-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}.add-options{margin:3px 0}.add-options .text-button{padding-left:0}.add-options span{font-size:11px;color:var(--muted)}.start-button{justify-content:space-between}.start-note{font-size:11px;margin:7px 0;text-align:right}.participant-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.legend-person,.participant-row{min-width:0;display:flex;align-items:center;gap:5px}.participant-row{padding:3px 4px;background:#f1eee4;border-radius:8px}.participant-row input{width:100%;padding:5px 1px;border:0;background:transparent}.cup-turn i,.legend-person i,.person-number,.timing-row i,.winner-name>span{flex:none;display:inline-grid;place-items:center;border:1.2px solid var(--ink);border-radius:50%;height:24px;width:24px;font-size:12px;color:#191828;font-weight:850;font-style:normal}.remove-person{padding:4px;min-width:24px;min-height:30px}.empty-roster{font-size:12px;border:1px dashed var(--rule);border-radius:9px;text-align:center;padding:15px;color:var(--muted)}.empty-roster>span{display:none}.purpose-field,.saved-picker{margin-top:14px;border-top:1px solid var(--rule);padding-top:10px}.saved-picker{margin-bottom:10px}.purpose-field label,.saved-picker>div:first-child{font-size:13px;font-weight:800}.purpose-field label span{font-size:11px;color:var(--muted)}.name-search,.purpose-field input{width:100%;margin:4px 0}.purpose-field p{font-size:11px}.name-chips{display:flex;flex-wrap:wrap;gap:6px}.name-chips button{border:1px solid var(--ink);border-radius:18px;background:#fff4c0;padding:6px 10px}.name-chips button span{margin-left:4px}.animal-picker,.cup-picker{max-width:780px;margin:18px auto 30px}.pick-marquee{display:flex;align-items:center;gap:18px;margin:5px 0 14px}.pick-cover{flex:none;width:105px;height:86px;border:2px solid var(--ink);border-radius:12px;overflow:hidden}.pick-marquee h1{margin-bottom:5px}.animal-picker-intro{font-size:13px}.animal-turn,.cup-turn{display:flex;gap:10px;align-items:center;background:var(--ink);color:white;padding:11px 15px;border-radius:10px}.cup-turn>div{display:grid}.cup-turn div span,.cup-turn.complete>span{font-size:11px;color:#dad7ec}.animal-turn>span,.cup-turn>b{margin-left:auto;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}.cup-turn i{color:var(--ink)}.animal-picker-actions,.cup-picker-actions{display:flex;gap:6px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:12px 0}.animal-picker-actions>div{margin-right:auto}.random-cups{margin:10px 0}.animal-choice-grid,.cup-choice-grid{display:grid;gap:8px}.cup-choice-grid{grid-template-columns:repeat(var(--cup-columns),minmax(0,1fr))}.animal-choice-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.animal-choice,.cup-choice{min-width:0;display:flex;flex-direction:column;align-items:center;border:1.5px solid var(--ink);border-radius:11px;background:var(--white);padding:8px 3px;box-shadow:2px 3px var(--ink)}.animal-choice:enabled:hover,.cup-choice:enabled:hover{background:#fff2ae}.animal-choice.claimed,.cup-choice.claimed{opacity:1;box-shadow:none;background:color-mix(in srgb,var(--cup-owner,var(--animal-owner)) 32%,var(--white))}.animal-choice>svg,.cup-choice>svg{width:100%;height:clamp(48px,8vw,88px);display:block}.animal-choice small,.animal-choice strong,.cup-choice strong{max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.animal-choice small,.cup-choice span{font-size:11px;line-height:1.45}.animal-fairness{margin-top:12px}.play-layout{max-width:950px;margin:18px auto}.play-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;gap:8px}.play-heading h1{font-size:clamp(24px,3.6vw,42px)}.play-heading .eyebrow{color:var(--muted);margin-bottom:3px}.play-controls{flex:none}.play-controls .button{min-height:35px}.play-container{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);align-items:start;gap:18px}.game-stage{position:relative;isolation:isolate;width:100%;max-width:calc((100svh - 174px) * 600 / 560);margin-inline:auto;overflow:hidden;aspect-ratio:600/560;border:2px solid var(--ink);border-radius:14px;box-shadow:var(--shadow);background:var(--accent)}.game-stage canvas{display:block;width:100%;height:100%}.round-console{padding:14px;max-height:calc(100svh - 170px);overflow:auto;scrollbar-width:thin}.console-heading{font-size:19px;font-weight:900}.console-heading>span{font-size:11px}.live-status,.race-commentary{margin:7px 0;padding:7px 9px;border-radius:6px;background:var(--accent);font-size:13px;font-weight:750}.participant-legend{display:grid;gap:3px}.legend-person{padding:6px 0;border-bottom:1px solid var(--rule);font-size:13px}.legend-person>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-person small{margin-left:auto;white-space:nowrap;font-size:10px}.legend-person.safe{color:var(--muted)}.legend-person.holding{font-weight:850;background:#ffdb8c}.reflection-toggle{margin:7px 0;font-size:12px}.reflection-toggle summary{padding:5px 0}.reflection-detail{background:var(--ink);color:white;padding:9px;border-radius:8px}.reflection-detail svg{width:72%;height:95px}.reflection-detail figcaption{display:grid}.mission-caption{margin:14px 0;font-size:13px}.countdown-overlay,.pause-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;background:#20203799;color:white;font-weight:800}.countdown-overlay strong{color:var(--yellow);font-size:clamp(64px,12vw,116px);line-height:.98;-webkit-text-stroke:2px var(--ink);text-shadow:4px 5px var(--ink)}.pause-overlay span{font-size:13px}.race-timing li,.timing-header,.timing-row{display:grid;align-items:center}.timing-header{grid-template-columns:auto 1fr auto;gap:5px;background:var(--ink);color:white;border-radius:4px;padding:6px;font-size:9px}.timing-header span:nth-child(2){text-align:center}.race-commentary{font-size:11px;margin:5px 0}.race-timing ol{padding:0;margin:0;list-style:none}.race-timing li{grid-template-columns:20px minmax(0,1fr);gap:4px;overflow:hidden;border-bottom:1px solid var(--rule)}.timing-row{grid-template-columns:18px 30px minmax(0,1fr) 20px 38px;gap:3px;min-height:37px;font-size:11px}.timing-row i{width:17px;height:17px;font-size:9px}.timing-animal{width:100%;height:27px}.timing-name,.timing-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.timing-name{font-weight:800}.timing-name small{display:block;font-weight:500;color:var(--muted)}.timing-change,.timing-gap{text-align:right;font-variant-numeric:tabular-nums}.up{color:#19714a}.down{color:#a43d30}@media (prefers-reduced-motion:no-preference){.race-timing[data-paused=false] .position-up .timing-row{animation:rise .2s ease-out}.race-timing[data-paused=false] .position-down .timing-row{animation:drop .2s ease-out}}@keyframes rise{0%{transform:translateY(32%)}}@keyframes drop{0%{transform:translateY(-32%)}}.result-layout{align-items:center;max-width:930px;gap:24px}.result-print{transform:rotate(-2deg);background:var(--white);padding:10px 10px 0;border:2px solid var(--ink);box-shadow:var(--shadow);text-align:center}.result-print canvas{display:block;width:100%;max-height:420px;object-fit:contain;background:var(--accent)}.result-print figcaption{font-size:12px;font-weight:750;padding:8px}.result-copy{background:var(--accent)}.result-copy h1{font-style:italic;font-size:clamp(24px,3.2vw,38px);font-weight:950;letter-spacing:-.09em}.result-game,.result-intro,.result-purpose{margin-top:10px;font-size:14px}.winner-name{display:flex;align-items:center;gap:9px;padding:16px 0 8px;font-size:clamp(38px,6vw,66px);line-height:1.1;overflow-wrap:anywhere}.winner-name span{width:35px;height:35px;font-size:18px}.result-animal{display:flex;align-items:center;font-size:13px}.result-animal svg{width:40px;height:38px}.result-purpose{font-weight:800}.result-actions{margin-top:18px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.result-actions .text-button{grid-column:1/-1}.result-actions .button{padding-inline:7px}.modal{width:min(420px,calc(100vw - 30px));max-height:80svh}.modal::backdrop{background:#201f3ba8}.modal-heading{margin-bottom:10px}.modal-heading h2{font-size:24px}.modal p{line-height:1.55}.install-steps,.saved-name-list{list-style:none;padding:0;max-height:42svh;overflow:auto}.install-steps li,.saved-name-list li{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--rule);font-size:14px}.install-steps li{align-items:start;flex-direction:column;gap:4px}.install-icon{font-size:27px}.danger{color:#a33527}.notice{display:flex;justify-content:space-between;align-items:center;border:1px solid #9e5837;background:#fff1c4;padding:10px;border-radius:8px;margin-top:8px}.pwa-strip{margin-top:24px;border-top:1px solid var(--rule);min-height:48px;padding:5px 0;color:var(--muted);font-size:12px}.offline-status{display:flex;align-items:center;gap:6px}.offline-status i{width:8px;height:8px;border:1px solid var(--ink);border-radius:50%;background:var(--yellow)}.offline-status.ready i{background:#75ce98}.error-page{max-width:500px;padding:30px;margin:10vh auto}.error-page>*{margin:10px 0}@media (max-width:760px){.poster-wall{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.poster-window{aspect-ratio:1.76;flex:none;min-height:56px}.poster-label{padding:8px 9px}.poster-play{width:23px;height:23px;right:8px;top:auto;bottom:6px;transform:none;font-size:12px}.poster-label h2{margin-block:3px}.library-heading{align-items:center;gap:6px;margin-bottom:14px}.library-heading p{font-size:11px}.library-heading p strong{margin:0;padding:3px 6px}.card-en{font-size:9px}.setup-layout{grid-template-columns:1fr;gap:14px;margin:12px auto;max-width:560px}.setup-art{float:right;width:100px;height:77px;margin:5px 0 5px 12px;box-shadow:2px 3px var(--ink)}.setup-intro .back-button{display:block}.setup-time{font-size:11px}.setup-intro .eyebrow{margin-top:6px}.game-rule{font-size:13px}.pick-cover{width:81px;height:67px}.pick-marquee{gap:10px}.animal-choice-grid,.cup-choice-grid{gap:5px}.animal-picker,.cup-picker{margin:9px auto 18px}.animal-picker-actions .button,.cup-picker-actions .button{font-size:12px;padding:7px 9px}.animal-picker-actions .text-button{font-size:12px;padding:4px}.animal-picker-actions{gap:5px}.animal-picker-actions>div{display:flex}.animal-choice small,.cup-choice span{font-size:10px}.result-layout{display:flex;flex-direction:column-reverse;margin:17px auto;gap:20px;max-width:490px}.result-copy{width:100%}.result-print{width:min(82%,340px)}.site-header{min-height:51px}.brand svg{width:30px;height:30px}.app-shell{padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}.play-layout{margin:8px auto}.play-heading{margin-bottom:8px}.play-heading h1{font-size:22px}.play-heading .eyebrow{font-size:9px}.play-controls .button,.play-controls .quiet-button{font-size:12px;padding:5px 8px}.pwa-strip{margin-top:16px}}@media (orientation:portrait) and (max-width:850px){.play-container{display:flex;flex-direction:column;gap:11px}.round-console{width:100%;max-height:none}.game-stage{max-width:calc((100svh - 136px) * 600 / 560)}.participant-legend{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px}}@media (orientation:landscape) and (max-height:700px){.site-header{min-height:41px}.brand{font-size:22px}.brand svg{width:29px;height:29px}.play-layout{margin:4px auto}.play-heading{height:36px;margin:0 0 4px}.play-heading h1{font-size:22px}.play-heading .eyebrow{display:none}.play-container{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(161px,1fr);gap:9px}.game-stage{max-width:calc((100svh - 99px) * 600 / 560)}.round-console{max-height:calc(100svh - 98px);padding:8px}.console-heading{font-size:16px}.timing-row{grid-template-columns:16px 20px minmax(0,1fr) 16px 29px;gap:2px}.setup-layout{display:grid;grid-template-columns:1fr 1.25fr;gap:15px}.setup-art{width:72px;height:58px}.live-status{margin:4px 0}.pwa-strip{margin-top:8px}}@media (max-width:375px){.library-heading{align-items:start;flex-direction:column}.add-options span{display:none}.header-actions{gap:3px}.header-actions .icon-button,.sound-settings summary{width:31px;height:31px}.saved-button{padding:4px 1px}.animal-picker-actions>div{width:100%}.pick-marquee h1{font-size:25px}.play-controls{gap:2px}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.turn-number{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;color:var(--ink);font-size:12px;font-style:normal;font-weight:900}.animal-turn,.cup-turn{position:sticky;top:0;z-index:2;margin-bottom:9px}.animal-picker-actions,.cup-picker-actions{position:sticky;bottom:env(safe-area-inset-bottom,0);z-index:3;background:var(--white);border:1.5px solid var(--ink);border-radius:10px;padding:8px;box-shadow:0 3px var(--ink)}.cup-picker-actions .random-cups{margin:0}@media (max-width:440px){.animal-picker-actions,.cup-picker-actions{display:grid;grid-template-columns:1fr 1fr;gap:4px}.animal-picker-actions>div,.cup-picker-actions>.text-button{grid-column:1/-1;grid-row:1;justify-content:space-between;min-height:28px}.animal-picker-actions>div{width:100%}.animal-picker-actions .button,.cup-picker-actions .button{min-height:38px}.cup-picker-actions>.text-button{text-align:left}}