@layer components{.dice-stage:focus-visible{outline:3px solid #fff;outline-offset:-6px}.dice-turnbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem .75rem;margin-bottom:.25rem}.dice-turn-wrap{display:flex;align-items:center;gap:.6rem;min-width:0}.dice-turn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-display);font-size:1.2rem;font-weight:800;font-stretch:88%;color:#fff}.dice-turn.is-pop{animation:dice-pop .38s cubic-bezier(.2,.9,.3,1.3) both}.dice-chip{display:inline-flex;flex:none;align-items:center;justify-content:center;gap:.25rem;min-height:2.75rem;border-radius:999px;padding:0 .95rem;background:#ffffff14;box-shadow:inset 0 0 0 1.5px #ffffff47;color:#fff;font-family:var(--font-display);font-size:.92rem;font-weight:700;font-stretch:92%;transition:background-color .15s}.dice-chip:hover{background:#ffffff29}.dice-chip svg{width:1rem;height:1rem}[dir=rtl] .dice-chip-next svg{transform:scaleX(-1)}.dice-chip-icon{width:2.75rem;padding:0}.dice-chip-icon svg{width:1.2rem;height:1.2rem}.dice-chip:focus-visible,.dice-link:focus-visible,.dice-hit:focus-visible{outline:3px solid #fff;outline-offset:2px}.dice-timer{display:flex;align-items:center;gap:.45rem;margin-inline-start:auto}.dice-timer-icon{width:1.25rem;height:1.25rem;color:var(--color-gold)}.dice-clock{min-width:3.4ch;font-family:var(--font-display);font-size:1.55rem;font-weight:800;font-stretch:85%;font-variant-numeric:tabular-nums;line-height:1}.dice-timer.is-low .dice-clock{color:var(--color-gold)}.dice-timer.is-up .dice-clock{color:#ff9db3}.dice-timeup{margin:.5rem 0 .25rem;border-radius:.9rem;background:var(--color-gold);padding:.6rem .95rem;color:var(--color-ink);font-weight:700;line-height:1.35;animation:dice-pop .4s cubic-bezier(.2,.9,.3,1.3) both}.dice-scene{position:relative;z-index:1;margin:.35rem -.25rem .9rem;perspective:900px;perspective-origin:50% 10%;touch-action:manipulation}.dice-tray{position:relative;z-index:0;width:100%;aspect-ratio:3 / 2;border-radius:1.6rem;transform:rotateX(24deg);transform-style:preserve-3d;background:radial-gradient(85% 70% at 50% 45%,#ffffff1a,#fff0 72%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 -.26'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),linear-gradient(165deg,#51449f,#3a2f88 45%,#2b2272);box-shadow:inset 0 0 0 .55rem #1c1550,inset 0 0 0 .62rem #ffffff1a,inset 0 1.1rem 1.6rem -.5rem #0502198c,inset 0 -.4rem 1rem -.4rem #05021959,0 1.6rem 2.2rem -1.1rem #030112bf}.dice-view{position:absolute;inset:0;perspective:inherit;perspective-origin:inherit;pointer-events:none}.dice-cube,.dice-token{position:absolute;left:0;top:0;width:var(--s);height:var(--s);transform-origin:0 0;transform-style:preserve-3d;pointer-events:none}.dice-face{position:absolute;inset:0;border-radius:19%;background:radial-gradient(120% 120% at 30% 22%,#fffffff2,#fff0 46%),radial-gradient(circle at 50% 50%,#fffdf7,#faf6ec 52%,#ece4d2 82%,#d9cfba);box-shadow:inset 0 0 0 calc(var(--s) * .022) #ffffffd9,inset 0 0 calc(var(--s) * .12) #6e5c3a52;transform:var(--tf) translateZ(calc(var(--s) / 2));backface-visibility:hidden;-webkit-backface-visibility:hidden}.dice-face svg{position:absolute;inset:0;width:100%;height:100%}.dice-shade{position:absolute;inset:0;border-radius:inherit;background:#120c3c;opacity:0}.dice-core{position:absolute;inset:4%;border-radius:12%;background:#ddd3bf;transform:var(--tf)}.dice-shadow{position:absolute;z-index:2;left:0;top:0;transform-origin:0 0;width:calc(var(--s) * 1.3);height:calc(var(--s) * 1.3);border-radius:34%;background:radial-gradient(closest-side,#06031ac7,#06031a6b 55%,#06031a00);pointer-events:none}.dice-shadow.is-round{border-radius:50%}.dice-glow{position:absolute;z-index:1;left:0;top:0;transform-origin:0 0;width:calc(var(--s) * 1.9);height:calc(var(--s) * 1.9);border-radius:50%;background:radial-gradient(closest-side,#ffc93cbf,#ffc93c47 52%,#ffc93c00);opacity:0;pointer-events:none;transition:opacity .35s ease}.dice-glow.is-on{opacity:1}.dice-token svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.dice-token-edge{transform:translate3d(0,calc(var(--s) * .055),0)}.dice-token-top{transform:translateZ(calc(var(--s) * .08));filter:drop-shadow(0 1px 0 rgb(255 255 255 / .5))}.dice-token-num{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--font-display);font-size:calc(var(--s) * .36);font-weight:800;font-stretch:80%;font-variant-numeric:tabular-nums;line-height:1;color:var(--color-ink);transform:translateZ(calc(var(--s) * .08 + 1px))}.dice-token[data-sides="4"] .dice-token-num{padding-top:24%;font-size:calc(var(--s) * .3)}.dice-token-num.is-long{font-size:calc(var(--s) * .27)}.dice-hit{position:absolute;z-index:9000;left:0;top:0;transform-origin:0 0;width:var(--hs);height:var(--hs);border-radius:24%;cursor:pointer;-webkit-tap-highlight-color:transparent}.dice-hit:disabled{cursor:default}.dice-hit:before{content:"";position:absolute;inset:var(--hp);border-radius:20%;transition:box-shadow .18s ease}@media (hover: hover){.dice-hit:not(:disabled):not([aria-pressed=true]):hover:before{box-shadow:0 0 0 2px #ffffff73}}.dice-hit[aria-pressed=true]:before{box-shadow:0 0 0 3px var(--color-gold),0 0 1.1rem .15rem #ffc93c73}.dice-scene.is-rolling .dice-hit{pointer-events:none}.dice-lock{position:absolute;top:calc(var(--hp) - .6rem);inset-inline-end:calc(var(--hp) - .6rem);display:grid;place-items:center;width:1.45rem;height:1.45rem;border-radius:999px;background:var(--color-gold);color:var(--color-ink);box-shadow:0 2px 6px #0006;opacity:0;transform:scale(.5);transition:opacity .15s ease,transform .24s cubic-bezier(.2,.9,.3,1.4)}.dice-lock svg{width:.8rem;height:.8rem}.dice-hit[aria-pressed=true] .dice-lock{opacity:1;transform:none}.dice-resultrow{position:relative;z-index:0;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.75rem 1rem}.dice-result{flex:1 1 9rem;min-width:0;transition:opacity .2s ease}.dice-result.is-rolling{opacity:.35}.dice-label{font-family:var(--font-display);font-size:.95rem;font-weight:700;font-stretch:92%;color:#c9bfee;overflow-wrap:anywhere}.dice-total{margin-top:.1rem;font-family:var(--font-display);font-size:clamp(2.9rem,8vw,3.9rem);font-weight:800;font-stretch:78%;font-variant-numeric:tabular-nums;line-height:.95;letter-spacing:-.01em;color:#fff}.dice-total.is-empty{color:transparent;-webkit-text-stroke:2px rgb(201 191 238 / .55)}.dice-total.is-rule{font-size:clamp(1.65rem,5.6vw,2.4rem);font-stretch:84%;line-height:1.08;letter-spacing:0;overflow-wrap:anywhere}.dice-total.is-pop{animation:dice-pop .38s cubic-bezier(.2,.9,.3,1.3) both}.dice-breakdown{min-height:1.45em;margin-top:.35rem;font-size:.95rem;font-weight:600;color:#c9bfee;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.dice-badge{display:inline-flex;align-items:center;gap:.35rem;margin-top:.5rem;border-radius:999px;background:var(--color-gold);padding:.3rem .8rem;color:var(--color-ink);font-family:var(--font-display);font-size:.98rem;font-weight:800;font-stretch:90%}.dice-badge.is-pop{animation:dice-badge .5s cubic-bezier(.2,.9,.3,1.4) both}.dice-badge.is-quiet{background:#ffffff1f;box-shadow:inset 0 0 0 1.5px #ffffff4d;color:#fff}.dice-cta{display:flex;flex:none;flex-direction:column;align-items:stretch;gap:.5rem}.dice-roll{min-width:9.5rem;min-height:3.5rem;padding-inline:1.75rem;font-size:1.25rem;box-shadow:inset 0 -3px #0000002e,0 .9rem 1.6rem -.9rem #bb2649e6}.dice-roll:focus-visible{outline:3px solid #fff;outline-offset:3px}.dice-hint{min-height:1.4em;margin-top:.7rem;font-size:.9rem;line-height:1.4;color:#c9bfee}.dice-log{margin-top:1.1rem;border-top:1px solid rgb(255 255 255 / .1);padding-top:1rem}.dice-log-head{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .75rem}.dice-tabs button,.dice-statkind button{padding:0 .95rem;font-size:.9rem}.dice-tabs button:focus-visible,.dice-statkind button:focus-visible{outline:3px solid #fff;outline-offset:2px}.dice-log-count{font-size:.88rem;font-weight:600;color:#c9bfee}.dice-log-actions{display:flex;gap:.15rem;margin-inline-start:auto}.dice-link{min-height:2.75rem;padding:0 .55rem;font-size:.9rem;font-weight:600;color:#ddd3f5;text-decoration:underline;text-decoration-color:#ddd3f566;text-underline-offset:3px}.dice-link:hover{color:#fff;text-decoration-color:currentColor}.dice-link:disabled{opacity:.45;text-decoration:none;cursor:default}.dice-history{max-height:14.5rem;margin-top:.5rem;overflow:auto;overscroll-behavior:contain}.dice-history li{display:flex;align-items:baseline;gap:.7rem;border-bottom:1px solid rgb(255 255 255 / .07);padding:.5rem .15rem;font-size:.92rem;color:#ece7fd}.dice-history li.is-new{animation:dice-row .35s var(--ease-out) both}.dice-history .n{flex:none;min-width:2.3rem;font-family:var(--font-display);font-weight:700;font-variant-numeric:tabular-nums;color:#9d92cf}.dice-history .main{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.dice-history .what{font-weight:700;color:#b9addf}.dice-history .held{text-decoration:underline;text-decoration-color:var(--color-gold);text-decoration-thickness:2px;text-underline-offset:3px}.dice-history .tag{display:inline-block;margin-inline-start:.45rem;border-radius:999px;background:#ffc93c29;padding:0 .45rem;font-size:.78rem;font-weight:700;color:var(--color-gold)}.dice-history b{flex:none;font-family:var(--font-display);font-size:1.15rem;font-weight:800;font-variant-numeric:tabular-nums;color:#fff}.dice-empty{margin-top:.6rem;font-size:.9rem;color:#a99fd8}.dice-statkind{margin-top:.75rem}.dice-bars{display:flex;align-items:stretch;gap:3px;height:8.5rem;margin-top:.9rem}.dice-bars li{display:flex;flex:1 1 0;flex-direction:column;align-items:center;gap:.35rem;min-width:0}.dice-bars .col{position:relative;flex:1 1 auto;width:100%;max-width:2.6rem}.dice-bars .bar{position:absolute;inset:0;border-radius:.4rem .4rem .15rem .15rem;background:linear-gradient(#ddd3f5,#9f90dc);transform:scaleY(var(--h, 0));transform-origin:bottom;transition:transform .45s var(--ease-out)}.dice-bars .bar.is-top{background:linear-gradient(#ffd769,#e8a700)}.dice-bars .cnt{position:absolute;inset-inline:0;bottom:calc(var(--h, 0) * 100% + .2rem);font-size:.72rem;font-weight:700;line-height:1;text-align:center;color:#fff;font-variant-numeric:tabular-nums}.dice-bars .lbl{font-size:.72rem;font-weight:600;line-height:1;color:#c9bfee;font-variant-numeric:tabular-nums;white-space:nowrap}.dice-avg{margin-top:.7rem;font-size:.88rem;color:#c9bfee}.dice-defs{position:absolute;width:0;height:0;overflow:hidden}.dice-stepper{display:flex;align-items:center;gap:.4rem}.dice-stepper button{display:grid;flex:none;place-items:center;width:3rem;height:3rem;border-radius:999px;background:#fff;color:var(--color-ink);box-shadow:inset 0 0 0 1.5px var(--color-line-strong);transition:box-shadow .15s}.dice-stepper button:hover:not(:disabled){box-shadow:inset 0 0 0 2px var(--color-plum)}.dice-stepper button:disabled{opacity:.4;cursor:not-allowed}.dice-stepper button:focus-visible,.dice-again:focus-visible{outline:3px solid var(--color-ribbon);outline-offset:2px}.dice-stepper button svg{width:1.15rem;height:1.15rem}.dice-stepper input{width:4.25rem;padding-inline:.4rem;text-align:center;font-family:var(--font-display);font-size:1.35rem;font-weight:800;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}.dice-stepper input::-webkit-inner-spin-button,.dice-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.dice-types{flex-wrap:nowrap;gap:.2rem}.dice-types button{flex:1 1 0;min-width:0;padding:0 .2rem;font-variant-numeric:tabular-nums}.dice-notation{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em}.dice-rules{display:grid;gap:.5rem}.dice-rule{display:grid;grid-template-columns:2.75rem minmax(0,1fr) 2.75rem;align-items:center;gap:.5rem}.dice-rule .field{min-height:2.75rem;padding-block:.5rem;padding-inline:.8rem;font-size:.97rem;transition:border-color .2s,box-shadow .2s}.dice-rule.is-current .field{border-color:var(--color-ribbon);box-shadow:0 0 0 3px #bb264929}.dice-mini{width:2.75rem;height:2.75rem;filter:drop-shadow(0 2px 3px rgb(34 26 85 / .18))}.dice-again{display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:.85rem;background:#fff;color:var(--color-muted);box-shadow:inset 0 0 0 1.5px var(--color-line-strong);transition:background-color .15s,color .15s}.dice-again svg{width:1.2rem;height:1.2rem}.dice-again[aria-pressed=true]{background:var(--color-plum);color:#fff;box-shadow:none}@keyframes dice-pop{0%{opacity:0;transform:scale(.82)}to{opacity:1;transform:none}}@keyframes dice-badge{0%{opacity:0;transform:scale(.6) rotate(-6deg)}to{opacity:1;transform:none}}@keyframes dice-row{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}@media (min-width: 640px){.dice-tray{aspect-ratio:16 / 10}}}
