/* ONYX — black gem · lunar void · MiSans + Outfit nums */
:root {
  --void: #020205;
  --ink: #06060a;
  --mist: rgba(220, 224, 232, 0.78);
  --soft: rgba(200, 206, 218, 0.55);
  --line: rgba(180, 188, 210, 0.1);
  --silver: #c8cedc;
  --moon: #e6eaf2;
  --onyx: #0c0c10;
  --onyx-mid: #16161c;
  --gleam: #d8dde8;
  --amber: #a8b0c4;
  --amber-warm: #9aa3b8;
  --accent: #8b93a8;
  --live: #8eb8a4;
  --radius: 16px;
  --nav-h: 72px;
  --max: 1120px;
  --sans: "MiSans", "MiSans Normal", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --num: "Outfit", "MiSans", system-ui, sans-serif;
  /* only for tiny UI labels — not global scale */
  --fs-tiny: 0.8rem;
  --fs-caption: 0.84rem;
  --scroll-size: 10px;
  --scroll-track: #0a0a10;
  --scroll-thumb: #3a3f4e;
  --scroll-thumb-hover: #5a6278;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* WebKit / Chromium / Edge / Safari scrollbar */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: var(--scroll-size);
  height: var(--scroll-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a5164 0%, #2e3340 100%);
  border-radius: 999px;
  border: 2px solid var(--scroll-track);
  min-height: 48px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6a738c 0%, #454c5e 100%);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 330;
  color: var(--moon);
  background: var(--void);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.num,
.meta-value,
.panel-stats b,
.card-index,
.panel-brand,
.access-foot,
.eyebrow .num {
  font-family: var(--num);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

#cosmos {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

#cosmos-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
  pointer-events: none;
}

#coord-hud {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 4;
  pointer-events: none;
  box-sizing: border-box;
  min-width: 11.5rem;
  max-width: min(15rem, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 200, 230, 0.14);
  background: rgba(6, 8, 14, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--num);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--silver);
  line-height: 1.45;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

#coord-hud .coord-line {
  display: grid;
  grid-template-columns: 2.6rem minmax(7.5rem, 1fr);
  column-gap: 0.65rem;
  align-items: center;
  white-space: nowrap;
}

#coord-hud .coord-line + .coord-line {
  margin-top: 0.28rem;
}

#coord-hud .coord-k {
  color: var(--soft);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  line-height: 1;
}

#coord-hud .num {
  color: var(--moon);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.04em;
  text-align: right;
  justify-self: end;
  min-width: 7.5rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  #coord-hud {
    min-width: 10.25rem;
    padding: 8px 11px;
    font-size: 0.74rem;
    right: 10px;
    bottom: 10px;
  }

  #coord-hud .coord-line {
    grid-template-columns: 2.2rem minmax(6.5rem, 1fr);
    column-gap: 0.45rem;
  }

  #coord-hud .num {
    font-size: 0.76rem;
    min-width: 6.5rem;
    letter-spacing: 0.02em;
  }
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 52% at 72% 34%, transparent 0%, rgba(2, 2, 5, 0.28) 48%, rgba(2, 2, 5, 0.78) 100%),
    linear-gradient(180deg, rgba(2, 2, 5, 0.55) 0%, transparent 20%, transparent 56%, rgba(2, 2, 5, 0.9) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scan {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.028;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.035) 2px,
    rgba(255, 255, 255, 0.035) 3px
  );
}

main,
.footer {
  position: relative;
  z-index: 3;
}

/* —— Liquid glass tokens (yzrt-style, dimmed for dark UI) —— */
:root {
  --glass-bg: rgba(8, 10, 16, 0.42);
  --glass-bg-hover: rgba(12, 14, 22, 0.5);
  --glass-border: 1px double rgba(255, 255, 255, 0.06);
  --glass-tr: 24%;
  --glass-blur: 12px;
  --glass-rim: rgba(255, 255, 255, 0.08);
  --glass-hi: rgba(255, 255, 255, 0.22);
  --glass-hi-soft: rgba(255, 255, 255, 0.12);
  --glass-inset:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.22),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.16),
    inset 5px -5px 1px -5px rgba(255, 255, 255, 0.1),
    inset -5px 5px 1px -5px rgba(255, 255, 255, 0.08),
    inset 0 0 2px rgba(0, 0, 0, 0.85);
  --glass-drop:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Reusable liquid-glass surface — cards, craft panel, console surfaces */
