.ch-screen{background:radial-gradient(ellipse at 50% 0,#fff4da,#f6ecd9 70%);color:#314f40;min-width:0;min-height:0}
.ch-screen button,.ch-screen input{font:inherit}.ch-screen button{cursor:pointer;-webkit-tap-highlight-color:transparent}.ch-screen button:disabled{cursor:default;opacity:.48}.ch-screen button:focus-visible,.ch-screen summary:focus-visible,.ch-screen input:focus-visible{outline:3px solid #3987ad;outline-offset:3px}
.ch-header{display:flex;align-items:center;gap:12px;flex:none;padding:12px 16px 9px;min-width:0}.ch-brand{flex:1;min-width:0}.ch-brand small{display:block;color:#8f774d;font-size:9px;font-weight:850;letter-spacing:2px}.ch-brand h1{font-size:clamp(18px,3.7vw,25px);font-weight:900;line-height:1.2;overflow-wrap:anywhere;margin-top:4px}.ch-icon{width:44px;height:44px;flex:none;border:1px solid #b9c9a7;border-radius:15px;background:#e6edcf;color:#365b43;font-size:25px;font-weight:800}
.ch-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 14px 10px;flex:none}.ch-tab{border:1px solid #b6c6a3;background:#f9faee;color:#47644c;border-radius:13px;min-height:44px;padding:9px 5px;font-size:14px;font-weight:850;line-height:1.2;overflow-wrap:anywhere}.ch-tab[aria-selected=true]{color:#fff6dc;background:#365f49;border-color:#365f49;box-shadow:0 3px 8px #37533d20}
.ch-content{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:6px 16px 24px;scroll-padding-block:16px}.ch-panel{max-width:760px;margin:0 auto;width:100%;min-width:0}.ch-intro{text-align:center}.ch-intro h2{font-size:20px;font-weight:900;line-height:1.25}.ch-muted{font-size:13px;line-height:1.5;color:#778064;overflow-wrap:anywhere;margin:9px 0}.ch-tool-stage{display:grid;place-items:center;min-height:170px;padding:24px 10px 20px;background:radial-gradient(ellipse,#e2eac84d,transparent 72%)}
.ch-dice-grid{display:grid;grid-template-columns:repeat(var(--dice-cols,1),minmax(0,1fr));gap:15px;justify-content:center;width:min(100%,390px);max-width:100%}.ch-die-cell{display:grid;place-items:center;min-width:0}.ch-die{width:clamp(70px,21vw,112px);height:clamp(70px,21vw,112px);min-width:0;border-radius:22%;position:relative;color:#3b5f49;touch-action:manipulation}.ch-die:disabled{opacity:1;cursor:default}.ch-dice-grid[data-count="1"] .ch-die{width:144px;height:144px}.ch-pip{display:block;aspect-ratio:1;border-radius:50%;background:transparent;min-width:0;min-height:0}.ch-pip.on{background:radial-gradient(circle at 35% 25%,#597458,#294c37 70%);box-shadow:inset 1px 2px 2px #183b30b3,0 1px 0 #fff}.ch-die-empty{grid-column:1/4;grid-row:1/4;align-self:center;justify-self:center;font-size:50px;font-weight:900;color:#b39b72}.ch-lock-mark{position:absolute;right:-8px;top:-9px;width:26px;height:26px;border-radius:50%;background:#3b704c;color:white;font-size:17px;display:grid;place-items:center;box-shadow:0 2px 5px #23472e35}
.ch-tool-controls{display:flex;flex-direction:column;gap:12px;max-width:420px;margin:0 auto;width:100%;text-align:center}.ch-total{display:flex;align-items:center;justify-content:center;gap:18px;min-width:0}.ch-total span{font-size:14px;font-weight:750;color:#778064}.ch-total strong{font-size:44px;line-height:1.2;color:#3b6044;font-variant-numeric:tabular-nums}.ch-step-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f5f4e7;border:1px solid #e3ddc4;border-radius:16px;padding:8px 12px;font-size:14px;font-weight:800;text-align:start}.ch-stepper{display:flex;align-items:center;gap:10px;flex:none}.ch-step{border:0;width:44px;height:44px;border-radius:13px;background:#e1e9cc;color:#365a40;font-size:25px;font-weight:800}.ch-stepper strong{min-width:20px;text-align:center;font-size:20px;font-variant-numeric:tabular-nums}.ch-primary,.ch-secondary{width:100%;min-height:50px;padding:13px 16px;border-radius:17px;font-size:16px;font-weight:900;line-height:1.3;white-space:normal;overflow-wrap:anywhere}.ch-primary{background:linear-gradient(160deg,#dbeeb6,#aeca7c);color:#34563e;border:1px solid #b8cb8d;box-shadow:0 4px 0 #91a76d,0 7px 12px #55723618}.ch-secondary{background:#f1f4e3;border:1px solid #adbea0;color:#49634c}.ch-primary:active,.ch-secondary:active{transform:translateY(2px)}.ch-text-button{background:none;border:none;text-decoration:underline;text-underline-offset:4px;color:#66785b;padding:9px;min-height:44px;font-size:13px}.ch-history{max-width:420px;margin:18px auto 0;font-size:13px;color:#7c806b;border-top:1px solid #dedcc7;padding-top:13px}.ch-history summary{cursor:pointer;font-weight:800;min-height:32px}.ch-history ol{padding:6px 0 0 25px;line-height:1.8}
.ch-coin-seat{width:190px;height:190px;position:relative;perspective:850px;isolation:isolate}.ch-coin-flight,.ch-coin{width:100%;height:100%;position:relative;transform-style:preserve-3d}.ch-coin{border-radius:50%;transform:rotateY(0deg)}.ch-coin.is-tails{transform:rotateY(180deg)}.ch-coin-surface{position:absolute;inset:0;border-radius:50%;display:grid;grid-template-rows:auto 1fr auto;place-items:center;padding:11px;background:radial-gradient(ellipse at 32% 20%,#fff7c2,#e6b757 60%,#9f6a27);border:7px double #c1943c;box-shadow:inset 2px 3px 5px #fff6c1,0 4px 0 #a47c39;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform:rotateY(0deg) translateZ(1px);overflow:hidden}.ch-coin-tails{background:radial-gradient(ellipse at 32% 20%,#fff6de,#e3b188 60%,#995b3b);border-color:#bb8d62;transform:rotateY(180deg) translateZ(1px)}.ch-coin-surface:after{content:"";position:absolute;inset:-40%;background:linear-gradient(115deg,transparent 37%,#fff9d680 47%,transparent 57%);transform:translateX(-55%);pointer-events:none}.ch-coin img{width:105px;height:105px;border-radius:50%;object-fit:cover;object-position:50% 25%;border:2px solid #ffedb0;box-shadow:0 2px 7px #533c2650}.ch-coin-stamp{font-size:11px;font-weight:900;letter-spacing:4px;color:#825a27}.ch-coin-face{font-size:15px;font-weight:900;color:#694b23;max-width:100%;text-align:center;line-height:1.1;overflow-wrap:anywhere}.ch-coin-seat:before{content:"";position:absolute;z-index:-1;left:13%;right:13%;bottom:-16px;height:18px;border-radius:50%;background:radial-gradient(ellipse,#684b2b40,transparent 72%);transform:scale(1)}.ch-coin.is-flipping{animation:ch-coin-spin 1s cubic-bezier(.14,.52,.43,1) both}.ch-coin-seat.is-flipping .ch-coin-flight{animation:ch-coin-flight 1s ease-out both}.ch-coin-seat.is-flipping:before{animation:ch-coin-shadow 1s ease-out both}.ch-coin.is-flipping .ch-coin-surface:after{animation:ch-coin-glint 1s ease-out both}.ch-side-result{font-size:28px;line-height:1.25;font-weight:900;color:#765b32;overflow-wrap:anywhere}.ch-coin-counts{font-size:14px;color:#7d775f;line-height:1.4;font-variant-numeric:tabular-nums}
.ch-battle-setup,.ch-resume,.ch-battle-panel{max-width:530px;text-align:center}.ch-battle-setup,.ch-resume,.ch-battle-panel{display:flex;flex-direction:column;gap:15px;align-items:stretch}.ch-battle-setup h2,.ch-resume h2,.ch-battle-panel h2{font-size:clamp(21px,4vw,29px);font-weight:900;line-height:1.25;overflow-wrap:anywhere}.ch-eyebrow{font-size:12px;font-weight:800;letter-spacing:.03em;color:#8b7b51;line-height:1.4}.ch-setup-die{font-size:90px;color:#56734b;line-height:1.1;text-shadow:0 5px 0 #d3d9bd}.ch-names,.ch-rules{text-align:start;padding:14px;border-radius:17px;background:#f3f3e5;border:1px solid #dedec7;font-size:14px}.ch-names summary,.ch-rules summary{cursor:pointer;min-height:30px;font-weight:850}.ch-name-field{display:block;font-size:12px;color:#67785c;margin-top:12px}.ch-name-field input{display:block;width:100%;margin-top:5px;padding:12px;border:1px solid #b7c4a6;border-radius:12px;background:#fffef7;color:#34553e;font-size:16px;user-select:text;-webkit-user-select:text}.ch-rules ol{padding:8px 0 0 22px;line-height:1.6}.ch-rules li+li{margin-top:7px}.ch-scoreboard{border:1px solid #d9dfc7;border-radius:17px;overflow:hidden;width:100%;background:#fafbf3}.ch-score-row{display:flex;align-items:center;gap:12px;min-height:46px;padding:11px 14px;border-bottom:1px solid #e3e7d7;text-align:start}.ch-score-row:last-child{border:0}.ch-score-row.is-current{background:#e5eccf}.ch-score-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px;font-weight:800}.ch-score-row strong{font-size:20px;color:#416344;font-variant-numeric:tabular-nums}.ch-turn-marks{font-size:11px;letter-spacing:4px;color:#8d9d72;white-space:nowrap}.ch-handoff-icon{font-size:58px;color:#8c9e68}.ch-risk-play{display:flex;align-items:center;justify-content:center;gap:28px;padding:14px 0}.ch-risk-play .ch-total{flex-direction:column;gap:6px}.ch-risk-play .ch-total strong{font-size:55px}.ch-risk-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ch-bust{color:#b26841!important}.ch-winner-medal{font-size:70px;line-height:1;color:#d09c3c;text-shadow:0 4px 0 #f2ddb5}
.ch-modal{position:absolute;inset:0;z-index:80;background:#16382eaa;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}.ch-dialog{width:min(100%,390px);max-height:100%;overflow-y:auto;background:#fff9e9;border:1px solid #d5ddc1;border-radius:24px;padding:24px;box-shadow:0 22px 50px #15382d45;display:flex;flex-direction:column;gap:14px;overflow-wrap:anywhere}.ch-dialog h2{font-size:23px;line-height:1.3}.ch-dialog p{margin:0}.ch-error{padding:0 16px;color:#a65f42;font-size:12px;line-height:1.4;flex:none}.ch-error:empty{display:none}.ch-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#cardChance{position:relative}.ch-thumb{position:relative;display:grid;place-items:center}.ch-thumb-die{font-size:43px;line-height:1;color:#3f6b4c;text-shadow:0 2px 0 #bacb9d}.ch-thumb-coin{position:absolute;right:-7px;bottom:-4px;line-height:1;font-size:25px;color:#e7b74e;text-shadow:0 2px 0 #9f7833}.ch-card-hint{font-size:10px;line-height:1.3;text-align:center;color:#788267;overflow-wrap:anywhere}.ch-new{position:absolute;top:4px;right:4px;background:#d66f47;color:#fff9e9;font-size:9px;line-height:1;font-weight:900;letter-spacing:.04em;border-radius:6px;padding:3px 5px;pointer-events:none}
.ch-tool-stage{padding-block:42px 27px}.ch-die-cell{position:relative;isolation:isolate;perspective:600px}.ch-die-cell:before{content:"";position:absolute;z-index:-1;left:12%;right:12%;bottom:-14px;height:16px;border-radius:50%;background:radial-gradient(ellipse,#5f493b3b,transparent 72%);pointer-events:none}.ch-die-cell .ch-die:disabled{opacity:1}.ch-die.is-rolling{animation:ch-toss .9s var(--toss-delay,0ms) cubic-bezier(.2,.65,.3,1) both;will-change:transform}.ch-die-cell.is-tossing:before{animation:ch-die-shadow .9s var(--toss-delay,0ms) ease-out both}.ch-battle-panel>.ch-die-cell{align-self:center}.ch-risk-play>.ch-die-cell{flex:none}
.ch-dice-grid{--air-scale:.65}.ch-dice-grid[data-count="1"]{--air-scale:.82}.ch-die{display:block;padding:0;border:0;background:none;box-shadow:none;transform-style:preserve-3d;transform-origin:50% 50% calc(-1 * var(--cube-half,56px))}.ch-die-cube{position:absolute;inset:0;transform-style:preserve-3d;transform:translateZ(calc(-1 * var(--cube-half,56px)));pointer-events:none}.ch-die-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:7%;padding:14%;border:1px solid #c3a677;border-radius:19%;background:linear-gradient(145deg,#fffef4 5%,#fff4d5 58%,#dfc391);box-shadow:inset 2px 3px 3px #fff,inset -3px -4px 7px #a6814235;backface-visibility:hidden;-webkit-backface-visibility:hidden}.ch-die-front{transform:translateZ(var(--cube-half,56px))}.ch-die-back{transform:rotateY(180deg) translateZ(var(--cube-half,56px))}.ch-die-right{transform:rotateY(90deg) translateZ(var(--cube-half,56px));background:linear-gradient(135deg,#e6c995,#bd965a)}.ch-die-left{transform:rotateY(-90deg) translateZ(var(--cube-half,56px));background:linear-gradient(135deg,#f2dfb4,#d5b578)}.ch-die-top{transform:rotateX(90deg) translateZ(var(--cube-half,56px));background:linear-gradient(135deg,#fffef5,#ead4a8)}.ch-die-bottom{transform:rotateX(-90deg) translateZ(var(--cube-half,56px));background:linear-gradient(135deg,#d6b986,#b38b50)}.ch-die.is-locked{border:0;background:none;box-shadow:none}.ch-die.is-locked .ch-die-face{border:3px solid #3e7750;background:linear-gradient(135deg,#eff5dd,#c9deb1)}.ch-die.is-locked .ch-lock-mark{transform:translateZ(2px)}
.ch-risk-play>.ch-die-cell,.ch-battle-panel>.ch-die-cell{width:clamp(70px,21vw,112px);aspect-ratio:1;min-width:70px}
@keyframes ch-toss{0%{transform:translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(0) scale(1)}18%{transform:translate3d(-3px,-25px,0) rotateX(110deg) rotateY(-95deg) rotateZ(-38deg) scale(var(--air-scale,.82))}42%{transform:translate3d(3px,-36px,0) rotateX(230deg) rotateY(-215deg) rotateZ(46deg) scale(var(--air-scale,.82))}64%{transform:translate3d(-2px,2px,0) rotateX(358deg) rotateY(-358deg) rotateZ(-13deg) scale(1.04,.92)}78%{transform:translate3d(1px,-12px,0) rotateX(366deg) rotateY(-366deg) rotateZ(7deg) scale(.97,1.02)}91%{transform:translate3d(0,2px,0) rotateX(360deg) rotateY(-360deg) rotateZ(-3deg) scale(1.03,.96)}100%{transform:translate3d(0,0,0) rotateX(360deg) rotateY(-360deg) rotateZ(0) scale(1)}}
@keyframes ch-die-shadow{0%,100%{transform:scale(1);opacity:.9}20%,43%{transform:scale(.6);opacity:.28}65%{transform:scale(1.16,.8);opacity:1}79%{transform:scale(.82);opacity:.55}92%{transform:scale(1.08,.9);opacity:1}}
@keyframes ch-coin-spin{0%{transform:rotateY(0deg)}100%{transform:rotateY(var(--coin-land,2160deg))}}
@keyframes ch-coin-flight{0%{transform:translate3d(0,0,0) rotateZ(0) scale(1)}25%{transform:translate3d(-4px,-36px,0) rotateZ(-12deg) scale(.9)}47%{transform:translate3d(3px,-46px,0) rotateZ(10deg) scale(.9)}73%{transform:translate3d(-1px,3px,0) rotateZ(-4deg) scale(1.04,.94)}86%{transform:translate3d(0,-10px,0) rotateZ(2deg) scale(.99)}100%{transform:translate3d(0,0,0) rotateZ(0) scale(1)}}
@keyframes ch-coin-shadow{0%,100%{transform:scale(1);opacity:.85}25%,47%{transform:scale(.52);opacity:.25}73%{transform:scale(1.18,.85);opacity:1}86%{transform:scale(.83);opacity:.55}}
@keyframes ch-coin-glint{0%{transform:translateX(-55%);opacity:0}25%,70%{opacity:.9}100%{transform:translateX(55%);opacity:0}}
@media(max-width:360px){.ch-header{padding-inline:10px;gap:8px}.ch-tabs{padding-inline:10px}.ch-content{padding-inline:10px}.ch-brand small{font-size:8px;letter-spacing:1px}.ch-dice-grid{gap:12px}.ch-risk-play{gap:20px}.ch-risk-actions{grid-template-columns:1fr}.ch-turn-marks{letter-spacing:2px}}
@media(orientation:landscape) and (min-width:540px){.ch-header{padding-top:7px;padding-bottom:6px}.ch-tabs{padding-bottom:6px;max-width:700px;width:100%;align-self:center}.ch-tool-panel{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:28px;align-items:center}.ch-intro{grid-column:1/-1}.ch-intro .ch-muted{margin:5px 0}.ch-tool-stage{min-height:150px;padding:42px 10px 24px}.ch-tool-controls{padding-bottom:8px;gap:9px}.ch-history{grid-column:1/-1;width:100%;margin-top:10px}.ch-coin-seat{width:155px;height:155px}.ch-coin img{width:80px;height:80px}.ch-coin-face{font-size:13px}.ch-dice-grid[data-count="1"] .ch-die{width:120px;height:120px}.ch-die{width:82px;height:82px}.ch-battle-setup,.ch-resume,.ch-battle-panel{max-width:680px}.ch-setup-die{font-size:65px}}
@media(min-width:760px) and (orientation:portrait){.ch-content{padding:16px 28px 30px}.ch-tool-stage{min-height:280px;padding-block:54px 30px}.ch-die{width:140px;height:140px}.ch-dice-grid[data-count="1"] .ch-die{width:190px;height:190px}.ch-coin-seat{width:240px;height:240px}.ch-coin img{width:140px;height:140px}.ch-tool-controls{gap:17px}.ch-header{padding-top:18px}}
/* Dice shrink within their allocated cells, including short landscape windows. */
.ch-die-cell .ch-die{width:100%;height:auto;aspect-ratio:1;max-width:112px}
.ch-dice-grid[data-count="1"] .ch-die{max-width:144px}
@media(orientation:landscape) and (min-width:540px){.ch-die-cell .ch-die{max-width:82px}.ch-dice-grid[data-count="1"] .ch-die{max-width:120px}}
@media(min-width:760px) and (orientation:portrait){.ch-die-cell .ch-die{max-width:140px}.ch-dice-grid[data-count="1"] .ch-die{max-width:190px}}
/* A large touch board keeps the dice primary; the extra tools stay folded. */
#scrChance[data-variant="dice"] .ch-content{display:flex;flex-direction:column;padding:4px 14px 18px}.ch-dice-panel{display:flex;flex-direction:column;gap:12px;flex:1;min-height:min-content;max-width:980px}.ch-dice-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 5px;min-height:34px}.ch-dice-count-label{font-size:13px;font-weight:850;color:#718369}.ch-dice-top .ch-total{gap:10px}.ch-dice-top .ch-total span{font-size:12px}.ch-dice-top .ch-total strong{font-size:28px;line-height:1;font-weight:900}.ch-dice-board{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;flex:1;min-height:max(300px,var(--board-fit-height,0px));min-width:0;padding:50px 28px 58px;border:2px solid #b9c8a5;border-radius:28px;background:radial-gradient(ellipse at 35% 20%,#fffdf1,#edf0dd 80%);box-shadow:inset 0 0 0 8px #e6ebd3,inset 0 14px 42px #8eac7314,0 7px 16px #526a3b0d;overflow:hidden;touch-action:pan-y}.ch-dice-board:before{content:"";position:absolute;inset:13px;border:1px solid #cbd5b9;border-radius:17px;pointer-events:none}.ch-board-tap{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:inherit;background:transparent;color:#728267;touch-action:pan-y}.ch-board-tap:disabled{opacity:1!important}.ch-board-tap:focus-visible{outline-offset:-6px!important}.ch-board-instruction{position:absolute;inset:auto 20px 18px;display:block;min-height:16px;font-size:12px;font-weight:700;line-height:1.4;text-align:center;pointer-events:none;overflow-wrap:anywhere}.ch-dice-board .ch-dice-grid{position:relative;z-index:1;width:min(100%,540px);gap:clamp(14px,3vw,24px);pointer-events:none}.ch-dice-board .ch-die{pointer-events:auto}.ch-dice-board .ch-die-cell .ch-die{max-width:140px}.ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:200px}.ch-dice-board .ch-dice-grid[data-count="2"] .ch-die{max-width:168px}.ch-dice-actions{display:flex;flex-direction:column;gap:10px;flex:none}.ch-dice-settings{border:1px solid #d8dfc7;border-radius:15px;min-width:0;background:#ffffff4d}.ch-dice-settings>summary{cursor:pointer;min-height:44px;padding:12px 16px;font-size:13px;font-weight:800;color:#63765a;overflow-wrap:anywhere}.ch-dice-settings[open]{padding:0 12px 12px}.ch-dice-settings[open]>summary{padding-inline:4px}.ch-dice-settings .ch-step-row{background:#ffffff70}.ch-dice-settings .ch-muted{margin:10px 2px 2px;font-size:12px}.ch-dice-settings .ch-history{max-width:none;margin:12px 0 0;padding-top:10px}
@media(max-width:360px){#scrChance[data-variant="dice"] .ch-content{padding-inline:10px}.ch-dice-panel{gap:10px}.ch-dice-board{min-height:max(280px,var(--board-fit-height,0px));padding-inline:22px;border-radius:23px}.ch-dice-board .ch-dice-grid{gap:14px}.ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:178px}}
@media(orientation:landscape) and (min-width:540px){.ch-dice-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,24%);grid-template-rows:auto 1fr;gap:10px 16px}.ch-dice-top{grid-column:1/-1}.ch-dice-board{grid-column:1;grid-row:2;min-height:max(250px,var(--board-fit-height,0px));padding:44px 24px 48px}.ch-dice-actions{grid-column:2;grid-row:2;align-self:center}.ch-dice-board .ch-dice-grid{gap:15px;max-width:390px}.ch-dice-board .ch-die-cell .ch-die{max-width:86px}.ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:144px}.ch-dice-board .ch-dice-grid[data-count="2"] .ch-die{max-width:112px}.ch-dice-settings[open]{padding-inline:8px}.ch-dice-settings .ch-step-row{flex-wrap:wrap;justify-content:center;gap:5px;padding:8px}.ch-dice-settings .ch-step-row>span{width:100%;text-align:center}}
@media(min-width:760px) and (orientation:portrait){.ch-dice-board{min-height:max(420px,var(--board-fit-height,0px));padding:64px 42px 70px}.ch-dice-board .ch-dice-grid{max-width:620px;gap:26px}.ch-dice-board .ch-die-cell .ch-die{max-width:168px}.ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:250px}.ch-dice-board .ch-dice-grid[data-count="2"] .ch-die{max-width:200px}.ch-dice-top .ch-total strong{font-size:34px}.ch-board-instruction{font-size:14px;bottom:24px}}
@media(orientation:landscape) and (min-width:540px) and (max-height:500px){.ch-header{padding:4px 10px;gap:8px}.ch-header .ch-icon{width:36px;height:36px;border-radius:12px;font-size:21px}.ch-brand small{display:none}.ch-brand h1{font-size:17px;margin:0}.ch-tabs{padding-bottom:4px;gap:4px}.ch-tab{min-height:34px;padding:6px 4px;font-size:12px}#scrChance[data-variant="dice"] .ch-content{padding-top:2px;padding-bottom:8px}.ch-dice-panel{grid-template-rows:auto minmax(110px,1fr);gap:6px 12px}.ch-dice-top{min-height:20px;padding-inline:3px}.ch-dice-count-label,.ch-dice-top .ch-total span{font-size:11px}.ch-dice-top .ch-total strong{font-size:20px}.ch-dice-board{--board-rows:1;min-height:max(110px,var(--board-fit-height,0px));padding:12px 10px 22px;border-radius:19px}.ch-dice-board:before{inset:7px;border-radius:11px}.ch-dice-board .ch-dice-grid{grid-template-columns:repeat(var(--dice-count,1),minmax(0,1fr));max-width:430px;gap:4px;--air-scale:.65}.ch-dice-board .ch-die-cell .ch-die{max-width:60px;min-width:44px}.ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:64px}.ch-dice-board .ch-dice-grid[data-count="2"] .ch-die{max-width:60px}.ch-dice-board .ch-die.is-rolling{animation-name:ch-toss-compact}.ch-dice-board .ch-lock-mark{width:20px;height:20px;right:-4px;top:-5px;font-size:13px}.ch-board-instruction{font-size:10px;line-height:1.2;bottom:5px;inset-inline:8px}.ch-dice-actions{gap:8px}.ch-dice-settings>summary{padding:10px;font-size:12px}}
@keyframes ch-toss-compact{0%{transform:translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(0) scale(1)}20%{transform:translate3d(-1px,-8px,0) rotateX(110deg) rotateY(-95deg) rotateZ(-25deg) scale(.65)}43%{transform:translate3d(1px,-10px,0) rotateX(230deg) rotateY(-215deg) rotateZ(30deg) scale(.65)}65%{transform:translate3d(0,1px,0) rotateX(358deg) rotateY(-358deg) rotateZ(-7deg) scale(1.02,.94)}80%{transform:translate3d(0,-4px,0) rotateX(363deg) rotateY(-363deg) rotateZ(3deg) scale(.99)}100%{transform:translate3d(0,0,0) rotateX(360deg) rotateY(-360deg) rotateZ(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.ch-die.is-rolling,.ch-die-cell.is-tossing:before,.ch-coin.is-flipping,.ch-coin-seat.is-flipping .ch-coin-flight,.ch-coin-seat.is-flipping:before,.ch-coin.is-flipping .ch-coin-surface:after{animation:none;will-change:auto}}
/* The two tools share a compact header. The tray is the primary phone view. */
.ch-brand small{display:none}.ch-brand h1{margin:0;font-size:18px}
.ch-header{padding:6px 10px 4px;gap:10px}.ch-tabs{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 10px 6px}
.ch-tab{min-height:38px;padding:7px 5px}.ch-primary,.ch-secondary{min-height:44px;padding:11px 14px;font-size:15px;border-radius:14px}
#scrChance[data-variant="dice"] .ch-content{padding:2px 8px 10px}
.ch-dice-panel{gap:8px}.ch-dice-top{min-height:26px;padding-inline:5px}.ch-dice-top .ch-total strong{font-size:27px}
.ch-dice-board{min-height:240px;padding:20px 14px 40px;border:1px solid #244c3b;border-radius:20px;background:radial-gradient(ellipse at 40% 15%,#416e56,#254f3c 80%);box-shadow:inset 0 0 0 6px #20433155,inset 0 8px 25px #082c2038}
.ch-dice-board:before{inset:9px;border-color:#a9c49a25;border-radius:13px}.ch-board-tap{color:#d3e0c5}.ch-board-tap:focus-visible{outline-color:#d9edb6;outline-offset:-5px}
.ch-board-instruction{inset:auto 14px 12px;font-size:12px;line-height:1.35}
.ch-dice-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:start}
.ch-dice-settings>summary{padding:12px 10px}.ch-dice-settings[open]{grid-column:1/-1}.ch-dice-actions.is-settings-open>.ch-primary{grid-column:1/-1}
/* The old DOM die is only an accessible fallback when Canvas is unavailable. */
#scrChance .ch-dice-board .ch-dice-grid[data-count] .ch-die{width:100%;height:auto;aspect-ratio:1;max-width:150px}
#scrChance .ch-dice-board .ch-dice-grid[data-count="1"] .ch-die{max-width:230px}
.ch-dice-scene{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;pointer-events:none}
.ch-dice-board.is-canvas .ch-dice-grid{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;max-width:none;gap:0;pointer-events:none}
.ch-dice-board.is-canvas .ch-die-cell{position:absolute;display:block;min-width:0;pointer-events:none;perspective:none}
.ch-dice-board.is-canvas .ch-die-cell:before{display:none}
.ch-dice-board.is-canvas .ch-die{background:transparent;border:0;box-shadow:none;animation:none;transform:none;pointer-events:auto}
.ch-dice-board.is-canvas .ch-die-cube,.ch-dice-board.is-canvas .ch-lock-mark{display:none}
.ch-dice-board.is-canvas .ch-die:focus-visible{outline-color:#ffe4a1;outline-offset:3px}
@media(orientation:landscape) and (min-width:540px){
 .ch-dice-panel{grid-template-columns:minmax(0,1fr) minmax(140px,21%);gap:6px 10px}
 .ch-dice-board{min-height:130px;padding:14px 10px 36px}
 .ch-dice-actions{display:flex;flex-direction:column;align-self:center}.ch-dice-settings{width:100%}
}
@media(orientation:landscape) and (min-width:540px) and (max-height:500px){
 .ch-header{padding-block:2px}.ch-header .ch-icon{width:40px;height:40px}.ch-tabs{padding-bottom:4px}.ch-tab{min-height:34px}
 .ch-dice-panel{grid-template-rows:auto minmax(110px,1fr)}.ch-dice-top{min-height:20px}.ch-dice-top .ch-total strong{font-size:23px}
 .ch-dice-board{min-height:110px}.ch-board-instruction{bottom:7px;font-size:10px}
}
@media(min-width:760px) and (orientation:portrait){.ch-brand h1{font-size:21px}.ch-dice-top .ch-total strong{font-size:34px}.ch-dice-board{min-height:400px}.ch-board-instruction{font-size:14px;bottom:16px}}
@media(orientation:portrait) and (max-height:520px){.ch-dice-board{min-height:220px}}
