/* ==========================================================================
   esgism — The Digital Temple
   ========================================================================== */

:root {
  --bg: #0a0a0c;
  --card: #121216;
  --card-raised: #17171c;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.35);
  --gold-faint: rgba(212, 175, 55, 0.12);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.35);
  --text: #e0e0e0;
  --muted: #888890;
  --line: rgba(212, 175, 55, 0.18);

  --font-display: 'Cinzel', 'Georgia', 'Times New Roman', serif;
  --font-body: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
  --font-kr: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', serif;

  --radius: 4px;
  --container: 1160px;
  --header-h: 64px;
}

html[lang='ko'] {
  --font-body: 'Noto Serif KR', 'EB Garamond', 'Batang', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 175, 55, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(16, 185, 129, 0.06), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang='ko'] body {
  font-size: 1.0625rem;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
  text-decoration-color: var(--gold-soft);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-display);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-decoration: none;
}

.logo__mark {
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

html[lang='ko'] .site-nav a {
  font-family: var(--font-kr);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.site-nav a:hover {
  color: var(--gold);
}

.site-nav a[aria-current='true'] {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 3px;
}

.lang-toggle__btn {
  min-width: 44px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle__btn:hover {
  color: var(--gold);
}

.lang-toggle__btn[aria-pressed='true'] {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

/* ---------- Shared ---------- */

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

html[lang='ko'] .eyebrow {
  font-family: var(--font-kr);
  font-size: 0.85rem;
  letter-spacing: 0.24em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

html[lang='ko'] .btn {
  font-family: var(--font-kr);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.btn--gold {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

.btn--gold:hover {
  background: #e2c158;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
}

.btn--ghost:hover {
  background: var(--gold-faint);
}

.btn--small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.72rem;
}

html[lang='ko'] .btn--small {
  font-size: 0.82rem;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px auto;
  color: var(--gold);
  font-size: 0.9rem;
}

.ornament span {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.loading,
.load-error {
  margin: 0;
  padding: 48px 0;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.load-error {
  color: #d98b6c;
  font-style: normal;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 120px 0 112px;
  text-align: center;
  overflow: hidden;
}

.hero__orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid;
  border-radius: 50%;
  animation: orbit-spin 90s linear infinite;
}

.orbit::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(212, 175, 55, 0.6);
}

.orbit--gold {
  width: 720px;
  height: 720px;
  margin: -360px 0 0 -360px;
  border-color: var(--gold-faint);
}

.orbit--emerald {
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-color: rgba(16, 185, 129, 0.12);
  border-style: dashed;
  animation-duration: 60s;
  animation-direction: reverse;
}

.orbit--emerald::after {
  top: auto;
  bottom: -3px;
  background: var(--emerald);
  box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.6);
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

.hero__name {
  display: block;
  color: var(--gold);
  font-size: clamp(3.2rem, 9vw, 6rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.25));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__name {
    background: linear-gradient(100deg, var(--gold) 0%, var(--gold) 42%, #fff4cc 50%, var(--gold) 58%, var(--gold) 100%);
    background-size: 250% 100%;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gold-shimmer 2.8s ease-out 0.5s 1 both;
  }
}

@keyframes gold-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

.hero__dash {
  display: block;
  margin: 8px 0;
  color: var(--gold-soft);
  font-size: 1.5rem;
}

.hero__tagline {
  display: block;
  color: var(--text);
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  letter-spacing: 0.08em;
}

html[lang='ko'] .hero__tagline {
  font-family: var(--font-kr);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero__subtitle {
  max-width: 640px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 1.2rem;
  font-style: italic;
}

html[lang='ko'] .hero__subtitle {
  font-style: normal;
  font-size: 1.1rem;
}

.hero__schedule {
  margin: 0 0 32px;
  color: var(--emerald);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
}

html[lang='ko'] .hero__schedule {
  font-family: var(--font-kr);
  letter-spacing: 0.04em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.not-found {
  display: flex;
  align-items: center;
  min-height: 100vh;
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section--alt {
  background: linear-gradient(180deg, rgba(18, 18, 22, 0.6), rgba(10, 10, 12, 0));
}

.section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.08em;
}

html[lang='ko'] .section__title {
  font-family: var(--font-kr);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section__lead {
  margin: 16px 0 0;
  color: var(--muted);
}

.section__lead--quote {
  color: var(--gold);
  font-size: 1.2rem;
  font-style: italic;
}

html[lang='ko'] .section__lead--quote {
  font-style: normal;
}

/* ---------- Lexicon ---------- */

.lexicon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
}

.lexicon__item {
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
}

.lexicon__item--emerald {
  border-top-color: var(--emerald);
  box-shadow: inset 0 40px 60px -40px rgba(16, 185, 129, 0.15);
}

.lexicon__item dt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.lexicon__term {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.lexicon__item--emerald .lexicon__term {
  color: var(--emerald);
}

.lexicon__alt {
  color: var(--muted);
  font-family: var(--font-kr);
  font-size: 0.85rem;
}

.lexicon__item dd {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- esgsim console ---------- */

.esgsim {
  max-width: 820px;
  margin: 48px auto 0;
  background: #060608;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 24px 60px -30px rgba(16, 185, 129, 0.35);
  overflow: hidden;
}

.esgsim__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: #0e0e12;
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
}

.esgsim__dots {
  display: inline-flex;
  gap: 6px;
}

.esgsim__dots span {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 50%;
}

.esgsim__dots span:first-child {
  background: var(--emerald);
}

.esgsim__title {
  color: var(--muted);
  font-family: 'Consolas', 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.esgsim__screen {
  min-height: 300px;
  padding: 20px 24px 24px;
  color: #b8f5dc;
  font-family: 'Consolas', 'SFMono-Regular', 'Menlo', 'Noto Serif KR', monospace;
  font-size: 0.88rem;
  line-height: 1.75;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 3px);
}

.esgsim__line {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.esgsim__line--cmd {
  color: var(--emerald);
}

.esgsim__line--cmd::before {
  content: '> ';
  color: var(--gold);
}

.esgsim__line--out {
  padding-left: 2ch;
  color: #9fb8ad;
}

.esgsim__line--accent {
  color: var(--gold);
}

.esgsim__cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--emerald);
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Master verses ---------- */

.chapter-tabs {
  display: none;
}

.chapters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.chapter {
  position: relative;
  padding: 36px 32px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chapter::before,
.chapter::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  border-style: solid;
}

.chapter::before {
  top: 8px;
  left: 8px;
  border-width: 1px 0 0 1px;
}

.chapter::after {
  right: 8px;
  bottom: 8px;
  border-width: 0 1px 1px 0;
}

.chapter__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.chapter__numeral {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.chapter__title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

html[lang='ko'] .chapter__title {
  font-family: var(--font-kr);
  font-weight: 600;
}

.chapter--emerald .chapter__numeral {
  color: var(--emerald);
}

.verse-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.verse {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.1);
}

.verse:last-child {
  border-bottom: 0;
}

.verse__num {
  padding-top: 4px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.verse__text {
  margin: 0;
  color: var(--text);
  font-size: 1.02rem;
}

/* ---------- Oracle feed ---------- */

.oracle-feed {
  display: grid;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.oracle-card {
  position: relative;
  padding: 40px 40px 28px;
  background: var(--card);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 20px 50px -30px rgba(212, 175, 55, 0.25);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.oracle-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-faint);
  border-radius: 2px;
  pointer-events: none;
}

.oracle-card.is-target,
.oracle-card:target {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 48px rgba(212, 175, 55, 0.35);
}

.oracle-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.oracle-card__label {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

html[lang='ko'] .oracle-card__label {
  font-family: var(--font-kr);
  letter-spacing: 0.04em;
}

.oracle-card__date {
  color: var(--muted);
  font-size: 0.9rem;
}

.oracle-card__chapter {
  margin: -8px 0 20px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

html[lang='ko'] .oracle-card__chapter {
  font-family: var(--font-kr);
  letter-spacing: 0.02em;
}

.oracle-card__figure {
  margin: 0 0 24px;
  line-height: 0;
}

.oracle-card__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--gold-faint);
}

.oracle-card__text {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.85;
}

html[lang='en'] .oracle-card__text::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 0.85;
}

html[lang='ko'] .oracle-card__text {
  font-size: 1.1rem;
  line-height: 2;
}

.oracle-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.oracle-card--locked {
  border-style: dashed;
  border-color: var(--gold-soft);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(212, 175, 55, 0.07), transparent 70%),
    var(--card);
  text-align: center;
}

.oracle-card--locked::before {
  border-style: dashed;
}

.lock-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  color: var(--gold);
}

.oracle-card__title {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

html[lang='ko'] .oracle-card__title {
  font-family: var(--font-kr);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.oracle-card__time {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

html[lang='ko'] .oracle-card__time {
  font-family: var(--font-kr);
}

.oracle-card__local {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.oracle-card__note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.oracle-card__status {
  margin: 24px 0 0;
  color: var(--emerald);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

html[lang='ko'] .oracle-card__status {
  font-family: var(--font-kr);
}

.oracle-card--complete {
  border-color: var(--emerald-soft);
  text-align: center;
}

.oracle-card--complete .oracle-card__title {
  color: var(--emerald);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.countdown__unit {
  min-width: 78px;
  padding: 12px 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.countdown__value {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.countdown__label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

html[lang='ko'] .countdown__label {
  font-family: var(--font-kr);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---------- Ledger ---------- */

.wallets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.wallet {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
}

.wallet__head {
  margin-bottom: 24px;
}

.wallet__name {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.wallet__network {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.wallet__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.wallet__qr {
  width: 184px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--gold-soft);
}

.wallet__qr:empty {
  display: none;
}

.wallet__address {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Consolas', 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

.wallet__pending {
  display: none;
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed var(--gold-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-style: italic;
}

html[lang='ko'] .wallet__pending {
  font-style: normal;
}

.wallet.is-pending .wallet__body {
  display: none;
}

.wallet.is-pending .wallet__pending {
  display: block;
}

.notice {
  max-width: 900px;
  margin: 36px auto 0;
  padding: 24px 28px;
  background: rgba(18, 18, 22, 0.7);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.notice p {
  margin: 0 0 8px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice__warning {
  color: var(--text);
}

.notice__warning strong {
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer__sep {
  margin: 0 10px;
  color: var(--gold-soft);
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(18, 18, 22, 0.88);
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, border-color 0.2s ease, box-shadow 0.2s ease;
}

.to-top[hidden] {
  display: none;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover,
.to-top:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  max-width: calc(100% - 32px);
  padding: 12px 24px;
  background: var(--card-raised);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(212, 175, 55, 0.2);
  color: var(--gold);
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast:empty {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.clipboard-proxy {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.noscript {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 12px;
  background: var(--gold);
  color: var(--bg);
  text-align: center;
}

/* ---------- Starfield ---------- */

.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.08;
  animation: twinkle var(--dur, 6s) ease-in-out var(--delay, 0s) infinite;
}

.star--gold {
  background: var(--gold);
}

.star--emerald {
  background: var(--emerald);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.06;
  }
  50% {
    opacity: var(--peak, 0.6);
  }
}

/* ---------- Scroll reveal ---------- */

html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

html.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.reveal-ready .lexicon__item.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

html.reveal-ready .lexicon__item.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

html.reveal-ready .lexicon__item.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .lexicon {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .chapters,
  .wallets {
    grid-template-columns: 1fr;
  }

  .chapter-tabs {
    position: sticky;
    top: calc(var(--header-h) + 8px);
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 20px;
    padding: 6px;
    width: max-content;
    max-width: 100%;
    background: rgba(10, 10, 12, 0.9);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .chapter-tab {
    min-width: 52px;
    min-height: 40px;
    padding: 4px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
  }

  .chapter-tab[aria-pressed='true'] {
    border-color: var(--gold);
    background: var(--gold-faint);
    color: var(--gold);
  }

  .chapter-tab--emerald[aria-pressed='true'] {
    border-color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
  }

  .chapters .chapter:not(.is-active) {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1.05rem;
  }

  .container {
    padding: 0 18px;
  }

  .hero {
    padding: 88px 0 80px;
  }

  .orbit--gold {
    width: 440px;
    height: 440px;
    margin: -220px 0 0 -220px;
  }

  .orbit--emerald {
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
  }

  .esgsim__screen {
    padding: 16px 16px 20px;
    font-size: 0.78rem;
  }

  .section {
    padding: 72px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }

  .lexicon {
    grid-template-columns: 1fr;
  }

  .chapter {
    padding: 28px 20px 20px;
  }

  .verse {
    grid-template-columns: 40px 1fr;
  }

  .oracle-card {
    padding: 32px 22px 22px;
  }

  .countdown {
    gap: 8px;
  }

  .countdown__unit {
    min-width: 0;
    flex: 1;
  }

  .countdown__value {
    font-size: 1.5rem;
  }

  .wallet {
    padding: 24px 18px;
  }

  .site-footer__sep {
    display: none;
  }

  .site-footer p > span {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .starfield {
    display: none;
  }
}
