/* Dragon Pet — base styles */
:root {
  --sky-deep: #0f1538;
  --sky: #1b2354;
  --dusk: #352a68;
  --gold: #f3c65b;
  --gold-soft: #f8dc95;
  --ember: #e5482e;
  --frost: #d6e4f2;
  --text: #eef0fb;
  --muted: #a9b0d6;
  --line: rgba(214, 228, 242, .16);
  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --wrap: 1180px;
  --r-lg: 28px;
  --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky-deep);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.center { text-align: center; justify-content: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--sky-deep); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
.section-lede { color: var(--muted); max-width: 60ch; margin-top: 14px; font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #2a1a00; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-ghost { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15, 21, 56, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 1.35rem/1 var(--serif); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--line); color: var(--text); font: 600 .95rem var(--sans); padding: 8px 16px; border-radius: 999px; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 100px); }
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 75% 55%, rgba(243, 198, 91, .22), transparent 55%),
    linear-gradient(180deg, transparent 60%, var(--sky-deep)),
    url("../img/constellation.webp") right center / cover no-repeat;
  opacity: .55;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 32px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -.01em; }
.lede { margin-top: 24px; color: #d3d7f0; font-size: 1.2rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin: 44px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { color: var(--muted); font-size: .95rem; }
.hero-stats dd { margin: 0; font: 400 2rem/1.1 var(--serif); color: var(--gold-soft); }
.hero-dragon { margin: 0; position: relative; }
.hero-dragon img { width: 100%; filter: drop-shadow(0 30px 60px rgba(229, 72, 46, .35)); animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }

/* Life cycle orbit — the signature band */
.cycle { padding: clamp(64px, 8vw, 110px) 0 clamp(56px, 7vw, 90px); background: linear-gradient(180deg, var(--sky-deep), var(--sky)); }
.orbit {
  list-style: none; margin: 48px auto 0; padding: 0 max(16px, calc((100% - var(--wrap)) / 2));
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr);
  gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; position: relative;
  scrollbar-width: thin; scrollbar-color: var(--dusk) transparent;
}
.orbit::before {
  content: ""; position: absolute; left: max(16px, calc((100% - var(--wrap)) / 2)); right: max(16px, calc((100% - var(--wrap)) / 2));
  top: 88px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 14px);
  opacity: .5;
}
.orbit li { scroll-snap-align: start; text-align: center; padding: 0 8px 12px; position: relative; }
.orbit img { width: 176px; height: 176px; object-fit: contain; margin: 0 auto 18px; position: relative; }
.orbit li:first-child img { width: 130px; height: 176px; }
.orbit-star img { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold), 0 0 50px rgba(243, 198, 91, .35); }
.orbit h3 { font-size: 1.3rem; }
.orbit p { color: var(--muted); font-size: .98rem; margin-top: 6px; max-width: 22ch; margin-inline: auto; }
.orbit-star h3 { color: var(--gold-soft); }

/* How you play */
.how { padding: clamp(64px, 8vw, 110px) 0; background: var(--sky); }
.how-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.how-art { background: radial-gradient(circle, rgba(229, 72, 46, .28), transparent 65%); border-radius: 50%; }
.features { margin: 32px 0 36px; display: grid; gap: 26px; }
.features div { padding-left: 20px; border-left: 2px solid var(--line); }
.features dt { font: 400 1.3rem/1.2 var(--serif); color: var(--text); }
.features dd { margin: 6px 0 0; color: var(--muted); max-width: 58ch; }

