/* ===== DBZ-KingShot Guide — Medieval Realm Theme ===== */

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

:root {
  --bg:           #0c0906;
  --bg-elevated:  #12100c;
  --bg-card:      #1a1510;
  --bg-card-hover:#221c15;
  --surface:      #231c14;
  --border:       #5c4a32;
  --border-light: #8b7355;
  --gold:         #c9a227;
  --gold-light:   #e8c547;
  --gold-dark:    #8b6914;
  --bronze:       #a67c3d;
  --crimson:      #9b2d3a;
  --crimson-light:#c44d5a;
  --parchment:    #e8dcc4;
  --ink:          #1a0f08;
  --accent:       var(--gold);
  --accent2:      var(--gold-light);
  --accent3:      var(--crimson-light);
  --blue:         #4a7c9b;
  --blue-light:   #6a9cbc;
  --text:         #ebe0d0;
  --text-dim:     #a8937a;
  --text-muted:   var(--text-dim);
  --success:      #3d7a4a;
  --warning:      #b8860b;
  --danger:       var(--crimson);
  --nav-h:        68px;
  --radius:       4px;
  --radius-sm:    2px;
  --radius-lg:    6px;
  --shadow:       0 12px 40px rgba(0, 0, 0, 0.55);
  --shadow-gold:  0 4px 24px rgba(201, 162, 39, 0.2);
  --font:         'Lora', Georgia, 'Times New Roman', serif;
  --font-heading: 'Cinzel', Georgia, serif;
  --font-display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --transition:   0.28s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(155, 45, 58, 0.06) 0%, transparent 45%),
    linear-gradient(rgba(92, 74, 50, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 74, 50, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--parchment); }

img { max-width: 100%; display: block; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--parchment);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

/* ---------- Navbar — royal banner ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #1f1812 0%, #14100c 100%);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(201, 162, 39, 0.15);
  padding: 0.65rem 0;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.5rem 1rem;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  gap: 0.65rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.nav-court {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-court:hover,
.nav-court.active {
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.25);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.06em;
  -webkit-text-fill-color: unset;
  background: none;
}

.nav-brand span { font-size: 1.4rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }

.nav-links {
  display: flex;
  gap: 0.1rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.nav-dropdown-menu--single {
  columns: 1;
  min-width: 200px;
}

.nav-links a,
.nav-dropdown-btn {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active,
.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.25);
}

.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-btn .arrow { font-size: 0.65rem; transition: transform 0.2s; }
.nav-dropdown.open .arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #221c15, #1a1510);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-top: 0.5rem;
  z-index: 200;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(201, 162, 39, 0.1);
  columns: 2;
  column-gap: 0.25rem;
}

.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-label {
  display: block;
  padding: 0.55rem 0.65rem 0.15rem;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
  break-inside: avoid;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 0.65rem;
  font-family: var(--font);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  break-inside: avoid;
}

.nav-toggle {
  display: none;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* ---------- Global ticker ---------- */
.site-ticker {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.08));
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.site-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 4rem;
  white-space: nowrap;
  min-width: 100%;
  padding: 0.45rem 0;
  animation: tickerScroll 26s linear infinite;
}

