/* =============================================================
   kalachakra.world — Master Stylesheet
   =============================================================
   Contents:
     1. Reset & Base
     2. Utility
     3. Navigation
     4. Hero
     5. Scroll Indicator
     6. Sections
     7. Lore / Terminal
     8. Card Grid
     9. Bounty / CTF
    10. Leaderboard
    11. Merch
    12. CTA
    13. Footer
    14. Buttons
    15. Auth Forms
    16. Alerts / Toasts
    17. Entity Browser (Lore Grid)
    18. Entity Detail
    19. Search Page
    20. Filter Pills
    21. Profile Page
    22. Legal Pages
    23. Utility Classes
    24. Responsive
    25. Fan Content
   ============================================================= */


/* ===== 1. RESET & BASE ===== */

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

:root {
  --amber: #d4952a;
  --amber-bright: #e8a838;
  --amber-dim: rgba(212, 149, 42, 0.35);
  --amber-glow: rgba(212, 149, 42, 0.12);
  --amber-subtle: rgba(212, 149, 42, 0.06);

  --surface-0: #08090c;
  --surface-1: #0d0f14;
  --surface-2: #12151c;
  --surface-3: #181c25;
  --surface-4: #1e2330;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(212, 149, 42, 0.25);
  --border-active: rgba(212, 149, 42, 0.45);

  --text: rgba(235, 235, 240, 0.92);
  --text-secondary: rgba(235, 235, 240, 0.55);
  --text-tertiary: rgba(235, 235, 240, 0.3);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--surface-0);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Honeycomb texture overlay — full site */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0L56 16.5v33L28 66 0 49.5v-33z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='0.75'/%3E%3Cpath d='M28 33L56 49.5v33L28 99 0 82.5v-33z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='0.75'/%3E%3C/svg%3E");
  background-size: 42px 73px;
  opacity: 0.8;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  mask-size: 100% 100vh;
  -webkit-mask-size: 100% 100vh;
  mask-repeat: repeat;
  -webkit-mask-repeat: repeat;
}


/* ===== 2. UTILITY ===== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}


/* ===== 3. NAVIGATION ===== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-brand-mark {
  width: 24px;
  height: 24px;
  color: var(--amber);
}

.nav-brand-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.nav-brand-ip {
  color: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-policy-link {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  transition: color var(--transition);
}

.nav-policy-link:hover {
  color: var(--text-secondary);
}

.nav-cta {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border: 1px solid var(--amber-dim);
  border-radius: 4px;
  color: var(--amber-bright) !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--amber-subtle);
  border-color: var(--amber);
}

.nav-cta::after {
  display: none !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--amber);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--amber);
}


/* ===== 4. HERO ===== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--amber-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-title strong {
  font-weight: 600;
  color: var(--amber-bright);
}

.hero-subtitle {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

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


/* ===== 5. SCROLL INDICATOR ===== */

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--text-tertiary), transparent);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}


/* ===== 6. SECTIONS ===== */

section {
  padding: 120px 0;
  position: relative;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}


/* ===== 7. LORE / TERMINAL ===== */

.lore-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 64px;
}

.lore-terminal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-4);
}

.terminal-dot.active {
  background: var(--amber);
}

.terminal-title {
  margin-left: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--amber);
}

.terminal-body .cmd {
  color: var(--text);
}

.terminal-body .output {
  color: var(--text-secondary);
}

.terminal-body .highlight {
  color: var(--amber-bright);
}

.terminal-body .muted {
  color: var(--text-tertiary);
}

.terminal-line {
  margin-bottom: 4px;
}

.terminal-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}


/* ===== 8. CARD GRID ===== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.card {
  padding: 32px 28px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

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

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--amber);
  background: var(--surface-2);
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ===== 9. BOUNTY / CTF ===== */

.bounty-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 64px;
}

.bounty-board {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bounty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.bounty-header-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.bounty-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
}

.bounty-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.bounty-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.bounty-item:last-child {
  border-bottom: none;
}

.bounty-item:hover {
  background: var(--amber-subtle);
}