/* Dragons gallery */
.dragons { padding: clamp(64px, 8vw, 110px) 0; background: linear-gradient(180deg, var(--sky), var(--dusk) 140%); }
.species { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.specie { position: relative; border-radius: var(--r-lg); overflow: hidden; padding: 24px 28px 28px; isolation: isolate; }
.specie-ember { background: radial-gradient(circle at 50% 30%, #6a2335, #2a1840 70%); }
.specie-storm { background: radial-gradient(circle at 50% 30%, #2c4f80, #18204a 70%); }
.specie-hero { width: 82%; margin: 0 auto; transition: transform .4s ease; }
.specie:hover .specie-hero { transform: scale(1.03); }
.specie-info p { color: #cfd4ee; margin-top: 8px; max-width: 46ch; }
.stages { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 10px; }
.stages li { width: 72px; height: 72px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); padding: 4px; }
.stages img { width: 100%; height: 100%; object-fit: contain; }
.more-coming { text-align: center; color: var(--muted); margin-top: 32px; font-style: italic; }

/* Leaderboard preview */
.board { padding: clamp(64px, 8vw, 110px) 0; background: var(--dusk); text-align: center; }
.board .section-lede { margin-inline: auto; }
.podium { list-style: none; padding: 0; margin: 48px auto 36px; display: flex; justify-content: center; align-items: flex-end; gap: 16px; max-width: 760px; }
.podium li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px 24px; border-radius: 22px 22px 8px 8px; background: rgba(15, 21, 56, .55); position: relative; }
.podium .p1 { padding-top: 34px; padding-bottom: 56px; background: linear-gradient(180deg, rgba(243, 198, 91, .28), rgba(15, 21, 56, .6)); box-shadow: inset 0 0 0 1.5px rgba(243, 198, 91, .6); }
.podium .p2 { padding-bottom: 36px; }
.podium img { width: 140px; height: 140px; object-fit: contain; }
.podium .p1 img { width: 190px; height: 190px; }
.place { font: 400 1.6rem/1 var(--serif); color: var(--gold-soft); }
.podium strong { font-weight: 600; }
.pts { color: var(--muted); font-size: .92rem; }

/* Final CTA */
.final { position: relative; overflow: hidden; padding: clamp(80px, 10vw, 140px) 0; text-align: center; }
.final-sky { position: absolute; inset: 0; background: linear-gradient(180deg, var(--dusk), transparent 30%), url("../img/ascend.webp") center 30% / cover; opacity: .45; }
.final::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(15, 21, 56, .82), rgba(15, 21, 56, .35)); }
.final-inner { position: relative; z-index: 1; }
.final p { color: #d3d7f0; margin: 16px auto 0; max-width: 48ch; font-size: 1.15rem; }
.final .hero-actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.fine { color: var(--muted); font-size: .88rem; width: 100%; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner, .how-grid, .species { grid-template-columns: 1fr; }
  .hero-dragon { max-width: 460px; margin: 0 auto; order: -1; }
  .how-art { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--sky-deep); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
}
@media (max-width: 560px) {
  .hero-stats { gap: 20px; }
  .hero-stats dd { font-size: 1.6rem; }
  .podium { gap: 8px; }
  .podium img { width: 88px; height: 88px; }
  .podium .p1 img { width: 112px; height: 112px; }
  .specie { padding: 18px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .site-header .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.podium li[hidden] { display: none; }

/* Bug journal */
.bugs { padding: clamp(64px, 8vw, 110px) 0; background: linear-gradient(180deg, var(--dusk) -40%, var(--sky)); }
.rarities { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 20px; margin-top: 44px; }
.rarity { border-radius: var(--r-lg); padding: 22px 20px 18px; background: rgba(15, 21, 56, .5); }
.rarity h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rarity h3 span { font: 500 .9rem var(--sans); color: var(--muted); }
.rarity ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.rarity li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .85rem; color: #cfd4ee; line-height: 1.25; }
.rarity img { width: 84px; height: 72px; object-fit: contain; }
.rarity-rare { box-shadow: inset 0 0 0 1.5px rgba(150, 190, 255, .45); }
.rarity-rare h3 { color: #b9d3ff; }
.rarity-legendary { box-shadow: inset 0 0 0 1.5px rgba(243, 198, 91, .7), 0 0 40px rgba(243, 198, 91, .12); background: linear-gradient(180deg, rgba(243, 198, 91, .12), rgba(15, 21, 56, .5)); }
.rarity-legendary h3 { color: var(--gold-soft); }
.rarity-legendary img { filter: drop-shadow(0 0 10px rgba(243, 198, 91, .55)); }
.bugs-note { color: var(--muted); margin-top: 24px; max-width: 64ch; }

/* Weekly tournament */
.tournament { padding: clamp(72px, 9vw, 120px) 0; background: radial-gradient(ellipse at 50% 0, rgba(243, 198, 91, .18), transparent 48%), linear-gradient(180deg, var(--sky), var(--sky-deep)); overflow: hidden; }
.tournament > .wrap > h2, .tournament > .wrap > .section-lede { text-align: center; margin-inline: auto; }
.jackpot-kicker, .cta-eyebrow { color: var(--gold); text-align: center; font-size: .82rem; font-weight: 700; letter-spacing: .18em; margin-bottom: 10px; text-transform: uppercase; }
.jackpot-stage { position: relative; max-width: 1120px; aspect-ratio: 16 / 8; min-height: 390px; margin: 42px auto 0; border-radius: 36px; overflow: hidden; isolation: isolate; box-shadow: 0 34px 90px rgba(0, 0, 0, .45), 0 0 0 1px rgba(243, 198, 91, .35), inset 0 0 80px rgba(243, 198, 91, .08); }
.jackpot-poster, .jackpot-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jackpot-video { visibility: hidden; }
@media (min-width: 821px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .jackpot-video.is-playing { visibility: visible; }
}
.jackpot-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 48%, rgba(18, 10, 35, .06) 0 36%, rgba(15, 21, 56, .35) 72%, rgba(15, 21, 56, .7)); }
.jackpot-total { position: absolute; inset: auto 0 7%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 20px 32px; text-align: center; text-shadow: 0 4px 2px rgba(64, 24, 0, .8), 0 0 30px rgba(243, 198, 91, .75); }
.jackpot-label { font-weight: 800; letter-spacing: .22em; color: #fff4c5; font-size: clamp(.78rem, 1.6vw, 1.05rem); }
.jackpot-total strong { display: flex; align-items: baseline; justify-content: center; gap: 12px; color: #ffe58c; font: 400 clamp(3.2rem, 9vw, 6.6rem)/.9 var(--serif); font-variant-numeric: tabular-nums; filter: drop-shadow(0 6px 0 #8d4913) drop-shadow(0 0 2px #fff); }
.jackpot-total small { font: 800 clamp(.8rem, 2.2vw, 1.55rem)/1 var(--sans); letter-spacing: .12em; }
.jackpot-total.is-rolling [data-tournament="prize_pool"] { animation: jackpot-roll .07s linear infinite alternate; filter: blur(.6px); }
.jackpot-total.is-winner { animation: jackpot-win 1.15s ease-out; }
@keyframes jackpot-roll {
  from { transform: translateY(-.08em); color: #fff4bf; }
  to { transform: translateY(.08em); color: #f5b93f; }
}
@keyframes jackpot-win {
  0%, 100% { transform: scale(1); filter: none; }
  28% { transform: scale(1.08); filter: brightness(1.55) drop-shadow(0 0 28px #fff4a8); }
  62% { transform: scale(.99); }
}
.jackpot-rate { margin-top: 18px; padding: 7px 14px; border-radius: 999px; color: #fff8db; background: rgba(43, 18, 45, .72); box-shadow: inset 0 0 0 1px rgba(255, 229, 140, .45); font-size: clamp(.74rem, 1.6vw, .95rem); text-shadow: none; }
.tournament-body { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; margin-top: 24px; }
.tournament-ranking, .tournament-clock { border: 1px solid rgba(243, 198, 91, .24); border-radius: var(--r-lg); background: rgba(15, 21, 56, .7); box-shadow: 0 18px 50px rgba(0, 0, 0, .18); }
.tournament-ranking { padding: 24px; }
.tournament-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tournament-head h3 { color: var(--gold-soft); }
.tournament-head span { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.tournament-top { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.tournament-top li { display: grid; grid-template-columns: 34px 48px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); }
.tournament-top li:first-child { background: linear-gradient(90deg, rgba(243, 198, 91, .2), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px rgba(243, 198, 91, .38); }
.rank-medal { font-size: 1.35rem; }
.tournament-top img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.tournament-who { display: flex; flex-direction: column; min-width: 0; }
.tournament-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tournament-who small { color: var(--muted); }
.tournament-top b { color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.tournament-clock { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; text-align: center; }
.clock-label { color: var(--gold-soft); font-weight: 800; letter-spacing: .13em; }
.countdown { display: flex; align-items: flex-start; gap: clamp(5px, 1vw, 10px); margin: 22px 0 16px; }
.countdown span { display: flex; flex-direction: column; min-width: 58px; }
.countdown b { color: #ffe58c; font: 400 clamp(2rem, 4.3vw, 3.3rem)/1 var(--serif); font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #8d4913; }
.countdown small { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; margin-top: 6px; }
.countdown i { color: var(--gold); font: 400 2rem/1 var(--serif); }
.reset-note { color: var(--muted); font-size: .93rem; }
.tournament-cta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; margin-top: 28px; padding: clamp(24px, 4vw, 42px); border-radius: var(--r-lg); background: linear-gradient(105deg, rgba(243, 198, 91, .17), rgba(229, 72, 46, .12)); border: 1px solid rgba(243, 198, 91, .32); }
.tournament-cta .cta-eyebrow { text-align: left; }
.tournament-cta h3 { font-size: clamp(1.55rem, 3vw, 2.2rem); color: var(--gold-soft); }
.tournament-cta p:not(.cta-eyebrow) { color: #d3d7f0; margin-top: 8px; max-width: 62ch; }
.tournament-actions { display: flex; flex-direction: column; gap: 10px; position: relative; }
.copy-status { position: absolute; left: 0; right: 0; top: calc(100% + 6px); text-align: center; color: var(--gold-soft); font-size: .8rem; }
.tournament-rules { max-width: 82ch; margin: 26px auto 0; color: var(--muted); font-size: .9rem; text-align: center; }
@media (max-width: 820px) {
  .jackpot-stage { min-height: 340px; aspect-ratio: 4 / 3; }
  .tournament-body, .tournament-cta { grid-template-columns: 1fr; }
  .tournament-actions { max-width: 460px; width: 100%; }
}
@media (max-width: 560px) {
  .jackpot-stage { min-height: 300px; border-radius: 22px; }
  .jackpot-total { inset: auto 0 4%; padding: 14px; }
  .jackpot-total strong { flex-direction: column; gap: 5px; align-items: center; }
  .tournament-ranking { padding: 16px; }
  .tournament-top li { grid-template-columns: 26px 38px 1fr; gap: 8px; padding: 10px; }
  .tournament-top img { width: 38px; height: 38px; border-radius: 11px; }
  .tournament-top li > b { grid-column: 3; }
  .countdown span { min-width: 48px; }
  .tournament-cta .cta-eyebrow { text-align: center; }
  .tournament-cta { text-align: center; }
}

/* Leaderboard */
.board-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin-top: 32px; }
.tabs, .period { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(15, 21, 56, .55); }
.tabs button, .period button { border: 0; background: none; color: var(--muted); font: 600 .95rem var(--sans); padding: 10px 16px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.tabs button[aria-selected="true"], .period button[aria-pressed="true"] { background: var(--gold); color: #2a1a00; }
.tabs button:hover:not([aria-selected="true"]), .period button:hover:not([aria-pressed="true"]) { color: var(--text); }
.podium-art { position: relative; max-width: 760px; margin: 36px auto 0; }
.podium-art img { width: 100%; }
.podium-names { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 34% 32% 34%; }
.podium-names .pn1 strong { color: var(--gold-soft); font-size: clamp(1.45rem, 3.5vw, 2rem); }
.podium-names .pn2 strong { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.podium-names .pn3 strong { font-size: clamp(1.2rem, 2.7vw, 1.5rem); }
.podium-names li { display: flex; flex-direction: column; align-items: center; padding: 0 4px; text-align: center; }
.podium-names strong { font-weight: 700; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-names span { color: var(--muted); font-size: clamp(.7rem, 1.6vw, .92rem); font-weight: 600; }
.board-list { list-style: none; counter-reset: place 3; padding: 0; margin: 28px auto 0; max-width: 560px; text-align: left; }
.board-list li { counter-increment: place; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.board-list li::before { content: counter(place); font: 400 1.15rem var(--serif); color: var(--gold-soft); }
.board-list .v { color: var(--muted); font-variant-numeric: tabular-nums; }
.board-empty { color: var(--muted); margin-top: 20px; }
@media (max-width: 960px) { .rarities { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { padding: clamp(48px, 7vw, 90px) 0 clamp(64px, 8vw, 110px); background: linear-gradient(180deg, var(--sky-deep), var(--sky)); }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.legal p, .legal li { color: #d3d7f0; max-width: 68ch; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; margin: 10px 0; display: grid; gap: 8px; }
.legal .updated { color: var(--muted); margin-top: 10px; font-size: .95rem; }

/* Founders */
.thanks { background: var(--gold); color: #2a1a00; padding: 14px 0; }
.thanks code { background: rgba(0,0,0,.1); padding: 1px 6px; border-radius: 6px; }
.founders { padding: clamp(64px, 8vw, 110px) 0; background: linear-gradient(180deg, var(--dusk), var(--sky-deep)); }
.founders-grid { display: grid; gap: clamp(32px, 5vw, 56px); }
.founders-copy { max-width: 760px; }
.perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.perks li { padding-left: 30px; position: relative; color: #d3d7f0; }
.perks li::before { content: "✦"; position: absolute; left: 4px; color: var(--gold); }
.price { margin-top: 28px; color: var(--muted); }
.price span { font: 400 2.2rem/1 var(--serif); color: var(--gold-soft); margin-right: 8px; }
.how-to-buy { margin-top: 16px; color: #d3d7f0; max-width: 52ch; }
.how-to-buy code, .founders code { background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 6px; font-size: .95em; }
.wall { text-align: center; }
.wall h3 { color: var(--gold-soft); }
.wall-frame { position: relative; max-width: 1100px; margin: 18px auto 0; }
.wall-frame > img { width: 100%; display: block; }
.wall-inner { position: absolute; left: 25%; right: 25%; top: 21%; bottom: 14%; display: flex; flex-direction: column; justify-content: center; }
.wall-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: clamp(6px, 2.2vw, 28px) 4%; height: 100%; }
.wall-list li { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 16px); width: 46%; min-width: 0; color: #5a3418; font: 400 clamp(.72rem, 1.9vw, 1.4rem)/1.15 var(--serif); text-align: left; }
.wall-list li:last-child:nth-child(odd) { justify-content: center; }
.wall-list li span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 0 rgba(255, 245, 225, .8); }
.wall-list img { width: clamp(28px, 5.6vw, 76px); height: clamp(28px, 5.6vw, 76px); flex: none; border-radius: 50%; object-fit: cover; background: #f6e6c8; box-shadow: 0 0 0 3px #d9a84a, 0 4px 10px rgba(90, 52, 24, .35); }
.wall-empty { color: #5a3418; font-weight: 600; font-size: clamp(.75rem, 1.6vw, 1.05rem); text-align: center; }
.wall-pager[hidden] { display: none; }
.wall-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.wall-pager button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: #2a1a00; font: 700 1.4rem/1 var(--sans); cursor: pointer; }
.wall-pager button:disabled { opacity: .35; cursor: default; }
.wall-page { color: var(--muted); min-width: 80px; }
@media (max-width: 640px) { .wall-inner { left: 22%; right: 22%; top: 20%; bottom: 12%; } .wall-list img { box-shadow: 0 0 0 2px #d9a84a; } }
@media (max-width: 960px) { .founders-grid { grid-template-columns: 1fr; } }

.period button:disabled { opacity: .35; cursor: not-allowed; }
.board-list .who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.board-list .who img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }

/* Guide */
.guide { padding: clamp(64px, 8vw, 110px) 0; background: var(--sky-deep); }
.guide code { background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 6px; font-size: .92em; color: var(--gold-soft); }
.guide-steps { list-style: none; counter-reset: step; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.guide-steps li { counter-increment: step; position: relative; padding: 52px 18px 20px; border-radius: var(--r-sm); background: rgba(255,255,255,.04); color: #d3d7f0; }
.guide-steps li::before { content: counter(step); position: absolute; top: 14px; left: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #2a1a00; font: 700 .95rem/28px var(--sans); text-align: center; }
.guide-steps strong { color: var(--text); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin-top: 48px; align-items: start; }
.guide-group { break-inside: avoid; margin-bottom: 32px; }
.guide-group h3 { font-size: 1.35rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.guide-group h3 small { font: 500 .85rem var(--sans); color: var(--muted); }
.guide-list { margin: 0; display: grid; }
.guide-list div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-list dt { font-weight: 600; color: var(--text); }
.guide-list dd { margin: 4px 0 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 960px) { .guide-steps { grid-template-columns: 1fr 1fr; } .guide-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .guide-steps { grid-template-columns: 1fr; } }
.guide-page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }

/* Dragon stages: click a thumbnail to show it in the big image */
.stages li { width: 88px; height: 88px; padding: 0; }
.stage { display: block; width: 100%; height: 100%; padding: 4px; border: 2px solid transparent; border-radius: inherit; background: none; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.stage:hover { transform: translateY(-2px); }
.stage[aria-pressed="true"] { border-color: var(--gold); }
.stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.specie-hero { transition: opacity .2s ease, transform .4s ease; }
.specie-hero.swapping { opacity: 0; }
