:root{font-family:Thai,Latin,system-ui,-apple-system,sans-serif;color-scheme:dark;--red:#ae0909;--white:#f9eee5;--muted:#b7a9a5;background:#130303;color:var(--white)}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:radial-gradient(ellipse,#320908,#120303 70%);-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit}button:focus-visible{outline:3px solid #fff3b8;outline-offset:4px}button:disabled{cursor:default;opacity:.55}button[hidden],[hidden]{display:none!important}.icon-library{position:absolute;width:0;height:0;overflow:hidden}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;padding:0!important;border:0!important;margin:-1px!important}.game{height:100dvh;width:100%;position:relative;overflow:hidden;margin:0 auto;isolation:isolate;user-select:none;-webkit-user-select:none}.table-backdrop{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 17%,#1d0000 3%,#600000 50%,#930606 85%);z-index:-2}.scene{position:absolute;inset:0;z-index:0}.scene canvas{display:block;width:100%;height:100%}.game-header{position:absolute;top:0;left:0;right:0;z-index:5;padding:max(17px,env(safe-area-inset-top)) 18px 0;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}.game-header>button{pointer-events:auto}.header-dice,.header-gear{width:47px;height:47px;background:transparent;border:none;padding:0;display:grid;place-items:center;position:relative;color:#b9babb;filter:drop-shadow(0 2px 2px #0009)}.header-dice svg{width:36px;height:36px;stroke-width:1.9;fill:#a5a8ac22;transform:rotate(-8deg)}.header-dice span{position:absolute;bottom:-1px;right:0;font:10px Latin;background:#780907;color:#fff;border:1px solid #bc666166;border-radius:50%;width:17px;height:17px;display:grid;place-items:center}.header-gear svg{width:35px;height:35px;stroke-width:1.9;fill:#b9babb55}.open-control{background:transparent;border:0;padding:0;margin-top:24px;min-width:118px;display:flex;flex-direction:column;align-items:center;gap:3px;filter:drop-shadow(0 2px 3px #0008)}.open-tiles{display:flex;gap:3px}.open-tiles b{font-size:25px;font-weight:400;line-height:1.2;background:linear-gradient(#de2222,#aa0000 58%,#7e0000);border:1px solid #ffaaa4;border-radius:6px;padding:3px 6px 4px;box-shadow:inset 0 0 0 2px #c20d0d,0 0 0 1px #720000,0 0 8px #df16161a;text-shadow:0 1px 1px #2f0000;color:#fff4e9}.open-control small{font:9px/1.3 Latin,sans-serif;color:#d5d5d3;letter-spacing:.7px}.open-control:active:not(:disabled){transform:translateY(1px)}.touch-surface{position:absolute;inset:105px 0 76px;z-index:2;touch-action:none}.cup-touch{display:block;width:100%;height:100%;background:none;border:none;touch-action:none;cursor:grab}.cup-touch:active{cursor:grabbing}.cup-touch:focus-visible{outline-offset:-8px;border-radius:12px}.play-footer{position:absolute;z-index:5;bottom:max(20px,env(safe-area-inset-bottom));left:20px;right:20px;display:flex;justify-content:space-between;align-items:center;gap:16px;pointer-events:none}.play-footer button{pointer-events:auto;background:#12010155;border:1px solid #ffffff15;border-radius:30px;min-height:40px;display:flex;align-items:center;justify-content:center;gap:7px;color:#f1ddddb3;box-shadow:0 2px 10px #0002}.motion-shortcut{font-size:10px;padding:7px 12px}.motion-shortcut svg{width:17px;height:17px}.motion-shortcut.active{border-color:#d87c7066;color:#fff0e6}.shake-control{padding:8px 16px;font-size:12px;min-width:90px}.shake-control svg{width:19px;height:19px}.play-footer button:active:not(:disabled){background:#610603b3;color:#fff}.gesture-hint{position:absolute;left:0;right:0;bottom:max(68px,calc(env(safe-area-inset-bottom) + 46px));text-align:center;color:#eee1d977;font-size:10px;letter-spacing:.1px;pointer-events:none;z-index:4;text-shadow:0 1px 3px #000;transition:opacity .3s}.game[data-phase=shaking] .gesture-hint,.game[data-phase=settling] .gesture-hint{color:#eee1d9c9}dialog{border:1px solid #6f343044;border-radius:26px;padding:30px 25px 25px;background:linear-gradient(145deg,#242020,#161414);color:#f5eee9;width:calc(100% - 30px);max-width:430px;max-height:calc(100dvh - 50px);overflow-y:auto;box-shadow:0 20px 90px #000a}dialog::backdrop{background:#080000c9;backdrop-filter:blur(8px)}.dialog-close{position:absolute;right:12px;top:10px;border:0;width:38px;height:38px;font:30px Latin;background:none;color:#c9bdb6}.dialog-eyebrow{font:9px Latin;letter-spacing:2.5px;color:#bc8279;margin:2px 0 7px}h1{font-size:25px;margin:0 0 25px;font-weight:700}.settings-label{display:flex;align-items:center;justify-content:space-between;font-size:12px}.settings-label>span:last-child{font-size:10px;color:#b0a19a}.count-selector{display:flex;gap:6px;margin-top:10px}.count-option{height:40px;min-width:0;flex:1;border-radius:8px;background:#353030;border:1px solid #4a4240;font:14px Latin;color:#e2d6cf;padding:0}.count-option[aria-pressed=true]{background:linear-gradient(#b31a15,#7e0a08);border-color:#ce746a;color:white;box-shadow:inset 0 1px 0 #e0a49b33}.settings-note{font-size:10px;color:#aa9890;line-height:1.7;margin:9px 0 17px}.setting-toggle{width:100%;padding:12px 0;background:none;border:0;border-top:1px solid #ffffff0c;display:flex;gap:10px;align-items:center;font-size:12px;text-align:left}.setting-toggle svg{width:20px;height:20px;color:#a28d86}.toggle-track{margin-left:auto;flex:none;width:35px;height:21px;border-radius:20px;background:#50423e;padding:3px}.toggle-track i{display:block;width:15px;height:15px;border-radius:50%;background:#ddd2ca;transition:transform .15s}.setting-toggle[aria-pressed=true] .toggle-track{background:#a61410}.setting-toggle[aria-pressed=true] .toggle-track i{transform:translateX(14px);background:#fff0e6}.guide{border-top:1px solid #ffffff10;padding-top:16px;margin-top:8px}h2{font-size:13px;margin:0 0 7px}.guide p{font-size:12px;color:#c4b8af;line-height:1.95;margin:0 0 17px}.about-note{font-size:9px;line-height:1.8;color:#978982;margin:0 0 22px}.done-control{width:100%;min-height:47px;border:1px solid #d1705e55;border-radius:12px;background:linear-gradient(#a91913,#7b0b07);color:#fff0e4;font-size:13px;box-shadow:0 3px 0 #4b0704}.toast{position:fixed;z-index:50;left:50%;bottom:max(100px,calc(env(safe-area-inset-bottom) + 75px));transform:translateX(-50%);max-width:calc(100% - 35px);width:max-content;background:#241815f2;border:1px solid #ac675d55;box-shadow:0 4px 25px #0005;border-radius:13px;padding:12px 17px;text-align:center;font-size:12px;color:#ffeadf}.webgl-error{position:absolute;left:10%;right:10%;top:40%;padding:20px;border:1px solid #fff5;border-radius:20px;text-align:center;font-size:14px;color:#ffeadf;background:#251717}
@media(min-width:700px){.game{width:min(560px,calc(100dvh * .49));box-shadow:0 0 70px #0009}.game-header{padding-top:18px}.open-control{margin-top:25px}}
@media(max-height:670px){.open-control{margin-top:12px}.open-tiles b{font-size:22px}.game-header{padding-top:max(12px,env(safe-area-inset-top))}.gesture-hint{bottom:65px}.play-footer{bottom:max(14px,env(safe-area-inset-bottom))}dialog{padding-top:25px}.guide{padding-top:10px}.guide p{line-height:1.7}h1{margin-bottom:18px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.version-row{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px;font-size:11px;color:#c9b8ac}.version-row button{font-size:11px;padding:7px 10px;background:#ffffff0a;border:1px solid #ffffff25;border-radius:7px;color:#f2d8c9}

.game[data-phase=revealed] .gesture-hint{opacity:0}

.style-shortcut{position:absolute;top:max(103px,calc(env(safe-area-inset-top) + 85px));left:50%;transform:translateX(-50%);z-index:6;display:flex;align-items:center;gap:8px;max-width:calc(100% - 44px);border:1px solid #e6bf7240;border-radius:22px;background:#180c09bd;padding:7px 13px;color:#e9d4ad;font-size:11px;white-space:nowrap;box-shadow:0 3px 15px #0003}.style-shortcut:active{background:#47251d}.mini-cup{width:12px;height:17px;display:block;border-radius:3px 3px 2px 2px;background:linear-gradient(90deg,#606269,#dad5bf 45%,#55565c);border-top:3px solid #d6a64b;border-bottom:2px solid #151518}.cup-style-settings{margin-bottom:21px}.cup-style-selector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:11px}.cup-style-option{display:flex;flex-direction:column;align-items:center;gap:4px;padding:11px 4px 8px;min-width:0;background:#302927;border:1px solid #5c484040;border-radius:12px;color:#d6c8bc}.cup-style-option[aria-pressed=true]{background:linear-gradient(150deg,#57402a,#31251d);border-color:#c69854;box-shadow:inset 0 0 0 1px #e0ba6525;color:#fff0cd}.cup-style-option[aria-pressed=true] .style-name:before{content:'✓ ';color:#efcf80}.style-name{font-size:11px;white-space:nowrap}.cup-style-option small{font:8px/1.4 Latin,system-ui,sans-serif;letter-spacing:.15px;color:#b7a99e}.style-swatch{width:42px;height:51px;display:block;border-radius:7px 7px 5px 5px;background-color:#272627;background-image:linear-gradient(90deg,#0008,transparent 40%,#fff2 55%,#0008),var(--cup-texture,none);background-size:auto,auto 100%;background-position:center;border-top:6px solid #d5a653;border-bottom:3px solid #121214;box-shadow:0 2px 6px #0007,inset 0 1px 0 #ffe0a766}.style-royal-blue{background-color:#193887}.style-dark-checker{background-color:#61523d}.style-gold-crackle{background-color:#584329}.style-silver-dragon{background-color:#a5a29b}.style-black-onyx{background-color:#24262a}
@media(max-height:670px){.style-shortcut{top:87px;padding:5px 11px;font-size:10px}.touch-surface{top:122px}.cup-style-selector{gap:6px}.cup-style-option{padding:7px 3px}.style-swatch{height:43px;width:36px}}
@media(min-width:700px){.style-shortcut{top:106px}}
@media(min-width:700px){.game{width:min(560px,max(320px,calc(100dvh * .49)))}}
@media(orientation:landscape) and (max-height:500px){.game-header{padding-top:10px}.open-control{margin-top:0}.open-tiles b{font-size:20px}.style-shortcut{top:78px;padding:4px 10px;font-size:10px}.touch-surface{inset:110px 0 67px}.play-footer{bottom:11px;left:12px;right:12px}.gesture-hint{bottom:51px;font-size:9px}.play-footer button{min-height:32px;padding:5px 10px}.motion-shortcut{font-size:9px}}
.style-shortcut #style-current{overflow:hidden;text-overflow:ellipsis}.vip-settings{border:1px solid #b6985440;border-radius:14px;background:#241e17;padding:13px;margin-bottom:12px}.vip-settings summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font-size:11px;color:#dec189}.vip-settings summary span:first-child{font:10px Latin,sans-serif;letter-spacing:1.8px}.vip-settings summary:after{content:'+';font:18px Latin}.vip-settings[open] summary:after{content:'−'}.vip-collection{padding-top:8px}.vip-collection h3{font:16px/1.5 Georgia,serif;color:#ead3a6;font-weight:400;letter-spacing:.5px;margin:10px 0 5px}.vip-style-grid{margin-top:5px}.vip-style-option{padding:10px 3px 8px}.vip-style-option .style-name{font-size:9px;white-space:normal;line-height:1.5;min-height:28px}.vip-preview-label{color:#d6b777!important;font-size:8px!important}.member-shortcut{width:100%;border:1px solid #ffffff20;border-radius:10px;padding:11px;margin:0 0 22px;background:#ffffff08;color:#dac9b7;font-size:11px}.entry-dialog{text-align:center;padding:35px 26px 23px}.entry-mark{font-size:50px;color:#c99c50;text-shadow:0 3px 25px #b8813040;margin-bottom:10px}.entry-copy{font-size:13px;line-height:1.9;color:#c9b9aa;margin:0 0 24px}.entry-dialog h1{margin-bottom:13px}.secondary-control{width:100%;min-height:42px;border:1px solid #ffffff1a;border-radius:10px;background:#ffffff06;color:#dbcec2;font-size:12px;margin-top:10px}.setup-note{font-size:12px;line-height:1.8;color:#ebca8f;border:1px solid #b9914640;padding:12px;border-radius:10px;background:#87641b12}.google-control{width:100%;min-height:44px;border:1px solid #ffffff35;border-radius:10px;background:#f5f1eb;color:#27201a;font-size:12px;margin-top:8px}.google-control b{font:700 18px Latin;margin-right:10px}.auth-divider{text-align:center;font-size:10px;color:#9f8e7f;margin:20px 0 10px}.auth-field{display:block;font-size:11px;color:#c5b4a8;margin:10px 0}.auth-field input{width:100%;border:1px solid #ffffff20;border-radius:8px;background:#141212;color:#c5b4a8;padding:12px;margin-top:6px;font:12px Latin,system-ui}.vip-preview-dialog{text-align:center;padding:24px 16px 18px;max-width:410px}.vip-preview-dialog h1{font-size:21px;margin:0 24px 3px}.vip-preview-dialog .settings-note{margin:5px 0 12px}.vip-preview-scene{height:min(43dvh,350px);width:100%;border-radius:14px;overflow:hidden;margin:8px 0}.vip-preview-scene canvas{display:block;width:100%;height:100%}

.entry-mark svg{width:48px;height:48px;stroke-width:1.4;filter:drop-shadow(0 3px 15px #c9974935)}

.vip-preview-scene{height:min(calc(43dvh - 30px),320px);touch-action:pan-y;cursor:grab}.vip-preview-scene:active{cursor:grabbing}.preview-rotate{display:flex;align-items:center;justify-content:center;gap:18px;margin:-2px 0 8px;color:#cbbb9f;font-size:10px}.preview-rotate button{width:34px;height:29px;border:1px solid #bc92463d;border-radius:8px;background:#ffffff05;font-size:20px;line-height:1;color:#ebd19c}

.trial-panel{margin:12px 0;padding:12px;border:1px solid #d7b26435;border-radius:12px;background:#a8781b0b}.trial-control{width:100%;min-height:44px;border:1px solid #d9b76980;border-radius:11px;background:linear-gradient(135deg,#70511f,#483015);color:#ffe4a8;font-size:12px;padding:10px;margin-top:10px}.trial-control:disabled{opacity:.58}.trial-status{font-size:11px;color:#e5c78e;line-height:1.7;margin:9px 0;font-variant-numeric:tabular-nums}.trial-scope{margin-bottom:5px!important;font-size:10px!important}.entry-dialog .trial-status{margin-bottom:0}.vip-preview-dialog .trial-control{margin-top:0}.vip-preview-dialog .done-control{min-height:39px;font-size:11px}.vip-preview-dialog .vip-preview-scene{height:min(calc(37dvh - 25px),290px)}

.auth-unavailable{margin-top:18px;padding-top:12px;border-top:1px solid #ffffff12}.auth-unavailable summary{font-size:11px;color:#ad9c90;cursor:pointer}.trial-panel .trial-control{margin-top:0}

.member-identity{overflow-wrap:anywhere;color:#eee;font-weight:600}.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.auth-actions button{margin:8px 0}.member-message{min-height:1.5em;color:#eec996;font-size:.92rem;overflow-wrap:anywhere}#member-signed-controls button{width:100%;margin-top:8px}#member-dialog[aria-busy="true"]{cursor:progress}

/* Room entry belongs to the scrollable cup/lid selection panel. */
.room-launcher{position:static;margin:20px 0;padding:16px;border:1px solid #bd945b66;border-radius:16px;display:grid;gap:12px;text-align:left}.room-launcher h2,.room-launcher p{margin:0}.room-launcher p{font-size:12px;line-height:1.7}.room-launcher form{display:grid;gap:10px}.room-launcher label{font-size:13px}.room-launcher input{box-sizing:border-box;width:100%;min-width:0;min-height:52px;padding:12px;border:1px solid #a58466;border-radius:12px;background:#241817;color:#fff;font:inherit}.room-primary,.room-secondary{display:flex;align-items:center;justify-content:center;min-height:52px;width:100%;padding:12px 16px;border-radius:12px;font-size:16px;text-decoration:none;touch-action:manipulation}.room-primary{background:#e2bc76;color:#271719;border:1px solid #e2bc76}.room-secondary{background:#382321;color:#fff0d5;border:1px solid #be9460}#help-dialog{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right));padding-bottom:max(28px,env(safe-area-inset-bottom));overflow-y:auto;max-height:calc(100dvh - 32px)}

#room-menu{box-sizing:border-box;padding:0;width:min(640px,calc(100% - 40px));max-width:640px;height:min(820px,calc(var(--room-viewport,100dvh) - 40px));max-height:calc(var(--room-viewport,100dvh) - 40px);overflow:hidden;border-radius:22px;background:#1c1113}#room-menu[open]{display:flex;flex-direction:column}.room-menu-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));flex:none;border-bottom:1px solid #80604d}.room-menu-header h2{font-size:18px;margin:0}.room-menu-header button{min-width:64px;min-height:52px;padding:10px 14px;border:1px solid #bd945b;border-radius:12px;background:#382321;color:#fff}#room-menu-frame{border:0;display:block;width:100%;flex:1;min-height:0;background:#1c1113}#room-menu::backdrop{background:#000b}@media(max-width:599px){#room-menu{margin:auto 0 0;width:100%;max-width:none;height:calc(var(--room-viewport,100dvh) - max(16px,env(safe-area-inset-top)));max-height:calc(var(--room-viewport,100dvh) - max(16px,env(safe-area-inset-top)));border-radius:22px 22px 0 0;border-bottom:0}}@media(max-height:480px){#room-menu{height:calc(var(--room-viewport,100dvh) - 12px);max-height:calc(var(--room-viewport,100dvh) - 12px)}.room-menu-header{padding-top:4px;padding-bottom:4px}}

/* Entry follows the visible lid/cup selector on the main screen. */
.selection-toolbar{position:relative;z-index:6;width:min(320px,calc(100% - 36px));margin:105px auto 0;display:grid;gap:10px}.selection-toolbar .style-shortcut{position:static;transform:none;width:100%;max-width:none;min-height:48px;justify-content:center;margin:0;white-space:normal}.selection-toolbar .room-launcher{margin:0;padding:0;border:0;display:block}.selection-toolbar .room-primary{min-height:52px;font-size:16px}.touch-surface{top:225px}@media(max-height:480px){.selection-toolbar{margin-top:70px;gap:6px;width:min(320px,calc(100% - 36px))}.selection-toolbar .style-shortcut{min-height:48px}.touch-surface{top:185px}}

#room-menu.room-active{width:100%;max-width:none;height:var(--room-viewport,100dvh);max-height:var(--room-viewport,100dvh);margin:0;border:0;border-radius:0}.room-active .room-menu-header{padding-top:max(8px,env(safe-area-inset-top));background:#201516}.room-active #room-menu-close{min-width:110px}
.lock-control{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:64px;min-height:56px;border:1px solid #d4b57a;border-radius:12px;background:#2c1917;color:#ffe4ac;gap:3px;margin-right:12px}.lock-control[aria-pressed=true]{background:#71421c}.lock-control span{font-size:12px}