.bounty-name {
  font-size: 13px;
  font-weight: 400;
}

.bounty-difficulty {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 500;
}

.bounty-difficulty.easy {
  color: #5cb85c;
  background: rgba(92, 184, 92, 0.1);
  border: 1px solid rgba(92, 184, 92, 0.2);
}

.bounty-difficulty.medium {
  color: var(--amber-bright);
  background: var(--amber-subtle);
  border: 1px solid var(--amber-dim);
}

.bounty-difficulty.hard {
  color: #d9534f;
  background: rgba(217, 83, 79, 0.1);
  border: 1px solid rgba(217, 83, 79, 0.2);
}

.bounty-reward {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.bounty-difficulty.bonus {
  color: #5bc0de;
  background: rgba(91, 192, 222, 0.1);
  border: 1px solid rgba(91, 192, 222, 0.2);
}

.bounty-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
}

.bounty-solved {
  opacity: 0.55;
}

.bounty-check {
  color: #5cb85c;
  font-weight: 600;
}

.bounty-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-top: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}

.bounty-progress-pts {
  font-family: var(--font-mono);
  color: var(--amber);
  font-weight: 500;
}

/* Flag submission */
.flag-submit-section {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.flag-submit-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.flag-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flag-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.flag-input:focus {
  border-color: var(--border-active);
}

.flag-input option {
  background: var(--surface-2);
  color: var(--text);
}

#flag-result {
  margin-top: 12px;
}

/* Promotion hero adaptation */
.hero--promo {
  border-bottom: 1px solid var(--amber-dim);
}

.hero-eyebrow--promo {
  color: var(--amber);
  animation: blink 2s ease-in-out infinite;
}

/* Nav promo link glow */
.nav-promo {
  color: var(--amber) !important;
  font-weight: 500;
}

.link-amber {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber-dim);
}

.link-amber:hover {
  text-decoration-color: var(--amber);
}


/* ===== CTF PROMOTION BANNER ===== */

.ctf-banner {
  padding-top: 56px; /* clear fixed nav */
  background: linear-gradient(135deg, rgba(212, 149, 42, 0.08), rgba(212, 149, 42, 0.03));
  border-bottom: 1px solid var(--amber-dim);
}

.ctf-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
}

.ctf-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--amber);
  margin-bottom: 10px;
}

.ctf-banner-signal {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

.ctf-banner-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ctf-banner-dismiss:hover {
  color: var(--text-primary);
}

.ctf-banner-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ctf-banner-body p {
  margin: 0 0 12px;
}

.ctf-banner-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctf-banner-step {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ctf-banner-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ctf-banner-step a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: var(--amber-dim);
}

.ctf-banner-step a:hover {
  text-decoration-color: var(--amber);
}

.ctf-banner-step code {
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.82em;
  color: var(--amber-bright);
}

@media (max-width: 600px) {
  .ctf-banner-inner { padding: 12px 16px; }
  .ctf-banner-body { font-size: 0.82rem; }
}

/* ===== 10. LEADERBOARD ===== */

.leaderboard {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.leaderboard-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
}

.leaderboard-rank.top {
  color: var(--amber);
  font-weight: 600;
}

.leaderboard-handle a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.leaderboard-handle a:hover {
  color: var(--amber);
}

.leaderboard-handle {
  font-family: var(--font-mono);
  font-size: 13px;
}

.leaderboard-score {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}


/* ===== 11. MERCH ===== */

.merch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.merch-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.merch-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.merch-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.merch-info {
  padding: 16px;
}

.merch-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.merch-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}

.merch-sold-out {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 4px;
}


/* ===== 12. CTA ===== */

.cta-section {
  text-align: center;
  padding: 160px 0;
}

.cta-section .section-title {
  margin-bottom: 12px;
}

.cta-section .section-desc {
  max-width: 440px;
  margin: 0 auto 40px;
}


/* ===== 13. FOOTER ===== */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-tertiary);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text-secondary);
}


