/* ELARUNE — THE ENCHANTED REALM.
   Cinematic dark fantasy: obsidian night, mystic violet, arcane purple,
   crystal pink glows, ethereal gold ornaments, moonlight text.
   The world comes first — this is a fantasy realm page, not a dashboard. */
:root {
  --obsidian: #090611;
  --violet-deep: #291044;
  --arcane: #7735c5;
  --pink: #d65bff;
  --gold: #d8b45a;
  --gold-deep: #a8842f;
  --moon: #e9e2f5;
  --muted: #a99cc4;
  --line: rgba(214, 91, 255, 0.22);
  --panel: rgba(41, 16, 68, 0.55);
  --panel-solid: #150a28;
  /* Tier identities (prompt section 4). */
  --tier-common: #b8a9d9;
  --tier-uncommon: #34d399;
  --tier-rare: #38bdf8;
  --tier-epic: #a855f7;
  --tier-mythic: #d8b45a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(119, 53, 197, 0.35), transparent 60%),
    radial-gradient(900px 600px at 10% 30%, rgba(41, 16, 68, 0.8), transparent 60%),
    var(--obsidian);
  color: var(--moon);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 1.02rem;
  overflow-x: hidden;
}
a { color: var(--pink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
h1, h2, h3, .logo, .btn, .eyebrow, .hero-realm, .region-num {
  font-family: "Cinzel", Georgia, serif;
}
h1 { font-size: clamp(3rem, 11vw, 7.5rem); line-height: 1; letter-spacing: 0.08em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; }
h3 { font-size: 1.2rem; line-height: 1.4; }
section[id] { scroll-margin-top: 84px; }

/* Elegant loading transition */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--obsidian);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: "Cinzel", Georgia, serif; font-size: 2.2rem; font-weight: 700;
  letter-spacing: 0.28em; color: var(--moon);
  text-shadow: 0 0 34px rgba(214, 91, 255, 0.7);
}
.loader-line { width: 180px; height: 2px; background: rgba(233, 226, 245, 0.15); overflow: hidden; }
.loader-line span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--arcane), var(--gold));
  animation: loaderSlide 1.1s ease-in-out infinite;
}
@keyframes loaderSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
#loader p { color: var(--muted); letter-spacing: 0.3em; font-size: 0.75rem; text-transform: uppercase; margin: 0; }

