:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#e8efe8;background:#101b25;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(circle at 50% 30%,#233b40 0,#14232c 52%,#0e1924 100%)}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid #e9c977;outline-offset:3px}.app{min-height:100dvh;max-width:1480px;margin:auto;padding:20px clamp(12px,3vw,40px) 14px;display:flex;flex-direction:column}.topbar,.top-actions,.brand,.board-head,.board-footer,.side-heading,.bottom-nav{display:flex;align-items:center;justify-content:space-between}.topbar{gap:14px;padding-bottom:18px;border-bottom:1px solid #ffffff1f}.brand{justify-content:flex-start;gap:12px}.brand-mark{width:42px;height:42px;display:grid;place-items:center;color:#182532;background:#e8c575;border-radius:13px;font-size:29px;box-shadow:0 5px 20px #0004}.brand strong{display:block;font-family:Georgia,serif;font-size:21px;letter-spacing:.02em}.brand small{display:block;color:#a8bbc0;font-size:11px;text-transform:uppercase;letter-spacing:.16em;margin-top:2px}.top-actions{justify-content:flex-end;gap:8px}.chip{height:38px;min-width:38px;padding:0 10px;border:1px solid #ffffff30;border-radius:10px;color:#dbe7e4;background:#ffffff0b;font-weight:700}.chip:hover,.secondary:hover,.bottom-nav button:hover{background:#ffffff1d}.layout{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px;padding-top:20px}.board-panel,.side-panel{border:1px solid #ffffff18;border-radius:22px;background:#ffffff0a;box-shadow:0 20px 60px #0002}.board-panel{min-width:0;padding:20px clamp(10px,2vw,28px) 12px;overflow:hidden}.board-head{gap:10px}.eyebrow{color:#dbbf78;text-transform:uppercase;font-size:11px;letter-spacing:.19em;font-weight:800}.board-head h1{font-family:Georgia,serif;font-size:clamp(24px,2.6vw,34px);font-weight:500;margin:3px 0}.seed-tag{font-size:12px;color:#a6bbb8;padding:7px 10px;border-radius:20px;background:#ffffff0b;white-space:nowrap}.clock-wrap{width:100%;display:flex;justify-content:center;padding:0}.clock{position:relative;width:min(100%,620px);aspect-ratio:1;margin:auto;border:1px solid #dfc98542;border-radius:50%;background:radial-gradient(circle,#17323a 0 24%,#1b3438 25% 55%,#213d3b 55% 56%,#1b3438 57% 100%);box-shadow:inset 0 0 0 12px #ffffff04,inset 0 0 55px #06121b77,0 15px 50px #0004}.clock:before{content:"";position:absolute;inset:5%;border:1px dashed #d9bb7042;border-radius:50%;pointer-events:none}.pile{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:clamp(37px,9.2%,58px);height:clamp(52px,13%,78px);padding:0;border:0;background:none;color:inherit;transition:transform .16s,filter .16s;z-index:1}.pile:hover{transform:translate(-50%,-50%) scale(1.07)}.pile.highlight{filter:drop-shadow(0 0 9px #f7da7b);transform:translate(-50%,-50%) scale(1.1)}.pile.active .pile-card{outline:2px solid #eccc78;outline-offset:2px}.pile-card{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:6px;border:2px solid #d5b66b;background:repeating-linear-gradient(45deg,#244955 0 4px,#1a3946 4px 8px);box-shadow:0 3px 0 #0b1a25,0 5px 10px #0006}.pile-card:after{content:"✦";color:#d8ba76;font-size:19px}.pile.complete .pile-card{background:#f4f0e4;border-color:#f4f0e4;color:#1c3136}.pile.complete .pile-card:after{content:attr(data-face);font-family:Georgia,serif;font-size:24px}.pile.empty .pile-card{background:#203a3a;border:2px dashed #9fb8aa77}.pile.empty .pile-card:after{content:""}.pile-rank{position:absolute;left:50%;bottom:-20px;transform:translateX(-50%);color:#d6c9a7;font-size:11px;font-weight:800;text-shadow:0 2px 4px #000;white-space:nowrap}.pile-count{position:absolute;right:-6px;top:-6px;min-width:20px;height:20px;display:grid;place-items:center;padding:0 3px;border-radius:10px;background:#e8c575;color:#173039;font-size:11px;font-weight:900;box-shadow:0 2px 5px #0005}.board-footer{min-height:36px;gap:8px;font-size:12px;color:#a8c3bf}.board-footer span:first-child{color:#e3d4a8}.side-panel{padding:20px;display:flex;flex-direction:column;gap:17px}.side-heading strong{font-family:Georgia,serif;font-size:22px;color:#f1ddaa}.progress-track{height:7px;background:#ffffff19;border-radius:8px;overflow:hidden;margin-top:-11px}.progress-track div{height:100%;background:linear-gradient(90deg,#9eae82,#e7c678);width:0;transition:width .2s}.turn-card{padding:18px;border:1px solid #e8c57536;border-radius:16px;text-align:center;background:linear-gradient(145deg,#244146,#1b303b)}.turn-card>span{font-size:11px;text-transform:uppercase;letter-spacing:.16em;color:#d4c18c;font-weight:800}.large-card{width:96px;height:135px;margin:12px auto;background:#f6f0df;border-radius:11px;box-shadow:0 6px 22px #0006;display:grid;place-items:center;color:#16313b;border:3px solid #fff;font-family:Georgia,serif;font-size:45px}.large-card.red{color:#ba4f54}.large-card.back{background:repeating-linear-gradient(45deg,#244955 0 7px,#1a3946 7px 14px);color:#e8c575;border-color:#d5b66b}.turn-card p{font-size:13px;line-height:1.45;color:#d1e0da;margin:0;min-height:38px}.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.control-grid button,.modal-actions button{min-height:43px;border-radius:10px;padding:8px 10px;border:1px solid #ffffff32;color:#e9f2eb}.primary{background:#e2bd6e!important;border-color:#e2bd6e!important;color:#1a2d31!important;font-weight:800}.primary:hover{background:#f0d28b!important}.secondary{background:#ffffff0a}.control-grid button:disabled{opacity:.4;cursor:default}.note{margin-top:auto;border-top:1px solid #ffffff1e;padding-top:13px;color:#a8bdb8;font-size:12px;line-height:1.5}.bottom-nav{justify-content:center;gap:8px;padding:16px 0 6px;flex-wrap:wrap}.bottom-nav button{border:1px solid #ffffff27;background:#ffffff0b;color:#e4ece8;border-radius:9px;padding:9px 15px;min-height:40px}.bottom-nav button.selected{color:#1b2c30;background:#e8c575}footer{text-align:center;color:#7e9697;font-size:11px;padding:10px 0 0}footer span{padding:0 5px}.modal-backdrop{position:fixed;inset:0;background:#06121bdc;display:flex;align-items:center;justify-content:center;padding:16px;z-index:10}.modal-backdrop.hidden{display:none}.modal{position:relative;width:min(100%,470px);max-height:calc(100dvh - 32px);overflow:auto;background:#20363b;border:1px solid #d8ba7657;border-radius:20px;box-shadow:0 22px 80px #0009;padding:28px}.modal h2{font-family:Georgia,serif;font-size:31px;font-weight:500;margin:5px 0 18px}.modal p,.modal li{color:#d2e0d9;line-height:1.55;font-size:14px}.modal ul{padding-left:20px}.modal .close{position:absolute;right:17px;top:13px;border:0;background:none;color:#e4eadd;font-size:28px}.modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.modal-actions button{background:#ffffff12;flex:1;min-width:110px}.stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.stat{padding:14px;border:1px solid #ffffff25;border-radius:12px;background:#ffffff08}.stat strong{display:block;font:28px Georgia,serif;color:#eed28d}.stat span{font-size:12px;color:#bfceca}.result-big{font:44px Georgia,serif;color:#e8c575;margin:8px 0}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #ffffff22}.settings-row button{border:1px solid #ffffff3b;background:#ffffff13;color:#fff;border-radius:8px;padding:8px 12px}
@media(max-width:850px){.layout{grid-template-columns:1fr;gap:12px}.side-panel{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:10px}.side-heading,.progress-track,.note{grid-column:1/-1}.turn-card{grid-row:3}.control-grid{grid-row:3;grid-column:2;align-self:center}.clock{width:min(100%,560px)}}
@media(max-width:520px){.app{padding:10px 8px 8px}.topbar{padding:4px 4px 10px}.brand{gap:8px}.brand-mark{width:33px;height:33px;font-size:22px;border-radius:9px}.brand strong{font-size:16px}.brand small{font-size:9px}.top-actions{gap:4px}.chip{height:34px;min-width:34px;padding:0 5px}.layout{padding-top:10px}.board-panel{padding:12px 5px 4px;border-radius:16px}.board-head{padding:0 9px}.board-head h1{font-size:24px}.seed-tag{font-size:10px;padding:6px}.clock{width:min(100%,390px)}.pile{width:10%;height:14%;min-width:33px;min-height:45px}.pile-card{border-radius:4px}.pile-card:after{font-size:14px}.pile.complete .pile-card:after{font-size:17px}.pile-rank{font-size:9px;bottom:-15px}.pile-count{min-width:17px;height:17px;font-size:9px;right:-5px}.board-footer{padding:0 8px;font-size:11px}.side-panel{padding:10px 12px;border-radius:16px;gap:8px}.side-heading strong{font-size:18px}.turn-card{padding:8px}.turn-card>span{font-size:9px}.large-card{width:55px;height:77px;font-size:29px;margin:5px auto}.turn-card p{font-size:11px;min-height:31px}.control-grid{gap:6px}.control-grid button{min-height:36px;padding:5px;font-size:12px}.note{font-size:10px;padding-top:6px}.bottom-nav{padding:10px 0 2px;gap:5px}.bottom-nav button{padding:7px 9px;min-height:36px;font-size:11px}footer{font-size:10px;padding-top:5px}}

/* Narrow embedded viewport; wrap controls instead of clipping content. */
body{min-width:0}.topbar{flex-wrap:wrap}.top-actions{margin-left:auto}.brand{min-width:0}.board-head{flex-wrap:wrap;gap:8px}.side-panel>*{min-width:0}.control-grid button{overflow-wrap:anywhere}.board-footer{flex-wrap:wrap;gap:5px}.settings-row{flex-wrap:wrap}.modal-actions button{min-width:0;flex:1 1 100px}@media(max-width:300px){.side-panel{grid-template-columns:1fr}.turn-card,.control-grid{grid-row:auto;grid-column:1}.chip{min-height:40px}.bottom-nav button{min-height:44px}.control-grid button{min-height:44px}.pile{min-width:28px;min-height:40px}.board-head h1{font-size:22px}.pile-count{right:-2px}}
.side-heading strong{white-space:nowrap}