/* ===== 14. BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--amber);
  color: var(--surface-0);
}

.btn-primary:hover {
  background: var(--amber-bright);
  box-shadow: 0 0 30px var(--amber-dim);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  color: #d9534f;
  border: 1px solid rgba(217, 83, 79, 0.3);
}

.btn-danger:hover {
  background: rgba(217, 83, 79, 0.1);
  border-color: rgba(217, 83, 79, 0.5);
}

.btn-small {
  padding: 6px 16px;
  font-size: 11px;
}


/* ===== 15. AUTH FORMS ===== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 32px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
}

.auth-title {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--amber-dim);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-error {
  font-size: 12px;
  color: #d9534f;
  margin-top: 6px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.form-legal {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin: 16px 0 8px;
}

.form-legal a {
  color: var(--text-secondary);
  text-decoration: underline;
  transition: color var(--transition);
}

.form-legal a:hover {
  color: var(--amber);
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--amber);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--amber-bright);
}


/* ===== 16. ALERTS / TOASTS ===== */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid;
}

.alert-success {
  color: #5cb85c;
  background: rgba(92, 184, 92, 0.08);
  border-color: rgba(92, 184, 92, 0.2);
}

.alert-error {
  color: #d9534f;
  background: rgba(217, 83, 79, 0.08);
  border-color: rgba(217, 83, 79, 0.2);
}

.alert-info {
  color: var(--amber);
  background: var(--amber-subtle);
  border-color: var(--amber-dim);
}


/* ===== 16b. DISTRICT MAP ===== */

.nexus-hub-map {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-0);
}

