/* ═══════════════════════════════════════════════════════════
   THA BOOK — STYLESHEET
   Cash Money Records × Early 2000s Internet Aesthetic
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Pirata+One&family=UnifrakturMaguntia&family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700;900&family=Oswald:wght@300;400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ─── VARIABLES ──────────────────────────────────────────── */
:root {
  --gold:        #C9A020;
  --gold-bright: #FFD700;
  --gold-pale:   #F5E07A;
  --gold-dark:   #7A5C0A;
  --gold-deep:   #3A2800;
  --red:         #CC1100;
  --red-bright:  #FF2200;
  --bg:          #060606;
  --bg-sidebar:  #070700;
  --bg-card:     #0c0c04;
  --text:        #F0EAD0;
  --text-dim:    #B8A878;
  --text-muted:  #6A5830;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── BODY + STARFIELD BACKGROUND ───────────────────────── */
body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='500' height='500' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='25' cy='15' r='1.2' fill='%23FFD700' opacity='0.28'/%3E%3Ccircle cx='90' cy='60' r='0.7' fill='%23fff' opacity='0.18'/%3E%3Ccircle cx='155' cy='35' r='1' fill='%23FFD700' opacity='0.18'/%3E%3Ccircle cx='220' cy='80' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='310' cy='25' r='1.2' fill='%23FFD700' opacity='0.22'/%3E%3Ccircle cx='370' cy='70' r='0.7' fill='%23fff' opacity='0.18'/%3E%3Ccircle cx='460' cy='40' r='1' fill='%23FFD700' opacity='0.2'/%3E%3Ccircle cx='45' cy='130' r='0.7' fill='%23FFD700' opacity='0.2'/%3E%3Ccircle cx='130' cy='160' r='1' fill='%23fff' opacity='0.12'/%3E%3Ccircle cx='200' cy='120' r='0.7' fill='%23FFD700' opacity='0.18'/%3E%3Ccircle cx='285' cy='150' r='1' fill='%23fff' opacity='0.12'/%3E%3Ccircle cx='450' cy='130' r='1.2' fill='%23FFD700' opacity='0.2'/%3E%3Ccircle cx='70' cy='220' r='1.2' fill='%23FFD700' opacity='0.22'/%3E%3Ccircle cx='160' cy='195' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='245' cy='240' r='1' fill='%23FFD700' opacity='0.14'/%3E%3Ccircle cx='330' cy='210' r='0.7' fill='%23fff' opacity='0.12'/%3E%3Ccircle cx='420' cy='195' r='1' fill='%23FFD700' opacity='0.18'/%3E%3Ccircle cx='480' cy='255' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='20' cy='300' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='100' cy='280' r='1.2' fill='%23FFD700' opacity='0.2'/%3E%3Ccircle cx='175' cy='320' r='0.7' fill='%23fff' opacity='0.12'/%3E%3Ccircle cx='260' cy='290' r='1' fill='%23FFD700' opacity='0.22'/%3E%3Ccircle cx='345' cy='310' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='415' cy='285' r='1' fill='%23FFD700' opacity='0.14'/%3E%3Ccircle cx='55' cy='375' r='1.2' fill='%23FFD700' opacity='0.2'/%3E%3Ccircle cx='140' cy='395' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='215' cy='360' r='1' fill='%23FFD700' opacity='0.14'/%3E%3Ccircle cx='300' cy='385' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='380' cy='355' r='1' fill='%23FFD700' opacity='0.18'/%3E%3Ccircle cx='465' cy='405' r='0.7' fill='%23fff' opacity='0.12'/%3E%3Ccircle cx='120' cy='455' r='0.7' fill='%23fff' opacity='0.15'/%3E%3Ccircle cx='385' cy='470' r='1' fill='%23FFD700' opacity='0.18'/%3E%3Ccircle cx='490' cy='460' r='1.2' fill='%23FFD700' opacity='0.2'/%3E%3C/svg%3E");
  background-size: 500px 500px;
  color: var(--text);
  font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── TICKER ─────────────────────────────────────────────── */
.ticker-wrap {
  background: linear-gradient(90deg, #5C0000, #AA0800, #CC1100, #AA0800, #5C0000);
  border-bottom: 2px solid var(--gold);
  overflow: hidden;
  padding: 6px 0;
  position: relative;
  z-index: 10;
}
.ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker span {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(255,215,0,0.6);
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── HEADER ─────────────────────────────────────────────── */
header {
  text-align: center;
  padding: 40px 24px 28px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,160,32,0.07) 0%, transparent 70%),
              linear-gradient(180deg, #0e0e00 0%, var(--bg) 100%);
  border-bottom: 2px solid var(--gold-dark);
  position: relative;
}
header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-bright) 50%, var(--gold) 70%, transparent);
}
.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.logo-flames {
  font-size: 30px;
  filter: drop-shadow(0 0 10px #FF4400) drop-shadow(0 0 20px #FF2200);
  animation: flicker 3s ease-in-out infinite alternate;
}
@keyframes flicker {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px #FF4400) drop-shadow(0 0 20px #FF2200); }
  50%       { opacity: 0.82; filter: drop-shadow(0 0 6px #FF3300) drop-shadow(0 0 14px #CC1100); }
}
.site-title {
  font-family: 'Pirata One', cursive;
  font-size: clamp(52px, 11vw, 104px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(
    90deg,
    #4A3600 0%, #8B6914 8%, #C9A020 20%,
    #FFD700 32%, #FFF8A0 42%, #FFE566 50%,
    #FFF8A0 58%, #FFD700 68%, #C9A020 80%,
    #8B6914 92%, #4A3600 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-shimmer 6s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
}
.site-title a {
  text-decoration: none;
  -webkit-text-fill-color: inherit;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
@keyframes gold-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -100% center; }
}
.tagline {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(8px, 1.8vw, 12px);
  font-weight: 700;
  letter-spacing: 0.45em;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201,160,32,0.5);
  margin-bottom: 5px;
}
.subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(8px, 1.6vw, 11px);
  font-weight: 400;
  letter-spacing: 0.55em;
  color: var(--red);
  text-shadow: 0 0 12px rgba(204,17,0,0.7);
  margin-bottom: 22px;
}
header nav {
  display: inline-flex;
  border: 1px solid var(--gold-dark);
  overflow: hidden;
}
header nav a {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-decoration: none;
  padding: 10px 22px;
  border-right: 1px solid var(--gold-dark);
  transition: background 0.2s, color 0.2s;
  display: block;
}
header nav a:last-child { border-right: none; }
header nav a:hover { background: var(--gold); color: var(--bg); }

/* ─── PAGE LAYOUT (two-column portal grid) ───────────────── */
.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  border-left: 2px solid var(--gold-dark);
  border-right: 2px solid var(--gold-dark);
}
.page-grid {
  display: grid;
  grid-template-columns: 182px 1fr;
  align-items: start;
}
.sidebar {
  border-right: 2px solid var(--gold-dark);
  background: var(--bg-sidebar);
  min-height: 500px;
}
.content-area {
  padding: 18px 20px 28px;
  background: rgba(10,10,2,0.6);
  min-height: 500px;
}

/* ─── SIDEBAR BOXES ──────────────────────────────────────── */
.sbox { border-bottom: 1px solid var(--gold-dark); }
.sbox:last-child { border-bottom: none; }

.sbox-head {
  background: linear-gradient(90deg, #1E1000, #3A2400);
  border-bottom: 1px solid var(--gold-dark);
  padding: 5px 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.45em;
  color: var(--gold);
  text-transform: uppercase;
}
.sbox-body { padding: 4px 0; }

.snav-link {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 10px;
  border-bottom: 1px dotted rgba(201,160,32,0.12);
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.05em;
}
.snav-link:last-child { border-bottom: none; }
.snav-link:hover { color: var(--gold-bright); background: rgba(201,160,32,0.04); }
.snav-link.active { color: var(--gold); }

/* ─── CHAPTER LINKS IN SIDEBAR ───────────────────────────── */
.chapter-link {
  display: block;
  text-decoration: none;
  padding: 5px 8px 5px 10px;
  border-bottom: 1px dotted rgba(201,160,32,0.1);
  transition: color 0.15s, background 0.15s;
}
.chapter-link:last-child { border-bottom: none; }
.chapter-link:hover { background: rgba(201,160,32,0.04); }
.chapter-link:hover .clink-title { color: var(--gold); }
.chapter-link.active .clink-title { color: var(--gold-bright); }
.chapter-link.active { background: rgba(201,160,32,0.06); }

.clink-num {
  font-family: 'Cinzel', serif;
  font-size: 7px;
  letter-spacing: 0.3em;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 1px;
}
.clink-title {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.02em;
}

/* ─── VISITOR COUNTER ────────────────────────────────────── */
.counter-wrap {
  text-align: center;
  padding: 8px 8px 10px;
}
.counter-label {
  font-family: 'Courier New', monospace;
  font-size: 7px;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.counter-digits {
  font-family: 'Courier New', monospace;
  font-size: 17px;
  color: #00CC00;
  background: #000;
  border: 1px solid #004A00;
  display: inline-block;
  padding: 2px 7px;
  letter-spacing: 0.25em;
  box-shadow: 0 0 6px rgba(0,180,0,0.25);
}
.counter-updated {
  font-family: 'Courier New', monospace;
  font-size: 7px;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* ─── CONTENT BOXES (portal-style header bars) ───────────── */
.cbox {
  border: 1px solid var(--gold-dark);
  margin-bottom: 18px;
}
.cbox:last-child { margin-bottom: 0; }

.cbox-head {
  background: linear-gradient(90deg, #1E1000, #3A2400);
  border-bottom: 1px solid var(--gold-dark);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cbox-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--gold-bright);
}
.cbox-body {
  padding: 14px;
}

/* ─── WELCOME TEXT ───────────────────────────────────────── */
.welcome-text {
  font-family: 'Crimson Text', serif;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.75;
}
.welcome-text strong { color: var(--gold-pale); }
.welcome-text p + p { margin-top: 10px; }

/* ─── BLINKING / NEW BADGE ───────────────────────────────── */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.new-badge {
  display: inline-block;
  background: var(--red);
  color: #FFD700;
  font-family: 'Courier New', monospace;
  font-size: 8px;
  font-weight: bold;
  padding: 0 3px;
  margin-left: 5px;
  vertical-align: middle;
  animation: blink 1.2s step-start infinite;
}

/* ─── MEMORIES GRID (in content area) ────────────────────── */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  text-decoration: none;
  display: block;
  position: relative;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.memory-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.25s;
}
.memory-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(201,160,32,0.14), 0 4px 16px rgba(0,0,0,0.5);
}
.memory-card:hover::before { opacity: 1; }
.card-inner { padding: 14px; }
.card-category {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--red);
  margin-bottom: 7px;
}
.card-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.3;
  margin-bottom: 9px;
}
.card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(201,160,32,0.12);
  padding-top: 9px;
  gap: 8px;
}
.card-author {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
}
.card-date {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── CHAPTER COVER PAGE ─────────────────────────────────── */
.chapter-cover {
  border-bottom: 1px solid var(--gold-dark);
  padding: 26px 20px 22px;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,160,32,0.05) 0%, transparent 65%);
  text-align: center;
  margin-bottom: 18px;
}
.chapter-num-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.65em;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.chapter-main-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: clamp(30px, 5vw, 50px);
  background: linear-gradient(180deg, #FFD700 0%, #C9A020 55%, #8B6914 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 6px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}
.chapter-tagline {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--red);
  margin-bottom: 12px;
}
.chapter-desc {
  font-family: 'Crimson Text', serif;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── MEMORY ARTICLE PAGE ────────────────────────────────── */
.back-link {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--gold); }
.memory-category {
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: var(--red);
  margin-bottom: 10px;
}
.memory-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.2;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.memory-byline {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(201,160,32,0.18);
}
.memory-byline strong { color: var(--gold); }
.memory-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}
.memory-body p        { margin-bottom: 1.3em; }
.memory-body strong   { color: var(--gold-pale); }
.memory-body em       { color: var(--text-dim); }
.memory-body h2, .memory-body h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  margin: 1.4em 0 0.5em;
}

