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

:root {
  --gold:    #c9933a;
  --gold-lt: #e0b05a;
  --gold-dk: #9a6e22;
  --blue:    #6ea8d4;
  --bg:      #000000;
  --bg2:     #0a0a0a;
  --card:    rgba(13, 13, 13, 0.85);
  --border:  rgba(201, 147, 58, 0.22);
  --border2: rgba(255,255,255,0.07);
  --text:    #d4d8e2;
  --muted:   #6a7385;
  --online:  #2ed573;
  --error:   #e05555;
  --success: #2ed573;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* In-game RO cursor — applied site-wide for that "you're already in Midgard" feel.
   Hotspot at (0,0) with native fallback so the OS one keeps working on inputs/links. */
html, body {
  cursor: url('/images/cursor.png') 0 0, default;
}
a, button, [role="button"], .cc-rotate, .preg-cta, .counter-cta,
.char-card--ghost, .char-card--reserved, .systems-arrow, .nav-burger,
input[type="submit"], select {
  cursor: url('/images/cursor.png') 0 0, pointer;
}
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="search"], textarea {
  cursor: text;
}

/* ── NAV ── */
/* Grid layout: three columns of equal side-widths (minmax(0,1fr)) flank
   an auto-sized middle column. This forces .nav-links to sit at the true
   horizontal centre of the viewport, matching .status-bar-inner below
   (which is also centred via margin auto + justify-content: center).
   Mobile (≤980px) reverts to flex — see media query for burger layout. */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 40px; height: 64px;
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
}
.site-nav > .nav-logo  { justify-self: start; }
.site-nav > .nav-links { justify-self: center; }
.site-nav > .nav-right { justify-self: end; }

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img {
  height: 42px; width: auto; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  transition: filter 0.2s, opacity 0.2s;
}
.nav-logo:hover .nav-logo-img { filter: drop-shadow(0 2px 4px rgba(245,216,133,0.35)); }
/* Header-only: keep the favicon discreet in the navbar. The footer reuses
   `.nav-logo-img` (alongside `.footer-logo-img`) so the opacity is scoped
   to `.site-nav` to avoid bleeding into the footer logo. */
