.art-dice-page{min-height:65vh;padding:clamp(1.35rem,4vw,3.5rem) 0 4rem;color:var(--portal-text,#172033)}
.art-dice-screen{max-width:1120px;margin:0 auto;border:1px solid var(--portal-border,#d8e0ed);border-radius:1.35rem;background:var(--portal-surface,#fff);box-shadow:var(--portal-shadow,0 18px 48px rgba(22,43,77,.10))}
.art-dice-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(1.4rem,4vw,3rem);align-items:center;padding:clamp(1rem,3vw,2rem)}
.art-dice-entry[hidden],.art-dice-config[hidden],.art-dice-game[hidden]{display:none!important}
.art-dice-entry__art{overflow:hidden;aspect-ratio:1;border-radius:1rem;background:#102b74}
.art-dice-entry__art img{display:block;width:100%;height:100%;object-fit:cover}
.art-dice-entry__content{padding:.5rem 0}
.art-dice-eyebrow,.art-dice-kicker,.art-dice-competency>span{margin:0;color:var(--portal-primary,#2563eb);font-size:.76rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.art-dice-kicker{display:inline-flex;align-items:center;gap:.45rem;margin-top:1rem}
.art-dice-entry__content h1,.art-dice-config__info h1{margin:.5rem 0 .65rem;font-size:clamp(2.2rem,4.5vw,3.6rem);line-height:1.03;letter-spacing:-.045em}
.art-dice-intro{max-width:34rem;margin:0;color:var(--portal-muted,#5b6679);font-size:1.14rem;line-height:1.55}
.art-dice-competency{display:grid;gap:.35rem;margin:1.35rem 0 .8rem;padding:.9rem 1rem;border-left:4px solid var(--portal-primary,#2563eb);border-radius:.55rem;background:color-mix(in srgb,var(--portal-primary,#2563eb) 8%,var(--portal-surface,#fff))}
.art-dice-competency strong{font-size:.95rem;line-height:1.45}
.art-dice-entry__meta{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;margin:1rem 0 1.35rem;color:var(--portal-muted,#5b6679);font-size:.9rem}
.art-dice-primary{display:inline-flex;align-items:center;gap:.4rem;min-width:150px;justify-content:center}
.art-dice-back-link{display:block;width:max-content;max-width:100%;margin-top:1rem;color:var(--portal-primary,#2563eb);font-size:.9rem;text-decoration:none}
.art-dice-back-link:hover{text-decoration:underline}

.art-dice-config{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);overflow:hidden}
.art-dice-config__info{padding:clamp(1.1rem,3vw,2rem);background:color-mix(in srgb,var(--portal-primary,#2563eb) 6%,var(--portal-surface,#fff))}
.art-dice-config__info>img{display:block;width:100%;max-height:245px;aspect-ratio:16/9;object-fit:cover;border-radius:1rem;margin-bottom:1.5rem}
.art-dice-config__info h1{font-size:clamp(1.8rem,3vw,2.5rem)}
.art-dice-config__info>p:not(.art-dice-eyebrow):not(.art-dice-config__competency){color:var(--portal-muted,#5b6679);line-height:1.6}
.art-dice-howto{display:grid;gap:.8rem;margin:1.2rem 0;padding:0;list-style:none}
.art-dice-howto li{display:grid;grid-template-columns:2rem 1fr;gap:.7rem;align-items:center;font-size:.92rem;line-height:1.45}
.art-dice-howto li>span:first-child{display:grid;width:2rem;height:2rem;place-items:center;border-radius:50%;background:var(--portal-primary,#2563eb);color:#fff;font-weight:800}
.art-dice-config__competency{margin:1.3rem 0 0;padding-top:1rem;border-top:1px solid var(--portal-border,#d8e0ed);font-size:.85rem;font-weight:700;color:var(--portal-muted,#5b6679)}
.art-dice-config__options{padding:clamp(1.1rem,3vw,2rem)}
.art-dice-config__options fieldset{min-width:0;margin:0;padding:0;border:0}
.art-dice-config__options legend{margin-bottom:.3rem;font-size:1.28rem;font-weight:800}
.art-dice-config__hint{margin:.1rem 0 1rem;color:var(--portal-muted,#5b6679);font-size:.9rem}
.art-dice-artists{display:grid;gap:.7rem}
@media(min-width:620px){
    .art-dice-config .art-dice-artists{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .art-dice-config .art-dice-artist{
        grid-template-columns:48px minmax(0,1fr) 16px;
        gap:.45rem;
        padding:.55rem;
    }
    .art-dice-config .art-dice-artist__preview{width:48px;height:48px}
}
.art-dice-artist{display:grid;grid-template-columns:76px minmax(0,1fr) 24px;gap:.85rem;align-items:center;width:100%;min-height:100px;padding:.75rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:.9rem;background:var(--portal-surface,#fff);color:var(--portal-text,#172033);text-align:left;cursor:pointer;transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease}
.art-dice-artist:hover{border-color:var(--portal-primary,#2563eb);transform:translateY(-1px)}
.art-dice-artist:focus-visible,.art-dice-game button:focus-visible,.art-dice-primary:focus-visible{outline:3px solid color-mix(in srgb,var(--portal-primary,#2563eb) 45%,transparent);outline-offset:3px}
.art-dice-artist.is-selected{border-color:var(--portal-primary,#2563eb);background:color-mix(in srgb,var(--portal-primary,#2563eb) 7%,var(--portal-surface,#fff));box-shadow:0 0 0 2px color-mix(in srgb,var(--portal-primary,#2563eb) 12%,transparent)}
.art-dice-artist__preview{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:2px;overflow:hidden;place-items:center;width:76px;height:76px;border-radius:.7rem;background:#fff;border:1px solid #e2e8f0}
.art-dice-artist__copy{display:grid;gap:.3rem;min-width:0}
.art-dice-artist__copy strong{font-size:.97rem}
.art-dice-artist__copy small{color:var(--portal-muted,#5b6679);font-size:.81rem;line-height:1.4}
.art-dice-artist__check{color:var(--portal-primary,#2563eb);font-size:1.25rem;opacity:0}
.art-dice-artist.is-selected .art-dice-artist__check{opacity:1}
.art-dice-config__status{min-height:1.4rem;margin:1rem 0;color:var(--portal-muted,#5b6679);font-size:.88rem}
.art-dice-config__actions{display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin-top:.8rem}
.art-dice-config__actions .button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem}

.art-dice-game{position:fixed;z-index:3000;inset:0;width:100vw;height:100vh;min-height:100dvh;box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;padding:clamp(.55rem,1.25vw,1.15rem);background:var(--portal-bg,#f4f7fc);color:var(--portal-text,#172033);}
body.art-dice-game-active{overflow:hidden}
.art-dice-game:fullscreen{width:100vw;height:100vh;min-height:100dvh;background-color:#142040}
.art-dice-game__header{display:flex;flex:none;align-items:center;justify-content:space-between;gap:1rem;min-height:56px;padding:.55rem .8rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:1rem;background:var(--portal-surface,#fff);box-shadow:0 4px 18px rgba(26,45,77,.08)}
.art-dice-game__identity{display:flex;align-items:center;gap:.7rem;min-width:160px}
.art-dice-game__mark{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:linear-gradient(145deg,#6e60ef,#367deb);color:#fff;font-size:1.2rem}
.art-dice-game__identity>span:last-child{display:grid;gap:.1rem}
.art-dice-game__identity strong{font-size:.97rem}
.art-dice-game__identity small{color:var(--portal-muted,#5b6679);font-size:.76rem}
.art-dice-game__toolbar{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;flex-wrap:wrap}
.art-dice-tool-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:38px;padding:.45rem .75rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:.7rem;background:var(--portal-surface,#fff);color:var(--portal-text,#172033);font:inherit;font-size:.82rem;font-weight:700;cursor:pointer}
.art-dice-tool-button:hover{border-color:var(--portal-primary,#2563eb);color:var(--portal-primary,#2563eb)}
.art-dice-tool-button--exit{border-color:color-mix(in srgb,#dc3545 40%,var(--portal-border,#d8e0ed));color:#c63140}
.art-dice-game__layout{display:grid;grid-template-columns:minmax(155px,.55fr) minmax(235px,.82fr) minmax(360px,1.55fr);gap:clamp(.6rem,1.2vw,1.15rem);flex:1;min-height:0;margin:clamp(.65rem,1.25vw,1rem) 0}
.art-dice-game__side,.art-dice-roll-panel,.art-dice-drawing-panel{min-width:0;min-height:0;border:1px solid var(--portal-border,#d8e0ed);border-radius:1rem;background:var(--portal-surface,#fff);box-shadow:0 4px 18px rgba(26,45,77,.06)}
.art-dice-game__side{display:flex;flex-direction:column;gap:.8rem;padding:1rem}
.art-dice-current-artist{display:grid;gap:.35rem;padding:.85rem;border-radius:.8rem;background:color-mix(in srgb,var(--portal-primary,#2563eb) 8%,var(--portal-surface,#fff))}
.art-dice-current-artist>span,.art-dice-panel-label{margin:0;color:var(--portal-primary,#2563eb);font-size:.68rem;font-weight:900;letter-spacing:.1em}
.art-dice-current-artist strong{font-size:1rem;line-height:1.3}
.art-dice-current-artist small{color:var(--portal-muted,#5b6679);font-size:.78rem}
.art-dice-roll-count{display:flex;align-items:center;justify-content:space-between;padding:.7rem .8rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:.75rem;font-size:.84rem}
.art-dice-roll-count strong{display:grid;min-width:2rem;height:2rem;place-items:center;border-radius:50%;background:#ffcf45;color:#202a42;font-size:1rem}
.art-dice-game__tip{margin:0;padding:.65rem .7rem;border-left:3px solid #f0b82f;border-radius:.3rem;background:color-mix(in srgb,#f0b82f 10%,var(--portal-surface,#fff));font-size:.8rem;line-height:1.45;color:var(--portal-muted,#5b6679)}
.art-dice-game__tip i{margin-right:.25rem;color:#bd7d00}
.art-dice-history{display:flex;align-content:flex-start;gap:.4rem;flex-wrap:wrap;overflow:auto}
.art-dice-history:empty:after{content:"As tuas linhas aparecem aqui.";color:var(--portal-muted,#5b6679);font-size:.78rem;line-height:1.45}
.art-dice-history__item{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .5rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:999px;font-size:.72rem;background:var(--portal-bg,#f4f7fc)}
.art-dice-history__item strong{display:grid;width:1.35rem;height:1.35rem;place-items:center;border-radius:50%;background:#ffcf45;color:#202a42}
.art-dice-roll-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.8rem;padding:clamp(.8rem,1.5vw,1.4rem);text-align:center;background:radial-gradient(ellipse at center,color-mix(in srgb,#57c9f6 10%,var(--portal-surface,#fff)),var(--portal-surface,#fff) 65%)}
.art-dice-game-scene{display:grid;place-items:center;width:min(100%,270px);aspect-ratio:1;perspective:1000px;border-radius:1.4rem;background:radial-gradient(circle at 50% 40%,#e6f7ff,#dce6ff 55%,#cbd6f7);box-shadow:inset 0 0 30px rgba(56,94,164,.1)}
.art-dice-cube{--dice-x:0deg;--dice-y:0deg;position:relative;width:clamp(90px,10vw,142px);height:clamp(90px,10vw,142px);transform:rotateX(var(--dice-x)) rotateY(var(--dice-y));transform-style:preserve-3d;transition:transform 1.45s cubic-bezier(.16,.78,.22,1);}
.art-dice-cube.is-rolling{transition-duration:1.7s}
.art-dice-face{position:absolute;inset:0;border:2px solid rgba(255,255,255,.95);border-radius:22px;background:linear-gradient(145deg,#fff,#e8eefb);box-shadow:inset 0 3px 7px rgba(255,255,255,.9),inset 0 -7px 16px rgba(33,59,105,.1),0 14px 30px rgba(17,41,89,.25);backface-visibility:hidden}
.art-dice-face--front{transform:translateZ(calc(clamp(90px,10vw,142px)/2))}.art-dice-face--back{transform:rotateY(180deg) translateZ(calc(clamp(90px,10vw,142px)/2))}.art-dice-face--right{transform:rotateY(90deg) translateZ(calc(clamp(90px,10vw,142px)/2))}.art-dice-face--left{transform:rotateY(-90deg) translateZ(calc(clamp(90px,10vw,142px)/2))}.art-dice-face--top{transform:rotateX(90deg) translateZ(calc(clamp(90px,10vw,142px)/2))}.art-dice-face--bottom{transform:rotateX(-90deg) translateZ(calc(clamp(90px,10vw,142px)/2))}
.art-dice-pip{position:absolute;width:clamp(12px,1.4vw,19px);height:clamp(12px,1.4vw,19px);border-radius:50%;background:#254c9d;box-shadow:inset 0 2px 3px rgba(9,22,55,.35),0 1px 1px rgba(255,255,255,.8)}
.art-dice-pip--top-left{left:20%;top:20%}.art-dice-pip--top-right{right:20%;top:20%}.art-dice-pip--middle-left{left:20%;top:calc(50% - 9px)}.art-dice-pip--middle-right{right:20%;top:calc(50% - 9px)}.art-dice-pip--center{left:calc(50% - 9px);top:calc(50% - 9px)}.art-dice-pip--bottom-left{left:20%;bottom:20%}.art-dice-pip--bottom-right{right:20%;bottom:20%}
.art-dice-roll-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-width:175px;min-height:46px;font-size:.96rem}
.art-dice-roll-status{min-height:1.4rem;margin:0;color:var(--portal-muted,#5b6679);font-size:.86rem}
.art-dice-roll-status[data-ready="true"]{color:var(--portal-primary,#2563eb);font-weight:800}

.art-dice-drawing-panel{display:flex;flex-direction:column;overflow:hidden;padding:.9rem}
.art-dice-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.7rem}
.art-dice-panel-heading h2{margin:.2rem 0 0;font-size:clamp(1rem,1.6vw,1.35rem);line-height:1.2}
.art-dice-turn-badge{flex:none;padding:.38rem .6rem;border-radius:999px;background:var(--portal-bg,#f4f7fc);color:var(--portal-muted,#5b6679);font-size:.72rem;font-weight:800}
.art-dice-turn-badge[data-ready="true"]{background:#e7f7ef;color:#187447}
.art-dice-reel-window{position:relative;flex:none;height:clamp(116px,19vh,176px);overflow:hidden;border:1px solid var(--portal-border,#d8e0ed);border-radius:.85rem;background:linear-gradient(135deg,#fff,#f8faff)}
.art-dice-reel-track{position:absolute;inset:0 0 auto;display:flex;flex-direction:column;width:100%;height:1800%;transform:translateY(0);will-change:transform}
.art-dice-reel-track.is-resetting{transition:none!important}
.art-dice-reel-track.is-rolling{transition:transform 1.85s cubic-bezier(.12,.75,.18,1)}
.art-dice-reel-row{display:grid;grid-template-columns:40px repeat(var(--recipe-columns,5),minmax(0,1fr));align-items:center;gap:clamp(.12rem,.35vw,.35rem);flex:0 0 calc(100% / 18);min-height:0;box-sizing:border-box;padding:.3rem .45rem;border-bottom:1px solid #e6ebf2;background:#fff}
.art-dice-reel-row__number{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#ffcf45;color:#202a42;font-size:.9rem;font-weight:900}
.art-dice-reel-row__item{display:grid;grid-template-rows:minmax(0,1fr) auto;place-items:center;gap:.08rem;min-width:0;min-height:0;height:100%}
.art-dice-reel-row__item small{display:block;width:100%;overflow:hidden;color:#536078;font-size:clamp(.52rem,.7vw,.66rem);line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap}
.art-dice-sprite{display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:transparent}
.art-dice-reel-row__item .art-dice-sprite{width:min(100%,96px);height:auto;max-height:100%;align-self:center}
.art-dice-artist__preview .art-dice-sprite{width:100%;height:100%;max-width:38px;max-height:35px}
.art-dice-drawing-tools{display:flex;align-items:center;gap:.4rem;flex:none;padding:.6rem 0}
.art-dice-drawing-tools>span{margin-right:.1rem;color:var(--portal-muted,#5b6679);font-size:.75rem;font-weight:700}
.art-dice-color{display:grid;width:30px;height:30px;place-items:center;border:1px solid var(--portal-border,#d8e0ed);border-radius:50%;background:var(--portal-surface,#fff);cursor:pointer}
.art-dice-color i{display:block;width:17px;height:17px;border-radius:50%;background:var(--swatch)}
.art-dice-color.is-active{outline:2px solid var(--portal-primary,#2563eb);outline-offset:1px}
.art-dice-clear{display:inline-flex;align-items:center;gap:.3rem;margin-left:auto;padding:.35rem .6rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:.55rem;background:var(--portal-surface,#fff);color:var(--portal-text,#172033);font:inherit;font-size:.75rem;font-weight:700;cursor:pointer}
.art-dice-clear:hover{border-color:var(--portal-primary,#2563eb);color:var(--portal-primary,#2563eb)}
.art-dice-canvas-wrap{position:relative;flex:1;min-height:130px;overflow:hidden;border:1px solid #d7deea;border-radius:.7rem;background:#fff}
.art-dice-canvas-wrap canvas{display:block;width:100%;height:100%;min-height:130px;touch-action:none;cursor:crosshair}
.art-dice-canvas-wrap>span{position:absolute;inset:auto .5rem .4rem;pointer-events:none;color:#768198;font-size:.68rem;text-align:center;opacity:.85}
.art-dice-canvas-wrap.has-drawing>span{display:none}

.art-dice-result-bar{display:grid;grid-template-columns:76px minmax(220px,.8fr) minmax(0,1.5fr);align-items:center;gap:.85rem;flex:none;min-height:76px;padding:.65rem .8rem;border:1px solid var(--portal-border,#d8e0ed);border-radius:1rem;background:var(--portal-surface,#fff);box-shadow:0 4px 18px rgba(26,45,77,.06)}
.art-dice-result-number{display:grid;width:62px;height:62px;place-items:center;border-radius:1rem;background:#ffcf45;color:#202a42;font-size:2rem;font-weight:900;box-shadow:0 5px 13px rgba(224,164,23,.25)}
.art-dice-result-number.is-pop{animation:artDicePop .45s ease-out}
@keyframes artDicePop{0%{transform:scale(.78) rotate(-8deg)}65%{transform:scale(1.12) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
.art-dice-result-copy{display:grid;gap:.15rem;min-width:0}
.art-dice-result-copy>span{color:var(--portal-primary,#2563eb);font-size:.65rem;font-weight:900;letter-spacing:.1em}
.art-dice-result-copy strong{font-size:.92rem}
.art-dice-result-copy small{color:var(--portal-muted,#5b6679);font-size:.75rem;line-height:1.35}
.art-dice-result-history{display:flex;align-items:center;justify-content:flex-end;gap:.35rem;min-width:0;overflow:hidden}
.art-dice-result-history:empty:after{content:"Cada lançamento fica registado aqui.";color:var(--portal-muted,#5b6679);font-size:.76rem}
.art-dice-result-history__item{display:grid;flex:none;place-items:center;width:30px;height:30px;border:1px solid var(--portal-border,#d8e0ed);border-radius:50%;background:var(--portal-bg,#f4f7fc);font-size:.75rem;font-weight:800}
.art-dice-result-history__item.is-latest{border-color:#f0b82f;background:#ffcf45;color:#202a42}

@media(max-width:1050px){.art-dice-config{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}.art-dice-game__layout{grid-template-columns:minmax(130px,.55fr) minmax(205px,.8fr) minmax(290px,1.35fr);gap:.6rem}.art-dice-game__side{padding:.7rem}.art-dice-game-scene{width:min(100%,220px)}.art-dice-result-bar{grid-template-columns:64px minmax(190px,.9fr) minmax(0,1fr)}}
@media(max-width:800px){.art-dice-entry{grid-template-columns:minmax(0,1fr);max-width:640px}.art-dice-entry__art{max-width:470px;width:100%;margin:0 auto}.art-dice-config{grid-template-columns:minmax(0,1fr);max-width:680px}.art-dice-config__info>img{max-height:190px}.art-dice-game__header{align-items:flex-start}.art-dice-game__layout{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);grid-template-rows:auto minmax(250px,1fr);flex:1;overflow:auto}.art-dice-game__side{grid-column:1;grid-row:1}.art-dice-roll-panel{grid-column:2;grid-row:1}.art-dice-drawing-panel{grid-column:1 / -1;grid-row:2;min-height:270px}.art-dice-game-scene{width:min(100%,180px)}.art-dice-result-bar{grid-template-columns:58px minmax(160px,1fr) auto;gap:.55rem;padding:.55rem}.art-dice-result-number{width:52px;height:52px;font-size:1.65rem}.art-dice-result-history{max-width:180px}}
@media(max-width:560px){.art-dice-page{padding:.75rem 0 2rem}.art-dice-entry__content h1{font-size:2.3rem}.art-dice-config__actions{align-items:stretch;flex-direction:column-reverse}.art-dice-config__actions .button{width:100%}.art-dice-game{padding:.4rem;gap:.4rem}.art-dice-game__header{align-items:center;gap:.4rem;padding:.45rem}.art-dice-game__identity{min-width:0;gap:.45rem}.art-dice-game__mark{width:2.1rem;height:2.1rem}.art-dice-game__identity strong{font-size:.82rem}.art-dice-game__identity small{font-size:.67rem}.art-dice-game__toolbar{gap:.25rem}.art-dice-tool-button{width:36px;height:36px;min-height:36px;padding:.2rem;border-radius:.6rem;font-size:1rem}.art-dice-tool-button span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.art-dice-game__layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(240px,1fr);gap:.4rem;margin:.2rem 0;overflow:visible}.art-dice-game__side{gap:.45rem;padding:.5rem}.art-dice-current-artist{padding:.55rem;gap:.2rem}.art-dice-current-artist>span{font-size:.57rem}.art-dice-current-artist strong{font-size:.8rem}.art-dice-current-artist small{font-size:.65rem}.art-dice-roll-count{padding:.35rem .5rem;font-size:.7rem}.art-dice-roll-count strong{min-width:1.6rem;height:1.6rem}.art-dice-game__tip{padding:.4rem;font-size:.68rem}.art-dice-history{max-height:42px}.art-dice-history__item{padding:.2rem .35rem;font-size:.63rem}.art-dice-roll-panel{gap:.45rem;padding:.45rem}.art-dice-panel-label{font-size:.58rem}.art-dice-game-scene{width:min(100%,145px);border-radius:1rem}.art-dice-cube{width:clamp(75px,22vw,100px);height:clamp(75px,22vw,100px)}.art-dice-face--front{transform:translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face--back{transform:rotateY(180deg) translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face--right{transform:rotateY(90deg) translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face--left{transform:rotateY(-90deg) translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face--top{transform:rotateX(90deg) translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face--bottom{transform:rotateX(-90deg) translateZ(calc(clamp(75px,22vw,100px)/2))}.art-dice-face{border-radius:15px}.art-dice-pip{width:10px;height:10px}.art-dice-pip--center{left:calc(50% - 5px);top:calc(50% - 5px)}.art-dice-pip--middle-left,.art-dice-pip--middle-right{top:calc(50% - 5px)}.art-dice-roll-button{width:100%;min-width:0;min-height:38px;padding:.4rem;font-size:.78rem}.art-dice-roll-status{font-size:.69rem}.art-dice-drawing-panel{grid-column:1 / -1;grid-row:2;min-height:0;padding:.55rem}.art-dice-panel-heading{margin-bottom:.4rem}.art-dice-panel-heading h2{font-size:1rem}.art-dice-turn-badge{font-size:.63rem}.art-dice-reel-window{height:clamp(95px,17vh,135px)}.art-dice-reel-row{grid-template-columns:30px repeat(var(--recipe-columns,5),minmax(0,1fr));gap:.12rem;padding:.2rem}.art-dice-reel-row__number{width:25px;height:25px;font-size:.72rem}.art-dice-drawing-tools{gap:.25rem;padding:.4rem 0}.art-dice-drawing-tools>span{font-size:.65rem}.art-dice-color{width:26px;height:26px}.art-dice-color i{width:15px;height:15px}.art-dice-clear{font-size:.68rem;padding:.3rem .4rem}.art-dice-canvas-wrap{min-height:100px}.art-dice-canvas-wrap canvas{min-height:100px}.art-dice-result-bar{grid-template-columns:45px minmax(0,1fr);gap:.4rem;min-height:62px;padding:.4rem}.art-dice-result-number{width:40px;height:40px;border-radius:.7rem;font-size:1.35rem}.art-dice-result-copy>span{font-size:.56rem}.art-dice-result-copy strong{font-size:.77rem}.art-dice-result-copy small{font-size:.65rem}.art-dice-result-history{grid-column:1 / -1;justify-content:flex-start;max-width:100%;height:26px}.art-dice-result-history__item{width:23px;height:23px;font-size:.66rem}}
@media(prefers-reduced-motion:reduce){.art-dice-artist,.art-dice-cube,.art-dice-cube.is-rolling,.art-dice-reel-track.is-rolling,.art-dice-result-number.is-pop{transition:none!important;animation:none!important}}

/* Fluxo do jogo: dado acima, roleta horizontal abaixo; o desenho é feito em papel. */
.art-dice-game{gap:clamp(.5rem,1.2vh,1rem);overflow:auto}
.art-dice-game__stage{display:grid;grid-template-rows:auto minmax(260px,1fr);gap:clamp(.55rem,1.2vh,1rem);flex:1;min-height:0;width:min(100%,1500px);margin:0 auto}
.art-dice-roll-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;min-height:0;padding:.4rem}
.art-dice-roll-panel .art-dice-panel-label{margin:0}
.art-dice-game-scene{width:clamp(150px,22vh,245px);height:clamp(125px,20vh,220px);flex:none}
.art-dice-cube{width:clamp(92px,13vh,142px);height:clamp(92px,13vh,142px)}
.art-dice-roll-button{min-height:42px}
.art-dice-roll-status{min-height:1.1rem;margin:0;text-align:center}
.art-dice-roulette-panel{display:flex;flex-direction:column;min-height:0;padding:clamp(.65rem,1.4vw,1.1rem);border:1px solid var(--portal-border,#d8e0ed);border-radius:1rem;background:var(--portal-surface,#fff);box-shadow:0 5px 22px rgba(26,45,77,.08)}
.art-dice-roulette-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.6rem}
.art-dice-roulette-heading>span:first-child{display:grid;gap:.15rem;min-width:0}
.art-dice-roulette-heading strong{font-size:1rem}
.art-dice-roulette-heading small{color:var(--portal-muted,#5b6679);font-size:.8rem}
.art-dice-reel-window{position:relative;flex:1;min-height:210px;overflow:hidden;border:1px solid var(--portal-border,#d8e0ed);border-radius:.85rem;background:linear-gradient(110deg,#f5f8ff,#fff 22%,#fff 78%,#f5f8ff)}
.art-dice-reel-track{position:absolute;inset:0 auto 0 0;display:flex;flex-direction:row;width:1800%;height:100%;transform:translateX(0);will-change:transform}
.art-dice-reel-track.is-resetting{transition:none!important}
.art-dice-reel-track.is-rolling{transition:transform 2.1s cubic-bezier(.12,.78,.15,1)}
.art-dice-reel-card{display:grid;grid-template-columns:52px repeat(var(--recipe-columns,5),minmax(0,1fr));align-items:center;gap:clamp(.2rem,.8vw,.8rem);flex:0 0 calc(100% / 18);width:calc(100% / 18);height:100%;min-width:0;box-sizing:border-box;padding:clamp(.35rem,1.3vw,1.1rem);border-right:1px solid #e6ebf2;background:var(--portal-surface,#fff)}
.art-dice-reel-row__number{display:grid;place-items:center;width:clamp(34px,4vw,52px);height:clamp(34px,4vw,52px);border-radius:50%;background:#ffcf45;color:#202a42;font-size:clamp(1rem,1.5vw,1.4rem);font-weight:900;box-shadow:0 4px 12px rgba(224,164,23,.24)}
.art-dice-reel-row__item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;min-width:0;height:100%;text-align:center}
.art-dice-reel-row__item small{display:block;width:100%;overflow:hidden;color:var(--portal-muted,#5b6679);font-size:clamp(.58rem,.82vw,.78rem);line-height:1.25;text-align:center;text-overflow:ellipsis}
.art-dice-reel-row__item .art-dice-sprite{width:min(100%,clamp(58px,9vw,118px));height:auto;max-height:68%;align-self:center}
.art-dice-reel-marker{position:absolute;z-index:3;top:0;bottom:0;left:52px;width:3px;background:linear-gradient(transparent,#ffbf2f 18%,#ffbf2f 82%,transparent);opacity:.78;pointer-events:none}
.art-dice-reel-fade{position:absolute;z-index:2;top:0;bottom:0;width:clamp(18px,4vw,52px);pointer-events:none}
.art-dice-reel-fade--left{left:0;background:linear-gradient(90deg,rgba(240,245,255,.9),transparent)}
.art-dice-reel-fade--right{right:0;background:linear-gradient(270deg,rgba(240,245,255,.9),transparent)}
.art-dice-roulette-hint{margin:.55rem 0 0;color:var(--portal-muted,#5b6679);font-size:.84rem;text-align:center}
.art-dice-result-bar{grid-template-columns:64px minmax(180px,.8fr) minmax(0,1.2fr);width:min(100%,1500px);margin:0 auto}
.art-dice-result-copy>span{display:flex;align-items:center;gap:.3rem}
.art-dice-result-copy>span b{color:var(--portal-text,#172033)}
.art-dice-result-history{justify-content:flex-end}
@media(max-width:800px){.art-dice-game__stage{grid-template-rows:auto minmax(220px,1fr);gap:.45rem}.art-dice-roll-panel{padding:.2rem}.art-dice-game-scene{width:150px;height:120px}.art-dice-cube{width:86px;height:86px}.art-dice-reel-window{min-height:205px}.art-dice-reel-card{grid-template-columns:34px repeat(var(--recipe-columns,5),minmax(0,1fr));gap:.15rem;padding:.25rem}.art-dice-reel-row__number{width:28px;height:28px;font-size:.9rem}.art-dice-reel-row__item .art-dice-sprite{width:min(100%,58px);max-height:62%}.art-dice-reel-row__item small{font-size:clamp(.48rem,1.35vw,.62rem)}.art-dice-reel-marker{left:34px;width:2px}.art-dice-result-bar{grid-template-columns:44px minmax(0,1fr);gap:.4rem;min-height:60px;padding:.4rem}.art-dice-result-number{width:40px;height:40px;border-radius:.7rem;font-size:1.35rem}.art-dice-result-copy>span{font-size:.58rem}.art-dice-result-copy strong{font-size:.77rem}.art-dice-result-copy small{font-size:.65rem}.art-dice-result-history{grid-column:1 / -1;justify-content:flex-start;height:24px}}
@media(max-width:420px){.art-dice-game__header{gap:.25rem}.art-dice-game__toolbar{gap:.18rem}.art-dice-tool-button{width:34px;height:34px;min-height:34px}.art-dice-roulette-panel{padding:.45rem}.art-dice-reel-window{min-height:190px}.art-dice-reel-card{grid-template-columns:28px repeat(var(--recipe-columns,5),minmax(0,1fr));gap:.08rem;padding:.15rem}.art-dice-reel-row__number{width:23px;height:23px;font-size:.75rem}.art-dice-reel-marker{left:28px}.art-dice-reel-row__item .art-dice-sprite{width:min(100%,48px)}}


/* Ambiente artístico do jogo e marcador alinhado ao centro do número. */
.art-dice-game{
    --art-dice-marker-gap:60px;
    background-color:#142040;
    background-image:linear-gradient(180deg,rgba(17,28,55,.20),rgba(17,28,55,.36)),url('../images/games/dado-criativo/dado-criativo-art-background.jpg');
    background-position:center;
    background-size:cover;
}
.art-dice-game:fullscreen{
    background-image:linear-gradient(180deg,rgba(17,28,55,.20),rgba(17,28,55,.36)),url('../images/games/dado-criativo/dado-criativo-art-background.jpg');
    background-position:center;
    background-size:cover;
}
.art-dice-game__header,.art-dice-roll-panel,.art-dice-roulette-panel,.art-dice-result-bar{
    background-color:rgba(255,255,255,.88);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
}
.art-dice-roll-panel{
    background-color:transparent;
    background-image:none;
    border-color:transparent;
    box-shadow:none;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
}
.art-dice-game-scene{
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.art-dice-roulette-panel{border-color:rgba(255,255,255,.38);background-color:rgba(255,255,255,.43)}
.art-dice-reel-window{
    --art-dice-number-column:52px;
    --art-dice-card-inset:clamp(.35rem,1.3vw,1.1rem);
    border-color:rgba(255,255,255,.38);
    border-radius:0;
    background:rgba(255,249,235,.19);
    box-shadow:none;
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
}
.art-dice-reel-card{border-right-color:rgba(38,51,78,.14);background:rgba(255,255,255,.10)}
.art-dice-reel-row__number{position:relative;z-index:4}
.art-dice-reel-marker{
    left:calc(var(--art-dice-card-inset) + var(--art-dice-number-column) / 2);
    top:0;
    bottom:0;
    width:0;
    background:transparent;
    opacity:1;
    box-shadow:none;
}
.art-dice-reel-marker::before,.art-dice-reel-marker::after{
    position:absolute;
    left:-1.5px;
    width:3px;
    height:calc(50% - var(--art-dice-marker-gap) / 2);
    content:"";
    background:linear-gradient(transparent,#ffbf2f 30%,#ffbf2f);
    box-shadow:0 0 10px rgba(255,191,47,.48);
}
.art-dice-reel-marker::before{top:0}
.art-dice-reel-marker::after{bottom:0;transform:rotate(180deg)}
@media(max-width:800px){
    .art-dice-game{--art-dice-marker-gap:44px}
}
@media(max-width:800px){
    .art-dice-reel-window{--art-dice-number-column:34px;--art-dice-card-inset:.25rem}
    .art-dice-reel-marker{left:calc(var(--art-dice-card-inset) + var(--art-dice-number-column) / 2)}
}
@media(max-width:420px){
    .art-dice-reel-window{--art-dice-number-column:28px;--art-dice-card-inset:.15rem}
    .art-dice-reel-marker{left:calc(var(--art-dice-card-inset) + var(--art-dice-number-column) / 2)}
}
/* Dado ampliado, mantendo as faces em proporção e dentro da zona de lançamento. */
.art-dice-game-scene{width:clamp(210px,30vh,350px);height:clamp(230px,29vh,315px)}
.art-dice-cube{--art-dice-cube-size:clamp(180px,26vh,270px);--dice-pip-size:clamp(17px,1.9vh,25px);width:var(--art-dice-cube-size);height:var(--art-dice-cube-size)}
.art-dice-face--front{transform:translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-face--back{transform:rotateY(180deg) translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-face--right{transform:rotateY(90deg) translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-face--left{transform:rotateY(-90deg) translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-face--top{transform:rotateX(90deg) translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-face--bottom{transform:rotateX(-90deg) translateZ(calc(var(--art-dice-cube-size)/2))}
.art-dice-pip{width:var(--dice-pip-size);height:var(--dice-pip-size)}
.art-dice-pip--middle-left{top:calc(50% - var(--dice-pip-size)/2)}
.art-dice-pip--middle-right{top:calc(50% - var(--dice-pip-size)/2)}
.art-dice-pip--center{left:calc(50% - var(--dice-pip-size)/2);top:calc(50% - var(--dice-pip-size)/2)}
@media(max-width:800px){
    .art-dice-game-scene{width:clamp(210px,31vh,300px);height:clamp(220px,32vh,280px)}
    .art-dice-cube{--art-dice-cube-size:clamp(170px,27vh,230px);--dice-pip-size:clamp(16px,2.4vw,22px)}
}
@media(max-width:560px){
    .art-dice-game-scene{width:min(100%,235px);height:clamp(210px,30vh,255px)}
    .art-dice-cube{--art-dice-cube-size:clamp(150px,40vw,190px);--dice-pip-size:clamp(15px,4vw,19px)}
}
