/* ============================================================
   PRESTIGE — Architectural Light/Dark Theme
   Near-black · Parchment white · Champagne gold
   Sharp edges · Negative space · Zero softness
   ============================================================ */

:root[data-theme="prestige-dark"], :root[data-theme="prestige"] {

  /* Backgrounds — warm dark, not digital black */
  --bg-base:        #0F0E0C;
  --bg-surface:     #151412;
  --bg-card:        #1C1A17;
  --bg-elevated:    #242118;
  --bg-hover:       #2C2920;

  /* Prestige accent — champagne gold, never flashy */
  --accent-a:       #C9A84C;
  --accent-a-light: #DFC27A;
  --accent-a-dim:   #6B540F;
  --accent-b:       #A89070;
  --accent-b-light: #C4AE90;
  --accent-b-dim:   #3D2E1A;
  --accent-gold:    #C9A84C;
  --accent-gold-v:  #DFC27A;
  --accent-danger:  #C0392B;
  --accent-success: #2D6A4F;
  --accent-warning: #B07D2E;

  /* Text — warm whites, never pure */
  --text-primary:   #F0EDE6;
  --text-secondary: #ADA89E;
  --text-muted:     #6E6860;
  --text-faint:     #2E2B26;

  /* Borders — architectural lines, not glow */
  --border:         #2A2720;
  --border-light:   #3A3630;
  --border-glow:    rgba(201,168,76,0.25);

  /* No glow — presence through shadow and line */
  --glow-a:         none;
  --glow-b:         none;
  --glow-danger:    none;

  /* Shadows — depth without haze */
  --shadow-card:    0 1px 0 #2A2720, 0 4px 20px rgba(0,0,0,0.6);
  --shadow-modal:   0 0 0 1px #2A2720, 0 24px 64px rgba(0,0,0,0.8);

  /* Post type surfaces */
  --post-narrative: #1C1A17;
  --post-action:    #181510;
  --post-dialogue:  #15180E;
  --post-system:    #100F0D;
  --post-dm-only:   #1A100C;
  --post-combat:    #1C0C0C;

  /* Typography */
  --font-display:   'Cormorant Garamond', 'Didot', 'Georgia', serif;
  --font-body:      'Inter', 'Helvetica Neue', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  /* SHARP — zero radius everywhere */
  --radius-sm:      0px;
  --radius-md:      0px;
  --radius-lg:      0px;
  --radius-xl:      0px;
  --radius-full:    0px;

  /* Spacing — generous, deliberate */
  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       32px;
  --space-xl:       64px;

  /* Dividers — hard lines only */
  --divider:        1px solid #2A2720;
  --divider-accent: 1px solid #C9A84C;
  --divider-heavy:  2px solid #3A3630;

  --sidebar-width:  220px;
  --transition:     0.14s ease;
}

:root[data-theme="prestige-light"] {

  /* Backgrounds — parchment, not clinical white */
  --bg-base:        #F5F2EB;
  --bg-surface:     #EDEAE1;
  --bg-card:        #E6E2D8;
  --bg-elevated:    #DEDAD0;
  --bg-hover:       #D4D0C6;

  /* Same gold — reads differently on light */
  --accent-a:       #9A7A28;
  --accent-a-light: #C9A84C;
  --accent-a-dim:   #E8DFC8;
  --accent-b:       #6B5A3E;
  --accent-b-light: #8A7A5A;
  --accent-b-dim:   #DDD8CC;
  --accent-gold:    #9A7A28;
  --accent-gold-v:  #C9A84C;
  --accent-danger:  #9B2226;
  --accent-success: #1A4731;
  --accent-warning: #7D5A0A;

  /* Text — warm dark, not pure black */
  --text-primary:   #111210;
  --text-secondary: #4A4640;
  --text-muted:     #8A8680;
  --text-faint:     #C8C4BC;

  /* Borders */
  --border:         #C8C4BC;
  --border-light:   #D8D4CC;
  --border-glow:    rgba(154,122,40,0.2);

  --glow-a:         none;
  --glow-b:         none;
  --glow-danger:    none;

  --shadow-card:    0 1px 0 #C8C4BC, 0 2px 12px rgba(0,0,0,0.08);
  --shadow-modal:   0 0 0 1px #C8C4BC, 0 16px 48px rgba(0,0,0,0.15);

  --post-narrative: #E6E2D8;
  --post-action:    #E0DDD4;
  --post-dialogue:  #E4E8DC;
  --post-system:    #EDEAE1;
  --post-dm-only:   #EDE4DC;
  --post-combat:    #EDE0DC;

  --font-display:   'Cormorant Garamond', 'Didot', 'Georgia', serif;
  --font-body:      'Inter', 'Helvetica Neue', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --radius-sm:      0px;
  --radius-md:      0px;
  --radius-lg:      0px;
  --radius-xl:      0px;
  --radius-full:    0px;

  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       32px;
  --space-xl:       64px;

  --divider:        1px solid #C8C4BC;
  --divider-accent: 1px solid #9A7A28;
  --divider-heavy:  2px solid #ADA99E;

  --sidebar-width:  220px;
  --transition:     0.14s ease;
}

