:root{--forest:#102d25;--forest-mid:#194333;--felt:#23533e;--felt-dark:#163b2f;--gold:#c8a36c;--cream:#f8f2e5;--muted:#aab9ac;--ink:#111b17;--line:rgba(223,209,169,.22)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#0a211c;color:var(--cream);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}button,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}.hidden{display:none!important}.page-shell{max-width:1500px;margin:0 auto;padding:0 26px}.sitebar{min-height:84px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}.identity{display:flex;gap:13px;align-items:center;white-space:nowrap}.identity img{border-radius:9px;box-shadow:0 2px 14px #0005}.identity strong{font-size:18px;letter-spacing:1.7px;font-weight:900}.identity strong span{color:var(--gold)}.identity small{display:block;color:#c6bd9f;font-size:10px;letter-spacing:2px;margin-top:3px}.header-actions{display:flex;align-items:center;gap:13px}.balance{display:flex;flex-direction:column;text-align:right;margin-right:6px}.balance span{color:var(--muted);letter-spacing:1.4px;font-size:9px;font-weight:800}.balance b{font-size:20px;letter-spacing:.2px;font-variant-numeric:tabular-nums;color:#e5c48f}.outline-btn,.icon-btn,.secondary-btn,.text-btn{background:none;color:#efe7d5;border:1px solid var(--line);border-radius:9px;padding:12px 16px;font-weight:750;letter-spacing:.5px}.outline-btn:hover,.icon-btn:hover,.secondary-btn:hover{border-color:var(--gold);background:#ffffff0b}.icon-btn{font-size:20px;padding:8px 13px}.mobile-only{display:none}.main-layout{max-width:1370px;margin:0 auto}.game-heading{display:flex;justify-content:space-between;align-items:flex-end;padding:26px 6px 18px}.eyebrow,.dialog-label{color:#c8a36c;letter-spacing:2.4px;font-size:10px;font-weight:850}.sep{color:#a8b7a6;margin:0 9px}.game-heading h1{font:normal 39px/1.08 Georgia,"Times New Roman",serif;letter-spacing:-.8px;margin:7px 0 0}.stat-group{display:flex;gap:25px}.stat-group>div{border-left:1px solid var(--line);padding-left:16px}.stat-group small,.stat-group b{display:block;text-align:right}.stat-group small{font-size:10px;color:var(--muted);letter-spacing:1.3px}.stat-group b{margin-top:5px;font-size:18px}.table-frame{padding:13px;border-radius:29px;border:5px solid #775435;box-shadow:0 6px 0 #422f20,inset 0 1px 0 #ddbc80,0 18px 55px #0006;background:repeating-linear-gradient(95deg,#7a5639 0px,#64432a 22px,#805b3e 47px,#62432c 71px);height:510px}.table-inner{height:100%;position:relative;border-radius:17px;border:2px solid #72927b;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#2b6149 0,#24523d 49%,#173c2f 100%);box-shadow:inset 0 0 85px #00190d90}.table-inner:after{content:"";position:absolute;inset:12px;border:1px solid #efdcaa35;border-radius:9px;pointer-events:none}.table-topline{position:absolute;top:23px;left:28px;right:28px;display:flex;align-items:center;justify-content:space-between;color:#e3e6d7;z-index:4;font-size:12px;gap:5px}.topline-badge{font-size:9px;letter-spacing:1.1px;color:#c5cdb5}.topline-badge:first-child{color:#e5b87c}.felt-watermark{position:absolute;top:39%;left:50%;transform:translate(-50%,-50%);font:normal 94px/1 Georgia,serif;opacity:.09;white-space:nowrap;pointer-events:none}.felt-watermark span{font:10px system-ui;display:block;text-align:center;letter-spacing:7px}.opponent{position:absolute;z-index:5;display:flex;align-items:center;gap:8px;pointer-events:none}.opponent-top{top:74px;left:50%;transform:translateX(-50%);flex-direction:column}.opponent-left{left:17px;top:50%;transform:translateY(-40%);flex-direction:column}.opponent-right{right:17px;top:50%;transform:translateY(-40%);flex-direction:column}.opponent .op-data{display:flex;align-items:center;gap:7px;background:#0e2e25d9;border:1px solid #ffffff23;border-radius:99px;padding:6px 13px;white-space:nowrap}.opponent .op-data.active{border-color:#dfbe7e;box-shadow:0 0 0 2px #e3b06b27}.opponent .avatar{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#ac9873;color:#142d23;font-weight:850;font-size:12px}.opponent .name{font-size:11px;font-weight:750;letter-spacing:1px}.opponent .count{font-size:10px;opacity:.75}.opponent .backs{display:flex;gap:2px;justify-content:center}.opponent-left .backs,.opponent-right .backs{max-width:85px;flex-wrap:wrap}.tile-back{width:15px;height:27px;background:linear-gradient(145deg,#d4c49f,#a28e68);border-radius:3px;border:2px solid #e9d8ae;box-shadow:1px 2px 4px #0007;position:relative}.tile-back:after{content:'◆';position:absolute;left:0;right:0;top:4px;text-align:center;color:#5c4936;font-size:9px}.opponent .pass-mark{font-size:10px;color:#fff7dd;background:#8b4e2b;padding:2px 7px;border-radius:3px}.play-area{position:absolute;z-index:3;top:46%;left:50%;transform:translate(-50%,-35%);width:min(76%,940px)}.ends{display:flex;align-items:center;justify-content:space-between;color:#f2dbab;gap:12px;font-size:10px;letter-spacing:1.5px;font-weight:850}.ends b{color:#b6c4b3;font-size:9px;white-space:nowrap}.board-surface{margin-top:10px;min-height:112px;display:flex;align-items:center;border-top:1px solid #ffffff2b;border-bottom:1px solid #ffffff2b;background:#00261924;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#bfa37266 transparent;padding:17px 14px;scroll-behavior:smooth}.board-chain{display:flex;align-items:center;gap:3px;min-width:100%;width:max-content;justify-content:center}.board-chain.has-tiles{min-width:max-content}.board-empty{color:#acc3b3;font-family:Georgia,serif;font-style:italic;font-size:18px;white-space:nowrap;padding:18px}.board-tools{display:flex;justify-content:space-between;align-items:center;gap:4px;color:#b5c5b6;font-size:10px;letter-spacing:.5px;margin-top:7px}.board-tools button{background:#0526195c;border:0;border-radius:4px;color:#e2d4b4;font-weight:800;letter-spacing:1px;padding:5px 9px}.table-bottomline{position:absolute;bottom:18px;left:33px;right:33px;display:flex;justify-content:space-between;color:#c4d0bd91;font-size:9px;letter-spacing:2px}.domino{display:inline-flex;align-items:stretch;flex-shrink:0;padding:3px;border-radius:6px;background:linear-gradient(#fffdf6,#e8e3d6);border:1px solid #918d7e;box-shadow:0 3px 1px #868274,0 5px 8px #001a1480;position:relative;color:var(--ink)}.domino:after{content:'';position:absolute;inset:2px;border:1px solid #d0cbbf;pointer-events:none;border-radius:3px}.half{width:30px;height:42px;position:relative;display:inline-block}.half+.half{border-left:2px solid #a8a195}.pip{position:absolute;width:6px;height:6px;border-radius:50%;background:#202621;transform:translate(-50%,-50%);box-shadow:inset 1px 1px 1px #0007}.pip.x0{left:50%}.pip.x1{left:24%}.pip.x2{left:76%}.pip.y0{top:50%}.pip.y1{top:23%}.pip.y2{top:77%}.board-chain .half{width:27px;height:37px}.board-chain .pip{width:5px;height:5px}.board-chain .domino{padding:2px}.board-chain .placed-latest .domino{outline:2px solid #f2c476;outline-offset:2px}.player-area{padding:21px 22px 9px;border-radius:0 0 20px 20px;min-height:203px;background:linear-gradient(#16382d,#0f2b23);border:1px solid #ffffff11;border-top:0}.hand-heading{display:flex;gap:12px;align-items:center}.your-avatar{display:grid;place-items:center;height:39px;width:39px;border:1px solid #e3bc7e;background:#bb9a6a;border-radius:50%;font-family:Georgia,serif;font-size:21px;font-weight:700;color:#163628}.hand-heading strong{display:block;font-size:12px;letter-spacing:1.4px}.hand-heading small{display:block;color:#b9cabb;margin-top:2px;font-size:11px}.hand-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.hand-actions .secondary-btn{padding:9px 16px;font-size:11px}.tile-count{font-size:10px;letter-spacing:1px;color:var(--gold)}.hand-row{display:flex;justify-content:center;gap:9px;align-items:center;min-height:103px;overflow-x:auto;padding:13px 0 15px;scrollbar-color:#d2b98245 transparent;scrollbar-width:thin}.hand-tile{background:transparent;border:0;outline:0;padding:3px;position:relative;transition:transform .16s,filter .16s}.hand-tile .domino .half{width:32px;height:48px}.hand-tile .domino .pip{width:7px;height:7px}.hand-tile.can-play:hover,.hand-tile.can-play:focus-visible{transform:translateY(-9px)}.hand-tile.can-play .domino{outline:2px solid #e9c58d;outline-offset:2px}.hand-tile.not-playable{filter:brightness(.59) grayscale(.3)}.hand-tile:not(:disabled) .domino{cursor:pointer}.hand-tile:disabled{opacity:1;cursor:default}.game-footer{border-top:1px solid #ffffff13;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;font-size:11px;color:#b5c4b3}.game-footer>div{display:flex;gap:12px}.text-btn{font-size:11px;border:0;padding:5px;color:#dec59c;font-weight:650}.text-btn:hover{text-decoration:underline}.footer{padding:18px 5px 26px;display:flex;gap:20px;justify-content:space-between;color:#8aa091;font-size:11px}.overlay{position:fixed;inset:0;background:#051b16d9;z-index:100;display:flex;justify-content:center;align-items:center;padding:20px;backdrop-filter:blur(5px)}.dialog{background:#17352a;border:1px solid #b69765;border-radius:16px;box-shadow:0 25px 110px #000b;padding:28px;width:min(100%,445px);position:relative}.small-dialog{max-width:370px}.dialog h2{font:normal 31px/1.13 Georgia,serif;margin:9px 0 15px}.dialog p{color:#c7d0bd;line-height:1.65}.dialog .close-btn{position:absolute;top:13px;right:13px;border:0;background:#ffffff12;color:white;font-size:24px;border-radius:8px;height:34px;width:34px}.primary-btn{background:#dfb779;color:#173327;border:1px solid #edd2a1;border-radius:8px;padding:14px 17px;font-weight:850;letter-spacing:.7px}.primary-btn:hover{background:#f3cf95}.side-options{display:flex;gap:10px;margin-top:25px}.side-options button{flex:1}.full{width:100%;margin-top:16px}.result-dialog{text-align:center}.result-dialog .dialog-label{text-align:center}.result-emblem{font:normal 58px Georgia,serif;color:#e5bc77;margin-top:12px}.result-dialog h2{margin-top:7px}.result-stats{display:flex;background:#071f186e;border:1px solid #ffffff19;border-radius:10px;padding:15px;gap:16px;justify-content:space-between}.result-stats>div{flex:1}.result-stats small,.result-stats b{display:block}.result-stats small{color:#aac1af;letter-spacing:1px;font-size:9px}.result-stats b{font-size:20px;color:#e6c487;margin-top:5px}.refill-note{font-size:12px;color:#e8c78c!important}.input-label{display:block;color:#e3d1a7;letter-spacing:.5px;font-weight:700;margin:18px 0 8px}select{padding:13px 11px;color:#f8efdc;background:#0d281f;border:1px solid #647466;border-radius:7px;width:100%}.settings-note{font-size:12px}.rules-list{padding-left:22px;line-height:1.6;color:#d6ddca}.rules-list li{margin:8px 0}#installInstructions{white-space:pre-line}
@media(max-width:850px){.page-shell{padding:0 12px}.sitebar{min-height:73px}.identity strong{font-size:14px;letter-spacing:.8px}.identity small{font-size:8px;letter-spacing:1px}.identity img{width:35px;height:35px}.header-actions{gap:6px}.balance{margin-right:3px}.balance b{font-size:15px}.balance span{font-size:8px}.outline-btn{padding:10px 9px;font-size:11px}.icon-btn{font-size:17px;padding:7px 8px}.mobile-only{display:inline}.desktop-only{display:none}.game-heading{padding:23px 6px 15px}.game-heading h1{font-size:32px}.stat-group{gap:12px}.stat-group b{font-size:13px}.stat-group small{font-size:8px}.table-frame{height:460px;border-width:4px;padding:9px;border-radius:20px}.table-topline{top:14px;left:14px;right:14px}.topline-badge{font-size:8px}.opponent-top{top:58px}.opponent-left{left:7px}.opponent-right{right:7px}.opponent .op-data{padding:5px 7px;gap:3px}.opponent .name{font-size:9px}.opponent .count{font-size:9px}.opponent .avatar{width:19px;height:19px;font-size:10px}.opponent-left .backs,.opponent-right .backs{max-width:47px}.opponent .backs .tile-back{width:12px;height:22px}.play-area{width:76%;top:46%;transform:translate(-50%,-28%)}.ends{font-size:8px;letter-spacing:.3px}.ends b{font-size:8px;display:none}.board-surface{min-height:91px;padding:9px 7px}.board-chain .half{width:23px;height:31px}.board-chain .pip{width:5px;height:5px}.table-bottomline{left:19px;right:19px;font-size:8px}.hand-row{justify-content:flex-start}.player-area{padding:15px 9px 8px}.hand-tile .domino .half{width:27px;height:40px}.hand-tile .domino .pip{width:6px;height:6px}.hand-row{gap:4px}.footer{flex-direction:column;gap:3px;font-size:10px}}@media(max-width:490px){.sitebar{flex-wrap:wrap;padding:9px 0;gap:4px}.identity{gap:6px}.identity strong{font-size:12px}.identity small{font-size:7px}.balance b{font-size:13px}.balance span{font-size:7px}.header-actions{margin-left:auto}.game-heading h1{font-size:27px}.stat-group{gap:6px}.stat-group>div{padding-left:8px}.game-heading .eyebrow{font-size:9px}.table-frame{height:410px}.table-topline{top:13px}.topline-badge:last-child{display:none}.opponent-top{top:52px}.opponent-left,.opponent-right{top:51%}.opponent-left .op-data,.opponent-right .op-data{padding:5px 4px}.opponent-left .name,.opponent-right .name{font-size:8px}.opponent-left .avatar,.opponent-right .avatar{display:none}.opponent-left .backs,.opponent-right .backs{max-width:36px}.opponent-left .tile-back,.opponent-right .tile-back{width:12px;height:17px}.play-area{width:74%;top:49%}.ends{font-size:7px}.board-surface{min-height:83px}.board-chain .half{width:21px;height:28px}.board-chain .pip{width:4px;height:4px}.board-tools{font-size:9px}.board-tools button{font-size:8px}.felt-watermark{font-size:65px}.table-bottomline{font-size:7px}.your-avatar{height:34px;width:34px}.hand-heading strong{font-size:11px}.hand-heading small{font-size:10px}.tile-count{font-size:9px}.hand-actions{gap:6px}.hand-actions .secondary-btn{padding:8px}.hand-row{gap:1px;min-height:91px}.hand-tile{padding:1px}.hand-tile .domino{padding:2px}.hand-tile .domino .half{width:19px;height:33px}.hand-tile .domino .pip{width:5px;height:5px}.game-footer{font-size:10px;align-items:flex-start}.game-footer>div{gap:0}.text-btn{font-size:10px}.side-options{flex-direction:column}}

/* ===============================================================
   DOMINO KERETA v1.1 — immersive, landscape-first table
   =============================================================== */
:root{--rail:#e5c28c;--table-ring:#ba8a4b;--table-rim:#47291b;--table-glow:#4d8a61}
html{height:100%;overscroll-behavior:none}body{min-height:100%;background:radial-gradient(ellipse at 50% 0%,#244434 0%,#0a1815 58%,#06120e 100%);overflow-x:hidden}
.page-shell{max-width:none;padding:0 clamp(10px,2vw,28px);min-height:100dvh;display:flex;flex-direction:column;gap:0}
.sitebar{min-height:62px;height:62px;flex-shrink:0;border-bottom:1px solid #deb97925}
.identity strong{font-size:16px;letter-spacing:1.25px}.identity img{height:39px;width:39px}
.identity small{font-size:9px;letter-spacing:1.4px}
.version-pill{display:inline-block;vertical-align:1px;margin-left:6px;font-size:9px;color:#23150b;background:#e2c18b;padding:2px 5px;border-radius:3px;font-style:normal;letter-spacing:0}
.header-actions{gap:9px}.balance b{font-size:18px}.balance span{letter-spacing:.8px}
.outline-btn{padding:7px 12px}.icon-btn{padding:5px 10px}.main-layout{max-width:1800px;width:100%;flex:1;min-height:0;display:flex;flex-direction:column}
.game-heading{flex-shrink:0;padding:10px 8px 11px;align-items:center}
.game-heading h1{font-size:27px;margin:2px 0 0}.eyebrow{font-size:9px}.heading-version{font:700 10px system-ui;color:#9bb6a2;letter-spacing:1.4px;vertical-align:middle}
.stat-group{gap:13px}.stat-group b{font-size:14px}.stat-group small{font-size:8px}
.table-frame{flex:1;min-height:300px;height:auto;border:7px solid var(--table-ring);padding:8px 12px;border-radius:180px;background:linear-gradient(110deg,#6b452a,#b38b56 12%,#664124 30%,#d5aa6d 50%,#5c371f 72%,#ae8150 89%,#674426);box-shadow:0 5px 0 #362318,inset 0 1px 0 #f7dba2,0 15px 44px #0008}
.table-inner{border:2px solid #809877;border-radius:160px;background:radial-gradient(ellipse at 50% 35%,#32704d 0%,#246043 39%,#1b4635 78%,#143a2c 100%);box-shadow:inset 0 0 65px #00180f98,0 0 0 2px #503724}
.table-inner:after{border-radius:145px;inset:12px;border:1px solid #f1dbac31}
.table-topline{top:8px;left:11%;right:11%;font-size:10px}
.topline-badge{font-size:8px}.felt-watermark{top:53%;font:normal 95px Georgia,serif;opacity:.06;color:#f7e9c6}.felt-watermark span{letter-spacing:8px;font-size:9px}
.opponent .op-data{padding:4px 9px;gap:5px;background:#10291fe8;border-color:#d4c69e3d;box-shadow:0 5px 10px #02130965}
.opponent .avatar{background:linear-gradient(125deg,#f6d8a6,#ba9058);color:#243c2b}
.opponent .backs{gap:0}.opponent .backs .tile-back{width:15px;height:24px;margin-left:-5px;transform:rotate(-5deg);box-shadow:2px 3px 4px #0008}.opponent .backs .tile-back:first-child{margin-left:0}
.opponent-top{top:34px;flex-direction:row}.opponent-left{left:3.4%;top:50%;transform:translateY(-38%);flex-direction:column}.opponent-right{right:3.4%;top:50%;transform:translateY(-38%);flex-direction:column}
.opponent-left .backs,.opponent-right .backs{max-width:130px;flex-wrap:nowrap}
.play-area{left:50%;top:50%;transform:translate(-50%,-42%);width:73%;height:70%;min-height:0;max-width:none;display:flex;flex-direction:column}
.ends{flex:0 0 19px;font-size:10px;letter-spacing:1px;gap:5px}.ends b{display:inline;font-size:9px;color:#e4cb91;background:#103a2aa6;padding:3px 9px;border-radius:8px}
.board-surface{position:relative;margin:2px 0 0;padding:0;flex:1;min-height:0;width:100%;overflow:hidden;display:block;border:0;border-radius:12px;background:linear-gradient(#06392717,#001c111c);box-shadow:inset 0 0 20px #001a1070}
.board-chain{position:relative;display:block!important;width:100%!important;height:100%;min-width:0!important;min-height:0;max-width:100%;transform:none;overflow:hidden;z-index:2}
.board-rails{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:visible}
.board-rails path{stroke:rgba(247,223,152,.53);stroke-width:3.5;stroke-linecap:round;fill:none;filter:drop-shadow(0 1px 1px #051b11)}
.board-tile{position:absolute;box-sizing:border-box;display:block!important;flex:none;z-index:2;will-change:transform;transition:transform .22s ease;isolation:isolate}
.board-tile .domino{width:100%;height:100%;display:flex;padding:2px!important;border-radius:5px;box-shadow:0 2px 0 #9b998e,0 4px 7px #001a1480}
.board-tile .half{width:50%!important;height:100%!important;flex:1;position:relative}
.board-tile .pip{width:var(--pip-size,6px)!important;height:var(--pip-size,6px)!important;min-width:2.5px;min-height:2.5px;box-shadow:inset 1px 1px 1px #0008}
.board-tile .half+.half{border-left:1.5px solid #b0a89a}
.board-tile.edge-start .domino{outline:2px solid #82d8b2;outline-offset:2px}
.board-tile.edge-end .domino{outline:2px solid #f1cd83;outline-offset:2px}
.board-tile.just-played{animation:table-place .23s ease-out}
@keyframes table-place{from{opacity:.45;filter:brightness(1.8);scale:1.2}to{opacity:1;filter:brightness(1);scale:1}}
.board-empty{position:absolute;left:0;right:0;top:45%;transform:translateY(-50%);text-align:center;font-size:17px;padding:0;white-space:normal}
.board-tools{flex:0 0 18px;margin:0;align-items:center;display:flex;justify-content:space-between;color:#a8c8ae;font-size:9px;letter-spacing:.8px}
.board-tools .board-note{display:flex;align-items:center;gap:6px;white-space:nowrap}.board-note i{display:inline-block;width:5px;height:5px;border-radius:50%;background:#7be5ac;box-shadow:0 0 8px #8be3a8}
.board-legend{display:flex;align-items:center;gap:6px;white-space:nowrap}.end-dot{width:7px;height:7px;border-radius:50%;margin-left:6px}.start-dot{background:#82d8b2}.finish-dot{background:#f1cd83}
.table-bottomline{bottom:12px;left:12%;right:12%;font-size:8px;letter-spacing:1.4px}
.player-area{flex-shrink:0;border:1px solid #c19c6e55;border-top:2px solid #d4ae74;padding:7px 17px 4px;background:linear-gradient(180deg,#284533,#122e25 76%,#13261e);border-radius:18px 18px 0 0;min-height:0;margin-top:9px;box-shadow:0 -3px 22px #0005}
.hand-heading{height:33px;gap:8px}.your-avatar{width:29px;height:29px;font-size:15px}.hand-heading strong{font-size:11px;letter-spacing:.9px}.hand-heading small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:350px}.hand-actions{gap:12px}.hand-actions .secondary-btn{padding:6px 13px}.hand-row{min-height:0;height:78px;justify-content:center;gap:8px;padding:4px 0 6px;overflow:hidden}
.hand-tile{flex:0 1 auto;padding:2px;min-width:0}.hand-tile .domino{padding:2px}.hand-tile .domino .half{width:30px;height:55px}.hand-tile .domino .pip{width:6.5px;height:6.5px}
.hand-tile.can-play:active{transform:translateY(-5px)}.hand-tile.can-play .domino{outline:2px solid #f4cf84;box-shadow:0 2px 0 #8c795b,0 0 12px #c8a56744}
.game-footer{font-size:10px;min-height:26px;padding:3px 4px}.text-btn{padding:2px 6px;font-size:10px}.footer{flex-shrink:0;min-height:23px;padding:6px 4px;color:#9baf9b;font-size:9px}
.rotate-hint{display:none}
@media (min-height:700px) and (min-width:980px){.page-shell{max-height:1050px;min-height:700px}.table-frame{min-height:410px}.player-area{margin-bottom:6px}.hand-row{height:94px}.hand-tile .domino .half{width:36px;height:63px}.table-topline{top:12px}.opponent-top{top:53px}}
@media (orientation:landscape) and (max-height:700px){
  .page-shell{height:100dvh;min-height:310px;overflow:hidden;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
  .sitebar{min-height:38px;height:38px;padding:0 8px;gap:7px}.identity{gap:7px}.identity img{height:28px;width:28px}.identity strong{font-size:13px;letter-spacing:.7px}.identity small{font-size:7px;letter-spacing:.8px;margin-top:0}
  .balance{margin:0}.balance span{font-size:7px}.balance b{font-size:14px}.outline-btn{padding:5px 9px;font-size:10px}.icon-btn{padding:3px 9px;font-size:16px}.header-actions{gap:7px}
  .game-heading{padding:0 7px;height:0;min-height:0;overflow:hidden}.main-layout{min-height:0}
  .table-frame{min-height:120px;flex:1;padding:4px 9px;border-width:5px;border-radius:150px}
  .table-inner{border-width:1px;border-radius:140px}.table-inner:after{inset:7px;border-radius:120px}
  .table-topline{top:5px;left:13%;right:13%;font-size:9px}.topline-badge{font-size:7px}
  .opponent .op-data{padding:2px 6px;gap:3px}.opponent .avatar{height:18px;width:18px;font-size:9px}.opponent .name{font-size:9px}.opponent .count{font-size:8px}.opponent .pass-mark{font-size:8px}
  .opponent-top{top:21px}.opponent-left{left:2%;top:51%;transform:translateY(-30%)}.opponent-right{right:2%;top:51%;transform:translateY(-30%)}
  .opponent .backs .tile-back{width:11px;height:17px;margin-left:-4px}.opponent-left .backs,.opponent-right .backs{max-width:75px}
  .play-area{width:76%;height:74%;top:52%;transform:translate(-50%,-43%)}
  .ends{flex-basis:15px;font-size:9px}.ends b{font-size:8px;padding:1px 6px}
  .board-tools{flex-basis:13px;font-size:7px}.end-dot{height:5px;width:5px}.board-legend{gap:3px}
  .table-bottomline{bottom:5px;left:14%;right:14%;font-size:7px}
  .felt-watermark{font-size:60px}
  .player-area{padding:3px 12px 2px;border-radius:12px 12px 0 0;margin-top:5px}
  .hand-heading{height:24px;gap:6px}.your-avatar{width:22px;height:22px;font-size:12px}.hand-heading strong{font-size:10px}.hand-heading small{font-size:9px;max-width:300px}.hand-actions{gap:8px}.hand-actions .secondary-btn{padding:3px 9px;font-size:10px}.tile-count{font-size:9px}
  .hand-row{height:59px;min-height:0;padding:3px 0 2px;gap:6px;justify-content:center}.hand-tile .domino .half{width:25px;height:42px}.hand-tile .domino .pip{width:5px;height:5px}.hand-tile.can-play:hover{transform:translateY(-3px)}
  .game-footer{height:19px;min-height:19px;border-top:1px solid #ffffff17;padding:0 4px;font-size:9px}.game-footer .text-btn{font-size:9px;padding:0 4px}
  .footer{min-height:0;height:15px;font-size:8px;padding:2px 9px;white-space:nowrap;overflow:hidden}.footer span:last-child{display:none}
}
@media (orientation:landscape) and (max-height:390px){
  .sitebar{height:34px;min-height:34px}.identity img{height:24px;width:24px}.identity strong{font-size:12px}
  .table-frame{border-width:4px;padding:3px 7px}.opponent-top{top:17px}.table-topline{font-size:8px;top:4px}
  .play-area{top:53%;height:75%;width:75%}.ends{flex-basis:13px;font-size:8px}.board-tools{flex-basis:11px}.board-note{display:none!important}
  .player-area{margin-top:3px;padding:2px 10px}.hand-row{height:52px;gap:5px;padding:2px 0}.hand-tile .domino .half{width:23px;height:37px}
  .hand-heading{height:21px}.your-avatar{height:19px;width:19px}.game-footer{height:15px;min-height:15px}
  .footer{display:none}
}
@media (orientation:portrait) and (max-width:700px){
  .page-shell{min-height:100dvh;padding:0 9px}
  .sitebar{min-height:65px;height:auto}.identity{gap:7px}.identity img{width:31px;height:31px}.identity strong{font-size:12px}.identity small{font-size:7px}.header-actions{gap:4px}.balance b{font-size:12px}.balance span{font-size:7px}.outline-btn{padding:8px 7px;font-size:9px}.icon-btn{padding:5px 7px}
  .game-heading{padding:8px 5px}.game-heading h1{font-size:22px}.stat-group{gap:7px}.stat-group b{font-size:12px}.heading-version{font-size:7px}
  .table-frame{height:450px;min-height:450px;border-width:5px;padding:5px 7px;border-radius:45px}
  .table-inner{border-radius:35px}.table-inner:after{border-radius:28px}.opponent-top{top:42px}.opponent-left{left:2%;top:50%}.opponent-right{right:2%;top:50%}
  .opponent-left .backs,.opponent-right .backs{max-width:36px;flex-wrap:wrap}.opponent-left .op-data,.opponent-right .op-data{flex-direction:column;gap:0}.opponent-left .avatar,.opponent-right .avatar{display:none}
  .table-topline{top:9px;left:10%;right:10%}.topline-badge{font-size:7px}.table-bottomline{bottom:9px;left:9%;right:9%}
  .play-area{height:61%;width:71%;top:53%;transform:translate(-50%,-40%)}.ends{font-size:8px;letter-spacing:0}.ends b{font-size:7px;padding:3px}.board-tools{font-size:7px}.board-legend{display:none}
  .player-area{padding:8px 7px;min-height:0;margin-top:7px}.hand-heading{height:auto}.hand-heading small{max-width:200px;font-size:9px}.hand-row{height:75px;gap:1px;justify-content:center;overflow:hidden}.hand-tile{padding:1px}.hand-tile .domino .half{width:clamp(15px,4.5vw,23px);height:38px}.hand-tile .domino .pip{width:5px;height:5px}.tile-count{display:none}
  .game-footer{flex-wrap:wrap}.footer{font-size:9px;flex-wrap:wrap}
  .rotate-hint:not(.dismissed){position:fixed;inset:0;z-index:95;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px;background:radial-gradient(ellipse at center,#244d38,#071b16 75%);text-align:center}
  .rotate-phone{font-size:72px;line-height:1;margin:0 0 12px;color:#eec58a;animation:rotate-nudge 1.8s ease-in-out infinite alternate}
  .rotate-hint h2{font:normal 33px Georgia,serif;margin:5px 0 3px}.rotate-hint p{line-height:1.5;max-width:330px;color:#c7d8c6}.rotate-hint button{margin-top:18px}
  @keyframes rotate-nudge{from{transform:rotate(-12deg)}to{transform:rotate(65deg)}}
}
@media (prefers-reduced-motion:reduce){.board-tile{transition:none}.board-tile.just-played{animation:none}.rotate-phone{animation:none}}
/* Ensure inner felt fills table even when the parent is a growing flex item. */
.table-frame{display:flex;flex-direction:column}
.table-inner{flex:1 1 auto;min-height:0;height:auto}
@media (orientation:portrait) and (max-width:700px){.table-frame{flex:0 0 450px;height:450px;min-height:450px}}
@media (min-width:980px) and (min-height:700px){.page-shell{height:100dvh;max-height:none}}

/* Domino Kereta v1.2: upright balak (double), responsive real-money external CTA. */
.board-tile.is-double .domino{flex-direction:column;border-color:#c6a067;box-shadow:0 2px 0 #8f846b,0 4px 7px #001a1480,0 0 0 1px #edd5a86b}
.board-tile.is-double .half{width:100%!important;height:50%!important;flex:1 1 50%}
.board-tile.is-double .half+.half{border-left:0;border-top:1.5px solid #b0a89a}
.board-tile.is-double .pip{box-shadow:inset 1px 1px 1px #0009}
.real-play-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(120deg,#e5b97e,#d99a57);border:1px solid #f2d6a5;border-radius:8px;padding:9px 11px;color:#1d291e;text-decoration:none;font-weight:900;letter-spacing:.15px;font-size:10px;text-align:center;white-space:nowrap;box-shadow:inset 0 1px 0 #ffffff55,0 2px 8px #0005}
.real-play-btn:hover,.real-play-btn:focus-visible{background:#f6cf94;outline:2px solid #f7d7a2;outline-offset:2px}
.opponent .name{max-width:145px;overflow:hidden;text-overflow:ellipsis;letter-spacing:0;font-size:10px}
@media (orientation:landscape) and (max-height:700px){.real-play-btn{font-size:8px;padding:6px 8px;border-radius:6px}.opponent .name{max-width:125px;font-size:9px}}
@media (orientation:landscape) and (max-width:740px){.real-play-btn{font-size:8px;max-width:124px;padding:5px 7px;white-space:normal;line-height:1.04}.identity small{display:none}.opponent .name{max-width:95px}}
@media (orientation:portrait) and (max-width:700px){.real-play-btn{font-size:9px;padding:6px 7px;max-width:105px;white-space:normal;line-height:1.1}.opponent .name{max-width:76px;font-size:9px}}

/* Show balak upright in the player's own hand as well as on the table. */
.hand-tile.is-double .domino{display:flex;flex-direction:column;align-items:stretch;width:40px;height:76px;padding:2px}
.hand-tile.is-double .half{width:100%!important;height:50%!important;flex:1 1 50%}
.hand-tile.is-double .half+.half{border-left:0;border-top:1.5px solid #b0a89a}
@media (orientation:landscape) and (max-height:700px){.hand-tile.is-double .domino{width:29px;height:52px}}
@media (orientation:landscape) and (max-height:390px){.hand-tile.is-double .domino{width:26px;height:46px}}
@media (orientation:portrait) and (max-width:700px){.hand-tile.is-double .domino{width:30px;height:60px}}

/* Domino Kereta v1.3: compact round recap on small landscape phones. */
.result-dialog{width:min(100%,560px);max-height:calc(100dvh - 24px);overflow-y:auto;text-align:left;overscroll-behavior:contain;padding:16px 20px}
.result-head{display:flex;align-items:center;gap:10px;min-width:0}
.result-head .dialog-label{font-size:9px;letter-spacing:1.3px;white-space:nowrap}
.result-emblem{font:normal 32px/1 Georgia,serif;color:#e5bc77;margin:0}
.result-dialog h2{font:normal 25px/1.13 Georgia,serif;margin:0;min-width:0}
.result-dialog .result-reason{font-size:12px;line-height:1.35;margin:10px 0 8px;color:#bed1c2}
.result-scores{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 10px}
.result-score{display:flex;gap:2px;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px solid #ffffff20;border-radius:7px;background:#09241bb0;padding:5px 3px;min-width:0}
.result-score.is-winner{border-color:#e0bd79;background:#4e402433}
.result-score span{font-size:10px;color:#d2ddcc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.result-score b{font-size:16px;color:#eed1a0;font-variant-numeric:tabular-nums}
.result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:9px;gap:8px;text-align:center}
.result-stats>div{min-width:0}
.result-stats small{font-size:8px;letter-spacing:.6px}
.result-stats b{font-size:16px;margin-top:3px;white-space:nowrap}
.result-stats .pass-count{display:block;font-size:8px;color:#b8c8b6;margin-top:2px}
.result-stats .result-balance b{color:#f2d29a}
.result-dialog .refill-note{margin:5px 0 0;line-height:1.25;text-align:center;font-size:10px}
.result-next{margin-top:11px;padding:10px 13px;font-size:12px}
@media (orientation:landscape) and (max-height:500px){
 .overlay{padding:6px}
 .result-dialog{width:min(96vw,720px);max-height:calc(100dvh - 12px);padding:10px 13px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-areas:'head finance' 'reason finance' 'scores finance' 'next next';column-gap:12px;row-gap:5px;align-content:center;overflow-y:auto}
 .result-head{grid-area:head;gap:7px;align-self:end}
 .result-head .dialog-label{font-size:8px;letter-spacing:.6px}
 .result-emblem{font-size:27px}
 .result-dialog h2{font-size:21px;line-height:1.04}
 .result-dialog .result-reason{grid-area:reason;font-size:10px;line-height:1.2;margin:0;color:#bfccbe}
 .result-scores{grid-area:scores;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0}
 .result-score{flex-direction:row;justify-content:space-between;text-align:left;padding:3px 7px;gap:5px}
 .result-score span{font-size:9px}
 .result-score b{font-size:12px}
 .result-finance{grid-area:finance;align-self:center;min-width:0}
 .result-stats{grid-template-columns:repeat(2,minmax(0,1fr));padding:7px;gap:6px}
 .result-stats .result-balance{grid-column:1/-1;border-top:1px solid #ffffff20;padding-top:6px}
 .result-stats small{font-size:8px;letter-spacing:.3px}
 .result-stats b{font-size:15px}
 .result-stats .result-balance b{font-size:19px}
 .result-next{grid-area:next;margin:3px 0 0;padding:7px 10px;font-size:10px}
}
@media (orientation:landscape) and (max-height:335px){
 .result-dialog{padding:6px 10px;gap:3px}.result-head .dialog-label{font-size:7px}.result-dialog h2{font-size:17px}.result-emblem{font-size:21px}
 .result-dialog .result-reason{font-size:9px}.result-score{padding:2px 6px}.result-score span{font-size:8px}
 .result-stats{padding:4px}.result-stats .result-balance{padding-top:3px}.result-stats b{font-size:13px}.result-stats .result-balance b{font-size:16px}.result-next{padding:5px}
}
@media (orientation:portrait) and (max-width:480px){.result-dialog{padding:16px 12px}.result-head .dialog-label{font-size:8px}.result-dialog h2{font-size:22px}.result-stats{gap:4px;padding:8px}.result-stats b{font-size:clamp(10px,3.6vw,16px)}.result-scores{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ================================================================
   DOMINO KERETA v1.4 — expanded playing surface on every phone
   Mobile opponents move to the rim, freeing width for the full chain.
   No rotate gate; portrait is a first-class playing orientation.
   ================================================================ */
.rotate-hint{display:none!important}
@media (min-width:701px) and (min-height:701px){
  .play-area{width:84%;height:76%;top:51%}
  .table-frame{border-radius:66px}
  .table-inner{border-radius:56px}
  .table-inner:after{border-radius:44px}
  .opponent-left{left:1.8%}.opponent-right{right:1.8%}
}
@media (max-width:700px), (max-height:700px){
  .page-shell{width:100%;max-width:none;overflow:hidden;padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right))}
  .main-layout{flex:1 1 auto;min-height:0}
  .game-heading{height:0!important;min-height:0!important;padding:0!important;overflow:hidden!important;flex:0 0 0!important}
  .table-frame{flex:1 1 auto!important;min-height:0!important;height:auto!important;border-width:4px!important;padding:4px!important;border-radius:26px!important}
  .table-inner{border-radius:21px!important;border-width:1px!important}
  .table-inner:after{inset:5px!important;border-radius:16px!important}
  .felt-watermark{opacity:.04;font-size:clamp(38px,9vw,85px)}
  .opponent-top,.opponent-left,.opponent-right{top:9px!important;right:auto!important;transform:translateX(-50%)!important;flex-direction:row!important;z-index:6}
  .opponent-left{left:17%!important}.opponent-top{left:50%!important}.opponent-right{left:83%!important}
  .opponent .op-data{max-width:clamp(85px,29vw,210px);min-width:0;padding:2px 5px;gap:3px;border-radius:8px}
  .opponent .op-data .avatar{flex:0 0 auto}
  .opponent .name{min-width:0;max-width:clamp(38px,13vw,105px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:9px;letter-spacing:0}
  .opponent .count{font-size:8px;flex:0 0 auto}
  .opponent .backs{display:none!important}
  .table-topline{top:auto!important;bottom:4px!important;left:8%!important;right:8%!important;justify-content:center!important;text-align:center;font-size:9px!important;line-height:1.1;z-index:4}
  .topline-badge{display:none!important}
  .table-bottomline{display:none!important}
  .play-area{left:50%!important;top:37px!important;transform:translateX(-50%)!important;width:calc(100% - 14px)!important;max-width:none!important;height:calc(100% - 51px)!important;min-height:0}
  .ends{flex:0 0 15px!important;gap:3px!important;font-size:9px!important;line-height:1.1}
  .ends b{font-size:8px!important;padding:1px 5px!important}
  .board-surface{flex:1 1 auto!important;min-height:0;margin:1px 0 0!important;border-radius:10px}
  .board-tools{display:none!important}
  .player-area{flex:0 0 auto!important;min-height:0!important;margin-top:4px!important;padding:3px 7px 0!important;border-radius:13px 13px 0 0!important}
  .hand-heading{height:22px!important;gap:5px}.hand-heading small{max-width:40vw!important;white-space:nowrap}
  .your-avatar{width:19px!important;height:19px!important;font-size:11px!important}
  .hand-actions{gap:4px!important}.hand-actions .secondary-btn{padding:3px 7px!important;font-size:9px!important}
  .hand-row{height:58px!important;min-height:0!important;gap:clamp(1px,1vw,7px)!important;padding:2px 0 1px!important;justify-content:center!important;overflow:hidden!important}
  .hand-tile{padding:1px!important;flex:0 1 auto!important}
  .hand-tile .domino .half{width:clamp(17px,2.9vw,26px)!important;height:37px!important}
  .hand-tile.is-double .domino{width:26px!important;height:48px!important}
  .game-footer{height:17px!important;min-height:17px!important;padding:1px 3px!important;font-size:9px!important;flex-wrap:nowrap!important;overflow:hidden}
  .game-footer .text-btn{font-size:9px!important;padding:1px 2px!important}
  .footer{display:none!important}
}
@media (orientation:portrait) and (max-width:700px){
  .page-shell{height:100dvh;min-height:0!important;max-height:100dvh;padding-left:max(3px,env(safe-area-inset-left));padding-right:max(3px,env(safe-area-inset-right));overflow:hidden}
  .sitebar{flex:0 0 54px!important;height:54px!important;min-height:54px!important;gap:3px!important;padding:0 3px!important;flex-wrap:nowrap!important}
  .identity{gap:3px!important;min-width:0}.identity img{width:24px!important;height:24px!important}
  .identity strong{font-size:clamp(9px,2.9vw,12px)!important;letter-spacing:0!important}
  .identity small{display:none!important}
  .header-actions{gap:3px!important;min-width:0}
  .balance{margin-right:0!important}.balance span{font-size:6px!important;letter-spacing:0!important}.balance b{font-size:10px!important;letter-spacing:0!important}
  .real-play-btn{max-width:86px!important;white-space:normal!important;font-size:7px!important;line-height:1.05!important;padding:4px 4px!important}
  .outline-btn{font-size:9px!important;padding:4px 5px!important}.icon-btn{font-size:16px!important;padding:3px 5px!important}
  .table-frame{margin:0!important}
  .opponent .avatar{display:none!important}
  .opponent .op-data{max-width:29vw;padding:3px 4px!important}
  .opponent .name{max-width:16vw!important;font-size:8px!important}
  .opponent .count{font-size:7px!important}
  .player-area{padding:4px 5px 0!important}
  .hand-heading strong{font-size:10px!important}.hand-heading small{font-size:8px!important;max-width:33vw!important}
  .hand-row{height:68px!important;gap:clamp(0px,.3vw,3px)!important}
  .hand-tile .domino .half{width:clamp(15px,4.7vw,23px)!important;height:41px!important}
  .hand-tile.is-double .domino{width:clamp(24px,6vw,29px)!important;height:57px!important}
  .game-footer{height:18px!important;min-height:18px!important}
  .board-surface{border:1px solid #ffffff0c}
}
@media (orientation:landscape) and (max-height:700px){
  .page-shell{height:100dvh!important;min-height:0!important;max-height:100dvh}
  .sitebar{height:32px!important;min-height:32px!important;flex:0 0 32px}
  .identity img{width:22px!important;height:22px!important}
  .identity strong{font-size:11px!important}.identity small{display:none!important}
  .table-frame{margin-top:0}
  .play-area{top:31px!important;height:calc(100% - 43px)!important}
  .opponent-top,.opponent-left,.opponent-right{top:5px!important}
  .hand-heading{height:19px!important}.hand-heading small{font-size:8px!important}
  .hand-row{height:50px!important}
  .hand-tile .domino .half{width:clamp(16px,3.3vw,23px)!important;height:35px!important}
  .hand-tile.is-double .domino{width:25px!important;height:45px!important}
  .game-footer{height:15px!important;min-height:15px!important}
}
@media (orientation:landscape) and (max-height:340px){
  .sitebar{height:27px!important;min-height:27px!important;flex-basis:27px}
  .hand-row{height:43px!important}.hand-tile .domino .half{height:31px!important}.hand-tile.is-double .domino{height:40px!important}
  .opponent .avatar{display:none!important}
  .opponent-top,.opponent-left,.opponent-right{top:3px!important}
  .play-area{top:27px!important;height:calc(100% - 38px)!important}
}