.glass,
.surface,
.stat-card {
  --tr: var(--glass-tr);
  position: relative;
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-inset), var(--glass-drop);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  overflow: hidden;
}

/* dark inner rim */
.glass::before,
.surface::before,
.stat-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: inherit;
  border: 1px solid rgba(0, 0, 0, 0.55);
  filter: blur(6px);
  pointer-events: none;
}

/* diagonal specular (dim) */
.glass::after,
.surface::after,
.stat-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  filter: blur(2px);
  background: linear-gradient(
    45deg,
    var(--glass-hi) 0%,
    transparent var(--tr),
    transparent calc(100% - var(--tr)),
    var(--glass-hi-soft) 100%
  );
  opacity: 0.55;
}

.glass-rim {
  position: absolute;
  z-index: 2;
  inset: 5px;
  border-radius: inherit;
  border: 1px solid var(--glass-rim);
  filter: blur(0.5px);
  pointer-events: none;
}

.glass > *:not(.glass-rim):not(.island-rim):not(.panel-ring):not(.auth-veil):not(.auth-pane),
.surface > *:not(.glass-rim),
.stat-card > *:not(.glass-rim) {
  position: relative;
  z-index: 3;
}

/* auth shell panes must stay absolutely layered (not forced relative by .glass) */
.auth-shell > .auth-veil {
  position: absolute;
  z-index: 1;
}
.auth-shell > .auth-pane {
  position: absolute;
  z-index: 5;
}
.auth-shell > .glass-rim {
  z-index: 6;
}

/* craft decorative ring stays absolutely placed */
.craft-panel > .panel-ring {
  position: absolute;
  z-index: 1;
}

.glass:hover,
.surface:hover,
.stat-card:hover {
  background: var(--glass-bg-hover);
}

/* —— Dynamic Island nav (global) —— */
.island-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  pointer-events: none;
}

.island {
  --tr: 22%;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(720px, calc(100vw - 24px));
  width: max-content;
  min-width: 0;
  height: 50px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  /* pill glass — same tokens, slightly denser */
  background: rgba(6, 8, 14, 0.48);
  border: var(--glass-border);
  box-shadow: var(--glass-inset), var(--glass-drop);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  overflow: hidden;
  /* soft spring-like morph (not snappy step) */
  transition:
    max-width 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s ease,
    background 0.55s ease,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-width, height, padding;
}

.island::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 12px);
  height: calc(100% - 10px);
  border-radius: inherit;
  border: 1px solid rgba(0, 0, 0, 0.6);
  filter: blur(6px);
  pointer-events: none;
}

.island::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  filter: blur(2px);
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.28) 0%,
    transparent var(--tr),
    transparent calc(100% - var(--tr)),
    rgba(255, 255, 255, 0.16) 100%
  );
  opacity: 0.5;
}

.island-rim {
  position: absolute;
  z-index: 2;
  inset: 4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.07);
  filter: blur(0.5px);
  pointer-events: none;
}

.island > *:not(.island-rim) {
  position: relative;
  z-index: 3;
}

.island:hover {
  background: rgba(10, 12, 18, 0.55);
}

/* compact: morph mid-links away (opacity+width, not hard display:none) */
.island.is-compact {
  max-width: min(340px, calc(100vw - 24px));
  height: 44px;
  gap: 8px;
  padding: 0 10px 0 12px;
  --tr: 28%;
  transform: scale(0.985);
}

.island.is-compact .island-links {
  opacity: 0;
  max-width: 0;
  margin: 0;
  gap: 0;
  transform: translateY(-2px) scale(0.92);
  pointer-events: none;
  overflow: hidden;
}

.island.is-compact .lang-switch {
  transform: scale(0.9);
  transform-origin: center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.island.is-compact .island-cta,
.island.is-compact .island-btn {
  padding: 6px 10px;
  font-size: 0.72rem;
  transition:
    padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    font-size 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* EN: tighter letter-spacing so full island fits */
html[lang="en"] .island {
  gap: 12px;
}
html[lang="en"] .island-name {
  letter-spacing: 0.16em;
}
html[lang="en"] .island-links {
  gap: 12px;
}
html[lang="en"] .island-links a {
  letter-spacing: 0.02em;
  font-size: 0.84rem;
}

.island-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--moon);
  flex: 0 0 auto;
}

