:root{color-scheme:dark;--forge-bg:#090b0e;--forge-text:#f2f4f6;--forge-orange:#ff7a18;--gold:#dbb76f;--cream:#f5e7cc;--muted:#b8b9a8;--panel:#111a17;--line:#655439;--dice-size:70px;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--cream);background:#101714}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 74% 12%,#70502855,transparent 50%),linear-gradient(#111914dc,#111611ef),url('assets/walnut.webp?v=0016') center/cover fixed}button,select{font:inherit}button{cursor:pointer;border:1px solid #716044;border-radius:10px;background:linear-gradient(#24302b,#151d19);color:var(--cream);min-height:44px;padding:10px 16px;transition:background .15s,box-shadow .15s,transform .15s}button:hover:not(:disabled){border-color:var(--gold);box-shadow:0 0 15px #dfad5225}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.5;cursor:default}button:focus-visible,select:focus-visible{outline:3px solid #ffad55;outline-offset:3px}button.primary{background:linear-gradient(110deg,#875b27,#e9bd72 45%,#ba8a43 80%,#8a5a27);color:#20180e;border:1px solid #ffde96;box-shadow:inset 0 0 0 3px #573a2644,0 8px 18px #0016;text-transform:uppercase;font-weight:800;letter-spacing:.09em;font-size:15px;min-height:54px}button.small{padding:8px 13px;min-width:44px}.icon-button{width:44px;padding:10px;display:inline-grid;place-items:center}.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}select{width:100%;height:46px;border:1px solid #6d6046;border-radius:8px;background:#17241e;color:var(--cream);padding:0 12px}header{height:86px;max-width:1700px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:12px 32px;gap:20px;border-bottom:1px solid #c59a4c44}.wordmark{display:flex;align-items:center;gap:10px;min-width:180px}.wordmark img{width:136px;height:54px;object-fit:contain;background:#edede5;border-radius:5px;padding:4px}.wordmark span{font:700 32px Georgia,serif;color:var(--gold);letter-spacing:.12em}nav{display:flex;gap:7px}.top-status{font-size:12px;color:var(--muted);text-align:center}h1,h2,p{margin-top:0}h1,h2{font-family:Georgia,'Times New Roman',serif}h1{line-height:1.1}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.19em;text-transform:uppercase;color:var(--gold)}.panel{border:1px solid #9e7b44;background:linear-gradient(130deg,#1c2821f5,#0d1814fa);border-radius:16px;box-shadow:0 15px 40px #0016,inset 0 0 0 4px #d5a85008}.launcher{max-width:1300px;margin:auto;min-height:calc(100dvh - 130px);display:grid;grid-template-columns:400px 1fr;padding:32px;gap:42px;align-items:center}.launch-panel{padding:32px}.launch-panel h1{font-size:42px;margin-bottom:18px}.intro{color:#cbc9b6;line-height:1.55;font-size:14px}.launch-panel label{display:block;font-size:11px;color:var(--gold);text-transform:uppercase;letter-spacing:.12em;margin:18px 0 8px}.launch-panel button{width:100%;margin-top:13px}.launch-panel .primary{margin-top:24px}.record{border-top:1px solid #89734555;margin-top:24px;padding-top:16px;font-size:12px;line-height:1.65;color:var(--muted)}.version,.offline-note{font-size:10px;color:var(--muted);margin:16px 0 0}.launch-scene{position:relative;min-height:600px;isolation:isolate;display:flex;justify-content:flex-end;align-items:center}.scene-light{position:absolute;inset:0;border-radius:50%;background:radial-gradient(ellipse,#c7863e55,transparent 65%);z-index:-1}.portrait-frame{height:530px;width:280px;position:relative;border:1px solid #9e7b44;border-radius:160px 160px 24px 24px;overflow:hidden;box-shadow:0 25px 50px #0016}.portrait{width:100%;height:100%;object-fit:cover;object-position:center}.portrait-title{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#081610);padding:50px 0 26px;text-align:center;color:var(--gold);letter-spacing:.25em;font:700 23px Georgia}.scene-caption{position:absolute;left:0;bottom:60px;max-width:350px;text-shadow:0 2px 15px #000;background:linear-gradient(90deg,#101914f5,#101914b0,transparent);padding:25px 30px 15px 0}.scene-caption h2{font-size:44px;margin-bottom:15px}.scene-caption p:last-child{font-size:14px;line-height:1.6;color:#c6cab8}.scene-dice{position:absolute;top:70px;left:12px;display:flex;gap:25px;transform:rotate(-12deg);--dice-size:54px}.game{max-width:1700px;min-height:calc(100dvh - 132px);margin:auto;padding:24px 32px;display:grid;grid-template-columns:minmax(260px,310px) minmax(390px,1fr) 255px;gap:24px;align-items:stretch}.score-panel{overflow:hidden;padding:17px 16px 12px;display:flex;flex-direction:column}.panel-head{display:flex;justify-content:space-between;margin-bottom:16px;text-transform:uppercase;font-size:11px;font-weight:700;letter-spacing:.1em;color:var(--gold)}.score-heading,.score-row,.score-total{display:grid;grid-template-columns:1fr 52px 52px;gap:3px;align-items:center}.score-heading{font-size:11px;color:var(--muted);padding:0 4px 9px;border-bottom:1px solid #655439}.score-heading span:not(:first-child){text-align:center}#scoreRows{flex:1;display:flex;flex-direction:column}.score-row{flex:1;min-height:27px;font-size:12px;padding:0 4px;border-bottom:1px solid #ae945922}.score-row .category-name{min-width:0;color:#e4deca;white-space:nowrap}.score-value{font-size:12px;font-variant-numeric:tabular-nums;text-align:center}.score-value.player{padding:0 2px;min-height:27px;height:100%;border:0;background:none;box-shadow:none;border-radius:4px}.score-value.player:disabled{opacity:1;cursor:default}.score-value.available{color:#f4c982;background:#d4a94c15;font-weight:700}.score-value.available:hover{background:#d4a94c38}.score-value.zero{color:#bab49f}.score-row.bonus{border-bottom:1px solid #9e7b4488;color:var(--gold);background:#bd943d0c}.score-row.chosen{background:#bd943d20}.score-total{font-size:13px;color:var(--gold);padding:12px 4px 0;margin-top:8px}.score-total strong{text-align:center;font-size:20px}.table-area{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;position:relative}.turn-info{text-align:center;min-height:98px}.turn-info .eyebrow{margin-bottom:9px}.turn-info h1{font-size:30px;margin-bottom:8px}.turn-info p:last-child{font-size:12px;color:var(--muted);min-height:18px}.tray{width:100%;height:clamp(260px,40vh,450px);padding:12px;background:linear-gradient(130deg,#5e3e23,#bc9356 20%,#573921 60%,#d3ac64 80%,#644321);border:1px solid #e9c17d;border-radius:48px;box-shadow:0 23px 25px #0016,inset 0 0 0 5px #443523}.tray-inset{height:100%;position:relative;border:2px solid #64553a;outline:1px dashed #9d8f5b55;outline-offset:-9px;background:radial-gradient(ellipse at 45% 35%,#284a3e,#10271f 80%);border-radius:35px;box-shadow:inset 0 9px 18px #000b;display:flex;align-items:center;justify-content:center;padding:12px}.tray-inset:before{content:'';position:absolute;inset:0;border-radius:inherit;opacity:.11;background-image:url('assets/walnut.webp?v=0016');background-size:200px;mix-blend-mode:luminosity;pointer-events:none}.tray-monogram{position:absolute;bottom:25px;font:700 16px Georgia;color:#b9a87132;letter-spacing:.15em;text-align:center}.tray-monogram span{display:block;font:8px system-ui;letter-spacing:.16em;margin-top:6px}.dice-row{display:flex;gap:clamp(10px,1.7vw,26px);align-items:center;justify-content:center;flex-wrap:wrap;position:relative;z-index:1;max-width:100%}.die{width:var(--dice-size);height:calc(var(--dice-size) + 34px);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;border:0;background:none;padding:0;border-radius:13px;perspective:600px;min-height:44px;overflow:visible;box-shadow:none!important}.die:disabled{opacity:1}.die:hover:not(:disabled){background:none;transform:translateY(-4px)}.die-angle{width:var(--dice-size);height:var(--dice-size);transform:rotateX(-17deg) rotateY(-19deg);transform-style:preserve-3d;filter:drop-shadow(8px 14px 5px #0016)}.cube{width:100%;height:100%;transform-style:preserve-3d;transition:transform .52s cubic-bezier(.22,.8,.2,1)}.face{position:absolute;inset:0;border-radius:11px;border:1px solid #ad946d;backface-visibility:hidden;background:linear-gradient(140deg,#fff6df,#dbc9a6);box-shadow:inset 0 0 6px #96784b40;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:11px;gap:4px}.face.front{transform:translateZ(calc(var(--dice-size)/2))}.face.back{transform:rotateY(180deg) translateZ(calc(var(--dice-size)/2))}.face.right{transform:rotateY(90deg) translateZ(calc(var(--dice-size)/2));background:linear-gradient(140deg,#ddc8a0,#b89b6a)}.face.left{transform:rotateY(-90deg) translateZ(calc(var(--dice-size)/2))}.face.top{transform:rotateX(90deg) translateZ(calc(var(--dice-size)/2));background:linear-gradient(140deg,#fff9e9,#e9dbbb)}.face.bottom{transform:rotateX(-90deg) translateZ(calc(var(--dice-size)/2))}.pip{border-radius:50%;background:radial-gradient(circle at 65% 70%,#332c21,#080807);box-shadow:inset 1px 1px 2px #0016;aspect-ratio:1}.held-label{position:absolute;bottom:0;font-size:9px;letter-spacing:.12em;color:var(--gold);font-weight:700;white-space:nowrap}.die.held .die-angle{filter:drop-shadow(0 0 9px #ffc064) drop-shadow(0 10px 5px #0016)}.die.held .held-label:before{content:'• ';color:#ffcc70}.die.rolling .die-angle{animation:tumble .56s ease-out}.table-controls{text-align:center;width:min(340px,90%);margin-top:22px}.roll-counter{color:var(--gold);font-size:12px;letter-spacing:.07em;margin-bottom:12px}.table-controls .primary{width:100%}.table-controls p{color:var(--muted);font-size:11px;line-height:1.4;margin:14px 0 0;min-height:30px}.keyboard-hint{font-size:9px;color:#b8b9a880;margin-top:5px}.opponent-panel{position:relative;overflow:hidden;display:flex;flex-direction:column}.opponent-head{padding:23px 20px 14px}.opponent-head h2{font-size:34px;margin:7px 0 8px}.level{font-size:11px;color:var(--gold)}.opponent-picture{position:relative;min-height:180px;flex:1;overflow:hidden}.opponent-picture img{height:100%;width:100%;position:absolute;object-fit:cover;object-position:50% 10%}.portrait-shade{position:absolute;inset:0;background:linear-gradient(transparent 60%,#101c16)}.speech{position:relative;margin:-20px 12px 0;padding:18px 14px;min-height:90px;background:linear-gradient(#f3e4c1,#dac699);color:#302318;border-radius:12px;font:italic 16px/1.4 Georgia;box-shadow:0 5px 15px #0016}.speech:before{content:'';position:absolute;top:-10px;right:28px;border:10px solid transparent;border-top:0;border-bottom-color:#f3e4c1}.opponent-footer{padding:14px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted)}footer{height:44px;border-top:1px solid #aa855d33;display:flex;justify-content:space-between;align-items:center;max-width:1700px;margin:auto;padding:0 32px;font-size:8px;letter-spacing:.13em;color:#999e8a}.boot{position:fixed;inset:0;z-index:10;background:#080b0d;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px}.boot img{width:min(520px,80vw);max-height:65vh;object-fit:contain}.boot span{color:var(--gold);font-size:12px;letter-spacing:.09em}.load-line{width:150px;height:2px;background:#343a38;overflow:hidden}.load-line:after{content:'';display:block;height:100%;width:40%;background:var(--forge-orange);animation:load 1.2s infinite}dialog{width:min(600px,calc(100vw - 28px));max-height:calc(100dvh - 30px);border:1px solid #ab8750;border-radius:16px;background:linear-gradient(135deg,#243129,#0f1c16);color:var(--cream);padding:24px;box-shadow:0 20px 80px #000c}dialog::backdrop{background:#050a08ba;backdrop-filter:blur(7px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.dialog-top .eyebrow{margin:0}dialog h2{font-size:32px;margin-bottom:13px}dialog p,dialog li{font-size:13px;line-height:1.7;color:#d2d3bf}dialog ul{padding-left:20px}.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.dialog-actions button{flex:1}.result-scores{display:flex;gap:15px;justify-content:center;margin:24px 0}.result-scores div{flex:1;text-align:center;padding:20px;background:#0016;border:1px solid #8b754e;border-radius:12px}.result-scores strong{display:block;font:40px Georgia;color:var(--gold);margin-top:8px}.help-tabs{display:flex;gap:8px;margin-bottom:15px}.help-tabs button{flex:1;font-size:12px}.help-rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.help-rule-grid div{padding:10px;background:#0016;border-radius:7px;font-size:11px;line-height:1.5}.help-rule-grid strong{display:block;color:var(--gold)}#toast{position:fixed;bottom:60px;left:50%;transform:translateX(-50%);background:#142a20;border:1px solid var(--gold);border-radius:8px;padding:12px 20px;font-size:12px;z-index:20}.dev-options{display:flex;flex-wrap:wrap;gap:8px}.dev-options button{font-size:11px}.large-number{font:64px Georgia;color:var(--gold)}[hidden]{display:none!important}@keyframes load{0%{transform:translateX(-100%)}100%{transform:translateX(350%)}}@keyframes tumble{0%{transform:translateY(-15px) rotateX(10deg) rotateZ(-15deg)}40%{transform:translateY(-35px) rotateX(180deg) rotateZ(35deg)}100%{transform:rotateX(-17deg) rotateY(-19deg)}}
@media(min-width:1450px){:root{--dice-size:80px}.opponent-panel{min-height:650px}.game{grid-template-columns:330px 1fr 290px}.score-row{font-size:14px;min-height:30px}.score-value{font-size:14px}.turn-info h1{font-size:37px}}
@media(max-width:1150px){:root{--dice-size:58px}header{height:72px;padding:10px 20px}.game{gap:16px;padding:18px 20px;grid-template-columns:250px minmax(320px,1fr) 190px;min-height:calc(100dvh - 116px)}.score-panel{padding:14px 10px}.opponent-head{padding:18px 14px 10px}.opponent-head h2{font-size:28px}.speech{font-size:14px;padding:14px 10px;min-height:95px}.tray{padding:10px;border-radius:35px}.tray-inset{border-radius:26px}.face{padding:8px;gap:3px}.turn-info h1{font-size:27px}.dice-row{gap:16px}.launcher{grid-template-columns:350px 1fr;gap:20px;padding:24px}.launch-panel{padding:24px}.scene-caption h2{font-size:35px}.portrait-frame{width:245px}.scene-caption{max-width:270px}.top-status{display:none}}
@media(max-width:900px) and (min-width:641px){.game{grid-template-columns:240px 1fr;grid-template-rows:1fr auto;gap:12px;min-height:calc(100dvh - 105px)}.score-panel{grid-row:1/3}.opponent-panel{grid-column:2;display:grid;grid-template-columns:66px 1fr;min-height:100px;max-height:115px;border-radius:12px}.opponent-head{display:none}.opponent-picture{grid-column:1;grid-row:1/3;min-height:0}.opponent-picture img{object-position:50% 5%}.speech{grid-column:2;margin:9px 9px 0;min-height:0;padding:9px;font-size:13px}.speech:before{display:none}.opponent-footer{grid-column:2;padding:4px 10px}.opponent-footer button{min-height:32px;padding:4px 10px}.tray{height:230px}.table-controls{margin-top:12px}.turn-info{min-height:80px}.turn-info h1{font-size:24px}.keyboard-hint{display:none}.launcher{grid-template-columns:330px 1fr;gap:15px}.launch-scene{min-height:480px}.portrait-frame{height:420px;width:200px}.scene-caption{bottom:0;max-width:230px}.scene-dice{top:35px;gap:15px;--dice-size:38px}footer{height:33px}}
@media(max-width:640px){:root{--dice-size:52px}header{height:62px;padding:7px 12px;gap:5px}.wordmark{min-width:0;gap:5px}.wordmark img{width:78px;height:35px}.wordmark span{font-size:21px;letter-spacing:.07em}nav{gap:4px}.icon-button{width:36px;min-height:40px;padding:7px}nav button.small{min-width:36px;padding:7px;min-height:40px}#full{display:none}.launcher{display:flex;flex-direction:column-reverse;gap:0;padding:16px;min-height:calc(100dvh - 95px)}.launch-scene{width:100%;min-height:190px;height:190px;margin-bottom:14px;display:block;overflow:hidden;border-radius:14px;background:radial-gradient(ellipse,#55422688,transparent)}.portrait-frame{position:absolute;right:0;top:0;height:245px;width:126px;border-radius:70px 70px 0 0}.portrait-title{display:none}.scene-caption{left:14px;bottom:10px;max-width:calc(100% - 122px);padding:10px 0 0;background:none}.scene-caption h2{font-size:28px;margin-bottom:8px}.scene-caption .eyebrow{font-size:8px}.scene-caption p:last-child{font-size:11px;line-height:1.4;margin-bottom:0}.scene-dice{display:none}.launch-panel{padding:22px;width:100%}.launch-panel h1{font-size:29px;margin-bottom:12px}.intro{font-size:12px}.launch-panel .eyebrow{display:none}.launch-panel label{margin-top:12px}.launch-panel .primary{margin-top:18px}.record{margin-top:16px;padding-top:10px}.game{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto;padding:12px;gap:12px;min-height:0}.table-area{grid-row:1}.turn-info{min-height:75px}.turn-info .eyebrow{margin-bottom:7px;font-size:9px}.turn-info h1{font-size:25px;margin-bottom:6px}.turn-info p:last-child{font-size:11px;margin-bottom:12px}.tray{height:180px;border-radius:30px;padding:9px}.tray-inset{border-radius:23px;padding:10px}.dice-row{gap:14px;flex-wrap:nowrap}.face{border-radius:8px;padding:7px;gap:2px}.die{height:calc(var(--dice-size) + 30px)}.tray-monogram{bottom:15px;font-size:11px}.tray-monogram span{font-size:6px}.table-controls{margin-top:12px;width:100%;display:grid;grid-template-columns:1fr 1.5fr;gap:8px;align-items:center}.roll-counter{margin:0;font-size:11px}.table-controls .primary{min-height:48px;font-size:12px}.table-controls p{grid-column:1/3;margin:4px 0 0;min-height:17px;font-size:10px}.keyboard-hint{display:none}.opponent-panel{grid-row:2;display:grid;grid-template-columns:56px 1fr;min-height:95px;max-height:110px;border-radius:12px}.opponent-head{display:none}.opponent-picture{grid-column:1;grid-row:1/3;min-height:0}.opponent-picture img{object-position:50% 0}.speech{grid-column:2;margin:8px 8px 0;padding:9px 11px;min-height:0;font-size:13px}.speech:before{display:none}.opponent-footer{grid-column:2;padding:4px 10px}.opponent-footer button{min-height:32px;padding:4px 10px}.score-panel{grid-row:3;padding:15px}.panel-head{margin-bottom:12px}.score-row{height:32px;min-height:32px;font-size:13px}.score-value.player{min-height:32px}.score-heading,.score-row,.score-total{grid-template-columns:1fr 64px 64px}.score-value{font-size:13px}footer{height:33px;padding:0 12px;font-size:7px}footer span:first-child{display:none}dialog{padding:19px}dialog h2{font-size:27px}.help-rule-grid{grid-template-columns:1fr 1fr}}
@media(max-width:360px){:root{--dice-size:44px}.dice-row{gap:13px}.wordmark img{width:60px}.wordmark span{font-size:17px}.score-panel{padding:12px}.scene-caption h2{font-size:24px}}
@media(max-height:600px) and (min-width:641px){header{height:62px}.game{padding:12px 18px;min-height:calc(100dvh - 95px)}.turn-info{min-height:65px}.turn-info h1{font-size:23px}.turn-info p:last-child{margin-bottom:7px}.tray{height:185px}.table-controls{margin-top:10px}.table-controls .primary{min-height:44px}.table-controls p{margin-top:8px;min-height:17px}.keyboard-hint{display:none}.score-row{min-height:23px;font-size:11px}.score-value.player{min-height:23px}.panel-head{margin-bottom:8px}.score-panel{padding:10px}.score-total{padding-top:7px}.opponent-panel{min-height:0}.launcher{min-height:0;grid-template-columns:350px 1fr;padding:18px}.launch-panel{padding:22px}.launch-panel h1{font-size:32px}.launch-scene{min-height:460px}.portrait-frame{height:420px}.scene-caption h2{font-size:31px}footer{height:33px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep the 3D faces in the same rendering context; filters flatten CSS cubes. */
.die-angle{filter:none!important}.die.held .face{box-shadow:inset 0 0 5px #96784b40,0 0 12px #ffc06490}.die:after{content:"";position:absolute;width:80%;height:13px;border-radius:50%;background:#0016;filter:blur(5px);top:calc(var(--dice-size) - 2px);z-index:-1}

.mobile-score-button{display:none}.mobile-score-rows .score-row{height:44px;min-height:44px}.mobile-score-rows .score-value.player{height:44px;min-height:44px}.score-dice-summary{margin-bottom:12px;font-size:16px!important;letter-spacing:.1em;color:var(--gold)!important}
@media(max-width:640px){.game>.score-panel{display:none}.mobile-score-button{display:block;grid-column:1/3;min-height:44px;margin-top:0;border-color:#c29d56;color:var(--gold)}.game{min-height:calc(100dvh - 95px);align-content:center}.table-controls p{min-height:14px}.mobile-score-rows .score-heading,.mobile-score-rows .score-row,.mobile-score-rows .score-total{grid-template-columns:1fr 58px 58px}.mobile-score-rows .score-row{font-size:12px}.mobile-score-rows .score-total{padding-top:10px}.mobile-score-rows .score-total strong{font-size:22px}dialog .help-tabs{margin-bottom:8px}dialog .help-tabs button{font-size:11px}
@media(max-height:800px){.launcher{padding:12px}.launch-scene{height:125px;min-height:125px;margin-bottom:10px}.portrait-frame{height:200px;width:112px}.scene-caption{max-width:calc(100% - 115px);bottom:3px}.scene-caption h2{font-size:23px}.scene-caption .eyebrow{font-size:7px;margin-bottom:5px}.scene-caption p:last-child{font-size:10px}.launch-panel{padding:18px}.launch-panel h1{font-size:26px}.intro{font-size:11px;line-height:1.4;margin-bottom:10px}.launch-panel label{margin-top:10px}.launch-panel .primary{margin-top:14px}.record{margin-top:12px;font-size:11px}.version,.offline-note{margin-top:10px;font-size:9px}}}

@media(max-width:1000px) and (max-height:500px){:root{--dice-size:44px}header{height:56px;padding:6px 16px}.wordmark img{height:40px;width:85px}.wordmark span{font-size:24px}.game{display:grid;grid-template-columns:minmax(0,1fr) 165px;grid-template-rows:1fr;min-height:calc(100dvh - 89px);padding:10px 16px;gap:14px}.game>.score-panel{display:none}.table-area{grid-column:1;grid-row:1}.turn-info{min-height:44px}.turn-info .eyebrow{margin-bottom:5px;font-size:8px}.turn-info h1{font-size:22px;margin-bottom:9px}.turn-info p:last-child{display:none}.tray{height:140px;padding:8px;border-radius:28px}.tray-inset{border-radius:20px}.tray-monogram{bottom:12px;font-size:10px}.tray-monogram span{display:none}.dice-row{gap:22px}.face{padding:6px;gap:2px}.table-controls{width:100%;display:grid;grid-template-columns:90px 1fr 1fr;gap:8px;margin-top:10px;align-items:center}.roll-counter{margin:0;font-size:10px}.table-controls .primary{font-size:10px;min-height:44px;padding:8px}.mobile-score-button{display:block;grid-column:3;min-height:44px;font-size:10px;padding:8px}.table-controls p{grid-column:1/4;font-size:9px;margin:0;min-height:13px}.opponent-panel{grid-column:2;grid-row:1;display:flex;min-height:0;max-height:none}.opponent-head{display:none}.opponent-picture{flex:1;min-height:60px}.opponent-picture img{object-position:50% 5%}.speech{margin:-12px 8px 0;padding:9px;font-size:12px;min-height:55px}.opponent-footer{padding:6px 8px;font-size:8px}.opponent-footer button{min-height:30px;font-size:10px;padding:5px}.keyboard-hint{display:none}footer{height:33px;padding:0 16px}.mobile-score-rows .score-row{height:36px;min-height:36px}.mobile-score-rows .score-value.player{height:36px;min-height:36px}}
@media(max-width:640px) and (max-height:800px){.launcher{padding:10px}.launch-scene{height:95px;min-height:95px}.portrait-frame{height:175px}.scene-caption h2{font-size:21px}.scene-caption p:last-child{display:none}.launch-panel{padding:16px}.launch-panel h1{font-size:24px}.intro{font-size:10px;line-height:1.35}.record{font-size:10px}.version,.offline-note{margin-top:8px}.launch-panel button{margin-top:10px}}

@media(max-width:1000px) and (max-height:500px){.table-controls .roll-counter{grid-column:1;grid-row:1}.table-controls .primary{grid-column:2;grid-row:1}.table-controls .mobile-score-button{grid-column:3;grid-row:1}.table-controls p{grid-row:2}}

button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* BUILD 0016: approved product artwork, one integrated splash/loader. */
.boot{background:#090b0e url('assets/forge-dice-artwork.webp?v=0016') center/cover no-repeat;align-items:flex-start;justify-content:center;padding:7vw}
.boot:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#080b0dee,transparent 72%);pointer-events:none}
.splash-copy{position:relative;max-width:470px}.splash-copy h1{font:700 clamp(36px,5vw,76px) Georgia;color:#f3e4c9;letter-spacing:.04em;margin:20px 0}.splash-copy .load-line{margin-top:25px;width:220px}.splash-version{font-size:10px;color:#baa98d;margin-top:22px}
body{background:#090b0e url('assets/forge-dice-artwork.webp?v=0016') center/cover fixed no-repeat}
body:before{content:'';position:fixed;inset:0;background:#080c0ebd;z-index:-1}
header{background:#0b1013f0;border-bottom-color:#ff7a1855}.wordmark img{background:transparent;width:70px;padding:0}.wordmark span{font-family:system-ui;font-size:24px;color:#ff9a3c}
.launcher{max-width:none;grid-template-columns:minmax(300px,410px) 1fr;gap:0;padding:38px 6vw;background:linear-gradient(90deg,#090b0ee8,transparent 70%)}
.launch-panel{background:#10171deb;border-color:#ff7a1866;box-shadow:0 12px 45px #0016}.launch-panel h1{font-family:system-ui;font-size:34px}.launch-scene .portrait-frame,.launch-scene .scene-dice,.launch-scene .scene-caption,.scene-light{display:none}.launch-scene{min-height:550px}
@media(max-width:640px){.boot{padding:25px;background-position:68% center}.boot:before{background:linear-gradient(0deg,#090b0ef5,transparent 90%)}.splash-copy{align-self:stretch;margin-top:55vh}.splash-copy h1{font-size:34px;margin:10px 0}.launcher{padding:18px;background:#090b0ea8}.launch-scene{display:none}.launch-panel h1{font-size:26px}.wordmark img{width:45px}.wordmark span{font-size:20px}}
/* Artwork belongs to splash/launcher; gameplay keeps its live dice unambiguous. */
body{background:radial-gradient(ellipse at 70% 15%,#263129,#090b0e 75%)}
body:before{display:none}
.launcher{background:linear-gradient(90deg,#090b0eef,#090b0e66 45%,#090b0e11 75%),url('assets/forge-dice-artwork.webp?v=0016') center/cover no-repeat}
@media(max-width:640px){.launcher{background:linear-gradient(#090b0e88,#090b0ed9),url('assets/forge-dice-artwork.webp?v=0016') 68% center/cover no-repeat}}
.launcher{align-items:start}
@media(max-width:640px){.launcher{flex-direction:column;justify-content:flex-start;align-items:stretch}}
@media(max-width:640px){.boot{justify-content:flex-end;padding:24px}.splash-copy{margin-top:0;margin-bottom:6vh;width:100%;max-width:none}}
@media(max-width:640px){.boot{background-position:92% center}}

/* Preserve the complete approved 16:9 composition on wide screens. */
.boot{background-size:contain;background-position:center;background-color:#080b0e}
.splash-copy{max-width:650px}.splash-copy h1{font-size:clamp(32px,4vw,64px);white-space:nowrap}
.launcher{background-size:cover,contain;background-color:#080b0e}
@media(max-width:640px){.boot{background-size:contain;background-position:center top;justify-content:flex-end}.boot:before{background:linear-gradient(0deg,#080b0e,transparent 70%)}.splash-copy{margin-bottom:10vh}.splash-copy h1{font-size:32px}.launcher{background-size:cover,contain;background-position:center,center top}}
/* Collection and six-dice table */
#learnGame{font-size:13px;padding:8px;margin:4px 0}#gameChoice{margin-bottom:2px}.launch-panel h1{font-size:clamp(25px,3vw,44px)}
#farkle{height:calc(100dvh - 100px);display:grid;grid-template-columns:minmax(240px,330px) 1fr;gap:24px;padding:24px;background:radial-gradient(ellipse at center,#27443a,#0a1410)}
#farkle[hidden]{display:none}.f-score{padding:24px}.f-score h2{font-size:23px}.f-table{align-self:center;text-align:center;min-width:0}.f-table h1{font-size:clamp(26px,4vw,48px);margin:8px}.f-table .dice-row{justify-content:center;gap:12px;margin:24px auto}.f-table .die{font-family:Arial,sans-serif;font-size:60px;line-height:1;width:78px;height:78px;min-width:0;display:grid;place-items:center;color:#211b13;background:linear-gradient(135deg,#fff4d5,#c8ad79)}.f-table .die.held{outline:3px solid #f1b54e;transform:translateY(-5px)}.f-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}.f-final{color:#eac37c}#fDialog{max-width:700px}#fDialogBody{padding:24px}#fDialog li{margin-bottom:12px;line-height:1.5}
@media(max-width:700px){#farkle{grid-template-columns:1fr;gap:8px;padding:10px;height:calc(100dvh - 100px);grid-template-rows:auto 1fr}.f-score{padding:10px}.f-score h2{font-size:17px;margin:2px}.f-score .result-scores{margin:4px}.f-score .result-scores strong{font-size:25px}.f-score p{font-size:12px;margin:3px}.f-table .dice-row{gap:7px;margin:15px auto;flex-wrap:wrap;max-width:320px}.f-table .die{width:75px;height:75px;font-size:56px}.f-table h1{font-size:27px}.f-table p{font-size:13px;margin:5px}.f-actions button{padding:10px;font-size:13px}#fDialogBody{padding:14px}#fDialog li{font-size:13px;margin-bottom:8px}.launch-panel{padding:16px}.launch-panel .intro{margin-bottom:8px}.launch-panel label{margin-top:6px}.launch-panel select{padding:8px}.launch-panel .version{margin:5px 0}}
@media(max-height:500px){#farkle{grid-template-columns:230px 1fr;grid-template-rows:1fr;padding:8px;gap:10px}.f-score{padding:10px}.f-table .dice-row{flex-wrap:nowrap;max-width:none;margin:8px}.f-table .die{width:48px;height:48px;font-size:40px}.f-table h1{font-size:23px}.f-table .keyboard-hint{display:none}.f-table p{margin:3px}.f-actions button{padding:7px;font-size:12px}}
.launcher{min-height:0;height:calc(100dvh - 130px);padding:16px}.launch-panel{padding:20px}.launch-panel h1{font-size:30px;margin-bottom:10px}.launch-panel label{margin:9px 0 5px}.launch-panel button{margin-top:8px}.launch-panel .primary{margin-top:10px}.launch-panel .record{margin-top:10px;padding-top:8px}.launch-panel .version,.launch-panel .offline-note{margin-top:5px}.launch-scene{min-height:0;height:100%}
@media(max-width:640px){.launcher{height:calc(100dvh - 95px);display:flex;align-items:center;padding:10px}.launch-panel{width:100%;padding:14px}.launch-scene{display:none}.launch-panel h1{font-size:25px}.launch-panel .intro{font-size:12px;margin-bottom:8px}.launch-panel label{margin:7px 0 4px}.launch-panel .record{font-size:10px}.launch-panel select{padding:6px}}
@media(max-height:500px){.launcher{height:calc(100dvh - 89px);padding:8px}.launch-panel{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;width:540px;padding:10px}.launch-panel>.eyebrow,.launch-panel>.intro,.launch-panel>.record,.launch-panel>.version,.launch-panel>.offline-note,.launch-panel>label{display:none}.launch-panel h1{grid-column:1/3;font-size:24px;margin:0}.launch-panel button,.launch-panel .primary{margin:0;min-height:40px;padding:7px;font-size:11px}.launch-panel select{height:40px;font-size:11px}.launch-scene{display:none}.f-score .result-scores{margin:8px 0}.f-score .result-scores strong{font-size:30px}.f-score h2{font-size:20px}.f-score p{font-size:11px}.f-score .result-scores>div{padding:8px}.f-table .f-actions{gap:5px}}
.f-table .die{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:12px;gap:4px;box-shadow:inset 2px 2px 4px #fff8,inset -3px -3px 5px #5f432c88,0 9px 15px #0016}.f-dot{width:10px;height:10px;border-radius:50%;align-self:center;justify-self:center}.f-dot.lit{background:#35271c;box-shadow:inset 1px 1px 2px #0016}.f-portrait{width:100%;max-height:230px;object-fit:cover;object-position:top;border-radius:12px;margin-top:18px}.f-table .die:after{display:none}
@media(max-width:700px),(max-height:500px){.f-portrait{display:none}}@media(max-height:500px){.f-table .die{padding:7px;gap:1px}.f-dot{width:6px;height:6px}}

/* Isolate Farkle dice from Yatzy hover styles. */
#farkle .die,#farkle .die:hover:not(:disabled),#farkle .die:focus-visible{background:linear-gradient(135deg,#fff4d5,#c8ad79);box-shadow:inset 2px 2px 4px #fff8,inset -3px -3px 5px #5f432c88,0 9px 15px #0016!important}
#farkle .die:hover:not(:disabled){transform:translateY(-2px)}#farkle .die.held:hover:not(:disabled){transform:translateY(-5px)}
.f-portrait{object-fit:contain;height:230px;background:#080e0b}

/* Natural portrait composition using the approved salon master. */
.f-portrait-frame{position:relative;overflow:hidden;width:100%;height:250px;margin-top:18px;border-radius:12px;background:#17201a}
.f-portrait-frame .f-portrait{position:absolute;display:block;width:220%;max-width:none;height:auto;max-height:none;right:-8%;top:0;margin:0;border-radius:0;object-fit:initial;background:none}
@media(max-width:700px),(max-height:500px){.f-portrait-frame{display:none}}

/* One viewport shell; main states share the middle row. */
html,body{height:100%;overflow:hidden}
#app{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
#app>header{grid-row:1;width:100%;max-width:none;margin:0}
#app>main{grid-row:2;width:100%;min-height:0;height:100%;margin:0}
#app>footer{grid-row:3;width:100%;max-width:none;margin:0}
#app>.launcher{background-size:cover,cover;background-position:center,center top;align-items:center}
#app>#farkle{height:100%;min-height:0}
#app>.game{margin:auto;min-height:0}
@media(max-width:640px){#app>.launcher{background-size:cover,cover;background-position:center,68% top;padding:8px}.launch-panel{padding:12px}.launch-panel h1{font-size:23px}.launch-panel label{margin:5px 0 3px}.launch-panel select{height:40px}.launch-panel button,.launch-panel .primary{margin-top:6px;min-height:42px;padding:8px}.launch-panel .record{margin-top:6px;padding-top:6px}.launch-panel .intro{margin-bottom:6px}.launch-panel .version,.launch-panel .offline-note{margin-top:4px}}
.learn-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.learn-actions button{font-size:12px!important;padding:8px!important;min-height:44px!important;margin-top:6px!important}#tutorialDialog{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}#tutorialBody{padding:20px}.tutorial-dice{display:flex;gap:8px;justify-content:center;margin:20px 0;flex-wrap:wrap}.practice-die{width:56px;height:56px;background:linear-gradient(135deg,#fff4d5,#c8ad79);color:#30251a;font-size:25px;font-weight:bold}.practice-die.selected{outline:3px solid #efb24b;transform:translateY(-3px)}.practice-kept{border:1px solid #9b7849;border-radius:8px;padding:10px}.f-kept{color:#dfc596;font-size:12px;min-height:24px;margin:8px 0}.f-kept span{font-weight:bold}#fSelection{color:#ffd388}.f-table .dice-row{margin:16px auto}
@media(max-width:640px){#tutorialBody{padding:14px}.f-kept{font-size:11px;min-height:20px;margin:5px 0}#fSelection{font-size:12px}.practice-die{width:44px;height:44px;font-size:20px}.tutorial-dice{gap:6px;margin:12px 0}}
@media(max-height:500px){#tutorialBody{padding:12px}#tutorialBody h2{font-size:19px;margin-bottom:7px}#tutorialBody p{font-size:12px;margin-bottom:7px}.tutorial-dice{margin:8px}.practice-die{width:44px;height:44px}.f-kept{font-size:10px;margin:2px 0;min-height:16px}.f-table .dice-row{margin:8px auto}}
.kept-die{display:inline-grid;place-items:center;width:24px;height:24px;margin-left:4px;background:linear-gradient(135deg,#ffe8bd,#b49459);color:#332516;border-radius:5px;box-shadow:0 2px 5px #0006;font-size:14px}
@media(max-width:700px){.f-score .result-scores>div{padding:6px}.f-table .die{width:64px;height:64px;padding:9px;gap:3px}.f-table .dice-row{margin:10px auto}.f-actions{display:grid;grid-template-columns:1fr 1fr;max-width:330px;margin:auto;gap:6px}.f-actions button,.f-actions button.primary{min-height:44px;font-size:11px;padding:8px;letter-spacing:.03em}.f-table h1{font-size:25px}.f-table .f-final:empty{display:none}}
@media(max-height:500px){.f-actions{display:flex;max-width:none}.f-table .die{width:48px;height:48px;padding:7px}.f-table .f-actions button.primary{min-height:44px}}
/* Qwixx: shared Forge shell, independent scrollable table. */
#qwixx{height:100%;min-height:0;overflow:auto;background:linear-gradient(120deg,#12251dec,#101916ed),url('assets/walnut.webp?v=0016') center/cover;padding:20px;box-sizing:border-box}.q-table{max-width:1250px;margin:auto}.q-heading{display:flex;justify-content:space-between;gap:20px}.q-heading h1{font-size:clamp(22px,3vw,36px);margin:5px 0}.q-hint{min-height:2em;color:#c8d0c9}.q-turn{min-width:110px;text-align:right;font-size:12px;color:#b5bfb7}.q-turn strong{display:block;font-size:20px;color:#f5e8cc;margin-top:5px}.q-dice{display:flex;gap:12px;justify-content:center;margin:12px 0 22px}.q-die{width:65px;height:76px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:12px;box-shadow:0 4px 0 #0006;border:1px solid #fff5}.q-die span{font-size:30px;font-weight:bold}.q-die small{font-size:10px}.q-white{background:#f3e8d1;color:#23251e}.q-color-0{background:#8c2e37;color:#fff}.q-color-1{background:#e1b553;color:#241d0a}.q-color-2{background:#306448;color:#fff}.q-color-3{background:#335d86;color:#fff}.q-die.removed{opacity:.35}.q-sheets{display:grid;grid-template-columns:1fr 1fr;gap:16px}.q-sheet{padding:16px}.q-sheet-head{display:flex;justify-content:space-between;margin-bottom:12px}.q-row{display:grid;grid-template-columns:46px 1fr 28px;align-items:center;gap:6px;margin:8px 0;padding:6px;border-radius:6px}.q-row-label{font-size:11px}.q-numbers{display:flex;gap:3px}.q-cell{display:flex;align-items:center;justify-content:center;background:#ffffffdf;color:#292a23;border-radius:3px;min-width:0;flex:1;height:28px;font-size:13px}.q-cell.marked{background:#2a241e;color:#ffe1a2;font-size:23px;font-weight:bold}.q-cell.missed{opacity:.35}.q-lock{width:17px;text-align:center}.q-row>strong{font-size:13px;text-align:right}.q-pen{font-size:12px;color:#d6c5ac;margin-top:12px}.q-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:22px}.q-actions button{min-height:46px;min-width:105px;margin:0}.q-save{text-align:center;font-size:11px;color:#b2c0b4;margin:12px 0}.q-tabs{display:none}.q-practice-row{display:flex;gap:4px;background:#8c2e37;padding:10px;margin:18px 0}.q-practice-row .q-cell{height:36px}#qDialog{max-width:640px}#qDialog li{line-height:1.5;margin:12px 0}#qDialogBody>button{margin:8px 8px 0 0}#qClose{min-width:44px;min-height:44px;padding:4px;font-size:24px}
@media(max-width:1000px){.q-sheets{grid-template-columns:1fr}.q-table{max-width:660px}.q-sheet{padding:12px}.q-cell{height:30px}}
@media(max-width:600px){#qwixx{padding:10px}.q-heading{gap:8px}.q-heading h1{font-size:21px}.q-turn{min-width:70px;font-size:10px}.q-turn strong{font-size:16px}.q-hint{font-size:12px;line-height:1.4;margin:8px 0}.q-dice{gap:6px;margin:8px 0 14px}.q-die{width:calc((100vw - 56px)/6);max-width:55px;height:58px;border-radius:8px}.q-die span{font-size:24px}.q-die small{font-size:8px}.q-tabs{display:flex;gap:8px;margin-bottom:8px}.q-tabs button{flex:1;min-height:44px;font-size:12px;margin:0}.q-tabs button[aria-pressed="true"]{border-color:#eaa749;background:#3b3326}.q-sheets .q-sheet:nth-child(2){display:none}.q-sheets.q-show-ai .q-sheet:first-child{display:none}.q-sheets.q-show-ai .q-sheet:nth-child(2){display:block}.q-sheet{padding:9px}.q-sheet-head{font-size:13px;margin-bottom:8px}.q-row{grid-template-columns:30px 1fr 19px;gap:3px;padding:5px 3px;margin:6px 0}.q-row-label{font-size:8px}.q-numbers{gap:2px}.q-cell{font-size:10px;height:25px}.q-cell.marked{font-size:20px}.q-lock{width:12px;font-size:10px}.q-row>strong{font-size:11px}.q-actions{gap:7px;margin-top:12px}.q-actions button{font-size:12px;min-width:90px;flex:1;padding:8px}.q-save{font-size:10px}.q-practice-row{gap:2px;padding:6px}.q-practice-row .q-cell{font-size:11px}}
/* Clever: a readable base sheet, legal fields are the only scoring controls. */
#clever{height:100%;min-height:0;box-sizing:border-box;overflow:auto;padding:18px;background:linear-gradient(120deg,#12251df2,#101916eb),url('assets/walnut.webp?v=0016') center/cover}.c-layout{max-width:1400px;margin:auto;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(310px,1fr);gap:18px}.c-board,.c-play{padding:18px;min-width:0}.c-board-head{display:flex;gap:10px;margin-bottom:14px}.c-board-head button{flex:1;margin:0;min-height:44px}.c-board-head button[aria-pressed="true"]{border-color:#e9a149;background:#403321}.c-areas{display:grid;grid-template-columns:1fr 1fr;gap:12px}.c-area{border:1px solid #ffffff35;border-radius:10px;padding:12px;min-width:0}.c-area:nth-child(n+3){grid-column:1/-1}.c-color-0{background:#b99a3d;color:#1e1a0d}.c-color-1{background:#345e82;color:#fff}.c-color-2{background:#316349;color:#fff}.c-color-3{background:#a4512d;color:#fff}.c-color-4{background:#67467d;color:#fff}.c-color-5{background:#f0e4ca;color:#25281f}.c-area-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.c-area-head h2{font-size:16px;margin:0}.c-area-head>strong{font-size:12px}.c-cells{gap:5px}.c-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.c-line{display:grid;grid-template-columns:repeat(11,minmax(0,1fr))}.c-cell{min-width:0;min-height:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #fff6;border-radius:5px;background:#f2e8d7;color:#25251e;box-sizing:border-box;font-size:14px;padding:3px;margin:0}.c-grid .c-cell{min-height:44px}.c-cell strong{font-size:14px}.c-cell small{min-height:10px;font-size:9px;font-weight:bold;color:#4d4234}.c-marked{background:#242a23;color:#ffe0a2;border-color:#101815}.c-marked small{color:#d4c3a6}.c-legal{background:#fff7d7;border:2px solid #ffb44f;cursor:pointer;box-shadow:0 0 0 2px #2228;min-height:44px}.c-legal:hover{background:#ffe0a2;transform:translateY(-1px)}.c-bonus-note{font-size:10px;line-height:1.4;margin-top:8px}.c-totals{display:flex;justify-content:space-between;gap:10px;margin-top:12px;font-size:13px}.c-key{font-size:10px;color:#c6c1b0;line-height:1.5;margin:10px 0 0}.c-play h1{font-size:clamp(22px,2.7vw,31px);margin:5px 0 12px}.c-play>p:not(.eyebrow){font-size:13px;line-height:1.5;color:#d9d1be}#cHint{min-height:3em}.c-turn-label{font-size:12px;color:#dbc5a4;margin:12px 0}.c-dice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.c-die{min-height:99px;padding:8px 3px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;border:1px solid #fff5;position:relative;box-shadow:0 4px 0 #0004}.c-die strong{font-size:32px}.c-die small{font-size:11px}.c-die span{font-size:8px;line-height:1.3;margin-top:5px}.c-die:disabled{opacity:.6}.c-die.c-picked{border-bottom:4px solid #dbaa55}.c-die.c-on-platter{border-bottom:4px solid #b8c3c7}.c-die.c-selected{outline:3px solid #ffb44f;outline-offset:2px}.c-resources{font-size:13px;margin:20px 0 12px}.c-actions{display:flex;flex-wrap:wrap;gap:8px}.c-actions button{min-height:44px;flex:1;margin:0}.c-opponent{margin-top:20px;border-top:1px solid #aa784b66;padding-top:14px;display:flex;align-items:center;gap:12px}.c-opponent img{width:86px;height:104px;object-fit:contain;object-position:center}.c-opponent strong{letter-spacing:.18em;color:#e9ad63}.c-opponent p{font-size:11px;line-height:1.4;color:#c6c6b7}.c-opponent button{font-size:10px;min-height:44px;padding:8px;margin:0}.c-save{font-size:10px!important;margin-bottom:0}.c-area-tabs{display:none}#cDialog{max-width:660px}#cDialog li{margin:10px 0;line-height:1.5}#cClose{min-height:44px;min-width:44px;font-size:24px;padding:4px}#cDialogBody>button{min-height:44px;margin:8px 8px 0 0}.c-credit{font-size:10px;color:#aeb4a9;margin-top:18px}.c-practice-dice{display:flex;gap:10px;margin:18px 0}.c-practice-dice span{width:60px;height:60px;border:1px solid #ffffff55;border-radius:10px;display:grid;place-items:center;font-size:28px}
@media(max-width:1100px){.c-layout{grid-template-columns:minmax(0,1.25fr) minmax(270px,1fr)}.c-board,.c-play{padding:12px}.c-line{gap:3px}.c-line .c-cell strong{font-size:11px}.c-cell small{font-size:8px}.c-area{padding:8px}}
@media(max-width:700px){#clever{padding:10px}.c-layout{display:flex;flex-direction:column;gap:10px}.c-play{order:0}.c-board{order:1}.c-play .eyebrow{font-size:9px}.c-play h1{font-size:21px;margin:4px 0 8px}.c-play>p:not(.eyebrow){font-size:12px;margin:5px 0}#cHint{min-height:0}.c-dice{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.c-die{min-height:72px;padding:5px 1px;box-shadow:0 2px 0 #0005}.c-die strong{font-size:23px}.c-die small{font-size:8px}.c-die span{font-size:6px}.c-turn-label{margin:9px 0}.c-resources{margin:12px 0 8px;font-size:12px}.c-opponent{display:none}.c-save{display:none}.c-board-head{margin-bottom:9px;gap:8px}.c-board-head button{font-size:12px;padding:8px}.c-area-tabs{display:flex;gap:4px;margin-bottom:9px}.c-area-tabs button{flex:1;padding:6px 1px;min-width:0;min-height:44px;margin:0;font-size:10px}.c-area-tabs button small{display:block;font-size:10px;margin-top:2px}.c-area-tabs button[aria-pressed="true"]{outline:2px solid #ffc775;outline-offset:-2px}.c-areas{display:block}.c-area{display:none;padding:9px}.c-area.c-visible{display:block}.c-grid .c-cell{min-height:44px}.c-line{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.c-line .c-cell strong{font-size:13px}.c-line .c-cell{min-height:44px}.c-cell small{font-size:9px}.c-key{font-size:9px;line-height:1.4}.c-totals{font-size:11px}.c-area-head h2{font-size:14px}}
@media(max-height:500px) and (min-width:701px){#clever{padding:8px}.c-board,.c-play{padding:10px}.c-dice{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.c-die{min-height:65px}.c-die strong{font-size:24px}.c-die span{font-size:6px}.c-opponent{display:none}.c-play h1{font-size:21px}}
#clever{scrollbar-width:none}#clever::-webkit-scrollbar{display:none}.c-key{display:none}.c-key-help{font-size:12px;color:#c9bea4;line-height:1.5}
@media(min-width:701px){#clever{padding:12px}.c-board,.c-play{padding:12px}.c-area{padding:8px}.c-area-head{margin-bottom:4px}.c-area-head h2{font-size:14px}.c-board-head{margin-bottom:8px}.c-totals{margin-top:8px}.c-grid{gap:4px}.c-grid .c-cell{min-height:36px}.c-grid .c-legal{min-height:44px}.c-bonus-note{margin-top:4px;font-size:10px;line-height:1.2}.c-areas{gap:10px}}
@media(max-width:700px){.c-die{min-height:64px}.c-die span{display:none}.c-play,.c-board{padding:10px}.c-board-head{margin-bottom:6px}.c-layout{gap:8px}}
@media(min-width:701px) and (max-width:1100px){.c-area-tabs{display:flex;gap:4px;margin-bottom:8px}.c-area-tabs button{flex:1;padding:6px 1px;min-width:44px;min-height:44px;margin:0;font-size:10px}.c-area-tabs button small{display:block;font-size:10px;margin-top:2px}.c-area-tabs button[aria-pressed="true"]{outline:2px solid #ffc775;outline-offset:-2px}.c-areas{display:block}.c-area{display:none}.c-area.c-visible{display:block}.c-line{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.c-grid .c-cell,.c-line .c-cell{min-height:44px}}
@media(max-height:500px) and (min-width:701px){.c-play{padding:10px}.c-play .eyebrow{font-size:9px;margin:0;line-height:1.2}.c-play h1{font-size:19px;line-height:1.15;margin:4px 0 6px}.c-play #cHint{min-height:0;font-size:11px;line-height:1.3;margin:4px 0}.c-turn-label{font-size:10px;line-height:1.4;margin:6px 0}.c-die{min-height:56px;padding:4px 1px}.c-die strong{font-size:22px}.c-die span{display:none}.c-resources{font-size:11px;line-height:1.3;margin:8px 0 6px}.c-save{display:none}}
/* BUILD 0016: approved art is retained; canonical Forge brand and launch signal. */
.forge-load-brand{width:82px;height:auto;object-fit:contain;margin-bottom:18px}.forge-signal{width:min(410px,70vw);height:3px;background:#30363d;overflow:hidden;margin:22px 0}.forge-signal i{display:block;width:35%;height:100%;background:#ff7a18;box-shadow:0 0 14px #ff7a18;animation:forge-scan 1.25s ease-in-out infinite alternate}@keyframes forge-scan{from{transform:translateX(-110%)}to{transform:translateX(330%)}}#forgeTransition{position:fixed;inset:0;z-index:100;background:#101916;display:grid;place-items:center}.forge-transition-copy{width:min(410px,80vw);text-align:center}.forge-transition-copy img{width:82px;height:auto;display:block;margin:0 auto 20px}.forge-transition-copy strong{font-size:30px;letter-spacing:.1em}.forge-transition-copy p{color:#c8d0c9}.forge-transition-copy .forge-signal{width:100%}#forgeTransition[hidden]{display:none!important}
#tokyo{min-height:0;overflow:auto;padding:20px 24px;scrollbar-width:none;background:linear-gradient(130deg,#101c1b,#17262b)}.tokyo-heading h1{font-size:clamp(22px,3vw,36px);margin:4px 0}.tokyo-heading>p{margin:6px 0}.tokyo-layout{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(310px,1.5fr) minmax(240px,1fr);gap:18px;align-items:start;margin-top:18px}.tokyo-roster,.tokyo-market{padding:14px}.monster{display:flex;gap:12px;padding:12px 8px;border-bottom:1px solid #ffffff20}.monster.current{background:#ff7a1815;border-left:3px solid #ff7a18}.monster.eliminated{opacity:.45}.monster p{margin:5px 0}.monster-mark{font-size:40px;color:#ecbc70}.m1{color:#d38c71}.m2{color:#70c6a7}.m3{color:#84b5df}.monster small{color:#d5ddd6}.owned-cards{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.owned-cards button{min-height:44px}.tokyo-city{position:relative;border:1px solid #e8b06840;border-radius:12px;padding:24px 18px;background:linear-gradient(0deg,#203d40,#111b23);text-align:center;overflow:hidden}.tokyo-city strong{font-size:24px;color:#eabb70}.tokyo-city p{font-size:13px;margin-bottom:0}.tokyo-dice{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:28px 0 15px}.tokyo-die{min-width:0;min-height:64px;font-size:30px;background:#f1e9d9;color:#27302b;border:3px solid transparent;border-radius:10px;opacity:1!important}.tokyo-die.held{border-color:#ff7a18;box-shadow:0 0 0 2px #ff7a1840;transform:translateY(-5px)}.tokyo-actions{display:flex;flex-wrap:wrap;gap:8px}.tokyo-actions button,.forge-card button{min-height:44px}.tokyo-summary{padding:12px;border-left:2px solid #ff7a18;background:#ffffff08;font-size:14px}.forge-card{padding:14px;margin:12px 0;border:1px solid #8faeaa50;border-radius:10px;background:#203432}.forge-card small{color:#efbd78}.forge-card h3{margin:8px 0}.forge-card p{font-size:14px;line-height:1.5;margin:8px 0 12px}.forge-card button{width:100%}#tDialog{max-width:720px}#tDialog li{margin-bottom:12px;line-height:1.5}
@media(max-width:1000px){.tokyo-layout{grid-template-columns:minmax(200px,.8fr) minmax(310px,1.5fr)}.tokyo-market{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.tokyo-market h2,.tokyo-market>small{grid-column:1/-1}.forge-card{margin:0}}@media(max-width:650px){#tokyo{padding:14px 12px}.tokyo-layout{display:flex;flex-direction:column;gap:12px}.tokyo-roster,.tokyo-board,.tokyo-market{width:100%;box-sizing:border-box}.tokyo-roster{display:grid;grid-template-columns:1fr 1fr;padding:6px}.monster{padding:8px 5px;gap:6px}.monster-mark{font-size:25px}.monster strong,.monster p{font-size:13px}.monster small{font-size:11px}.tokyo-dice{gap:5px;margin-top:18px}.tokyo-die{min-height:48px;font-size:24px;padding:0}.tokyo-market{display:block}.forge-card{margin:10px 0}.tokyo-city{padding:15px 10px}.tokyo-heading>p{font-size:12px}}
@media(prefers-reduced-motion:reduce){.forge-signal i{animation:none;width:100%}.tokyo-die.held{transform:none}}
/* Override the legacy generic splash-image rule, which otherwise enlarges the mark. */
.boot img.forge-load-brand{width:82px;max-height:none;height:auto;display:block}.boot{background-size:cover;background-position:center top}.forge-transition-copy .forge-signal i{animation-delay:-.45s}
@media(max-width:620px){.boot{background-position:92% top}.boot img.forge-load-brand{width:64px}}
/* Battleships BUILD 0016 launch hierarchy, adapted to Dice's left-side safe zone. */
.boot.forge-splash{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:hidden;padding:0;background:#080b0e}.boot.forge-splash:before{z-index:1;background:radial-gradient(circle at 30% 48%,#80501d15,transparent 40%),repeating-linear-gradient(0deg,transparent 0 3px,#fbdca608 4px 4px);box-shadow:inset 0 0 140px #000;pointer-events:none}.forge-splash-backdrop{position:absolute;inset:-2%;background:linear-gradient(90deg,#080b0ee8,#080b0e90 38%,#080b0e10 75%),linear-gradient(180deg,#080b0e10,#080b0e70),url('assets/forge-dice-artwork.webp?v=0016') center top/cover no-repeat;filter:brightness(.68) saturate(.82) contrast(1.08);transform:none;animation:none}.forge-splash-content{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;width:min(470px,82vw);margin-right:min(40vw,620px);animation:diceSplashArrive .85s cubic-bezier(.2,.8,.2,1) both}.boot .forge-splash-content img{width:clamp(150px,22vw,250px);height:auto;max-height:none;aspect-ratio:1;object-fit:cover;mix-blend-mode:screen;filter:drop-shadow(0 15px 35px #000) drop-shadow(0 0 24px #ff7a1822)}.forge-splash-divider{width:min(310px,68vw);height:2px;margin:8px 0 18px;background:linear-gradient(90deg,transparent,#ff7a18 18% 82%,transparent);box-shadow:0 0 18px #ff7a1877;transform:skew(-28deg)}.forge-splash-content strong{font:700 clamp(22px,4vw,42px) system-ui;letter-spacing:.34em;margin-right:-.34em;color:#f1f5f6;line-height:1;text-shadow:0 4px 18px #000}.forge-splash-signal{position:relative;width:min(260px,58vw);height:1px;margin-top:32px;background:#eac08a24;overflow:visible}.forge-splash-signal i{position:absolute;width:34%;height:2px;top:-1px;left:0;background:linear-gradient(90deg,transparent,#ffd093,#fff,transparent);box-shadow:0 0 14px #ffb061;animation:diceSplashScan 1.15s ease-in-out infinite}.forge-splash-content #bootText{font-size:11px;margin:14px 0 0;text-align:center;color:#d8cbb8;letter-spacing:.04em}.forge-splash-content .splash-version{margin:8px 0 0;font-size:9px}.forge-splash.is-hiding{animation:diceSplashExit .65s ease forwards}.forge-splash.is-hiding .forge-splash-content{animation:diceSplashContentExit .45s ease forwards}@keyframes diceSplashArrive{from{opacity:0;transform:translateY(12px);filter:blur(8px)}to{opacity:1;transform:none;filter:none}}@keyframes diceSplashDrift{to{transform:scale(1)}}@keyframes diceSplashScan{from{transform:translateX(-70%);opacity:0}20%{opacity:1}to{transform:translateX(265%);opacity:0}}@keyframes diceSplashExit{to{opacity:0;visibility:hidden;pointer-events:none}}@keyframes diceSplashContentExit{to{opacity:0;transform:none}}
.practice-monsters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.practice-monster{padding:12px;background:#203432;border:1px solid #ad97634a;border-radius:8px;font-size:13px;line-height:1.6}.practice-dice{max-width:550px;margin:20px 0 10px}.practice-market{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.practice-market .forge-card{margin:0;padding:12px}.practice-market h4{margin:8px 0}.practice-owned{color:#efbd78;font-weight:700;margin:12px 0}.practice-instruction{line-height:1.55;min-height:65px}#tPracticeAction{margin-top:18px}#tDialogBody:has(.practice-dice){min-width:0}#tDialog:has(.practice-dice){width:min(840px,94vw);max-width:840px}
@media(max-width:700px){.forge-splash-content{margin-right:0}.forge-splash-backdrop{background-position:92% top;filter:brightness(.48) saturate(.78)}.boot.forge-splash:before{background:radial-gradient(circle at center,#80501d15,transparent 38%),linear-gradient(#080b0e40,#080b0ea8),repeating-linear-gradient(0deg,transparent 0 3px,#fbdca608 4px 4px)}}@media(max-width:520px){.practice-market{grid-template-columns:1fr}.practice-monsters{grid-template-columns:1fr}.practice-market .forge-card p{font-size:12px}.practice-instruction{font-size:14px;min-height:0}.practice-dice{gap:5px}.practice-dice .tokyo-die{min-height:44px;font-size:24px;padding:0}#tDialog:has(.practice-dice){padding:18px}}@media(max-height:560px){.boot .forge-splash-content img{width:120px}.forge-splash-divider{margin:4px 0 12px}.forge-splash-signal{margin-top:20px}}@media(prefers-reduced-motion:reduce){.forge-splash-content,.forge-splash-backdrop,.forge-splash-signal i{animation:none}.forge-splash.is-hiding,.forge-splash.is-hiding .forge-splash-content{animation:none;opacity:0}}
/* Blend the official splash asset's black field with the artwork as one group. */
.forge-splash-content{mix-blend-mode:screen}.forge-splash-backdrop{inset:0;transform-origin:center top}#tDialog:has(.practice-dice) .dialog-actions{position:sticky;bottom:0;background:#17241e;padding-top:8px;z-index:2}
#tDialog:has(.practice-dice) h2{position:relative;padding-right:90px;font-size:clamp(23px,3vw,32px)}.practice-dismiss{position:absolute;right:0;top:-4px;font-size:14px;font-family:system-ui;min-height:44px}#tDialog:has(.practice-dice) .dialog-actions{display:none}.practice-instruction{min-height:0}

/* BUILD 0016: static artwork; stable left safe zone; distinct practice actions. */
.boot.forge-splash{justify-items:start}.forge-splash-content{left:clamp(24px,6vw,110px);margin:0;width:min(340px,82vw);justify-self:start}.forge-splash-backdrop{transform:none;animation:none}.practice-roll-status{display:block}.practice-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:18px 0}.practice-actions #tPracticeAction{margin:0}
@media(max-width:700px){.forge-splash-content{left:0;margin:0;justify-self:center}}
/* Position directly against the viewport, independent of legacy grid alignment. */
.forge-splash-content{position:absolute;top:0;bottom:0;left:clamp(24px,6vw,110px);height:max-content;margin:auto 0}
@media(max-width:700px){.forge-splash-content{left:calc((100vw - min(340px,82vw))/2)}}

/* Terninge-21: native dice, same salon materials and approved launch. */
#dice21{min-height:0;overflow:auto;scrollbar-width:none;padding:24px clamp(14px,5vw,70px)}#dice21 h1{font-size:clamp(26px,3vw,38px);margin-bottom:14px}.d21-table{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:1100px;margin:24px 0}.d21-side{min-width:0;padding:24px}.d21-side h2{font-size:22px;margin-bottom:8px}.d21-total{font:700 56px Georgia,serif;color:var(--gold);margin-bottom:16px}.d21-dice{display:flex;flex-wrap:wrap;gap:10px;min-height:52px}.d21-die{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;width:52px;height:52px;flex:0 0 52px;padding:8px;border:1px solid #d7c4a0;border-radius:9px;background:linear-gradient(135deg,#fff6e3,#d9c7a4);box-shadow:inset 0 0 0 2px #fff4,0 4px 8px #0006}.d21-pip{border-radius:50%;background:#233529;box-shadow:inset 0 1px 2px #0009}.d21-empty{color:var(--muted);align-self:center;font-size:13px}.d21-status{min-height:24px;color:var(--gold);font-weight:700;margin-bottom:18px}.d21-actions{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}.d21-actions button{min-height:48px}#bRoll,#bStart{background:linear-gradient(110deg,#875b27,#e9bd72);color:#20180e;font-weight:800}#bDialog{width:min(740px,94vw);max-width:740px}#bDialog li{line-height:1.55;margin:12px 0}#bDialogBody>button{margin:18px 8px 0 0;min-height:44px}#bDialog .d21-table{margin:16px 0}#bDialog .d21-side{padding:16px}#bDialog .d21-total{font-size:38px}
@media(max-width:520px){#dice21{padding:16px 12px}.d21-table{gap:12px;margin:16px 0}.d21-side{padding:14px}.d21-side h2{font-size:20px}.d21-total{font-size:42px;margin-bottom:12px}.d21-dice{gap:7px}.d21-die{width:44px;height:44px;flex-basis:44px;padding:6px;gap:3px}.d21-actions{gap:8px}#bDialog{padding:18px}#bDialog .d21-side{padding:12px}}
.d21-side .d21-dice{max-height:120px;overflow:auto;scrollbar-width:none}
@media(max-height:500px) and (min-width:521px){#dice21{padding:10px 16px}#dice21>.eyebrow,#dice21>h1+p,#dice21>small{display:none}#dice21 h1{font-size:24px;margin-bottom:8px}.d21-table{margin:8px 0;gap:14px}.d21-side{padding:12px;display:grid;grid-template-columns:95px 1fr;gap:4px 12px}.d21-side h2{font-size:17px;margin:0;grid-column:1}.d21-total{grid-column:1;font-size:32px;margin:0}.d21-side .d21-dice{grid-column:2;grid-row:1/3;max-height:70px;min-height:44px;align-self:center}.d21-status{margin:10px 0;min-height:18px;font-size:13px}.d21-actions{margin:10px 0;gap:8px}.d21-actions button{min-height:44px}#bDialog .d21-side{display:block}#bDialog .d21-total{font-size:30px}}
