/* Bounded, illustrated dice. No font-size inheritance from the old cubilet. */
#modalbody[data-dice14]{overflow-x:hidden;box-sizing:border-box}
.dice14-shell,.dice14-settings{--dice14-size:72px;--dice14-half:36px;--dice14-paper:#f7edd1;--dice14-ink:#284b82;min-width:0;width:100%;box-sizing:border-box;color:#26344a}
.dice14-shell *,.dice14-settings *{box-sizing:border-box}
.dice14-explanation{font-size:15px!important;line-height:1.5!important;margin:0 0 12px!important;overflow-wrap:anywhere}
.dice14-table{display:flex;justify-content:center;align-items:center;min-height:214px;width:100%;max-width:100%;padding:22px 12px 12px;border-radius:48% 44% 42% 40% / 35% 40% 38% 36%;background:radial-gradient(ellipse at 50% 58%,#d6dabc 0,#e4e4cb 51%,#eee9d5 73%,transparent 74%);overflow:visible}
#modalbody .dice14-throw{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:16px!important;width:100%!important;max-width:300px!important;min-height:180px!important;min-width:0!important;padding:12px!important;margin:0!important;border:0!important;box-shadow:none!important;border-radius:20px!important;background:transparent!important;color:#284b82!important;font:16px/1.3 system-ui!important;touch-action:none;user-select:none;cursor:pointer}
#modalbody .dice14-throw:hover{background:#f5edce55!important}
#modalbody .dice14-throw:focus-visible{outline:3px solid #c7a14d;outline-offset:3px}
#modalbody .dice14-throw-title{display:block!important;font:600 17px/1.3 system-ui!important;max-width:100%;margin:12px 0 0!important}
#modalbody .dice14-hint{display:block!important;font:12px/1.5 system-ui!important;max-width:230px;white-space:normal;text-align:center;margin:-10px 0 0!important;color:#627065}
.dice14-perspective{display:block;position:relative;flex:none;width:var(--dice14-size);height:var(--dice14-size);margin:12px 16px 15px}
.dice14-perspective::after{content:'';position:absolute;left:1%;right:-10%;bottom:-18px;height:15px;background:#59614c2d;border-radius:50%;filter:blur(4px);z-index:-1}
.dice14-cube{position:absolute;inset:0;display:block;transform:rotate(0deg);transition:transform .25s ease-out}
.dice14-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:5px;padding:11px;background:#f7edd1;border:1.5px solid #8a7854;border-radius:10px;backface-visibility:hidden;box-shadow:inset 3px 3px 0 #fff9e9,inset -3px -3px 0 #d8c698}
.dice14-face i{display:block;width:100%;height:100%;min-width:0;min-height:0;border-radius:50%;background:transparent}
.dice14-face i.pip{background:#284b82;box-shadow:inset 1px 1px 1px #152b4c70}
.dice14-front{transform:none}
.dice14-held .dice14-cube{animation:dice14-shake .18s linear infinite alternate}
.dice14-rolling .dice14-cube{animation:dice14-tumble .65s cubic-bezier(.2,.7,.3,1) both;animation-delay:var(--dice14-delay,0ms)}
.dice14-tumbling .dice14-perspective{animation:dice14-bounce .65s ease-out both}
.dice14-result-groups{display:flex;flex-direction:column;gap:14px;padding:10px 0}
.dice14-group{min-width:0;width:100%;text-align:center}
.dice14-group-label{display:block;font:600 13px/1.4 system-ui;color:#627065;margin-bottom:6px}
.dice14-results{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 12px;max-width:100%;padding:12px 5px}
.dice14-outcome{--dice14-size:52px;--dice14-half:26px;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:72px;flex:none}
.dice14-outcome .dice14-face{padding:8px;gap:3px;border-radius:8px}
.dice14-outcome b{font:600 18px/1.3 system-ui;color:#284b82;margin-top:8px}
.dice14-outcome .dice14-perspective{margin:8px 10px 12px}
.dice14-settled .dice14-outcome{animation:dice14-settle .22s ease-out both}
.dice14-status{font:14px/1.5 system-ui!important;text-align:center;margin:16px 0 6px!important;color:#627065;overflow-wrap:anywhere}
#modalbody .dice14-auto{display:flex!important;align-items:center!important;gap:9px!important;margin:15px 0 5px!important;max-width:100%;font:14px/1.4 system-ui!important;color:#52614f}
#modalbody .dice14-auto input{display:block!important;width:18px!important;height:18px!important;min-width:18px!important;margin:0!important;padding:0!important;flex:none;accent-color:#284b82}
#modalbody .dice14-auto span{font:14px/1.4 system-ui!important;overflow-wrap:anywhere}
.dice14-settings{display:flex;flex-direction:column;align-items:center;padding:10px 0}
.dice14-settings p{font:14px/1.6 system-ui!important;text-align:left;max-width:100%;margin:14px 0!important}
.card-reveal{animation:dice14-card-in .26s ease-out both}
@keyframes dice14-tumble{0%{transform:translate(-24px,-12px) rotate(-100deg)}40%{transform:translate(16px,-24px) rotate(100deg)}75%{transform:translate(0,5px) rotate(250deg)}100%{transform:translate(0,0) rotate(360deg)}}
@keyframes dice14-bounce{0%{transform:translateY(-6px)}45%{transform:translateY(-16px)}75%{transform:translateY(6px)}100%{transform:translateY(0)}}
@keyframes dice14-shake{from{transform:rotate(-12deg) translateX(-3px)}to{transform:rotate(12deg) translateX(3px)}}
@keyframes dice14-settle{from{opacity:.3;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@keyframes dice14-card-in{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:360px){.dice14-shell,.dice14-settings{--dice14-size:62px;--dice14-half:31px}.dice14-table{min-height:198px;padding-left:3px;padding-right:3px}.dice14-face{padding:9px;gap:4px}.dice14-results{gap:4px}.dice14-outcome{--dice14-size:46px;--dice14-half:23px;min-width:63px}}
@media(prefers-reduced-motion:reduce){.dice14-cube{transition:none}.dice14-held .dice14-cube,.dice14-rolling .dice14-cube,.dice14-tumbling .dice14-perspective,.dice14-settled .dice14-outcome,.card-reveal{animation:none!important}}
.card-reveal{animation:cardReveal14 .2s ease-out both}@keyframes cardReveal14{from{opacity:.2;transform:translateY(10px) rotateY(-10deg)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.card-reveal{animation:none}}


.dice14-unresolved::after{content:"?";grid-area:1 / 1 / 4 / 4;place-self:center;font:600 32px/1 system-ui;color:#627065}