.nexus-hub-map-img {
  width: 100%;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.nexus-hub-map:hover .nexus-hub-map-img {
  opacity: 0.7;
}

.nexus-hub-map svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* District polygon regions */
.district-region {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.district-region:hover {
  fill: rgba(212, 149, 42, 0.08);
  stroke: rgba(212, 149, 42, 0.5);
  filter: drop-shadow(0 0 8px rgba(212, 149, 42, 0.25));
}

.district-region.active {
  fill: rgba(212, 149, 42, 0.12);
  stroke: rgba(212, 149, 42, 0.7);
  filter: drop-shadow(0 0 12px rgba(212, 149, 42, 0.35));
}

/* District label (shown on hover) */
.district-label {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.district-region:hover + .district-label,
.district-region.active + .district-label {
  opacity: 1;
}

.district-label-bg {
  fill: rgba(8, 9, 12, 0.85);
  rx: 4;
  ry: 4;
}

.district-label-name {
  fill: var(--amber-bright);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font);
}

.district-label-count {
  fill: rgba(235, 235, 240, 0.55);
  font-size: 10px;
  font-family: var(--font-mono);
}

/* Location pins */
.location-pin {
  cursor: pointer;
  transition: all 0.25s ease;
}

.location-pin circle {
  fill: var(--amber);
  opacity: 0.7;
  transition: all 0.25s ease;
}

.location-pin:hover circle {
  opacity: 1;
  r: 5;
  filter: drop-shadow(0 0 6px rgba(212, 149, 42, 0.6));
}

.location-pin-label {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.location-pin:hover + .location-pin-label {
  opacity: 1;
}

.location-pin-label-bg {
  fill: rgba(8, 9, 12, 0.9);
  rx: 3;
  ry: 3;
}

.location-pin-label-text {
  fill: rgba(235, 235, 240, 0.85);
  font-size: 9px;
  font-family: var(--font);
}

/* Map legend / active filter indicator */
.map-filter-indicator {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  min-height: 20px;
}

.map-filter-indicator span {
  color: var(--amber);
}

.map-filter-indicator button {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 11px;
  margin-left: 8px;
  text-decoration: underline;
  transition: color var(--transition);
}

.map-filter-indicator button:hover {
  color: var(--amber);
}


/* ===== 17. ENTITY BROWSER (LORE GRID) ===== */

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

.entity-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.entity-card:visited {
  color: inherit;
}

.entity-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.entity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.entity-card:hover::before {
  opacity: 1;
}

.entity-card-image {
  width: 100%;
  height: 120px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.entity-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Real card images — taller container, no pseudo-elements */
.entity-card-image.has-image {
  height: 180px;
}

.entity-card-image.has-image::before,
.entity-card-image.has-image::after {
  display: none;
}

/* ── Generative Entity Imagery (CSS-only, per type) ── */

.entity-card-image[data-type]::before,
.entity-card-image[data-type]::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

/* CHARACTER — intersecting circles, warm amber/rose */
.entity-card-image[data-type="character"] {
  background:
    radial-gradient(circle at 30% 50%, rgba(212, 149, 42, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(180, 80, 60, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 30%, rgba(212, 149, 42, 0.1) 0%, transparent 60%),
    var(--surface-2);
}
.entity-card-image[data-type="character"]::before {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(212, 149, 42, 0.2);
  border-radius: 50%;
  top: 50%;
  left: 35%;
  transform: translate(-50%, -50%);
}
.entity-card-image[data-type="character"]::after {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(212, 149, 42, 0.15);
  border-radius: 50%;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
}

/* ORGANIZATION — structured grid lines, cool steel */
.entity-card-image[data-type="organization"] {
  background:
    repeating-linear-gradient(90deg, rgba(140, 160, 200, 0.06) 0px, rgba(140, 160, 200, 0.06) 1px, transparent 1px, transparent 30px),
    repeating-linear-gradient(0deg, rgba(140, 160, 200, 0.06) 0px, rgba(140, 160, 200, 0.06) 1px, transparent 1px, transparent 30px),
    linear-gradient(135deg, rgba(80, 100, 140, 0.12) 0%, transparent 60%),
    var(--surface-2);
}
.entity-card-image[data-type="organization"]::before {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(140, 160, 200, 0.18);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.entity-card-image[data-type="organization"]::after {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(140, 160, 200, 0.12);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* TECHNOLOGY — circuit traces, green/cyan */
.entity-card-image[data-type="technology"] {
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 14px, rgba(40, 180, 140, 0.06) 14px, rgba(40, 180, 140, 0.06) 15px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 19px, rgba(40, 180, 140, 0.04) 19px, rgba(40, 180, 140, 0.04) 20px),
    linear-gradient(160deg, rgba(40, 180, 140, 0.08) 0%, transparent 50%),
    var(--surface-2);
}
.entity-card-image[data-type="technology"]::before {
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(40, 180, 140, 0.25) 20%, rgba(40, 180, 140, 0.25) 50%, transparent 70%);
  top: 40%;
  left: 15%;
}
.entity-card-image[data-type="technology"]::after {
  width: 1px;
  height: 50%;
  background: linear-gradient(180deg, transparent 0%, rgba(40, 180, 140, 0.2) 30%, rgba(40, 180, 140, 0.2) 70%, transparent 100%);
  top: 25%;
  left: 55%;
}

/* LOCATION — atmospheric gradient, architectural feel */
.entity-card-image[data-type="location"] {
  background:
    linear-gradient(180deg, rgba(100, 80, 140, 0.1) 0%, transparent 40%),
    linear-gradient(0deg, rgba(60, 50, 80, 0.2) 0%, transparent 30%),
    radial-gradient(ellipse at 50% 100%, rgba(100, 80, 140, 0.08) 0%, transparent 70%),
    var(--surface-2);
}
.entity-card-image[data-type="location"]::before {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(100, 80, 140, 0.15) 30%, rgba(100, 80, 140, 0.15) 70%, transparent 90%);
  bottom: 35%;
  left: 0;
}
.entity-card-image[data-type="location"]::after {
  width: 30%;
  height: 35%;
  border-left: 1px solid rgba(100, 80, 140, 0.1);
  border-right: 1px solid rgba(100, 80, 140, 0.1);
  border-top: 1px solid rgba(100, 80, 140, 0.1);
  bottom: 35%;
  left: 35%;
}

/* HISTORICAL — sepia/gold archival tone */
.entity-card-image[data-type="historical"] {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(212, 149, 42, 0.06) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent 0px, transparent 7px, rgba(212, 149, 42, 0.03) 7px, rgba(212, 149, 42, 0.03) 8px),
    linear-gradient(180deg, rgba(180, 140, 60, 0.06) 0%, rgba(120, 90, 40, 0.04) 100%),
    var(--surface-2);
}
.entity-card-image[data-type="historical"]::before {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(212, 149, 42, 0.1);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.entity-card-image[data-type="historical"]::after {
  width: 70%;
  height: 1px;
  background: rgba(212, 149, 42, 0.08);
  top: 50%;
  left: 15%;
}

.entity-card-body {
  padding: 16px;
}

.entity-card-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}

.entity-card-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--amber-bright);
}

.entity-card-district {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.entity-card-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ===== 18. ENTITY DETAIL ===== */

.entity-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}

.entity-detail-back {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-block;
}

.entity-detail-back:hover {
  color: var(--amber);
}

.entity-detail-hero {
  max-width: 480px;
  height: 420px;
  margin: 0 auto 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.entity-detail-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}

.entity-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.entity-detail-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.entity-detail-name {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 300;
  margin-bottom: 8px;
}

.entity-detail-district {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.entity-detail-summary {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.entity-detail-content {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.entity-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.entity-relationships {
  list-style: none;
  margin-bottom: 32px;
}

.entity-relationships li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.entity-relationships li:last-child {
  border-bottom: none;
}

.entity-rel-type {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: 8px;
}


/* ===== 19. SEARCH PAGE ===== */

.search-page {
  padding: 100px 32px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.search-input:focus {
  border-color: var(--amber-dim);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}


/* ===== 20. FILTER PILLS ===== */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-pill.active {
  background: var(--amber-subtle);
  border-color: var(--amber-dim);
  color: var(--amber);
}


/* ===== 21. PROFILE PAGE ===== */

.profile-page {
  padding: 100px 32px 80px;
  max-width: 640px;
  margin: 0 auto;
}

.profile-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.profile-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-field-value {
  font-size: 13px;
  font-family: var(--font-mono);
}


/* ===== 21b. AVATARS ===== */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  flex-shrink: 0;
  user-select: none;
}

/* Profile page — large avatar */
.avatar-profile {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.avatar-profile .avatar,
.avatar-profile .avatar-fallback {
  width: 96px;
  height: 96px;
  font-size: 36px;
}

.avatar-profile-info {
  flex: 1;
  min-width: 0;
}

.avatar-profile-name {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.avatar-profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Avatar upload widget */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0 8px;
}

.avatar-upload .avatar,
.avatar-upload .avatar-fallback {
  width: 80px;
  height: 80px;
  font-size: 30px;
}

.avatar-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-upload-actions .btn {
  text-align: left;
}

.avatar-url-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.avatar-url-input .form-input {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
}

/* Nav bar — small avatar */
.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid var(--border);
}

.nav-avatar-fallback {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  vertical-align: middle;
  margin-right: 6px;
}


/* ===== 21c. HACKER CARDS (Public Profiles) ===== */

.hacker-page {
  padding: 100px 32px 80px;
  max-width: 700px;
  margin: 0 auto;
}

.hacker-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hacker-card-accent {
  height: 4px;
  background: var(--amber);
}

.hacker-card-content {
  padding: 40px;
}

.hacker-card-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}

.hacker-avatar-wrapper .avatar,
.hacker-avatar-wrapper .avatar-fallback {
  width: 120px;
  height: 120px;
  font-size: 48px;
}

.hacker-card-info {
  flex: 1;
  min-width: 0;
}

.hacker-handle {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hacker-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hacker-tier-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tier-color);
  background: color-mix(in srgb, var(--tier-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier-color) 30%, transparent);
}

.hacker-member-since {
  font-size: 13px;
  color: var(--text-tertiary);
}

.hacker-bio {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding: 20px 0;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
}

.hacker-bio-empty {
  font-style: italic;
  color: var(--text-tertiary);
}

.hacker-sections {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.hacker-section {
  margin-bottom: 24px;
}

.hacker-section:last-child {
  margin-bottom: 0;
}

.hacker-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.hacker-section-empty {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Fan content on hacker card */
.hacker-fan-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hacker-fan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  transition: border-color var(--transition), color var(--transition);
}

.hacker-fan-item:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.hacker-fan-type {
  font-size: 14px;
  flex-shrink: 0;
}

.hacker-fan-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hacker-fan-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hacker-fan-row .hacker-fan-item {
  flex: 1;
  min-width: 0;
}
.hacker-fan-row .btn-danger {
  flex-shrink: 0;
}

/* Wallet display */
.hacker-wallet {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hacker-wallet-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.hacker-wallet-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Achievement badges */
.achievement-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 80px;
  cursor: default;
}

.achievement-badge-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(212, 168, 42, 0.3));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.achievement-badge:hover .achievement-badge-img {
  filter: drop-shadow(0 0 14px rgba(212, 168, 42, 0.5));
  transform: scale(1.08);
}

.achievement-badge-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
}

.hacker-edit-hint {
  text-align: center;
  margin-top: 16px;
}

.hacker-edit-hint a {
  font-size: 13px;
  color: var(--amber);
  text-decoration: none;
}

.hacker-edit-hint a:hover {
  text-decoration: underline;
}

.hacker-share {
  text-align: center;
  margin-top: 16px;
}


/* ===== 22. LEGAL PAGES ===== */

.legal-page {
  padding: 100px 32px 80px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 300;
  margin-bottom: 8px;
}

.legal-page .legal-updated {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 18px;
  font-weight: 500;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 13px;
}

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

.legal-page th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.legal-page td {
  color: var(--text-secondary);
}


/* ===== 23. UTILITY CLASSES ===== */

.hidden { display: none !important; }
.loading { opacity: 0.5; pointer-events: none; }
.text-center { text-align: center; }
.text-amber { color: var(--amber); }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }


/* ===== 24. RESPONSIVE ===== */

@media (max-width: 900px) {
  .lore-layout,
  .bounty-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    height: calc(100vh - 56px);
    padding: 40px 24px;
    gap: 0;
    z-index: 9999;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex !important;
    background: #08090c;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 14px;
    letter-spacing: 2px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
    border: 1px solid var(--amber-dim) !important;
    border-radius: 4px !important;
    padding: 12px 16px !important;
  }

  .nav-policy-link {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .entity-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }

  .profile-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}


