:root {
  --bg: #070910;
  --bg-deep: #05070d;
  --bg-soft: #0c1120;
  --bg-elevated: #12192c;

  --surface-1: rgba(14, 19, 32, 0.88);
  --surface-2: rgba(18, 24, 40, 0.92);
  --surface-3: rgba(24, 31, 50, 0.95);
  --surface-4: rgba(255, 255, 255, 0.04);

  --gold: #c8a96a;
  --gold-soft: #ead7aa;
  --gold-faint: rgba(234, 215, 170, 0.14);

  --gold-btn-top: #b69257;
  --gold-btn-bottom: #7f5c2d;
  --gold-btn-border: rgba(234, 215, 170, 0.24);

  --blue-soft: #a8b9ff;
  --blue-strong: #8ea8ff;
  --blue-faint: rgba(142, 168, 255, 0.14);

  --jade: #7fb39b;
  --jade-soft: rgba(127, 179, 155, 0.16);

  --text: #f3eee5;
  --muted: #c8c0b0;
  --muted-soft: rgba(243, 238, 229, 0.68);

  --border: rgba(200, 169, 106, 0.16);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-blue: rgba(142, 168, 255, 0.16);
  --field-bg: rgba(10, 14, 24, 0.94);
  --field-bg-focus: rgba(14, 19, 32, 0.98);
  --field-border-strong: rgba(234, 215, 170, 0.22);

  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.26);

  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --max-width: 1200px;

  --rune-drift-duration: 96s;
  --rune-breath-duration: 14s;
  --rune-trace-duration: 24s;
  --cloud-drift-duration: 120s;
  --sky-pulse-duration: 20s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(200, 169, 106, 0.08), transparent 22%),
    radial-gradient(circle at 50% 0%, rgba(142, 168, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #0a0d15 0%, #080b13 42%, #06080f 100%);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% -4%, rgba(234, 215, 170, 0.06), transparent 24%),
    radial-gradient(circle at 52% 4%, rgba(142, 168, 255, 0.05), transparent 20%);
  animation: skyPulse var(--sky-pulse-duration) ease-in-out infinite;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

a,
button {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(190, 216, 255, 0.52);
  outline-offset: 3px;
}

.cloud-layer,
.rune-layer,
.lightning-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.cloud-layer {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.03), transparent 14%),
    radial-gradient(circle at 78% 10%, rgba(255, 255, 255, 0.025), transparent 15%),
    radial-gradient(circle at 50% 0%, rgba(142, 168, 255, 0.04), transparent 18%),
    radial-gradient(circle at 35% 18%, rgba(200, 169, 106, 0.035), transparent 18%),
    linear-gradient(180deg, rgba(5, 8, 16, 0.06), rgba(5, 8, 16, 0.24));
  animation: cloudDrift var(--cloud-drift-duration) ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.rune-layer {
  z-index: 1;
  opacity: 0.78;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' fill='none'><path d='M-90 170 C 80 95 230 250 430 190 C 640 130 760 70 960 145 C 1180 230 1320 265 1690 95' stroke='%23d4a23a' stroke-width='6' stroke-linecap='round'/><path d='M-40 600 C 210 540 330 615 530 560 C 720 508 812 420 965 470 C 1160 535 1305 620 1650 560' stroke='%23d4a23a' stroke-width='5' stroke-linecap='round'/><path d='M535 945 C 560 790 625 720 715 650 C 798 585 833 490 790 360' stroke='%23d4a23a' stroke-width='6' stroke-linecap='round'/><path d='M1320 -70 C 1265 105 1240 250 1272 410 C 1298 548 1365 675 1515 760' stroke='%23d4a23a' stroke-width='5' stroke-linecap='round'/><path d='M70 875 C 235 760 390 810 540 860 C 665 900 770 860 930 885 C 1112 915 1292 905 1480 835' stroke='%23bb8417' stroke-width='4' stroke-linecap='round'/><path d='M10 168 C 175 112 280 245 455 205' stroke='%23f3cf75' stroke-width='2.4' stroke-linecap='round'/><path d='M-20 612 C 210 552 338 622 520 571' stroke='%23f3cf75' stroke-width='2.2' stroke-linecap='round'/><path d='M1288 -58 C 1252 112 1242 250 1268 402' stroke='%23f3cf75' stroke-width='2.1' stroke-linecap='round'/><path d='M540 940 C 570 800 640 728 720 660' stroke='%23f3cf75' stroke-width='2.2' stroke-linecap='round'/><circle cx='294' cy='211' r='3' fill='%23e8bf5d'/><circle cx='308' cy='202' r='2.2' fill='%23e8bf5d'/><circle cx='319' cy='217' r='1.8' fill='%23e8bf5d'/><circle cx='1362' cy='92' r='3' fill='%23e8bf5d'/><circle cx='1376' cy='101' r='2.2' fill='%23e8bf5d'/><circle cx='1388' cy='109' r='1.8' fill='%23e8bf5d'/><circle cx='118' cy='782' r='2.6' fill='%23e8bf5d'/><circle cx='136' cy='792' r='1.9' fill='%23e8bf5d'/><circle cx='1120' cy='858' r='2.4' fill='%23e8bf5d'/><circle cx='1137' cy='868' r='1.8' fill='%23e8bf5d'/></svg>");
  background-size: 106% 106%;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
  animation:
    runeDrift var(--rune-drift-duration) ease-in-out infinite alternate,
    runeBreath var(--rune-breath-duration) ease-in-out infinite;
  will-change: background-position, transform, opacity, filter;
}

.rune-layer::before {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: 0.14;
  background:
    radial-gradient(circle at 8% 18%, rgba(243, 207, 117, 0.26), transparent 7%),
    radial-gradient(circle at 24% 66%, rgba(243, 207, 117, 0.18), transparent 8%),
    radial-gradient(circle at 48% 36%, rgba(243, 207, 117, 0.22), transparent 9%),
    radial-gradient(circle at 74% 18%, rgba(243, 207, 117, 0.2), transparent 8%),
    radial-gradient(circle at 88% 72%, rgba(243, 207, 117, 0.16), transparent 10%);
  filter: blur(14px);
  mix-blend-mode: screen;
  animation:
    spiritTrace var(--rune-trace-duration) linear infinite,
    runeBreath calc(var(--rune-breath-duration) + 4s) ease-in-out infinite;
}

.rune-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' fill='none'><path d='M-90 170 C 80 95 230 250 430 190 C 640 130 760 70 960 145 C 1180 230 1320 265 1690 95' stroke='%23d4a23a' stroke-width='6' stroke-linecap='round'/><path d='M-40 600 C 210 540 330 615 530 560 C 720 508 812 420 965 470 C 1160 535 1305 620 1650 560' stroke='%23d4a23a' stroke-width='5' stroke-linecap='round'/><path d='M535 945 C 560 790 625 720 715 650 C 798 585 833 490 790 360' stroke='%23d4a23a' stroke-width='6' stroke-linecap='round'/><path d='M1320 -70 C 1265 105 1240 250 1272 410 C 1298 548 1365 675 1515 760' stroke='%23d4a23a' stroke-width='5' stroke-linecap='round'/><path d='M70 875 C 235 760 390 810 540 860 C 665 900 770 860 930 885 C 1112 915 1292 905 1480 835' stroke='%23bb8417' stroke-width='4' stroke-linecap='round'/><path d='M10 168 C 175 112 280 245 455 205' stroke='%23f3cf75' stroke-width='2.4' stroke-linecap='round'/><path d='M-20 612 C 210 552 338 622 520 571' stroke='%23f3cf75' stroke-width='2.2' stroke-linecap='round'/><path d='M1288 -58 C 1252 112 1242 250 1268 402' stroke='%23f3cf75' stroke-width='2.1' stroke-linecap='round'/><path d='M540 940 C 570 800 640 728 720 660' stroke='%23f3cf75' stroke-width='2.2' stroke-linecap='round'/></svg>");
  background-size: 108% 108%;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(7px);
  animation:
    runeDriftReverse 132s ease-in-out infinite alternate,
    runeGlowPulse 11s ease-in-out infinite;
}

