:root {
  --bg: #0d0f14;
  --bg-card: #161a22;
  --border: #2a3140;
  --gold: #c9a227;
  --gold-dim: #8a7020;
  --text: #e8e4dc;
  --text-muted: #8b919e;
  --max: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(13, 15, 20, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-decoration: none;
}

.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--text-muted); font-size: 0.95rem; text-decoration: none; }
.nav a:hover { color: var(--gold); text-decoration: none; }
.nav-master { color: var(--gold-dim) !important; }

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(201, 162, 39, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 640px; }

.hero-tag {
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
}

.btn-outline {
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px;
}

.section h2 {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 12px;
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card h3 {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.card p { color: var(--text-muted); font-size: 0.95rem; }

.section-map { max-width: 1000px; }

.map-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
}

.map-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.step-num {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: var(--gold);
  color: var(--bg);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step h3 { color: var(--text); margin-bottom: 8px; font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.tags li {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer {
  text-align: center;
  padding: 40px 24px 60px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-sm { font-size: 0.85rem; margin-top: 6px; opacity: 0.7; }

.nav-cta { color: var(--gold) !important; font-weight: 600; }

.section-lore { max-width: 720px; }

.lore-root { margin-top: 32px; }

.lore-preface {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.lore-preface h3 { color: var(--gold); margin-bottom: 12px; }

.lore-part { margin-bottom: 40px; }

.lore-part-title {
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.lore-chapter { margin-bottom: 24px; }

.lore-chapter h4 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 10px;
}

.lore-chapter p,
.lore-preface p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.chrono-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.chrono-table th,
.chrono-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.chrono-table th {
  background: var(--bg-card);
  color: var(--gold);
}

.chrono-table td:first-child {
  white-space: nowrap;
  color: var(--gold-dim);
  width: 140px;
}

.section-videos { max-width: 1100px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
}

.video-card figcaption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-page { min-height: 100vh; }

.auth-box {
  max-width: 420px;
  margin: 48px auto 80px;
  padding: 0 24px;
}

.auth-box h1 {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.auth-lead {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.auth-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.optional { opacity: 0.6; font-size: 0.8rem; }

.form-error { color: #e07070; font-size: 0.85rem; margin: 8px 0 12px; }

.btn-block { display: block; width: 100%; text-align: center; border: none; cursor: pointer; }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-master { margin-top: 12px; }

.cabinet-box { max-width: 480px; }

.cabinet-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cabinet-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .nav { gap: 10px; font-size: 0.8rem; }
  .hero { min-height: 60vh; }
  .chrono-table td:first-child { width: auto; }
}