.site-nav .nav-logo-img { opacity: 0.2; }
.site-nav .nav-logo:hover .nav-logo-img { opacity: 0.6; }
.footer-logo-img { height: 48px; }
.nav-logo-text, .app-logo-text {
  font-family: 'Cinzel', 'Trajan Pro', 'Inter', serif;
  font-size: 28px; font-weight: 900;
  letter-spacing: 0.04em; line-height: 1;
  text-transform: uppercase;
  display: inline-flex; align-items: baseline;
}
/* Gold "O" — same vibe as the hero logo's metallic gold letter */
.lg-o {
  background: linear-gradient(180deg, #f5d885 0%, #e0a93e 45%, #b67e1f 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
/* Subtle dash separator */
.lg-dash {
  color: rgba(245,216,133,0.55);
  font-weight: 500;
  margin: 0 2px;
  -webkit-text-fill-color: initial;
}
/* Silver "Ro" */
.lg-ro {
  background: linear-gradient(180deg, #ececec 0%, #b4b4b4 50%, #7a7a7a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px; transition: all 0.18s; letter-spacing: 0.02em;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-selector {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border2);
  border-radius: 6px; padding: 3px;
}
.lang-selector a {
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px; letter-spacing: 0.06em; transition: all 0.15s;
}
.lang-selector a.active { background: rgba(201,147,58,0.2); color: var(--gold); }
.lang-selector a:hover:not(.active) { color: var(--text); }

.btn-nav-login {
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 7px; transition: all 0.18s;
  border: 1px solid var(--border2);
}
.btn-nav-login:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

.btn-nav-user {
  display: flex; align-items: center; gap: 6px; text-decoration: none;
  color: var(--text); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 7px; border: 1px solid var(--border2);
  transition: all 0.18s;
}
.btn-nav-user:hover { color: #fff; border-color: var(--border); }

.btn-nav-logout {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 7px; text-decoration: none;
  color: var(--muted); border: 1px solid var(--border2); transition: all 0.18s;
}
.btn-nav-logout:hover { color: var(--error); border-color: rgba(224,85,85,0.3); }

.btn-register {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: #000; font-weight: 700; font-size: 13px;
  padding: 8px 20px; border-radius: 7px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; letter-spacing: 0.04em;
  transition: all 0.18s; text-decoration: none; display: inline-block;
}
.btn-register:hover {
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,147,58,0.35);
}

/* ── BUTTONS ── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: #000; font-weight: 700; font-size: 14px;
  padding: 13px 28px; border-radius: 8px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; letter-spacing: 0.03em;
  transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,147,58,0.38);
}
.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: rgba(255,255,255,0.05); color: #fff; font-weight: 600; font-size: 14px;
  padding: 13px 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer; font-family: 'Inter', sans-serif; letter-spacing: 0.03em;
  transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* ── ALERTS ── */
.alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  border: 1px solid; margin-bottom: 20px;
}
.alert-error   { background: rgba(224,85,85,0.1); border-color: rgba(224,85,85,0.3); color: #f08080; }
.alert-success { background: rgba(46,213,115,0.1); border-color: rgba(46,213,115,0.3); color: var(--success); }

/* ── DOTS ── */
.dot-online {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--online); box-shadow: 0 0 8px var(--online); margin-right: 6px;
  animation: pulse 2s infinite; vertical-align: middle;
}
.badge-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--online); box-shadow: 0 0 8px var(--online); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ── SECTION SHARED ── */
.container { max-width: 1300px; margin: 0 auto; padding: 0 32px; }
/* ── Unified typographic system ───────────────────────────────
   Use these on every section header for visual consistency.
   ─────────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(245,216,133,0.78);
  margin: 0 0 14px;
}
.section-title {
  font-family: 'Cinzel', 'Playfair Display', 'Inter', serif;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin: 0 0 14px;
  background: linear-gradient(180deg, #fff 0%, #f5d885 38%, #d4a04f 70%, #ad7d27 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(201,147,58,0.22));
}
.section-desc {
  font-size: 15px;
  color: rgba(241,243,246,0.65);
  line-height: 1.65;
  max-width: 560px;
  margin: 0;
}

/* ── CARDS ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border2); border-radius: 12px;
  padding: 28px; transition: all 0.2s; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.card:hover { border-color: var(--border); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 42px; height: 42px; background: rgba(201,147,58,0.1);
  border: 1px solid rgba(201,147,58,0.2); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.card-stat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(241,243,246,0.55);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.card-text { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.card-anti {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.card-anti-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  font-size: 10px; font-weight: 900;
  color: rgba(224,85,85,0.85);
  flex-shrink: 0;
}

/* ── TABLE ── */
.table-wrap { background: var(--card); border: 1px solid var(--border2); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 13px 20px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  border-bottom: 1px solid var(--border2); background: rgba(255,255,255,0.02);
}
tbody td { padding: 13px 20px; font-size: 13.5px; color: var(--text); border-bottom: 1px solid rgba(255,255,255,0.04); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }
.rank-num { font-weight: 700; color: var(--muted); font-size: 13px; }
.rank-num.gold   { color: #ffd700; }
.rank-num.silver { color: #c0c0c0; }
.rank-num.bronze { color: #cd7f32; }
.player-name { font-weight: 600; color: #fff; }
.job-name    { color: var(--blue); font-size: 12.5px; }
.level-badge {
  display: inline-block; padding: 2px 10px;
  background: rgba(201,147,58,0.1); border: 1px solid rgba(201,147,58,0.2);
  border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--gold);
}
.sprite-cell { width: 64px; padding: 4px 8px !important; text-align: center; vertical-align: middle; }
.char-sprite  { display: inline-block; image-rendering: pixelated; height: 64px; width: auto; }

/* ── DIVIDER ── */
.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
  max-width: 1300px; margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER — premium, decorated, 5-column grid
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 32px 28px;
}

/* Decorative ornaments (top + bottom) */
.footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto 36px;
  opacity: 0.55;
}
.footer-ornament:last-of-type { margin: 36px auto 24px; }
.footer-ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,216,133,0.40), transparent);
  max-width: 480px;
}
.footer-ornament-marks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-lt);
}
.footer-ornament-diamond {
  font-size: 8px;
  color: rgba(245,216,133,0.55);
}
.footer-ornament-diamond--mid {
  font-size: 12px;
  color: var(--gold-lt);
}