.lightning-flash {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 24%),
    radial-gradient(circle at 50% 8%, rgba(142, 168, 255, 0.03), transparent 18%);
  animation: skyPulse calc(var(--sky-pulse-duration) + 6s) ease-in-out infinite;
}

/* -------------------------
   NAVIGATION
------------------------- */

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  letter-spacing: 0.03em;
}

nav a:hover,
nav a.active {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.nav-session-links {
  display: none;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0;
}

.nav-session-links.is-visible {
  display: inline-flex;
}

#logout-button,
#nav-logout-link {
  cursor: pointer;
}

/* -------------------------
   SHARED SURFACES
------------------------- */

.surface-primary,
.surface-secondary,
.surface-feature,
.surface-micro,
.hero-card,
.info-card,
.feature-panel,
.login-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
}

.surface-primary,
.hero-card,
.login-panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border-radius: var(--radius-lg);
}

.surface-secondary,
.info-card,
.feature-panel {
  background: linear-gradient(180deg, rgba(17, 22, 37, 0.92), rgba(12, 17, 29, 0.96));
  border-radius: var(--radius-md);
}

.surface-feature {
  background:
    linear-gradient(180deg, rgba(18, 24, 40, 0.94), rgba(10, 15, 28, 0.98)),
    radial-gradient(circle at top right, rgba(142, 168, 255, 0.12), transparent 28%);
  border-radius: var(--radius-lg);
}