.island-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8ecf4, #8a94a8 55%, #3a4254 100%);
  box-shadow: 0 0 8px rgba(180, 190, 210, 0.3);
  animation: island-dot 3.6s ease-in-out infinite;
}

.island-name {
  font-family: var(--num);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.island-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  max-width: 420px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.5s ease,
    gap 0.5s ease;
}

.island-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color 0.2s ease;
}

.island-links a:hover,
.island-links a.is-active {
  color: var(--moon);
}

.island-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.island-cta,
.island-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #0a0a10;
  background: linear-gradient(180deg, #d8dce6, #a8b0c0);
  font-family: var(--num);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.island-cta:hover,
.island-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(160, 170, 190, 0.18);
}

.island .badge {
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes island-dot {
  0%, 100% { box-shadow: 0 0 6px rgba(180, 190, 210, 0.25); }
  50% { box-shadow: 0 0 12px rgba(200, 210, 230, 0.5); }
}



/* legacy .nav kept for console/admin */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  backdrop-filter: blur(18px) saturate(1.05);
  background: linear-gradient(180deg, rgba(2, 2, 5, 0.72), transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.4s ease;
  z-index: 40;
}

.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(2, 2, 5, 0.82);
}

body.home-page main {
  padding-top: 56px;
}

/* denser star feel: less heavy top veil on home */
body.home-page .veil {
  background:
    radial-gradient(ellipse 70% 55% at 78% 32%, transparent 0%, rgba(2, 2, 5, 0.18) 50%, rgba(2, 2, 5, 0.62) 100%),
    linear-gradient(180deg, rgba(2, 2, 5, 0.28) 0%, transparent 22%, transparent 58%, rgba(2, 2, 5, 0.82) 100%);
}

body.home-page .fx-bloom {
  background:
    radial-gradient(ellipse 55% 45% at 78% 36%, rgba(200, 210, 230, 0.08), transparent 62%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(50, 60, 100, 0.1), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(80, 90, 130, 0.05), transparent 75%);
}

@media (max-width: 720px) {
  .island {
    gap: 10px;
    padding: 8px 10px 8px 12px;
  }
  .island-links {
    display: none;
  }
  .island.is-compact {
    max-width: min(280px, calc(100vw - 24px));
  }
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--moon);
  text-decoration: none;
}

.nav-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--gleam);
  border: 1px solid rgba(200, 206, 218, 0.18);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), rgba(10, 10, 14, 0.9));
  box-shadow: 0 0 20px rgba(180, 188, 210, 0.12);
}

.nav-name {
  letter-spacing: 0.34em;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--num);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  font-weight: 380;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--moon);
}

.nav-cta {
  color: var(--ink);
  background: var(--moon);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--num);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(220, 224, 232, 0.16);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding:
    calc(var(--nav-h) + 48px)
    clamp(20px, 5vw, 64px)
    clamp(48px, 8vh, 96px);
  max-width: calc(var(--max) + 128px);
}

.eyebrow {
  font-size: var(--fs-caption);
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.eyebrow .sep {
  opacity: 0.45;
}

.hero h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  max-width: 14em;
  margin-bottom: 26px;
  text-shadow: 0 10px 48px rgba(0, 0, 0, 0.55);
}

.hero h1 .line {
  display: block;
}

.hero h1 .brand {
  font-family: var(--num);
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 0.92em;
}

/* ONYX 艺术字：仍是文字，不是图标 */
.hero h1 .onyx-art {
  display: flex;
  align-items: baseline;
  gap: 0.04em;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(3.4rem, 9.5vw, 6.4rem);
  letter-spacing: 0.22em;
  line-height: 1;
  margin: 0 0 0.18em;
  padding-right: 0.12em;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
    165deg,
    #ffffff 0%,
    #f2f4f8 18%,
    #c8cedc 42%,
    #8b93a8 68%,
    #e8ecf5 88%,
    #a8b0c0 100%
  );
  background-size: 140% 140%;
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(0 14px 36px rgba(0, 0, 0, 0.55));
  animation: onyx-sheen 9s ease-in-out infinite;
}

