:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f7f4eb;background:#0b2421;font-synthesis:none}*{box-sizing:border-box}html{min-height:100%;overscroll-behavior:none}body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% 16%,#205148,#102d29 58%,#0a211f);overflow-x:hidden}button,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #eab779;outline-offset:3px}.shell{min-height:100vh;max-width:1440px;margin:auto;padding:clamp(12px,2vw,28px);display:flex;flex-direction:column;gap:18px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border:1px solid #e4ac74;border-radius:12px;color:#e9b47b;font-size:30px;background:#153d35}.brand strong{display:block;font-family:Georgia,serif;font-size:26px;letter-spacing:.01em}.brand small{display:block;color:#a9c0b7;font-size:12px;letter-spacing:.04em}.top-actions{display:flex;gap:7px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 232px;gap:17px;flex:1;min-height:0}.table-panel{min-width:0;display:flex;flex-direction:column;background:#153a34;border:1px solid #3c655a;border-radius:22px;box-shadow:0 22px 65px #001b1777;overflow:hidden}.matchbar{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 18px;border-bottom:1px solid #6d9e8a3b;color:#b9d1c7;font-size:13px}.mode-pill{border:1px solid #d9a67676;border-radius:99px;padding:5px 11px;color:#f6c895;font-weight:700}.felt{position:relative;flex:1;min-height:540px;background:radial-gradient(ellipse at center,#1f6557 0%,#185247 46%,#123c35 100%);box-shadow:inset 0 0 80px #092b25aa;display:flex;flex-direction:column;justify-content:space-between;padding:18px clamp(12px,2.5vw,34px);isolation:isolate}.felt:before{content:"";position:absolute;inset:12px;border:1px solid #c29d6870;border-radius:100px;pointer-events:none;z-index:-1}.opponent-area,.human-area{display:flex;flex-direction:column;gap:8px}.player-line{display:flex;align-items:center;gap:10px;min-height:42px}.player-line strong{display:block;font-size:14px}.player-line small{display:block;color:#b4cdc1;font-size:12px}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#d58e6b;color:#2b201b;font-size:20px}.human-avatar{background:#e6bf82;color:#1f3c31}.opponent-hand,.human-hand{display:flex;align-items:center;justify-content:center;min-height:100px}.opponent-hand .card{margin-left:-24px}.opponent-hand .card:first-child{margin-left:0}.card{position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;flex:0 0 auto;width:clamp(48px,5.8vw,70px);height:clamp(70px,8.2vw,98px);padding:6px;border:1px solid #d8d5cc;border-radius:7px;background:#fffdf6;color:#1d2928;box-shadow:0 3px 6px #06251f88;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;user-select:none;touch-action:manipulation}.card.red{color:#bf584c}.card .corner{font-weight:800;font-size:14px;line-height:1}.card .corner.bottom{align-self:flex-end;transform:rotate(180deg)}.card .big-suit{align-self:center;font-family:Georgia,serif;font-size:33px;line-height:1}.human-hand{gap:3px}.human-hand .card{border-color:#e2dfd5}.human-hand .card:not(:disabled):hover{transform:translateY(-7px)}.human-hand .card.selected{transform:translateY(-17px);border:3px solid #efbd76;box-shadow:0 9px 20px #092b26bb}.human-hand .card.invalid{opacity:.7}.human-hand .card:disabled{opacity:1}.back{background:repeating-linear-gradient(45deg,#17453e,#17453e 4px,#22584c 4px,#22584c 8px);border:4px solid #eee9d9;outline:1px solid #0b3831;align-items:center;justify-content:center;color:#deb077}.back-mark{display:grid;place-items:center;border:1px solid #ebc28b;width:70%;height:72%;font-size:24px}.center-area{display:flex;justify-content:center;align-items:center;gap:clamp(10px,3vw,38px);padding:16px 0}.pile-wrap{text-align:center;min-width:74px}.pile-label{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#c5d9cc;margin-bottom:8px}.pile{width:72px;height:98px;display:grid;place-items:center;position:relative;border-radius:8px;border:1px solid #b7ddc077;color:#d5a56f;background:#1a5146;box-shadow:0 6px 18px #06241e99;touch-action:manipulation}.pile.active{outline:2px solid #e8bd7d;outline-offset:4px}.pile.active:hover{transform:translateY(-3px)}.pile.stock{background:repeating-linear-gradient(45deg,#16483f,#16483f 5px,#215a4e 5px,#215a4e 10px);border:5px solid #eee9d9}.stock-pattern{font-size:31px}.pile.stock small{position:absolute;bottom:6px;color:#f7e8cf;font-weight:800}.discard-pile{padding:0}.discard-pile .card{width:100%;height:100%;border:0;box-shadow:none;pointer-events:none}.table-message{text-align:center;max-width:240px}.table-emblem{display:block;font-family:Georgia,serif;font-size:35px;color:#d6a970;opacity:.75}.table-message strong{display:block;font-family:Georgia,serif;font-size:clamp(15px,1.65vw,22px);font-weight:400}.table-message small{display:block;color:#a8cabb;margin-top:5px;font-size:12px}.deadwood-badge{margin-left:auto;padding:7px 11px;border-radius:99px;background:#0e3e35;border:1px solid #87ad8e7c;color:#d8e7db;font-size:12px}.deadwood-badge strong{display:inline;font-size:17px;color:#f3c78b;margin-left:5px}.actionbar{padding:12px 17px;display:flex;justify-content:space-between;gap:10px;background:#0e302b;border-top:1px solid #6d9e8a3b;min-height:68px}.primary-actions,.utility-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.btn{min-height:44px;padding:9px 15px;border-radius:10px;border:1px solid #6f9b8b;background:#1d4a40;color:#f8f4e9;font-weight:700;font-size:14px;transition:transform .15s ease,background .15s ease;white-space:nowrap}.btn:hover{background:#286454;transform:translateY(-1px)}.btn:active{transform:translateY(1px)}.btn.primary{background:#e9b77e;color:#183b33;border-color:#f6d3a8}.btn.primary:hover{background:#f3c995}.btn.gold{background:#f0d091;color:#243b31;border-color:#f2dcae}.btn.gold-outline{color:#eac58c;border-color:#bc9868}.btn.icon{width:44px;padding:0;font-size:21px}.btn.small{font-size:12px;padding:7px 10px}.btn.wide{width:100%}.btn.subdued{opacity:.55}.side-panel{display:flex;flex-direction:column;gap:14px}.score-card,.side-info{background:#153a34;border:1px solid #3c655a;border-radius:17px;padding:18px;box-shadow:0 12px 28px #071e1b66}.eyebrow{color:#e7b97e;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.12em}.scoreline{display:flex;align-items:center;justify-content:space-between;margin:15px 0}.scoreline div{text-align:center}.scoreline small{display:block;color:#aec8bd}.scoreline strong{display:block;font-family:Georgia,serif;font-size:42px;font-weight:400}.scoreline>span{color:#9bbaac}.score-track{height:6px;border-radius:99px;background:#0b2925;overflow:hidden}.score-track span{display:block;height:100%;background:#e6b479;border-radius:99px}.side-info{display:grid;grid-template-columns:1fr auto;gap:12px;font-size:13px}.side-info span{color:#b7cec1}.side-info strong{font-size:14px}.side-buttons{display:grid;gap:8px}.save-note{margin:0;color:#9db9ab;font-size:12px;text-align:center}.toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);background:#f2e3c8;color:#163e33;padding:11px 18px;border-radius:10px;box-shadow:0 8px 24px #0006;font-weight:700;z-index:30;max-width:calc(100vw - 24px);text-align:center}.scrim{position:fixed;inset:0;background:#061b19c9;display:grid;place-items:center;padding:15px;z-index:20;overflow-y:auto}.dialog{width:min(100%,440px);max-height:calc(100vh - 30px);overflow-y:auto;background:#f7f1e5;color:#183d34;border-radius:20px;padding:25px;box-shadow:0 28px 80px #0009;border:1px solid #fff}.dialog h2{font-family:Georgia,serif;font-size:27px;font-weight:400;margin:0 0 12px}.dialog p{line-height:1.55;color:#496659}.dialog .btn{background:#dce7dd;color:#183d34;border-color:#b4c9b8}.dialog .btn.primary{background:#e2ae72;color:#173c33;border-color:#d89b5e}.dialog .btn.icon{background:transparent;border-color:transparent;color:#31584a;font-size:28px}.dialog-head{display:flex;align-items:start;justify-content:space-between;gap:10px;margin-bottom:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.intro{text-align:center}.intro-mark,.result-symbol{font-family:Georgia,serif;font-size:54px;color:#c58b54}.intro p{margin:6px 0 22px}.tall{width:min(100%,560px)}.rules-list{padding-left:20px;line-height:1.5}.rules-list li{margin-bottom:10px}.keyboard-help{border-top:1px solid #d5dfd3;padding-top:14px;font-size:13px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #d7e1d5;gap:14px;font-weight:600}.setting-row select{min-width:140px;min-height:40px;border:1px solid #b7c9b6;border-radius:8px;background:white;color:#193d34;padding:5px 8px}.setting-row input{width:22px;height:22px;accent-color:#1c6654}.setting-foot{font-size:12px;text-align:center}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:16px 0}.stats-grid div{padding:13px 8px;border-radius:10px;background:#e8eee3;text-align:center}.stats-grid small{display:block;font-size:11px;color:#557266}.stats-grid strong{display:block;font-family:Georgia,serif;font-size:23px;margin-top:3px}.dialog .btn.subtle{font-size:12px;padding:6px 10px;min-height:36px;background:transparent;border:0;color:#657e70}.result{text-align:center}.result h2{font-size:31px}.result p{margin:6px 0 15px}.result-numbers{display:flex;flex-direction:column;gap:6px;border-top:1px solid #d5dfd3;border-bottom:1px solid #d5dfd3;padding:13px;font-size:14px;font-weight:700}.result .dialog-actions{justify-content:center}
@media(max-width:950px){.layout{grid-template-columns:1fr}.side-panel{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:start}.score-card,.side-info{height:100%}.side-buttons{align-self:stretch}.save-note{display:none}.felt{min-height:530px}}
@media(max-width:620px){.shell{padding:9px;gap:9px}.brand-mark{width:38px;height:38px;font-size:25px}.brand strong{font-size:20px}.brand small{display:none}.top-actions{gap:3px}.top-actions .btn.icon{width:44px;min-height:44px;font-size:18px}.layout{gap:9px}.table-panel{border-radius:15px}.matchbar{padding:8px 11px;font-size:11px}.felt{min-height:520px;padding:13px 9px}.felt:before{inset:7px;border-radius:48px}.opponent-hand{min-height:76px}.opponent-hand .card{width:48px;height:70px;margin-left:-25px}.opponent-hand .card:first-child{margin-left:0}.human-hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));justify-items:center;gap:4px 0;min-height:150px;padding:0 2px}.human-hand .card{width:min(100%,48px);height:69px;padding:4px}.card .corner{font-size:11px}.card .big-suit{font-size:23px}.center-area{gap:8px}.pile-wrap{min-width:60px}.pile{width:59px;height:80px}.table-message{max-width:145px}.table-message strong{font-size:15px}.table-message small{font-size:10px}.table-emblem{font-size:25px}.actionbar{padding:8px;display:block}.primary-actions,.utility-actions{justify-content:center}.utility-actions{margin-top:6px}.primary-actions:empty,.utility-actions:empty{display:none}.actionbar .btn{min-height:44px}.side-panel{grid-template-columns:1fr 1fr}.score-card{padding:12px}.scoreline{margin:6px 0}.scoreline strong{font-size:27px}.side-info{padding:12px;gap:5px}.side-buttons{grid-column:1/-1;grid-template-columns:1fr 1fr}.side-buttons .btn{font-size:12px}.player-line{margin:0 5px}.deadwood-badge{font-size:10px;padding:5px 7px}.deadwood-badge strong{font-size:13px}}
@media(max-width:350px){.topbar{flex-wrap:wrap}.brand strong{font-size:18px}.top-actions{margin-left:auto}.human-hand .card{width:44px}.table-message{max-width:125px}.side-buttons .btn{white-space:normal}}
@media(max-height:640px) and (min-width:621px){.felt{min-height:420px}.opponent-hand .card{height:72px}.human-hand .card{height:72px}.center-area{padding:3px 0}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}.reduced-motion *, .reduced-motion *:before,.reduced-motion *:after{transition:none!important;animation:none!important}