.surface-micro {
  background: var(--surface-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.surface-primary::before,
.surface-secondary::before,
.surface-feature::before,
.surface-micro::before,
.hero-card::before,
.info-card::before,
.feature-panel::before,
.login-panel::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  top: -72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 168, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.surface-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234, 215, 170, 0.18), transparent);
}

.surface-kicker,
.section-kicker,
.dashboard-panel-label,
.shared-panel-label {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 0.55rem;
}

/* -------------------------
   SHARED UTILITIES
------------------------- */

.is-hidden {
  display: none !important;
}

.summary,
.login-error {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.summary {
  border: 1px solid var(--border);
  background: rgba(14, 19, 32, 0.76);
  color: var(--text);
}

.login-error {
  border: 1px solid rgba(200, 169, 106, 0.24);
  background: linear-gradient(180deg, rgba(44, 27, 18, 0.82), rgba(24, 17, 14, 0.92));
  color: var(--gold-soft);
}

.summary-chip,
.record-chip {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
}

.summary-chip span,
.record-chip span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 0.35rem;
}

.summary-chip strong,
.record-chip strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.record-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.status-pill,
.meta-pill,
.seal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.meta-pill {
  color: var(--muted);
}

.seal-pill {
  border-color: rgba(142, 168, 255, 0.18);
  background: rgba(142, 168, 255, 0.06);
}

/* -------------------------
   BUTTONS / ACTIONS
------------------------- */

