/* The Arena (practice games against the computer), its board, and the Learn
   to Play guide with its guide video. */

/* ------------------------------------------------------------ the pages */
.ar-hero { padding: clamp(24px, 5vw, 56px) 0 18px; max-width: 860px; }
.ar-hero h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 64px); line-height: 1.05; margin: 6px 0 14px; }
.ar-hero h1 span { background: linear-gradient(100deg, var(--accent), #ff7a8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ar-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ar-body { display: grid; gap: 22px; padding-bottom: 60px; }
.ar-panel { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-lg); padding: clamp(16px, 3vw, 28px); backdrop-filter: blur(10px); }
.ar-panel h2 { font-family: var(--display); font-size: clamp(19px, 2.4vw, 24px); margin: 0 0 14px; }
.ar-note { margin: 12px 0 0; }
.ar-lede { margin: 0 0 14px; max-width: 70ch; }

.ar-ranks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ar-rank { width: 100%; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.04); color: var(--ink); font: inherit; cursor: pointer; position: relative; transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s; }
.ar-rank b { font-family: var(--display); font-size: 18px; line-height: 1; }
.ar-rank span { font-size: 13px; font-weight: 700; }
.ar-rank i { font-style: normal; font-size: 13px; opacity: 0.85; }
.ar-rank:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); }
.ar-rank.is-beaten { background: color-mix(in srgb, #3ccf7a 16%, transparent); border-color: color-mix(in srgb, #3ccf7a 45%, transparent); }
.ar-rank.is-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ar-rank.is-locked { opacity: 0.45; cursor: not-allowed; }
.ar-rank.is-picked { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
@media (max-width: 560px) { .ar-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ar-rank { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; gap: 8px; padding: 9px 12px; } }

.ar-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--edge); margin-bottom: 16px; flex-wrap: wrap; }
.ar-tabs button { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.ar-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.ar-pick { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.ar-pick select { max-width: min(100%, 420px); font: inherit; color: var(--ink); background: var(--surface-solid); border: 1px solid var(--edge); border-radius: 10px; padding: 8px 10px; }
.ar-set { margin: 0 0 6px; }
.ar-warn { color: #ffb4a6; }
.ar-meter { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; max-width: 520px; }
.ar-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff7a8a); border-radius: inherit; }
.ar-groups h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 8px; color: var(--muted); }
.ar-groups h3 small { font-size: 14px; color: var(--ink); margin-left: 6px; letter-spacing: 0; }
.ar-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.ar-tile { position: relative; }
.ar-tile-card { display: block; width: 100%; padding: 0; border: 0; background: rgba(255, 255, 255, 0.06); border-radius: 7px; aspect-ratio: 63 / 88; overflow: hidden; cursor: zoom-in; position: relative; color: var(--ink); font: inherit; font-size: 12px; }
.ar-tile-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-n { position: absolute; left: 4px; bottom: 4px; background: rgba(10, 8, 24, 0.85); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 999px; }
.ar-swap { position: absolute; top: -6px; right: -6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface-solid); color: #7dffb0; font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-soft); transition: transform 0.25s var(--ease); }
.ar-swap:hover { transform: rotate(-120deg) scale(1.1); }
.ar-energy { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.ar-energy li { position: relative; }
.ar-e { display: inline-block; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--e) 30%, transparent); border: 1px solid var(--e); font-weight: 700; }
.ar-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.btn-big { font-size: 18px; padding: 13px 26px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ar-game.is-soon { opacity: 0.6; }
.ar-dialog { border: 0; padding: 0; background: none; max-width: min(900px, 94vw); color: var(--ink); }
.ar-dialog::backdrop { background: rgba(5, 3, 15, 0.7); backdrop-filter: blur(4px); }
.ar-dialog .ab-view { background: var(--surface-solid); border: 1px solid var(--edge); border-radius: var(--r-lg); padding: 18px; position: relative; }
.ar-dialog form { position: absolute; top: 10px; right: 10px; margin: 0; }

/* ------------------------------------------------------------ the board */
html.ab-open, html.ab-open body { overflow: hidden; }
.ab-stage { position: fixed; inset: 0; z-index: 900; background: radial-gradient(120% 70% at 50% 0%, #2b1f5c 0%, #120d2a 55%, #07060f 100%); color: var(--ink); display: flex; justify-content: center; overflow: auto; overscroll-behavior: contain; }
.ab-stage::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(40% 25% at 50% 52%, rgba(246, 183, 60, 0.12), transparent 70%), repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 47px); }
.ab-board { --bw: min(17vw, calc(10vh * 0.716), 104px); --aw: min(26vw, calc(14vh * 0.716), 150px); --hw: min(17vw, calc(10vh * 0.716), 96px); position: relative; width: min(980px, 100%); min-height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
.ab-board > * { flex: none; }
.ab-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ab-title { font-size: 14px; color: var(--muted); text-align: center; }
.ab-title b { color: var(--ink); }
.ab-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.06); color: var(--ink); font-size: 16px; cursor: pointer; flex: none; }
.ab-side { display: grid; gap: 5px; padding: 6px 8px; border-radius: 18px; border: 1px solid transparent; transition: border-color 0.3s, background 0.3s; }
.ab-side.is-turn { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: rgba(246, 183, 60, 0.05); }
.ab-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ab-meta strong { color: var(--ink); font-size: 15px; }
.ab-prizes { display: inline-flex; align-items: center; gap: 2px; }
.ab-prizes i { width: 9px; height: 13px; border-radius: 2px; background: var(--card-back, linear-gradient(135deg, #2a62c9, #173a80)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset; }
.ab-prizes b { margin-left: 4px; color: var(--ink); }
.ab-bench { display: grid; grid-template-columns: repeat(5, var(--bw)); justify-content: center; gap: clamp(4px, 1.4vw, 10px); }
.ab-act-row { display: flex; justify-content: center; }
.ab-slot { position: relative; padding: 0; border: 0; border-radius: 6px; aspect-ratio: 63 / 88; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset; cursor: pointer; color: var(--ink); font: inherit; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.ab-slot.is-empty { cursor: default; box-shadow: 0 0 0 1px dashed rgba(255, 255, 255, 0.1) inset; border: 1px dashed rgba(255, 255, 255, 0.12); background: none; }
.ab-slot.is-active { width: var(--aw); }
.ab-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.ab-slot.is-target { box-shadow: 0 0 0 3px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); animation: ab-pulse 1.1s ease-in-out infinite; }
@keyframes ab-pulse { 50% { transform: translateY(-3px) scale(1.03); } }
.ab-hp { position: absolute; left: 4%; right: 4%; bottom: 4%; height: 15px; border-radius: 999px; background: rgba(5, 4, 12, 0.82); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ab-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #36c46f, #8ee36b); transition: width 0.5s var(--ease); }
.ab-hp.is-low i { background: linear-gradient(90deg, #ff4b4b, #ff9a3c); }
.ab-hp b { position: relative; font-size: 11px; line-height: 1; text-shadow: 0 1px 2px #000; }
.ab-en { position: absolute; left: 2px; top: 30%; display: flex; flex-direction: column; gap: 1px; }
.ab-pip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--e); color: #fff; font-size: 9px; font-style: normal; font-weight: 800; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.75), 0 1px 3px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); vertical-align: middle; }
.ab-slot:not(.is-active) .ab-pip { width: 13px; height: 13px; font-size: 7px; }
.ab-cond { position: absolute; right: 3px; top: 3px; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.ab-cond i { font-style: normal; filter: drop-shadow(0 1px 2px #000); }
.ab-stage-n { position: absolute; right: 4px; top: 40%; font-size: 9px; color: var(--accent); text-shadow: 0 1px 2px #000; }
.ab-burst { position: absolute; left: 50%; top: 35%; transform: translate(-50%, 0); font-family: var(--display); font-weight: 800; font-size: clamp(18px, 4vw, 28px); pointer-events: none; animation: ab-burst 1.1s var(--ease) forwards; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.6); }
.ab-burst.is-damage { color: #ff6a5a; }
.ab-burst.is-heal { color: #7dffb0; }
@keyframes ab-burst { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(1); } }
.ab-slot.is-hit { animation: ab-hit 0.45s ease; }
@keyframes ab-hit { 20% { transform: translateX(-6px) rotate(-2deg); filter: brightness(1.8); } 45% { transform: translateX(5px) rotate(1deg); } 70% { transform: translateX(-3px); } }
.ab-stage.is-shake .ab-board { animation: ab-shake 0.4s ease; }
@keyframes ab-shake { 25% { transform: translateY(3px); } 50% { transform: translateY(-3px); } 75% { transform: translateY(2px); } }
.ab-feed { min-height: 54px; display: grid; align-content: center; justify-items: center; text-align: center; gap: 2px; padding: 4px 8px; }
.ab-feed p { margin: 0; font-size: 13px; color: var(--muted); }
.ab-feed p.is-new { font-size: 16px; font-weight: 700; color: var(--ink); animation: ab-in 0.35s var(--ease); }
@keyframes ab-in { from { opacity: 0; transform: translateY(6px); } }
.ab-hint { margin: 0; text-align: center; font-size: 13px; line-height: 1.35; color: var(--muted); }
.ab-link { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ab-hand { display: flex; gap: 8px; overflow-x: auto; padding: 8px 4px 4px; scroll-snap-type: x proximity; justify-content: safe center; }
.ab-card { flex: none; width: var(--hw); aspect-ratio: 63 / 88; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.05); cursor: pointer; scroll-snap-align: center; transition: transform 0.2s var(--ease), box-shadow 0.2s; opacity: 0.6; }
.ab-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.ab-card.can-play { opacity: 1; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 80%, transparent), 0 6px 16px rgba(0, 0, 0, 0.4); }
.ab-card:hover { transform: translateY(-6px); }
.ab-acts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.ab-acts .btn { padding: 10px 16px; }
.ab-energy-card { display: grid; place-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; border-radius: 6px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--e) 85%, #fff) 0 22%, var(--e) 23% 30%, color-mix(in srgb, var(--e) 40%, #120d2a) 31%); color: #fff; text-align: center; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5) inset; }
.ab-energy-card b { font-family: var(--display); font-size: clamp(16px, 4vw, 26px); text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6); }
.ab-energy-card small { font-size: 10px; font-weight: 700; padding: 0 4px; line-height: 1.1; }

.ab-pop { position: fixed; inset: 0; z-index: 2; display: grid; place-items: center; padding: 14px; background: rgba(5, 3, 15, 0.6); backdrop-filter: blur(3px); }
.ab-pop[hidden] { display: none; }
.ab-pop-in { position: relative; width: min(760px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: var(--surface-solid); border: 1px solid var(--edge); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); animation: ab-in 0.25s var(--ease); }
.ab-pop-x { position: absolute; top: 10px; right: 10px; }
.ab-view { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 18px; align-items: start; }
.ab-big { aspect-ratio: 63 / 88; border-radius: 10px; overflow: hidden; }
.ab-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-info h3 { margin: 0 34px 6px 0; font-family: var(--display); font-size: 20px; }
.ab-info p { margin: 6px 0; }
.ab-stats { color: var(--muted); }
.ab-attacks { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.ab-attacks li { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.ab-attacks small { display: block; color: var(--muted); margin-top: 3px; }
.ab-dmg { font-family: var(--display); font-weight: 800; float: right; }
.ab-cost em { font-size: 12px; color: var(--muted); }
.ab-off { color: #ffbf8a; font-style: italic; font-size: 13px; }
.ab-wr { font-size: 13px; color: var(--muted); }
.ab-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ab-choices .btn { justify-content: center; text-align: center; }
@media (max-width: 600px) { .ab-view { grid-template-columns: 1fr; } .ab-big { width: min(220px, 60vw); margin: 0 auto; } }
.ab-end { text-align: center; padding: 10px 4px; }
.ab-end-big { font-family: var(--display); font-size: clamp(28px, 6vw, 44px); margin: 0 0 6px; }
.ab-end.is-win .ab-end-big { background: linear-gradient(100deg, var(--accent), #ff7a8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ab-unlock { font-size: 18px; margin: 14px 0 4px; }
.ab-end .ab-choices { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.ab-help ol { padding-left: 20px; display: grid; gap: 8px; }
@media (max-height: 700px) { .ab-feed { min-height: 40px; } .ab-feed p:not(.is-new) { display: none; } .ab-hint { font-size: 12px; line-height: 1.25; } .ab-hand { padding-top: 4px; } }
/* Lorcana table */
.lb-board { --bw: min(16vw, calc(11vh * 0.716), 100px); }
.lb-row { display: flex; gap: clamp(4px, 1.2vw, 10px); justify-content: safe center; overflow-x: auto; padding: 4px 2px; min-height: calc(var(--bw) / 0.716 + 8px); align-items: center; scroll-snap-type: x proximity; }
.lb-none { margin: 0; align-self: center; font-size: 13px; color: var(--muted); opacity: 0.7; }
.lb-ch, .lb-small { position: relative; flex: none; width: var(--bw); aspect-ratio: 63 / 88; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.04); cursor: pointer; color: var(--ink); font: inherit; scroll-snap-align: center; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.lb-ch img, .lb-small img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; transition: transform 0.35s var(--ease), filter 0.35s; }
.lb-ch.is-ex img { transform: rotate(90deg) scale(0.716); filter: brightness(0.75) saturate(0.8); }
.lb-ch.is-target, .lb-small.is-target { box-shadow: 0 0 0 3px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); animation: ab-pulse 1.1s ease-in-out infinite; }
.lb-ch.is-hit, .lb-small.is-hit { animation: ab-hit 0.45s ease; }
.lb-num { position: absolute; left: 3%; right: 3%; bottom: 3%; display: flex; justify-content: space-between; gap: 2px; padding: 2px 3px; border-radius: 999px; background: rgba(5, 4, 12, 0.85); font-size: clamp(9px, 2.4vw, 12px); line-height: 1.1; }
.lb-num b { font-weight: 800; white-space: nowrap; }
.lb-num b.is-hurt { color: #ff8a7a; }
.lb-flags { position: absolute; right: 2px; top: 2px; display: flex; flex-direction: column; gap: 1px; font-size: clamp(11px, 2.6vw, 15px); }
.lb-flags i { font-style: normal; filter: drop-shadow(0 1px 2px #000); }
.lb-ex { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 1px 6px; border-radius: 999px; background: rgba(5, 4, 12, 0.8); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #ffd27a; }
.lb-extras { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lb-small { width: calc(var(--bw) * 0.55); }
.lb-small.is-loc { width: calc(var(--bw) * 0.55 / 0.716); aspect-ratio: 88 / 63; }
.lb-small.is-loc .lb-num { font-size: 10px; }
.lb-small.is-ex img { filter: brightness(0.7); }
.lb-lore { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 108px; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: visible; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset; }
.lb-lore i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #f3b53f, #ffe08a); opacity: 0.55; transition: width 0.6s var(--ease); }
.lb-lore b { position: relative; color: var(--ink); font-size: 13px; text-shadow: 0 1px 2px #000; }
.lb-lore .ab-burst { top: -6px; font-size: 20px; }
.ab-burst.is-lore { color: #ffd76a; }
.lb-ink { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); vertical-align: -1px; }
.lb-stats span { margin-right: 10px; font-weight: 700; }
.lb-kws, .lb-abilities { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.lb-abilities li.is-off { opacity: 0.75; }
.lb-mull h3 { margin: 0 34px 6px 0; font-family: var(--display); }
.lb-mull-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0; }
.lb-mull-card { width: min(92px, 12.5vw); aspect-ratio: 63 / 88; border-radius: 6px; overflow: hidden; }
.lb-mull-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-mull-card.is-inkable { box-shadow: 0 0 0 2px #7fc8ff; }
.ab-card.is-inkable { position: relative; }
.ab-card.is-inkable::after { content: "💧"; position: absolute; right: 2px; top: 2px; font-size: 13px; filter: drop-shadow(0 1px 2px #000); }
.ab-view.is-wide { grid-template-columns: minmax(180px, 340px) 1fr; }
.ab-view.is-wide .ab-big { aspect-ratio: 88 / 63; }
@media (max-width: 600px) { .ab-view.is-wide { grid-template-columns: 1fr; } .ab-view.is-wide .ab-big { width: min(320px, 86vw); } .lb-mull-card { width: calc((100% - 18px) / 4); max-width: 80px; } }
.ar-grid.is-wide { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ar-grid.is-wide .ar-tile-card { aspect-ratio: 88 / 63; }
.lp-kind-wide { grid-template-columns: 170px 1fr; }
@media (max-width: 480px) { .lp-kind-wide { grid-template-columns: 1fr; } .lp-kind-wide img { max-width: 260px; } }
@media (max-height: 700px) { .lb-board { --bw: min(15vw, calc(10vh * 0.716), 92px); } }

/* ------------------------------------------------------------ Learn to play */
.learn-page { padding-bottom: 60px; }
.lp-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.lp-toc a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.lp-toc a:hover { border-color: var(--accent); }
.lp-sec { margin: 54px 0; }
.lp-sec > p { max-width: 75ch; }
.lp-anatomy { display: grid; grid-template-columns: minmax(200px, 330px) 1fr; gap: 26px; align-items: start; margin: 20px 0; }
.lp-anat-card { position: relative; border-radius: 12px; overflow: visible; }
.lp-anat-card img { width: 100%; display: block; border-radius: 12px; box-shadow: var(--shadow); }
.lp-dot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 800; display: grid; place-items: center; font-size: 14px; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.5); }
.lp-callouts { margin: 0; padding-left: 24px; display: grid; gap: 10px; }
.lp-callouts li::marker { font-weight: 800; color: var(--accent); }
@media (max-width: 700px) { .lp-anatomy { grid-template-columns: 1fr; } .lp-anat-card { max-width: 300px; margin: 0 auto; } }
.lp-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.lp-kind { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--edge); align-items: start; }
.lp-kind img { width: 100%; border-radius: 6px; display: block; }
.lp-kind-ico { font-size: 40px; text-align: center; padding-top: 10px; }
.lp-kind h3 { margin: 0 0 6px; }
.lp-kind p { margin: 0; font-size: 15px; }
.lp-conds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.lp-conds > div { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--edge); }
.lp-conds p { margin: 6px 0 0; font-size: 15px; }
.lp-recipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lp-recipe > div { padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--edge); }
.lp-recipe b { font-family: var(--display); font-size: 30px; color: var(--accent); display: block; }
.lp-recipe span { font-weight: 700; }
.lp-recipe p { margin: 8px 0 0; font-size: 15px; }
.lp-list, .lp-ready { display: grid; gap: 8px; max-width: 78ch; }
.lp-chase { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.lp-chase li { display: grid; gap: 4px; align-content: start; }
.lp-chase img { width: 100%; border-radius: 9px; box-shadow: var(--shadow-soft); transition: transform 0.35s var(--ease); }
.lp-chase li:hover img { transform: translateY(-4px) rotate(-1deg); }
.lp-chase span { font-size: 13px; color: var(--muted); }
.lp-chase p { margin: 2px 0 0; font-size: 14px; }

/* ------------------------------------------------------------ the guide video */
.lp-video { margin: 10px 0 30px; }
.gv { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #07060f; border: 1px solid var(--edge); box-shadow: var(--shadow); }
.gv-screen { position: relative; aspect-ratio: 16 / 9; }
.gv canvas { width: 100%; height: 100%; display: block; }
.gv-cc[hidden] { display: none; }
.gv-cc { margin: 0; min-height: calc(2 * 1.35em + 16px); display: flex; align-items: center; justify-content: center; text-align: center; font-size: clamp(14px, 1.9vw, 19px); line-height: 1.35; padding: 8px 16px; background: #07060f; color: #fff; }
.gv-big { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 32px; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.gv-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.04); }
.gv-bar button { border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.gv-bar button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.gv-track { flex: 1 1 200px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); position: relative; cursor: pointer; }
.gv-track i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; }
.gv-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gv-chapters { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 12px; }
.gv-chapters button { flex: none; border: 1px solid var(--edge); background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.gv-chapters button.is-on { color: var(--ink); border-color: var(--accent); }
.ar-game .pp-acts .btn-ghost { color: var(--ink); text-shadow: none; }
/* One Piece table: a Leader and up to five Characters fit across a phone. */
.ob-board { --bw: min(13.5vw, calc(11vh * 0.716), 100px); }
@media (max-height: 700px) { .ob-board { --bw: min(13.5vw, calc(10vh * 0.716), 92px); } }
.ob-row { justify-content: safe center; }
.ob-gap { flex: none; width: clamp(4px, 2vw, 16px); }
.ob-unit.is-leader { box-shadow: 0 0 0 2px #e8c35a; }
.ob-unit.is-battle { box-shadow: 0 0 0 3px #ff6a5a, 0 0 18px rgba(255, 106, 90, 0.6); }
.ob-unit.is-leader.is-target, .ob-unit.is-battle.is-target { box-shadow: 0 0 0 3px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); }
.ob-pow b { font-variant-numeric: tabular-nums; }
.ob-don { color: #ffd76a; }
.ob-life { display: inline-flex; align-items: center; gap: 2px; }
.ob-life i { width: 8px; height: 11px; border-radius: 2px; background: linear-gradient(135deg, #c8302b, #7a1414); box-shadow: 0 0 0 1px #e8c35a inset; }
.ob-life em { font-style: normal; color: #ff8a7a; font-weight: 800; }
.ob-life b { margin-left: 4px; }
.ob-donmeta { font-variant-numeric: tabular-nums; }
.ab-card { position: relative; }
.ob-ctr { position: absolute; left: 2px; top: 2px; padding: 1px 5px; border-radius: 999px; background: rgba(5, 4, 12, 0.85); color: #8fe3a2; font-size: 11px; font-weight: 800; }
.ob-def h3 { margin: 0 34px 6px 0; font-family: var(--display); }
.ob-def-card { width: min(160px, 40vw); aspect-ratio: 63 / 88; margin: 10px auto; border-radius: 8px; overflow: hidden; }
.ob-def-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Magic table: creatures in a row, other permanents small, lands as chips. */
.mb-board { --bw: min(14.5vw, calc(10.5vh * 0.716), 100px); }
@media (max-height: 700px) { .mb-board { --bw: min(14.5vw, calc(9.5vh * 0.716), 88px); } }
.mb-unit.is-battle { box-shadow: 0 0 0 3px #ff6a5a, 0 0 18px rgba(255, 106, 90, 0.6); }
.mb-unit.is-blocking { box-shadow: 0 0 0 3px #7fc8ff, 0 0 16px rgba(127, 200, 255, 0.55); }
.mb-unit.is-picked { transform: translateY(-6px); box-shadow: 0 0 0 3px #ffd76a, 0 0 18px rgba(255, 215, 106, 0.6); }
.mb-unit.is-target.is-picked, .mb-unit.is-target.is-battle, .mb-unit.is-target.is-blocking { animation: ab-pulse 1.1s ease-in-out infinite; }
.mb-blk { position: absolute; left: 2px; top: 2px; font-size: clamp(12px, 2.8vw, 16px); filter: drop-shadow(0 1px 2px #000); }
.mb-lands { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; padding: 2px 0; }
.mb-land { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--k) 70%, transparent); background: color-mix(in srgb, var(--k) 18%, rgba(10, 8, 20, 0.85)); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.2; cursor: pointer; }
.mb-land b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12ch; }
.mb-land span { font-variant-numeric: tabular-nums; color: var(--muted); }
.mb-land.is-target { box-shadow: 0 0 0 2px var(--accent), 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); animation: ab-pulse 1.1s ease-in-out infinite; }
.mb-none { font-size: 12px; color: var(--muted); opacity: 0.7; }
.mb-meta.is-target { cursor: pointer; border-radius: 999px; box-shadow: 0 0 0 3px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 60%, transparent); animation: ab-pulse 1.1s ease-in-out infinite; }
.mb-life b { font-variant-numeric: tabular-nums; color: #ff9d8f; }
.mb-pip { display: inline-grid; place-items: center; min-width: 1.25em; height: 1.25em; margin: 0 1px; padding: 0 2px; border-radius: 999px; background: #c9c2b8; color: #1a1612; font-style: normal; font-size: 0.8em; font-weight: 800; line-height: 1; vertical-align: 0.05em; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); }
.mb-pip-w { background: #f8f1d6; }
.mb-pip-u { background: #8fc5ea; }
.mb-pip-b { background: #a59a95; color: #0d0b0b; }
.mb-pip-r { background: #ef9a7a; }
.mb-pip-g { background: #93caa0; }
.mb-pip-c { background: #d4d0cc; }
.mb-drawn { display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: 100%; height: 100%; padding: 8% 6%; border-radius: 6px; background: linear-gradient(160deg, color-mix(in srgb, var(--k) 55%, #1b1626), #120e1a); box-shadow: 0 0 0 2px color-mix(in srgb, var(--k) 70%, #000) inset; text-align: center; overflow: hidden; }
.mb-drawn b { font-size: clamp(8px, 1.9vw, 12px); line-height: 1.1; color: #fff; text-shadow: 0 1px 2px #000; overflow-wrap: anywhere; }
.mb-drawn i { font-style: normal; font-size: clamp(16px, 4vw, 30px); font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000; }
.lb-mull-card .mb-drawn, .ab-card .mb-drawn, .ab-big .mb-drawn { aspect-ratio: 63 / 88; }
/* Yu-Gi-Oh! table: monsters in a row (Defense Position turned sideways), Spells and Traps small. */
.yb-board { --bw: min(14.5vw, calc(12vh * 0.686), 100px); }
@media (max-height: 700px) { .yb-board { --bw: min(14.5vw, calc(9.5vh * 0.686), 88px); } }
.yb-unit, .yb-st { aspect-ratio: 59 / 86; }
.yb-unit.is-def img, .yb-unit.is-def .yb-back { transform: rotate(90deg) scale(0.686); }
.yb-unit.is-down img, .yb-st.is-down img { filter: brightness(0.5) saturate(0.6); }
.yb-unit.is-battle { box-shadow: 0 0 0 3px #ff6a5a, 0 0 18px rgba(255, 106, 90, 0.6); }
.yb-unit.can-hit { box-shadow: 0 0 0 2px #ffd76a, 0 0 14px rgba(255, 215, 106, 0.5); }
.yb-unit.is-target.is-battle, .yb-unit.is-target.can-hit { box-shadow: 0 0 0 3px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 70%, transparent); }
.yb-unit .lb-num { flex-direction: column; align-items: center; gap: 0; border-radius: 6px; padding: 1px 2px; font-size: clamp(8.5px, 2.3vw, 11px); }
.yb-unit .lb-num b { opacity: 0.6; }
.yb-unit .lb-num b.is-pos { opacity: 1; }
.yb-unit .lb-num b.is-up { color: #8fe3a2; }
.yb-back { display: block; width: 100%; height: 100%; border-radius: 6px; background: radial-gradient(ellipse 34% 26% at 50% 50%, #e8a33a 0 40%, #5a2a10 41% 55%, transparent 56%), radial-gradient(ellipse at 50% 50%, #7a3d17, #3a1a0a 75%); box-shadow: 0 0 0 2px #2a1206 inset, 0 0 0 4px #b5762e inset; transition: transform 0.35s var(--ease); }
.yb-st.is-field { box-shadow: 0 0 0 2px #4fc38a; }
.yb-st.is-target, .yb-meta.is-target { box-shadow: 0 0 0 3px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 60%, transparent); animation: ab-pulse 1.1s ease-in-out infinite; }
.yb-meta.is-target { cursor: pointer; border-radius: 999px; }
.yb-sts { min-height: calc(var(--bw) * 0.55 / 0.686); align-items: center; }
.yb-none { font-size: 12px; color: var(--muted); opacity: 0.7; }
.yb-lp b { font-variant-numeric: tabular-nums; color: #ffd76a; font-size: 15px; }
.yb-pile { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.yb-drawn { display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: 100%; height: 100%; padding: 8% 6%; border-radius: 6px; background: linear-gradient(160deg, color-mix(in srgb, var(--k) 45%, #2a2238), #14101c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--k) 70%, #000) inset; text-align: center; overflow: hidden; }
.yb-drawn b { font-size: clamp(8px, 1.9vw, 12px); line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.yb-drawn i { font-style: normal; font-size: clamp(10px, 2.4vw, 14px); font-weight: 800; color: #fff; }
.ab-card .yb-drawn, .ab-big .yb-drawn { aspect-ratio: 59 / 86; }
.yb-stars { color: #f0b429; letter-spacing: -1px; }
.yb-extra h3, .yb-pickgy h3 { margin: 0 34px 8px 0; font-family: var(--display); }
.yb-extra .ab-choices small { opacity: 0.8; font-weight: 400; }
.yb-extra-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 50vh; overflow-y: auto; }
.yb-x { width: 100%; aspect-ratio: 59 / 86; padding: 0; border: 0; border-radius: 5px; overflow: hidden; background: none; cursor: pointer; }
.yb-x img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-acts .btn.is-ready { border-color: #ffd76a; color: #ffd76a; }