/* Grid */
.footer-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.9fr 1.3fr;
  gap: 40px;
  align-items: start;
}

/* Brand column */
.footer-brand-desc {
  font-size: 13px;
  color: rgba(241,243,246,0.55);
  line-height: 1.7;
  margin: 4px 0 22px;
  max-width: 280px;
}
.footer-social-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(245,216,133,0.70);
  margin: 0 0 12px;
}
.footer-social ul {
  list-style: none;
  display: flex;
  gap: 10px;
}
.footer-social ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(241,243,246,0.78);
  transition: all 0.18s;
}
.footer-social ul li a:hover {
  color: var(--gold-lt);
  border-color: rgba(245,216,133,0.40);
  background: rgba(201,147,58,0.10);
  transform: translateY(-2px);
}
.footer-social ul li a svg {
  width: 16px; height: 16px;
}

/* Link columns */
.footer-col h4 {
  position: relative;
  font-family: 'Cinzel', 'Playfair Display', 'Inter', serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: var(--gold-lt);
  margin: 0 0 18px;
  padding-bottom: 12px;
}
.footer-col-rule {
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 1px;
  background: linear-gradient(90deg, rgba(245,216,133,0.55), transparent);
}
.footer-col-rule::after {
  content: '◆';
  position: absolute;
  left: 28px; top: -5px;
  font-size: 7px;
  color: rgba(245,216,133,0.55);
}
.footer-col ul { list-style: none; }
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: rgba(241,243,246,0.72);
  font-size: 13px;
  transition: color 0.15s, transform 0.15s;
}
.footer-col ul li a svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: var(--gold-lt);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.footer-col ul li a:hover {
  color: #fff;
  transform: translateX(2px);
}
.footer-col ul li a:hover svg { opacity: 1; }

/* Support panel (right column) */
.footer-support {
  position: relative;
  padding: 24px 22px;
  border: 1px solid rgba(245,216,133,0.30);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,147,58,0.10), transparent 60%),
    rgba(15,19,26,0.85);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-support-emblem {
  color: var(--gold-lt);
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 12px rgba(201,147,58,0.30));
}
.footer-support-emblem svg {
  width: 56px; height: 56px;
}
.footer-support-title {
  margin: 0;
  font-family: 'Cinzel', 'Playfair Display', 'Inter', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-lt);
}
.footer-support-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(241,243,246,0.62);
}
.footer-support-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 22px;
  border: 1px solid rgba(245,216,133,0.55);
  border-radius: 8px;
  background: transparent;
  color: var(--gold-lt);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.18s;
}
.footer-support-cta:hover {
  background: rgba(201,147,58,0.10);
  border-color: var(--gold-lt);
  color: #fff;
}
.footer-support-cta svg { transition: transform 0.18s; }
.footer-support-cta:hover svg { transform: translateX(2px); }

/* Bottom bar */
.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.footer-copyright {
  font-size: 11.5px;
  color: rgba(241,243,246,0.40);
  margin: 0;
}
.footer-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: 'Cinzel', 'Playfair Display', 'Inter', serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(245,216,133,0.65);
  white-space: nowrap;
}
.footer-tagline-mark {
  display: inline-flex;
  align-items: center;
  color: rgba(245,216,133,0.55);
}
.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}
.footer-links a {
  font-size: 11.5px;
  color: rgba(241,243,246,0.45);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--gold-lt); }

/* Responsive */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-support { grid-column: 1 / -1; max-width: 480px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .site-footer { padding: 40px 20px 24px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-support { grid-column: 1 / -1; }
  .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
  }
  .footer-tagline { justify-content: center; }
  .footer-links { justify-content: center; }
  .footer-ornament-line { max-width: 100px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── FORM SHARED ── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: 0.04em; }
.form-group input {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border2);
  border-radius: 8px; padding: 11px 14px; color: #fff; font-size: 14px;
  font-family: 'Inter', sans-serif; transition: border-color 0.18s; outline: none;
}
.form-group input:focus { border-color: var(--gold); background: rgba(255,255,255,0.07); }
.form-group input::placeholder { color: var(--muted); }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: -3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.muted { color: var(--muted); }