/* Top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 6, 17, 0.82);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.logo {
  font-size: 1.3rem; font-weight: 700; letter-spacing: 0.22em; color: var(--moon);
  text-decoration: none; line-height: 1.1;
}
.logo span {
  display: block; font-size: 0.55rem; letter-spacing: 0.32em; color: var(--gold);
  font-family: "Outfit", sans-serif; font-weight: 500; text-transform: uppercase; margin-top: 2px;
}
.topnav { display: flex; gap: 26px; align-items: center; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.topnav a:hover { color: var(--moon); }
.topnav .nav-cta {
  color: var(--obsidian); background: linear-gradient(135deg, var(--gold), #f0d48a);
  padding: 9px 20px; border-radius: 999px; font-weight: 700;
}
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--moon); margin: 4px 0; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .topnav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: rgba(9, 6, 17, 0.97); padding: 20px 24px 26px; border-bottom: 1px solid var(--line);
  }
  .topnav.open { display: flex; }
}

/* Buttons */
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 14px 30px;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-primary {
  background: linear-gradient(135deg, var(--arcane), var(--pink));
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(214, 91, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-ghost { background: rgba(233, 226, 245, 0.06); color: var(--moon); border-color: rgba(233, 226, 245, 0.35); }
.chip {
  background: rgba(41, 16, 68, 0.6); color: var(--moon); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
}
.chip.active { background: rgba(119, 53, 197, 0.5); border-color: var(--pink); color: #ffffff; }

/* Layout + reveal transitions */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; }
.section { padding: 72px 0 20px; }
.section h2 { margin: 0 0 12px; }
.section-sub { color: var(--muted); margin: 0 0 30px; max-width: 680px; font-size: 1.08rem; }
.eyebrow {
  color: var(--gold); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase; margin: 0 0 12px;
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.revealed { opacity: 1; transform: none; }

/* SECTION 1 — Cinematic hero */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.hero-media { position: absolute; inset: -4% 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 6, 17, 0.25) 0%, rgba(9, 6, 17, 0.1) 45%, var(--obsidian) 96%),
    radial-gradient(900px 420px at 50% 108%, rgba(119, 53, 197, 0.45), transparent 65%);
}
.hero-fog {
  position: absolute; left: -20%; width: 140%; height: 40%; bottom: -4%;
  background: radial-gradient(closest-side, rgba(147, 92, 214, 0.28), transparent 70%);
  filter: blur(18px); animation: fogDrift 26s ease-in-out infinite alternate;
}
.fog-b { bottom: 12%; opacity: 0.6; animation-duration: 34s; animation-delay: -12s; }
@keyframes fogDrift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--pink) 55%, transparent 75%);
  opacity: 0; animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(12vh) scale(0.6); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: translateY(-88vh) scale(1.15); opacity: 0; }
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 20px;
}
.hero-eyebrow {
  color: var(--gold); letter-spacing: 0.42em; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; margin: 0 0 18px;
}
.hero-content h1 {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 20%, var(--moon) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 80px rgba(214, 91, 255, 0.35);
}
.hero-realm {
  font-size: clamp(0.95rem, 2.6vw, 1.5rem); letter-spacing: 0.52em; color: var(--gold);
  margin: 14px 0 0; font-weight: 700;
}
.hero-quote { color: var(--moon); font-size: clamp(1rem, 2.4vw, 1.3rem); font-style: italic; opacity: 0.92; margin: 26px 0 34px; max-width: 640px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%); }
.scroll-cue span {
  display: block; width: 26px; height: 42px; border: 1px solid rgba(233, 226, 245, 0.5); border-radius: 999px; position: relative;
}
.scroll-cue span::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 5px; height: 9px; margin-left: -2.5px;
  border-radius: 999px; background: var(--gold); animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop { 0%, 100% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } }

/* SECTION 2 — Regions as destinations, not cards */
.regions { display: flex; flex-direction: column; gap: 26px; }
.region { position: relative; border-radius: 28px; overflow: hidden; min-height: 420px; border: 1px solid var(--line); }
.region img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s ease;
}
.region:hover img { transform: scale(1.05); }
.region-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9, 6, 17, 0.88) 0%, rgba(9, 6, 17, 0.45) 52%, rgba(9, 6, 17, 0.1) 100%),
              linear-gradient(0deg, rgba(9, 6, 17, 0.85), transparent 55%);
}
.region-body { position: relative; z-index: 2; max-width: 520px; padding: 48px 44px; }
.region-num {
  display: block; font-size: 3.2rem; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px var(--gold); margin-bottom: 14px;
}
.region-body h3 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 14px 0 10px; }
.region-body p { color: var(--moon); opacity: 0.9; margin: 0 0 24px; font-size: 1.1rem; }

/* SECTION 3 — Beings gallery (sideways shelves + collectible frames) */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 34px; }
.tier-section { margin-bottom: 44px; }
.tier-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--tier-common);
  padding: 0 0 10px 14px; margin: 0 0 18px;
}
.tier-section[data-tier="Uncommon"] .tier-head { border-left-color: var(--tier-uncommon); }
.tier-section[data-tier="Rare"] .tier-head { border-left-color: var(--tier-rare); }
.tier-section[data-tier="Epic"] .tier-head { border-left-color: var(--tier-epic); }
.tier-section[data-tier="Mythic"] .tier-head { border-left-color: var(--tier-mythic); }
.tier-head h3 { margin: 0; font-size: 1.5rem; }
.tier-count { color: var(--muted); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; }
.tier-head-right { display: flex; align-items: center; gap: 14px; }
.row-nav { display: flex; gap: 8px; }
.row-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(41, 16, 68, 0.7);
  color: var(--moon); font-size: 1.25rem; line-height: 1; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.row-btn:hover { border-color: var(--pink); color: var(--pink); }
