:root{--bg:#0c0720;--panel:#15102b;--line:#3a3158;--text:#f4f0ff;--mute:#b9b0d8;--violet:#8b3dff;--lav:#b594ff;--gold:#ffd166;--fire:#ff8a1a}
*{box-sizing:border-box;margin:0;padding:0}
html{height:100%;background:var(--bg)}
body{height:100%;color:var(--text);font:15px/1.4 Inter,system-ui,sans-serif;overflow:hidden;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
/* the night castle: a tall picture on phones, a wide one on big screens */
body::before{content:"";position:fixed;inset:0;z-index:-1;background:linear-gradient(rgba(12,7,32,.1),rgba(12,7,32,.28)),url(/assets/play/dd/bg.webp) center top/cover no-repeat}
@media (min-width:700px){body::before{background:linear-gradient(rgba(12,7,32,.1),rgba(12,7,32,.3)),url(/assets/play/dd/bg-wide.webp) center/cover no-repeat}}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
svg.ic{stroke:none}

.dd{position:relative;height:100svh;max-width:600px;margin:0 auto;display:flex;flex-direction:column;gap:6px;padding:6px 8px calc(8px + env(safe-area-inset-bottom,0px));--logoRow:40px}

/* ---------- top bar: level badge on the left, best score on the right ---------- */
.dd-top{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;height:34px;flex:none}
.dd-lv,.dd-trophy{height:32px;border-radius:9px;background:linear-gradient(#2c2649,#16122a);border:1.5px solid #6a6190;box-shadow:0 2px 0 #090614,inset 0 1px 0 rgba(255,255,255,.12)}
.dd-lv{display:grid;grid-template-columns:auto auto;grid-template-rows:1fr auto;column-gap:6px;align-items:center;padding:2px 9px 3px 2px}
.dd-face{grid-row:1/3;width:26px;height:26px;border-radius:7px;border:1.5px solid #ffb02e;background:#3a1408 url(/assets/play/dd/dragon.webp) 98% 79%/470% auto no-repeat;filter:hue-rotate(var(--hue,0deg))}
.dd-lv span{font:800 12px/1 'Exo 2',sans-serif;color:#fff;white-space:nowrap;align-self:end}
.dd-lvbar{display:block;width:50px;height:5px;border-radius:3px;background:#090614;overflow:hidden;align-self:start;margin-top:2px}
.dd-lvbar i{display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#ff9a1f,#ffd166);transform-origin:left;transform:scaleX(0);transition:transform .35s}
.dd-trophy{display:flex;align-items:center;gap:5px;padding:0 9px 0 7px;font:800 13px 'Exo 2',sans-serif;font-variant-numeric:tabular-nums;color:#fff}
.dd-trophy svg{width:17px;height:17px;fill:#ffd166;stroke:#9a5f00;stroke-width:.8}

/* the hoard: a jackpot meter that never stops climbing, paid out when the dragon is unleashed */
.dd-jackpot{position:relative;flex:1 1 0;min-width:0;height:34px;margin:0 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:9px;border:1.5px solid #ffd166;background:linear-gradient(#5a1608,#2a0a04);box-shadow:0 0 12px rgba(255,160,40,.55),inset 0 0 10px rgba(255,120,20,.35);overflow:hidden}
.dd-jackpot::before{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 35%,rgba(255,240,190,.5) 50%,transparent 65%);translate:-100% 0;animation:ddSheen 2.6s ease-in-out infinite}
@keyframes ddSheen{60%,100%{translate:100% 0}}
.dd-jackpot small{font:800 8px/1 'Exo 2',sans-serif;letter-spacing:.24em;text-transform:uppercase;color:#ffd9a0}
.dd-jackpot b{font:900 17px/1.05 'Exo 2',sans-serif;font-variant-numeric:tabular-nums;color:#ffe27a;text-shadow:0 0 9px rgba(255,170,40,.9),0 1px 0 #5a2600}
.dd-jackpot.pay{animation:ddPay .28s ease-in-out 6}
@keyframes ddPay{50%{scale:1.1;box-shadow:0 0 28px rgba(255,210,90,1),inset 0 0 14px rgba(255,200,80,.7)}}

/* ---------- logo: sits over the top bar and dips onto the stone frame ---------- */
.dd-logo{position:relative;z-index:4;height:var(--logoRow);flex:none;pointer-events:none}
.dd-logo img{position:absolute;left:50%;bottom:-9px;height:calc(100% + 9px + var(--logoUp,38px));width:auto;transform:translateX(-50%);filter:drop-shadow(0 6px 10px rgba(0,0,0,.6))}

/* ---------- stage: powers | the well in its stone frame | panels ---------- */
.dd-stage{position:relative;flex:1 1 0;min-height:0;display:flex;justify-content:center;align-items:center;gap:6px}
.dd-left{position:relative;z-index:2;width:46px;flex:none;display:flex;flex-direction:column;justify-content:flex-end;gap:9px;padding-bottom:6px}
.dd-side{width:70px;flex:none;display:flex;flex-direction:column;gap:5px}
.dd-frame{position:relative;flex:none;line-height:0;border-radius:5px;background:#4f4a68 0 0/100% 100% no-repeat;box-shadow:0 0 0 2px #17122b,0 5px 0 #3b3656,0 7px 0 2px #17122b,0 16px 26px rgba(0,0,0,.6)}
.dd-win{position:absolute;left:50%;top:40%;z-index:10;translate:-50% -50%;zoom:var(--k,1);pointer-events:none;text-align:center;white-space:nowrap;animation:ddWin 1.7s cubic-bezier(.2,1.3,.3,1) forwards}
.dd-win::before{content:"";position:absolute;left:50%;top:50%;width:340px;height:340px;translate:-50% -50%;z-index:-1;border-radius:50%;background:repeating-conic-gradient(rgba(255,214,100,.36) 0 9deg,transparent 9deg 18deg);-webkit-mask:radial-gradient(circle,#000 0,transparent 68%);mask:radial-gradient(circle,#000 0,transparent 68%);animation:ddRays 3.4s linear infinite}
.dd-win b{display:block;font:italic 900 clamp(30px,9.4vw,46px)/1 'Exo 2',system-ui,sans-serif;letter-spacing:.01em;text-transform:uppercase;background:linear-gradient(#fffbe0,#ffd23e 45%,#ff8a1a);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 3px 0 #7a2d00) drop-shadow(0 0 12px rgba(255,170,40,.9))}
.dd-win i{display:block;margin-top:5px;font:normal 900 clamp(24px,7.4vw,36px)/1 'Exo 2',system-ui,sans-serif;color:#fff;text-shadow:0 3px 0 #7a2d00,0 0 12px rgba(255,200,80,.95)}
.dd-win.long b{font-size:clamp(21px,6.6vw,38px)}
@keyframes ddWin{0%{scale:.2;opacity:0}11%{scale:1.2;opacity:1}19%{scale:1}82%{scale:1.05;opacity:1}100%{scale:1.35;opacity:0}}
@keyframes ddRays{to{rotate:360deg}}
#score.roll{color:#fff6c4;text-shadow:0 0 12px #ffb02e,0 0 3px #fff}
.dd-score.bump{animation:ddBump .16s ease-out}
@keyframes ddBump{0%{scale:1.12}100%{scale:1}}
#fx3d{position:fixed;inset:0;width:100%;height:100%;z-index:8;pointer-events:none}
#fx3d.front{z-index:31}
.dd.three .dd-dragon,.dd.three .dd-ledge{display:none}
.dd.three .dd-hero-dragon{visibility:hidden}
.dd.three .dd-logo{visibility:hidden}
#well{position:relative;display:block;border-radius:3px;background:#120d27;box-shadow:0 0 0 2px #cf9bff,0 0 14px 3px rgba(190,120,255,.85)}
.dd-frame.flash::after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;border-radius:5px;background:radial-gradient(circle,rgba(255,240,190,.75),rgba(255,138,26,.25) 60%,transparent 75%);animation:ddFlash .38s ease-out forwards}
@keyframes ddFlash{from{opacity:1}to{opacity:0}}
#well.danger{animation:ddDanger .64s ease-in-out infinite}
@keyframes ddDanger{50%{box-shadow:0 0 0 3px #ff3b2b,0 0 26px 6px rgba(255,40,40,.85)}}
body.frenzy #well{box-shadow:0 0 0 2px #ffd166,0 0 26px 6px rgba(255,209,102,.75)}

/* eight-sided tiles: an outer rim and an inner face, both cut with the same shape */
.pan,.pw,.dd-pad button{position:relative;isolation:isolate;--oct:polygon(var(--oc) 0,calc(100% - var(--oc)) 0,100% var(--oc),100% calc(100% - var(--oc)),calc(100% - var(--oc)) 100%,var(--oc) 100%,0 calc(100% - var(--oc)),0 var(--oc))}
.pan::before,.pan::after,.pw::before,.pw::after,.dd-pad button::before,.dd-pad button::after{content:"";position:absolute;z-index:-1;clip-path:var(--oct)}
.pan::before,.pw::before,.dd-pad button::before{inset:0}

/* panels on the right */
.pan{--oc:7px;padding:5px 3px 6px;text-align:center;filter:drop-shadow(0 2px 0 #090614)}
.pan::before{background:linear-gradient(#746c9a,#3f3862)}
.pan::after{inset:2px;background:linear-gradient(#211c3a,#110e22)}
.pan small{display:block;font:800 9px/1.3 'Exo 2',sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#e3dcf8}
.pan b{display:block;font:900 18px/1.1 'Exo 2',sans-serif;font-variant-numeric:tabular-nums;color:var(--gold);text-shadow:0 1px 0 rgba(0,0,0,.6)}
.pan b.long{font-size:14px;line-height:1.4}.pan b.xl{font-size:11.5px;line-height:1.7;letter-spacing:-.02em}
.dd-eggs{padding:3px 3px 4px}.dd-eggs b{font-size:15px;color:#fff}
.dd-next{flex:1 1 0;min-height:0}
.dd-next canvas{position:absolute;left:4px;top:19px;width:calc(100% - 8px);height:calc(100% - 25px)}
.dd-sys{display:grid;grid-template-columns:1fr 1fr;gap:5px;flex:none}
.dd-ico{position:relative;height:30px;border-radius:8px;border:1.5px solid #6a6190;background:linear-gradient(#2c2649,#16122a);display:grid;place-items:center;box-shadow:0 2px 0 #090614}
.dd-ico::after{content:"";position:absolute;inset:-5px}
.dd-ico svg{width:16px;height:16px}
.dd-ico .off{display:none}.dd-ico[aria-pressed="true"] .on{display:none}.dd-ico[aria-pressed="true"] .off{display:block}

/* heat badge on the score panel */
.dd-score em{position:absolute;top:-7px;right:-4px;z-index:2;padding:1px 6px;border-radius:9px;background:linear-gradient(#ffb02e,#ff3b2b);color:#fff;font:900 12.5px 'Exo 2',sans-serif;font-style:normal;box-shadow:0 0 12px rgba(255,90,30,.9);animation:ddHeat .5s ease-in-out infinite alternate}
.dd-score em::after{content:"";position:absolute;left:4px;right:4px;bottom:-5px;height:3px;border-radius:2px;background:#ffd166;transform-origin:left;transform:scaleX(var(--left,1));transition:transform .2s}
@keyframes ddHeat{to{transform:scale(1.14) rotate(-4deg)}}
body.frenzy .dd-score::before{background:linear-gradient(#ffe9a6,#ffb02e)}

/* powers on the left */
.pw{display:grid;place-items:center;--oc:10px}
.dd-left .pw{width:46px;height:46px;filter:drop-shadow(0 3px 0 #090614)}
.pw::before{background:linear-gradient(#e2c15c,#7c5d16)}
.pw::after{inset:2px;background:linear-gradient(#2e2850,#141028)}
.dd-left .pw span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.pw svg.ic{width:30px;height:30px}
.pw b{position:absolute;right:-5px;bottom:-5px;min-width:20px;height:20px;padding:0 4px;border-radius:10px;border:1.5px solid #6e4300;background:radial-gradient(circle at 35% 30%,#ffeeb0,#f5a623);color:#3a2200;font:800 11.5px/17px Inter,sans-serif;text-align:center}
.pw:disabled{opacity:.5}
.pw.empty b{background:#3ddc84;color:#04260f;border-color:#0a5a2a}
.pw.empty::before{background:linear-gradient(#7dffb1,#1b8a4b)}

/* stone ledge the dragon sits on, the dragon, the fuse */
.dd-ledge{position:absolute;z-index:2;border-radius:0 3px 3px 0;background:linear-gradient(#77708f,#4a4564 50%,#2d2944);box-shadow:inset 0 2px 0 rgba(255,255,255,.24),inset 0 -3px 0 rgba(0,0,0,.42),0 6px 10px rgba(0,0,0,.55);pointer-events:none}
.dd-dragon{position:absolute;left:0;top:0;z-index:3;pointer-events:none;transition:opacity .2s;will-change:transform}
.dd.veiled .dd-dragon,.dd.veiled .dd-ledge{visibility:hidden}
.dd-dragon i{position:relative;display:block;width:100%;height:100%;background:url(/assets/play/dd/dragon.webp) 0 0/100% 100% no-repeat;transform-origin:70% 96%;filter:hue-rotate(var(--hue,0deg)) drop-shadow(0 8px 10px rgba(0,0,0,.55));animation:ddIdle 3.4s ease-in-out infinite}
@keyframes ddIdle{0%,100%{transform:rotate(-1.2deg)}50%{transform:rotate(1.4deg) translateY(-2px)}}
.dd-dragon.fire i{animation:ddRoar .09s linear infinite alternate;filter:hue-rotate(var(--hue,0deg)) drop-shadow(0 0 16px rgba(255,150,40,.95)) brightness(1.16)}
@keyframes ddRoar{from{transform:rotate(3deg) scale(1.05) translate(1px,1px)}to{transform:rotate(3.8deg) scale(1.06) translate(-1px,0)}}
.dd-dragon u{position:absolute;left:88.7%;top:69.4%;width:9%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;background:radial-gradient(circle,rgba(255,250,190,.95),rgba(255,200,50,.55) 40%,transparent 70%);mix-blend-mode:screen;animation:ddEye 2.2s ease-in-out infinite}
@keyframes ddEye{50%{opacity:.3;scale:.75}}
.dd-fuse{position:absolute;left:0;top:0;z-index:4;translate:-50% 0;padding:3px 8px 5px;border-radius:9px;background:rgba(30,12,6,.92);border:1px solid rgba(255,138,26,.75);text-align:center;pointer-events:none;box-shadow:0 0 14px rgba(255,138,26,.5)}
.dd-fuse span{display:block;font:800 10px/1.2 'Exo 2',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}
.dd-fuse i{display:block;height:5px;margin-top:3px;border-radius:4px;background:linear-gradient(90deg,#ff3b2b,#ff8a1a,#ffd166);transform-origin:left;box-shadow:0 0 10px rgba(255,138,26,.8)}
.dd-toasts{position:absolute;inset:0;pointer-events:none;z-index:9;overflow:hidden}
.dd-toast{position:absolute;left:50%;font:900 22px 'Exo 2',sans-serif;white-space:nowrap;color:#fff;text-shadow:0 0 14px rgba(255,138,26,.9),0 2px 0 #000;animation:ddUp 1.1s ease-out forwards}
.dd-toast.big{font-size:clamp(22px,7vw,32px);color:var(--gold)}
.dd-toast.long{font-size:clamp(15px,4.6vw,20px)}
.dd-toast.big.long{font-size:clamp(17px,5.4vw,26px)}
@keyframes ddUp{0%{opacity:0;transform:translate(-50%,10px) scale(.7)}18%{opacity:1;transform:translate(-50%,0) scale(1.08)}100%{opacity:0;transform:translate(-50%,-64px) scale(1)}}

/* ---------- under the well: quest, fury, burn ---------- */
.dd-quest{flex:none;height:22px;line-height:20px;padding:0 10px;border-radius:7px;background:rgba(17,13,36,.8);border:1px solid rgba(181,148,255,.42);font-size:12px;color:#e9e3fa;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dd-quest b{font:800 9.5px 'Exo 2',sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--lav);margin-right:6px}
.dd-quest em{font-style:normal;color:var(--gold);font-weight:700;margin-left:4px}
.dd-under{flex:none;display:grid;grid-template-columns:1fr auto;gap:7px;height:36px}
.dd-fury{position:relative;height:100%;border-radius:9px;border:1.5px solid rgba(255,160,60,.6);background:#1a0d06;overflow:hidden;font:800 10.5px 'Exo 2',sans-serif;letter-spacing:.2em;text-transform:uppercase;color:#ffe3bd;box-shadow:0 2px 0 #090614}
.dd-fury i{position:absolute;inset:0;transform-origin:left;transform:scaleX(0);background:linear-gradient(90deg,#ff3b2b,#ff8a1a,#ffd166);transition:transform .45s cubic-bezier(.2,.9,.3,1)}
.dd-fury span{position:relative;text-shadow:0 1px 0 rgba(0,0,0,.7)}
.dd-fury:disabled{cursor:default}
.dd-fury.ready{font-size:13px;color:#241000;border-color:#ffd166;animation:ddFury .7s ease-in-out infinite}
.dd-fury.ready span{text-shadow:none}
@keyframes ddFury{50%{box-shadow:0 0 26px rgba(255,138,26,.95),0 0 0 2px #ffd166 inset;transform:scale(1.012)}}
.pw.fire{--oc:9px;display:flex;align-items:center;gap:6px;height:100%;padding:0 14px 0 10px;font:800 12px 'Exo 2',sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#fff3d0;filter:drop-shadow(0 2px 0 #090614)}
.pw.fire::before{background:linear-gradient(#ffd166,#ff8a1a)}
.pw.fire::after{background:linear-gradient(#b3360e,#6b1a05)}
.pw.fire svg{width:18px;height:18px;stroke:#ffd166}
.pw.fire:not(:disabled){animation:ddPulse 1s ease-in-out infinite}
@keyframes ddPulse{50%{filter:drop-shadow(0 0 10px rgba(255,150,40,.95))}}

/* ---------- controls: big purple eight-sided buttons ---------- */
.dd-pad{flex:none;display:grid;grid-template-columns:repeat(5,1fr);gap:7px;padding-bottom:5px;filter:drop-shadow(0 5px 0 #1a0c47) drop-shadow(0 8px 8px rgba(0,0,0,.5))}
.dd-pad button{--oc:12px;height:56px;display:grid;place-items:center;color:#fff}
.dd-pad button::before{background:linear-gradient(#d5b4ff,#7a45e6)}
.dd-pad button::after{inset:3px;--oc:10px;background:linear-gradient(#8a59f5,#5a2bcf 55%,#4520a8)}
.dd-pad button:active{transform:translateY(4px)}
.dd-pad svg{width:28px;height:28px;stroke-width:3;filter:drop-shadow(0 2px 0 rgba(40,10,110,.8))}
.dd-pad svg .solid{fill:#fff;stroke-width:2}
.dd-hint{flex:none;text-align:center;color:#d6cff0;font-size:12px;padding:2px 0;white-space:nowrap;text-shadow:0 1px 2px #000}
.dd-hint b{color:#fff;font-weight:600}
@media (hover:hover) and (pointer:fine){.dd-pad{display:none}}
.dd.gest .dd-pad{display:none}
.dd-stage{touch-action:none}
@media (hover:hover) and (pointer:fine){.dd-touch{display:none}}
@media (hover:none),(pointer:coarse){.dd-keys,.dd-hint{display:none}}
@media (max-height:620px){.dd-pad button{height:46px}.dd-under{height:32px}}
@view-transition{navigation:auto}

/* ---------- menu, game over, pause: cover the whole game column ---------- */
.dd-over{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:9px;text-align:center;padding:18px 18px 22px;overflow-y:auto;
  background:linear-gradient(rgba(14,8,36,.8),rgba(9,5,22,.93) 45%),url(/assets/play/dd/bg.webp) center top/cover no-repeat}
.dd-over[hidden]{display:none}
.dd-hero{position:relative;width:min(350px,92%);flex:none;aspect-ratio:350/300;margin-bottom:-4px}
.dd-hero-dragon{position:absolute;left:14%;top:0;width:72%;aspect-ratio:680/568;background:url(/assets/play/dd/dragon.webp) 0 0/100% 100% no-repeat;filter:hue-rotate(var(--hue,0deg)) drop-shadow(0 8px 12px rgba(0,0,0,.6));animation:ddIdle 3.4s ease-in-out infinite;transform-origin:70% 96%}
.dd-hero-logo{position:absolute;left:0;bottom:0;width:100%;height:auto;filter:drop-shadow(0 8px 14px rgba(0,0,0,.65))}
.dd-pause-logo{width:min(280px,74%);height:auto;filter:drop-shadow(0 8px 14px rgba(0,0,0,.65))}
.dd-over-logo{flex:none;width:200px;height:auto;filter:drop-shadow(0 6px 12px rgba(0,0,0,.65))}
@media (max-height:600px){.dd-over-logo{display:none}}
.dd-eyebrow{font:700 11px 'Exo 2',sans-serif;letter-spacing:.24em;text-transform:uppercase;color:var(--lav)}
.dd-over h2{font:italic 900 clamp(38px,11vw,58px)/1 'Exo 2',sans-serif;text-transform:uppercase;background:linear-gradient(90deg,#ffd166,#ff8a1a 55%,#ff3b2b);-webkit-background-clip:text;background-clip:text;color:transparent;padding:0 .12em;filter:drop-shadow(0 4px 18px rgba(255,90,30,.4))}
.dd-pitch{max-width:34ch;color:#ece6fb;font-size:15px}
.dd-pitch b{color:var(--gold)}
.dd-how{list-style:none;display:grid;gap:4px;color:var(--mute);font-size:13px;margin-top:4px;padding-top:10px;border-top:1px solid var(--line)}
.dd-how b{color:#fff}
.dd-btn{flex:none;padding:15px 50px;border-radius:12px;background:linear-gradient(#ffdf7a,#ffb02e);color:#3a2200;font:900 16px 'Exo 2',sans-serif;letter-spacing:.14em;text-transform:uppercase;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -4px 0 #d98a12,0 5px 0 #7a4a00,0 14px 28px rgba(255,170,40,.35)}
.dd-btn:active{transform:translateY(4px);box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -3px 0 #d98a12,0 1px 0 #7a4a00}
.dd-best{color:var(--mute);font-size:13px}.dd-best b{color:#fff}
.dd-link{color:#cfc7ea;font-size:13px;text-decoration:underline;text-underline-offset:4px}
button.dd-link{background:none;border:0;cursor:pointer}
.dd-daily{font-size:12.5px;color:#9be7b4;margin:0}
.dd-skins{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;flex:none}
.dd-skin{display:flex;flex-direction:column;align-items:center;gap:1px;width:58px;padding:4px 2px 4px;border-radius:10px;border:1.5px solid var(--line);background:rgba(17,13,36,.85);font:700 10px Inter,sans-serif;color:var(--mute)}
.dd-skin i{display:block;width:48px;height:40px;background:url(/assets/play/dd/dragon-icon.webp) center/contain no-repeat;filter:hue-rotate(var(--hue,0deg))}
.dd-skin.on{border-color:var(--gold);color:#fff;box-shadow:0 0 12px rgba(255,209,102,.5)}
.dd-skin.locked i{filter:grayscale(1) brightness(.45)}
.dd-skin:disabled{cursor:default}

/* ---------- bigger screens ---------- */
/* ---------- phones: the board takes the full width; score, level and next pieces sit in a strip above it, powers move down beside Burn ---------- */
@media (max-width:699px){
  .dd-logo{display:none}
  .dd-stage{display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr;justify-items:center;align-items:center;gap:5px}
  .dd-left{display:none}
  .dd-side{grid-row:1;grid-column:1;width:100%;height:46px;flex-direction:row;gap:5px}
  .dd-side .pan{flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:3px}
  .dd-side .dd-score{flex:1.2 1 0}
  .dd-side .dd-score b{font-size:20px}
  .dd-side .pan:nth-child(2),.dd-side .pan:nth-child(3),.dd-side .dd-eggs{display:none}
  .dd-side .dd-next{flex:1.9 1 0}
  .dd-next small{display:none}
  .dd-next canvas{left:6px;top:5px;width:calc(100% - 12px);height:calc(100% - 10px)}
  .dd-sys{width:36px;grid-template-columns:1fr;gap:4px}
  .dd-ico{height:21px;border-radius:7px}
  .dd-frame{grid-row:2;grid-column:1}
  .dd-under{grid-template-columns:auto auto auto 1fr auto;gap:6px;height:44px}
  .dd-under .pw:not(.fire){width:44px;height:44px;filter:drop-shadow(0 3px 0 #090614)}
  .dd-under .pw:not(.fire) span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .dd-under .pw svg.ic{width:28px;height:28px}
  .dd-pad button{height:50px}
}
@media (min-width:700px){
  .dd-jackpot{height:40px;margin:0 12px}.dd-jackpot small{font-size:9.5px}.dd-jackpot b{font-size:21px}
  .dd{gap:8px;padding:10px 10px 12px;max-width:700px}
  .dd-top{height:40px}.dd-lv,.dd-trophy{height:38px}.dd-face{width:31px;height:31px}.dd-lv span{font-size:14px}.dd-lvbar{width:70px;height:6px}.dd-trophy{font-size:15px}.dd-trophy svg{width:20px;height:20px}
  .dd-stage{gap:9px}
  .dd-left{width:74px;gap:12px}.dd-left .pw{width:74px;height:74px;--oc:14px}.pw svg.ic{width:44px;height:44px}.pw b{min-width:24px;height:24px;font-size:13.5px;line-height:21px;right:-6px;bottom:-6px}
  .dd-side{width:112px;gap:7px}.pan{--oc:9px;padding:7px 4px 9px}.pan small{font-size:11px}.pan b{font-size:25px}.pan b.long{font-size:19px}.pan b.xl{font-size:16px}.dd-eggs b{font-size:20px}
  .dd-next canvas{top:26px;height:calc(100% - 34px)}
  .dd-ico{height:36px}.dd-ico svg{width:19px;height:19px}
  .dd-quest{height:26px;line-height:24px;font-size:13.5px}.dd-under{height:42px}.dd-fury{font-size:12px}.pw.fire{font-size:13.5px;padding:0 20px 0 14px}
  .dd-fuse span{font-size:12px}
}
@media (min-width:700px){.dd-over{background:linear-gradient(rgba(14,8,36,.72),rgba(9,5,22,.9) 55%),url(/assets/play/dd/bg-wide.webp) center/cover no-repeat}.dd-hero{width:400px}.dd-pitch{font-size:16.5px}}
@media (prefers-reduced-motion:reduce){.dd-dragon i,.dd-hero-dragon,.dd-dragon u{animation:none}}


/* ==========================================================================================
   Rendered art for everything on screen (the three.js stage draws the board; this dresses the rest).
   Plates are cut into nine pieces so their rims and corners keep their shape at any size.
   ========================================================================================== */
.dd.three{--ui:url(/assets/play/dd/ui/plate-navy.webp)}
/* panels: score, next, level, rows, hatched */
.dd.three .pan{filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.dd.three .pan::before{inset:0;clip-path:none;background:none;border:11px solid transparent;border-image:url(/assets/play/dd/ui/plate-navy.webp) 62 fill / 11px stretch}
.dd.three .pan::after{display:none}
.dd.three .pan small{color:#cfe0ff}
/* the hoard: a marquee with bulbs */
.dd.three .dd-jackpot{border:0;background:none;box-shadow:none;overflow:visible;isolation:isolate}
.dd.three .dd-jackpot::after{content:"";position:absolute;inset:-3px -2px;z-index:-1;border:13px solid transparent;border-image:url(/assets/play/dd/ui/plate-marquee.webp) 70 fill / 13px round;filter:drop-shadow(0 0 8px rgba(255,170,60,.55))}
.dd.three .dd-jackpot::before{inset:5px 9px;border-radius:8px}
/* level badge and best score */
.dd.three .dd-lv,.dd.three .dd-trophy{position:relative;isolation:isolate;border:0;background:none;box-shadow:none}
.dd.three .dd-lv::before,.dd.three .dd-trophy::before{content:"";position:absolute;inset:-1px;z-index:-1;border:10px solid transparent;border-image:url(/assets/play/dd/ui/plate-purple.webp) 66 fill / 10px stretch;filter:drop-shadow(0 2px 2px rgba(0,0,0,.55))}
.dd.three .dd-face{border:0;border-radius:50%;background:url(/assets/play/dd/ui/dragon.webp) center/118% no-repeat;filter:none;margin-left:1px}
.dd.three .dd-trophy{padding-left:30px}
.dd.three .dd-trophy svg{display:none}
.dd.three .dd-trophy::after{content:"";position:absolute;left:1px;top:50%;width:30px;height:30px;translate:0 -50%;background:url(/assets/play/dd/ui/trophy.webp) center/contain no-repeat}
/* round jewel buttons: the three powers, sound and pause */
.dd.three .pw:not(.fire)::before,.dd.three .pw:not(.fire)::after{display:none}
.dd.three .pw:not(.fire){background:center/contain no-repeat;filter:drop-shadow(0 3px 3px rgba(0,0,0,.6))}
.dd.three .pw:not(.fire) svg{display:none}
.dd.three #pBomb{background-image:url(/assets/play/dd/ui/bomb.webp)}
.dd.three #pSwap{background-image:url(/assets/play/dd/ui/swap.webp)}
.dd.three #pBolt{background-image:url(/assets/play/dd/ui/bolt.webp)}
.dd.three .pw:not(.fire):active{scale:.93}
.dd.three .pw:disabled{opacity:.55;filter:grayscale(.7) drop-shadow(0 3px 3px rgba(0,0,0,.6))}
.dd.three .dd-ico{border:0;background:center/contain no-repeat;box-shadow:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.6))}
.dd.three .dd-ico svg{display:none}
.dd.three #mute{background-image:url(/assets/play/dd/ui/sound.webp)}
.dd.three #mute[aria-pressed="true"]{filter:grayscale(1) brightness(.6) drop-shadow(0 2px 2px rgba(0,0,0,.6))}
.dd.three #pause{background-image:url(/assets/play/dd/ui/pause.webp)}
.dd.three .dd-ico:active{scale:.92}
/* quest plaque, fury bar, burn button */
.dd.three .dd-quest{position:relative;isolation:isolate;border:0;background:none;overflow:visible;height:24px;line-height:24px}
.dd.three .dd-quest::before{content:"";position:absolute;inset:-2px 0;z-index:-1;border:10px solid transparent;border-image:url(/assets/play/dd/ui/plate-stone.webp) 64 fill / 10px stretch}
.dd.three .dd-fury{border:0;background:none;box-shadow:none;isolation:isolate;overflow:visible}
.dd.three .dd-fury::before{content:"";position:absolute;inset:0;z-index:-2;border:13px solid transparent;border-image:url(/assets/play/dd/ui/plate-navy.webp) 62 fill / 13px stretch;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.dd.three .dd-fury i{inset:6px 7px;border-radius:7px;z-index:-1;background:linear-gradient(90deg,#ff3b2b,#ff8a1a,#ffd166);box-shadow:0 0 10px rgba(255,140,40,.7)}
.dd.three .dd-fury.ready{animation:none;color:#fff;text-shadow:0 2px 0 #7a2d00}
.dd.three .dd-fury.ready::before{border-image-source:url(/assets/play/dd/ui/plate-fire.webp);border-image-slice:70 fill;animation:ddReady .7s ease-in-out infinite}
.dd.three .dd-fury.ready i{display:none}
.dd.three .dd-fury.ready span{text-shadow:0 2px 0 #7a2d00,0 0 8px rgba(255,220,120,.9)}
@keyframes ddReady{50%{filter:brightness(1.35) drop-shadow(0 0 14px rgba(255,170,60,.95))}}
.dd.three .pw.fire::before,.dd.three .pw.fire::after{display:none}
.dd.three .pw.fire{position:relative;isolation:isolate;color:#fff;text-shadow:0 2px 0 #7a2d00;filter:none}
.dd.three .pw.fire>svg{stroke:#fff3d0}
.dd.three .pw.fire span{position:relative}
.dd.three .pw.fire i.plate,.dd.three .pw.fire{--p:url(/assets/play/dd/ui/plate-fire.webp)}
.dd.three .pw.fire{background:none}
.dd.three .pw.fire:disabled{opacity:1}
.dd.three #fire{border:0}
.dd.three #fire::before{content:"";display:block;position:absolute;inset:0;z-index:-1;clip-path:none;background:none;border:13px solid transparent;border-image:url(/assets/play/dd/ui/plate-fire.webp) 70 fill / 13px stretch;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.dd.three #fire:disabled::before{filter:grayscale(.85) brightness(.55) drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.dd.three #fire:disabled{color:#cbbfae;animation:none}
.dd.three #fire:not(:disabled){animation:none}
.dd.three #fire:not(:disabled)::before{animation:ddReady 1s ease-in-out infinite}
/* the big buttons on the title, pause and game-over screens */
.dd.three .dd-btn{position:relative;isolation:isolate;background:none;box-shadow:none;border-radius:0;color:#3a2200;padding:17px 56px;text-shadow:0 1px 0 rgba(255,255,255,.5)}
.dd.three .dd-btn::before{content:"";position:absolute;inset:0;z-index:-1;border:18px solid transparent;border-image:url(/assets/play/dd/ui/plate-gold.webp) 72 fill / 18px stretch;filter:drop-shadow(0 4px 5px rgba(0,0,0,.6))}
.dd.three .dd-btn:active{transform:translateY(3px);box-shadow:none}
/* the board's frame: carved stone and gold with lights, and a glow that runs round it */
.dd.three .dd-frame{background:none;box-shadow:none;border-radius:0;border:var(--T,12px) solid transparent;border-image:url(/assets/play/dd/ui/frame.webp) 140 / calc(var(--T,12px) * 1.4) round;filter:drop-shadow(0 10px 16px rgba(0,0,0,.6))}
.dd.three .dd-frame::before{content:"";position:absolute;inset:calc(var(--T,12px) * -1);pointer-events:none;border:var(--T,12px) solid transparent;border-image:url(/assets/play/dd/ui/frame.webp) 140 / calc(var(--T,12px) * 1.4) round;filter:brightness(2) saturate(1.25);
  -webkit-mask:conic-gradient(from var(--spin), #000 0 9%, transparent 20% 50%, #000 50% 59%, transparent 70%);mask:conic-gradient(from var(--spin), #000 0 9%, transparent 20% 50%, #000 50% 59%, transparent 70%);animation:ddChase 2.6s linear infinite}
@property --spin{syntax:'<angle>';inherits:false;initial-value:0deg}
@keyframes ddChase{to{--spin:360deg}}
.dd.three .dd-frame.party::before{-webkit-mask:none;mask:none;animation:ddBlink .22s steps(2,jump-none) infinite}
@keyframes ddBlink{0%{opacity:.15}100%{opacity:1}}
.dd.three #well{box-shadow:none;border-radius:0}
.dd.three #well.danger{animation:none}
body.frenzy .dd.three #well{box-shadow:none}
@media (prefers-reduced-motion:reduce){.dd.three .dd-frame::before{animation:none}}
/* things for sale: a gold pill, smaller than Play, so it is easy to find and easy to ignore */
.dd-buy{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:9px 16px;border-radius:999px;border:1.5px solid #ffcf5a;background:linear-gradient(180deg,rgba(255,207,90,.2),rgba(255,140,30,.12));color:#ffe6a3;font:700 13px Inter,sans-serif;cursor:pointer}
.dd-buy:hover{background:linear-gradient(180deg,rgba(255,207,90,.32),rgba(255,140,30,.2));color:#fff}
.dd-buy:disabled{opacity:.6;cursor:default}
.dd-buy[hidden]{display:none}
.dd-thanks{margin:2px 0;padding:8px 14px;border-radius:10px;background:rgba(61,220,132,.14);color:#b8f5cf;font:600 14px Inter,sans-serif}
