.color-dialog{width:min(660px,calc(100% - 24px));max-height:96dvh;padding:0;background:#3e1b0d;border:2px solid #aa7238;border-radius:16px;color:#fff1c6;overflow:auto;scrollbar-width:thin;scrollbar-color:#b7813d #40200e}.color-dialog::backdrop{background:#0c0a08ed;backdrop-filter:blur(9px)}.color-dialog .modal-header{position:sticky;top:0;z-index:40;display:block;height:0;padding:0;pointer-events:none}.color-dialog #modal-eyebrow{display:none}.color-dialog #close-modal{position:absolute;right:9px;top:8px;width:29px;height:29px;background:linear-gradient(#a96a32,#562712);border:1px solid #dda766;color:#ffdf9f;box-shadow:0 2px 7px #1d0c09a8;pointer-events:auto}.color-dialog #close-modal:hover{background:#b87838}.perya-game{--gold:#ffe08a;--deep:#53250d;position:relative;overflow:clip;background:repeating-linear-gradient(91deg,#0000 0 89px,#6f340524 90px 92px,#0000 93px 177px),linear-gradient(115deg,#824319,#d18330 35%,#9c4c17 70%,#6e2e12);font-family:var(--body)}.perya-game button:focus-visible,.perya-game input:focus-visible,.perya-game summary:focus-visible{outline:3px solid #fff3a3;outline-offset:3px}.perya-brandbar{position:sticky;top:0;z-index:20;min-height:46px;display:flex;align-items:center;gap:12px;padding:10px 49px 10px 17px;background:linear-gradient(#281919,#42261c);border-bottom:2px solid #bd8c44;box-shadow:0 3px 10px #32120c50}.perya-wordmark{font:800 16px var(--display);letter-spacing:-.6px;color:#fff3c6}.perya-wordmark>span{color:#f6c864}.perya-mode{font-size:7px;letter-spacing:1.6px;color:#eac28d;margin-left:auto;white-space:nowrap}.perya-mode b{font-size:10px;color:#ffe396;margin-left:7px;font-variant-numeric:tabular-nums}.perya-scene{position:relative;width:100%;aspect-ratio:720/600;isolation:isolate}.perya-machine{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;user-select:none;pointer-events:none}.perya-crown{position:absolute;z-index:3;top:1.2%;left:23%;width:54%;text-align:center}.perya-crown>span{display:block;font-size:7px;letter-spacing:3px;color:#ffe5aa;text-shadow:0 1px 4px #2c191a}#modal-content .perya-crown h2{font:900 clamp(27px,5vw,44px)/1.12 Georgia,'Times New Roman',serif;letter-spacing:-1px;margin:2px 0 4px;color:#ffe98f;text-shadow:0 2px #976322,0 4px #5c2e12,2px 4px 2px #241012,-2px 0 #71441b;white-space:nowrap}.perya-round-plaque{display:flex;align-items:center;justify-content:center;gap:5px;background:linear-gradient(#54230f,#2b150a);border:2px solid #bb823c;border-radius:7px;box-shadow:inset 0 0 0 1px #44200f,0 3px 4px #30180b88;padding:5px 4px;font-size:7px;font-weight:700;letter-spacing:.6px;color:#ffe29b}.perya-round-plaque i{width:5px;height:5px;background:#b5ef48;border-radius:50%;box-shadow:0 0 5px #b5ef48}.perya-round-plaque small{font-size:6px;color:#c79954;letter-spacing:0}.perya-player{position:absolute;left:1.8%;top:24%;width:16%;padding:10px 4px 8px;border:1px solid #e9bc6c8c;border-radius:6px;background:linear-gradient(#542632a3,#5d2c16cc);box-shadow:inset 0 0 9px #d6b06420,0 3px 7px #31191466;display:flex;align-items:center;flex-direction:column}.perya-avatar{height:52px;width:52px;border:3px solid #e7bc6a;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#638275,#2c4744);box-shadow:0 3px 6px #271714;font:800 28px var(--display);color:#ffe9ad;position:relative;margin-top:-2px}.perya-avatar>span{position:absolute;right:-7px;bottom:-5px;background:#c79243;color:#5a3310;font-size:15px;line-height:19px;width:22px;border:2px solid #f9dc96;border-radius:50%;text-align:center}.perya-player>b{font-size:8px;color:#eaca98;letter-spacing:1px;margin-top:10px}.perya-player>#color-side-balance{font:800 17px var(--display);color:#ffda73;text-shadow:0 1px 2px #4e1c0f;margin:3px 0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.perya-player>small{font-size:6px;letter-spacing:1px;color:#d1a77c}.perya-timer{position:absolute;left:3.8%;top:67%;width:13%;text-align:center}.perya-timer-ring{--progress:360deg;aspect-ratio:1;border-radius:50%;padding:4px;background:conic-gradient(#ffe48b var(--progress),#57301d 0);box-shadow:0 0 0 2px #ad6c2d,0 3px 10px #4e27129c,0 0 13px #ffbd4d55;display:grid;place-items:center}.perya-timer strong{display:grid;place-items:center;width:100%;height:100%;background:radial-gradient(circle at 50% 30%,#ba5734,#5d201e);border-radius:50%;font:700 clamp(23px,5vw,35px) Georgia,serif;color:#ffe8a5;text-shadow:0 2px #71311d;font-variant-numeric:tabular-nums}.perya-timer>span{font-size:6px;letter-spacing:1.3px;color:#ffdfa5;display:block;margin-top:8px;text-shadow:0 1px #6e361d}.betting-closed .perya-timer-ring{background:conic-gradient(#ff8a63 var(--progress),#5c2b20 0)}.perya-roadmap{position:absolute;top:22%;right:1.3%;width:22%;background:linear-gradient(140deg,#74392acb,#5b2722ef);border:2px solid #d29a4d;border-radius:5px;box-shadow:inset 0 0 0 2px #4b201d,0 3px 7px #301e1780;padding:0 7px 8px;text-align:center;color:#f5deb0}.perya-roadmap>h3{font:700 clamp(10px,2.1vw,15px) Georgia,serif;letter-spacing:.3px;margin:0 -7px 7px;padding:5px 1px;background:linear-gradient(#b66f39,#8f4929);border-bottom:1px solid #e0a963}.perya-roadmap>h3>span{font-size:6px;color:#ffe27a;vertical-align:middle;margin-left:2px}.roadmap-last>span{font:700 10px Georgia,serif;letter-spacing:2px;color:#d2b8a4}.roadmap-last>div{display:flex;justify-content:center;gap:5px;margin:6px 0 10px}.roadmap-last i{height:24px;flex:1;max-width:30px;border-radius:3px;background:#ffffff18;box-shadow:inset 1px 1px 2px #ffecad33,0 2px 2px #3e1f1480}.roadmap-frequency{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.roadmap-frequency>div{background:var(--tile);border:1px solid #ffd77966;border-radius:4px;box-shadow:inset 0 -5px 9px #6a180529;padding:5px 1px;color:#412316}.roadmap-frequency b{display:block;font:800 14px var(--display);line-height:1.1}.roadmap-frequency small{font-size:6px;font-weight:700}.perya-roadmap>#color-sample{display:block;font-size:7px;color:#e6c39b;margin:7px 0 0}.roadmap-history{margin:6px auto 0;display:flex;flex-direction:column;gap:3px;max-width:79px}.roadmap-history>div{display:flex;align-items:center;gap:4px;justify-content:center}.roadmap-history span{font-size:8px;color:#b17c59}.roadmap-history i{height:10px;width:19px;border-radius:2px;box-shadow:inset 0 1px #ffffff40}.perya-payout-legend{position:absolute;right:2%;bottom:2.5%;width:14%;text-align:center;color:#ffe3aa;padding:5px 5px 4px;border:1px solid #efb55e77;border-radius:4px;background:#8b4d22aa}.perya-payout-legend>span{font-size:6px;letter-spacing:.6px;display:block;margin-bottom:5px}.perya-payout-legend>div{display:flex;gap:7px;align-items:center;justify-content:center;margin:3px 0}.perya-payout-legend b{font:700 11px Georgia,serif;border-radius:2px;background:#e7bc7c;color:#8b4d23;width:17px;line-height:17px}.perya-payout-legend strong{font-size:14px;color:#ffe5a3}.perya-payout-legend>small{font-size:5px;display:block;margin-top:4px;color:#f7d4a0}.perya-dice-layer{position:absolute;inset:0;pointer-events:none;z-index:4}.perya-die{position:absolute;width:10%;aspect-ratio:1;transform:none;will-change:left,top;filter:drop-shadow(0 1px 1px #512c1933);backface-visibility:visible}.perya-die svg{width:100%;height:100%;aspect-ratio:1;display:block;stroke-width:0;overflow:visible}.perya-die-shadow{position:absolute;width:7.1%;height:1.35%;border-radius:50%;background:radial-gradient(ellipse,#271303 0%,#2c160bc7 43%,#3c200230 68%,transparent 78%);transform:translate(-50%,-50%);z-index:-1;pointer-events:none;will-change:transform,left,top,opacity}.die-impact{position:absolute;width:4%;aspect-ratio:1;border-radius:50%;border:1px solid #ffe9b154;background:radial-gradient(ellipse,#f0d39d77,transparent 70%);opacity:0;pointer-events:none;transform:translate(-50%,-50%);z-index:5}.die-impact.collision{border:0;background:none;width:4.2%}.die-impact.collision{border:1px solid #e9c08066;background:radial-gradient(ellipse,#e7c68b55,transparent 70%);aspect-ratio:2.5/1}.die-impact.floor,.die-impact.gate{aspect-ratio:2.5/1}.die-impact.wall{border-color:#ffde9899}.perya-dice-layer.landed .perya-die{will-change:auto}.perya-table-stamp{position:absolute;bottom:7%;left:34%;width:32%;text-align:center;font:700 7px Georgia,serif;letter-spacing:2px;color:#70431c38;transform:perspective(200px) rotateX(23deg)}.perya-banner{position:relative;z-index:6;margin:-7px 4.5% -2px;padding:9px 7px 10px;text-align:center;background:linear-gradient(90deg,#43200de0,#38160af5 30%,#38160af5 70%,#43200de0);border-top:1px solid #ffe2a07d;border-bottom:3px solid #b7772c;box-shadow:0 5px 10px #3517055e}.perya-banner h3{font:900 clamp(29px,6.5vw,46px)/1 Georgia,serif;letter-spacing:1px;color:#ffe998;text-shadow:0 2px #9c6126,0 4px #0c0803;margin:0}.perya-banner #color-result{font-size:9px;color:#edc989;line-height:1.5;margin-top:7px;min-height:14px}.showing-result .perya-banner h3{color:#fff7b6}.perya-betting-deck{position:relative;margin:0 4.6%;padding:10px 11px 7px;background:repeating-linear-gradient(3deg,#0000 0 7px,#67361213 8px 9px),linear-gradient(110deg,#a55b23,#f0bb6c 40%,#d2934b 70%,#9b4e1c);border:3px solid #dfa35a;border-top:0;border-bottom-width:7px;border-radius:0 0 13px 13px;box-shadow:inset 1px 0 2px #ffe5a0,inset -1px 0 2px #ffe5a0,0 7px 0 #5c2c12,0 11px 13px #50210e88;perspective:1000px}.color-dialog .color-bet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;transform:rotateX(7deg);transform-origin:bottom}.color-dialog .color-bet-tile{position:relative;height:clamp(76px,18vw,111px);min-width:0;border:2px solid #fff3ab;border-radius:10px;background:linear-gradient(165deg,#ffffff24,transparent 33%,#542c1330),var(--bet-color);box-shadow:0 0 6px #ffeb8b,inset 0 0 7px #ffefb9ad,inset 0 -6px 14px #743a1529;padding:8px 7px 6px;text-align:center;color:#fff9d4;transition:filter .15s,box-shadow .15s,transform .15s;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;overflow:hidden}.color-dialog .color-bet-tile:hover{filter:brightness(1.12);transform:translateY(-2px)}.color-dialog .color-bet-tile:active{transform:scale(.98)}.color-dialog .color-bet-tile:disabled{opacity:.8;filter:saturate(.8);cursor:default}.color-dialog .color-bet-tile.has-bet{box-shadow:0 0 11px #ffff9e,inset 0 0 0 2px #fff7ad,inset 0 0 19px #ffefba;filter:brightness(1.04)}.color-bet-tile .color-name{position:absolute;left:7px;top:6px;font-size:8px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#381d11c2;text-shadow:0 1px #ffffff45}.color-bet-tile>strong{font:800 clamp(18px,3.6vw,25px)/1 var(--display);text-shadow:0 1px 3px #522d13,0 0 1px #522d13;z-index:2;max-width:100%;overflow:hidden;text-overflow:ellipsis}.color-bet-tile>strong>small{font:700 9px var(--body);margin-left:2px}.color-bet-tile>small{display:block;font-size:7px;font-weight:600;color:#2d210edb;margin-top:5px;z-index:2}.color-bet-tile.color-4>strong,.color-bet-tile.color-1>strong{color:#794407;text-shadow:0 1px #fff4ab}.tile-chip{position:absolute;top:18%;left:50%;transform:translateX(-50%) rotate(-12deg);width:29px;height:29px;border:3px dashed #ffeb9a;outline:2px solid #ac6a24;background:linear-gradient(#dcaa54,#a55d20);color:#fff4b5;border-radius:50%;display:grid;place-items:center;font-size:17px;box-shadow:2px 3px 5px #48301877}.winning-color{animation:perya-win .65s ease-in-out infinite alternate}.perya-wallet{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 8px 0;color:#633717;font:700 11px Georgia,serif}.perya-wallet b{color:#55300b;font:800 12px var(--display);margin-left:5px}.perya-console{position:relative;margin:14px 5% 0;padding-bottom:4px}.perya-chip-presets{display:flex;justify-content:center;align-items:center;gap:8px;margin:0 0 8px}.perya-chip-presets button{border:1px solid #e6b66a;background:linear-gradient(#92501e,#63320e);color:#ffdea1;min-width:32px;padding:4px 8px;border-radius:20px;font-size:9px;font-weight:700;box-shadow:0 2px 3px #4f230e50}.perya-chip-presets button.selected{background:linear-gradient(#ffdf8a,#e9a437);color:#5d3010;border-color:#ffebae;box-shadow:0 0 7px #ffe59a77}.perya-chip-presets>span{font-size:7px;color:#ffdda4}.perya-controls{display:grid;grid-template-columns:1fr 1.2fr 1fr 1fr 1fr;align-items:center;gap:10px;padding:0 8px}.perya-action{justify-self:center;border-radius:50%;height:66px;width:66px;max-width:100%;aspect-ratio:1;border:2px solid #8d4c1a;background:radial-gradient(ellipse at 40% 15%,#dca353,#9c5018 60%,#65300f);box-shadow:inset 0 2px 1px #ebbf735c,0 4px 0 #4e260d,0 5px 8px #592b0f80;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0;color:#fff1c5;transition:filter .15s}.perya-action:hover{filter:brightness(1.15)}.perya-action>span{font:800 36px/.95 var(--body);text-shadow:0 2px 3px #59270e}.perya-action>small{font-size:9px;color:#f6d09b;margin-top:3px}.perya-action.clear-action>span{color:#ffbba2;font-size:39px}.perya-action:disabled{opacity:.45;filter:saturate(.6)}.perya-chip-control{display:flex;align-items:center;flex-direction:column;position:relative;padding-top:1px}.chip-rim{width:84px;height:84px;border:3px solid #673b1b;box-shadow:0 0 0 2px #e5b86b,0 5px 0 #3b2512,0 7px 11px #532d1177;background:repeating-conic-gradient(#e5f1d9 0deg 16deg,#146776 16deg 40deg);border-radius:50%;padding:12px;display:grid;place-items:center}.chip-rim>input{width:100%;height:100%;min-width:0;padding:0;border:3px solid #2c7b84;background:radial-gradient(circle at 40% 30%,#fffef0,#b9d5c8);color:#173c42;font:800 25px var(--display);text-align:center;border-radius:50%;outline-offset:6px;appearance:textfield;-moz-appearance:textfield;box-shadow:inset 0 1px 3px #ffffff,0 0 0 1px #eaf5da}.chip-rim input::-webkit-inner-spin-button,.chip-rim input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.perya-chip-control>small{font-size:6px;font-weight:700;letter-spacing:.8px;color:#ffe0a7;margin-top:7px;white-space:nowrap}.perya-submit-row{display:flex;align-items:center;gap:13px;padding:10px 11px;margin-top:11px;background:#4b230dd9;border:1px solid #cb8c3e;border-radius:8px;box-shadow:inset 0 1px #ffd18e22}.perya-submit-row>div{min-width:70px}.perya-submit-row>div>span{display:block;font-size:7px;letter-spacing:1px;color:#d2a565}.perya-submit-row strong{display:block;font:800 18px var(--display);color:#ffe8aa;margin-top:2px}.perya-confirm{flex:1;min-height:42px;background:linear-gradient(#fff0a7,#f5c251 46%,#e5a52e 48%,#d28a1e);border:1px solid #fff2b1;border-radius:7px;padding:10px 13px;box-shadow:inset 0 1px #fff7d7,0 3px 0 #8c4d0b;color:#653710;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:12px}.perya-confirm>span{font-size:20px;line-height:1}.perya-confirm:disabled{opacity:.55;box-shadow:inset 0 1px #fff7d750}.color-dialog .color-bet-message{font-size:10px;line-height:1.5;min-height:28px;margin:10px 0 3px;text-align:center;color:#ffe0b1}.perya-refill{background:#61390f;border:1px solid #ffe293;color:#ffe8a5;border-radius:6px;padding:10px;font-size:10px;width:100%;margin:5px 0 12px}.perya-rules{margin:4px 5% 0;border-top:1px solid #f7ca704d}.perya-rules summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#f3cc93;padding:12px 0}.perya-rules summary::-webkit-details-marker{display:none}.perya-rules summary>span{font-size:15px}.perya-rules>div{background:#44210fd9;border:1px solid #a66f38;padding:13px 16px;color:#efd3a8;border-radius:7px;font-size:11px;line-height:1.8}.perya-rules ol{padding-left:17px;margin-top:0}.perya-rules p{font-size:10px;line-height:1.8}.perya-footer{background:#45220f70;text-align:center;padding:11px 10px;font-size:7px;letter-spacing:.4px;color:#ddb783}.perya-footer>span{color:#f6cf77;padding:0 6px}.negative,.history-row b.negative{color:#efae90}
@keyframes perya-win{from{box-shadow:0 0 7px #fff09c,inset 0 0 12px #fff3b4}to{box-shadow:0 0 18px #fffac2,inset 0 0 0 3px #fffbd0,inset 0 0 25px #fff7c3}}





/* A separate wooden release shelf rises before the gravity drop. */
.perya-release-shelf{position:absolute;left:30%;top:34.833333%;width:40%;height:5.333333%;transform-origin:50% 0;z-index:3;pointer-events:none;will-change:transform;filter:drop-shadow(0 3px 2px #40200b50)}
.perya-release-shelf svg{display:block;width:100%;height:100%;overflow:visible}
.perya-release-shadow{position:absolute;left:31%;top:38%;width:38%;height:2%;z-index:2;background:#35190b;filter:blur(3px);opacity:.35;pointer-events:none;transform-origin:top}
.perya-result-board{position:absolute;z-index:7;top:35%;left:24%;width:52%;padding:2% 2% 2.5%;border:4px solid #e4b06a;border-radius:6px;background:repeating-linear-gradient(1deg,#0000 0 8px,#f1b56312 9px 10px),linear-gradient(110deg,#7c421d,#a9672c 45%,#743712);box-shadow:inset 0 0 0 2px #633611,inset 0 0 18px #482006,0 6px 0 #68380f,0 12px 16px #40230c80;pointer-events:none}
.perya-result-board[hidden]{display:none!important}
.perya-result-board h3{position:absolute;left:0;right:0;bottom:100%;margin:0 0 3px;text-align:center;font:900 clamp(21px,5.8vw,38px)/1 Georgia,serif;letter-spacing:2px;color:#f4ca49;text-shadow:-2px -2px #ffe1a0,2px -2px #ffe1a0,-2px 2px #ffe1a0,2px 2px #ffe1a0,0 4px #794118,0 5px 7px #3b210c}
.perya-result-board h3 span:nth-child(1){color:#e55b43}.perya-result-board h3 span:nth-child(2){color:#43b3d5}.perya-result-board h3 span:nth-child(4){color:#72b935}.perya-result-board h3 span:nth-child(5){color:#e567b9}
.perya-result-colors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.result-swatch{position:relative;min-width:0;text-align:center}.result-swatch i{display:block;aspect-ratio:1;background:linear-gradient(150deg,#ffffff20,transparent 55%,#43230d25),var(--result-color);border:5px solid #e5b773;border-radius:3px;box-shadow:0 0 0 1px #8d551f,inset 0 0 0 1px #ffe4a360,0 3px 5px #3e1c0e88}
.result-swatch span{position:absolute;bottom:9%;left:0;right:0;display:block;margin:0;font-size:9px;font-weight:800;color:#3d2310;text-shadow:0 1px #ffffff66;letter-spacing:.6px;text-transform:uppercase}
.perya-result-board p{position:absolute;bottom:4%;left:0;right:0;font-size:6px;font-weight:700;letter-spacing:1.5px;text-align:center;color:#e9c08a;margin:0}
.showing-result .perya-result-board{animation:result-arrive .25s cubic-bezier(.2,.7,.3,1) both}
@keyframes result-arrive{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}



/* One fitted game surface. The wooden tray takes spare height; all coordinates share its viewport. */
html.color-game-open,html.color-game-open body{overflow:hidden;overscroll-behavior:none}
.color-dialog{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:radial-gradient(ellipse,#3a2115,#100e10 80%);overflow:hidden;overscroll-behavior:none;box-sizing:border-box}
.color-dialog .modal-header{display:none}
.color-dialog #modal-content{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;overflow:hidden}
#color-fit-shell{position:relative;flex:none;width:100%;height:100%;overflow:hidden}
.perya-game{width:720px;height:1120px;max-width:none;margin:0;display:flex;flex-direction:column;transform-origin:top left;overflow:hidden;box-shadow:0 0 50px #0008;touch-action:manipulation}
.perya-game *{box-sizing:border-box}
.perya-brandbar{position:relative;top:auto;flex:0 0 56px;min-height:56px;padding:0 12px 0 24px;gap:12px;border-bottom-width:2px}
.perya-wordmark{font-size:30px;letter-spacing:-1px}.perya-mode{font-size:11px;letter-spacing:1px}.perya-mode b{font-size:17px;margin-left:9px}
.perya-header-button{width:44px;height:44px;display:grid;place-items:center;border:1px solid #e4b06777;border-radius:50%;background:linear-gradient(#8c572a,#512b17);color:#ffdf98;font:700 26px Georgia,serif;padding:0}
.perya-scene{flex:1 1 auto;min-height:600px;aspect-ratio:auto;width:720px;height:auto}
.perya-crown{top:8px;left:22%;width:56%}.perya-crown>span{font-size:10px;letter-spacing:3px}#modal-content .perya-crown h2{font-size:46px;letter-spacing:-1px;margin:4px 0 0}
.perya-timer strong{font-size:53px}.perya-timer>span{font-size:10px;letter-spacing:1px;margin-top:11px}
.perya-roadmap{top:21%;right:1.2%;width:21%;padding:0 9px 9px}.perya-roadmap>h3{font-size:23px;margin:0 -9px 8px;padding:6px 0}.roadmap-last>span{font-size:14px}.roadmap-last i{height:32px;max-width:35px}.roadmap-frequency b{font-size:22px}.roadmap-frequency small{font-size:10px}.roadmap-frequency>div{padding:7px 1px 5px}.perya-roadmap>#color-sample{font-size:10px}.roadmap-history{max-width:105px}.roadmap-history i{height:12px;width:25px}.roadmap-history>div{gap:5px}
.perya-payout-legend{right:1.8%;bottom:11%;width:13.6%;padding:5px}.perya-payout-legend>span{font-size:9px}.perya-payout-legend b{font-size:15px;line-height:21px;width:21px}.perya-payout-legend strong{font-size:21px}.perya-payout-legend>small{font-size:7px}
.perya-players{position:absolute;top:24%;left:1.7%;width:16%;padding:8px;border:1px solid #e9bc6c80;border-radius:6px;background:#572b25bd;color:#e7c28f;text-align:center}.perya-players h3{margin:0 0 8px;font-size:12px;letter-spacing:1px}.empty-player{display:flex;align-items:center;justify-content:center;gap:7px;margin:6px 0;font-size:25px;color:#d7b68c77}.empty-player small{font-size:12px;color:#cfb293}.perya-players p{margin:8px 0 1px;font-size:10px;color:#cdb18d}
.perya-result-board h3{font-size:38px}.result-swatch span{font-size:11px}.perya-result-board p{font-size:8px}
.perya-phase-overlay{position:absolute;z-index:9;left:17%;width:66%;bottom:-2px;height:46px;text-align:center;display:flex;align-items:center;justify-content:center;font:900 36px/1 Georgia,serif;color:#ffe7a2;text-shadow:0 2px #68451b,0 4px 6px #24130f;background:linear-gradient(90deg,transparent,#44200c94 15%,#44200c94 85%,transparent);pointer-events:none;white-space:nowrap}
.betting-closed .perya-phase-overlay{color:#fff3d4}.perya-table-stamp{font-size:9px}
.perya-betting-deck{flex:0 0 280px;min-height:280px;margin:-5px 4.6% 0;padding:12px 12px 8px;display:flex;flex-direction:column;border-top:3px solid #e9b971;border-radius:9px;perspective:none;box-shadow:inset 0 0 0 1px #ffdf8c,0 7px 0 #5c2c12}
.color-dialog .color-bet-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;transform:none}
.color-dialog .color-bet-tile{height:100%;min-height:0;border-radius:10px;padding:8px;overflow:visible;justify-content:flex-end;box-shadow:inset 0 0 0 1px #ffffff88,0 1px 6px #76471466;transition:filter .1s}
.color-dialog .color-bet-tile:hover,.color-dialog .color-bet-tile:active{transform:none}.color-dialog .color-bet-tile:disabled{opacity:1;filter:saturate(.88)}
.color-bet-tile .color-name{font-size:13px;letter-spacing:.7px;left:9px;top:6px}.color-bet-tile>strong{font:800 30px/1 var(--display);margin-bottom:1px}.color-chip-pile{position:absolute;left:50%;top:47%;width:70px;height:58px;transform:translate(-50%,-50%);pointer-events:none}
.perya-wallet{flex:none;height:42px;font-size:19px;padding:10px 2px 0}.perya-wallet b{font-size:21px;margin-left:6px}
.perya-console{position:relative;flex:0 0 189px;height:189px;margin:0 4%;padding:14px 0 0;min-height:0}
.perya-controls{display:grid;grid-template-columns:80px 1fr 1.35fr 1fr 1fr 1fr;gap:10px;align-items:center;height:115px;padding:0}
.perya-action{width:82px;height:82px;border-width:2px}.perya-action>span{font-size:41px}.perya-action>small{font-size:14px}.perya-action.clear-action>span{font-size:46px}
.perya-chip-trigger{border:0;background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;color:#ffe3a5}.perya-chip-trigger .chip-rim{width:110px;height:110px;padding:13px;box-shadow:0 0 0 2px #e5b86b,0 5px 0 #3b2512,0 7px 11px #532d1177}.chip-rim>b{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fffde6,#bad6c8);border:3px solid #347a80;color:#183c40;font:800 32px var(--display)}.perya-chip-trigger>small{font-size:10px;letter-spacing:.7px;margin-top:7px;font-weight:700}
.perya-self{display:flex;flex-direction:column;align-items:center;gap:6px}.perya-self .perya-avatar{width:66px;height:66px;font-size:35px;margin:0}.perya-self>b{font-size:12px;letter-spacing:1px}
.color-dialog .color-bet-message{height:20px;min-height:0;font-size:13px;line-height:20px;margin:11px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.color-result-summary{height:21px;font-size:14px;line-height:21px;text-align:center;color:#ffe39b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.perya-refill{position:absolute;bottom:3px;left:20%;width:60%;font-size:15px;padding:7px;margin:0;z-index:12}
#color-chip-effects{position:absolute;inset:0;z-index:30;pointer-events:none;overflow:hidden}.chip-flight{position:absolute;width:70px;height:58px;pointer-events:none}.chip-stack{position:relative;display:block;width:70px;height:58px;--chip-edge:#e1e8da;--chip-ink:#265b5b;--chip-top:#fff7df;--chip-side:#173e42}.chip-gold{--chip-edge:#ffe4a0;--chip-ink:#8e5218;--chip-top:#ffe18a;--chip-side:#8b531d}.chip-stack i,.chip-stack>b{position:absolute;width:62px;height:47px;left:4px;bottom:calc(var(--level)*3px);border-radius:50%;background:repeating-conic-gradient(var(--chip-edge) 0deg 18deg,var(--chip-ink) 18deg 42deg);border:2px solid var(--chip-side);box-shadow:0 3px 0 var(--chip-side),0 4px 2px #25150666}.chip-stack>b{display:grid;place-items:center;z-index:2;font:900 18px var(--display);color:#172d2d;border:7px dashed var(--chip-ink);background:var(--chip-top);box-shadow:0 2px 0 var(--chip-side),inset 0 0 0 1px #eee2bb}
.color-sheet{position:absolute;inset:0;z-index:50;display:flex;align-items:flex-end;justify-content:center;padding:30px 25px 190px;background:#20170b99;backdrop-filter:blur(3px)}.color-sheet[hidden]{display:none!important}.color-sheet-card{position:relative;width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;background:linear-gradient(135deg,#60351f,#2f211b);border:3px solid #dbab62;border-radius:20px;padding:30px;color:#ffe7b6;box-shadow:0 10px 40px #160d0a88}.color-sheet-card h3{font:800 30px Georgia,serif;margin:0 0 10px}.color-sheet-card p{font-size:19px;line-height:1.5;margin:10px 0 20px}.sheet-close{position:absolute;top:12px;right:14px;width:42px;height:42px;border:1px solid #d6a362;border-radius:50%;background:#402719;color:#ffe6b6;font-size:29px;line-height:1;padding:0}.color-chip-options{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0}.picker-chip{width:105px;height:105px;justify-self:center;border:10px dashed #f6eed6;outline:3px solid #392316;border-radius:50%;font:800 27px var(--display);background:#246d62;color:#fff9df;box-shadow:0 5px #182b24,0 8px 12px #20130d66}.picker-1{background:#176778}.picker-2{background:#84512e}.picker-3{background:#c98f16;color:#2a2413}.picker-4{background:#a32c2b}.picker-5{background:#693b94}.picker-6{background:#333}.picker-chip.selected{outline:4px solid #ffe681;filter:brightness(1.2)}
#color-custom-form label{display:block;font-size:19px;margin-bottom:10px}#color-custom-form>div{display:flex;gap:12px}#color-custom-amount{min-width:0;flex:1;background:#ffe8b8;border:2px solid #c79951;border-radius:9px;padding:12px;color:#432a14;font:800 27px var(--display)}#color-custom-form button{border:1px solid #fff0c0;background:linear-gradient(#ffdc85,#c88b30);color:#4f2f12;border-radius:9px;padding:10px 25px;font-size:23px;font-weight:800}#color-chip-error{font-size:17px;color:#ffcaad;margin:8px 0 0;min-height:25px}.help-card p{font-size:21px}.help-card{padding-top:45px}.color-sheet:has(.help-card){padding-bottom:45px;align-items:center}
@media(prefers-reduced-motion:reduce){.winning-color,.showing-result .perya-result-board{animation:none}.die-impact{display:none}.color-dialog button{transition:none}}
/* Keep roadmap and payout legend separate even on the shortest fitted table. */
.perya-roadmap>h3{font-size:20px;padding:4px 0;margin-bottom:6px}
.roadmap-last>span{font-size:12px}.roadmap-last>div{margin:4px 0 7px}.roadmap-last i{height:26px}
.roadmap-frequency b{font-size:18px}.roadmap-frequency small{font-size:8px}.roadmap-frequency>div{padding:4px 1px 3px}
.perya-roadmap>#color-sample{font-size:8px;margin-top:4px}.roadmap-history{gap:2px;margin-top:5px}.roadmap-history i{height:8px;width:24px}
.perya-payout-legend strong{font-size:18px}

/* Foreground walls hide the dice bases at contact; artwork and physics stretch together. */
.perya-front-rails{position:absolute;inset:0;z-index:6;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.perya-dice-layer{clip-path:polygon(25% 15%,75% 15%,75% 56%,89.5% 97%,89.5% 100%,10.5% 100%,10.5% 97%,25% 56%)}

/* Restore the full-width perya composition from the original release.
   The shared-room, wallet, batched-input and pooled-effect code stays current. */
.perya-game [hidden]{display:none!important}
.color-dialog #modal-content{overflow:auto;align-items:center}
.color-dialog #modal-content.color-needs-scroll{align-items:flex-start}
#color-fit-shell{overflow:visible}
.perya-game{position:absolute;left:0;top:0;isolation:isolate}
.perya-header-button{flex-shrink:0}
/* The original stage is the coordinate space for art, shelf, dice and rails. */
.perya-players{z-index:7}
.perya-timer{z-index:7;top:min(67%,calc(80% - 94px))}
.perya-payout-legend{z-index:7;bottom:18%;right:1.4%;width:13.6%}
.perya-payout-legend>small{font-size:9px;line-height:1.2}
.perya-roadmap{z-index:7}
#color-history-open{display:block;width:100%;margin:0;padding:0;min-height:24px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
#color-sample{white-space:normal}
.color-player{min-height:40px;display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;gap:1px 5px;align-items:center;text-align:left;margin:7px 0}
.room-avatar{grid-row:1 / 3;width:24px;height:24px;border:1px solid #d5ac6b77;border-radius:50%;background:#62766c55;display:grid;place-items:center;font-size:11px;color:#ffe2a8;font-weight:700}
.color-player small{font-size:12px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e8caa3}
.color-player b{font-size:11px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f7dca9}
.empty-seat .room-avatar{background:transparent;border-color:#d8bb9d55;color:#d8bb9d88;font-size:20px;font-weight:400}
.empty-seat small{grid-row:1 / 3}.empty-seat b{display:none}
#color-player-count{display:block;margin-top:8px;font-size:11px;line-height:14px;color:#d6b58f}
/* Restore the raised tiles and centered amounts; the accepted room chip stays separate. */
.color-bet-tile>strong{position:relative;bottom:auto;left:auto;background:none;border:0;border-radius:0;color:#745022;text-shadow:0 1px #fff0a055;margin-bottom:1px}
.color-bet-tile .color-name{font-size:14px}
.color-bet-tile.bet-pending>strong{border-bottom:2px dotted #70471e}
.color-dialog .color-bet-tile.has-bet{filter:brightness(1.04)}
.color-chip-pile{left:auto;right:9px;top:24px;bottom:auto;width:56px;height:56px;transform:none}
.chip-stack{width:56px;height:56px;display:block;position:relative}
.chip-stack i{inset:auto;left:0;top:0;bottom:auto;width:56px;height:56px;border-radius:50%;background:repeating-conic-gradient(#eee9dc 0 24deg,#454440 24deg 45deg);border:2px solid #514c41;box-shadow:0 3px #39342b}
.chip-stack>b{inset:auto;left:8px;top:8px;bottom:auto;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#eeeadd;color:#292a28;border:1px solid #6b685c;font:800 17px Arial,sans-serif;box-shadow:none;white-space:nowrap}
.chip-flight{left:0;top:0;width:56px;height:56px;will-change:transform;contain:layout style}
.perya-action{border-radius:50%}
.perya-self{min-width:0;gap:4px}
.perya-self .perya-avatar{width:66px;height:66px;font-size:29px}
.perya-self small{display:block;max-width:80px;font-size:12px;color:#ffe7b7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.perya-self b{display:none}
.perya-chip-trigger{position:relative;z-index:44;align-self:start}
.perya-chip-trigger>small{font-size:10px;font-weight:700;letter-spacing:.7px;margin-top:7px}
.perya-chip-trigger .chip-rim{background:repeating-conic-gradient(#e5f1d9 0deg 16deg,var(--chip-tone,#146776) 16deg 40deg)}
.perya-chip-trigger .chip-rim>b{border-color:var(--chip-tone,#347a80)}
.color-bet-message:empty::after{content:'Choose a chip, then tap a color.';color:#ffe0b1}
.perya-result-board{top:35%;left:24%;width:52%}
.result-swatch span{font-size:12px;background:none;border:0;text-shadow:0 1px #ffffff66}
.winning-color{animation:none!important;box-shadow:0 0 11px #ffffbf,inset 0 0 12px #ffedaa!important}

#color-chip-dismiss{position:absolute;inset:56px 0 0;z-index:40;border:0;background:#211a1638;width:100%;height:calc(100% - 56px)}.chip-fan{position:absolute;z-index:43;left:267px;top:70px;width:0;height:0;overflow:visible}.picker-chip{position:absolute;left:calc(var(--chip-x) - 50px);top:calc(var(--chip-y) - 50px);width:100px;height:100px;border:4px solid #ede2cb;border-radius:50%;background:repeating-conic-gradient(#fff4dc 0 20deg,var(--chip-tone) 20deg 45deg);color:#222;font-size:30px;font-weight:800;isolation:isolate}.picker-chip:before{content:'';position:absolute;inset:11px;border-radius:50%;background:#f5eee0;z-index:-1;border:4px solid var(--chip-tone)}.picker-chip.selected{outline:4px solid #ffe08a;outline-offset:4px}#color-custom-form{position:absolute;left:-220px;bottom:348px;width:440px;padding:14px;border:1px solid #c7a36e;border-radius:12px;background:#3a2a26;color:#ffeac7}#color-custom-form label{font-size:19px;display:block;margin-bottom:6px}#color-custom-form>div{display:flex;gap:8px}#color-custom-amount{min-width:0;width:100%;height:62px;padding:10px;font-size:28px;color:#39291e;background:#fff8e8;border:0;border-radius:7px}#color-custom-form button{height:62px;padding:0 22px;font-size:24px;border:0;border-radius:7px;background:#e9c67d;color:#352a1c}#color-chip-error{font-size:18px;margin:6px 0 0}

.chip-fan .color-chip-options{display:contents;margin:0}.chip-fan .picker-chip{padding:0;box-shadow:0 4px #34271a;outline:0}.chip-fan .picker-chip.selected{outline:4px solid #ffe08a;filter:none}
.color-sheet{position:absolute;inset:0;z-index:60;background:#201816dd;padding:28px;display:flex;align-items:center;justify-content:center}.color-sheet-card{position:relative;background:#3a2b27;border:2px solid #b9945b;border-radius:18px;padding:30px;color:#fff1d4;width:100%;max-height:1080px;overflow:auto;font-size:24px;line-height:1.5}.color-sheet-card h3{font:700 36px Georgia;margin:0 65px 24px 0}.color-sheet-card h4{font-size:28px;color:#ffe2a5;margin:24px 0 10px}.color-sheet-card p{margin:14px 0}.color-sheet-card a{color:#ffe6a4}.sheet-close{position:absolute;right:14px;top:14px;width:64px;height:64px;border:1px solid #b18a59;border-radius:10px;color:#ffe5b5;background:#63452f;font-size:36px}.color-paytable{width:100%;border-collapse:collapse;font-size:23px}.color-paytable td,.color-paytable th{padding:8px;border-bottom:1px solid #8c6d49;text-align:left}#color-history-list article{border-top:1px solid #80684b;padding:15px 0}#color-history-list article>div{display:flex;gap:8px;margin:7px 0}#color-history-list article span{background:var(--swatch);color:#28251e;padding:3px 8px;border-radius:4px;font-size:22px}#color-history-list article small{display:block;font-size:22px;margin:5px 0}#color-round-id{font-size:20px;color:#cbb68e}

@media(prefers-reduced-motion:reduce){.winning-color,.showing-result .perya-result-board{animation:none}.die-impact{display:none}.perya-game button{transition:none}}
