:root{--wood: #7d5029;--felt: #a82a25;--ink: #23242a;--paper: #f6f4ef;--line: rgba(0, 0, 0, .1);--accent: #d9a400;--dim: rgba(0, 0, 0, .42);color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,Apple SD Gothic Neo,Pretendard,Noto Sans KR,Malgun Gothic,system-ui,sans-serif;font-variant-numeric:tabular-nums}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#16161a;color:#e8e6e1}body.screen #app{display:grid;grid-template-columns:minmax(280px,24vw) 1fr;height:100vh;gap:0}#sheet-panel{background:var(--paper);color:var(--ink);padding:12px;overflow-y:auto}#stage{position:relative;background:linear-gradient(160deg,#8a5a30,#6d451f);overflow:hidden}#three{position:absolute;inset:0;width:100%;height:100%;display:block}#sheet-panel{background:#d9d3c4;display:flex;align-items:flex-start}#sheet{width:100%;background:var(--paper);border:2px solid #24242a;border-radius:8px;overflow:hidden}.sheet{width:100%;border-collapse:collapse;font-size:clamp(12px,1.25vw,17px)}.sheet th,.sheet td{padding:.38em .55em;border-bottom:1px solid #24242a;border-right:1px solid #24242a;text-align:right}.sheet td:last-child,.sheet th:last-child{border-right:0}.sheet tbody tr:last-child th,.sheet tbody tr:last-child td{border-bottom:0}.sheet th[scope=row]{text-align:left;font-weight:500;white-space:nowrap;display:flex;align-items:center;gap:.45em}.pip-icon{width:1.35em;height:1.35em;flex:0 0 auto;color:var(--paper)}.pip-body{fill:#24242a}.sheet thead th{border-bottom:2px solid #24242a;font-size:.95em;text-align:center;padding-bottom:.4em;vertical-align:bottom}.sheet thead th.turn{text-align:left;font-weight:500;opacity:.75;line-height:1.1}.sheet thead th.turn b{display:block;font-size:1.9em;opacity:1;letter-spacing:-.02em;font-weight:400}.who{display:block;width:2em;height:2em;margin:0 auto .2em;border-radius:50%;border:1.5px solid #24242a;background:#fff;line-height:1.85em;font-size:.95em;font-weight:700}.who[data-seat="0"]{background:#f6d79a}.who[data-seat="1"]{background:#a9d6e8}.who[data-seat="2"]{background:#c6e0a8}.who[data-seat="3"]{background:#e8b6c8}.who-name{display:block;font-size:.82em;font-weight:600;max-width:6em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 auto}.sheet thead th.active,.sheet td.turn{background:#fae9a0}.sheet td.fixed{font-weight:700;font-size:1.1em}.sheet td.preview{color:#9c9689;font-style:italic;font-weight:400}.sheet td.preview.turn{color:#8a7226}.sheet tr.section th{background:#4a4a52;color:var(--paper);text-align:left;font-size:.85em;letter-spacing:.05em;padding:.32em .5em;font-weight:700}.sheet tr.subtotal td,.sheet tr.subtotal th{background:#4a4a52;color:var(--paper);font-weight:700;font-size:.92em}.sheet tr.subtotal td.turn{background:#6a6a72}.sheet tr.subtotal.bonus-row th{border-bottom:0}.sheet tr.bonus th{background:#efeadd;font-weight:400;font-size:.8em;color:#6b6559;text-align:left;white-space:normal;line-height:1.35;display:table-cell}.sheet tr.total td,.sheet tr.total th{background:#24242a;color:#fff;font-weight:800;font-size:1.2em}.sheet tr.total td.turn{background:#3c3c46;color:#ffe58a}#rolls-left,#status,#hint,#hand,#edges{position:absolute;pointer-events:none;user-select:none}#rolls-left{top:16px;right:20px;display:flex;align-items:center;gap:8px;color:#fff;font-size:clamp(15px,1.7vw,24px);font-weight:700;letter-spacing:-.01em;text-shadow:0 2px 7px rgba(0,0,0,.55)}#rolls-left b{font-size:1.35em;margin-right:1px}.pip-die{width:1.15em;height:1.15em;border-radius:.24em;background:#fff;box-shadow:0 2px 5px #0006;position:relative}.pip-die:before,.pip-die:after{content:"";position:absolute;width:.2em;height:.2em;border-radius:50%;background:#2c3128}.pip-die:before{top:.22em;left:.22em}.pip-die:after{bottom:.22em;right:.22em}#status{top:calc(16px + 2.4em);right:20px;color:#fff;font-size:clamp(11px,1.1vw,14px);opacity:.72;text-shadow:0 2px 6px rgba(0,0,0,.6)}#hint{bottom:26px;left:50%;transform:translate(-50%);color:#fff;font-size:clamp(13px,1.35vw,19px);font-weight:600;padding:7px 18px;border-radius:999px;background:#140e086b;backdrop-filter:blur(3px);text-shadow:0 1px 4px rgba(0,0,0,.5)}#edges{inset:0}#edges .edge{position:absolute;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.65)}#edges .left{left:14px}#edges .right{right:14px}#edges .chev{font-size:clamp(26px,3vw,44px);line-height:.8;color:#f2c744;animation:chev-nudge 1.5s ease-in-out infinite}#edges .left .chev{animation-name:chev-nudge-left}#edges .label{font-size:clamp(11px,1.05vw,15px);font-weight:700}#edges.no-reroll .right{opacity:.3}#edges.no-reroll .right .chev{animation:none}@keyframes chev-nudge{0%,to{transform:translate(0)}50%{transform:translate(5px)}}@keyframes chev-nudge-left{0%,to{transform:translate(0)}50%{transform:translate(-5px)}}#hand{top:34%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:clamp(30px,4.6vw,72px);font-weight:800;letter-spacing:0;white-space:nowrap;-webkit-text-stroke:.055em #000;paint-order:stroke fill;text-shadow:0 .014em 0 #000}#hand.in{animation:hand-pop .2s cubic-bezier(.2,.9,.3,1.06) both,hand-fade-in 93ms linear both}#hand.out{animation:hand-fade-out .06s linear both}@keyframes hand-pop{0%{transform:translate(-50%,-50%) scale(4.7)}70%{transform:translate(-50%,-50%) scale(.86)}to{transform:translate(-50%,-50%) scale(1)}}@keyframes hand-fade-in{0%{opacity:0}to{opacity:1}}@keyframes hand-fade-out{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){#edges .chev,#hand.in,#hand.out{animation:none}}.die-cursor{position:absolute;left:var(--x);top:var(--y);width:var(--box);height:var(--box);transform:translate(-50%,-50%);pointer-events:none;--hue: #ffe81f}.die-cursor.unkeep{--hue: #ff6b3d}.die-cursor-frame{position:absolute;inset:0}.die-cursor .corner{position:absolute;width:var(--arm);height:var(--arm);border:0 solid var(--hue);filter:drop-shadow(0 0 1.5px rgba(0,0,0,.85)) drop-shadow(0 0 1.5px rgba(0,0,0,.85))}.die-cursor .tl{top:0;left:0;border-top-width:var(--stroke);border-left-width:var(--stroke);border-top-left-radius:calc(var(--stroke) * .6)}.die-cursor .tr{top:0;right:0;border-top-width:var(--stroke);border-right-width:var(--stroke);border-top-right-radius:calc(var(--stroke) * .6)}.die-cursor .bl{bottom:0;left:0;border-bottom-width:var(--stroke);border-left-width:var(--stroke);border-bottom-left-radius:calc(var(--stroke) * .6)}.die-cursor .br{bottom:0;right:0;border-bottom-width:var(--stroke);border-right-width:var(--stroke);border-bottom-right-radius:calc(var(--stroke) * .6)}.die-cursor-bubble{position:absolute;left:50%;bottom:calc(100% + .62em);transform:translate(-50%);white-space:nowrap;padding:.3em .85em;border-radius:999px;background:#1c1412db;color:#fdf7f6;font-size:clamp(12px,1.15vw,17px);font-weight:700;letter-spacing:-.01em}.die-cursor.unkeep .die-cursor-bubble{background:#bf420aeb}.die-cursor-bubble:after{content:"";position:absolute;left:50%;top:100%;transform:translate(-50%);border:.42em solid transparent;border-top:.62em solid rgba(28,20,18,.86)}.die-cursor.unkeep .die-cursor-bubble:after{border-top-color:#bf420aeb}#edges .edge{opacity:.6;transition:opacity 90ms ease-out,transform 90ms ease-out}#edges .edge.hot{opacity:1}#edges .left.hot,#edges .right.hot{transform:translateY(-50%) scale(1.12)}#edges .edge.here .label{background:var(--hue, #ffe81f);color:#2a2418;padding:2px 9px;border-radius:999px;text-shadow:none}.sheet tr.cursor th[scope=row],.sheet tr.cursor td{background:#e8c41a;color:#2a2418;font-weight:700}.sheet tr.cursor th[scope=row]{position:relative;padding-left:1.5em}.sheet tr.cursor td.preview{color:#6b4f00;outline:2px dashed #2f8d90;outline-offset:2px;animation:pick-breathe .63s ease-in-out infinite alternate}.sheet tr.cursor td.preview.zero{background:#f26203;color:#fff}@keyframes pick-breathe{0%{outline-offset:2px}to{outline-offset:6px}}.sheet tr.cursor th[scope=row]:before{content:"▶";position:absolute;left:.3em;color:#7a5c00;animation:hand-poke .63s ease-in-out infinite alternate}@keyframes hand-poke{0%{transform:translate(-.42em)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet tr.cursor td.preview,.sheet tr.cursor th[scope=row]:before{animation:none}}.lobby-actions{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:14px}.lobby-actions button.ghost{background:transparent;border:1px solid rgba(255,255,255,.35);color:#ffffffd9;font-weight:600}.lobby-actions button.ghost:hover{background:#ffffff1a}#lobby{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(6px,1.4vh,14px);padding:16px;overflow-y:auto;background:#141210db;backdrop-filter:blur(3px)}#lobby h1{margin:0;font-size:clamp(22px,min(4vw,5.5vh),54px);letter-spacing:-.02em}#lobby .hint{margin:0;opacity:.7;font-size:clamp(13px,1.3vw,17px)}#qr{width:min(320px,30vw,38vh);height:auto;border-radius:10px;background:#fff;padding:10px}#room-code{font-size:clamp(24px,min(4.5vw,6vh),60px);font-weight:800;letter-spacing:.22em;text-indent:.22em;color:var(--accent)}#players{list-style:none;display:flex;gap:10px;padding:0;margin:0;flex-wrap:wrap;justify-content:center;min-height:3.2em;align-items:center}#players li{display:flex;align-items:center;gap:9px;padding:9px 18px 9px 14px;border-radius:99px;background:#ffffff24;font-size:clamp(14px,1.5vw,21px);font-weight:600;animation:player-in .25s cubic-bezier(.2,.9,.3,1.05) both}#players li .dot{width:.72em;height:.72em;border-radius:50%;flex:none}#players li[data-seat="0"] .dot{background:#f2c744}#players li[data-seat="1"] .dot{background:#4ea9e8}#players li[data-seat="2"] .dot{background:#57c96b}#players li[data-seat="3"] .dot{background:#f08fc0}#players li.off{opacity:.4}#players li .tag{font-size:.72em;font-weight:500;opacity:.8}#players li.empty{background:none;opacity:.5;font-weight:400;animation:none}#players li.empty .dot{display:none}@keyframes player-in{0%{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){#players li{animation:none}}#start{margin-top:6px;padding:13px 40px;font-size:clamp(15px,1.5vw,20px);font-weight:700;border:none;border-radius:99px;background:var(--accent);color:#23242a;cursor:pointer;font-family:inherit}#start:disabled{opacity:.35;cursor:default}#qr-mini{position:absolute;right:14px;bottom:14px;background:#fff;padding:6px;border-radius:8px;display:flex;flex-direction:column;align-items:center;gap:2px;box-shadow:0 4px 14px #0006}#qr-mini canvas{width:74px;height:74px;display:block}#room-code-mini{color:#23242a;font-size:11px;font-weight:800;letter-spacing:.12em}#result{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#141210eb}#result h2{font-size:clamp(26px,4vw,52px);margin:0}#result-body{font-size:clamp(14px,1.6vw,20px);display:flex;flex-direction:column;gap:6px;align-items:center}.proof{font-size:11px;opacity:.45;max-width:60ch;text-align:center;line-height:1.5;font-family:ui-monospace,Menlo,monospace;word-break:break-all}[hidden]{display:none!important}body.controller{background:#f7f6f2;color:var(--ink);overflow:hidden;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}body.controller #app{height:100dvh;display:flex;flex-direction:column;padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom));gap:12px}.c-turn{text-align:center;font-size:13px;opacity:.6;letter-spacing:.03em;margin:0}.c-name{text-align:center;font-size:17px;font-weight:700;margin:0}.c-dice{display:flex;gap:8px;justify-content:center}.die{width:17vw;max-width:62px;aspect-ratio:1;border-radius:12px;background:#fff;border:2px solid #d8d3c8;position:relative;padding:0;cursor:pointer;font-family:inherit;transition:transform .09s,border-color .09s}.die:active{transform:scale(.94)}.die.kept{border-color:var(--accent);background:#fffaea;box-shadow:0 0 0 3px #d9a40047}.die .pip{position:absolute;width:14%;aspect-ratio:1;border-radius:50%;background:#2f4f2f;transform:translate(-50%,-50%)}.die .tag{position:absolute;left:50%;bottom:-9px;transform:translate(-50%);font-size:10px;font-weight:800;color:#8a6a00;background:var(--accent);border-radius:99px;padding:1px 7px}.c-roll{padding:20px;border:none;border-radius:18px;background:var(--ink);color:#fff;font-size:19px;font-weight:800;font-family:inherit;cursor:pointer}.c-roll:active{transform:scale(.98)}.c-shake{flex:1;border:2px dashed #c8c2b4;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#7a7365;min-height:110px}.c-picks{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:5px;-webkit-overflow-scrolling:touch}.pick{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border:none;border-radius:11px;background:#ece9e1;font-size:15px;font-family:inherit;color:var(--ink);cursor:pointer}.pick.best{background:#d8f0e0;font-weight:700}.pick.zero{opacity:.45}.pick b{font-variant-numeric:tabular-nums}.c-wait{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;opacity:.55;font-size:15px;line-height:1.6}.c-join{flex:1;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}.c-join input{font-size:17px;padding:13px 16px;border-radius:12px;border:2px solid #d8d3c8;font-family:inherit;width:min(280px,80vw);text-align:center}.c-err{color:#b3392c;font-size:13px;text-align:center;min-height:1.2em}.c-auto{padding:12px;border:2px solid var(--ink);border-radius:14px;background:transparent;color:var(--ink);font-size:14px;font-weight:700;font-family:inherit;cursor:pointer}.c-auto.on{background:var(--accent);border-color:var(--accent)}#announce{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:3}.announce-card{text-align:center;padding:18px 44px;border-radius:18px;background:#141210c7;backdrop-filter:blur(6px);box-shadow:0 12px 40px #00000080}.announce-card.celebrate{background:#d9a400eb;color:#23242a}.announce-title{font-size:clamp(28px,4.4vw,62px);font-weight:800;letter-spacing:-.02em;text-shadow:0 3px 10px rgba(0,0,0,.4)}.announce-card.celebrate .announce-title{text-shadow:none}.announce-score{font-size:clamp(15px,1.8vw,24px);font-weight:700;opacity:.85;margin-top:2px}#announce.in .announce-card{animation:announce-pop .42s cubic-bezier(.16,1.4,.5,1)}@keyframes announce-pop{0%{transform:scale(.6) translateY(14px);opacity:0}60%{transform:scale(1.06);opacity:1}to{transform:scale(1);opacity:1}}#confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}.sheet td.just-filled{animation:cell-flash 1.1s ease-out}@keyframes cell-flash{0%{background:var(--accent);transform:scale(1.25)}to{background:transparent;transform:scale(1)}}.sheet tr.bonus-row td.got{color:#ffd94a;font-weight:800}.sheet tr.bonus-row td.got.turn{color:#fff3bf}#logo{width:clamp(44px,min(7vw,9vh),104px);height:auto;border-radius:22%;box-shadow:0 6px 18px #00000073;margin-bottom:10px}#sound{position:absolute;top:16px;left:16px;z-index:6;display:flex;align-items:center;gap:7px;padding:7px 13px 7px 10px;border:0;border-radius:999px;background:#140e0880;color:#fff;font:inherit;font-size:clamp(11px,1.05vw,15px);font-weight:600;cursor:pointer;backdrop-filter:blur(3px);transition:opacity .2s ease-out}#sound .ico{width:1.1em;height:1.1em;flex:0 0 auto;background:currentColor;clip-path:polygon(0 35%,28% 35%,58% 8%,58% 92%,28% 65%,0 65%)}#sound.needs-tap{background:#f2c744;color:#2a2418;animation:sound-pulse 1.6s ease-in-out infinite}@keyframes sound-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.06)}}#sound.on{opacity:.32}#sound.on:hover{opacity:1}#sound.off .ico,#sound.muted .ico{position:relative}#sound.muted{opacity:.55}#sound.muted .txt:after,#sound.off .txt:after{content:""}@media(prefers-reduced-motion:reduce){#sound.needs-tap{animation:none}}.c-shake{display:flex;align-items:center;gap:10px;margin:10px 0 6px;font-size:14px;opacity:.75}.c-shake-bar{--level: 0;flex:1;height:8px;border-radius:4px;background:#0000001f;overflow:hidden;position:relative}.c-shake-bar:after{content:"";position:absolute;inset:0 auto 0 0;width:calc(var(--level) * 100%);background:#d8a018;border-radius:4px;transition:width .1s linear}.c-note{margin:10px 0;padding:10px 12px;border-radius:8px;background:#0000000f;font-size:13px;line-height:1.5;opacity:.8}
