/* ==========================================================================
   Karciane Pojedynki
   ========================================================================== */
.f-fire { --fc: #ff6a3d; --fc2: #7a1f12; --fc3: #ffc15a; }
.f-water { --fc: #4c9dff; --fc2: #10306b; --fc3: #a8e1ff; }
.f-nature { --fc: #35c97f; --fc2: #0f4a2c; --fc3: #b9f59a; }
.f-storm { --fc: #ffc93c; --fc2: #6b4a05; --fc3: #fff3a8; }
.f-neutral { --fc: #a9a3c7; --fc2: #3a3552; --fc3: #e4e0ff; }
:root { --dl-gold: linear-gradient(160deg, #fff0b8 0%, #d9ae4f 22%, #7c5a1c 48%, #e8c870 70%, #8a6526 100%); }

/* ---------- home tile ---------- */
.tile-duel .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 150, 60, 0.28), transparent 60%), radial-gradient(80% 60% at 50% 0, rgba(120, 90, 255, 0.22), transparent 70%), var(--bg-soft); display: grid; place-items: center; overflow: hidden; }
.art-duel { display: flex; gap: 10px; }
.art-duel span { position: relative; width: 70px; height: 98px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; padding: 3px; background: var(--dl-gold); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.5); transition: transform 0.45s var(--ease), box-shadow 0.45s; }
.art-duel span::after { content: ""; position: absolute; inset: 3px; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--fc), inset 0 -30px 30px -18px rgba(0, 0, 0, 0.7); pointer-events: none; }
.art-duel img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.art-duel span:nth-child(1) { transform: rotate(-12deg) translate(8px, 10px); }
.art-duel span:nth-child(2) { z-index: 1; transform: translateY(-4px) scale(1.08); }
.art-duel span:nth-child(3) { transform: rotate(12deg) translate(-8px, 10px); }
a.game-tile:hover .art-duel span:nth-child(1) { transform: rotate(-18deg) translate(-8px, 6px); }
a.game-tile:hover .art-duel span:nth-child(2) { transform: translateY(-12px) scale(1.14); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6), 0 0 34px rgba(255, 120, 60, 0.45); }
a.game-tile:hover .art-duel span:nth-child(3) { transform: rotate(18deg) translate(8px, 6px); }
.featured-grid { grid-template-columns: 1fr; margin-bottom: 16px; }
.featured-grid .game-tile { flex-direction: row; }
.featured-grid .game-tile-art { width: 42%; height: auto; min-height: 240px; }
.featured-grid .art-duel span { width: 104px; height: 146px; border-radius: 12px; padding: 4px; }
.featured-grid .art-duel img, .featured-grid .art-duel span::after { border-radius: 9px; }
.featured-grid .game-tile-body { justify-content: center; padding: 28px; }
.featured-grid .game-tile h3 { font-size: 32px; }
.featured-grid .game-tile p { font-size: 15px; max-width: 520px; }
.plan-dot.g-duel { background: #c9a6ff; }
.plan-order li.g-duel span { background: rgba(169, 112, 255, 0.3); color: #c9a6ff; }

/* ---------- crests ---------- */
.dl-crest { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; vertical-align: -0.35em; flex: none; }
.dl-crest svg { width: 100%; height: 100%; fill: var(--fc); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--fc) 60%, transparent)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.dl-crest svg .in { fill: var(--fc3); stroke: var(--fc3); opacity: 0.8; }
.dl-crest img { width: 100%; height: 100%; object-fit: contain; }
.dl-crest.tiny { width: 1.2em; height: 1.2em; vertical-align: -0.25em; }
.dl-crest.huge { width: 72px; height: 72px; }

/* ---------- art ---------- */
.dl-art { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--fc) 70%, white 10%), var(--fc2) 75%); }
.dl-art > i { font-style: normal; font-size: 2.4em; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.dl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* ---------- card ---------- */
.dl-card {
  --w: 112px;
  position: relative; flex: none; width: var(--w); aspect-ratio: 5 / 7;
  border-radius: calc(var(--w) * 0.075); padding: calc(var(--w) * 0.035);
  background: var(--dl-gold);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.6);
  font-size: calc(var(--w) * 0.1); color: #fff;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s, opacity 0.2s; user-select: none; -webkit-user-select: none;
}
.dl-card.t-spell { background: linear-gradient(160deg, #f2ecff 0%, #a79bd0 24%, #463b6e 50%, #c9bdf0 72%, #4a3f73 100%); }
.dl-card-frame { position: relative; height: 100%; display: flex; flex-direction: column; border-radius: calc(var(--w) * 0.05); overflow: hidden; background: linear-gradient(#1f222c, #111319); box-shadow: inset 0 0 0 calc(var(--w) * 0.012) color-mix(in srgb, var(--fc) 80%, #000); }
.dl-card .dl-art { flex: 0 0 57%; }
.dl-card.t-spell .dl-art { margin: 5% 6% 0; flex-basis: 52%; border-radius: 45% 45% 10% 10% / 35% 35% 10% 10%; box-shadow: 0 0 0 calc(var(--w) * 0.012) color-mix(in srgb, var(--fc) 70%, #000), inset 0 -10px 16px -8px rgba(0, 0, 0, 0.7); }
.dl-card-name { position: relative; z-index: 1; margin: -9% 3% 0; padding: 3% 4%; text-align: center; border-radius: calc(var(--w) * 0.03); background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 70%, #000), var(--fc2)); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.dl-card-name strong { display: block; font: 700 0.86em/1.15 var(--font-display); letter-spacing: 0.01em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-card.expansion .dl-card-name strong, .dl-card.f-dark .dl-card-name strong { white-space: normal; font-size: 0.8em; letter-spacing: 0; }
.dl-card-body { flex: 1; display: grid; place-items: center; padding: 3% 8% 17%; text-align: center; }
.dl-card-body small { color: #d9dbe4; font-size: 0.7em; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.dl-card-crest { position: absolute; top: 3%; right: 4%; width: 1.35em; height: 1.35em; padding: 0.12em; border-radius: 50%; background: rgba(10, 10, 14, 0.7); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.dl-cost, .dl-atk, .dl-hp { position: absolute; z-index: 2; display: grid; place-items: center; width: 1.9em; height: 1.9em; color: #fff; }
.dl-cost b, .dl-atk b, .dl-hp b { font: 700 1.15em/1 var(--font-display); text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 1px #000; }
.dl-cost { top: -3%; left: -4%; clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: radial-gradient(circle at 35% 30%, #cfe6ff, #3d8bff 45%, #123a91); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.dl-cost::before { content: ""; position: absolute; inset: 7%; clip-path: inherit; background: radial-gradient(circle at 35% 30%, #9cd0ff, #2a6fe6 55%, #0f3180); }
.dl-cost b { position: relative; }
.dl-card .dl-atk, .dl-card .dl-hp { bottom: -3%; }
.dl-atk { left: -4%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a0, #e0a526 50%, #7a4c07); box-shadow: 0 0 0 2px #2a1c05, 0 3px 6px rgba(0, 0, 0, 0.6); }
.dl-hp { right: -4%; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; background: radial-gradient(circle at 35% 30%, #ffb3a8, #d93b3b 50%, #6d0f0f); box-shadow: 0 0 0 2px #2a0707, 0 3px 6px rgba(0, 0, 0, 0.6); }
.dl-spell { position: absolute; z-index: 2; bottom: 1.5%; left: 50%; transform: translateX(-50%); padding: 0.15em 0.7em; border-radius: 999px; font: 700 0.58em var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: #efe9ff; background: linear-gradient(#5b4c93, #2d2452); box-shadow: 0 0 0 1px #b9adf0; }
.dl-card.big { --w: 190px; }
.dl-card[data-duel-pick] { cursor: pointer; }
.dl-card[data-duel-pick]:hover { transform: translateY(-10px) scale(1.04); box-shadow: 0 0 0 3px var(--accent), 0 0 34px color-mix(in srgb, var(--fc) 70%, transparent), 0 22px 40px rgba(0, 0, 0, 0.55); }
.dl-card.deal { animation: dl-deal 0.45s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }
.dl-card.picked { animation: dl-picked 0.35s ease-in forwards; }
@keyframes dl-deal { from { opacity: 0; transform: translateY(40px) rotateY(80deg) scale(0.8); } }
@keyframes dl-picked { to { opacity: 0; transform: translateY(-60px) scale(1.15); } }

/* ---------- hero power ---------- */
.dl-power { position: relative; flex: none; display: grid; justify-items: center; gap: 3px; width: 66px; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: default; }
.dl-power-face { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--fc) 75%, #fff 10%), var(--fc2) 88%); box-shadow: 0 0 0 3px #3a3f4c, inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); transition: transform 0.2s var(--ease), box-shadow 0.25s, filter 0.3s; }
.dl-power-face i { font-style: normal; font-size: 27px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.dl-power-img { width: 118%; height: 118%; margin: -9%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); pointer-events: none; }
.dl-power-cost { position: absolute; top: -5px; left: -5px; z-index: 2; width: 22px; height: 24px; display: grid; place-items: center; clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: radial-gradient(circle at 35% 30%, #cfe6ff, #3d8bff 45%, #123a91); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.dl-power-cost b { font: 700 13px/1 var(--font-display); color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.dl-power-name { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 10px/1.1 var(--font); letter-spacing: 0.02em; color: var(--muted); }
.dl-power.mine { cursor: pointer; }
.dl-power.mine:not(.ready):not(.selected) .dl-power-face { filter: saturate(0.55) brightness(0.72); }
.dl-power.ready .dl-power-face { box-shadow: 0 0 0 3px #3dff95, 0 0 18px rgba(61, 255, 149, 0.55), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); animation: dl-power-pulse 1.8s ease-in-out infinite; }
.dl-power.ready:hover .dl-power-face { transform: scale(1.1); }
.dl-power.selected .dl-power-face { transform: scale(1.12); animation: none; box-shadow: 0 0 0 3px #ffe07a, 0 0 24px rgba(255, 214, 110, 0.85), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); }
.dl-power.used .dl-power-face { filter: grayscale(0.9) brightness(0.55); animation: none; }
.dl-power.foe:not(.used) .dl-power-face { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc) 55%, #3a3f4c), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); }
.dl-power:focus-visible .dl-power-face { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes dl-power-pulse { 0%, 100% { box-shadow: 0 0 0 3px #3dff95, 0 0 12px rgba(61, 255, 149, 0.35), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); } 50% { box-shadow: 0 0 0 3px #3dff95, 0 0 24px rgba(61, 255, 149, 0.75), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.55); } }
.dl-float.power { font-size: 20px; color: #ffe9a8; -webkit-text-stroke: 1px #3a2600; letter-spacing: 0.03em; }

/* ---------- mulligan ---------- */
.dl-mull-note { margin: -6px 0 18px; text-align: center; color: var(--muted); font-size: 14px; }
.dl-mull-actions { display: flex; justify-content: center; margin-top: 24px; }
.dl-mull-slot { position: relative; display: grid; justify-items: center; gap: 10px; }
.dl-mull-slot[data-duel-mull] { cursor: pointer; }
.dl-mull-slot .dl-card { transition: transform 0.2s var(--ease), opacity 0.25s, filter 0.25s; }
.dl-mull-slot[data-duel-mull]:hover .dl-card { transform: translateY(-8px) scale(1.03); }
.dl-mull-slot.swap .dl-card { transform: translateY(8px) scale(0.93) rotate(-2deg); opacity: 0.5; filter: grayscale(0.75); }
.dl-mull-badge { padding: 3px 12px; border-radius: 999px; font: 700 12px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: #bff5d4; background: rgba(61, 255, 149, 0.12); border: 1px solid rgba(61, 255, 149, 0.4); }
.dl-mull-slot.swap .dl-mull-badge { color: #ffe9a8; background: rgba(255, 214, 110, 0.14); border-color: rgba(255, 214, 110, 0.55); }
.dl-mull-slot.coin .dl-mull-badge { color: var(--muted); background: transparent; border-color: var(--line-2); }
.dl-offer.kept .dl-card { opacity: 0.85; }

/* ---------- layout ---------- */
.mini-duel .mini-main { grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; padding: 8px 14px; max-width: 1480px; }
.mini-duel .mini-stage { justify-content: stretch; }
.dl-side { align-self: stretch; }
.dl-inspect { padding: 12px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-height: 120px; flex: 0 1 auto; border-bottom: 1px solid var(--line); }
.dl-inspect > small { color: var(--faint); text-align: center; }
.dl-inspect > .dl-inspect-placeholder { align-self: center; }
.dl-inspect .dl-card { --w: 180px; }
.dl-inspect-identity { flex: none; min-width: 0; text-align: center; }
.dl-inspect-art { position: relative; height: clamp(112px, 18dvh, 172px); overflow: hidden; border: 1px solid #b68d4f55; border-radius: 10px; background: radial-gradient(ellipse at center, color-mix(in srgb,var(--fc) 22%,#151b24),#0b1017); }
.dl-inspect-art > .dl-art { display: grid; width: 100%; height: 100%; background: transparent; }
.dl-inspect-art .dl-img { object-fit: contain; object-position: center; }
.dl-inspect-art .dl-inspect-crest { position: absolute; right: 8px; bottom: 8px; width: 24px; height: 24px; padding: 3px; border: 1px solid #d3b87966; border-radius: 50%; background: #0b111bde; }
.dl-inspect-identity h3 { margin: 10px 0 5px; color: #f5e7c8; font: 600 16px/1.3 var(--font-display); overflow-wrap: anywhere; }
.dl-inspect-meta { display: block; color: #aeb7c2; font-size: 11px; line-height: 1.5; }
.dl-inspect-stats { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.dl-inspect-stats > div { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 5px; border: 1px solid #bda06033; border-radius: 6px; background: #090f18a6; }
.dl-inspect-stats dt { color: #b6bec9; font-size: 10px; }
.dl-inspect-stats dd { margin: 0; font-size: 15px; font-weight: 800; color: #e2c580; }
.dl-inspect-stats .mana dd { color: #91c5ff; }.dl-inspect-stats .health dd { color: #ffb4a1; }
.dl-inspect-description { flex: 1 1 auto; min-height: 80px; max-height: 230px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bda06077 #111822; scrollbar-gutter: stable; border-top: 1px solid #bd9b5533; padding: 12px 5px 2px 0; text-align: left; }
.dl-inspect-description .dl-inspect-text { margin: 0; color: #eee5d4; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; user-select: text; }
.dl-inspect-rules { margin-top: 12px; }
.dl-inspect-rules summary { cursor: pointer; color: #d9bd83; font-size: 11px; line-height: 1.5; padding: 5px 0; }
.dl-inspect-rules summary span { display: inline-block; margin-left: 4px; padding: 0 5px; background: #bc96452b; border-radius: 4px; font-size: 10px; }
.dl-inspect-description .dl-keyword-note { margin: 10px 0; padding-left: 9px; border-left: 2px solid #bd9b5544; color: #c2c9d2; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; user-select: text; }
.dl-inspect-description:focus-visible,.dl-inspect-rules summary:focus-visible { outline: 2px solid #d6b36c; outline-offset: 3px; border-radius: 3px; }
.dl-side > [hidden] { display: none !important; }
.dl-side-tabs { flex: none; display: flex; gap: 4px; padding: 7px; border-bottom: 1px solid #bd9b552e; background: #090f1780; }
.dl-side-tabs button { flex: 1; min-width: 0; padding: 10px 4px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #9da7b6; font-size: 11px; font-weight: 700; }
.dl-side-tabs button[aria-pressed="true"] { background: linear-gradient(130deg,#b9914b33,#c8a66518); border-color: #c8a66555; color: #f0d79f; }
.dl-side-tabs button:focus-visible { outline: 2px solid #e0c68e; outline-offset: -2px; }
.dl-side-journal { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dl-log { list-style: none; margin: 0; padding: 0 14px 10px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); overflow: auto; }
.dl-log li:first-child { color: var(--text); }
.dl-concede { margin: auto 10px 10px; font-size: 12px; }

.dl-table {
  position: relative; isolation: isolate;
  height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(112px, 1fr) auto minmax(112px, 1fr) auto; gap: 6px;
  padding: 10px 12px; border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 50% 50%, rgba(255, 214, 150, 0.09), transparent 70%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 16px),
    linear-gradient(180deg, #1b1712, #14161d 48%, #14161d 52%, #1a1611);
  border: 1px solid rgba(255, 220, 160, 0.14);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.35), inset 0 0 80px rgba(0, 0, 0, 0.5);
}
.dl-table.has-bg { background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.6)), var(--board-bg) center / cover no-repeat; }
.dl-table.coop { height: auto; min-height: 690px; grid-template-rows: auto minmax(110px, auto) auto minmax(140px, auto) auto; }
.mini-duel.coop .game-body { overflow-y: auto; }
.mini-duel.coop .mini-main { flex: none; align-self: flex-start; }
.mini-duel.coop .mini-stage { justify-content: flex-start; }
.dl-table.coop .dl-board { flex-wrap: wrap; gap: 32px 16px; padding-top: 30px; padding-bottom: 30px; }
.dl-team-heroes { display: flex; align-items: center; gap: 14px; }
.dl-table.coop .dl-row-bottom { flex-direction: column; align-items: stretch; }
.dl-table.coop .dl-team-heroes { flex-wrap: wrap; justify-content: space-between; }
.dl-arena-count { position: absolute; left: 8px; top: 2px; color: #d4e7de; font-size: 12px; font-weight: 700; }
.dl-unit-owner { --oc: #ffb347; --oc2: #7d4c10; --oc3: #4a2a06; position: absolute; top: calc(100% + 11px); left: 50%; z-index: 5; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% + 18px); padding: 2px 9px 2px 3px; border-radius: 999px; font-size: 10px; line-height: 16px; letter-spacing: .03em; white-space: nowrap; color: #fff; background: linear-gradient(180deg, var(--oc2), var(--oc3)); border: 1px solid var(--oc); box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 10px color-mix(in srgb, var(--oc) 38%, transparent); }
.dl-unit-owner::before { content: ""; position: absolute; left: 50%; top: -5px; width: 7px; height: 7px; margin-left: -4px; transform: rotate(45deg); background: var(--oc2); border-left: 1px solid var(--oc); border-top: 1px solid var(--oc); }
.dl-unit-owner b { position: relative; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.dl-owner-face { position: relative; flex: none; width: 16px; height: 16px; }
.dl-owner-face .avatar, .dl-owner-face img { display: block; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; border: 1px solid var(--oc); background: var(--oc3); }
.dl-unit-owner.own { --oc: #3dff95; --oc2: #1d6c46; --oc3: #0f432b; }
.dl-unit-owner.ally { --oc: #ffb347; --oc2: #7d4c10; --oc3: #4a2a06; }
.dl-ally { border: 1px solid rgba(79, 201, 160, .35); border-radius: 16px; padding: 10px; background: rgba(15, 46, 39, .35); }
.dl-ally-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dl-ally-head > span { color: #9de6c9; font-size: 12px; font-weight: 700; }
.dl-ally .dl-portrait { --size: 52px; }
.dl-ally .dl-hero-title, .dl-ally .dl-deck, .dl-ally .dl-power { display: none; }
.dl-ally.eliminated { opacity: .65; }
.dl-mana.boss-mana { flex-wrap: wrap; max-width: 215px; }
@media (max-width: 640px) {
  .dl-table.coop { min-height: 0; grid-template-rows: auto minmax(110px, auto) auto minmax(110px, auto) auto; }
  .dl-table.coop .dl-board { display: grid; grid-template-columns: repeat(3, max-content); gap: 32px 24px; padding: 30px 4px; }
  .dl-table.coop .dl-board .dl-empty { grid-column: 1 / -1; }
  .dl-ally { padding: 8px; }
  .dl-ally-head { flex-wrap: wrap; }
  .dl-ally .dl-hero-hp { min-width: 24px; height: 26px; }
  .dl-mana.boss-mana { max-width: 130px; }
  .dl-table.coop .dl-row-top { flex-wrap: wrap; }
  .duel-mode-options { grid-template-columns: 1fr; }
}
.dl-row-top, .dl-row-bottom { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dl-me { flex: none; }

/* ---------- heroes ---------- */
.dl-hero { display: flex; align-items: center; gap: 12px; flex: none; }
.dl-portrait {
  --size: 88px;
  position: relative; width: var(--size); height: var(--size); flex: none; border-radius: 50%; padding: 4px;
  background: var(--dl-gold); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); transition: box-shadow 0.25s, transform 0.2s var(--ease), filter 0.4s;
}
.dl-portrait-face { position: absolute; inset: 4px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--fc) 70%, white 10%), var(--fc2) 80%); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--fc) 85%, #000), inset 0 -14px 20px rgba(0, 0, 0, 0.5); }
.dl-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.dl-portrait-face .avatar.dl-bot-face { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dl-hero-fallback .avatar { width: calc(var(--size) * 0.72); height: calc(var(--size) * 0.72); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
.dl-hero-av { position: absolute; left: -6px; bottom: -4px; z-index: 3; border-radius: 50%; box-shadow: 0 0 0 2px #14161d; line-height: 0; }
.dl-hero-av .avatar { width: 28px; height: 28px; }
.dl-hero-hp { position: absolute; right: -8px; bottom: -6px; z-index: 3; min-width: 36px; height: 40px; padding: 0 5px; display: grid; place-items: center; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; background: radial-gradient(circle at 35% 30%, #ffb3a8, #d93b3b 50%, #6d0f0f); box-shadow: 0 0 0 2px #2a0707, 0 4px 8px rgba(0, 0, 0, 0.6); }
.dl-hero-hp b { font: 700 19px/1 var(--font-display); color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.dl-portrait.low .dl-hero-hp { animation: dl-lowhp 1s ease-in-out infinite; }
.dl-hero.active .dl-portrait { box-shadow: 0 0 0 3px rgba(255, 214, 110, 0.8), 0 0 28px rgba(255, 204, 77, 0.55), 0 8px 20px rgba(0, 0, 0, 0.6); }
.dl-portrait.targetable { cursor: crosshair; box-shadow: 0 0 0 4px #ff4d4d, 0 0 36px rgba(255, 60, 60, 0.85); }
.dl-portrait.beaten { filter: grayscale(1) brightness(0.6); }
.dl-portrait.beaten .dl-portrait-face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 46%, rgba(0, 0, 0, 0.9) 47%, transparent 49%), linear-gradient(40deg, transparent 55%, rgba(0, 0, 0, 0.8) 56%, transparent 58%); }
.dl-hit-label { position: absolute; left: -4px; top: calc(100% + 8px); z-index: 4; white-space: nowrap; padding: 3px 10px; border-radius: 999px; font: 700 12px var(--font); color: #fff; background: #d62f2f; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); animation: dl-bob 0.9s ease-in-out infinite; pointer-events: none; }
.dl-hero.top .dl-hit-label { top: calc(100% + 6px); }
.dl-hero.bottom .dl-hit-label { top: auto; bottom: calc(100% + 6px); }
.dl-hero-info { display: grid; gap: 3px; min-width: 0; }
.dl-hero-info strong { font: 700 15px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-hero-info strong em { color: var(--muted); font-style: normal; font-weight: 500; }
.dl-hero-title { color: color-mix(in srgb, var(--fc) 60%, #fff); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-mana { display: flex; align-items: center; gap: 2px; }
.dl-mana i { width: 12px; height: 15px; clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%); background: #262c38; }
.dl-mana i.full { background: radial-gradient(circle at 40% 30%, #d9ecff, #4c9dff 50%, #1b4fb5); filter: drop-shadow(0 0 4px #4c9dff); }
.dl-mana i.spent { background: #2b3f5e; }
.dl-mana b { margin-left: 6px; color: #9ccaff; font: 700 14px var(--font-display); }
.dl-deck { position: relative; display: grid; place-items: center; width: 40px; height: 54px; margin-left: 4px; }
.dl-deck .dl-back { width: 38px; height: 52px; margin: 0; box-shadow: 2px 2px 0 #0b0c10, 4px 4px 0 rgba(255, 255, 255, 0.1), 6px 6px 10px rgba(0, 0, 0, 0.5); }
.dl-deck b { position: absolute; bottom: -6px; right: -10px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 11px; font: 700 12px var(--font-display); background: #262b36; border: 1px solid var(--line-2); }

.dl-foe-hand { display: flex; margin-left: auto; padding: 0 14px 0 20px; }
.dl-back { width: 40px; height: 56px; margin-left: -18px; border-radius: 5px; overflow: hidden; background: repeating-linear-gradient(45deg, #3b2a63 0 5px, #2c1f4a 5px 10px); border: 1px solid rgba(255, 220, 150, 0.4); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); transform: rotate(calc((var(--i, 0) - (var(--n, 1) - 1) / 2) * -4deg)); transform-origin: 50% -150%; }
.dl-back img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- boards ---------- */
.dl-board { position: relative; display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 0; padding: 6px; border-radius: 18px; background: radial-gradient(ellipse 60% 70% at 50% 50%, color-mix(in srgb, var(--fc) 9%, transparent), transparent 75%); }
.dl-empty { color: var(--faint); font-size: 13px; letter-spacing: 0.02em; }
.dl-mid { position: relative; display: flex; align-items: center; gap: 12px; padding: 2px 4px; min-height: 44px; }
.dl-table.chaos .dl-mid { flex-wrap: wrap; }
.dl-chaos-indicator { flex: 1 1 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 32px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--fc) 65%, transparent); border-radius: 10px; color: #f6f2e9; background: linear-gradient(100deg, rgba(12, 13, 18, 0.94), color-mix(in srgb, var(--fc2) 75%, rgba(12, 13, 18, 0.94)), rgba(12, 13, 18, 0.94)); box-shadow: 0 0 16px color-mix(in srgb, var(--fc) 20%, transparent); font-size: 12px; }
.dl-chaos-indicator.active { box-shadow: 0 0 22px color-mix(in srgb, var(--fc) 40%, transparent); }
.dl-chaos-indicator strong { color: var(--fc3); white-space: nowrap; }
.dl-chaos-indicator b { color: #fff; }
.dl-chaos-indicator small { color: #d7d9dd; font-size: 11px; }
.dl-chaos-icon { font-size: 18px; line-height: 1; }
.dl-mid::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 214, 140, 0.35) 20%, rgba(255, 214, 140, 0.7) 50%, rgba(255, 214, 140, 0.35) 80%, transparent); box-shadow: 0 0 12px rgba(255, 200, 120, 0.35); }
.dl-turn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; background: rgba(12, 13, 18, 0.85); border: 1px solid var(--line-2); }
.dl-turn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.my-turn .dl-turn { color: var(--accent); border-color: rgba(255, 204, 77, 0.45); }
.my-turn .dl-turn-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.2s infinite; }
.dl-hint { flex: 0 1 auto; margin: 0 auto; padding: 4px 12px; border-radius: 999px; color: #c9ccd6; font-size: 13px; text-align: center; background: rgba(12, 13, 18, 0.85); }
.dl-hint:empty { visibility: hidden; }
.dl-end { flex: none; min-width: 132px; min-height: 44px; padding: 0 20px; border-radius: 999px; font: 700 15px var(--font-display); letter-spacing: 0.02em; color: #8a8f9c; background: linear-gradient(#2a2e39, #1c1f27); border: 2px solid #3a3f4c; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); cursor: not-allowed; transition: transform 0.15s var(--ease), box-shadow 0.2s; }
.dl-end.on { cursor: pointer; color: #2a1a02; background: linear-gradient(#ffe38a, #f0b429 55%, #c7860e); border-color: #fff0b8; box-shadow: 0 0 0 2px #6b4a05, 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 190, 60, 0.35); }
.dl-end.on:hover { transform: translateY(-2px) scale(1.03); }
.dl-end.on:active { transform: scale(0.97); }
.dl-end.nudge { animation: dl-nudge 1.4s ease-in-out infinite; }

/* ---------- units ---------- */
.dl-unit {
  --w: 104px;
  position: relative; width: var(--w); aspect-ratio: 4 / 5; flex: none; font-size: calc(var(--w) * 0.14); color: #fff; touch-action: none;
  transition: transform 0.2s var(--ease), filter 0.25s, opacity 0.2s;
}
.dl-unit-body { position: absolute; inset: 0; border-radius: 50% / 50%; padding: calc(var(--w) * 0.04); background: var(--dl-gold); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.55); transition: box-shadow 0.25s; }
.dl-unit .dl-art { width: 100%; height: 100%; border-radius: 50% / 50%; }
.dl-unit .dl-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 calc(var(--w) * 0.035) color-mix(in srgb, var(--fc) 80%, #000), inset 0 -14px 18px -6px rgba(0, 0, 0, 0.6); }
.dl-unit .dl-art > i { font-size: 2.3em; }
.dl-unit .dl-atk, .dl-unit .dl-hp { bottom: -7%; width: 1.95em; height: 1.95em; }
.dl-unit .dl-atk { left: -7%; }
.dl-unit .dl-hp { right: -7%; }
.dl-passives { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 2px; pointer-events: auto; }
.dl-passives i { display: inline-block; padding: 2px 5px; border: 1px solid #d9ae4f; border-radius: 10px; background: #171c2b; color: #e7dab4; font: 700 11px/1.2 sans-serif; box-shadow: 0 2px 5px #0009; }
.dl-passives i.available { color: #bfffe1; border-color: #3dff95; box-shadow: 0 0 7px #3dff9570; }
.dl-atk.up b, .dl-hp.up b { color: #b8ffcf; }
.dl-hp.down b { color: #ffd0d0; }
/* taunt: a stone shield behind the unit */
.dl-unit.taunt::before { content: ""; position: absolute; inset: -9% -13% -4%; z-index: -1; clip-path: polygon(50% 0, 96% 12%, 94% 58%, 50% 100%, 6% 58%, 4% 12%); background: linear-gradient(160deg, #e4e7ee, #8e95a4 35%, #4e5462 65%, #9aa1b0); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.dl-unit.taunt:has(.dl-taunt-img)::before { display: none; }
.dl-taunt-img { position: absolute; left: -24%; top: -16%; z-index: -1; width: 148%; height: 128%; max-width: none; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
/* divine shield: a golden bubble */
.dl-unit.shield::after { content: ""; position: absolute; inset: -9%; z-index: 3; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 35% 25%, rgba(255, 255, 230, 0.55), transparent 30%), radial-gradient(circle, transparent 55%, rgba(255, 213, 79, 0.35) 72%, rgba(255, 240, 170, 0.8) 80%, transparent 84%); box-shadow: 0 0 22px rgba(255, 213, 79, 0.55); animation: dl-shimmer 2.4s ease-in-out infinite; }
.dl-unit.shield:has(.dl-shield-img)::after { display: none; }
/* Armor: a riveted steel rim made of six plates around the portrait, plus a heater-shield badge. */
.dl-armor-shell { --rim: max(5px, calc(var(--w) * .07)); position: absolute; inset: -4%; z-index: 2; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 15deg, #f1fbf6, #86a69a 10%, #dcf0e6 22%, #4d7366 36%, #eefaf4 50%, #86a69a 62%, #d4eadf 76%, #54786b 88%, #f1fbf6);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rim)), #000 calc(100% - var(--rim) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--rim)), #000 calc(100% - var(--rim) + 1px));
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .7)); }
.dl-armor-shell::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from -30deg, rgba(8, 28, 22, .75) 0 1.4deg, transparent 1.4deg 60deg), radial-gradient(farthest-side, transparent calc(100% - var(--rim) * .35), rgba(8, 28, 22, .55)); }
.dl-armor-shell::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 78%, rgba(255, 255, 255, .95) 88%, transparent 96%); mix-blend-mode: soft-light; animation: dl-armor-glint 3.8s linear infinite; }
.dl-armor-shell i { position: absolute; inset: 0; transform: rotate(calc(var(--n) * 60deg + 30deg)); }
.dl-armor-shell i::before { content: ""; position: absolute; left: 50%; top: calc(var(--rim) * .27); width: calc(var(--rim) * .46); height: calc(var(--rim) * .46); margin-left: calc(var(--rim) * -.23); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a4c2b6 42%, #2a4a3f 100%); }
.dl-armor-shell.tier-2 { --rim: max(6px, calc(var(--w) * .085)); }
.dl-armor-shell.tier-3 { --rim: max(7px, calc(var(--w) * .1)); filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .7)) drop-shadow(0 0 5px rgba(140, 255, 220, .55)); }
@keyframes dl-armor-glint { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dl-armor-shell::after { animation: none; opacity: 0; } }
.dl-armor { position: absolute; left: 50%; top: -13px; transform: translateX(-50%); z-index: 6; display: grid; place-items: center; width: 32px; height: 37px; padding-bottom: 5px; color: #f6fffb; background: linear-gradient(160deg, #e7f6ef 0%, #7ea396 45%, #2c5446 100%); clip-path: polygon(0 9%, 50% 0, 100% 9%, 100% 58%, 50% 100%, 0 58%); font: 700 17px/1 var(--font-display); text-shadow: 0 1px 0 #06201a, 0 0 6px rgba(0, 0, 0, .7); }
.dl-armor::before { content: ""; position: absolute; inset: 2px; z-index: -1; clip-path: polygon(0 9%, 50% 0, 100% 9%, 100% 58%, 50% 100%, 0 58%); background: linear-gradient(160deg, #4f8c78 0%, #265a49 50%, #123a2d 100%); }
.dl-armor b { position: relative; font-weight: 700; }
.dl-shield-img { position: absolute; left: -11%; top: -9%; z-index: 3; width: 122%; height: 118%; max-width: none; object-fit: fill; pointer-events: none; animation: dl-shimmer 2.4s ease-in-out infinite; }
/* frozen */
.dl-unit.frozen .dl-art { filter: saturate(0.25) brightness(1.15) hue-rotate(170deg); }
.dl-ice { position: absolute; inset: -4%; z-index: 2; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.6), transparent 25%), linear-gradient(135deg, rgba(190, 235, 255, 0.55), rgba(90, 170, 255, 0.25)); box-shadow: inset 0 0 0 3px rgba(210, 245, 255, 0.9), 0 0 18px rgba(140, 210, 255, 0.7); clip-path: polygon(50% 0, 62% 8%, 78% 4%, 84% 18%, 98% 26%, 94% 42%, 100% 56%, 90% 70%, 92% 86%, 76% 90%, 64% 100%, 50% 94%, 36% 100%, 24% 90%, 8% 86%, 10% 70%, 0 56%, 6% 42%, 2% 26%, 16% 18%, 22% 4%, 38% 8%); }
/* my units: ready / already used / just summoned */
.dl-unit.ready { cursor: grab; }
.dl-unit.ready .dl-unit-body { box-shadow: 0 0 0 3px #3dff95, 0 0 22px rgba(61, 255, 149, 0.65), 0 10px 20px rgba(0, 0, 0, 0.55); animation: dl-ready 1.6s ease-in-out infinite; }
.dl-unit.ready:hover { transform: translateY(-5px) scale(1.04); }
.dl-unit.spent { filter: saturate(0.55) brightness(0.8); }
.dl-zzz { position: absolute; top: -6%; right: -2%; z-index: 4; font: 700 0.8em var(--font-display); color: #cfd6ff; text-shadow: 0 1px 3px #000; animation: dl-zzz 2s ease-in-out infinite; pointer-events: none; }
.dl-zzz i { font-style: normal; font-size: 0.75em; margin-left: 1px; }
.dl-unit.selected { transform: translateY(-10px) scale(1.08); z-index: 5; }
.dl-unit.selected .dl-unit-body { box-shadow: 0 0 0 4px var(--accent), 0 0 30px rgba(255, 204, 77, 0.9), 0 14px 24px rgba(0, 0, 0, 0.6); animation: none; }
.dl-unit.targetable { cursor: crosshair; }
.dl-unit.targetable .dl-unit-body { box-shadow: 0 0 0 4px #ff4d4d, 0 0 26px rgba(255, 70, 70, 0.8), 0 10px 20px rgba(0, 0, 0, 0.55); }
.dl-unit.targetable:hover, .dl-portrait.targetable:hover { transform: scale(1.07); }
.dl-reticle { position: absolute; inset: -12%; z-index: 4; border-radius: 50%; pointer-events: none; border: 2px dashed rgba(255, 90, 90, 0.95); animation: dl-spin 3s linear infinite; }
.dl-reticle::before, .dl-reticle::after { content: ""; position: absolute; left: 50%; top: -7px; width: 2px; height: 12px; margin-left: -1px; background: #ff5a5a; box-shadow: 0 calc(100% + var(--w, 96px)) 0 #ff5a5a; }
.dl-reticle.hero { inset: -14%; border-width: 3px; }
.fx-hide { visibility: hidden !important; }

/* ---------- hand ---------- */
.dl-hand { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-end; padding: 16px 4px 0; margin-bottom: -6px; }
.mini .dl-side ol { grid-template-columns: 1fr; }
.dl-slot {
  --cw: 108px; --off: calc(var(--i) - (var(--n) - 1) / 2);
  position: relative; flex: none; width: var(--cw);
  margin-left: max(-62px, min(4px, calc((100% - var(--n) * var(--cw)) / var(--n))));
  transform: rotate(calc(var(--off) * 3.2deg)); transform-origin: 50% 260%;
}
.dl-slot:first-child { margin-left: 0; }
.dl-slot:hover, .dl-slot:has(.selected) { z-index: 6; }
.dl-hand .dl-card { --w: var(--cw); cursor: pointer; touch-action: none; }
.dl-hand .dl-card:not(.playable) { filter: saturate(0.55) brightness(0.72); }
.dl-hand .dl-card.playable { box-shadow: 0 0 0 2px #3dff95, 0 0 18px rgba(61, 255, 149, 0.55), 0 10px 22px rgba(0, 0, 0, 0.5); cursor: grab; }
.dl-slot:hover .dl-card { transform: rotate(calc(var(--off) * -3.2deg)) translateY(-34px) scale(1.22); filter: none; }
.dl-hand .dl-card.selected { transform: translateY(-40px) scale(1.2); box-shadow: 0 0 0 3px var(--accent), 0 0 32px rgba(255, 204, 77, 0.8); }
.dl-hand .dl-card.drawn { animation: dl-draw 0.55s var(--ease) both; }
@keyframes dl-draw { from { opacity: 0; transform-origin: 50% 50%; transform: translate(-30vw, 10px) scale(0.5); } }
body.dl-dragging, body.dl-dragging * { cursor: grabbing !important; user-select: none; }

/* ---------- result ---------- */
.dl-result-wrap { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; }
.dl-result-wrap:empty { display: none; }
.dl-result { width: 100%; padding: 22px 0; text-align: center; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.8) 18%, rgba(0, 0, 0, 0.8) 82%, transparent); animation: dl-result 0.8s 0.6s var(--ease) both; }
.dl-result strong { font: 700 clamp(40px, 8vw, 84px)/1 var(--font-display); letter-spacing: 0.04em; background: linear-gradient(#fff6c8, #ffc93c 55%, #b86b06); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 12px rgba(255, 170, 40, 0.5)); }
.dl-result.lose strong { background: linear-gradient(#f2d0d0, #b33 60%, #5a0a0a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 12px rgba(200, 30, 30, 0.5)); }
.dl-result.neutral strong { background: linear-gradient(#fff, #aab); -webkit-background-clip: text; background-clip: text; }
@media(prefers-reduced-motion:reduce) { .dl-result {animation:none;} }
@keyframes dl-result { from { opacity: 0; transform: scale(1.8); letter-spacing: 0.4em; } }

/* ---------- effect overlay ---------- */
.dl-fx-layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.dl-standin { position: absolute; will-change: transform; }
.dl-standin > .dl-card, .dl-standin > .dl-unit { --w: var(--sw) !important; margin: 0 !important; transform: none !important; }
.dl-standin.reveal > .dl-card { box-shadow: 0 0 0 3px rgba(255, 230, 160, 0.9), 0 0 60px color-mix(in srgb, var(--fc) 80%, transparent), 0 30px 60px rgba(0, 0, 0, 0.7); }
.dl-standin.attacker { z-index: 3; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.6)); }
.dl-float { position: absolute; z-index: 5; transform: translate(-50%, -50%); white-space: nowrap; font: 700 34px/1 var(--font-display); color: #ff4a4a; -webkit-text-stroke: 1.5px #2a0000; text-shadow: 0 3px 0 #2a0000, 0 0 14px rgba(0, 0, 0, 0.8); animation: dl-float 1.4s cubic-bezier(.2, .8, .3, 1) forwards; }
.dl-float.big { font-size: 60px; -webkit-text-stroke: 2px #2a0000; }
.dl-float.heal { color: #7dffb2; -webkit-text-stroke-color: #022a12; text-shadow: 0 3px 0 #022a12, 0 0 14px rgba(0, 0, 0, 0.8); }
.dl-float.freeze { font-size: 20px; color: #bfeaff; -webkit-text-stroke: 1px #06253a; }
.dl-float.shield { font-size: 20px; color: #ffe07a; -webkit-text-stroke: 1px #3a2600; }
.dl-float.mana { font-size: 20px; color: #9ccaff; -webkit-text-stroke: 1px #061a3a; }
.dl-float.armor { font-size: 20px; color: #bdf3e6; -webkit-text-stroke: 1px #123a2e; }
.dl-armor-plate { position: absolute; z-index: 4; border-radius: 46% 46% 54% 54% / 72% 72% 28% 28%; background: linear-gradient(165deg, #f4fcf8, #9bbbae 42%, #3a5f52); box-shadow: inset 0 0 0 1px rgba(14, 42, 34, .8), inset 0 2px 2px rgba(255, 255, 255, .6), 0 1px 3px rgba(0, 0, 0, .55); pointer-events: none; }
.dl-eruption-line { position: absolute; z-index: 3; height: 60px; background: #ffdc7d; filter: drop-shadow(0 0 14px #ff6a3d); clip-path: polygon(0 45%, 12% 20%, 20% 47%, 31% 35%, 45% 68%, 59% 25%, 70% 43%, 84% 15%, 100% 48%, 84% 29%, 70% 57%, 59% 40%, 45% 83%, 31% 49%, 20% 61%, 12% 36%, 0 58%); }
@keyframes dl-float { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.3); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.35); } 30% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -140%) scale(0.95); } }
.dl-spark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px currentColor; color: #fff; }
.s-blood { background: #ff5a4a; color: #ff2b2b; }
.s-fire, .s-ember { background: #ffc15a; color: #ff5a1f; }
.s-ice { background: #d9f4ff; color: #6fc8ff; border-radius: 2px; transform-origin: center; }
.s-leaf { background: #8dff9a; color: #2ecf6a; border-radius: 0 60%; }
.s-bolt { background: #fffbd0; color: #ffe14a; }
.s-holy { background: #fff2b0; color: #ffd24a; }
.s-heal { background: #b8ffd4; color: #3dff95; }
.s-dust { background: #a8987e; color: transparent; box-shadow: none; }
.s-mana { background: #cfe6ff; color: #4c9dff; }
.s-arcane { background: #e2ccff; color: #a970ff; }
.s-slash { background: #fff; color: #ffd08a; }
.s-stone { background: #abc9bb; color: #70d3b9; border-radius: 0; clip-path: polygon(20% 0, 85% 10%, 100% 70%, 40% 100%, 0 50%); }
.s-metal { background: linear-gradient(135deg, #fffbe0, #ffd978); color: #ffc94a; border-radius: 2px; width: 4px; height: 11px; }
.dl-ring { position: absolute; z-index: 2; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid #ffd08a; box-shadow: 0 0 18px #ffb347, inset 0 0 18px #ffb347; }
.dl-ring.s-fire { border-color: #ffb347; box-shadow: 0 0 20px #ff5a1f, inset 0 0 20px #ff5a1f; background: none; }
.dl-ring.s-ice { border-color: #bfeaff; box-shadow: 0 0 20px #4cb6ff, inset 0 0 20px #4cb6ff; background: none; }
.dl-ring.s-leaf, .dl-ring.s-heal { border-color: #8dff9a; box-shadow: 0 0 20px #2ecf6a, inset 0 0 20px #2ecf6a; background: none; }
.dl-ring.s-bolt, .dl-ring.s-holy { border-color: #fff3a8; box-shadow: 0 0 22px #ffd24a, inset 0 0 22px #ffd24a; background: none; }
.dl-ring.s-arcane { border-color: #d7b8ff; box-shadow: 0 0 20px #a970ff, inset 0 0 20px #a970ff; background: none; }
.dl-ring.s-dust { border-color: rgba(200, 180, 150, 0.6); box-shadow: none; background: none; }
.dl-ring.s-stone { border-color: #b5e5d6; box-shadow: 0 0 18px #55bea0, inset 0 0 18px #55bea0; background: none; }
.dl-ring.s-metal { border-color: #fff4c4; box-shadow: 0 0 22px #ffd86a, inset 0 0 18px #cfeee2; background: none; }
.dl-proj { position: absolute; left: 0; top: 0; z-index: 4; width: 34px; height: 34px; border-radius: 50%; will-change: transform; }
.dl-proj::after { content: ""; position: absolute; right: 50%; top: 50%; width: 110px; height: 60%; transform: translateY(-50%); border-radius: 999px; filter: blur(3px); }
.p-fire { background: radial-gradient(circle, #fff 0 18%, #ffe27a 30%, #ff8a1f 55%, rgba(255, 60, 0, 0) 72%); box-shadow: 0 0 30px 10px rgba(255, 110, 30, 0.7); }
.p-fire::after { background: linear-gradient(90deg, transparent, rgba(255, 90, 20, 0.7) 60%, rgba(255, 200, 80, 0.9)); }
.p-ice { width: 42px; height: 16px; border-radius: 0; clip-path: polygon(0 50%, 30% 0, 100% 50%, 30% 100%); background: linear-gradient(90deg, #6fc8ff, #fff); filter: drop-shadow(0 0 10px #6fc8ff); }
.p-ice::after { display: none; }
.p-stone { background: linear-gradient(135deg, #d1f9e9, #7ea494 65%, #355548); border-radius: 0; clip-path: polygon(20% 0, 85% 10%, 100% 70%, 40% 100%, 0 50%); filter: drop-shadow(0 0 10px #70d3b9); }
.p-stone::after { display: none; }
.p-leaf { background: radial-gradient(circle, #fff 0 15%, #b9f59a 32%, #2ecf6a 55%, rgba(20, 150, 60, 0) 72%); box-shadow: 0 0 26px 8px rgba(60, 220, 120, 0.6); }
.p-leaf::after { background: linear-gradient(90deg, transparent, rgba(60, 220, 120, 0.7)); }
.p-heal { background: radial-gradient(circle, #fff 0 20%, #9dffc4 40%, rgba(40, 220, 120, 0) 72%); box-shadow: 0 0 26px 8px rgba(80, 255, 150, 0.55); }
.p-heal::after { background: linear-gradient(90deg, transparent, rgba(120, 255, 170, 0.6)); }
.p-holy { background: radial-gradient(circle, #fff 0 20%, #fff0a0 40%, rgba(255, 200, 60, 0) 72%); box-shadow: 0 0 26px 8px rgba(255, 210, 80, 0.6); }
.p-holy::after { background: linear-gradient(90deg, transparent, rgba(255, 220, 110, 0.7)); }
.p-arcane, .p-slash { background: radial-gradient(circle, #fff 0 18%, #d7b8ff 38%, #8a4dff 58%, rgba(120, 60, 255, 0) 72%); box-shadow: 0 0 26px 8px rgba(160, 100, 255, 0.6); }
.p-arcane::after, .p-slash::after { background: linear-gradient(90deg, transparent, rgba(170, 120, 255, 0.7)); }
.dl-lightning { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; overflow: visible; }
.dl-lightning path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.dl-lightning .glow { stroke: #ffe14a; stroke-width: 12; opacity: 0.55; filter: blur(4px); }
.dl-lightning .core { stroke: #fffef0; stroke-width: 3.5; }
.dl-slash { position: absolute; z-index: 5; width: 150px; height: 10px; border-radius: 50%; background: linear-gradient(90deg, transparent, #fff 30%, #ffe2a8 70%, transparent); box-shadow: 0 0 18px #ffb347; }
.dl-hero-flash { position: absolute; z-index: 3; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 50, 30, 0.7) 50%, rgba(255, 0, 0, 0) 72%); }
.dl-vignette { position: absolute; inset: 0; z-index: 1; }
.dl-vignette.hurt { box-shadow: inset 0 0 160px 50px rgba(220, 0, 0, 0.6); background: rgba(160, 0, 0, 0.1); }
.dl-vignette.strike { box-shadow: inset 0 0 120px 20px rgba(255, 190, 90, 0.35); }
.dl-banner { position: absolute; z-index: 6; transform: translate(-50%, -50%); white-space: nowrap; padding: 16px 90px; background: linear-gradient(90deg, transparent, rgba(8, 8, 12, 0.82) 20%, rgba(8, 8, 12, 0.82) 80%, transparent); }
.dl-banner strong { font: 700 30px/1 var(--font-display); color: #d9dce6; letter-spacing: 0.04em; }
.dl-banner.mine strong { font-size: 52px; background: linear-gradient(#fff6c8, #ffc93c 55%, #c07a0a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 10px rgba(255, 180, 40, 0.5)); }

/* targeting arrow */
.dl-arrow-layer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 79; pointer-events: none; display: none; overflow: visible; }
.dl-arrow-layer.on { display: block; }
.dl-arrow { fill: none; stroke: #ffd24a; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 14 10; filter: drop-shadow(0 0 6px rgba(255, 190, 60, 0.9)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8)); animation: dl-dash 0.5s linear infinite; }
.dl-arrow-layer marker path { fill: #ffd24a; }
.dl-arrow-end { fill: none; stroke: #ffd24a; stroke-width: 3; opacity: 0.8; }
.dl-arrow-layer.hit .dl-arrow { stroke: #ff4d4d; filter: drop-shadow(0 0 8px rgba(255, 60, 60, 0.95)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8)); }
.dl-arrow-layer.hit marker path { fill: #ff4d4d; }
.dl-arrow-layer.hit .dl-arrow-end { stroke: #ff4d4d; stroke-width: 4; opacity: 1; }

@keyframes dl-dash { to { stroke-dashoffset: -24; } }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@keyframes dl-bob { 50% { transform: translateY(-3px); } }
@keyframes dl-ready { 50% { box-shadow: 0 0 0 3px #3dff95, 0 0 32px rgba(61, 255, 149, 0.9), 0 10px 20px rgba(0, 0, 0, 0.55); } }
@keyframes dl-shimmer { 50% { opacity: 0.7; transform: scale(1.03); } }
@keyframes dl-zzz { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes dl-lowhp { 50% { box-shadow: 0 0 0 2px #2a0707, 0 0 18px 4px rgba(255, 40, 40, 0.8); } }
@keyframes dl-nudge { 0%, 100% { box-shadow: 0 0 0 2px #6b4a05, 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 190, 60, 0.3); } 50% { box-shadow: 0 0 0 2px #6b4a05, 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 34px 6px rgba(255, 190, 60, 0.85); transform: scale(1.04); } }

/* ---------- draft ---------- */
.dl-draft { max-width: 960px; margin: 0 auto; }
.dl-title { text-align: center; font: 700 26px var(--font-display); margin: 8px 0 16px; }
.dl-title small { color: var(--muted); font: 600 15px var(--font); margin-left: 8px; }
.dl-factions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dl-faction { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 12px 14px; border-radius: 18px; overflow: hidden; text-align: center; background: linear-gradient(170deg, color-mix(in srgb, var(--fc) 26%, #171a21), #171a21 70%); border: 1px solid color-mix(in srgb, var(--fc) 45%, transparent); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.dl-faction:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45), 0 0 26px color-mix(in srgb, var(--fc) 35%, transparent); }
.dl-faction-hero { position: relative; width: calc(100% + 24px); height: 170px; margin-bottom: 6px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--fc) 35%, transparent), transparent 70%); }
.dl-faction-hero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 10%; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); transition: transform 0.4s var(--ease); }
.dl-faction:hover .dl-faction-hero img { transform: scale(1.06); }
.dl-faction strong { font: 700 20px var(--font-display); }
.dl-faction em { font-style: normal; font-size: 12px; color: color-mix(in srgb, var(--fc) 55%, #fff); }
.dl-faction small { color: var(--muted); font-size: 13px; min-height: 34px; }
.dl-faction-actions { display: grid; gap: 6px; width: 100%; margin-top: 6px; }
.dl-faction-actions .btn { min-height: 38px; font-size: 13px; }
.dl-offer { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; perspective: 900px; }
.dl-decklist { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 3px; font-size: 13px; overflow: auto; }
.dl-decklist li { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--fc, #888) 16%, transparent), transparent 70%); }
.dl-decklist li b { margin-left: auto; color: var(--faint); }
.dl-mini-cost { width: 20px; height: 20px; flex: none; display: grid; place-items: center; clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: #2a6fe6; color: #fff; font: 700 11px var(--font-display); }

@media (prefers-reduced-motion: reduce) {
  .dl-unit.ready .dl-unit-body, .dl-reticle, .dl-arrow, .dl-end.nudge, .dl-zzz, .dl-unit.shield::after, .dl-power.ready .dl-power-face { animation: none; }
}
@media (max-width: 960px) {
  .mini-duel .mini-main { grid-template-columns: 1fr; }
  .mini-duel .dl-side { order: 2; max-height: none; }
  .mini-duel .dl-log { max-height: 140px; }
  .dl-table { height: auto; grid-template-rows: auto minmax(100px, auto) auto minmax(100px, auto) auto; }
  .dl-factions { grid-template-columns: 1fr 1fr; }
  .featured-grid .game-tile { flex-direction: column; }
  .featured-grid .game-tile-art { width: 100%; min-height: 200px; }
}
@media (max-width: 640px) {
  .mini-duel .mini-main { padding: 4px; }
  .dl-table { padding: 6px; gap: 4px; border-radius: 14px; grid-template-rows: auto minmax(74px, auto) auto minmax(74px, auto) auto; }
  .dl-portrait { --size: 54px; padding: 3px; }
  .dl-portrait-face { inset: 3px; }
  .dl-hero { gap: 8px; }
  .dl-hero-hp { min-width: 26px; height: 29px; right: -7px; }
  .dl-hero-hp b { font-size: 14px; }
  .dl-hero-av .avatar { width: 20px; height: 20px; }
  .dl-hero-title { display: none; }
  .dl-hero-info strong { font-size: 13px; }
  .dl-mana i { width: 8px; height: 10px; }
  .dl-mana b { font-size: 12px; margin-left: 3px; }
  .dl-deck { display: none; }
  .dl-power { width: 46px; }
  .dl-power-face { width: 38px; height: 38px; }
  .dl-power-face i { font-size: 20px; }
  .dl-power-cost { width: 18px; height: 20px; top: -4px; left: -4px; }
  .dl-power-cost b { font-size: 11px; }
  .dl-power-name { display: none; }
  .dl-unit { --w: 54px; }
  .dl-board { gap: 12px; padding: 4px 2px; }
  .dl-hint { display: none; }
  .dl-mid { justify-content: space-between; min-height: 38px; }
  .dl-chaos-indicator { flex-wrap: wrap; gap: 2px 5px; padding: 5px 6px; font-size: 11px; line-height: 1.2; }
  .dl-chaos-indicator small { flex: 1 1 100%; text-align: center; font-size: 10px; }
  .dl-chaos-icon { font-size: 15px; }
  .dl-end { min-width: 110px; min-height: 38px; font-size: 13px; }
  .dl-row-bottom { flex-direction: column; align-items: stretch; gap: 4px; }
  .dl-hand { margin-bottom: -4px; padding-top: 8px; }
  .dl-slot { --cw: 74px; margin-left: max(-42px, min(3px, calc((100% - var(--n) * var(--cw)) / var(--n)))); transform-origin: 50% 300%; }
  .dl-slot:hover .dl-card { transform: rotate(calc(var(--off) * -3.2deg)) translateY(-16px) scale(1.12); }
  .dl-hit-label { font-size: 10px; padding: 2px 7px; }
  .dl-foe-hand { padding-right: 6px; }
  .dl-foe-hand .dl-back { width: 24px; height: 34px; margin-left: -12px; }
  .dl-card.big { --w: 150px; }
  .dl-offer { gap: 8px; }
  .dl-offer .dl-card.big { --w: 104px; }
  .dl-float { font-size: 26px; }
  .dl-float.big { font-size: 42px; }
  .dl-banner { padding: 12px 40px; }
  .dl-banner.mine strong { font-size: 34px; }
  .dl-banner strong { font-size: 22px; }
  .dl-faction-hero { height: 130px; }
}

/* second faction */
.dl-second { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; }
.dl-second > span { color: #d4e7de; font-weight: 700; margin-right: 4px; }
.dl-second small { color: var(--muted); font-weight: 500; }
.dl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .05); color: #e8ece9; font: 600 13px var(--font); cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.dl-chip:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .1); }
.dl-chip.on { border-color: var(--fc, #3dff95); background: color-mix(in srgb, var(--fc, #3dff95) 22%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--fc, #3dff95) 40%, transparent); }
.dl-second-note { margin: 0 0 14px; text-align: center; color: var(--muted); font-size: 13px; }
.dl-second-crest { display: inline-flex; align-items: center; gap: 1px; margin-left: 3px; opacity: .85; }

/* saved decks on the deck choice screen */
.dl-mydecks { margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.dl-mydecks-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dl-mydecks-head h3 { margin: 0; font-size: 16px; }
.dl-mydecks-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.dl-mydeck { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 12px; text-align: left; padding: 10px 12px 10px 14px; border: 1px solid color-mix(in srgb, var(--fc, #888) 40%, var(--line)); border-radius: 12px; overflow: hidden; background: linear-gradient(100deg, color-mix(in srgb, var(--fc2, #333) 55%, var(--surface)) 0%, var(--surface) 62%); color: var(--text); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.dl-mydeck::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--fc, #888); }
.dl-mydeck:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--fc, var(--accent)); box-shadow: 0 8px 20px color-mix(in srgb, var(--fc, #888) 28%, transparent); }
.dl-mydeck:disabled { opacity: 0.5; cursor: not-allowed; }
.dl-mydeck-hero { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.dl-mydeck-hero > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #10141c; box-shadow: 0 0 0 2px var(--fc, #888); }
.dl-mydeck-2 { position: absolute; right: -6px; bottom: -4px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--fc2, #333) 85%, #000); box-shadow: 0 0 0 2px var(--fc, #888); }
.dl-mydeck-text { display: grid; gap: 3px; min-width: 0; }
.dl-mydeck strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-mydeck small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-mc { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.dl-mc i { display: block; flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(var(--fc3, #ffd24a), var(--fc, #ffd24a)); opacity: 0.9; }
.dl-mydecks-or { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

/* Mrok keeps the established frame; the crescent and palette identify the faction. */
.f-dark{--fc:#a98ae8;--fl:#e4d3ff;--fd:#34234f;--accent:#bfa0f3}.dl-powers{display:flex;align-items:center;gap:7px}.dl-powers:has(button:nth-child(2)) .dl-power{max-width:74px}.dl-curse-mark{position:absolute;right:-3px;top:18%;z-index:14;color:#eee2ff;background:#452365;border:1px solid #b69ce5;border-radius:10px;padding:2px 5px;font-size:11px;box-shadow:0 1px 5px #090312;pointer-events:none}.dl-faction.f-dark{background:linear-gradient(160deg,#392950,#171325)}.dl-faction-actions button:disabled{opacity:.5;cursor:default}@media(max-width:600px){.dl-powers{gap:3px}.dl-powers:has(button:nth-child(2)) .dl-power{max-width:53px}.dl-powers:has(button:nth-child(2)) .dl-power-face{width:40px;height:40px}.dl-powers:has(button:nth-child(2)) .dl-power-name{font-size:9px}}
.f-dark{--fc2:#302041;--fc3:#e7d5ff}
.dl-keyword-note{font-size:12px;line-height:1.5;color:#cdbddd;margin:12px 0}

/* Draft content must grow downwards inside a scrollable viewport, including the fifth faction. */
.mini-duel.duel-drafting{min-height:0}
.mini-duel.duel-drafting .game-body{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8875ab66 transparent}
.mini-duel.duel-drafting .mini-main{flex:none;align-self:flex-start;align-items:start}
.mini-duel.duel-drafting .mini-stage{justify-content:flex-start}
.mini-duel.duel-drafting .dl-draft{width:100%;padding-bottom:24px}
.mini-duel.duel-drafting .dl-faction-actions{margin-top:auto;padding-top:8px}
/* Mulligan shares the scrollable draft layout; the confirm button stays reachable while the hand scrolls. */
.mini-duel.duel-drafting .dl-mull-actions{position:sticky;bottom:0;z-index:5;margin-top:18px;padding:14px 0 6px;background:linear-gradient(180deg,transparent,rgba(12,13,18,.94) 45%)}
.mini-duel.duel-drafting .dl-offer{padding-bottom:6px}
.mini-duel.duel-drafting .dl-mull-slot{margin-bottom:6px}

/* ---------- Arena Żywiołów (3.0.3): Wylew Lawy, Lustro Toni, Kiełkowanie, Przeskok, Nieumarły, Przemiana, Cień, Wyzwanie ---------- */
.dl-passives i.k-lava { color: #ffcf8a; border-color: #ff7a2a; box-shadow: 0 0 7px #ff5a1f80; }
.dl-passives i.k-undying { color: #d9ffe9; border-color: #8fdcb3; background: #1d2a26; box-shadow: 0 0 7px #6cffb860; }
.dl-passives i.k-mirror { color: #e9fbff; border-color: #8fe3ff; background: #12283a; box-shadow: 0 0 8px #6fd6ff90; animation: dl-mirror-badge 2.6s ease-in-out infinite; }
@keyframes dl-mirror-badge { 50% { box-shadow: 0 0 14px #b8f0ff; } }

/* Cień: the unit fades into drifting fog; it still shows faintly to its owner and the rival. */
.dl-unit.stealth .dl-unit-body { opacity: 0.62; filter: grayscale(0.45) brightness(0.8) blur(0.4px); box-shadow: 0 0 0 2px #5a4c78, 0 0 18px #2a1f4a; }
.dl-unit.stealth.ready .dl-unit-body { opacity: 0.8; }
.dl-mist { position: absolute; inset: -14%; z-index: 3; pointer-events: none; border-radius: 50%; overflow: hidden; mask-image: radial-gradient(circle, #000 52%, transparent 72%); -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 72%); }
.dl-mist i { position: absolute; width: 90%; height: 60%; border-radius: 50%; background: radial-gradient(ellipse, rgba(196, 186, 226, 0.55), rgba(120, 104, 170, 0.18) 55%, transparent 72%); filter: blur(4px); animation: dl-mist 7s ease-in-out infinite; }
.dl-mist i:nth-child(1) { left: -20%; top: 10%; }
.dl-mist i:nth-child(2) { left: 30%; top: 45%; animation-duration: 9s; animation-delay: -3s; }
.dl-mist i:nth-child(3) { left: -5%; top: 62%; animation-duration: 8s; animation-delay: -5s; opacity: 0.8; }
@keyframes dl-mist { 0%, 100% { transform: translateX(-12%) scale(1); opacity: 0.75; } 50% { transform: translateX(22%) scale(1.15); opacity: 1; } }

/* Lustro Toni: a thin sheet of water with a light sweep across it. */
.dl-mirror { position: absolute; inset: -5%; z-index: 3; pointer-events: none; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(190, 240, 255, 0.85), 0 0 14px rgba(111, 214, 255, 0.55); background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 45%, rgba(170, 235, 255, 0.25) 52%, transparent 62%) -160% 0 / 260% 100% no-repeat, radial-gradient(circle at 50% 120%, rgba(90, 190, 255, 0.28), transparent 60%); animation: dl-mirror-sheen 3.4s ease-in-out infinite; }
.dl-mirror::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px solid rgba(220, 250, 255, 0.45); animation: dl-ripple 3.4s ease-out infinite; }
@keyframes dl-mirror-sheen { 0%, 25% { background-position: -160% 0, 0 0; } 70%, 100% { background-position: 160% 0, 0 0; } }
@keyframes dl-ripple { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.12); opacity: 0; } }
.dl-pane { position: absolute; z-index: 4; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(160, 230, 255, 0.55) 35%, rgba(60, 160, 255, 0.25) 70%, transparent 74%); box-shadow: 0 0 40px rgba(130, 220, 255, 0.9); }
.dl-shard { position: absolute; z-index: 5; width: 12px; height: 18px; clip-path: polygon(50% 0, 100% 70%, 30% 100%, 0 40%); background: linear-gradient(160deg, #ffffff, #9fe6ff 45%, #5aa8ff); filter: drop-shadow(0 0 6px #8fe3ff); }

/* Kiełkowanie: the seed sits in a little mound of soil with a countdown. */
.dl-unit.sprouting .dl-unit-body { filter: saturate(0.85) brightness(0.95); }
.dl-soil { position: absolute; left: 16%; right: 16%; bottom: -6%; height: 24%; z-index: 1; pointer-events: none; border-radius: 50% 50% 46% 46% / 70% 70% 30% 30%; background: radial-gradient(ellipse at 50% 20%, #8a6440, #5a3c22 55%, #3a2614); box-shadow: inset 0 3px 4px rgba(255, 220, 160, 0.25), 0 4px 8px rgba(0, 0, 0, 0.5); }
.dl-soil::before { content: ""; position: absolute; left: 50%; bottom: 70%; width: 3px; height: 70%; background: linear-gradient(#a9f07a, #4caf50); border-radius: 2px; transform-origin: bottom; animation: dl-sway 2.8s ease-in-out infinite; }
.dl-soil::after { content: ""; position: absolute; left: calc(50% - 1px); bottom: 120%; width: 14px; height: 9px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #c9ff9a, #4caf50); transform-origin: left bottom; animation: dl-sway 2.8s ease-in-out infinite; }
@keyframes dl-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.dl-sprout-mark { position: absolute; right: -6%; top: 6%; z-index: 14; display: flex; align-items: center; gap: 1px; padding: 2px 6px 2px 4px; border-radius: 10px; border: 1px solid #8fd96b; background: #1e3318; color: #e6ffd6; font: 700 11px/1.2 sans-serif; box-shadow: 0 2px 6px #0009, 0 0 8px #7ee05a60; pointer-events: none; animation: dl-sprout-pulse 2s ease-in-out infinite; }
@keyframes dl-sprout-pulse { 50% { transform: scale(1.1); box-shadow: 0 2px 6px #0009, 0 0 14px #9cff6a; } }

/* Nieumarły after its return: a translucent, flickering revenant. */
.dl-unit.reborn .dl-unit-body { background: linear-gradient(160deg, #8fffd0, #3f6f5c 50%, #6b4c9a); opacity: 0.88; animation: dl-revenant 3.2s ease-in-out infinite; }
.dl-unit.reborn .dl-art { filter: saturate(0.5) hue-rotate(80deg) brightness(1.05); }
@keyframes dl-revenant { 0%, 100% { box-shadow: 0 0 12px #6cffb860, 0 10px 20px rgba(0, 0, 0, 0.55); } 45% { box-shadow: 0 0 22px #a07bff90, 0 10px 20px rgba(0, 0, 0, 0.55); } 50% { opacity: 0.7; } 55% { opacity: 0.9; } }

/* Effect particles and floating labels. */
.s-petal { width: 10px; height: 7px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #fff0f6, #ff9ccc); color: #ff7ab8; }
.s-smoke { width: 22px; height: 22px; background: radial-gradient(circle, rgba(210, 200, 230, 0.85), rgba(120, 100, 160, 0.3) 60%, transparent 72%); color: transparent; box-shadow: none; filter: blur(2px); }
.s-confetti { width: 6px; height: 10px; border-radius: 1px; background: hsl(calc(var(--h, 0) * 1deg) 90% 65%); color: transparent; box-shadow: none; }
.s-confetti:nth-child(3n) { --h: 50; } .s-confetti:nth-child(3n+1) { --h: 140; } .s-confetti:nth-child(3n+2) { --h: 300; }
.s-soul { background: #d4ffe9; color: #6cffb8; }
.s-prism { background: #fff; color: #9fe6ff; }
.dl-ring.s-prism { border-color: #ffffff; box-shadow: 0 0 22px #8fe3ff, inset 0 0 18px #ff9cf0; background: none; }
.dl-ring.s-soul { border-color: #b8ffd9; box-shadow: 0 0 22px #6cffb8, inset 0 0 18px #a07bff; background: none; }
.dl-ring.s-smoke { border-color: rgba(200, 190, 230, 0.7); box-shadow: 0 0 18px #7d68b8; background: none; }
.p-prism { background: radial-gradient(circle, #fff 0 22%, #c8f3ff 40%, rgba(255, 140, 240, 0.4) 58%, rgba(120, 200, 255, 0) 72%); box-shadow: 0 0 28px 10px rgba(140, 220, 255, 0.65); }
.p-prism::after { background: linear-gradient(90deg, transparent, #ff6b6b66 20%, #ffd96b88 40%, #6bff9a88 60%, #6bc8ff99 80%, #fff); }
.dl-float.lava { font-size: 22px; color: #ffcf6a; -webkit-text-stroke: 1px #4a1200; text-shadow: 0 0 14px #ff5a1f; }
.dl-float.mirror { font-size: 22px; color: #e9fbff; -webkit-text-stroke: 1px #0b3a52; text-shadow: 0 0 14px #6fd6ff; }
.dl-float.bloom { font-size: 24px; color: #ffe0f0; -webkit-text-stroke: 1px #4a1030; text-shadow: 0 0 14px #ff8ac4; }
.dl-float.frog { font-size: 26px; color: #b6ff7a; -webkit-text-stroke: 1px #17360a; text-shadow: 0 3px 0 #17360a; transform-origin: left bottom; }
.dl-float.soul { font-size: 22px; color: #d4ffe9; -webkit-text-stroke: 1px #123a2a; text-shadow: 0 0 16px #6cffb8, 0 0 30px #a07bff; }
.dl-float.shade { font-size: 22px; color: #e6dcff; -webkit-text-stroke: 1px #241640; text-shadow: 0 0 14px #7d68b8; }
.dl-float.duel { font-size: 30px; color: #ffe39a; -webkit-text-stroke: 1.5px #4a2a00; text-shadow: 0 0 18px #ffb347, 0 3px 0 #4a2a00; }

/* Wylew Lawy: the stream and the cracked portrait. */
.dl-lava { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; overflow: visible; }
.dl-lava path { fill: none; stroke-linecap: round; }
.dl-lava .glow { stroke: #ff4a10; stroke-width: 22; opacity: 0.5; filter: blur(7px); }
.dl-lava .core { stroke: #ff8a1f; stroke-width: 10; }
.dl-lava .hot { stroke: #fff2a0; stroke-width: 3.5; }
.dl-crack { position: absolute; z-index: 5; border-radius: 50%; }
.dl-crack svg { width: 100%; height: 100%; overflow: visible; }
.dl-crack path { fill: none; stroke: #ffd36a; stroke-width: 3.2; stroke-linejoin: round; filter: drop-shadow(0 0 4px #ff5a1f) drop-shadow(0 0 10px #ff3a00); }

/* Nieumarły: bone-and-soul shards. */
.dl-bone { position: absolute; z-index: 5; width: 10px; height: 16px; clip-path: polygon(20% 0, 100% 25%, 80% 100%, 0 70%); background: linear-gradient(160deg, #f4fff8, #9fe8c4 50%, #8a6bd8); filter: drop-shadow(0 0 6px #6cffb8); }

/* Wyzwanie: a golden arena ellipse with runes rotating along its rim. */
.dl-brother-mark { position: absolute; z-index: 4; top: -5px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 27px; height: 20px; border: 1px solid #8a7891; border-radius: 10px; background: #292334; color: #a594b0; font: 800 23px/1 Georgia,serif; }
.dl-brother-mark.active { color: #fff1b7; border-color: #e9b54b; background: linear-gradient(100deg,#973e18,#533473); box-shadow: 0 0 12px #e49c4c99; }
.dl-card.dl-brother .dl-card-body small { font-size: .59em; line-height: 1.14; -webkit-line-clamp: 7; }
.dl-arena { position: absolute; z-index: 1; border-radius: 50%; border: 3px solid #ffd36a; background: radial-gradient(ellipse, rgba(255, 200, 90, 0.18), rgba(255, 170, 60, 0.06) 60%, transparent 72%); box-shadow: 0 0 30px #ffb347, inset 0 0 40px rgba(255, 190, 80, 0.45); }
.dl-arena::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(255, 230, 160, 0.8); animation: dl-spin 6s linear infinite; }
.dl-arena::after { content: "⚔"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 34px; color: #fff3c4; text-shadow: 0 0 16px #ffb347; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .dl-mist i, .dl-mirror, .dl-mirror::after, .dl-soil::before, .dl-soil::after, .dl-sprout-mark, .dl-unit.reborn .dl-unit-body, .dl-passives i.k-mirror { animation: none; }
}
