/* Character profile page styles — Limbus Company palette */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Share+Tech+Mono&display=swap');

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

:root {
  --lc-void: #0d0b0f; --lc-dark: #141018; --lc-surface: #1c1826;
  --lc-surface2: #231e30; --lc-raised: #2e2840; --lc-border: #3a3254;
  --lc-gold: #c9a227; --lc-gold-lt: #e8c458; --lc-gold-dk: #8c6d14;
  --lc-crimson: #b01c2e; --lc-blood: #6e0f1c;
  --lc-text: #e8e0d0; --lc-text-dim: #9e96b0; --lc-text-faint: #5e5875;
  --win-light: #4a4266; --win-dark: #0a0810;
}

body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px);
}

body {
  background-color: var(--lc-void);
  background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png"),
    radial-gradient(ellipse at 20% 50%, rgba(176,28,46,0.07) 0%, transparent 60%);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 13px; color: var(--lc-text);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh;
}

.char-page {
  max-width: 760px; width: 95%; margin: 20px auto 60px;
  background: var(--lc-dark);
  border-top: 2px solid var(--win-light); border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark); border-bottom: 2px solid var(--win-dark);
  box-shadow: 3px 3px 0 var(--win-dark), 0 0 40px rgba(176,28,46,0.12);
}

/* Title bar */
.char-titlebar {
  height: 26px;
  background: linear-gradient(to right, var(--lc-blood), var(--lc-crimson) 50%, var(--lc-gold-dk) 100%);
  display: flex; align-items: center; padding: 0 10px; gap: 8px;
  border-bottom: 1px solid var(--lc-gold-dk);
}
.char-titlebar-text {
  color: var(--lc-gold-lt); font-family: 'IM Fell English', Georgia, serif;
  font-size: 12px; letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.char-titlebar-back {
  margin-left: auto; font-size: 11px; color: var(--lc-gold);
  text-decoration: none; letter-spacing: 0.04em;
  padding: 2px 8px;
  border-top: 1px solid var(--win-light); border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark); border-bottom: 1px solid var(--win-dark);
  background: var(--lc-raised);
  transition: background 150ms;
}
.char-titlebar-back:hover { background: var(--lc-blood); color: var(--lc-gold-lt); }

/* Content layout */
.char-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 480px;
}
@media (max-width: 580px) {
  .char-layout { grid-template-columns: 1fr; }
}

/* Sidebar */
.char-sidebar {
  background: var(--lc-surface2);
  border-right: 1px solid var(--lc-border);
  display: flex; flex-direction: column;
}
.char-portrait {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top;
  display: block; filter: saturate(0.85);
  border-bottom: 2px solid var(--lc-gold-dk);
}
.char-portrait-placeholder {
  width: 100%; aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--lc-surface2), var(--lc-raised));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--lc-text-faint); font-size: 48px;
  border-bottom: 2px solid var(--lc-gold-dk);
}
.char-portrait-caption { font-size: 10px; color: var(--lc-text-faint); font-size: 10px; }
.char-stats { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.char-stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; padding: 3px 0;
  border-bottom: 1px solid var(--lc-border);
}
.char-stat-label { color: var(--lc-gold); letter-spacing: 0.04em; }
.char-stat-value { color: var(--lc-text-dim); text-align: right; max-width: 120px; }

/* Main content */
.char-main { padding: 16px 20px; overflow-y: auto; }
.char-main h1 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 22px; font-weight: normal; color: var(--lc-gold);
  letter-spacing: 0.04em; margin-bottom: 4px;
  padding-bottom: 8px; border-bottom: 1px solid var(--lc-gold-dk);
}
.char-main .char-subtitle {
  font-size: 11px; color: var(--lc-text-faint); margin-bottom: 14px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.char-section-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 13px; color: var(--lc-gold); font-weight: normal;
  margin: 14px 0 6px; padding-bottom: 3px;
  border-bottom: 1px solid var(--lc-border);
  display: flex; align-items: center; gap: 6px;
}
.char-section-title::before { content: '◈'; color: var(--lc-crimson); font-size: 10px; }
.char-main p {
  font-size: 12px; color: var(--lc-text-dim); line-height: 1.75;
  margin-bottom: 10px; max-width: none;
}
.char-main p em { color: var(--lc-gold); font-style: normal; }