.site-ticker-track span {
  display: inline-block;
  padding-left: 100%;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (max-width: 768px) {
  .site-ticker-track {
    animation-duration: 20s;
  }
}

@media (max-width: 1100px) {
  .nav-links a,
  .nav-dropdown-btn,
  .nav-court {
    padding: 0.45rem 0.6rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-shell {
    display: none;
    width: 100%;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
  }

  .nav-shell.open { display: flex; }

  .nav-links {
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .nav-links a,
  .nav-dropdown-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .nav-court {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
  }

  .nav-dropdown { width: 100%; }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    columns: 1;
    max-height: 50vh;
    margin-top: 0.25rem;
    border: 1px solid var(--border);
    box-shadow: none;
    min-width: unset;
  }
}

/* ---------- Hero — castle gate ---------- */
.hero {
  text-align: center;
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero::before {
  content: '⚜ ⚜ ⚜';
  display: block;
  font-size: 0.85rem;
  letter-spacing: 1.2em;
  color: var(--gold);
  opacity: 0.45;
  margin-bottom: 1.25rem;
}

.hero-banner {
  display: inline-block;
  padding: 2.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  background:
    linear-gradient(145deg, rgba(26, 21, 16, 0.95), rgba(15, 12, 8, 0.98));
  border: 2px solid var(--border);
  box-shadow:
    var(--shadow),
    inset 0 0 60px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(201, 162, 39, 0.12);
  position: relative;
}

.hero-banner::before,
.hero-banner::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gold);
  opacity: 0.5;
}

.hero-banner::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.hero-banner::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.hero h1 { margin-bottom: 1rem; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }

.hero h1 .highlight {
  font-family: var(--font-display);
  color: var(--gold-light);
  background: linear-gradient(180deg, #f0d878, #c9a227 50%, #8b6914);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.75rem;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 1.05rem;
  font-style: italic;
}

.hero-rule {
  width: 120px;
  height: 2px;
  margin: 1.5rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Ornaments ---------- */
.ornament-divider {
  text-align: center;
  padding: 1rem 0;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  opacity: 0.6;
}

.ornament-divider::before {
  content: '—— ⚜ ——';
}

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
  padding: 2rem 0;
}

.card {
  background: linear-gradient(160deg, #221c15 0%, #16120e 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem;
  transition: all var(--transition);
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 162, 39, 0.08);
  pointer-events: none;
  border-radius: 2px;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold), 0 12px 32px rgba(0, 0, 0, 0.45);
}

.card-icon { font-size: 2.25rem; margin-bottom: 0.65rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.card h3 { margin-bottom: 0.45rem; font-size: 1.05rem; }
.card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.1rem; line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(180deg, #e8c547 0%, #a67c3d 45%, #6b4f1a 100%);
  color: var(--ink);
  border-color: var(--gold-light);
  box-shadow: 0 4px 0 #4a3818, inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #4a3818, var(--shadow-gold);
  color: var(--ink);
}

.btn-secondary {
  background: rgba(35, 28, 20, 0.8);
  border-color: var(--border);
  color: var(--parchment);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.08);
}

.btn-danger {
  background: linear-gradient(180deg, #c44d5a, #7a2230);
  border-color: #e07080;
  color: #fff;
}

.btn-danger:hover { filter: brightness(1.1); }

.btn-success {
  background: linear-gradient(180deg, #4a9460, #2d5c3a);
  border-color: #6bb87a;
  color: #fff;
}

/* ---------- Sections ---------- */
.section { padding: 3.25rem 0; }

.section-title { margin-bottom: 2rem; text-align: center; }

.section-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title h2::before,
.section-title h2::after {
  content: '⚜';
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.7;
}

.section-title p {
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ---------- Guide content — parchment scroll ---------- */
.guide-content {
  background: linear-gradient(180deg, #1e1812, #16120e);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin: 2rem 0;
  box-shadow: var(--shadow), inset 0 0 80px rgba(0, 0, 0, 0.25);
  position: relative;
}

.guide-content::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: 12px;
  border: 1px solid rgba(201, 162, 39, 0.1);
  pointer-events: none;
}

.guide-content h2 {
  color: var(--gold-light);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
}

.guide-content h2:first-child { margin-top: 0; }

.guide-content h3 { color: var(--bronze); margin: 1.5rem 0 0.65rem; }

.guide-content ul,
.guide-content ol { padding-left: 1.5rem; margin: 0.75rem 0; }

.guide-content li { margin: 0.4rem 0; color: var(--text-dim); }
.guide-content li strong { color: var(--parchment); }
.guide-content p { margin: 0.75rem 0; color: var(--text-dim); }

.guide-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.85rem 1.25rem;
  margin: 1rem 0;
  background: rgba(201, 162, 39, 0.06);
  font-style: italic;
  color: var(--text);
}

/* Tip boxes */
.tip-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid;
}

.tip-box.tip {
  background: rgba(61, 122, 74, 0.12);
  border-color: rgba(61, 122, 74, 0.35);
}

.tip-box.warning {
  background: rgba(184, 134, 11, 0.1);
  border-color: rgba(184, 134, 11, 0.35);
}

.tip-box.danger {
  background: rgba(155, 45, 58, 0.12);
  border-color: rgba(155, 45, 58, 0.35);
}

.tip-box .icon { font-size: 1.2rem; flex-shrink: 0; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.guide-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  min-width: 480px;
}

.guide-content th {
  background: rgba(201, 162, 39, 0.12);
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
  border-bottom: 2px solid var(--border);
}

.guide-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(92, 74, 50, 0.4);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.guide-content tr:hover td { background: rgba(201, 162, 39, 0.04); }

/* ---------- Page header ---------- */
.page-header {
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.06) 0%, transparent 100%);
}

.page-header::before {
  content: '⚜';
  display: block;
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.4;
  margin-bottom: 0.75rem;
}

.page-header .breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.page-header .breadcrumb a { color: var(--bronze); }
.page-header .breadcrumb a:hover { color: var(--gold-light); }

.page-header h1 { margin-bottom: 0.5rem; }

