/* Disney Lorcana theme: the Great Illuminary at night. Deep ink-blue
   surfaces, gold filigree edges, Source Serif 4 titles over Outfit text,
   and the six inks. Everything here is original; no publisher artwork. */
:root {
  --bg: #0b1030;
  --bg2: #141a46;
  --ink: #f4efe2;
  --muted: #b8b3cf;
  --surface: rgba(16, 22, 58, 0.8);
  --toggle-bg: rgba(16, 22, 58, 0.72);
  --surface-solid: #121848;
  --edge: rgba(232, 196, 110, 0.3);
  --line: rgba(244, 239, 226, 0.1);
  --accent: #e8c46e;
  --accent-2: #8fc7ff;
  --accent-ink: #1a1408;
  --display: "Source Serif 4", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --shadow: 0 22px 50px rgba(2, 4, 20, 0.6);
  --shadow-soft: 0 10px 26px rgba(2, 4, 20, 0.4);
  --veil: radial-gradient(120% 90% at 50% 30%, rgba(11, 16, 48, 0.05), rgba(11, 16, 48, 0.55) 70%, rgba(11, 16, 48, 0.88));
  --gild: linear-gradient(135deg, #9a7128, #f6dc94 30%, #c1923a 50%, #fbe9b4 70%, #9a7128);
  --card-back: radial-gradient(circle at 50% 50%, #e8c46e 0 16%, transparent 17%), radial-gradient(circle at 50% 50%, #1b2366 0 40%, #2b3a8f 41% 46%, #141a46 47%);
  color-scheme: dark;
}
body { font-size: 17.5px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: 0.005em; }
h1 { text-shadow: 0 2px 22px rgba(2, 4, 20, 0.7); }
.kicker, .focus-kicker, .meta-row dt, .fact-grid dt, .zone-label, .field span, .search-group, .switcher-head { letter-spacing: 0.14em; }
.btn, .chip-btn, .topnav a, .tabs button, .scope-toggle a, .crumbs a { font-weight: 600; }
.scene { background: radial-gradient(100% 70% at 50% 0%, #26307a, #0b1030 70%); }
.scene::after { content: ""; position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* Gold filigree frames */
.set-hero, .focus-panel, .toolbar, .prose-block, .htp-win, .htp-type, .phase, .sources, .card-modal, .enc-card, .quick, .showcase-card {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, rgba(246, 220, 148, 0.6), rgba(154, 113, 40, 0.25) 35%, rgba(143, 199, 255, 0.18) 65%, rgba(246, 220, 148, 0.6)) border-box;
}
.card-modal { background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--gild) border-box; border: 1.5px solid transparent; }
.set-hero, .prose-block, .focus-panel { position: relative; }
.set-hero::before, .focus-panel::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(232, 196, 110, 0.14); border-radius: calc(var(--r-lg) - 6px); pointer-events: none; }
.btn-primary { background: var(--gild); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 8px 24px rgba(232, 196, 110, 0.3); }
.btn-ghost, .chip-btn, .search-toggle, .switcher-btn { background: rgba(16, 22, 58, 0.85); border-color: rgba(232, 196, 110, 0.38); }
.brand-game { background: transparent; color: var(--accent); border: 1px solid rgba(232, 196, 110, 0.5); font-family: var(--display); font-weight: 700; font-size: 0.82rem; }
.topbar { background: linear-gradient(180deg, rgba(11, 16, 48, 0.86), rgba(11, 16, 48, 0.35)); }
.topbar.is-scrolled { background: rgba(11, 16, 48, 0.9); box-shadow: 0 1px 0 rgba(232, 196, 110, 0.25); }
.tabs button[aria-selected="true"], .scope-toggle a[aria-selected="true"], .mode-switch a[aria-current] { background: var(--gild); color: var(--accent-ink); }
.footer { background: rgba(7, 10, 32, 0.95); }

/* The six inks */
.ink-dot { display: inline-block; width: 0.8em; height: 0.8em; transform: rotate(45deg); border-radius: 2px; vertical-align: -0.02em; margin: 0 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5); background: #b9a6e0; }
.ink-amber { --ic: #f4b223; } .ink-amethyst { --ic: #a555b4; } .ink-emerald { --ic: #2fa03b; } .ink-ruby { --ic: #e0213f; } .ink-sapphire { --ic: #1a9ad6; } .ink-steel { --ic: #a9b3bf; }
.ink-dot[class*="ink-"] { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ic) 40%, #fff), var(--ic)); }
.ci { display: inline-flex; gap: 2px; margin-top: 4px; }
.ink-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; background: color-mix(in srgb, var(--ic, #888) 22%, transparent); border: 1px solid color-mix(in srgb, var(--ic, #888) 55%, transparent); }
.lor-stats-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.lor-cost { display: inline-flex; align-items: center; gap: 6px; }
.lor-cost b { display: inline-grid; place-items: center; width: 1.9em; height: 2.1em; font: 700 1rem/1 var(--display); color: #1a1408; background: var(--gild); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.lor-cost i { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.lor-stat { display: inline-flex; gap: 4px; align-items: center; padding: 2px 10px; border-radius: 8px; background: rgba(244, 239, 226, 0.07); border: 1px solid var(--line); }
.lor-stat b { font-family: var(--display); }
.lor-version { display: block; font-size: 0.62em; font-style: italic; font-weight: 600; color: var(--accent); margin-top: 2px; }
.lor-text { padding: 12px 16px; margin: 8px 0; border-radius: 12px; background: rgba(244, 239, 226, 0.05); border: 1px solid rgba(232, 196, 110, 0.18); }
.lor-text p { margin: 0 0 6px; }
.lor-text .ability { font-family: var(--display); letter-spacing: 0.02em; color: var(--accent); }
.lg { display: inline-grid; place-items: center; min-width: 1.3em; height: 1.3em; padding: 0 2px; border-radius: 4px; font-style: normal; font-size: 0.9em; line-height: 1; background: rgba(232, 196, 110, 0.18); color: var(--accent); vertical-align: -0.12em; }
.lg-l { color: #c7a8ff; background: rgba(199, 168, 255, 0.16); }
.lg-i { color: #ffd88a; }
.flavor { font-family: var(--display); font-style: italic; color: var(--muted); }
.enc-links .chip { text-decoration: none; }
.enc-links .chip:hover, .set-stories .chip:hover { border-color: var(--accent); color: var(--accent); }
.set-stories { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; font-size: 0.92rem; }
.set-stories .chip { text-decoration: none; }

/* Card tiles: the effect is an aura around the card so the image stays untouched */
.card-tile { background: rgba(14, 19, 52, 0.88); border-color: rgba(232, 196, 110, 0.22); }
.card-tile .card-img { aspect-ratio: 734 / 1024; border-radius: 4.5% / 3.2%; background: #080b24; }
.card-tile::after { top: calc(var(--pad) - 6px); left: calc(var(--pad) - 6px); right: calc(var(--pad) - 6px); z-index: 0; border-radius: 14px; filter: blur(3px); }
.card-tile.is-lit::after { opacity: 0.95; }
.card-tile .card-img { z-index: 1; }
.card-tile.is-lit { border-color: color-mix(in srgb, var(--tc) 60%, #e8c46e); }
.card-tile.is-lit::before { opacity: calc(0.16 + var(--far, 0) * 0.16); }
.is-lit[data-foil]::before { opacity: calc(0.14 + var(--far, 0) * 0.14); }
.cm-card .card-img { aspect-ratio: 734 / 1024; overflow: visible; }
.cm-card .card-img::after { inset: -14px; z-index: -1; border-radius: 22px; filter: blur(6px); opacity: 0.85; }
.cm-card .card-img img { border-radius: 4.5% / 3.2%; position: relative; z-index: 1; object-fit: contain; }
.cm-card .card-img::before { z-index: 2; border-radius: 4.5% / 3.2%; }
.cm-stage { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tc) 30%, transparent), transparent 70%), radial-gradient(120% 100% at 50% 0%, #1e276a, #0b1030); }
.printing-card img { aspect-ratio: 734 / 1024; object-fit: contain; }

/* Timeline plaques: card art in a gold frame with an original hexagon emblem */
.lor-pack { width: 230px; }
.plaque { position: relative; display: grid; grid-template-rows: 160px auto auto auto; justify-items: center; gap: 6px; padding: 12px 12px 14px; border-radius: 16px; text-align: center; background: linear-gradient(#141a46, #0b1030) padding-box, var(--gild) border-box; border: 2px solid transparent; box-shadow: var(--shadow); }
.plaque-art { width: 100%; height: 160px; border-radius: 10px; overflow: hidden; background: #1b2366; box-shadow: inset 0 0 0 1px rgba(246, 220, 148, 0.3); }
.plaque-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; transform: scale(1.12); transform-origin: 50% 0; }
.plaque .plaque-icon { margin-top: -36px; width: 60px; height: 60px; display: grid; place-items: center; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.lor-emblem { width: 100%; height: 100%; display: block; }
.plaque-name { font-family: var(--display); font-size: 1.02rem; line-height: 1.15; min-height: 2.3em; display: grid; place-items: center; }
.plaque-year { font-style: normal; color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.1em; }
.plaque-credit { font-size: 0.66rem; color: var(--muted); }
.is-upcoming .plaque { filter: saturate(0.75); }
.is-upcoming .plaque-year { color: var(--accent-2); }
.lor-chapter { background: linear-gradient(#141a46, #0b1030) padding-box, var(--gild) border-box; border: 2px solid transparent; width: 200px; }
.lor-chapter .chapter-year { font-size: 2.6rem; font-family: var(--display); font-weight: 700; color: transparent; background: var(--gild); -webkit-background-clip: text; background-clip: text; }
.lor-chapter strong { font-size: 0.84rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lor-chapter em { font-size: 0.92rem; color: var(--ink); }
.skel-pack { width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(#f4b223 0 16.6%, #a555b4 16.6% 33.3%, #2fa03b 33.3% 50%, #e0213f 50% 66.6%, #1a9ad6 66.6% 83.3%, #a9b3bf 83.3%); animation: spin 1.6s linear infinite; mask: radial-gradient(circle, transparent 42%, #000 44%); -webkit-mask: radial-gradient(circle, transparent 42%, #000 44%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Set page hero */
.lor-plaque { position: relative; display: grid; justify-items: center; gap: 8px; }
.lor-plaque .plaque-art { height: auto; aspect-ratio: 734 / 1024; max-width: 280px; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(#0b1030, #0b1030) padding-box, var(--gild) border-box; }
.lor-plaque .plaque-art img { transform: none; object-position: 50% 50%; animation: none; filter: none; max-height: none; }
.lor-plaque .plaque-icon { margin-top: -46px; width: 84px; height: 84px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55)); animation: none; }
.lor-plaque .plaque-credit { text-align: center; }
.lor-set .set-hero { grid-template-columns: minmax(200px, 300px) 1fr; }
@media (max-width: 640px) { .lor-set .set-hero { grid-template-columns: minmax(0, 1fr); } .lor-plaque .plaque-art { width: min(100%, 260px); } .scope-toggle a { font-size: min(0.9rem, 3vw); } }

/* Battle: the full card in a gold medallion, framed on the character */
.lor-battle .bt-fig { border-radius: 50%; overflow: hidden; border: 3px solid transparent; background: linear-gradient(#0b1030, #0b1030) padding-box, var(--gild) border-box; box-shadow: 0 0 30px color-mix(in srgb, var(--fc) 50%, transparent); }
.lor-battle .bt-fig img { object-fit: cover; object-position: 50% 22%; transform: scale(1.6); transform-origin: 50% 22%; animation: none; filter: none; }
.lor-battle .bt-right .bt-fig img { transform: scale(1.6); }
.lor-battle .bt-fx { inset: 0; }
.lor-battle.battle { height: clamp(260px, 30vw, 340px); }
.lor-battle .bt-fig { width: clamp(96px, 13vw, 160px); }
.lor-battle .bt-arena { align-items: center; }
.battle { background: radial-gradient(120% 90% at 50% 120%, rgba(232, 196, 110, 0.22), transparent 60%), rgba(14, 19, 52, 0.78); }

/* Encyclopedia */
.enc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.enc-tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(232, 196, 110, 0.38); font-weight: 600; font-size: 0.9rem; }
.enc-tabs a[aria-current] { background: var(--gild); color: var(--accent-ink); }
.enc-sec { margin-top: 34px; }
.lor-enc strong { font-family: var(--display); font-size: 1.02rem; }
.lor-enc .enc-art { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #1b2366; margin-bottom: 8px; }
.lor-enc .enc-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; transform: scale(1.15); transform-origin: 50% 0; transition: transform 0.5s var(--ease); }
.lor-enc:hover .enc-art img { transform: scale(1.22); }
.pip-btn { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); opacity: 0.6; }
.pip-btn[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.entry-hero { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 28px; align-items: center; margin-bottom: 8px; }
.entry-art { margin: 0; }
.lor-entry-art img { width: 100%; aspect-ratio: 734 / 1024; object-fit: contain; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(#0b1030, #0b1030) padding-box, var(--gild) border-box; }

/* World & How to Play */
.ink-wheel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ink-c { display: grid; justify-items: start; gap: 4px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--ic); transition: transform 0.3s var(--ease); }
.ink-c:hover { transform: translateY(-4px); }
.ink-c span { color: var(--muted); font-size: 0.95rem; }
.ink-gem { width: 40px; height: 46px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ic) 35%, #fff), var(--ic) 60%, color-mix(in srgb, var(--ic) 60%, #000)); }
.ink-gem-amber { --ic: #f4b223; } .ink-gem-amethyst { --ic: #a555b4; } .ink-gem-emerald { --ic: #2fa03b; } .ink-gem-ruby { --ic: #e0213f; } .ink-gem-sapphire { --ic: #1a9ad6; } .ink-gem-steel { --ic: #a9b3bf; }
.life-dial { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #1e276a, #0b1030); box-shadow: 0 0 0 3px #e8c46e; }
.life-dial b { font-family: var(--display); font-size: 2rem; color: var(--accent); animation: lore 5s steps(1) infinite; }
@keyframes lore { 0% { opacity: 1; } 50% { opacity: 0.35; } 55% { opacity: 1; } }
.bench i.tapped { transform: rotate(90deg); }
.lands i.inkwell { background: linear-gradient(160deg, #2b3a8f, #141a46); box-shadow: inset 0 0 0 2px rgba(232, 196, 110, 0.45); }
.slot-big .card-back { background: linear-gradient(160deg, #2b3a8f, #141a46); }
.lor-types { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.type-glyph { font-size: 2rem; color: var(--accent); line-height: 1; }
.lor-turn { grid-template-columns: repeat(3, 1fr); }
.lor-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 26px; }
@media (max-width: 980px) { .lor-turn { grid-template-columns: 1fr; } .entry-hero { grid-template-columns: 1fr; } }