.primary,
.secondary,
.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.95rem 1.35rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.primary,
.login-submit {
  border: 1px solid var(--gold-btn-border);
  color: #f8f2e6;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, var(--gold-btn-top), var(--gold-btn-bottom));
  box-shadow:
    0 10px 24px rgba(112, 80, 36, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.secondary {
  color: var(--text);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.primary:hover,
.secondary:hover,
.login-submit:hover {
  transform: translateY(-2px);
}

.primary:hover,
.login-submit:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, #c09a5c, #886333);
  box-shadow:
    0 14px 28px rgba(112, 80, 36, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.primary:disabled,
.secondary:disabled,
.login-submit:disabled,
.primary[aria-disabled="true"],
.secondary[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* -------------------------
   FORMS
------------------------- */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  color: var(--gold-soft);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea,
.store-select {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: var(--field-bg);
  color: var(--text);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(243, 238, 229, 0.42);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.store-select:focus {
  border-color: var(--field-border-strong);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.07);
  background: var(--field-bg-focus);
}

.form-group select,
.store-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 3rem;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(234, 215, 170, 0.82) 50%),
    linear-gradient(135deg, rgba(234, 215, 170, 0.82) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-group select::-ms-expand,
.store-select::-ms-expand {
  display: none;
}

.form-group select option,
.store-select option {
  background: #11151f;
  color: var(--text);
}

/* -------------------------
   OPTIONAL LEGACY LOGIN SUPPORT
------------------------- */

.login-page {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

.login-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.login-copy {
  padding: 1rem 0.5rem 1rem 0;
}

.login-panel {
  backdrop-filter: blur(10px);
  padding: 2rem;
}

.login-eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
}

.login-title {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-kanji {
  margin-top: 0.85rem;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  color: var(--gold-soft);
  letter-spacing: 0.18em;
}

.login-quote,
.login-intro {
  width: min(760px, 100%);
  margin: 1.35rem 0 0;
  padding: 1.25rem 1.4rem;
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  background: rgba(14, 19, 32, 0.72);
  box-shadow: var(--shadow-md);
  line-height: 1.85;
}

.login-quote {
  font-style: italic;
  color: var(--gold-soft);
}

.login-intro {
  color: var(--muted);
}

.login-note {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

/* -------------------------
   OPTIONAL LEGACY LORE SUPPORT
------------------------- */

.page-shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  position: relative;
  z-index: 2;
}

.hero-card,
.info-card,
.feature-panel {
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 2rem;
  margin-bottom: 1rem;
}

.info-card {
  padding: 1.5rem;
}

.feature-panel {
  padding: 1.75rem;
  margin-bottom: 1rem;
}

.section-kicker {
  padding: 0;
  border: none;
  background: transparent;
}

.hero-card h1,
.hero-card h2 {
  margin: 0 0 0.85rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.hero-card h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.hero-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.hero-text {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.content-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.content-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card h2,
.feature-panel h2 {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-transform: none;
}

.info-card p,
.feature-panel p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.info-card p:last-child,
.feature-panel p:last-child {
  margin-bottom: 0;
}

/* -------------------------
   FOOTER
------------------------- */

footer {
  padding: 1.35rem 1rem 1.7rem;
  text-align: center;
  color: var(--muted-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 10, 16, 0.72);
  letter-spacing: 0.04em;
}

/* -------------------------
   ANIMATIONS
------------------------- */

@keyframes waveShift {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(8%) rotate(1.5deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes skyPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes cloudDrift {
  0% {
    transform: translate3d(0%, 0%, 0) scale(1);
    opacity: 0.96;
  }
  50% {
    transform: translate3d(-1.2%, 0.6%, 0) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translate3d(1.5%, -0.8%, 0) scale(1.04);
    opacity: 0.94;
  }
}

@keyframes runeDrift {
  0% {
    background-position: 50% 50%;
    transform: translate3d(0%, 0%, 0) scale(1.01);
  }
  50% {
    background-position: 49.2% 50.8%;
    transform: translate3d(-0.5%, 0.35%, 0) scale(1.025);
  }
  100% {
    background-position: 50.8% 49.1%;
    transform: translate3d(0.65%, -0.4%, 0) scale(1.035);
  }
}

@keyframes runeDriftReverse {
  0% {
    background-position: 50% 50%;
    transform: translate3d(0%, 0%, 0) scale(1);
  }
  50% {
    background-position: 50.7% 49.4%;
    transform: translate3d(0.35%, -0.25%, 0) scale(1.02);
  }
  100% {
    background-position: 49.3% 50.9%;
    transform: translate3d(-0.55%, 0.3%, 0) scale(1.03);
  }
}

@keyframes runeBreath {
  0%,
  100% {
    opacity: 0.72;
    filter: saturate(1) brightness(1);
  }
  50% {
    opacity: 0.92;
    filter: saturate(1.08) brightness(1.08);
  }
}

@keyframes runeGlowPulse {
  0%,
  100% {
    opacity: 0.24;
    filter: blur(7px) brightness(1);
  }
  50% {
    opacity: 0.42;
    filter: blur(10px) brightness(1.16);
  }
}

@keyframes spiritTrace {
  0% {
    transform: translate3d(-10%, -4%, 0) scale(1);
    opacity: 0.05;
  }
  15% {
    opacity: 0.12;
  }
  35% {
    transform: translate3d(-2%, 1%, 0) scale(1.04);
    opacity: 0.2;
  }
  55% {
    transform: translate3d(4%, 3%, 0) scale(1.08);
    opacity: 0.26;
  }
  75% {
    opacity: 0.14;
  }
  100% {
    transform: translate3d(10%, 6%, 0) scale(1.03);
    opacity: 0.05;
  }
}

/* -------------------------
   RESPONSIVE
------------------------- */

@media (max-width: 980px) {
  .record-grid,
  .info-grid,
  .content-grid.two-col {
    grid-template-columns: 1fr;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-copy {
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  nav {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    gap: 0.65rem;
    justify-content: center;
  }

  nav a {
    padding: 0.68rem 1rem;
    font-size: 0.94rem;
  }

  .nav-session-links {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .login-panel,
  .hero-card,
  .info-card,
  .feature-panel,
  .surface-primary,
  .surface-secondary,
  .surface-feature {
    padding: 1.4rem;
    border-radius: 24px;
  }

  .hero-card h1 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .hero-card h2,
  .info-card h2,
  .feature-panel h2 {
    font-size: 1.25rem;
  }

  .login-quote,
  .login-intro {
    padding: 1rem 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cloud-layer,
  .rune-layer,
  .rune-layer::before,
  .rune-layer::after,
  .lightning-flash,
  body::before {
    animation: none !important;
    transform: none !important;
  }
}