/* ── API Key Section ─────────────────────────────── */

.api-key-tier-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid;
  border-radius: 4px;
}

.api-key-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.api-key-tier-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.api-key-display code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber-bright);
  word-break: break-all;
  flex: 1;
}

.api-key-reveal {
  padding: 4px 0;
}


/* ── API Guide Code Blocks ───────────────────────── */

.api-code-block {
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0 16px;
  overflow-x: auto;
}

.api-code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.api-method {
  color: var(--amber);
  font-weight: 600;
}

.legal-page code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 3px;
  color: var(--text);
}

.legal-page h3 {
  font-size: 14px;
  font-weight: 500;
  margin-top: 32px;
  margin-bottom: 8px;
}


/* ── Tier Upgrade Prompt ─────────────────────────── */

.tier-upgrade-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-top: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}

.tier-upgrade-prompt strong {
  color: var(--amber-bright);
}

.tier-upgrade-icon {
  color: var(--amber);
  font-size: 16px;
  flex-shrink: 0;
}

.tier-upgrade-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--amber);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.tier-upgrade-link:hover {
  color: var(--amber-bright);
}

@media (max-width: 600px) {
  .tier-upgrade-prompt {
    flex-wrap: wrap;
  }
  .tier-upgrade-link {
    margin-left: 0;
    margin-top: 8px;
  }
}