/* ─── ABOUT PAGE ─────────────────────────────────────────── */
.about-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(201,160,32,0.18);
}
.about-content h2:first-child { margin-top: 0; }
.about-content p {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 1em;
  line-height: 1.75;
}
.about-content ul {
  list-style: none;
  margin-bottom: 1em;
}
.about-content ul li {
  font-size: 14px;
  color: var(--text-dim);
  padding: 5px 0 5px 18px;
  position: relative;
  border-bottom: 1px dotted rgba(201,160,32,0.1);
}
.about-content ul li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
  font-size: 9px;
  top: 8px;
}
.about-content a { color: var(--gold); }
.steps {
  counter-reset: steps;
  list-style: none;
  margin-bottom: 1em;
}
.steps li {
  counter-increment: steps;
  font-size: 14px;
  color: var(--text-dim);
  padding: 9px 0 9px 38px;
  position: relative;
  border-bottom: 1px dotted rgba(201,160,32,0.1);
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0; top: 7px;
  width: 24px; height: 24px;
  background: var(--gold-dark);
  color: var(--bg);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── UNDER CONSTRUCTION ─────────────────────────────────── */
.under-construction {
  text-align: center;
  padding: 24px 14px;
  border: 1px dashed var(--gold-dark);
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  line-height: 1.8;
}
.under-construction a { color: var(--gold); text-decoration: none; }

/* ─── STATE MESSAGES (loading / empty) ───────────────────── */
.state-message {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  padding: 50px 20px;
}
.state-message a { color: var(--gold); text-decoration: none; }

/* ─── HORIZONTAL RULE DIVIDERS ───────────────────────────── */
.divider-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 30%, var(--gold) 50%, var(--gold-dark) 70%, transparent);
}
.flame-divider {
  text-align: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 12px;
  letter-spacing: 0.6em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(201,160,32,0.4);
  padding: 12px 16px;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px 28px;
  border-top: 2px solid var(--gold-dark);
  background: linear-gradient(0deg, #0e0e00 0%, var(--bg) 100%);
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 30%, var(--gold) 50%, var(--gold-dark) 70%, transparent);
}
.footer-logo {
  font-family: 'Pirata One', cursive;
  font-size: 42px;
  background: linear-gradient(180deg, #FFD700 0%, #C9A020 50%, #8B6914 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
  margin-bottom: 10px;
}
.footer-tagline {
  font-family: 'Oswald', sans-serif;
  font-size: 9px;
  letter-spacing: 0.45em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px auto;
}
.footer-badge {
  width: 88px;
  height: 31px;
  border: 1px solid var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 6px;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: var(--gold-dark);
  background: rgba(0,0,0,0.4);
  text-align: center;
  padding: 2px 4px;
  line-height: 1.4;
}
.footer-badge:hover { border-color: var(--gold); color: var(--gold); }
.footer-disclaimer {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 10px;
  letter-spacing: 0.06em;
}
.footer-flames {
  font-size: 16px;
  margin-top: 10px;
  filter: drop-shadow(0 0 6px #FF4400);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 2px solid var(--gold-dark);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: unset;
  }
  .sbox:last-child { border-bottom: none; }
  .content-area { padding: 14px; }
  header nav a { padding: 9px 14px; font-size: 9px; }
  .logo-flames { font-size: 22px; }
}

@media (max-width: 440px) {
  .sidebar { grid-template-columns: 1fr; }
  .memories-grid { grid-template-columns: 1fr; }
  .footer-badges { display: none; }
}

/* ─── ADMIN: BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 9px 20px;
  border: 1px solid;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
  text-decoration: none;
  background: transparent;
  line-height: 1;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-gold  { border-color: var(--gold-dark); color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-red   { border-color: #660000; color: #CC2200; }
.btn-red:hover  { background: #CC2200; color: #fff; border-color: #CC2200; }
.btn-sm    { padding: 5px 11px; font-size: 8px; letter-spacing: 0.2em; }

/* ─── ADMIN: FORMS ───────────────────────────────────────── */
.form-row   { display: grid; gap: 12px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.form-input, .form-select {
  background: #080600;
  border: 1px solid var(--gold-dark);
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201,160,32,0.12);
}
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A5C0A'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-select option { background: #0A0800; color: var(--text); }

/* ─── ADMIN: NOTICES ─────────────────────────────────────── */
.admin-notice {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-left: 3px solid;
  margin-bottom: 14px;
  line-height: 1.5;
}
.admin-notice.success { border-color: #00AA00; color: #00DD00; background: rgba(0,80,0,0.12); }
.admin-notice.error   { border-color: #AA0000; color: #FF4444; background: rgba(80,0,0,0.12); }

/* ─── ADMIN: USER TABLE ──────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--gold);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gold-dark);
  background: linear-gradient(90deg, #1A0E00, #2E1A00);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(201,160,32,0.07);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(201,160,32,0.025); }

/* ─── ADMIN: ROLE BADGES ─────────────────────────────────── */
.role-badge {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.role-badge.r-admin   { color: #FF5555; background: #300000; border-color: #660000; }
.role-badge.r-editor  { color: var(--gold-bright); background: #2A1A00; border-color: var(--gold-dark); }
.role-badge.r-author  { color: #88CC00; background: #182200; border-color: #3A5500; }
.role-badge.r-viewer  { color: #888888; background: #141414; border-color: #2A2A2A; }

/* ─── ADMIN: STATUS INDICATOR ────────────────────────────── */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active  { color: #00CC00; }
.status-dot.active::before  { background: #00CC00; box-shadow: 0 0 5px #00AA00; }
.status-dot.pending { color: var(--gold); }
.status-dot.pending::before { background: var(--gold); animation: blink 1.4s step-start infinite; }

/* ─── ADMIN: ROLE SELECT (inline table) ──────────────────── */
.role-select {
  background: #080600;
  border: 1px solid var(--gold-dark);
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  font-size: 10px;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
}
.role-select:focus { border-color: var(--gold); }
.role-select option { background: #0A0800; }

/* ─── ADMIN: SIDEBAR ROLE DEFINITIONS ────────────────────── */
.role-def {
  padding: 7px 10px;
  border-bottom: 1px dotted rgba(201,160,32,0.1);
}
.role-def:last-child { border-bottom: none; }
.role-def-name {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}
.role-def-desc {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── ADMIN: AUTH GATE (login / denied overlay) ──────────── */
.auth-gate-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px 80px;
}
.auth-gate-box {
  max-width: 380px;
  width: 100%;
  border: 1px solid var(--gold-dark);
  background: var(--bg-card);
  text-align: center;
  padding: 36px 28px 32px;
}
.auth-gate-icon {
  font-size: 32px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 8px rgba(201,160,32,0.3));
}
.auth-gate-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 12px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 12px;
}
.auth-gate-text {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

/* ─── ADMIN: SESSION SBOX ────────────────────────────────── */
.session-info {
  padding: 8px 10px 10px;
}
.session-label {
  font-family: 'Cinzel', serif;
  font-size: 7px;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.session-email {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: var(--gold);
  word-break: break-all;
  line-height: 1.4;
  display: block;
  margin-bottom: 8px;
}

/* ─── ADMIN: SETUP NOTICE ────────────────────────────────── */
.setup-steps {
  counter-reset: setup;
  list-style: none;
  margin: 0;
  padding: 0;
}
.setup-steps li {
  counter-increment: setup;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 0 8px 32px;
  position: relative;
  border-bottom: 1px dotted rgba(201,160,32,0.1);
  line-height: 1.5;
}
.setup-steps li::before {
  content: counter(setup);
  position: absolute;
  left: 0; top: 6px;
  width: 22px; height: 22px;
  background: var(--gold-dark);
  color: var(--bg);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.setup-steps li code {
  font-family: 'Courier New', monospace;
  background: rgba(201,160,32,0.1);
  border: 1px solid rgba(201,160,32,0.2);
  padding: 1px 5px;
  color: var(--gold-pale);
  font-size: 10px;
}
.setup-steps li:last-child { border-bottom: none; }

/* ─── PROFILE PHOTO ──────────────────────────────────────── */
.profile-photo-wrap { text-align: center; margin: 20px 0 28px; }
.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold-dark);
  box-shadow: 0 0 20px rgba(201,160,32,0.18);
}
.memory-photo-wrap { margin: 20px 0 24px; }
.memory-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--gold-dark);
  display: block;
}