.tier-row {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 4px 18px;
  scrollbar-width: thin; scrollbar-color: rgba(214, 91, 255, 0.35) transparent;
}
.tier-row::-webkit-scrollbar { height: 8px; }
.tier-row::-webkit-scrollbar-thumb { background: rgba(214, 91, 255, 0.35); border-radius: 999px; }
.tier-row .roster-card { flex: 0 0 230px; scroll-snap-align: start; }
@media (max-width: 760px) { .tier-row .roster-card { flex-basis: 200px; } }

/* Collectible frames: gold-trimmed, glowing, magical on hover */
.card {
  background: linear-gradient(180deg, rgba(41, 16, 68, 0.75), rgba(21, 10, 40, 0.9));
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card h3 { margin: 14px 0 8px; font-size: 1.25rem; }
.card p { color: var(--muted); margin: 4px 0; }
.card .code { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; margin: 0; }
.roster-card { cursor: pointer; position: relative; }
.roster-card::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  border: 1px solid rgba(216, 180, 90, 0); transition: border-color 0.25s ease;
}
.roster-card:hover { transform: translateY(-6px); border-color: rgba(216, 180, 90, 0.55); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55), 0 0 34px rgba(214, 91, 255, 0.25); }
.roster-card:hover::after { border-color: rgba(216, 180, 90, 0.35); }
.roster-card.selected { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 16px 40px rgba(214, 91, 255, 0.3); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.roster-card .card-meta .code { margin: 0; }
.art-scene {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid rgba(216, 180, 90, 0.25); background: #0a0a12;
}
.art-scene img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.scene-common { box-shadow: inset 0 0 34px rgba(184, 169, 217, 0.3); }
.scene-uncommon { box-shadow: inset 0 0 34px rgba(52, 211, 153, 0.28); }
.scene-rare { box-shadow: inset 0 0 34px rgba(56, 189, 248, 0.28); }
.scene-epic { box-shadow: inset 0 0 34px rgba(168, 85, 247, 0.32); }
.scene-mythic { box-shadow: inset 0 0 34px rgba(216, 180, 90, 0.4); }
.tier-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid transparent;
}
.badge-common { background: rgba(184, 169, 217, 0.14); color: #d8cfee; border-color: rgba(184, 169, 217, 0.5); }
.badge-uncommon { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.5); }
.badge-rare { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.5); }
.badge-epic { background: rgba(168, 85, 247, 0.14); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.55); }
.badge-mythic { background: rgba(216, 180, 90, 0.16); color: var(--gold); border-color: rgba(216, 180, 90, 0.6); }
.traits { list-style: none; padding: 0; margin: 14px 0 0; }
.traits li { color: var(--muted); font-size: 0.92rem; padding: 6px 0; border-top: 1px solid var(--line); }
.traits li:first-child { border-top: 0; }