/* ── Verification Banner ─────────────────────────── */

.verify-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(212, 149, 42, 0.1);
  border-bottom: 1px solid var(--amber-dim);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.verify-banner-icon {
  color: var(--amber);
  font-size: 1rem;
  flex-shrink: 0;
}

.verify-banner-text {
  flex: 1;
}

.verify-banner-resend {
  background: none;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.verify-banner-resend:hover {
  background: var(--amber-glow);
}

.verify-banner-resend:disabled {
  opacity: 0.6;
  cursor: default;
}

.verify-banner-dismiss {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.verify-banner-dismiss:hover {
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .verify-banner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }

  .verify-banner-resend {
    margin-left: auto;
  }
}

/* ── Merch Catalog ─────────────────────────────────── */

.merch-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.merch-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.merch-card {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.merch-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.merch-card.merch-sold-out {
  opacity: 0.7;
}
.merch-card.merch-sold-out:hover {
  opacity: 0.85;
}

.merch-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-0);
  overflow: hidden;
}
.merch-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.merch-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-0), var(--surface-1));
}

.merch-sold-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(217, 83, 79, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

.merch-card.merch-coming-soon {
  opacity: 0.8;
}
.merch-card.merch-coming-soon:hover {
  opacity: 0.92;
}
.merch-coming-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(198, 160, 42, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

.merch-card-body {
  padding: 14px 16px;
}

.merch-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.merch-card-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.merch-card-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}

/* Product detail modal */

.merch-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.merch-modal.hidden {
  display: none;
}

.merch-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.merch-modal-content {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  max-width: 720px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
}

.merch-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.merch-modal-close:hover {
  color: var(--text-primary);
}

.merch-modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.merch-modal-img {
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-0);
}
.merch-modal-img img {
  width: 100%;
  height: auto;
  display: block;
}