/* Gallery strip */
.char-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.char-gallery-img {
  width: 100px; height: 130px; object-fit: cover; object-position: top;
  border: 1px solid var(--lc-border); filter: saturate(0.85);
  transition: filter 150ms;
}
.char-gallery-img:hover { filter: saturate(1); }
.char-gallery-placeholder {
  width: 100px; height: 130px;
  background: var(--lc-raised); border: 1px solid var(--lc-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--lc-text-faint);
}

/* Tags */
.char-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.char-tag {
  font-size: 10px; padding: 2px 8px;
  background: var(--lc-surface2); border: 1px solid var(--lc-border);
  color: var(--lc-text-faint); letter-spacing: 0.04em;
}
.char-tag.gold  { border-color: var(--lc-gold-dk); color: var(--lc-gold); }
.char-tag.red   { border-color: var(--lc-crimson); color: #e88090; }

/* Status bar */
.char-statusbar {
  height: 22px; display: flex; align-items: center; gap: 4px;
  padding: 0 8px; background: var(--lc-surface2); border-top: 1px solid var(--lc-border);
}
.status-pane {
  height: 16px;
  border-top: 1px solid var(--lc-border); border-left: 1px solid var(--lc-border);
  border-right: 1px solid var(--win-dark); border-bottom: 1px solid var(--win-dark);
  padding: 0 8px; font-size: 10px; display: flex; align-items: center;
  color: var(--lc-text-faint);
}
.status-pane.accent { color: var(--lc-gold); }

/* ══════════════════════════════════════════════
   AESTHETIC FLOAT MINI-WINDOWS (character pages)
   These sit outside .char-page on the body
   ══════════════════════════════════════════════ */

.float-win {
  position: fixed;
  display: flex;
  flex-direction: column;
  user-select: none;
  z-index: 200;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 3px 3px 0 var(--win-dark), 0 0 24px rgba(176,28,46,0.14);
  background: var(--lc-dark);
}
.float-titlebar {
  height: 20px;
  background: linear-gradient(to right, var(--lc-blood), var(--lc-crimson) 60%, var(--lc-gold-dk));
  display: flex; align-items: center; padding: 0 4px; gap: 4px;
  cursor: grab; flex-shrink: 0; border-bottom: 1px solid var(--lc-gold-dk);
}
.float-titlebar:active { cursor: grabbing; }
.float-title-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 10px; color: var(--lc-gold-lt); letter-spacing: 0.05em;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
.float-btn-close {
  width: 13px; height: 11px; background: var(--lc-raised);
  border-top: 1px solid var(--win-light); border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark); border-bottom: 1px solid var(--win-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; cursor: pointer; color: var(--lc-gold);
}
.float-btn-close:hover { background: var(--lc-crimson); color: #fff; }
.float-body {
  flex: 1; overflow: hidden; background: var(--lc-void); border-top: 1px solid var(--lc-border);
}
.float-img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.75) brightness(0.85); transition: filter 0.3s;
}
.float-win:hover .float-img { filter: saturate(0.95) brightness(0.95); }
.float-win::after {
  content: '◈'; position: absolute; bottom: 3px; right: 5px;
  font-size: 8px; color: var(--lc-gold-dk); pointer-events: none; opacity: 0.6;
}

/* ── Inline SVG placeholder sizing ───────────────────────── */
.char-portrait-placeholder .placeholder-svg { width: 72px; height: 72px; opacity: 0.6; }
.char-gallery-placeholder  .placeholder-svg { width: 40px; height: 40px; opacity: 0.5; }