/* ============================================================
   PRESTIGE COMPONENT OVERRIDES
   Apply these on top of existing component styles
   ============================================================ */

/* Hard-edge buttons — no radius, strong weight */
[data-theme^="prestige"] .btn {
  border-radius: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

[data-theme^="prestige"] .btn-primary {
  background: var(--accent-a);
  color: var(--bg-base);
  border-color: var(--accent-a);
}

[data-theme^="prestige"] .btn-primary:hover {
  background: var(--accent-a-light);
  border-color: var(--accent-a-light);
}

[data-theme^="prestige"] .btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

[data-theme^="prestige"] .btn-ghost:hover {
  border-color: var(--accent-a);
  color: var(--accent-a);
  background: transparent;
}

/* Cards — no radius, left-accent rule instead of shadow halo */
[data-theme^="prestige"] .card {
  border-radius: 0;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-a);
  box-shadow: none;
  padding: var(--space-lg);
}

/* Inputs — clean line, no rounding */
[data-theme^="prestige"] input,
[data-theme^="prestige"] textarea,
[data-theme^="prestige"] select {
  border-radius: 0;
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border-light);
  background: var(--bg-surface);
}

[data-theme^="prestige"] input:focus,
[data-theme^="prestige"] textarea:focus,
[data-theme^="prestige"] select:focus {
  border-bottom-color: var(--accent-a);
  outline: none;
  box-shadow: none;
}

/* Modals — hard frame, no border-radius */
[data-theme^="prestige"] .modal-content {
  border-radius: 0;
  border: 1px solid var(--border-light);
  border-top: 2px solid var(--accent-a);
}

/* Section dividers — use line language not spacing alone */
[data-theme^="prestige"] .section-divider {
  border: none;
  border-top: var(--divider-accent);
  margin: var(--space-lg) 0;
}

/* Badges — rectangular chips */
[data-theme^="prestige"] .badge {
  border-radius: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid currentColor;
  background: transparent;
}

/* Nav items — left border active indicator */
[data-theme^="prestige"] .nav-item.active {
  border-left: 2px solid var(--accent-a);
  background: var(--bg-card);
  color: var(--accent-a);
}

/* Sidebar logo glyph — no glow filter */
[data-theme^="prestige"] .logo-glyph {
  filter: none;
  color: var(--accent-a);
}

/* Tables — ruled lines, no cell backgrounds */
[data-theme^="prestige"] table {
  border-collapse: collapse;
}

[data-theme^="prestige"] th {
  border-bottom: var(--divider-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-a);
  padding-bottom: var(--space-sm);
}

[data-theme^="prestige"] td {
  border-bottom: var(--divider);
  padding: var(--space-sm) 0;
}

/* Scrollbars — thin, architectural */
[data-theme^="prestige"] ::-webkit-scrollbar { width: 3px; }
[data-theme^="prestige"] ::-webkit-scrollbar-track { background: transparent; }
[data-theme^="prestige"] ::-webkit-scrollbar-thumb { background: var(--border-light); }
[data-theme^="prestige"] ::-webkit-scrollbar-thumb:hover { background: var(--accent-a); }
