/* ==========================================================================
   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-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: grid; place-items: center; min-height: 120px; border-bottom: 1px solid var(--line); }
.dl-inspect small { color: var(--faint); text-align: center; }
.dl-inspect .dl-card { --w: 180px; }
.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-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-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; }
.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; }
@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; }
@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; }
.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-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-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, 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: 260px; }
  .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; }
}