.hero h1 .onyx-art {
  position: relative;
}

.hero h1 .onyx-art-letter {
  display: inline-block;
  position: relative;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18),
    0 -1px 0 rgba(80, 90, 110, 0.3),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

@keyframes onyx-sheen {
  0%, 100% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .onyx-art {
    animation: none;
  }
}

.soft,
.hero h1 .soft,
.craft-copy h2 .soft {
  font-weight: 330;
  color: rgba(220, 224, 232, 0.72);
}

.lede {
  max-width: 38em;
  color: var(--mist);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  font-weight: 330;
  margin-bottom: 36px;
}

.lede strong {
  font-weight: 500;
  color: var(--moon);
}

.lede em {
  font-style: normal;
  color: var(--silver);
  letter-spacing: 0.04em;
  font-size: 0.95em;
}

.lede.narrow {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  font-weight: 400;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn.primary {
  background: linear-gradient(180deg, #eef1f7 0%, #c8cedc 100%);
  color: #0a0a10;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(200, 206, 218, 0.16);
}

.btn.ghost {
  color: var(--moon);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
}

.btn.ghost:hover {
  border-color: rgba(200, 206, 218, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.btn.large {
  padding: 16px 32px;
  min-width: 160px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}

.meta-label {
  display: block;
  font-size: var(--fs-tiny);
  letter-spacing: 0.2em;
  color: var(--soft);
  margin-bottom: 4px;
  font-family: var(--sans);
}

.meta-value {
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  color: var(--silver);
  font-weight: 450;
}

.meta-value.live {
  color: var(--live);
  text-shadow: 0 0 16px rgba(142, 184, 164, 0.28);
}

.section {
  padding: clamp(80px, 14vh, 140px) clamp(20px, 5vw, 64px);
  max-width: calc(var(--max) + 128px);
}

.section-head {
  margin-bottom: 48px;
  max-width: 40em;
}

.section h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.22;
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.section-sub {
  margin-top: 16px;
  color: var(--mist);
  font-size: 1rem;
  font-weight: 330;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  padding: 28px 22px;
  border-radius: var(--radius);
  transition: transform 0.35s ease, background 0.3s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--glass-inset),
    0 22px 48px rgba(0, 0, 0, 0.42);
}

.card-index {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
  display: block;
  margin-bottom: 18px;
  letter-spacing: 0.12em;
}

.card h3 {
  font-family: var(--num);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.card p {
  color: var(--mist);
  font-size: 0.95rem;
  font-weight: 330;
}

.craft {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.craft-copy p {
  color: var(--mist);
  max-width: 42ch;
  margin: 20px 0 28px;
}

.ticks {
  list-style: none;
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  color: var(--silver);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  font-weight: 330;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(140, 148, 170, 0.35);
}

.craft-panel {
  min-height: 360px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.panel-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(200, 206, 218, 0.14);
  top: 44%;
  left: 50%;
  transform: translate(-50%, -58%);
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.45),
    inset 0 0 30px rgba(200, 206, 218, 0.05),
    0 0 80px rgba(120, 130, 160, 0.08);
  animation: breathe 9s ease-in-out infinite;
}

.panel-ring::before {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 35%),
    radial-gradient(circle at 50% 50%, #1a1a22 0%, #08080c 70%, #040406 100%);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8);
}

.panel-ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(160, 168, 188, 0.22);
  animation: spin 52s linear infinite;
}

.panel-core {
  position: relative;
  text-align: center;
  margin-bottom: 36px;
  z-index: 1;
}

.panel-brand {
  display: block;
  letter-spacing: 0.42em;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--moon);
}

.panel-tag {
  font-size: var(--fs-tiny);
  letter-spacing: 0.24em;
  color: var(--soft);
}

.panel-stats {
  position: relative;
  display: flex;
  gap: 28px;
  width: 100%;
  justify-content: space-between;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.panel-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-stats b {
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.panel-stats span {
  font-size: var(--fs-tiny);
  letter-spacing: 0.18em;
  color: var(--soft);
  font-family: var(--sans);
}

.access {
  text-align: center;
  margin: 0 auto;
}

.access .lede {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 36px;
}

.access-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.access-foot {
  margin-top: 36px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--soft);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
  padding: 40px 20px 56px;
  color: var(--soft);
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
}

.footer .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(140, 148, 170, 0.35);
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -58%) scale(1); opacity: 0.88; }
  50% { transform: translate(-50%, -58%) scale(1.04); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .grid-3,
  .grid-4,
  .craft {
    grid-template-columns: 1fr;
  }

  .island-links {
    display: none;
  }

  .hero {
    justify-content: center;
    padding-bottom: 64px;
  }

  .craft-panel {
    min-height: 320px;
  }

  .hero h1 .brand {
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel-ring,
  .panel-ring::after {
    animation: none;
  }
}

/* ========== App shell (console / admin) ========== */
body.app {
  min-height: 100vh;
  --nav-h: 78px;
}

body.app .veil {
  background:
    radial-gradient(ellipse 80% 60% at 80% 20%, transparent 0%, rgba(2, 2, 5, 0.45) 50%, rgba(2, 2, 5, 0.88) 100%),
    linear-gradient(180deg, rgba(2, 2, 5, 0.7) 0%, rgba(2, 2, 5, 0.4) 30%, rgba(2, 2, 5, 0.92) 100%);
}

.nav a.is-active {
  color: var(--moon);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 16px rgba(80, 160, 220, 0.08);
  gap: 2px;
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--soft);
  font-family: var(--num);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn:hover {
  color: var(--moon);
}

.lang-btn.is-on {
  color: #0a1018;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(200, 214, 236, 0.88) 100%);
  box-shadow:
    0 0 14px rgba(180, 210, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.lang-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--silver);
  font-family: var(--num);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.fx-bloom {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 42% at 70% 38%, rgba(220, 225, 235, 0.07), transparent 60%),
    radial-gradient(ellipse 40% 30% at 25% 70%, rgba(40, 45, 70, 0.08), transparent 70%);
  mix-blend-mode: screen;
  animation: bloom-breathe 12s ease-in-out infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

body.home-page .hero h1 .soft {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

html[data-lang="en"] body.home-page .hero h1 {
  max-width: 16em;
}

@keyframes bloom-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.app-wrap {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 36px) clamp(18px, 4vw, 40px) 64px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.app-header h1 {
  font-family: var(--num);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: 0.18em;
  margin-top: 8px;
}

.app-header p {
  color: var(--mist);
  font-size: 0.95rem;
  max-width: 42ch;
  margin-top: 8px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.app-grid.triple {
  grid-template-columns: repeat(3, 1fr);
}

.app-grid.stack {
  grid-template-columns: 1fr;
}

.surface {
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

/* glass already paints ::before/::after — keep surface text above */
.surface.glass > * {
  position: relative;
  z-index: 3;
}

.surface h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.surface h3 {
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  color: var(--silver);
}

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.surface-head h2 {
  margin-bottom: 0;
}

.kv {
  display: grid;
  gap: 10px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(180, 188, 210, 0.08);
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-label {
  color: var(--soft);
  font-size: var(--fs-caption);
  letter-spacing: 0.06em;
}

.kv-value {
  font-family: var(--num);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--moon);
  text-align: right;
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--num);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.03);
}

.badge.ok {
  color: var(--live);
  border-color: rgba(142, 184, 164, 0.35);
  box-shadow: 0 0 16px rgba(142, 184, 164, 0.12);
}

.badge.warn {
  color: #d4b483;
  border-color: rgba(212, 180, 131, 0.35);
}

.badge.err {
  color: #d48a8a;
  border-color: rgba(212, 138, 138, 0.35);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  color: var(--soft);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--moon);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input.num,
.field textarea.num {
  font-family: var(--num);
  letter-spacing: 0.04em;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(180, 188, 210, 0.35);
  box-shadow: 0 0 0 3px rgba(140, 148, 170, 0.12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.field .hint {
  font-size: var(--fs-tiny);
  color: var(--soft);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.btn.block {
  width: 100%;
}

.btn.sm {
  padding: 9px 14px;
  font-size: 0.8rem;
}

.btn.danger {
  background: transparent;
  border: 1px solid rgba(212, 138, 138, 0.35);
  color: #e0a0a0;
}

.btn.danger:hover {
  background: rgba(212, 138, 138, 0.08);
  border-color: rgba(212, 138, 138, 0.55);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  min-width: 220px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 14, 0.92);
  backdrop-filter: blur(12px);
  color: var(--moon);
  font-size: 0.88rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.ok { border-color: rgba(142, 184, 164, 0.4); }
.toast.err { border-color: rgba(212, 138, 138, 0.4); }

/* —— Console auth shell (ONYX glass + slide/crossfade logic) —— */
.auth-stage {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--nav-h) - 48px);
  padding: clamp(16px, 3vw, 36px) 12px 36px;
  box-sizing: border-box;
}

.auth-shell {
  --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --auth-form: 44%;
  --auth-veil: 56%;
  position: relative;
  width: min(880px, 100%);
  height: clamp(500px, 68svh, 600px);
  border-radius: 20px;
  overflow: hidden;
  /* glass tokens already from .glass */
}

/* soft moon disk behind veil text */
.auth-veil {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: var(--auth-veil);
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(ellipse 70% 55% at 55% 48%, rgba(180, 195, 220, 0.09), transparent 70%),
    linear-gradient(105deg, rgba(6, 8, 14, 0.15), rgba(4, 6, 12, 0.55));
  transition:
    transform 0.7s var(--auth-ease),
    border-color 0.35s ease;
}

.auth-shell.is-register .auth-veil {
  /* slide left by form width / veil width (44/56) */
  transform: translateX(calc(-100% * 44 / 56));
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.auth-veil-glow {
  position: absolute;
  width: min(220px, 48%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.55), rgba(200, 210, 230, 0.18) 42%, transparent 68%);
  opacity: 0.35;
  filter: blur(1px);
  box-shadow: 0 0 60px rgba(160, 180, 220, 0.12);
}

.auth-veil-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}

.auth-veil-title {
  margin: 10px 0 12px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--moon);
  text-indent: 0.32em;
}

.auth-veil-line {
  font-family: var(--num);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--soft);
  transition: opacity 0.35s ease;
}

/* form panes */
.auth-pane {
  position: absolute;
  z-index: 5;
  top: 0;
  height: 100%;
  width: var(--auth-form);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.5vw, 40px);
  overflow: auto;
  scrollbar-width: thin;
  background: rgba(6, 8, 14, 0.72);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  transition:
    opacity 0.4s ease,
    transform 0.62s var(--auth-ease);
}

/* form content above glass specular layers */
.auth-pane > * {
  position: relative;
  z-index: 1;
}

.auth-pane-login {
  left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.auth-pane-register {
  right: 0;
  left: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
}

.auth-shell.is-register .auth-pane-login {
  opacity: 0;
  transform: translateX(-28px);
  pointer-events: none;
}

.auth-shell.is-register .auth-pane-register {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.auth-pane-title {
  margin: 6px 0 8px;
  font-family: var(--num);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--moon);
}

.auth-pane-sub {
  margin: 0 0 18px;
  color: var(--mist);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 36ch;
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-pane .field {
  margin-bottom: 10px;
}

.auth-pane .field input {
  min-height: 40px;
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-pane .field input:focus {
  border-color: rgba(180, 200, 230, 0.28);
}

.auth-pane .btn.block {
  margin-top: 6px;
}

.auth-swap {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--soft);
}

.auth-swap button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--moon);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0 2px;
  border-bottom: 1px solid rgba(200, 210, 230, 0.25);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.auth-swap button:hover {
  border-bottom-color: var(--moon);
}

.auth-pane .auth-agree {
  margin-top: 10px;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--soft);
}

.auth-pane .auth-agree a {
  color: var(--moon);
}

/* mobile: single pane swap */
@media (max-width: 860px) {
  .auth-stage {
    min-height: auto;
    padding: 8px 8px 28px;
  }

  .auth-shell {
    height: auto;
    border-radius: 16px;
  }

  .auth-veil {
    display: none;
  }

  .auth-pane {
    position: relative;
    width: 100%;
    height: auto;
    left: 0 !important;
    right: auto !important;
    border: 0 !important;
    padding: 22px 18px 26px;
    transform: none !important;
    background: transparent;
    backdrop-filter: none;
  }

  .auth-pane-login {
    display: flex;
  }

  .auth-pane-register {
    display: none;
  }

  .auth-shell.is-register .auth-pane-login {
    display: none;
  }

  .auth-shell.is-register .auth-pane-register {
    display: flex;
    pointer-events: auto;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-veil,
  .auth-pane {
    transition: none !important;
  }
}

.auth-gate {
  max-width: 420px;
  margin: 8vh auto 0;
}

.auth-gate .lede {
  margin-bottom: 22px;
  max-width: none;
}

.list-feed {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

.list-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 188, 210, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.list-item .t {
  font-family: var(--num);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--soft);
  margin-bottom: 4px;
}

.list-item .b {
  font-size: 0.9rem;
  color: var(--mist);
  line-height: 1.45;
}

.dropzone {
  border: 1px dashed rgba(180, 188, 210, 0.22);
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
  color: var(--soft);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.drag {
  border-color: rgba(180, 188, 210, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.dropzone strong {
  display: block;
  color: var(--moon);
  font-weight: 500;
  margin-bottom: 6px;
}

.dropzone .file-name {
  margin-top: 10px;
  font-family: var(--num);
  font-size: 0.82rem;
  color: var(--silver);
  word-break: break-all;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(180, 188, 210, 0.08);
}

.toggle:last-child {
  border-bottom: 0;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: var(--silver);
  transition: 0.2s ease;
}

.switch input:checked + span {
  background: rgba(142, 184, 164, 0.25);
  border-color: rgba(142, 184, 164, 0.45);
}

.switch input:checked + span::after {
  transform: translateX(18px);
  background: var(--live);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--num);
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab:hover {
  color: var(--moon);
}

.tab.active {
  color: var(--ink);
  background: var(--moon);
  border-color: var(--moon);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: 14px;
}

.stat-card .l {
  font-size: var(--fs-tiny);
  letter-spacing: 0.16em;
  color: var(--soft);
  margin-bottom: 6px;
}

.stat-card .v {
  font-family: var(--num);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--soft);
  font-size: 0.88rem;
}

/* only the formerly tiny list timestamps */
.list-item .t {
  font-size: var(--fs-tiny) !important;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .app-grid,
  .app-grid.triple,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .nav-actions .nav-cta-text {
    display: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* reveal on home */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Boot gate (original — not a port of Lyrae loader) ========== */
.boot-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: #020206;
  overflow: hidden;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.9s;
}
html[data-boot-seen="1"] .boot-gate { display: none !important; }
.boot-gate.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-gate::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(ellipse 40% 30% at 50% 42%, rgba(160, 180, 220, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 30% 70%, rgba(80, 100, 140, 0.08), transparent 65%);
  filter: blur(40px);
  animation: boot-drift 6s ease-in-out infinite alternate;
}
.boot-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.boot-letters {
  display: flex;
  gap: 0.08em;
  font-family: var(--num);
  font-size: clamp(2.8rem, 9vw, 5rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--moon);
}
.boot-letters span {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.92);
  filter: blur(8px);
  animation: boot-letter 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.boot-letters span:nth-child(1) { animation-delay: 0.12s; }
.boot-letters span:nth-child(2) { animation-delay: 0.22s; }
.boot-letters span:nth-child(3) { animation-delay: 0.32s; }
.boot-letters span:nth-child(4) { animation-delay: 0.42s; }
.boot-sub {
  font-family: var(--num);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  color: var(--soft);
  text-transform: uppercase;
  opacity: 0;
  animation: boot-fade 0.7s ease 0.55s forwards;
}
.boot-line {
  width: min(220px, 50vw);
  height: 1px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  opacity: 0;
  animation: boot-fade 0.5s ease 0.45s forwards;
}
.boot-line > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, transparent, #c8d0e0, transparent);
  box-shadow: 0 0 12px rgba(200, 210, 230, 0.35);
}
.boot-status {
  font-family: var(--num);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: rgba(180, 190, 210, 0.45);
  min-height: 1.2em;
  opacity: 0;
  animation: boot-fade 0.5s ease 0.6s forwards;
}
@keyframes boot-letter {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes boot-fade { to { opacity: 1; } }
@keyframes boot-drift {
  from { transform: translate(-2%, -1%) scale(1); }
  to { transform: translate(2%, 2%) scale(1.05); }
}

/* ========== Agreement page ========== */
.agree-page main {
  position: relative;
  z-index: 3;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 28px) clamp(16px, 4vw, 32px) 80px;
}
.agree-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 60;
  background: transparent;
}
.agree-progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6a7a94, #c8d0e0);
  box-shadow: 0 0 10px rgba(180, 200, 230, 0.35);
}
.agree-hero {
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px);
  margin-bottom: 28px;
}
.agree-hero .eyebrow { margin-bottom: 10px; }
.agree-hero h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.agree-hero p {
  color: var(--mist);
  max-width: 62ch;
  line-height: 1.75;
  margin-bottom: 18px;
}
.agree-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.agree-tag {
  font-family: var(--num);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  color: var(--soft);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.agree-tag.hi {
  color: var(--moon);
  border-color: rgba(180, 200, 230, 0.25);
  background: rgba(140, 160, 200, 0.08);
}
.agree-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
.agree-toc {
  position: sticky;
  top: 88px;
  border-radius: 18px;
  padding: 20px;
}
.agree-toc h2 {
  font-size: 1rem;
  margin: 4px 0 14px;
  letter-spacing: 0.06em;
}
.agree-toc-nav {
  display: grid;
  gap: 4px;
}
.agree-toc-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--soft);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
}
.agree-toc-nav a:hover { color: var(--moon); background: rgba(255,255,255,0.03); }
.agree-toc-nav a.is-on {
  color: var(--moon);
  background: rgba(160, 180, 220, 0.1);
}
.agree-toc-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.agree-card {
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 18px;
  scroll-margin-top: 96px;
}
.agree-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.agree-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(140, 160, 200, 0.1);
  color: var(--moon);
  font-family: var(--num);
  font-weight: 600;
  flex: 0 0 auto;
}
.agree-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
}
.agree-card .sub {
  font-family: var(--num);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--soft);
  text-transform: uppercase;
  margin-top: 3px;
}
.agree-tldr {
  border-left: 2px solid rgba(160, 180, 220, 0.45);
  background: rgba(140, 160, 200, 0.06);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  color: var(--mist);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.agree-clause {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}
.agree-num {
  flex: 0 0 auto;
  font-family: var(--num);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--moon);
  background: rgba(140, 160, 200, 0.1);
  width: 36px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.agree-clause h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 6px;
}
.agree-clause p {
  color: var(--mist);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}
