/* Duel stage: fixed to the viewport, never scrolls. Positions come from duel/layout.js. */
body[data-page=duel]{overflow:hidden}
body[data-page=duel] .shell>header,body[data-page=duel] .shell>footer{display:none}
body[data-page=duel] main{max-width:none;padding:0;min-height:0}
#duel{position:fixed;inset:0}
.ds{--teal:#3fd1b5;--teal-deep:#14796a;--gold:#f2c14e;--red:#ff7a6b;--felt-ink:#e8efe9;--felt-muted:#9fb8ae;position:absolute;inset:0;overflow:hidden;overflow:clip;color:var(--felt-ink);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.ds>div{position:absolute;inset:0;pointer-events:none}
.ds>div>*{pointer-events:auto}
.ds-table{background:radial-gradient(ellipse at 50% 46%,#22503f 0%,#16372d 52%,#0b1d18 100%)}

/* HUD sits under the cards: an enlarged hand card must never slide beneath a panel (and lose its hover). */
.ds-zones{z-index:1}.ds-hud{z-index:2}.ds-cards{z-index:3}.ds-badges{z-index:4}.ds-arrow{z-index:6}.ds-slots{z-index:7}.ds-preview{z-index:8}.ds-banner{z-index:9}.ds-splash{z-index:9}

/* zones & piles */
.ds-zone{position:absolute;border-radius:calc(var(--S)*.09);border:1px solid #ffffff14;background:#ffffff06;transition:border-color .2s,box-shadow .2s,background .2s}
.ds-zone.emz{border-style:dashed;border-color:#ffffff1f}
.ds-zone.field-spell:before{content:'F';position:absolute;inset:0;display:grid;place-items:center;font-size:calc(var(--S)*.36);font-weight:800;color:#ffffff12}
.ds-zone.legal{border-color:var(--teal);background:#3fd1b514;box-shadow:inset 0 0 0 1px var(--teal),0 0 calc(var(--S)*.18) #3fd1b566;animation:ds-pulse 1.4s ease-in-out infinite}
.ds-zone.placeable{border-color:var(--gold);background:#f2c14e1a;box-shadow:inset 0 0 0 1px var(--gold),0 0 calc(var(--S)*.18) #f2c14e55;cursor:pointer;animation:ds-pulse 1.4s ease-in-out infinite}
.ds-pile{position:absolute;padding:0;min-height:0;border:0;border-radius:calc(var(--S)*.09);background:none;box-shadow:none!important;cursor:pointer}
.ds-pile.empty{border:1px dashed #ffffff1a}
.ds-sheet{position:absolute;left:calc((100% - var(--card-w))/2);top:calc((100% - var(--card-h))/2);width:var(--card-w);height:var(--card-h);border-radius:calc(var(--card-h)*.045);background:#22342f;border:1px solid #00000080;box-shadow:0 1px 2px #0008}
.ds-sheet.back{background:#3b2a1c url(/card-back.svg) center/cover}
.ds-pile.playable .ds-sheet:last-child{box-shadow:0 0 0 var(--card-ring,1.4px) var(--teal),0 0 16px #3fd1b5aa}
.ds-activate{position:absolute;display:grid;place-items:center;border-radius:50%;border:2px dashed #7ff0d9;color:#bff5ea;font-weight:700;font-size:max(13px,calc(var(--S)*.16));opacity:0;transform:scale(.8);transition:opacity .2s,transform .2s;pointer-events:none!important}
.ds-activate.legal{opacity:1;transform:none}

/* cards */
.ds-card{position:absolute;left:0;top:0;width:var(--card-w);height:var(--card-h);padding:0;min-height:0;border:0;border-radius:calc(var(--card-h)*.045);background:#0d1f1a;transform-origin:50% 50%;transition:transform .36s cubic-bezier(.2,.8,.2,1),opacity .28s,box-shadow .2s;box-shadow:0 2px 6px #0008;touch-action:none;cursor:pointer}
.ds-card:hover:not(:disabled){box-shadow:0 2px 6px #0008}
.ds-card img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit;pointer-events:none}
.ds-card.instant,.resizing .ds-card{transition:none}
.ds-card.leaving{opacity:0;pointer-events:none}
.ds-card.playable,.ds-card.playable:hover:not(:disabled){box-shadow:0 0 0 var(--card-ring,1.4px) var(--teal),0 0 18px #3fd1b5aa}
.ds-card.selectable,.ds-card.selectable:hover:not(:disabled){box-shadow:0 0 0 var(--card-ring,1.4px) #f2c14eaa,0 0 12px #f2c14e55}
.ds-card.selected,.ds-card.selected:hover:not(:disabled){box-shadow:0 0 0 calc(var(--card-ring,1.4px)*1.4) var(--gold),0 0 22px #f2c14ecc}
.ds-card.set img{filter:brightness(.55) saturate(.7)}
.ds-card.set:after{content:'';position:absolute;inset:0;border-radius:inherit;background:repeating-linear-gradient(135deg,#ffffff10 0 6px,transparent 6px 12px)}
.ds-card.dragging{outline:none!important;will-change:transform;transition:box-shadow .2s;z-index:1000!important;cursor:grabbing;box-shadow:0 34px 60px #000a,0 0 0 var(--drag-ring,.6px) var(--teal)!important}
.ds-card.dragging.shrunk{opacity:.5}
.ds-card.pending{opacity:.9}
.ds-card:focus-visible{outline:3px solid var(--teal);outline-offset:2px}

/* badges */
.ds-stat,.ds-count,.ds-materials{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700;line-height:1;pointer-events:none!important}
.ds-stat{font-size:max(11px,calc(var(--S)*.13));padding:4px 7px;border-radius:7px;background:#081411d9;border:1px solid #ffffff22;color:#fff}
.ds-stat.op{color:#fff}
.ds-stat .stat-up{color:#72efb1}.ds-stat .stat-down{color:#ff827d}
.dd-head{cursor:move;touch-action:none}.dd-head button{cursor:pointer;touch-action:manipulation}
.ds-card.attack-raised{box-shadow:0 30px 26px -5px #000c,0 9px 12px #0008!important}
.fx-damage-source{position:absolute;left:50%;top:38%;transform:translateX(-50%);padding:8px 14px;border:1px solid #ff847b;border-radius:10px;background:#251515ed;color:#fff;display:flex;align-items:center;gap:10px}.fx-damage-source img{width:38px;height:55px;object-fit:contain}
.ds-count{font-size:max(12px,calc(var(--S)*.14));min-width:2.2em;text-align:center;padding:4px 7px;border-radius:999px;background:#081411e6;border:1px solid #ffffff2a}
.ds-materials{transform:translate(-100%,0);font-size:max(11px,calc(var(--S)*.12));padding:3px 6px;border-radius:6px;background:#f2c14e;color:#2a1d05}

/* HUD */
.ds-player{position:absolute;display:flex;flex-direction:column;justify-content:center;gap:8px;padding:12px 16px;border-radius:16px;background:#09181499;border:1px solid #ffffff17;transition:border-color .25s,box-shadow .25s}
.ds-player.active{border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal),0 0 24px #3fd1b533}
.ds-player.op.legal{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red),0 0 28px #ff7a6b66}
.ds-ident{display:flex;align-items:center;gap:10px;min-width:0}
.ds-avatar{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--teal-deep);font-weight:700;font-size:15px}
.ds-player.op .ds-avatar{background:#8a3d2c}
.ds-name{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ds-life{position:relative;display:flex;align-items:baseline;gap:8px}
.ds-lp-label{font-size:12px;letter-spacing:1px;color:var(--felt-muted);font-weight:600}
.ds-lp{font-size:clamp(22px,calc(var(--S)*.3),40px);font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.ds-lp-diff{position:absolute;left:55%;top:-8px;font-size:22px;font-weight:800;animation:ds-float 1.5s ease-out forwards;pointer-events:none}
.ds-lp-diff.loss{color:var(--red)}.ds-lp-diff.gain{color:#7be0a8}
.ds-phase{position:absolute;display:flex;flex-direction:column;justify-content:center;gap:10px}
.ds-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.ds-steps span{font-size:12px;color:#7f978e;padding:3px 0;border-radius:6px;white-space:nowrap;text-align:center}
.ds-steps span.now{background:var(--teal-deep);color:#fff;font-weight:700}
.ds-phase-actions{display:flex;flex-direction:column;gap:8px}
.ds-end{min-height:48px;font-size:16px;font-weight:700;border-radius:999px;background:#ffffff12;color:var(--felt-ink);border:1px solid #ffffff2e}
.ds-end:hover:not(:disabled){background:#ffffff22;border-color:#ffffff55}
.ds-end.minor{min-height:34px;font-size:13px;font-weight:600;background:transparent;border-color:transparent;color:var(--felt-muted)}
.ds-end.minor:hover:not(:disabled){background:#ffffff12;border-color:transparent;color:var(--felt-ink)}
.ds-end.primary{background:linear-gradient(#f3c862,#d4972a);color:#2a1d05;border-color:#f6d27b;box-shadow:0 6px 18px #d4972a55}
.ds-end.primary:hover:not(:disabled){background:linear-gradient(#f7d47c,#dda238);border-color:#fff0c2}
.ds-wait{display:block;text-align:center;font-size:15px;color:var(--felt-muted);padding:12px;border-radius:999px;border:1px dashed #ffffff26}
.ds-timer{text-align:center;font-size:14px;color:var(--felt-muted);font-variant-numeric:tabular-nums;min-height:1em}
.ds-timer.urgent{color:var(--red);font-weight:700}
.ds-menu-button{position:absolute;width:44px;height:44px;min-height:44px;padding:0;border-radius:12px;background:#09181499;color:var(--felt-ink);border:1px solid #ffffff22;font-size:18px}
.ds-menu{position:absolute;z-index:12;display:flex;flex-direction:column;min-width:180px;padding:6px;border-radius:12px;background:#10241f;border:1px solid #ffffff22;box-shadow:0 18px 40px #0009}
.ds-menu button{background:transparent;border:0;color:var(--felt-ink);text-align:left;font-size:15px}
.ds-menu button:hover:not(:disabled){background:#ffffff14;box-shadow:none}
.portrait .ds-player{flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;border-radius:12px}
.portrait .ds-life{margin-left:auto}
.portrait .ds-lp{font-size:22px}
.portrait .ds-avatar{width:28px;height:28px;font-size:13px}
.portrait .ds-phase{flex-direction:row;align-items:center;gap:8px}
.portrait .ds-steps{display:flex}
.portrait .ds-steps span:not(.now){display:none}
.portrait .ds-steps span.now{padding:6px 10px;font-size:13px}
.portrait .ds-phase-actions{flex:1;flex-direction:row;justify-content:flex-end;gap:6px}
.portrait .ds-end{min-height:42px;padding:6px 16px;font-size:15px;white-space:nowrap}
.portrait .ds-end.minor{padding:6px 8px;font-size:13px}
.portrait .ds-wait{flex:1;padding:8px 12px;font-size:14px}
.portrait .ds-timer{min-width:3em}
.portrait .ds-menu-button{position:static;width:36px;height:36px;min-height:36px;order:-1}
.portrait .ds-player.op .ds-ident{margin-right:auto}

/* card preview (desktop hover) */
.ds>.ds-preview{inset:auto}
.ds-preview{display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:16px;background:#091814e6;border:1px solid #ffffff1c;opacity:0;transform:translateX(-12px);transition:opacity .18s,transform .18s;pointer-events:none!important;overflow:hidden}
.ds-preview.show{opacity:1;transform:none}
.ds-preview img{width:100%;max-height:52%;object-fit:contain;border-radius:10px}
.ds-preview h3{margin:0;font-size:18px;line-height:1.35}
.ds-preview .ds-type{margin:0;font-size:13px;line-height:1.5;color:var(--felt-muted)}
.ds-preview .ds-desc{margin:0;flex:1;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow:hidden;-webkit-mask-image:linear-gradient(#000 85%,transparent);mask-image:linear-gradient(#000 85%,transparent)}

/* drag affordances */
.ds-arrow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.ds-arrow path{fill:none;stroke:var(--red);stroke-width:6;stroke-linecap:round;stroke-dasharray:14 10;filter:drop-shadow(0 2px 6px #000a);animation:ds-dash .5s linear infinite}
.ds-arrow circle{fill:var(--red)}
.ds-arrow.on-target path{stroke:#ffb4a9}
.ds-hot{position:absolute;border-radius:calc(var(--S)*.1);border:2px solid #7ff0d9;background:#3fd1b526;display:flex;align-items:flex-end;justify-content:center;animation:ds-pop .14s ease-out}
.ds-hot span{transform:translateY(55%);padding:4px 12px;border-radius:999px;background:var(--teal-deep);font-size:max(13px,calc(var(--S)*.14));font-weight:700;white-space:nowrap}
.ds-slot{position:absolute;display:flex;align-items:center;justify-content:center;background:#091814f2;border:2px solid #3fd1b58c;color:#dff7f1;font-weight:700;font-size:max(11px,min(15px,calc(var(--S)*.14)));line-height:1.2;transition:background .12s,border-color .12s;animation:ds-pop .14s ease-out}
.ds-slot:first-child{border-radius:calc(var(--S)*.09) calc(var(--S)*.09) 0 0}.ds-slot:last-child{border-radius:0 0 calc(var(--S)*.09) calc(var(--S)*.09)}.ds-slot+.ds-slot{border-top-width:1px}
.ds-slot.hot{background:var(--teal-deep);border-color:#7ff0d9;color:#fff}
.ds-slot-label{text-align:center;padding:0 4px;word-break:keep-all}

/* banners */
.ds>.ds-banner{inset:auto;left:50%;top:calc(var(--S)*.18)}
.ds-banner{transform:translate(-50%,-8px);opacity:0;transition:opacity .2s,transform .2s;pointer-events:none!important;padding:10px 22px;border-radius:999px;background:#091814eb;border:1px solid var(--gold);color:#ffe6a8;font-size:16px;font-weight:600;white-space:nowrap}
.ds-banner.show{opacity:1;transform:translate(-50%,0)}
.ds.portrait>.ds-banner{top:70px;font-size:14px}
.ds-splash{display:grid;place-items:center;opacity:0;pointer-events:none!important}
.ds-splash.show{animation:ds-splash 1.4s ease forwards}
.ds-splash strong{font-size:clamp(36px,7vw,84px);font-weight:900;letter-spacing:-2px;color:#fff;text-shadow:0 6px 30px #0009,0 0 40px #3fd1b599}

/* event cues (duel/fx.js) */
.ds-fx{z-index:5}
.ds-fx>*{position:absolute;pointer-events:none!important}
.ds.animating .ds-cards>*,.ds.animating .ds-zones>*,.ds.animating .ds-end{pointer-events:none}
.ds-chain{position:absolute;transform:translate(-30%,-30%);min-width:1.7em;height:1.7em;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffe7a3,#d4972a);color:#2a1d05;border:2px solid #fff3cf;font-weight:900;font-size:max(13px,calc(var(--S)*.17));box-shadow:0 0 14px #f2c14ecc;pointer-events:none!important}
.fx-impact{border-radius:50%;border:3px solid #ffd1c8;box-shadow:0 0 24px #ff7a6b,inset 0 0 18px #ff7a6b}
.fx-burst{border-radius:50%;border:2px solid #7ff0d9;box-shadow:0 0 22px #3fd1b5,inset 0 0 14px #3fd1b5}
.fx-reticle{border-radius:50%;border:2px solid var(--red);box-shadow:0 0 16px #ff7a6baa,inset 0 0 10px #ff7a6b66}
.fx-reticle:before,.fx-reticle:after{content:'';position:absolute;left:50%;top:50%;background:var(--red);transform:translate(-50%,-50%)}
.fx-reticle:before{width:130%;height:2px}.fx-reticle:after{width:2px;height:130%}
.fx-reveal{border-radius:calc(var(--card-h)*.06);box-shadow:0 30px 70px #000c,0 0 0 calc(var(--card-ring,1.4px)*1.4) var(--gold),0 0 40px #f2c14e99}
.fx-reveal img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.fx-reveal .fx-chain{position:absolute;left:-14px;top:-14px;width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffe7a3,#d4972a);color:#2a1d05;border:2px solid #fff3cf;font-size:22px;font-weight:900}
.fx-shatter{left:0;top:0;width:var(--card-w);height:var(--card-h);transform-origin:50% 50%}
.fx-shard{position:absolute;inset:0;background-size:100% 100%;border-radius:calc(var(--card-h)*.045)}

/* result */
.ds-result{position:absolute;inset:0;z-index:11;display:none;place-items:center;background:#030a0899}
.ds-result.show{display:grid;animation:ds-fade .35s ease-out}
.ds-result-box{text-align:center;padding:36px 48px;margin:16px;border-radius:24px;background:#10241f;border:1px solid #ffffff22;box-shadow:0 30px 80px #000a;color:var(--felt-ink)}
.ds-result-box strong{display:block;font-size:64px;font-weight:900;letter-spacing:-2px;line-height:1.1}
.ds-result-box.win strong{color:var(--gold)}.ds-result-box.loss strong{color:#ff9f92}
.ds-result-box p{margin:12px 0 24px;font-size:15px;color:var(--felt-muted)}
.ds-result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.ds-result .ghost{color:var(--felt-ink);border-color:#ffffff33}

/* dialog */
.dd-layer{position:absolute;inset:0;z-index:10;display:none;align-items:center;justify-content:center;padding:16px;pointer-events:none}
.dd-layer.open{display:flex}
.dd-layer.modal{pointer-events:auto;background:#030a08a6}
.dd-layer.peeked{align-items:flex-end}
.dd{position:relative;pointer-events:auto;display:flex;flex-direction:column;width:min(880px,100%);max-height:min(90%,780px);background:#f7f5ee;color:#1d2a27;border-radius:20px;box-shadow:0 30px 80px #0009;overflow:hidden}
.dd.enter{animation:ds-dialog .22s cubic-bezier(.2,.8,.2,1)}
.peeked .dd>:not(.dd-head){display:none}
.peeked .dd{width:auto;min-width:min(420px,100%)}
.dd-head{display:flex;align-items:center;gap:10px;height:auto;padding:16px 20px 12px;border-bottom:1px solid #e3e6df;background:transparent}
.dd-head h2{flex:1;margin:0;font-size:19px;line-height:1.4;letter-spacing:-.3px}
.dd-icon{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;font-size:22px;line-height:1;background:transparent}
.dd-peek{min-height:36px;padding:6px 14px;font-size:13px;white-space:nowrap}
.dd-card-view .dd-head{position:absolute;top:8px;right:8px;left:8px;padding:0;border:0;pointer-events:none}
.dd-card-view .dd-head>*{pointer-events:auto}
.dd-card-view .dd-head h2{visibility:hidden}
.dd-card-view .dd-detail{padding-top:28px}
.dd-detail{display:grid;grid-template-columns:minmax(150px,250px) minmax(0,1fr);gap:22px;padding:20px 22px;min-height:0}
.dd-art{width:100%;aspect-ratio:59/86;object-fit:cover;border-radius:12px;box-shadow:0 10px 26px #0004}
.dd-text{display:flex;flex-direction:column;gap:8px;min-height:0;max-height:min(52vh,370px);overflow:auto;padding-right:4px}
.dd-text h3{margin:0;font-size:22px;line-height:1.35;letter-spacing:-.4px}
.dd-type{margin:0;font-size:14px;line-height:1.5;color:#5f6f69}
.dd-desc{font-size:15.5px;line-height:1.8;white-space:pre-wrap;color:#24312d}
.dd-actions{display:flex;flex-wrap:wrap;gap:10px;padding:4px 22px 22px}
.dd-action{flex:1 1 180px;min-height:52px;font-size:16px;font-weight:650;border-radius:12px;background:#14796a;border-color:#14796a;color:#fff}
.dd-action:hover:not(:disabled){background:#0e6256;border-color:#0e6256}
.dd-action.quiet{background:transparent;color:#1d2a27;border-color:#cfd6cd}
.dd-action.quiet:hover:not(:disabled){background:#eef0ea;border-color:#14796a}
.dd-actions.grid .dd-action{flex:1 1 140px}
.dd-action.with-card{flex-basis:100%;display:flex;align-items:center;gap:14px;text-align:left;background:#fff;color:#1d2a27;border-color:#d8ddd5}
.dd-action.with-card:hover:not(:disabled){background:#f0f7f4;border-color:#14796a}
.dd-action.with-card img{width:44px;aspect-ratio:59/86;object-fit:cover;border-radius:4px}
.dd-action.with-card strong{display:block;font-size:15px;line-height:1.4}
.dd-action.with-card small{display:block;font-size:14px;color:#14796a;font-weight:600}
.dd-action.chip{flex:0 0 auto;min-height:44px;background:#fff;color:#1d2a27;border-color:#cfd6cd}
.dd-action.chip.selected{background:#14796a;border-color:#14796a;color:#fff}
.dd-action.primary{background:#d4972a;border-color:#d4972a;color:#1d1405}
.dd-action.primary:hover:not(:disabled){background:#c0861d;border-color:#c0861d}
.dd-select-body{flex:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);min-height:0;overflow:hidden}
.dd-select .dd-grid{overflow:auto;padding:16px 20px}
.dd-select .dd-detail{grid-template-columns:1fr;align-content:start;gap:14px;padding:16px;border-left:1px solid #e3e6df;overflow:auto}
.dd-select .dd-art{max-width:190px;justify-self:center}
.dd-select .dd-text{max-height:none;overflow:visible}
.dd-select .dd-text h3{font-size:18px}
.dd-select .dd-desc{font-size:14.5px;line-height:1.75}
.dd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:12px;align-content:start}
.dd-thumb{position:relative;display:flex;flex-direction:column;gap:5px;padding:6px;min-height:0;border-radius:12px;background:#fff;border:2px solid transparent;text-align:center}
.dd-thumb:hover:not(:disabled){border-color:#9fc9bd}
.dd-thumb img{width:100%;aspect-ratio:59/86;object-fit:cover;border-radius:6px}
.dd-thumb span{font-size:13px;line-height:1.4;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dd-thumb small{font-size:12px;color:#6c7974}
.dd-thumb.selected{border-color:#d4972a;background:#fff6df;box-shadow:0 0 0 2px #d4972a55}
.dd-thumb.playable{border-color:#14796a}
.dd-thumb input{width:100%;min-height:36px;text-align:center}
.dd-order{position:absolute;top:10px;left:10px;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#d4972a;color:#fff;font-size:14px}
.dd-footer{display:flex;align-items:center;gap:12px;padding:14px 20px;border-top:1px solid #e3e6df;background:#fbfaf6}
.dd-count{flex:1;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.dd-footer .dd-action{flex:0 0 auto;min-width:140px}
.dd-error{margin:0;padding:10px 20px;background:#fbe7e2;color:#8a3d2c;font-size:14px}
.dd-pile .dd-grid,.dd>.dd-grid{padding:16px 20px;overflow:auto}
.dd-log{padding:16px 22px;overflow:auto;font-size:14px;line-height:1.75}
.dd-log p{margin:0 0 2px}
.dd-search{margin:16px 20px 0}
.dd-empty{margin:0;padding:36px;text-align:center;color:#6c7974;font-size:15px}
@container duel (max-width:640px){
  .dd-layer{padding:10px}
  .dd{max-height:94%;border-radius:16px}
  .dd-head{padding:12px 14px 10px}.dd-head h2{font-size:17px}
  .dd-detail{grid-template-columns:110px minmax(0,1fr);gap:14px;padding:14px}
  .dd-text{max-height:42vh}.dd-text h3{font-size:18px}.dd-desc{font-size:14.5px;line-height:1.7}
  .dd-actions{padding:4px 14px 14px}.dd-action{flex-basis:130px;min-height:48px;font-size:15px}
  .dd-select-body{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
  .dd-select .dd-detail{order:-1;grid-template-columns:76px minmax(0,1fr);border-left:0;border-bottom:1px solid #e3e6df;max-height:32vh}
  .dd-select .dd-art{max-width:none}
  .dd-grid{grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:8px}
  .dd-footer{padding:10px 14px}.dd-footer .dd-action{min-width:110px}
}

@keyframes ds-pulse{50%{box-shadow:inset 0 0 0 1px currentColor,0 0 4px transparent}}
@keyframes ds-pop{from{opacity:0;transform:scale(.85)}}
@keyframes ds-dash{to{stroke-dashoffset:-24}}
@keyframes ds-float{0%{opacity:0;transform:translateY(6px)}15%{opacity:1}100%{opacity:0;transform:translateY(-30px)}}
@keyframes ds-splash{0%{opacity:0;transform:scale(.85)}15%{opacity:1;transform:scale(1)}70%{opacity:1}100%{opacity:0;transform:scale(1.04)}}
@keyframes ds-fade{from{opacity:0}}
@keyframes ds-dialog{from{opacity:0;transform:translateY(14px) scale(.98)}}

/* Fixed dialog sizes: hovering cards swaps text inside, never resizes the window. */
.dd.dd-select{height:min(90%,720px)}
.dd-select .dd-detail{height:100%;min-height:0}
.dd:not(.dd-select):not(.dd-dock) .dd-text{height:min(52vh,370px)}

/* Selection context: whose effect asks, and where the chosen card goes. */
.dd-context{display:flex;align-items:center;gap:12px;padding:10px 20px;background:#eef3ef;border-bottom:1px solid #e3e6df}
.dd-source{display:flex;align-items:center;gap:10px;min-width:0}
.dd-source strong{display:block;font-size:15px;line-height:1.3}
.dd-source small{display:block;font-size:13px;color:#5f6f69}
.dd-mini{width:36px;aspect-ratio:59/86;object-fit:cover;border-radius:4px;box-shadow:0 2px 6px #0003;flex:0 0 auto}
.dd-arrow{font-size:20px;color:#8a9a94}
.dd-outcome{padding:6px 12px;border-radius:999px;font-size:14px;font-weight:700;color:#fff;background:#5f6f69;white-space:nowrap}
.dd-outcome.o-hand,.dd-fate.o-hand,.dd-outcome.o-field,.dd-fate.o-field{background:#14796a}
.dd-outcome.o-destroy,.dd-fate.o-destroy,.dd-outcome.o-attack,.dd-fate.o-attack,.dd-outcome.o-target,.dd-fate.o-target,.dd-outcome.o-negate,.dd-fate.o-negate{background:#c2412d}
.dd-outcome.o-banish,.dd-fate.o-banish{background:#6b4fb3}
.dd-outcome.o-tribute,.dd-fate.o-tribute,.dd-outcome.o-material,.dd-fate.o-material,.dd-outcome.o-detach,.dd-fate.o-detach{background:#c0861d}
.dd-outcome.o-deck,.dd-fate.o-deck{background:#7a5a3a}
.dd-fate{position:absolute;left:6px;right:6px;top:38%;padding:4px 0;border-radius:6px;color:#fff;font-size:13px;background:#5f6f69;box-shadow:0 4px 12px #0005}
.dd-thumb.selected img{filter:brightness(.8)}

/* Reaction dock */
.dd-layer.dock{align-items:flex-end;padding-bottom:12px}
.dd.dd-dock{width:min(760px,100%);max-height:none;border-radius:18px}
.dd-dock .dd-head{padding:10px 16px 8px}
.dd-dock .dd-head h2{font-size:16px}
.dd-cause{display:flex;align-items:center;gap:10px;padding:8px 16px;background:#fbe9e5;border-bottom:1px solid #f0d6cf;font-size:14px}
.dd-cause.mine{background:#e5f2ee;border-color:#cfe6de}
.dd-cause strong{font-size:15px}
.dd-cause small{color:#5f6f69;font-size:13px}
.dd-who{padding:3px 8px;border-radius:999px;background:#c2412d;color:#fff;font-size:12px;font-weight:700}
.dd-cause.mine .dd-who{background:#14796a}
.dd-cause .dd-mini{width:28px}
.dd-dock-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 16px}
.dd-chip{display:flex;align-items:center;gap:10px;min-height:56px;padding:6px 14px 6px 6px;border-radius:12px;background:#fff;border:1px solid #d8ddd5;color:#1d2a27;text-align:left;flex:1 1 220px}
.dd-chip:hover:not(:disabled){border-color:#14796a;background:#f0f7f4}
.dd-chip.static{flex:1 1 260px;cursor:default}
.dd-chip strong{display:block;font-size:15px;line-height:1.3}
.dd-chip small{display:block;font-size:13px;color:#14796a;font-weight:600}
.dd-dock-row .dd-action{flex:0 0 auto;min-width:110px;min-height:48px}
.dd-dock-text{margin:0;padding:0 16px 12px;height:3.4em;overflow:hidden;font-size:14px;line-height:1.7;color:#3b4844;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.peeked .dd.dd-dock>:not(.dd-head){display:none}
@container duel (max-width:640px){
  .dd-context{padding:8px 14px;gap:8px}.dd-outcome{font-size:13px;padding:5px 10px}
  .dd-chip{flex-basis:100%}.dd-dock-row .dd-action{flex:1 1 0}
}

/* First-player mini game */
.first-pick{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:16px;background:radial-gradient(ellipse at 50% 46%,#22503fee 0%,#0b1d18f5 100%);color:#e8efe9}
.fp-panel{width:min(520px,100%);text-align:center}
.fp-panel.enter{animation:ds-dialog .25s ease-out}
.fp-eyebrow{margin:0 0 18px;font-size:13px;letter-spacing:2px;color:#9fb8ae;font-weight:700}
.fp-arena{display:flex;align-items:center;justify-content:center;gap:clamp(16px,6vw,48px);margin-bottom:22px}
.fp-side{display:flex;flex-direction:column;align-items:center;gap:10px;min-width:110px}
.fp-side strong{font-size:16px;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fp-hand{display:grid;place-items:center;width:clamp(84px,22vw,120px);aspect-ratio:1;border-radius:50%;background:#ffffff10;border:2px solid #ffffff26;font-size:clamp(40px,11vw,60px)}
.fp-hand.waiting{animation:fp-shake .9s ease-in-out infinite;color:#ffffff66}
.fp-side.them .fp-hand{border-color:#ff7a6b66}.fp-side.me .fp-hand{border-color:#3fd1b588}
.fp-arena.revealed .fp-hand:not(.waiting){animation:fp-reveal .45s cubic-bezier(.2,.8,.2,1)}
.fp-vs{font-size:20px;font-weight:900;font-style:italic;color:#9fb8ae}
.fp-picks{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.fp-pick{display:flex;flex-direction:column;align-items:center;gap:6px;width:110px;padding:14px 8px;border-radius:16px;background:#ffffff12;border:1px solid #ffffff2e;color:#e8efe9;font-size:15px;font-weight:600;transition:transform .15s,background .15s}
.fp-pick:hover:not(:disabled){transform:translateY(-4px);background:#ffffff22;border-color:#3fd1b5}
.fp-pick.chosen{background:#14796a;border-color:#7ff0d9;opacity:1}
.fp-icon{font-size:40px;line-height:1}
.fp-result{margin:4px 0 16px;font-size:clamp(28px,7vw,40px);font-weight:900}
.fp-result.win{color:#f2c14e}.fp-result.loss{color:#ff9f92}
.fp-choices{display:flex;justify-content:center;gap:12px}
.fp-choices button{min-width:140px;min-height:52px;font-size:17px}
.fp-choices .ghost{color:#e8efe9;border-color:#ffffff44}
.fp-note{margin:16px 0 0;font-size:15px;color:#9fb8ae}
.fp-note.tie{margin:0 0 14px;color:#ffe6a8}
.fp-timer{margin:14px 0 0;font-size:14px;color:#9fb8ae;font-variant-numeric:tabular-nums}
.fp-timer.urgent{color:#ff7a6b;font-weight:700}
@keyframes fp-shake{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}
@keyframes fp-reveal{from{transform:scale(.4) rotate(-20deg);opacity:0}}

/* Damage tiers (duel/fx.js damageBurst) */
.fx-damage{display:grid;place-items:center;font-weight:900;font-variant-numeric:tabular-nums;color:#ff6b57;text-shadow:0 3px 0 #3a0d07,0 0 18px #ff6b57aa;font-size:26px;white-space:nowrap}
.fx-damage.t3{font-size:32px}.fx-damage.t4{font-size:40px;color:#ff4a33}.fx-damage.t5{font-size:52px;color:#fff1d6;text-shadow:0 3px 0 #7a1405,0 0 28px #ff3b1f}
.fx-veil{background:radial-gradient(ellipse at center,transparent 35%,#ff2a0f88 100%)}
.fx-veil.t5{background:radial-gradient(ellipse at center,#ffffff55 0%,#ff2a0f99 70%)}

/* Floating card preview (no room for the side panel) and opponent thinking state */
.ds>.ds-preview{z-index:13}
.ds-preview.floating{max-height:70%;padding:12px}
.ds-preview.floating img{max-height:42vh}
.ds-player.op.thinking{border-color:#f2c14e88;animation:ds-think 1.6s ease-in-out infinite}
.ds-thinking{font-size:13px;font-weight:600;color:#ffe6a8}
.ds-thinking:after{content:'';display:inline-block;width:1.2em;text-align:left;animation:ds-dots 1.2s steps(4) infinite}
.portrait .ds-thinking{order:2;margin-left:auto}
@keyframes ds-think{50%{box-shadow:inset 0 0 0 1px #f2c14e,0 0 22px #f2c14e44}}
@keyframes ds-dots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}

/* Back to the pile list, attack line, log window */
.dd-back{min-height:36px;padding:6px 14px;border-radius:999px;background:#14796a;border-color:#14796a;color:#fff;font-size:14px;font-weight:700;pointer-events:auto}
.dd-back:hover:not(:disabled){background:#0e6256}
.dd-outcome{flex:0 0 auto;align-self:center;height:auto;line-height:1.3}
.dd-attack{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 16px;background:#fbe9e5;border-bottom:1px solid #f0d6cf}
.dd-attack.mine{background:#e5f2ee;border-color:#cfe6de}
.dd-attack-card{display:flex;align-items:center;gap:8px;min-width:0}
.dd-attack-card strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.dd-attack-icon{font-size:22px;color:#c2412d}
.dd.dd-text-view{width:min(560px,100%);max-height:min(70%,560px)}
.dd-text-view .dd-log{padding:14px 22px 22px}
@container duel (max-width:640px){.dd.dd-text-view{width:100%;max-height:100%;height:100%}.dd-attack-card strong{max-width:110px}}
.fp-pick.pop{animation:fp-pop .32s cubic-bezier(.2,.9,.3,1.4)}
@keyframes fp-pop{40%{transform:scale(1.12)}}
.ds-card.playable.set-only,.ds-card.playable.set-only:hover:not(:disabled){box-shadow:0 0 0 var(--card-ring,1.4px) #3fd1b566,0 2px 6px #0008}

/* Component roots must not inherit the full-screen sizing of stage layers. */
.ds>.ds-menu{inset:auto;width:min(280px,calc(100% - 24px));min-width:0;max-height:calc(100% - 24px);overflow:auto;padding:10px;gap:4px}
.ds-volume{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px;color:var(--felt-muted);font-size:13px}
.ds-volume input{grid-column:1/-1;width:100%;min-height:28px;padding:0;accent-color:var(--teal)}
.ds-card{overflow:hidden}
.ds-card>img{position:absolute;inset:0;max-width:100%;max-height:100%;min-width:0;min-height:0}
.ds-card.effect-focus{outline:var(--card-ring,1.4px) solid var(--gold);outline-offset:var(--card-ring,1.4px);box-shadow:0 0 28px #f2c14ecc!important}
.dd-head{flex-shrink:0}.dd-footer{flex-shrink:0}
.dd-thumb{min-width:0;align-self:start;isolation:isolate;overflow:hidden}
.dd-thumb img{display:block;flex:none;height:auto;min-height:0;max-width:100%;pointer-events:none}
.dd-thumb>*{pointer-events:none}.dd-thumb input{pointer-events:auto}
.dd-select .dd-grid{grid-auto-rows:max-content;min-width:0;min-height:0;scroll-padding:16px}
.dd-select .dd-art{height:auto;min-height:0;max-height:100%;object-fit:contain}
.dd-layer.peeked .dd.dd-select{height:auto;min-height:0;max-height:25%;width:fit-content;min-width:0;max-width:100%}
.dd-layer.peeked .dd-head{border-bottom:0}.dd-layer.peeked .dd-head h2{max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dd-effect-text{display:block;margin-top:6px;font-size:13px;font-weight:400;line-height:1.6;white-space:pre-wrap;text-align:left}
.dd-action.blocked-action:disabled{opacity:1;background:#e2e5e0;color:#65716b;border-color:#c5cec6;box-shadow:inset 3px 0 #ad7954;cursor:not-allowed}
.dd-action:disabled .dd-effect-text{color:#855338}
.dd-trigger-text{padding:0 16px;margin:8px 0;max-height:20vh;overflow:auto;font-size:14px;white-space:pre-wrap}
.dd.dd-dock{max-height:70%;overflow:auto}.dd-chip{min-width:0}.dd-chip>span{min-width:0}.dd-chip small{white-space:pre-wrap;max-height:8em;overflow:auto}
@container duel (max-width:640px){
 .dd-select-body{grid-template-rows:minmax(0,1fr);position:relative}
 .dd-select .dd-detail{display:none}
 .dd-layer.peeked .dd.dd-select{height:auto;width:auto;max-height:25%}
 .dd-layer.peeked .dd-head h2{max-width:48vw}
 .ds>.ds-menu{padding:8px;max-height:calc(100% - 24px)}
}

.fx-transfer{position:absolute;left:0;top:0;width:var(--card-w);height:var(--card-h);transform-origin:50% 50%;filter:drop-shadow(0 8px 12px #0008)}
.fx-transfer img{display:block;width:100%;height:100%;object-fit:contain;border-radius:5px}

.ds-preview,.ds-preview *{pointer-events:none!important}
.dd-actions{overflow:auto;min-height:0}.dd-detail{flex-shrink:1}.dd-actions .dd-action{flex-shrink:0}

.ds{container-type:size;container-name:duel}
@container duel (max-width:640px){
 .dd-select-body{grid-template-rows:minmax(105px,.35fr) minmax(0,1fr)}
 .dd-select .dd-detail{display:grid;height:auto;max-height:none;overflow:hidden;padding:10px;gap:10px}
 .dd-select .dd-art{height:100%;max-height:125px;width:76px;object-fit:contain;align-self:start}
 .dd-select .dd-text{min-height:0;max-height:100%;overflow:auto}
 .dd-select .dd-text h3{font-size:15px}.dd-select .dd-type{font-size:12px}.dd-select .dd-desc{font-size:13px}
 .dd-head{gap:6px}.dd-peek{padding:6px 9px}
 .dd-layer.peeked .dd-head h2{max-width:48cqw}
 .dd:not(.dd-select):not(.dd-dock) .dd-text{height:auto;max-height:48cqh}
}

/* Keep felt beyond every shaken edge; individual cards settle independently. */
.ds{background:#0b1d18}.ds>.ds-table{inset:-64px}
.dd-footer .dd-action.primary:disabled{opacity:1;background:#e8d2a3;border-color:#e8d2a3;color:#82704c;filter:none;box-shadow:none}
.dd-trigger-summary{padding:0 16px;margin:10px 0 4px;font-size:15px;font-weight:750;color:#14796a}
.ds-counters{position:absolute;transform:translate(-50%,0);background:#493175;border:1px solid #c5a5ff;color:#fff;border-radius:999px;padding:3px 8px;font-size:max(11px,calc(var(--S)*.13));font-weight:800;pointer-events:none!important;box-shadow:0 2px 8px #0008}
.dd-live-counters{padding:6px 10px;background:#eee5fa;border-radius:8px;color:#573487;font-size:14px;font-weight:700}
.fx-negate{border:4px solid #ccbaff;border-radius:50%;background:#25163e88;box-shadow:0 0 32px #ab7aff,inset 0 0 24px #ab7aff;display:grid;place-items:center}
.fx-negate:before{content:'';position:absolute;width:115%;height:5px;background:#e1d4ff;transform:rotate(-45deg);box-shadow:0 0 12px #ad85ff}
.fx-negate span{position:absolute;bottom:-24px;padding:4px 12px;border-radius:999px;background:#342044;color:#f3e9ff;font-size:14px;font-weight:800;white-space:nowrap}

.ds-card.effect-disabled>img{filter:grayscale(.85) brightness(.65)}

.dd-select .dd-grid{overflow-anchor:none}

.fx-damage-source{max-width:calc(100% - 24px);box-sizing:border-box;z-index:3}.fx-damage-source img{flex-shrink:0}.fx-damage-source span{overflow-wrap:anywhere}

/* The last inspected card stays readable and accepts wheel/keyboard scrolling. */
.ds-preview.show,.ds-preview.show *{pointer-events:auto!important}
.ds-preview{max-height:calc(100% - 24px);overflow-y:auto;overscroll-behavior:contain}
.ds-preview img{flex-shrink:0}
.ds-preview .ds-desc{flex:none;overflow:visible;mask-image:none;-webkit-mask-image:none}
.ds-splash.order.show{animation-duration:2.6s}
.ds-splash.order strong{font-size:clamp(28px,5vw,64px);text-align:center;padding:20px}
.ds>.ds-history-layer{z-index:14;pointer-events:none}
.ds-history-button{position:absolute;left:12px;top:calc(50% - 22px);width:44px;height:44px;min-height:44px;padding:0;border-radius:12px;border:1px solid #a6d1bd55;background:#102c25ed;color:#dbeee3;font-size:27px;box-shadow:0 4px 16px #0004}
.ds-history-panel{position:absolute;left:64px;top:16px;bottom:16px;width:min(340px,calc(100% - 80px));display:flex;flex-direction:column;border:1px solid #729e8977;border-radius:16px;background:#0e241ff5;box-shadow:0 16px 50px #0009;opacity:0;visibility:hidden;transform:translateX(-24px);transition:transform .24s ease,opacity .2s ease,visibility .24s;pointer-events:none!important;overflow:hidden;color:#e8efe9}
.ds-history-layer.open .ds-history-panel{transform:none;opacity:1;visibility:visible;pointer-events:auto!important}
.ds-history-head{flex:none;height:auto;min-height:0;padding:14px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #ffffff18;background:transparent}
.ds-history-head h2{font-size:16px;margin:0;flex:1;letter-spacing:0}.ds-history-head>span{font-size:12px;color:#9fb8ae}.ds-history-head button{min-height:32px;width:32px;height:32px;padding:0;border:0;background:transparent;color:#d9ebe3;font-size:24px}
.ds-history-list{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:8px 14px 18px}
.ds-history-entry{display:flex;gap:10px;font-size:13px;line-height:1.65;padding:10px 0;margin:0;border-bottom:1px solid #ffffff0d;overflow-wrap:anywhere}.ds-history-number{flex:none;min-width:20px;color:#78a18d;font-variant-numeric:tabular-nums}.ds-history-empty{color:#9fb8ae;font-size:13px}
@media(max-width:600px){.ds-history-button{left:8px;width:38px;height:38px;min-height:38px}.ds-history-panel{left:54px;top:68px;bottom:14px;width:calc(100% - 64px)}}
@media(prefers-reduced-motion:reduce){.ds-history-panel{transition:none}}

@media(prefers-reduced-motion:reduce){.ds-splash.order.show{animation:ds-order-still 2.6s forwards}}
@keyframes ds-order-still{0%,90%{opacity:1;transform:none}100%{opacity:0;transform:none}}

.ds-history-button svg{display:block;margin:auto;width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.ds-splash *{pointer-events:none!important}

/* Compact announcements share the same scale as phase and turn messages. */
.ds-splash strong,.ds-splash.order strong{font-size:clamp(22px,3vw,38px);letter-spacing:-.5px;text-align:center;padding:14px 22px;border:1px solid #ffffff22;border-radius:14px;background:#092019d9}
.dd-layer.peeked .dd.dd-field-select>.dd-footer{display:flex;padding:10px 14px;gap:14px}
.dd-layer.peeked .dd.dd-field-select{max-height:36%;width:min(460px,100%)}
.ds-cards{perspective:1000px}.ds-card.flipping{z-index:950!important;will-change:rotate,scale;box-shadow:0 24px 35px #000b!important}.ds-card.flipping:after{display:none}.ds-card.flipping img{filter:none!important}

.dd-layer.peeked .dd.dd-field-select{display:grid;grid-template-columns:minmax(0,1fr) auto;width:min(740px,100%);max-height:22%}
.dd-layer.peeked .dd.dd-field-select .dd-head{padding:8px 12px;min-width:0;gap:8px}
.dd-layer.peeked .dd.dd-field-select .dd-head h2{font-size:14px;min-width:0}
.dd-layer.peeked .dd.dd-field-select>.dd-footer{padding:8px 12px;border-top:0;gap:10px}
.dd-layer.peeked .dd.dd-field-select .dd-footer .dd-action{min-width:90px;min-height:36px;padding:7px 12px;font-size:14px}
@media(max-width:600px){.dd-layer.peeked .dd.dd-field-select{grid-template-columns:1fr;max-height:28%}.dd-layer.peeked .dd.dd-field-select>.dd-footer{border-top:1px solid #e3e6df}}

.ds>.ds-history-layer{z-index:12}

.ds-history-body{min-width:0;flex:1}.ds-history-cards{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.ds-history-card{padding:0;width:45px;height:65px;min-height:0;border:0;border-radius:4px;background:transparent;overflow:hidden}.ds-history-card img{display:block;width:100%;height:100%;object-fit:cover}.fx-transfer{filter:drop-shadow(0 16px 12px #000a)}

.fx-reveal-name{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);width:max-content;max-width:280px;padding:7px 12px;border:1px solid #e0b958;border-radius:9px;background:#10241ff2;color:#fff2bf;font-size:14px;font-weight:700;text-align:center}

/* Keep controls above persistent card text; menus retain their own scroll area. */
.ds>.ds-menu{z-index:25}
.dd-who{white-space:nowrap;flex-shrink:0;word-break:keep-all}
.ds-phase-owner{display:block;margin-bottom:6px;font-size:13px;font-weight:500;letter-spacing:0;color:#a4aaa7;text-shadow:none}
.ds-preview{gap:9px;height:auto;max-height:calc(100% - 24px)}
.ds-preview img{height:auto;max-height:clamp(100px,24cqh,220px);width:100%;object-fit:contain;flex:0 0 auto}
.ds-preview.floating{max-height:calc(100% - 24px)}
.ds-preview.floating img{max-height:clamp(100px,24cqh,220px)}
.ds-preview .ds-desc{font-size:15px;line-height:1.75}
.ds-preview .ds-type{font-size:14px}
.ds-card.flipping img{transform-origin:50% 50%;backface-visibility:hidden;will-change:rotate}
.ds-history-group summary{cursor:pointer;line-height:1.6;color:#d3e3dc}
.ds-history-group[open] summary{margin-bottom:8px}
.ds-history-group .ds-history-cards{display:flex;flex-wrap:wrap}
@media(max-width:600px){
 .ds-card.playable,.ds-card.playable:hover:not(:disabled),.ds-card.playable.set-only,.ds-card.playable.set-only:hover:not(:disabled){box-shadow:0 0 0 var(--card-ring,.8px) var(--teal),0 0 9px #3fd1b566}
 .ds-card.selectable,.ds-card.selectable:hover:not(:disabled){box-shadow:0 0 0 var(--card-ring,1px) #f2c14eaa,0 0 8px #f2c14e55}
 .ds-card.selected,.ds-card.selected:hover:not(:disabled){box-shadow:0 0 0 calc(var(--card-ring,1px)*1.2) var(--gold),0 0 10px #f2c14e88}
 .ds-card.effect-focus{outline:var(--card-ring,1px) solid var(--gold);outline-offset:var(--card-ring,1px)}
 .ds-card:focus-visible{outline:1px solid var(--teal);outline-offset:1px}
 .ds-slot,.ds-hot{border-width:1px}
}