.merch-modal-info h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.merch-modal-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.merch-modal-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 16px;
}

.merch-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* When the description has multiple paragraphs (formatMultilineDesc
   wraps each in its own <p>), space them apart but don't double up
   on the last child's bottom margin. */
.merch-modal-desc p {
  margin: 0 0 0.75em 0;
}

.merch-modal-desc p:last-child {
  margin-bottom: 0;
}

.merch-modal-status {
  margin-top: 16px;
}
.merch-modal-status .merch-sold-badge,
.merch-modal-status .merch-coming-badge {
  position: static;
  display: inline-block;
  font-size: 12px;
  padding: 6px 12px;
}

@media (max-width: 600px) {
  .merch-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .merch-modal-inner {
    grid-template-columns: 1fr;
  }

  .merch-modal-content {
    width: 95%;
    padding: 20px;
  }
}


/* ===== 25. FAN CONTENT ===== */

.fan-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.fan-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.fan-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.fan-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fan-filter-pill {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.fan-filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.fan-filter-pill.active {
  background: var(--amber-subtle);
  border-color: var(--amber-dim);
  color: var(--amber);
}

.fan-search {
  padding: 8px 14px;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  min-width: 200px;
}

.fan-search:focus {
  border-color: var(--amber-dim);
}

.fan-search::placeholder {
  color: var(--text-tertiary);
}

/* Art grid */
.fan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.fan-art-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.fan-art-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  border-top: 2px solid var(--amber-dim);
}

/* Pinned items get a subtle amber outline + corner badge */
.fan-pinned {
  border-color: var(--amber-dim);
}
.fan-pin-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.75);
  color: var(--amber-dim, #d4a76a);
  border: 1px solid var(--amber-dim, #d4a76a);
  padding: 3px 8px;
  border-radius: 12px;
  pointer-events: none;
}

.fan-art-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.fan-art-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.fan-art-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.fan-art-card-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fan-art-card-author {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* Story cards */
.fan-story-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.fan-story-card {
  position: relative;
  display: block;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.fan-story-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  border-left: 2px solid var(--amber-dim);
}

.fan-story-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.fan-story-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fan-story-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.fan-story-card-author {
  color: var(--text-secondary);
}

.fan-story-card-date {
  color: var(--text-tertiary);
}

/* Detail page */
.fan-detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.fan-detail-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color var(--transition);
}

.fan-detail-back:hover {
  color: var(--amber);
}

.fan-detail h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 300;
  margin-bottom: 24px;
}

.fan-detail-image {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-1);
  margin-bottom: 32px;
  display: block;
}

.fan-detail-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  font-style: italic;
}

.fan-detail-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 40px;
}