.agree-clause p strong { color: var(--silver); }
.agree-term {
  margin-top: 18px;
  border-radius: 12px;
  background: #0a0c12;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 16px;
  font-family: var(--num);
  font-size: 0.75rem;
  color: #a8b0c0;
  line-height: 1.7;
}
.agree-term .k { color: #6a7488; }
.agree-term .v { color: #e6eaf2; font-weight: 500; }
.agree-term .ok {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 4px;
  color: #8eb8a4;
  border: 1px solid rgba(142, 184, 164, 0.3);
  background: rgba(142, 184, 164, 0.1);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}
@media (max-width: 860px) {
  .agree-layout { grid-template-columns: 1fr; }
  .agree-toc { position: static; }
}

/* ========== Console expanded dashboard ========== */
.con-disclaimer {
  margin-bottom: 16px;
  border-radius: 16px;
  padding: 16px 18px;
}
.con-disclaimer a { color: var(--moon); }
.con-token-box {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  font-family: var(--num);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  color: var(--moon);
}
.con-section {
  margin-top: 22px;
}
.con-section > .eyebrow {
  margin-bottom: 6px;
}
.con-section > h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.con-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 800px) {
  .con-grid-2 { grid-template-columns: 1fr; }
}
.con-empty {
  color: var(--soft);
  font-size: 0.88rem;
  padding: 12px 0;
}
.auth-agree {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--soft);
  line-height: 1.55;
}
.auth-agree a { color: var(--moon); }

/* ========== Admin shell (sidebar panels) ========== */
.ops-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}
.ops-side {
  position: sticky;
  top: 88px;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.ops-side button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--soft);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--num);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ops-side button:hover { color: var(--moon); background: rgba(255,255,255,0.03); }
.ops-side button.is-on {
  color: var(--moon);
  background: rgba(160, 180, 220, 0.1);
}
.ops-panel { display: none; }
.ops-panel.is-on { display: block; }
@media (max-width: 900px) {
  .ops-shell { grid-template-columns: 1fr; }
  .ops-side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}