/* ─── Sticky table of contents (shared across pages) ─── */
.info-toc {
  position: sticky; top: 64px; z-index: 30;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border2);
}
.info-toc .container {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding-top: 14px; padding-bottom: 14px;
}
.info-toc a {
  text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.info-toc a:hover { color: var(--gold); }

/* ─── Nav dropdowns ─── */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; color: var(--text);
  font-size: 13.5px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  letter-spacing: 0.02em;
  transition: color 0.18s, background 0.18s;
}
.nav-dropdown-trigger:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-dropdown.has-active > .nav-dropdown-trigger { color: var(--gold); }

.nav-caret {
  transition: transform 0.2s ease;
  opacity: 0.65;
  flex-shrink: 0;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown.open .nav-caret { transform: rotate(180deg); opacity: 1; }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 190px;
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 6px;
  list-style: none;
  margin: 0;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,147,58,0.04);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 110;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown.open > .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
/* Hover bridge so cursor can travel from trigger to menu without closing */
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-dropdown-menu a.active {
  color: var(--gold);
  background: rgba(201,147,58,0.10);
}
.nav-dropdown-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  color: var(--muted);
  opacity: 0.85;
  flex-shrink: 0;
  transition: color 0.15s, opacity 0.15s, transform 0.18s ease;
}
.nav-dropdown-icon svg { width: 16px; height: 16px; display: block; }
.nav-dropdown-menu a:hover .nav-dropdown-icon {
  color: #fff;
  opacity: 1;
  transform: scale(1.08);
}
.nav-dropdown-menu a.active .nav-dropdown-icon {
  color: var(--gold);
  opacity: 1;
}
.nav-dropdown-label { display: inline-block; }

/* ─── Mobile burger ─── */
.nav-burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px;
  padding: 0; border-radius: 7px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background 0.15s;
}
.nav-burger:hover { background: rgba(255,255,255,0.06); }
.nav-burger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Responsive ─── */
@media (max-width: 980px) {
  /* Revert to flex on mobile so the burger order trick (logo / right / burger)
     keeps working — grid columns + order don't compose the same way. */
  .site-nav {
    display: flex; justify-content: space-between;
    padding: 0 18px;
  }
  .site-nav > .nav-logo,
  .site-nav > .nav-links,
  .site-nav > .nav-right { justify-self: auto; }
  .nav-burger { display: inline-flex; order: 3; }
  .nav-right { order: 2; gap: 8px; }
  .lang-selector { display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 2px; padding: 10px 14px 16px;
    background: rgba(0,0,0,0.97);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border2);
    max-height: calc(100vh - 64px); overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a,
  .nav-dropdown-trigger {
    display: flex; width: 100%; padding: 12px 14px;
    font-size: 14px;
    justify-content: space-between; align-items: center;
  }
  /* On mobile: dropdowns expand inline, no absolute positioning */
  .nav-dropdown-menu {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none;
    background: rgba(255,255,255,0.025);
    border: none; border-left: 2px solid var(--border2);
    border-radius: 0; margin: 0 0 4px 12px;
    padding: 4px 0 4px 6px;
    max-height: 0; overflow: hidden;
    transition: max-height 0.22s ease, padding 0.22s ease;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown.open > .nav-dropdown-menu {
    max-height: 400px;
    padding: 4px 0 4px 6px;
  }
  /* Disable hover-open on mobile (touch); rely on click */
  .nav-dropdown:hover > .nav-dropdown-menu {
    max-height: 0; padding: 0;
  }
  .nav-dropdown.open:hover > .nav-dropdown-menu {
    max-height: 400px; padding: 4px 0 4px 6px;
  }
}

@media (max-width: 520px) {
  /* Tighter horizontal padding on phones — every pixel of content space counts */
  .container { padding: 0 16px; }
  /* Bump nav CTA touch targets to ~40px for thumb-friendly tapping */
  .btn-nav-login, .btn-nav-user {
    padding: 9px 12px; font-size: 12px;
    min-height: 38px; display: inline-flex; align-items: center;
  }
  .btn-register {
    padding: 10px 14px; font-size: 12px;
    min-height: 38px; display: inline-flex; align-items: center;
  }
  .btn-nav-user span, .btn-nav-user { gap: 4px; }
  .nav-logo-text { font-size: 22px; }
  .nav-logo-img { height: 32px; }
  .footer-logo-img { height: 38px; }
}
