/* Emerald felt, brass edges and raised controls. No external fonts or images. */
:root{--felt:#063e32;--ink:#fff4d9;--muted:#c8cfbd;--gold:#edcc78;--red:#bc2345;--panel:#07291f;--line:#8e713c}
body{background:radial-gradient(ellipse at 50% 15%,#17634c80,transparent 65%),repeating-linear-gradient(33deg,#ffffff02 0 1px,transparent 1px 4px),#031d18;color:var(--ink)}
.game-tools{background:linear-gradient(180deg,#082f25,#031d18);border-bottom:1px solid #96743d;box-shadow:0 5px 14px #0009;padding-bottom:9px}
.game-tools::before,.game-tools::after{content:"◆";align-self:center;color:#b69850;font-size:9px}
.game-tools button{min-width:110px;border-radius:8px;border:1px solid #d1ae61;outline:1px solid #594824;outline-offset:3px;background:linear-gradient(#174d3d,#06291f 55%,#031d17);box-shadow:inset 0 1px #fff4c333,inset 0 -3px #0007,0 4px 6px #0008;font:700 19px Georgia,serif;color:#ffe4a1;letter-spacing:.03em}
.game-shell{gap:12px;padding:14px;height:calc(100dvh - 59px - env(safe-area-inset-top) - env(safe-area-inset-bottom));grid-template-rows:148px minmax(150px,1fr) 86px 188px}
.scoreboard,.opponent-zone,.table-zone,.player-zone,.play-panel,.online-board,.online-log,.waiting-room,.player-panel,.avatar-panel,.cut-panel,.modal-panel{border:1px solid #b39652;border-radius:16px;background:radial-gradient(ellipse at 50% 0,#15513a55,transparent 75%),linear-gradient(135deg,#082d23,#041c17);box-shadow:inset 0 0 0 3px #041c17,inset 0 0 0 4px #b99a4938,inset 0 7px 18px #ffffff06,0 5px 0 #01110e,0 10px 20px #0007;position:relative}
.scoreboard{padding:12px;gap:12px}
.brand-logo-40{border-radius:16px;box-shadow:0 8px 14px #0006}
.score-row{gap:9px}
.score-markers:empty{display:none}
.game-shell .cloudix-brand{display:none}
.game-shell .actions{margin-top:auto}
.score-card{min-width:0;padding:12px;border:1px solid #9d7f42;border-radius:11px;background:linear-gradient(140deg,#12412f,#031d18 80%);box-shadow:inset 0 1px 0 #ffefba38,inset 0 0 16px #0005,0 3px 4px #0008;align-content:start;gap:5px}
.score-card.active{border-color:#ffe494;background:linear-gradient(135deg,#4a5126,#09281d 70%);box-shadow:inset 0 0 0 1px #f9dd7f88,inset 0 0 20px #efca4430,0 0 12px #e3c45840,0 3px 4px #0008}
.player-score-name{grid-template-columns:38px minmax(0,1fr);gap:8px}
.player-score-name span{font:700 21px Georgia,serif;color:#ffe6ac;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.score-avatar{width:36px;height:36px;border-radius:50%;border:2px solid #dfbd70;box-shadow:0 0 0 2px #021b15,0 3px 6px #0008}
.score-card small{font-size:12px;line-height:1.4;color:#e0e0ce;overflow-wrap:anywhere}
.deck-score{background:linear-gradient(145deg,#174533,#041f19);padding-right:44px}
.deck-score>span{font:700 19px Georgia,serif;color:#ffe6ac}
.deck-score strong{font:700 38px Georgia,serif;color:#fff8e4;text-shadow:0 2px 2px #0008}
.deck-score::after{content:"";position:absolute;right:9px;top:14px;width:26px;height:37px;border:1px solid #ebd291;border-radius:4px;background:url("assets/cloudix-card-back.png") center/cover;box-shadow:1px 2px #234b5c,2px 3px #b5c9c4,3px 5px #071713}
.deck-score{position:relative}
.score-markers{gap:3px;min-height:16px}
.score-match,.score-dog{width:19px;height:19px}
.primary-button,.secondary-button,.icon-button,#onlinePlay,.waiting-actions button,#onlineSetup button,#resumeRoom{border-radius:10px;border:1px solid #f6d68b;box-shadow:inset 0 0 0 2px #ad803a99,inset 0 3px 3px #ffffd8b0,inset 0 -4px 5px #80510f80,0 4px 0 #614314,0 7px 10px #0007;background:linear-gradient(115deg,#e2b54d,#fff0a5 35%,#d3a23d 90%);color:#172219;font:700 22px Georgia,serif;text-shadow:0 1px #fff8bb66;min-height:46px;transition:filter .15s,box-shadow .15s}
.secondary-button{background:linear-gradient(145deg,#265b47,#092d23 55%,#031d18);border-color:#a89768;color:#e7e3cc;text-shadow:0 2px #0008;box-shadow:inset 0 0 0 2px #405847,inset 0 2px 2px #ffffff25,inset 0 -3px 3px #0007,0 4px 0 #02150e,0 7px 10px #0007}
.icon-button{font:700 28px system-ui,sans-serif}
.primary-button:disabled,.secondary-button:disabled,#onlinePlay:disabled{opacity:1;filter:saturate(.35);color:#b2b8a9;background:linear-gradient(#1b3a2e,#0c241c);border-color:#56634b;text-shadow:none;box-shadow:inset 0 1px #ffffff15,0 2px 0 #02150e;cursor:not-allowed}
button:not(:disabled):not(.card):not(.avatar-option):hover{filter:brightness(1.1)}
.primary-button:not(:disabled):active,.secondary-button:not(:disabled):active,.icon-button:active{box-shadow:inset 0 3px 7px #0005,0 1px 0 #614314}
.actions{gap:10px;grid-template-columns:46px 1fr 1.1fr;padding-bottom:4px}
.opponent-zone,.table-zone,.player-zone{padding:12px}
.zone-header{border-bottom:1px solid #b69b4b55;padding:0 5px 7px;min-height:28px;margin-bottom:10px}
.zone-header span{font:700 23px Georgia,serif;color:#f5d992;text-shadow:0 2px 3px #0009}
.zone-header strong{font-size:12px;letter-spacing:.02em;color:#e6c870;white-space:nowrap}
.opponent-zone{background:radial-gradient(ellipse at center,#13533a55,transparent 75%),#05261e}
.table-zone{display:flex;flex-direction:column;background:radial-gradient(ellipse at center,#15604566,#062b21 70%);min-height:0}
.table-grid{flex:1;align-content:center;justify-content:center;border-radius:50% / 25%;padding:14px;border:1px solid #bc9e464d;background:radial-gradient(ellipse,#15765320,#021d1755);box-shadow:inset 0 2px 8px #0008,0 1px #ffe49a15}
.player-zone.active,.opponent-zone.active{background:radial-gradient(ellipse at center,#225d3f88,#05271d);border-color:#f1d37a;box-shadow:inset 0 0 0 3px #041c17,inset 0 0 0 4px #dec26a66,0 4px 0 #01110e,0 8px 18px #0007}
.game-shell .hand-grid{justify-content:center}
.play-panel{padding:12px 16px;grid-template-columns:minmax(0,1fr) auto auto;gap:12px}
.selected-play{min-width:0;display:grid;gap:5px}
.selected-play span{font:700 20px Georgia,serif;color:#f8dc98;line-height:1.15}
.selected-play small{font-size:12px;line-height:1.4;color:#d2d9c6}
.play-panel #playBtn{min-width:108px;padding:10px 18px}
.card,.online-board .net-card{border-color:#dcc390;border-radius:9px;background:linear-gradient(125deg,#fffef7,#fff9e8 55%,#e9e2d2);box-shadow:inset 0 0 0 2px #ffffff,0 3px 0 #96723a,0 6px 8px #0008;color:#142431}
.card:not(.red),.card:not(.red):disabled{color:#142431!important}
.card.red,.card.red:disabled{color:#b91e3a!important}
.card::after{border-color:#bda5737a;inset:3px;border-radius:5px}
.card.selected,.card.chosen,.card.net-card.chosen{outline:2px solid #ffe797;outline-offset:2px;box-shadow:0 0 14px #e7c65c88,0 4px 0 #96723a,0 7px 10px #0009}
.card-back{border:1px solid #e9d9a2;border-radius:7px;box-shadow:0 0 0 2px #235575,0 3px 0 #0a283b,0 6px 9px #0009}
.mode-menu h1,.player-panel h1,.waiting-room h2,.cut-panel h2,.modal-panel h2{font-family:Georgia,serif;color:#f4d992;text-shadow:0 3px 5px #0009}
.mode-menu>p,.player-panel p,.waiting-room p{color:#d5decb;line-height:1.5}
.mode-menu{background:radial-gradient(ellipse at top,#1a61464d,transparent 65%);}
.player-panel,.cut-panel,.modal-panel{padding:24px}
.player-panel input{border-color:#c3a25d!important;background:#021e17!important;box-shadow:inset 0 2px 5px #0007}
.gender-button{border-radius:8px;background:linear-gradient(#164631,#08281e);border-color:#937d4a;color:#e9dfbd}
.gender-button.active{border-color:#f9da79;box-shadow:inset 0 0 12px #e6bd3638;color:#ffe392}
.online-board .net-seat{background:linear-gradient(145deg,#12412f,#041f18);border-color:#a88b48;box-shadow:inset 0 1px #ffefba25,0 3px 8px #0006}
.online-board .net-identity strong{color:#f3d995;font-family:Georgia,serif}
.online-header h1{font-family:Georgia,serif;color:#efd390}
.online-center .net-table{border-radius:20px;background:radial-gradient(ellipse,#17634444,#041e18);border:1px solid #b69b4b55}
button:focus-visible,input:focus-visible{outline:3px solid #fff1af;outline-offset:4px}
@media(min-width:681px) and (max-width:980px){
 .game-shell{grid-template-rows:auto 148px minmax(130px,1fr) 76px 188px}
 .game-shell .scoreboard{grid-template-columns:1fr;gap:8px}
 .game-shell .brand-block,.game-shell .cloudix-brand{display:none}
 .game-shell .score-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .game-shell .actions{grid-template-columns:46px 1fr 1fr}
}
@media(max-width:680px){
 body:has(.game-shell:not([hidden])){padding-top:calc(59px + env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom)}
 .game-shell:not([hidden]){padding:7px 8px 10px;gap:8px;grid-template-rows:auto 108px minmax(115px,1fr) auto 130px;overflow:hidden}
 .game-shell .scoreboard{padding:7px;gap:8px;border-radius:13px}
 .game-shell .score-row{gap:6px;grid-template-columns:1fr 1fr .9fr}
 .game-shell .score-card{padding:7px 6px;gap:4px;min-height:100px;border-radius:9px}
 .game-shell .player-score-name{grid-template-columns:26px minmax(0,1fr);gap:5px}
 .game-shell .score-avatar{width:25px;height:25px}
 .game-shell .player-score-name span{font-size:16px}
 .game-shell .score-card small{font-size:10px;line-height:1.35}
 .game-shell .deck-score{padding-right:29px}
 .game-shell .deck-score>span{font-size:15px}
 .game-shell .deck-score strong{font-size:30px}
 .game-shell .deck-score::after{width:17px;height:25px;right:7px;top:10px}
 .game-shell .actions{gap:7px;grid-template-columns:40px 1fr 1fr;padding-bottom:3px}
 .game-shell .actions button{min-height:40px;font-size:19px}
 .game-shell .actions .icon-button{font-size:25px}
 .game-shell .score-markers{min-height:12px;gap:1px}
 .game-shell .score-match,.game-shell .score-dog{width:15px;height:15px}
 .game-shell .opponent-zone,.game-shell .table-zone,.game-shell .player-zone{padding:7px 8px;border-radius:13px}
 .game-shell .zone-header{padding:0 3px 4px;min-height:21px;margin-bottom:6px}
 .game-shell .zone-header span{font-size:19px}
 .game-shell .zone-header strong{font-size:11px}
 .game-shell .cpu-hand{gap:5px;padding:0 4px}
 .game-shell .cpu-hand .card,.game-shell .cpu-hand .card-back{width:40px;height:56px}
 .game-shell .table-grid{grid-template-columns:repeat(auto-fill,48px);gap:8px;padding:10px 8px;align-content:center;border-radius:45% / 20%;scrollbar-width:thin;scrollbar-color:#a58b4c #072a20}
 .game-shell .table-grid .card{width:48px;height:67px;aspect-ratio:auto}
 .game-shell .hand-grid{grid-template-columns:repeat(5,minmax(0,min(15vw,56px)));gap:7px;justify-content:center;padding:0 3px}
 .game-shell .hand-grid .card{width:100%;height:auto;aspect-ratio:5/7}
 .game-shell .play-panel{padding:9px 11px;gap:7px;grid-template-columns:minmax(0,1fr) auto auto;border-radius:12px}
 .game-shell .selected-play span{font-size:17px}
 .game-shell .selected-play small{font-size:11px;line-height:1.35}
 .game-shell .play-panel button{font-size:19px;min-height:43px;padding:7px 12px}
 .game-shell .play-panel #playBtn{min-width:76px}
 .game-shell #rondaBtn{font:700 12px system-ui,sans-serif;min-width:60px;max-width:72px}
 .game-shell .hand-grid .card .rank{font-size:17px}
 .game-shell .hand-grid .card .suit-icon{font-size:25px}
 .game-shell .table-grid .card .suit-icon{font-size:23px}
 .card{border-radius:7px}
 .online-header{padding:8px}
 .online-play-area .net-action{padding:9px}
 .online-play-area .net-action>span{font-size:12px;line-height:1.4;color:#e1dfcc}
}
@media(max-width:680px) and (max-height:720px){
 body:has(.game-shell:not([hidden])){height:auto;min-height:100dvh;overflow:auto}
 .game-shell:not([hidden]){flex:none;min-height:600px;height:calc(100dvh - 59px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}
 .game-shell:not([hidden]){gap:6px;grid-template-rows:auto 90px minmax(84px,1fr) auto 108px;padding-top:5px}
 .game-shell .score-card{min-height:85px}
 .game-shell .score-markers{min-height:0}
 .game-shell .cpu-hand .card-back{width:28px;height:39px}
 .game-shell .hand-grid{grid-template-columns:repeat(5,minmax(0,42px))}
 .game-shell .hand-grid .card .rank{font-size:13px}
 .game-shell .hand-grid .card .suit-icon{font-size:21px}
 .game-shell .table-grid{padding:6px}
 .game-shell .table-grid .card{height:60px;width:43px}
 .game-shell .table-grid{grid-template-columns:repeat(auto-fill,43px)}
 .game-shell .table-grid .card .suit-icon{font-size:19px}
 .game-shell .actions button{min-height:35px;font-size:17px}
 .game-shell .play-panel .selected-play small{font-size:10px}
}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}