/* Being detail modal */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 3, 12, 0.8); backdrop-filter: blur(8px); }
.modal-panel {
  position: relative; z-index: 1; width: min(860px, 100%);
  display: grid; grid-template-columns: 340px 1fr; gap: 30px; align-items: center;
  background: linear-gradient(180deg, #1d0f38, #12081f);
  border: 1px solid rgba(216, 180, 90, 0.4); border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(214, 91, 255, 0.2);
  padding: 28px; max-height: 92vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 18px; background: none; border: 0; color: var(--moon);
  font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2;
}
.modal-scene { border-radius: 18px; }
.modal-code { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; margin: 0 0 8px; }
.modal-info h3 { font-size: 1.9rem; margin: 0 0 10px; }
.modal-desc { color: var(--moon); opacity: 0.92; margin: 14px 0 0; }
.modal-nav { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-nav .btn { padding: 11px 20px; font-size: 0.8rem; }
@media (max-width: 760px) { .modal-panel { grid-template-columns: 1fr; } }

/* SECTION 4 — Rarity system */
.rarity-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.rarity-panel {
  background: linear-gradient(180deg, var(--panel), rgba(21, 10, 40, 0.9));
  border: 1px solid var(--line); border-radius: 22px; padding: 24px 20px; text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rarity-panel:hover { transform: translateY(-5px); }
.rarity-panel h3 { margin: 16px 0 4px; }
.rarity-sigil { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; }
.rarity-common .rarity-sigil { background: radial-gradient(circle at 35% 30%, #efe9ff, #b8a9d9 55%, #6d5a99); box-shadow: 0 0 30px rgba(184, 169, 217, 0.5); }
.rarity-uncommon .rarity-sigil { background: radial-gradient(circle at 35% 30%, #d1fae5, #34d399 55%, #065f46); box-shadow: 0 0 30px rgba(52, 211, 153, 0.5); }
.rarity-rare .rarity-sigil { background: radial-gradient(circle at 35% 30%, #e0f2fe, #38bdf8 55%, #0c4a6e); box-shadow: 0 0 30px rgba(56, 189, 248, 0.5); }
.rarity-epic .rarity-sigil { background: radial-gradient(circle at 35% 30%, #f5d0fe, #a855f7 55%, #581c87); box-shadow: 0 0 30px rgba(168, 85, 247, 0.55); }
.rarity-mythic {
  border-color: rgba(216, 180, 90, 0.65);
  background: linear-gradient(180deg, rgba(216, 180, 90, 0.18), rgba(21, 10, 40, 0.95));
  box-shadow: 0 0 44px rgba(216, 180, 90, 0.22);
}
.rarity-mythic .rarity-sigil { background: radial-gradient(circle at 35% 30%, #fef3c7, #d8b45a 55%, #92400e); box-shadow: 0 0 38px rgba(216, 180, 90, 0.7); }
.rarity-colors { color: var(--gold); font-weight: 600; font-size: 0.9rem; margin: 0 0 4px; }
.rarity-supply { font-family: "Cinzel", Georgia, serif; font-size: 1.35rem; font-weight: 700; color: var(--moon); margin: 0 0 12px; }
.rarity-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.rarity-names { list-style: none; padding: 0; margin: 0; }
.rarity-names li { border-top: 1px solid var(--line); }
.rarity-names button {
  background: none; border: 0; color: var(--moon); cursor: pointer; width: 100%;
  padding: 9px 4px; font-size: 0.92rem; text-align: left; font-family: inherit;
}
.rarity-names button:hover { color: var(--pink); }
.rarity-names button span { color: var(--muted); font-size: 0.8rem; margin-right: 6px; }
.rarity-names button small {
  display: block; color: var(--muted); font-size: 0.82rem; font-weight: 400;
  line-height: 1.45; margin-top: 3px;
}
@media (max-width: 900px) { .rarity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .rarity-grid { grid-template-columns: 1fr; } }

/* SECTION 5 — Lore */
.lore-frame { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid rgba(216, 180, 90, 0.35); min-height: 480px; display: flex; align-items: center; }
.lore-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lore-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 6, 17, 0.92), rgba(9, 6, 17, 0.55) 60%, rgba(9, 6, 17, 0.25)); }
.lore-body { position: relative; z-index: 2; max-width: 640px; padding: 56px 48px; }
.lore-body blockquote {
  margin: 0; font-family: "Cinzel", Georgia, serif; font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.5; color: var(--moon); border-left: 3px solid var(--gold); padding-left: 22px;
}
.lore-more { color: var(--muted); margin: 26px 0 0; }

/* SECTION 6 — Collection mosaic */
.mosaic { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mosaic-tile {
  position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  padding: 0; background: #0a0a12; cursor: pointer; aspect-ratio: 1 / 1;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.mosaic-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mosaic-tile span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 8px; font-size: 0.78rem;
  text-align: center; color: var(--moon);
  background: linear-gradient(0deg, rgba(9, 6, 17, 0.92), transparent);
}
.mosaic-tile:hover { transform: translateY(-4px) scale(1.02); border-color: rgba(216, 180, 90, 0.6); box-shadow: 0 0 28px rgba(214, 91, 255, 0.3); }
@media (max-width: 900px) { .mosaic { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .mosaic { grid-template-columns: repeat(2, 1fr); } }

/* SECTION 7 — Mint portal (visual interface only) */
.portal-frame {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 520px;
  border: 1px solid rgba(216, 180, 90, 0.4); display: flex; align-items: center; justify-content: center;
}
.portal-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portal-shade { position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(9, 6, 17, 0.55), rgba(9, 6, 17, 0.92)); }
.portal-ring {
  position: absolute; width: min(420px, 80vw); aspect-ratio: 1 / 1; border-radius: 50%;
  border: 1px solid rgba(216, 180, 90, 0.55);
  box-shadow: 0 0 60px rgba(214, 91, 255, 0.35), inset 0 0 60px rgba(214, 91, 255, 0.25);
  animation: ringPulse 5s ease-in-out infinite;
}
@keyframes ringPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.04); opacity: 1; } }
.portal-body { position: relative; z-index: 2; text-align: center; max-width: 560px; padding: 48px 24px; }
.portal-status { font-family: "Cinzel", Georgia, serif; font-size: 1.4rem; color: var(--gold); letter-spacing: 0.06em; margin: 0 0 12px; }
.portal-body > p:not(.portal-status):not(.small) { color: var(--moon); opacity: 0.92; }
.msg { min-height: 1.4em; margin: 14px 0 0; }
.msg.ok { color: #6ee7b7; }

/* Mint console (inside the portal section) */
.console {
  background: linear-gradient(180deg, rgba(41, 16, 68, 0.75), rgba(21, 10, 40, 0.95));
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 26px; max-width: 560px; margin: 26px auto 0;
}
.console hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.console .row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 7px 0; flex-wrap: wrap;
}
.console .row > span:first-child { color: var(--muted); }
.console .btn-wide { width: 100%; margin-top: 4px; }
.console-note { text-align: center; margin-top: 18px; }
.amount { display: inline-flex; align-items: center; gap: 10px; }
.amount #amt { font-size: 1.3rem; font-weight: 700; min-width: 28px; text-align: center; }
.progress { height: 10px; background: rgba(233, 226, 245, 0.08); border-radius: 999px; overflow: hidden; margin: 4px 0 10px; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--arcane), var(--pink), var(--gold)); transition: width 0.4s ease; }
.msg { min-height: 1.4em; margin: 14px 0 0; word-break: break-all; }
.msg.ok { color: #6ee7b7; }
.msg.err { color: #f87171; }
.msg a { color: var(--gold); }

/* Footer */
footer { border-top: 1px solid var(--line); text-align: center; padding: 40px 20px 48px; }
footer .logo { font-size: 1.4rem; margin: 0 0 18px; display: inline-block; }
.footnav { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.footnav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footnav a:hover { color: var(--moon); }
.socials { color: var(--muted); font-size: 0.9rem; }
.socials a { color: var(--gold); text-decoration: none; }

@media (max-width: 760px) {
  .region { min-height: 380px; }
  .region-body { padding: 34px 24px; }
  .lore-body { padding: 40px 24px; }
}
@media (max-width: 480px) {
  /* "THE ENCHANTED REALM" would otherwise wrap mid-phrase on narrow phones */
  .hero-realm { letter-spacing: 0.3em; font-size: 0.85rem; }
  .hero-eyebrow { letter-spacing: 0.3em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-fog, .portal-ring, .loader-line span, .particle, .scroll-cue span::after { animation: none !important; }
}