.page-header p {
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.5rem 0.25rem;
  border: 1px solid;
}

.badge-purple,
.badge-blue { background: rgba(74, 124, 155, 0.15); color: var(--blue-light); border-color: rgba(74, 124, 155, 0.35); }

.badge-gold { background: rgba(201, 162, 39, 0.15); color: var(--gold-light); border-color: rgba(201, 162, 39, 0.4); }

.badge-red { background: rgba(155, 45, 58, 0.15); color: var(--crimson-light); border-color: rgba(155, 45, 58, 0.4); }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.feature {
  text-align: center;
  padding: 2rem 1.35rem;
  background: linear-gradient(160deg, #221c15, #16120e);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.feature .icon { font-size: 2.5rem; margin-bottom: 0.65rem; }

.feature h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.feature p { font-size: 0.875rem; color: var(--text-dim); }

/* ---------- Clan rules ---------- */
.clanrules-intro,
.clan-page-intro {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.75;
}

.clanrules-updated,
.clan-page-updated {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 2px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.3), transparent);
  position: relative;
}

.footer::before {
  content: '⚜';
  display: block;
  margin-bottom: 0.75rem;
  color: var(--gold);
  opacity: 0.35;
}

.footer a { color: var(--gold); }

/* ---------- ACP ---------- */
.acp-layout { display: flex; gap: 1.5rem; padding: 2rem 0; }

.acp-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #221c15, #1a1510);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.acp-sidebar h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

.acp-sidebar a {
  display: block;
  padding: 0.55rem 0.75rem;
  margin: 0.15rem 0;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.acp-sidebar a:hover,
.acp-sidebar a.active {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-light);
  border-color: rgba(201, 162, 39, 0.2);
}

.acp-main { flex: 1; min-width: 0; }

.acp-editor {
  background: linear-gradient(160deg, #221c15, #16120e);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.acp-editor h3 {
  margin-bottom: 1.25rem;
  color: var(--gold-light);
  font-family: var(--font-heading);
}

.page-sort-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.page-sort-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.page-sort-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.page-sort-meta {
  flex: 1;
  min-width: 140px;
}

.page-sort-meta strong {
  display: block;
  font-size: 0.95rem;
}

.page-sort-meta small {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.page-sort-cat select {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.page-sort-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.page-sort-actions form {
  margin: 0;
}

.page-sort-actions .btn {
  padding: 0.35rem 0.55rem;
  min-width: 2rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--bronze);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.form-group textarea { min-height: 200px; resize: vertical; line-height: 1.6; }

.acp-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.35s ease;
  border: 2px solid;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); color: #fff; border-color: #6bb87a; }
.toast.error { background: var(--crimson); color: #fff; border-color: var(--crimson-light); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(160deg, #221c15, #16120e);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.stat .number {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--gold-light);
}

.stat .number.purple,
.stat .number.blue { color: var(--blue-light); }
.stat .number.gold { color: var(--gold-light); }
.stat .number.red { color: var(--crimson-light); }

.stat .label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Auth */
.auth-card {
  background: linear-gradient(160deg, #221c15, #16120e);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin: 2rem 0;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.auth-hint {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.auth-hint code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--gold-light);
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
}

.user-table th {
  background: rgba(201, 162, 39, 0.12);
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  border-bottom: 2px solid var(--border);
}

.user-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(92, 74, 50, 0.35);
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.6s ease forwards; opacity: 0; }
.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.3s; }
.fade-up:nth-child(5) { animation-delay: 0.4s; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--border-light), var(--border));
  border: 2px solid var(--bg);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

::selection {
  background: rgba(201, 162, 39, 0.35);
  color: var(--parchment);
}

/* Planner / teams shared hooks */
.planner-check input { accent-color: var(--gold); }

.gen-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.gen-tab {
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.gen-tab:hover { color: var(--gold-light); background: rgba(201, 162, 39, 0.08); }

.gen-tab.active {
  color: var(--gold-light);
  border-color: var(--border);
  background: rgba(201, 162, 39, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
  .acp-layout { flex-direction: column; }
  .acp-sidebar { width: 100%; position: static; max-height: none; }
  .hero-banner { padding: 1.75rem 1.25rem; }
  .hero::before { letter-spacing: 0.6em; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { padding: 3rem 0 2rem; }
  .section { padding: 2rem 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .guide-content { padding: 1.25rem; }
  .page-header { padding: 2rem 0 1.25rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .btn { padding: 0.6rem 1rem; min-height: 44px; }
  .tip-box { flex-direction: column; }
}

@media (max-width: 360px) {
  .nav-brand { font-size: 0.95rem; }
  h1 { font-size: 1.65rem; }
}
