:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --panel: rgba(18, 18, 26, 0.72);
  --panel-solid: #12121b;
  --ink: #ece9e1;
  --muted: #9b96a8;
  --gold: #f3c34a;
  --gold-soft: #ffe6a6;
  --void: #8a7bff;
  --void-soft: #b9aaff;
  --cyan: #57d6e6;
  --danger: #ff6b6b;
  --ok: #56d364;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --maxw: 1120px;
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

::selection { background: rgba(243, 195, 74, 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--gold);
  color: #1a1206;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; color: #1a1206; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(243, 195, 74, 0.10), transparent 60%),
    radial-gradient(1100px 700px at 100% 0%, rgba(138, 123, 255, 0.12), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.muted { color: var(--muted); }
.center { text-align: center; }
.gold { color: var(--gold); }
.void { color: var(--void-soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(7, 7, 11, 0.92), rgba(7, 7, 11, 0.55));
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(243, 195, 74, 0.35)); }
.brand .name {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold-soft), #fff 45%, var(--void-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a { color: var(--ink); font-size: 0.95rem; letter-spacing: 0.03em; white-space: nowrap; }
.nav-links a:hover { color: var(--gold); }
.nav-auth { display: flex; gap: 10px; align-items: center; }
.nav-auth .btn { flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border-bottom-color: var(--line-strong); }
.nav-links a { position: relative; }
.nav-links a[aria-current="page"] { color: var(--gold); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.03em;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #c9962b);
  color: #1a1206;
  border: 0;
  box-shadow: 0 10px 30px rgba(243, 195, 74, 0.28);
}
.btn-primary:hover { color: #1a1206; box-shadow: 0 14px 38px rgba(243, 195, 74, 0.45); }
.btn-ghost { background: transparent; }
.btn-void {
  background: linear-gradient(135deg, var(--void), #5b4bd6);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 30px rgba(138, 123, 255, 0.3);
}
.btn-block { width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn.disabled { opacity: 0.5; pointer-events: none; cursor: default; }
.btn .sub { font-weight: 400; font-size: 0.78rem; opacity: 0.85; }

.download-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(243,195,74,0.12), rgba(138,123,255,0.10));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-top: 36px;
}
.download-band .dl-emblem { width: 72px; height: 72px; filter: drop-shadow(0 0 16px rgba(243,195,74,0.35)); }
.download-band .dl-copy { flex: 1 1 280px; }
.download-band .dl-copy h3 { font-size: 1.4rem; margin-bottom: 4px; }
.download-band .dl-copy p { color: var(--muted); margin: 0; }
.download-band .dl-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.download-band .dl-meta { font-size: 0.8rem; color: var(--muted); text-align: center; letter-spacing: 0.04em; }

.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -4%;
  background-image: url("/assets/gloom-hero.png");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
  animation: heroPan 38s ease-in-out infinite alternate;
}
@keyframes heroPan {
  from { transform: scale(1.05) translate3d(-1%, -1%, 0); }
  to { transform: scale(1.12) translate3d(1.5%, 1%, 0); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 7, 11, 0.55), rgba(7, 7, 11, 0.82) 70%, var(--bg));
  z-index: 1;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero-emblem {
  width: 124px; height: 124px; margin-bottom: 18px;
  filter: drop-shadow(0 0 24px rgba(243, 195, 74, 0.4));
  animation: emblemBreathe 6s ease-in-out infinite;
}
@keyframes emblemBreathe {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(243, 195, 74, 0.35)); transform: translateY(0); }
  50% { filter: drop-shadow(0 0 34px rgba(138, 123, 255, 0.5)); transform: translateY(-6px); }
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 6.4rem);
  letter-spacing: 0.2em;
  margin-bottom: 0.1em;
  background: linear-gradient(92deg, var(--gold-soft) 0%, #ffffff 30%, var(--void-soft) 55%, #ffffff 80%, var(--gold-soft) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(243, 195, 74, 0.12);
  animation: titleShimmer 9s linear infinite;
}
@keyframes titleShimmer {
  to { background-position: -220% center; }
}
.hero .tagline { font-family: var(--serif); font-size: clamp(1.05rem, 2.4vw, 1.6rem); color: var(--gold-soft); letter-spacing: 0.12em; }
.hero .lede { max-width: 620px; font-size: 1.12rem; color: #d7d3e2; margin: 18px 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.stat {
  flex: 1 1 150px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(6px);
}
.stat .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }
.stat .value { font-family: var(--serif); font-size: 1.7rem; margin-top: 4px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.off { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

section { padding: 80px 0; }
.section-eyebrow { text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.78rem; color: var(--gold); margin-bottom: 10px; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-lead { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; margin: 0; }

.factions { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.faction {
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.faction h3 { font-size: 1.6rem; letter-spacing: 0.12em; }
.faction.light { background: linear-gradient(160deg, rgba(243, 195, 74, 0.14), rgba(243, 195, 74, 0.02)); }
.faction.light h3 { color: var(--gold); }
.faction.dark { background: linear-gradient(160deg, rgba(138, 123, 255, 0.16), rgba(138, 123, 255, 0.02)); }
.faction.dark h3 { color: var(--void-soft); }
.faction .sigil { font-size: 2.2rem; margin-bottom: 8px; }

.grid { display: grid; gap: 20px; margin-top: 40px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card .ic { font-size: 1.6rem; margin-bottom: 10px; }
.card h3 { font-size: 1.2rem; letter-spacing: 0.05em; }
.card p { color: var(--muted); margin: 0; }

.steps { counter-reset: step; display: grid; gap: 18px; margin-top: 36px; }
.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.step .n {
  counter-increment: step;
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--gold), #b9842a);
  color: #1a1206;
}
.step .n::before { content: counter(step); }
.step h3 { margin-bottom: 4px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); }

.connect {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.connect code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #05050a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--cyan);
  font-size: 1.05rem;
}

.prose { max-width: 760px; }
.prose p { color: #cdc9d8; margin: 0 0 1.2em; font-size: 1.06rem; }
.prose h2 { margin-top: 1.6em; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.5em 0;
  padding: 6px 0 6px 22px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
}

.auth-shell { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 60px 22px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 38px 34px;
  box-shadow: var(--shadow);
}
.auth-card .emblem { width: 64px; height: 64px; display: block; margin: 0 auto 14px; }
.auth-card h1 { text-align: center; font-size: 1.8rem; }
.auth-sub { text-align: center; color: var(--muted); margin-top: -4px; margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #05050a;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 195, 74, 0.18); }
.field .err { display: block; color: var(--danger); font-size: 0.84rem; margin-top: 6px; min-height: 1em; }
.form-note { text-align: center; margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 0.95rem; display: none; }
.alert.show { display: block; }
.alert.error { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: #ffb4b4; }
.alert.success { background: rgba(86, 211, 100, 0.12); border: 1px solid rgba(86, 211, 100, 0.4); color: #bff5c4; }

.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 8px; }
.badge { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--gold); }
.badge.gm { background: linear-gradient(135deg, rgba(243,195,74,0.2), transparent); border-color: var(--gold); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 26px; }
.hero-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--void));
}
.hero-card h3 { font-size: 1.3rem; margin-bottom: 2px; }
.hero-card .loc { color: var(--cyan); font-size: 0.9rem; margin-bottom: 14px; }
.bar { height: 8px; border-radius: 6px; background: #05050a; overflow: hidden; margin: 4px 0 12px; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; }
.bar.hp > span { background: linear-gradient(90deg, #ff7a7a, #d83b3b); }
.bar.mana > span { background: linear-gradient(90deg, #7ab8ff, #4b6bd6); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 0.92rem; }
.kv .k { color: var(--muted); }
.empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-top: 26px; }

.graveyard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.tomb {
  position: relative;
  background: linear-gradient(180deg, #181822, #0e0e15);
  border: 1px solid var(--line);
  border-bottom: 3px solid rgba(0, 0, 0, 0.6);
  border-radius: 90px 90px 12px 12px;
  padding: 34px 22px 24px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tomb:hover { transform: translateY(-4px); box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6); }
.tomb .cross { font-size: 1.4rem; color: var(--muted); letter-spacing: 0.2em; }
.tomb .rip { font-family: var(--serif); font-size: 0.74rem; letter-spacing: 0.4em; color: var(--muted); margin-bottom: 8px; }
.tomb .name { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); margin-bottom: 8px; word-break: break-word; }
.tomb .epitaph { font-size: 0.92rem; color: var(--void-soft); font-style: italic; }
.tomb .when { font-size: 0.78rem; color: var(--muted); margin-top: 12px; }
.tomb .arena-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 8px;
}
.cemetery-hero { text-align: center; }
.cemetery-hero .tag { color: var(--muted); border-color: var(--line-strong); }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; margin-top: 40px; }
.podium .seat {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  position: relative;
}
.podium .seat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; }
.podium .seat.p1 { transform: translateY(-16px); border-color: rgba(243,195,74,0.5); box-shadow: 0 18px 40px rgba(243,195,74,0.18); }
.podium .seat.p1::before { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.podium .seat.p2::before { background: linear-gradient(90deg, #c9ccd6, #8b8f9c); }
.podium .seat.p3::before { background: linear-gradient(90deg, #c98a3c, #8a5a22); }
.podium .medal { font-size: 2rem; }
.podium .pname { font-family: var(--serif); font-size: 1.2rem; margin: 6px 0 2px; word-break: break-word; }
.podium .plevel { color: var(--gold); font-family: var(--serif); font-size: 1.5rem; }
.podium .pside { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.ladder { margin-top: 34px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ladder-row {
  display: grid;
  grid-template-columns: 56px 1fr 90px 130px 90px;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.ladder-row:last-child { border-bottom: 0; }
.ladder-row.head { background: rgba(255,255,255,0.03); color: var(--muted); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.ladder-row:not(.head):hover { background: rgba(255,255,255,0.03); }
.ladder-row .rk { font-family: var(--serif); font-size: 1.1rem; color: var(--muted); }
.ladder-row .rk.top { color: var(--gold); }
.ladder-row .who { font-family: var(--serif); font-size: 1.08rem; word-break: break-word; }
.ladder-row .lv { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-soft); }
.ladder-row .side-r { color: var(--gold); }
.ladder-row .side-u { color: var(--void-soft); }
.ladder-row .num { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .podium { grid-template-columns: 1fr; }
  .podium .seat.p1 { transform: none; }
  .ladder-row { grid-template-columns: 44px 1fr 70px; }
  .ladder-row .col-xp, .ladder-row .col-side { display: none; }
}

.faq { margin-top: 36px; display: grid; gap: 14px; }
.faq details {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "\25B8"; color: var(--gold); transition: transform 0.2s ease; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq summary:hover { color: var(--gold-soft); }
.faq .answer { padding: 0 22px 20px 46px; color: #cdc9d8; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer ol, .faq .answer ul { margin: 0 0 10px; padding-left: 20px; }
.faq .answer li { margin-bottom: 6px; }
.faq .answer code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #05050a; border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; color: var(--cyan); font-size: 0.92em;
}
.faq .tagline-q { color: var(--muted); font-size: 0.86rem; }

.decree {
  position: relative;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 20px;
}
.decree p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  line-height: 1.5;
  color: var(--gold-soft);
  text-shadow: 0 0 40px rgba(243, 195, 74, 0.15);
  margin: 0;
}
.decree cite { display: block; margin-top: 16px; font-style: normal; font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.decree::before, .decree::after {
  content: "\201C"; font-family: var(--serif); color: rgba(243, 195, 74, 0.25);
  font-size: 4rem; line-height: 1; position: absolute; top: -10px; left: -6px;
}
.decree::after { content: "\201D"; top: auto; bottom: -40px; left: auto; right: -6px; }

.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.codex-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.codex-card.umbral { border-left-color: var(--void); }
.codex-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.04); }
.codex-card .place { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 4px; }
.codex-card .coords { font-family: ui-monospace, Consolas, monospace; font-size: 0.74rem; color: var(--cyan); letter-spacing: 0.04em; margin-bottom: 12px; }
.codex-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; color: var(--muted);
  padding: 8px 10px; border-radius: 8px; font-size: 1.05rem; line-height: 1;
}
.pw-toggle:hover { color: var(--gold); }

/* ---------- Admin panel ---------- */
.admin-tabs { display: flex; gap: 10px; margin: 24px 0 8px; flex-wrap: wrap; }
.admin-tabs button {
  background: var(--panel-solid); border: 1px solid var(--line); color: var(--muted);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; font-family: var(--serif); letter-spacing: 0.04em;
}
.admin-tabs button.active { color: var(--gold); border-color: var(--gold); }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.94rem; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.admin-table .uname { font-family: var(--serif); color: var(--ink); }
.admin-table .em { color: var(--cyan); font-size: 0.88rem; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }
.btn-danger { background: rgba(255, 107, 107, 0.14); border: 1px solid rgba(255, 107, 107, 0.45); color: #ffb4b4; }
.btn-danger:hover { background: rgba(255, 107, 107, 0.24); color: #fff; }
.pill { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); }
.pill.admin { color: var(--gold); border-color: var(--gold); }
.pill.pending { color: var(--void-soft); border-color: var(--void); }
.admin-note { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--muted); font-size: 0.9rem; margin-top: 16px; }
.admin-wrap { overflow-x: auto; }
.admin-table td.msg-body { max-width: 380px; }
.admin-table td.msg-body .body-text { max-height: 5.5em; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 70px); max-width: 860px; margin: 0 auto; padding: 16px 22px 0; }
.chat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 1.6rem; margin: 0; }
.chat-head .sub { color: var(--muted); font-size: 0.9rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; gap: 2px; max-width: 80%; }
.chat-msg .meta { font-size: 0.74rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.chat-msg .author { font-family: var(--serif); color: var(--gold-soft); letter-spacing: 0.02em; }
.chat-msg .author.admin { color: var(--gold); }
.chat-msg .author.me { color: var(--void-soft); }
.chat-msg .bubble {
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px;
  padding: 9px 13px; color: var(--ink); line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere;
}
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.mine .bubble { border-radius: 12px 4px 12px 12px; background: rgba(138,123,255,0.12); border-color: rgba(138,123,255,0.3); }
.chat-msg .adminpill { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 1px 6px; }
.chat-del { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 0.72rem; opacity: 0.6; }
.chat-del:hover { opacity: 1; }
.chat-compose { display: flex; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.chat-compose input {
  flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #05050a; color: var(--ink); font-size: 1rem;
}
.chat-compose input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,195,74,0.18); }
.chat-gate { text-align: center; padding: 60px 20px; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 560px; }
textarea.field-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #05050a; color: var(--ink); font-size: 1rem; font-family: var(--sans); resize: vertical; min-height: 140px;
}
textarea.field-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,195,74,0.18); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: space-between; }
.footer-grid .brand .name { font-size: 1.1rem; }

.hidden { display: none !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.cta-center { justify-content: center; margin-top: 24px; }
.tag { display: inline-block; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--void-soft); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }

@media (max-width: 1024px) {
  .nav-links, .nav-auth { display: none; }
  .nav-links.open, .nav-auth.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 18px 22px;
    gap: 16px;
  }
  .nav-toggle { display: block; }
  .factions, .grid.cols-3 { grid-template-columns: 1fr; }
}