.fan-author-credit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.fan-author-credit .avatar,
.fan-author-credit .avatar-fallback {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.fan-author-credit a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color var(--transition);
}

.fan-author-credit a:hover {
  color: var(--amber);
}

.fan-author-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.fan-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.fan-action-msg {
  margin-top: 8px;
  font-size: 12px;
  min-height: 1.2em;
}

.fan-share-btn,
.fan-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.fan-share-btn:hover {
  border-color: var(--amber-dim, #d4a76a);
  color: var(--amber-dim, #d4a76a);
}

.fan-report-btn:hover {
  border-color: rgba(217, 83, 79, 0.4);
  color: #d9534f;
}

/* Submit form */
.fan-submit-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.fan-type-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.fan-type-toggle button {
  padding: 10px 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--surface-2);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.fan-type-toggle button:not(:last-child) {
  border-right: 1px solid var(--border);
}

.fan-type-toggle button.active {
  background: var(--amber-subtle);
  color: var(--amber);
}

.fan-type-toggle button:hover:not(.active) {
  color: var(--text);
}

.fan-char-counter {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.fan-char-counter.near-limit {
  color: var(--amber);
}

.fan-char-counter.at-limit {
  color: #d9534f;
}

.fan-file-upload {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
  margin-bottom: 16px;
}

.fan-file-upload:hover {
  border-color: var(--border-hover);
}

.fan-file-upload-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.fan-file-upload-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.fan-image-preview {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 400px;
}

.fan-image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.fan-submit-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* My submissions */
.fan-my-submissions {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.fan-my-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.fan-my-item {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
}

.fan-my-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.fan-my-item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fan-my-item-title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.fan-my-item-title a:hover {
  color: var(--amber);
}

.fan-status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.fan-status-badge.draft {
  background: rgba(160, 160, 160, 0.15);
  color: rgba(200, 200, 200, 0.7);
  border: 1px solid rgba(160, 160, 160, 0.2);
}

.fan-status-badge.pending {
  background: rgba(212, 149, 42, 0.12);
  color: var(--amber);
  border: 1px solid var(--amber-dim);
}

.fan-status-badge.published {
  background: rgba(92, 184, 92, 0.12);
  color: #5cb85c;
  border: 1px solid rgba(92, 184, 92, 0.3);
}

.fan-status-badge.rejected {
  background: rgba(217, 83, 79, 0.12);
  color: #d9534f;
  border: 1px solid rgba(217, 83, 79, 0.3);
}

.fan-my-item-type {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.fan-my-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 8px;
}

.fan-my-item-note {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(217, 83, 79, 0.06);
  border: 1px solid rgba(217, 83, 79, 0.15);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.fan-my-item-note strong {
  color: #d9534f;
}

.fan-my-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Inline edit form in My Submissions */
.fan-edit-inline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.fan-edit-inline .form-group {
  margin-bottom: 12px;
}

.fan-edit-inline textarea {
  min-height: 120px;
  resize: vertical;
}

.fan-edit-inline-actions {
  display: flex;
  gap: 8px;
}

/* Pagination */
.fan-pagination {
  text-align: center;
  padding: 32px 0;
}

/* Empty state */
.fan-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.fan-empty p {
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .fan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fan-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Fan Rights Notice --- */

.fan-rights-notice {
  margin: 2.5rem auto 1rem;
  max-width: 720px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--amber-dim);
  border-radius: 8px;
  background: var(--amber-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
}

.fan-rights-notice a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fan-rights-notice a:hover {
  color: var(--amber-bright);
}

.fan-rights-notice-submit {
  margin: 1.5rem 0 0.5rem;
  text-align: left;
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .fan-grid {
    grid-template-columns: 1fr;
  }

  .fan-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .fan-search {
    min-width: unset;
    width: 100%;
  }

  .fan-submit-actions {
    flex-direction: column;
  }

  .fan-my-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fan-author-credit {
    flex-wrap: wrap;
  }

  .fan-author-date {
    margin-left: 0;
    width: 100%;
  }

  .fan-rights-notice {
    padding: 1rem;
    font-size: 0.8rem;
  }
}
