/* Okey Istanbul / premium responsive surface, 20261002p1. */
.pg-language{display:inline-flex;padding:3px;border:1px solid #ad915b;border-radius:22px;background:#06231e;gap:2px;flex-shrink:0}
.pg-language button{appearance:none;cursor:pointer;border:0;background:transparent;color:#eee9d8;border-radius:18px;min-height:36px;min-width:48px;font:700 13px/1 system-ui,sans-serif;padding:9px 12px}
.pg-language button[aria-pressed=true]{background:linear-gradient(#f5dfa9,#c5a059);color:#241b0d;box-shadow:inset 0 1px #ffefcc,0 1px 3px #0007}
.pg-language button:focus-visible,.pg-mode button:focus-visible{outline:3px solid #fff;outline-offset:2px}
/* The login editor still controls stored colors, typography, visibility and spacing. */
.lp-page.lp-premium{display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:radial-gradient(ellipse at 45% 25%,#13403100 20%,#0007 100%),linear-gradient(var(--lp-background-top,#04241d),var(--lp-background-bottom,#0b392d));isolation:isolate}
.lp-premium-shell{width:min(100%,var(--lp-card-width,440px));border:2px solid var(--lp-accent,#d6bb7f);border-radius:28px;overflow:hidden;position:relative;background:var(--lp-card-background,#062b22);box-shadow:0 24px 70px #0009,inset 0 0 0 5px #c6a76318;margin:auto}
.lp-premium-shell>.pg-language{position:absolute;top:14px;right:14px;z-index:5;box-shadow:0 3px 15px #0005}
.lp-premium .lp-art{height:clamp(175px,41dvh,330px);position:relative;background:linear-gradient(to bottom,#04241d22,#04241d00 45%,var(--lp-card-background,#062b22) 96%),url('premium/istanbul.webp') center 20%/cover no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;padding:48px 12px 12px}
.lp-premium .lp-art-shade{position:absolute;inset:0;background:radial-gradient(ellipse at center,#0000 25%,#031f1866);pointer-events:none}
.lp-premium .lp-brand{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;width:100%;gap:0;line-height:1;text-align:center;text-shadow:0 2px 0 #563c19,0 4px 10px #00140c}
.lp-premium .lp-brand>[data-lp-id=brand]{font-size:var(--lp-font-size,72px);text-transform:uppercase;line-height:1!important;max-width:100%;overflow-wrap:anywhere}
.lp-premium .lp-brand>small{width:100%;font:700 17px/1.5 Georgia,serif;letter-spacing:7px;color:var(--lp-accent,#d6bb7f);text-shadow:0 2px #1b1706}
.lp-tulip{position:absolute;left:49%;top:-31px;transform:rotate(10deg);font-size:26px;line-height:1;background:#fff1cb;border-radius:3px;border:1px solid #b79855;padding:4px;box-shadow:1px 3px 5px #0008}
.lp-premium .lp-top-note{position:relative;display:flex;text-align:center;justify-content:center;font-size:9px;margin-top:4px;max-width:100%;overflow-wrap:anywhere}
.lp-premium .lp-layout{display:block;margin:0;padding:0;max-width:none;width:100%}
.lp-premium .lp-card{padding:16px var(--lp-card-padding,26px) 12px;border:0;border-radius:0;background:var(--lp-card-background,#062b22);box-shadow:none;width:100%;max-width:none}
.lp-premium .lp-form{gap:var(--lp-mobile-field-gap,14px);display:grid}
.lp-premium .lp-field{margin:0;gap:0;display:block}
.lp-premium .lp-input{min-height:50px;border-color:var(--lp-input-border,#7e8d72);background:var(--lp-input-background,#072a22);border-radius:12px;box-shadow:inset 0 1px 8px #0002}
.lp-premium .lp-input>input{min-height:50px;height:50px;padding:12px 44px 12px 46px;font-size:max(16px,var(--lp-mobile-font-size,16px));border:0;color:#f7f1d7;width:100%;min-width:0}
.lp-premium .lp-input>input::placeholder{opacity:.7;color:currentColor}
.lp-premium .lp-input>svg{left:15px;width:20px;height:20px;opacity:.85}
.lp-premium .lp-input-noicon>input{padding-left:15px}
.lp-premium .lp-reveal{min-height:44px;min-width:40px;right:2px;top:3px}
.lp-premium .lp-submit{min-height:52px;border-radius:11px;justify-content:center;margin:0;padding:10px 18px;border:1px solid #e2c781;box-shadow:inset 0 2px 0 #ffffff65,0 4px 6px #0003;background:linear-gradient(var(--lp-button-top,#efd292),var(--lp-button-bottom,#ceac67))}
.lp-premium .lp-submit>.lp-text{text-align:center!important}
.lp-premium .lp-help-link{margin:13px auto 0;min-height:30px;padding:3px 6px}
.lp-premium .lp-notice{margin:14px 0 0}
.lp-premium .lp-message:empty{display:none}
.lp-premium .lp-message{margin-top:10px}
.lp-premium .lp-footer{display:flex;padding:8px 18px;flex-direction:column;gap:5px}
.lp-premium .lp-intro{margin:0 0 16px}
.lp-premium .lp-intro .lp-title{font-size:30px}
.lp-premium .lp-premium-story{padding:12px 25px;text-align:center}
.lp-premium .lp-ornament{height:30px;text-align:center;color:#b9954d;font:23px Georgia,serif;opacity:.65;letter-spacing:14px;margin:0 25px 4px;border-top:1px solid #b9954d44}
.lp-premium-shell:not(:has(.lp-art)){padding-top:56px}
/* Real game viewport; browser chrome is not spoofed or hidden by CSS. */
body.pg-mode{--pg-head:clamp(46px,10dvh,86px);--pg-foot:clamp(44px,9dvh,78px);--pg-rack:clamp(110px,34dvh,308px);--pg-gold:#dbbd78;--pg-ink:#efe9cf;background:#022219;color:var(--pg-ink);overflow:hidden;overscroll-behavior:none}
body.pg-mode #app{height:var(--okey-visible-height,100dvh);min-height:0}
body.pg-mode .app-shell{height:100%;min-height:0;display:block;overflow:hidden;background:#042a20}
body.pg-mode .sidebar,body.pg-mode .topbar,body.pg-mode .app-footer{display:none!important}
body.pg-mode .main-wrap{height:100%;min-height:0;margin:0;padding:env(safe-area-inset-top) max(5px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));display:block}
body.pg-mode .main-content.table-content{margin:0;padding:0;width:100%;max-width:none;height:100%;min-height:0;display:grid;grid-template-rows:var(--pg-head) minmax(0,1fr);gap:0}
body.pg-mode .pg-top{display:flex;align-items:center;justify-content:space-between;gap:8px;background:linear-gradient(#06261cf5,#021c15);border-bottom:1px solid #a98d4e55;padding:3px 10px;margin:0;color:var(--pg-ink);min-width:0;position:relative;z-index:3}
body.pg-mode .pg-title{display:flex;align-items:center;gap:10px;min-width:0;flex:1;max-width:33%}
body.pg-mode .pg-title>div{min-width:0}
body.pg-mode .pg-title h1{font:clamp(17px,2.25vw,34px)/1.06 Georgia,serif;color:#ebd69f;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0}
body.pg-mode .pg-title h1 .robot-badge{font:700 9px/1.2 system-ui;margin-left:6px;vertical-align:middle}
body.pg-mode .pg-title p{font-size:clamp(9px,1.15vw,16px);margin:4px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d2cca9;line-height:1.2}
body.pg-mode .pg-icon-button{border:1px solid #b19c5755;border-radius:50%;background:linear-gradient(140deg,#1b3e31,#082a22);color:var(--pg-ink);min-width:38px;min-height:38px;padding:7px;display:flex;align-items:center;justify-content:center;gap:3px;cursor:pointer;flex-shrink:0}
body.pg-mode .pg-icon-button .icon{width:clamp(18px,2.2vw,34px);height:clamp(18px,2.2vw,34px)}
body.pg-mode .pg-title>.pg-icon-button{border-color:var(--pg-gold);width:clamp(38px,5vw,70px);height:clamp(38px,5vw,70px)}
body.pg-mode .pg-title>.pg-icon-button span{display:none}
body.pg-mode .pg-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}
body.pg-mode .pg-tools .pg-icon-button{flex-direction:column;background:transparent;border:0;border-left:1px solid #e1bc6655;border-radius:0;min-width:50px;padding:4px 8px}
body.pg-mode .pg-tools .pg-icon-button span{font-size:clamp(8px,.95vw,14px);white-space:nowrap}
body.pg-mode .pg-tools .pg-icon-button[aria-pressed=false]{opacity:.45}
body.pg-mode .pg-tools [aria-pressed=true]{color:#f5dfac}
body.pg-mode .pg-tools [data-action=turn-sound]{position:relative}
body.pg-mode .pg-tools [data-action=turn-sound][aria-pressed=true]:after{content:"";background:#55d886;border-radius:50%;width:7px;height:7px;position:absolute;top:4px;right:7px;box-shadow:0 0 5px #53e27c80}
body.pg-mode .pg-tools [data-action=game-menu]{border:1px solid #b9a06c88;border-radius:50%;width:38px;height:38px;min-width:38px}
body.pg-mode .pg-tools [data-action=game-menu] span{display:none}
body.pg-mode .pg-tools [data-action=fullscreen] span{display:none}
body.pg-mode .pg-tools [data-action=fullscreen]{min-width:36px;padding:5px}
body.pg-mode .turn-timer{display:flex;align-items:center;color:#e6c58c;min-width:52px;gap:4px;padding:0}
body.pg-mode .turn-timer .icon{width:17px;height:17px}
body.pg-mode .turn-timer b{font-size:clamp(22px,2.8vw,40px);width:2ch;line-height:1}
body.pg-mode .turn-timer small{font-size:10px}
body.pg-mode .turn-timer.urgent{color:#f5a66b}
body.pg-mode .pg-pot{display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid #af92576b;border-radius:12px;padding:6px 14px;color:#ead69f;background:#002519;min-width:0;max-width:30%}
body.pg-mode .pg-pot>.icon{width:28px;height:28px}
body.pg-mode .pg-pot>div{display:flex;flex-direction:column;min-width:0;gap:2px}
body.pg-mode .pg-pot>div>span{font-size:clamp(8px,.85vw,12px);letter-spacing:1.4px;white-space:nowrap}
body.pg-mode .pg-pot strong{font:700 clamp(22px,3vw,42px)/1 system-ui;color:#f5e6b4;white-space:nowrap}
body.pg-mode .pg-pot strong small{font-size:11px}
body.pg-mode .pg-pot .pg-fee{padding-left:13px;border-left:1px solid #d3b27a44;gap:4px}
body.pg-mode .pg-fee b{font:500 clamp(10px,1.05vw,16px) system-ui;white-space:nowrap}
body.pg-mode .pg-fee span{font-size:clamp(8px,.95vw,14px)!important;letter-spacing:0!important;white-space:nowrap}
body.pg-mode .pg-layout{display:block;position:relative;height:100%;min-height:0}
body.pg-mode .pg-main{display:grid;height:100%;min-height:0;grid-template-rows:minmax(78px,1fr) var(--pg-rack) var(--pg-foot);gap:0}
body.pg-mode .pg-main:has(.pg-observer){grid-template-rows:minmax(0,1fr) 48px}
.pg-felt{position:relative;min-height:0;container-type:size;background:radial-gradient(ellipse at 50% 55%,#14835833,#02271dcc 90%),url('premium/felt.webp') repeat;color:#eee4c1;isolation:isolate;overflow:hidden}
.pg-table-frame{position:absolute;inset:10% 11.7% 2%;border:4px solid #9c824777;outline:1px solid #dabb67aa;box-shadow:inset 0 0 20px #00130cb0,0 6px 6px #0004;border-radius:14px;z-index:-1}
.pg-skyline{position:absolute;inset:20% 22% 12%;background:url('premium/istanbul.webp') center 55%/cover no-repeat;opacity:.12;filter:grayscale(1);mix-blend-mode:luminosity;mask-image:linear-gradient(transparent,black 40%,transparent);z-index:-1}
.pg-player{position:absolute;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;max-width:35%;padding:5px 8px;border:1px solid #a98947;border-radius:14px;background:linear-gradient(120deg,#122d22,#011c16);z-index:2;box-shadow:0 3px 4px #0005;color:#f2edd9}
.pg-player .pg-person{min-width:0;line-height:1.2}
.pg-player strong{display:flex;align-items:center;gap:5px;min-width:0;font:700 clamp(9px,1.35cqw,20px)/1.2 system-ui}
.pg-player .player-name{min-width:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}
.pg-player .robot-badge{font-size:clamp(6px,.85cqw,11px);padding:1px 4px;flex-shrink:0}
.pg-player em{font:700 clamp(9px,1cqw,16px)/1.2 system-ui;color:#e9c168;display:block;margin:4px 0;font-style:normal}
.pg-player small{font:400 clamp(8px,1cqw,15px)/1.3 system-ui;color:#e4dabc;display:block;margin-top:2px;white-space:nowrap}
.pg-avatar{display:flex;align-items:center;justify-content:center;background:linear-gradient(140deg,#435353,#172b25);border:1px solid #a8ad9477;color:#b3b8ae;width:clamp(20px,9cqh,62px);height:clamp(20px,9cqh,62px);border-radius:50%;flex-shrink:0;box-shadow:inset 0 1px 4px #ffffff16}
.pg-avatar .icon{width:70%;height:70%;fill:#aab2a650;stroke-width:1.4}
.pg-player-0{right:2%;top:26%;width:11.5%;height:58%;flex-direction:column;text-align:center;gap:3px}
.pg-player-2{left:2%;top:26%;width:11.5%;height:58%;flex-direction:column;text-align:center;gap:3px}
.pg-player-0 strong,.pg-player-2 strong{flex-wrap:wrap;justify-content:center}
.pg-player-0 .pg-person,.pg-player-2 .pg-person{max-width:100%}
.pg-player-1{left:50%;transform:translateX(-50%);top:1%;height:16%;width:30%;border-radius:12px}
.pg-player-3{left:50%;transform:translateX(-50%);bottom:9%;height:16%;width:30%;border-radius:12px}
.pg-player-1 .pg-person,.pg-player-3 .pg-person{display:grid;grid-template-columns:auto auto;gap:0 8px}
.pg-player-1 strong,.pg-player-3 strong{grid-column:1/-1}
.pg-player-1 .pg-turn-badge,.pg-player-3 .pg-turn-badge{position:absolute;right:7px;top:calc(100% + 2px);font-size:8px}
.pg-turn-badge:empty{display:none}
.pg-turn-badge{display:block;font:700 clamp(8px,1.05cqw,16px)/1.2 system-ui;color:#fff;background:linear-gradient(#e22822,#a30508);border:1px solid #ff5656;box-shadow:0 0 8px #b9000090;padding:3px 7px;border-radius:7px;margin-top:4px}
.pg-player.is-turn{border:2px solid #f33a32;box-shadow:0 0 12px #ff141a8f,inset 0 0 13px #b5000070;background:linear-gradient(130deg,#450c0b,#200d0c)}
.pg-player.is-turn .pg-avatar{color:#ffaaa0;border-color:#f34b44;background:radial-gradient(#a12928,#420e10)}
.pg-player.is-turn .pg-avatar .icon{fill:#f0807955}
.pg-opponent-rack{position:absolute;display:flex;gap:2px;background:url('premium/wood.webp') center/cover;border:3px solid #906938;border-radius:5px;box-shadow:inset 0 2px 1px #e1b572,0 4px 6px #000b;z-index:1;padding:3px 5px}
.pg-backtile{display:flex;justify-content:center;align-items:center;width:10%;height:100%;background:linear-gradient(145deg,#e7dba2,#bba065);border:1px solid #ecdfad;border-radius:3px;box-shadow:inset 1px 2px 0 #fff7,inset -2px -3px 0 #92734477;color:#997c43;font-style:normal;font-size:clamp(8px,2vw,26px)}
.pg-backtile span{opacity:.6}
.pg-opponent-rack>small{position:absolute;right:-10px;bottom:-4px;background:#193324;color:#efe1b4;font-size:8px;border:1px solid #b39154;border-radius:9px;min-width:17px;line-height:16px;text-align:center}
.pg-opponent-1{width:40%;height:15%;top:17%;left:30%}
.pg-opponent-2{width:5%;height:70%;left:13.6%;top:21%;display:flex;flex-direction:column;transform:skewY(-12deg);padding:4px 3px;border-width:3px}
.pg-opponent-2 .pg-backtile{width:100%;height:10%;flex:1;font-size:12px}
.pg-opponent-3{width:40%;height:12%;bottom:-3%;left:30%}
.pg-draw-area{display:flex;gap:clamp(20px,4vw,70px);position:absolute;left:50%;top:56%;transform:translate(-50%,-50%);align-items:center;z-index:1}
.pg-indicator,.pg-stock{display:flex;flex-direction:column;align-items:center;gap:5px;color:#d4d0ab;white-space:nowrap}
body.pg-mode .pg-indicator>.tile{width:clamp(32px,6cqw,90px);height:clamp(40px,27cqh,112px);min-height:0;padding:3px;flex-basis:auto}
body.pg-mode .pg-indicator>.tile b{font-size:clamp(22px,18cqh,64px);line-height:1.05}
.pg-draw-area small{font-size:clamp(8px,1.15cqw,17px);color:#c9cba4}
.pg-stock{border:0;background:transparent;padding:3px;cursor:pointer;min-height:44px;min-width:48px;position:relative}
.pg-stock:disabled{opacity:.9;cursor:default}
.pg-stock:not(:disabled) .pg-stock-tiles{box-shadow:0 0 13px #ebd07155;outline:1px solid #fff1b988}
.pg-stock-tiles{position:relative;display:block;width:clamp(32px,6cqw,90px);height:clamp(40px,27cqh,112px);background:linear-gradient(130deg,#e5d598,#b9a366);border:2px solid #f4e6b1;border-radius:6px;box-shadow:inset 0 0 0 4px #c1a66266;isolation:isolate}
.pg-stock-tiles>i{position:absolute;inset:-5px 3px 3px 3px;border:2px solid #e9dfb4;background:#d8ca95;z-index:-1;border-radius:4px}
.pg-stock-tiles>i:first-child{inset:-8px -5px 7px 7px}
.pg-stock-tiles>b{font:700 clamp(20px,5cqw,38px)/1 system-ui;color:#5b4d2b;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
.pg-discard{position:absolute;z-index:2;background:transparent;border:1px solid transparent;border-radius:7px;padding:3px;min-width:27px;min-height:34px;cursor:pointer}
.pg-discard:disabled{opacity:.3;cursor:default}
.pg-discard.available{border:1px dashed #efcd74;background:#fedb5914;box-shadow:0 0 7px #e8cf6850}
body.pg-mode .pg-discard .tile{width:clamp(22px,3cqw,46px);height:clamp(28px,14cqh,56px);min-height:0;padding:2px;flex-basis:auto;pointer-events:none}
body.pg-mode .pg-discard .tile b{font-size:clamp(17px,9cqh,33px);line-height:1}
body.pg-mode .pg-discard .tile i{font-size:clamp(5px,3cqh,9px);margin:0}
.pg-empty-discard{display:block;width:20px;height:26px;border:1px dashed #bdae6255;border-radius:4px}
.pg-discard-0{right:16%;bottom:8%}.pg-discard-1{left:70%;top:1%}.pg-discard-2{left:20%;top:35%}.pg-discard-3{left:25%;bottom:4%}
/* Two persistent rows with empty grouping slots. Real draggable buttons, never a screenshot. */
.pg-rack-wrap{position:relative;display:grid;grid-template-rows:22px minmax(0,1fr);gap:0;padding:0 2%;min-height:0;background:linear-gradient(#002c1f,#06291f)}
.pg-rack-mini{display:flex;justify-content:space-between;align-items:center;padding:0 7px;color:#cbbd92;min-width:0;font-size:10px}
.pg-rack-mini>span{display:flex;gap:8px;align-items:center;white-space:nowrap}.pg-rack-mini small{font-size:9px;color:#97ad92}
.pg-rack-mini>div{display:flex;align-items:center;gap:4px}
body.pg-mode .pg-rack-mini .btn{min-height:21px;height:21px;padding:2px 8px;border-radius:5px;border:1px solid #a4916444;background:transparent;color:#d4c69b;font-size:10px;line-height:1}
body.pg-mode .pg-rack-mini .icon{width:13px;height:13px}
.pg-rack{position:relative;display:grid;grid-template-rows:1fr 1fr;gap:0;min-height:0;width:100%;padding:5px 16px 8px;background:linear-gradient(#c3975966,#73492166),url('premium/wood.webp') center/cover;border:3px solid #d2ae6b;border-radius:9px 9px 2px 2px;box-shadow:inset 0 2px 0 #f7d494,inset 0 -5px 0 #7a5427,0 5px 6px #0007;isolation:isolate}
.pg-rack:before,.pg-rack:after{content:"";position:absolute;width:14px;top:-5px;bottom:-2px;border-radius:8px 4px 1px 1px;background:linear-gradient(90deg,#870007,#e60a15 52%,#ae0010);border:1px solid #6c0d10;box-shadow:inset 0 4px #ff5b5244,2px 3px 5px #0005;z-index:2}
.pg-rack:before{left:-5px;transform:skewX(-3deg)}.pg-rack:after{right:-5px;transform:skewX(3deg)}
.pg-rack-row{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:clamp(2px,.35vw,6px);align-items:stretch;min-height:0;padding:4px 1px 6px;border-bottom:5px solid #c39656;box-shadow:0 2px 2px #43240d,inset 0 -3px 0 #69451d}
.pg-rack-row+.pg-rack-row{padding-top:5px;background:linear-gradient(#d2a36a11,#8b5a2133)}
.rack-slot{min-width:0;min-height:0;position:relative;display:flex;align-items:stretch;touch-action:none;border-radius:5px}
body.pg-mode #tile-rack .tile{width:100%;height:100%;min-width:0;min-height:0;flex:auto;padding:2px 1px 3px;margin:0;border-radius:5px;touch-action:none;cursor:grab;box-shadow:inset 1px 2px 0 #fff,inset -2px -3px 0 #c0b28a,0 3px 3px #3d230fcc;border:1px solid #ccc3a3;background:linear-gradient(110deg,#fffbee,#f2e8ca);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:transform .1s,box-shadow .1s;transform:none}
body.pg-mode #tile-rack .tile b{font:bold clamp(22px,6.7dvh,65px)/1 Georgia,serif;letter-spacing:-1px}
body.pg-mode .tile i{background:none;border-radius:0;display:block;height:auto;width:auto;font-style:normal;font-size:clamp(7px,2.5dvh,20px);line-height:1.1;margin-top:3px;color:inherit}
body.pg-mode .tile i:after{content:"\2665"}
body.pg-mode .tile{color:#283125;isolation:isolate}
body.pg-mode .tile.color-0{color:#a12013}body.pg-mode .tile.color-1{color:#967415}body.pg-mode .tile.color-2{color:#155399}body.pg-mode .tile.color-3{color:#161e17}
body.pg-mode .tile.wild{outline:2px solid #c39b32;outline-offset:-2px}
body.pg-mode .tile em{font-size:6px;position:absolute;bottom:0;right:1px;line-height:1.1;color:#8f6a11;background:#fff4cccf;letter-spacing:0}
body.pg-mode #tile-rack .tile.selected{outline:2px solid #ecba3c;box-shadow:0 0 0 2px #572f10,0 0 12px #ffd46a,inset 0 0 0 2px #fff1aa;transform:translateY(-3px);z-index:3}
.pg-empty-slot{background:transparent;border:0;width:100%;min-width:0;height:100%;min-height:0;padding:0;cursor:pointer;touch-action:none;border-radius:4px}
.pg-empty-slot:focus-visible{outline:2px solid #eed995!important;outline-offset:-3px}
.rack-slot.touch-drop-target{background:#eed28666;outline:2px solid #ffdf70;outline-offset:-1px}
#tile-rack .touch-sorting{opacity:.3}
body.pg-mode .mobile-drag-ghost{font-size:26px;border-radius:5px;background:#f8f1d9;color:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 10px 15px #0009;border:1px solid #f1ddb2}
.mobile-drag-ghost b{font-size:30px}.mobile-drag-ghost.color-0{color:#a12013}.mobile-drag-ghost.color-1{color:#967415}.mobile-drag-ghost.color-2{color:#155399}.mobile-drag-ghost.color-3{color:#161e17}
.pg-controls{display:flex;align-items:center;justify-content:space-between;padding:4px 2%;gap:8px;border-top:2px solid #b18c45;background:linear-gradient(#063323,#021f17);color:#eee4c5;min-height:0}
.pg-balance{display:flex;flex-direction:column;gap:3px;min-width:0}.pg-balance strong{font-size:clamp(13px,1.7vw,26px);white-space:nowrap;line-height:1.1}.pg-balance small{font-size:clamp(8px,1.05vw,15px);color:#c7cbb0;line-height:1.1}
.pg-actions{display:flex;align-items:stretch;gap:8px;height:100%;padding:1px 0}
body.pg-mode .pg-play{display:flex;align-items:center;justify-content:center;gap:7px;padding:6px clamp(12px,2vw,30px);border:1px solid #c5a663;border-radius:10px;background:linear-gradient(#163c2f,#05251c);color:#e7d9aa;font-size:clamp(11px,1.4vw,21px);min-height:34px;box-shadow:inset 0 1px 0 #f3dfad44,0 2px 4px #0004;white-space:nowrap}
body.pg-mode .pg-play .icon{width:clamp(17px,2vw,26px);height:clamp(17px,2vw,26px)}
body.pg-mode .pg-play.primary{background:linear-gradient(#f7dfa4,#c09c51);color:#231807;font-weight:750;border-color:#e2bd73}
body.pg-mode .pg-play:disabled{opacity:.38;cursor:not-allowed}
.pg-observer{display:flex;align-items:center;justify-content:center;color:#c8d3b7;font-size:13px}
/* Modal chat is available on both desktop and handheld screens. */
body.pg-mode #table-chat{display:none;position:fixed;z-index:1200;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));bottom:max(12px,env(safe-area-inset-bottom));width:min(380px,90vw);height:auto;max-height:calc(var(--okey-visible-height,100dvh) - 24px);overflow:hidden;box-shadow:0 20px 60px #000a;background:#f4f1df;min-height:0}
body.pg-mode.phone-chat-open #table-chat{display:flex;flex-direction:column}
body.pg-mode #table-chat .chat-close{display:flex!important;margin-left:auto;min-width:38px;min-height:38px}
body.pg-mode #table-chat .chat-messages{flex:1;min-height:0;overflow:auto}
body.pg-mode #table-chat #chat-form{display:flex;flex-shrink:0}
body.pg-mode.phone-chat-open .mobile-chat-scrim{display:block;position:fixed;inset:0;background:#0008;border:0;z-index:1190}
.pg-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 18px}
.pg-menu-grid .btn{min-height:44px;padding:10px;font-size:13px}
.pg-sound-settings{border-top:1px solid #d9d4bf;padding-top:14px}
.pg-sound-settings label{display:flex;justify-content:space-between;align-items:center;padding:8px 0}
.pg-sound-settings input[type=checkbox]{width:22px;height:22px}
.pg-sound-settings input[type=range]{width:100%;accent-color:#34765e}
/* Space budget on phones: controls stay reachable, both rack levels remain visible. */
@media(max-width:1000px){body.pg-mode .pg-pot{padding:4px 9px;gap:7px}body.pg-mode .pg-pot>.icon{display:none}body.pg-mode .pg-pot .pg-fee{padding-left:8px}body.pg-mode .pg-tools{gap:2px}body.pg-mode .pg-tools .pg-icon-button{padding:4px 5px;min-width:42px}body.pg-mode .pg-title{max-width:30%;gap:6px}.pg-player strong{font-size:10px}.pg-player-1,.pg-player-3{border-radius:8px;padding:3px 6px}.pg-player-0,.pg-player-2{padding:4px 5px;border-radius:10px}.pg-player-0 .pg-avatar,.pg-player-2 .pg-avatar{width:clamp(18px,13cqh,34px);height:clamp(18px,13cqh,34px)}.pg-turn-badge{padding:2px 5px;border-radius:5px;margin-top:3px}.pg-controls{padding-left:12px;padding-right:12px}.pg-actions{gap:6px}}
@media(max-width:680px){body.pg-mode{--pg-head:44px;--pg-foot:44px;--pg-rack:clamp(104px,36dvh,154px)}body.pg-mode .pg-top{gap:4px;padding:2px 3px}body.pg-mode .pg-title{max-width:31%}body.pg-mode .pg-title h1{font-size:17px}body.pg-mode .pg-title p{font-size:8px}body.pg-mode .pg-pot{max-width:27%;gap:2px;padding:4px 5px;border-radius:8px}body.pg-mode .pg-pot .pg-fee{border:0;padding-left:4px}body.pg-mode .pg-pot .pg-fee span{font-size:7px!important;white-space:normal;max-width:75px}body.pg-mode .pg-pot .pg-fee b{font-size:9px}body.pg-mode .pg-pot>div>span{letter-spacing:.3px;font-size:7px}body.pg-mode .pg-pot strong{font-size:22px}body.pg-mode .pg-tools .pg-icon-button span{display:none}body.pg-mode .pg-tools .pg-icon-button{min-width:28px;min-height:34px;padding:4px}body.pg-mode .pg-tools [data-action=game-menu]{width:32px;min-width:32px;height:34px}body.pg-mode .turn-timer{min-width:42px;gap:2px}body.pg-mode .turn-timer .icon{display:none}body.pg-mode .turn-timer b{font-size:20px}body.pg-mode .pg-tools [data-action=fullscreen]{min-width:28px}.pg-player strong{font-size:8px}.pg-player small{font-size:7px}.pg-player .robot-badge{font-size:6px;padding:0 2px}.pg-player .pg-person{max-width:100%}.pg-player-1,.pg-player-3{width:33%}.pg-player-1 .pg-person,.pg-player-3 .pg-person{gap:0 4px}.pg-rack-wrap{padding:0 1.5%;grid-template-rows:20px 1fr}.pg-rack{padding:3px 9px 5px;border-width:2px}.pg-rack:before,.pg-rack:after{width:9px}.pg-rack-row{gap:2px;padding-top:3px;padding-bottom:4px;border-bottom-width:4px}.pg-rack-row+.pg-rack-row{padding-top:3px}.pg-rack-mini{padding:0 1px;font-size:9px}.pg-rack-mini small{display:none}body.pg-mode .pg-rack-mini .btn{font-size:9px;padding:2px 6px;min-height:20px;height:20px}body.pg-mode #tile-rack .tile b{font-size:clamp(20px,6.5dvh,28px);letter-spacing:-.7px}body.pg-mode .pg-play{gap:4px;padding:6px 10px;font-size:10px;border-radius:7px}.pg-balance strong{font-size:12px}.pg-balance small{font-size:8px}.pg-actions{gap:5px}}
@media(max-height:360px) and (orientation:landscape){body.pg-mode{--pg-head:40px;--pg-foot:38px;--pg-rack:110px}body.pg-mode .main-wrap{padding-top:0}body.pg-mode .pg-title h1{font-size:16px}body.pg-mode .pg-title p{font-size:8px}body.pg-mode .pg-icon-button{min-height:32px;min-width:32px}body.pg-mode .pg-title>.pg-icon-button{width:32px;height:32px}body.pg-mode .pg-tools .pg-icon-button{min-height:30px}body.pg-mode .pg-pot strong{font-size:20px}.pg-player-0 .pg-avatar,.pg-player-2 .pg-avatar{display:none}.pg-player-0 small,.pg-player-2 small{font-size:7px}.pg-player-1 .pg-avatar,.pg-player-3 .pg-avatar{width:17px;height:17px}.pg-player-1,.pg-player-3{height:20%}.pg-opponent-1{top:23%;height:11%}.pg-opponent-3{height:8%}.pg-player-3{bottom:6%}.pg-player-1 strong,.pg-player-3 strong{font-size:8px}.pg-player-1 small,.pg-player-3 small{font-size:7px}.pg-draw-area{top:54%;gap:20px}body.pg-mode .pg-indicator>.tile,.pg-stock-tiles{height:32px;width:28px}body.pg-mode .pg-indicator>.tile b{font-size:22px}.pg-draw-area small{font-size:7px}.pg-stock-tiles>b{font-size:20px}.pg-turn-badge{font-size:7px;padding:2px 3px}.pg-controls{padding:2px 10px}body.pg-mode .pg-play{min-height:32px;font-size:10px}.pg-balance small{font-size:7px}}
@media(max-height:280px) and (orientation:landscape){body.pg-mode{--pg-head:36px;--pg-foot:34px;--pg-rack:100px}.pg-opponent-rack{display:none}body.pg-mode .pg-main{grid-template-rows:minmax(60px,1fr) var(--pg-rack) var(--pg-foot)}.pg-player-1,.pg-player-3{height:20px}.pg-player-3{bottom:1%}.pg-player-1 small,.pg-player-3 small{display:none}.pg-player-0,.pg-player-2{height:48px;top:18%}.pg-player-0 em{margin:1px}.pg-player-0 small:nth-of-type(2),.pg-player-2 small:nth-of-type(2){display:none}.pg-player-0 strong,.pg-player-2 strong{font-size:8px}body.pg-mode .pg-tools .pg-icon-button span{display:none}body.pg-mode .pg-title p{display:none}}
@media(max-width:480px){.lp-page.lp-premium{padding:8px}.lp-premium .lp-card{padding:12px var(--lp-mobile-padding,18px) 8px}.lp-premium .lp-art{height:clamp(160px,40dvh,285px)}.lp-premium .lp-brand>[data-lp-id=brand]{font-size:calc(var(--lp-mobile-font-size,44px) * 1.45)}.lp-premium .lp-brand>small{font-size:15px;letter-spacing:6px}.lp-premium-shell{border-radius:23px}.lp-premium .lp-art .lp-top-note{margin-top:3px}.lp-premium .lp-ornament{height:25px;margin-bottom:4px}.topbar-right>.pg-language button{min-width:32px;padding:8px;font-size:11px}}
@media(max-height:600px) and (orientation:portrait){.lp-premium .lp-art{height:180px}.lp-premium .lp-input,.lp-premium .lp-input>input{min-height:46px;height:46px}.lp-premium .lp-submit{min-height:46px}.lp-premium .lp-form{gap:10px}.lp-premium .lp-help-link{margin-top:8px}.lp-premium .lp-art .lp-top-note{display:none}.lp-premium .lp-ornament{height:20px}.lp-premium-shell>.pg-language{top:9px;right:9px}}
@media(max-height:480px) and (orientation:landscape){.lp-premium-shell{width:min(760px,97vw);display:grid;grid-template-columns:43% 57%;align-items:center;min-height:260px}.lp-premium .lp-art{height:100%;min-height:260px;padding-top:48px}.lp-premium .lp-layout{padding-top:46px}.lp-premium .lp-card{padding-top:8px;padding-bottom:8px}.lp-premium .lp-ornament{display:none}.lp-premium .lp-brand>[data-lp-id=brand]{font-size:52px}.lp-premium .lp-footer,.lp-premium .lp-premium-story{grid-column:1/-1}.lp-premium .lp-input,.lp-premium .lp-input>input{height:44px;min-height:44px}.lp-premium .lp-submit{min-height:44px}.lp-premium .lp-form{gap:10px}.lp-premium .lp-help-link{margin-top:6px}}
@media(prefers-reduced-motion:reduce){.pg-mode *, .lp-premium *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Preserve upright tile proportions on short landscape viewports. */
body.pg-mode .rack-slot{container-type:size;justify-content:flex-start}
body.pg-mode #tile-rack .tile{width:auto;max-width:100%;height:100%;aspect-ratio:.82;flex:0 0 auto;overflow:hidden;gap:0}
body.pg-mode #tile-rack .tile b{font-size:clamp(16px,62cqh,62px);line-height:1;flex:0 0 auto}
body.pg-mode #tile-rack .tile i{font-size:clamp(5px,17cqh,17px);margin-top:1px;line-height:1;flex:0 0 auto}
@media(max-height:500px) and (orientation:landscape){
 body.pg-mode{--pg-rack-h:clamp(128px,39dvh,200px)}
 body.pg-mode .pg-main{grid-template-rows:minmax(75px,1fr) var(--pg-rack-h) var(--pg-foot)}
 body.pg-mode .pg-rack-row{padding:1px 1px 3px;border-bottom-width:3px}
 body.pg-mode .pg-rack{padding-top:3px;padding-bottom:5px}
 body.pg-mode .pg-rack-mini>div .btn{min-width:27px}
}
@media(min-height:361px) and (max-height:500px) and (orientation:landscape){
 .pg-player-0,.pg-player-2{top:21%;height:70%;padding:3px 5px}
 .pg-player-0 .pg-avatar,.pg-player-2 .pg-avatar{width:18px;height:18px}
 .pg-player-0 small,.pg-player-2 small{margin-top:1px;line-height:1.1}
}
@media(max-height:280px) and (orientation:landscape){body.pg-mode .pg-main{grid-template-rows:minmax(56px,1fr) 106px var(--pg-foot)}}
body.pg-mode .pg-observer{display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;padding:5px 12px}
body.pg-mode .pg-observer .btn{flex-shrink:0;font-size:11px;min-height:32px}
body.pg-mode .pg-connection{display:inline-flex;align-items:center;justify-content:center;min-width:8px;margin:0 2px}
body.pg-mode .pg-connection .live-dot{width:6px;height:6px}
body.pg-mode .pg-connection.offline .live-dot{background:#f0443d;box-shadow:0 0 6px #e4382d}
