:root {
  --bg: #0c0908;
  --bg-2: #120c0a;
  --panel: #18110e;
  --panel-2: #1f1612;
  --line: rgba(244, 232, 212, 0.1);
  --cream: #f4e8d4;
  --mute: #a39282;
  --dim: #6e6258;
  --ember: #e45a1a;
  --ember-2: #ff7a33;
  --gold: #d4a24a;
  --ok: #8adf6a;
  --red: #d45a4a;
  --display: "Cinzel", "Palatino Linotype", serif;
  --ui: "Outfit", system-ui, sans-serif;
  --top: 58px;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ember-2); }
h1, h2, h3 {
  font-family: var(--display);
  margin: 0 0 0.35em;
  letter-spacing: 0.02em;
  line-height: 1.15;
  font-weight: 700;
}
p { margin: 0 0 0.8em; }
button, input, textarea, select { font: inherit; color: inherit; }
.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 8px; background: var(--ember); color: #fff; padding: 8px 12px; z-index: 80; }

.wrap { width: min(1180px, calc(100% - 28px)); margin-inline: auto; }

/* ── topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(8, 5, 4, 0.82) 0%, rgba(8, 5, 4, 0.28) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  height: var(--top);
}
.topbar.is-scrolled,
body.no-slider .topbar {
  background: rgba(12, 9, 8, 0.94);
  border-bottom-color: var(--line);
}
.topbar-inner {
  width: min(1280px, calc(100% - 24px));
  margin-inline: auto;
  height: 100%;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--cream); font-family: var(--display); font-weight: 700; letter-spacing: .08em;
}
.brand:hover { color: var(--gold); }
.brand-mark { color: var(--ember); display: grid; place-items: center; }
.top-search { flex: 1; max-width: 360px; }
.top-search input {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; outline: none;
}
.top-search input:focus { border-color: var(--ember); }
.top-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-nav a {
  color: var(--mute); padding: 6px 10px; border-radius: 10px; font-weight: 500; font-size: 14.5px;
  position: relative; display: inline-flex; align-items: center; gap: 6px;
}
.top-nav a:hover, .top-nav a.is-on { color: var(--cream); background: rgba(228, 90, 26, .12); }
.top-nav i {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--ember); color: #fff; font-style: normal; font-size: 10px;
  display: grid; place-items: center;
}
.top-nav .me { padding-right: 12px; }
.top-nav .ghost { color: var(--dim); }
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-weight: 600;
  background: var(--panel); color: var(--cream); border: 1px solid var(--line);
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn-ember { background: linear-gradient(180deg, var(--ember-2), var(--ember)); color: #1a0c08; border: 0; }
.btn-ember:hover { filter: brightness(1.08); color: #1a0c08; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ── slider ── */
.slider {
  position: relative;
  height: min(70vh, 720px);
  margin-top: calc(var(--top) * -1);
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--line);
}
.slider.is-compact { height: min(56vh, 560px); }
.slider-viewport { height: 100%; position: relative; }
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transition: opacity .8s ease;
  pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 42%;
}
.slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,5,4,.45) 0%, transparent 28%),
    linear-gradient(180deg, transparent 52%, rgba(8,5,4,.78) 100%),
    linear-gradient(90deg, rgba(8,5,4,.28) 0%, transparent 38%);
  pointer-events: none;
}
.slide figcaption {
  position: absolute; z-index: 2; left: max(24px, calc(50% - 590px));
  bottom: 28px; max-width: 420px; color: var(--cream);
  text-shadow: 0 2px 18px rgba(0,0,0,.65);
}
.slider.is-compact figcaption { bottom: 18px; max-width: 380px; }
.eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 6px; font-weight: 600;
}
.slide h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin: 0 0 8px; }
.slider.is-compact h1 { font-size: clamp(1.15rem, 2.2vw, 1.7rem); }
.slide figcaption p:last-child { color: var(--cream); opacity: .92; margin: 0; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(244,232,212,.25); background: rgba(12,9,8,.45);
  color: var(--cream); font-size: 22px; cursor: pointer;
}
.slider-btn:hover { background: var(--ember); border-color: var(--ember); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 8px;
}
.slider-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(244,232,212,.35); cursor: pointer;
}
.slider-dots button.is-on { background: var(--ember); width: 22px; border-radius: 8px; }

.flash-wrap { width: min(1180px, calc(100% - 28px)); margin: 14px auto 0; }
.flash { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.flash-ok { background: rgba(138,223,106,.12); color: var(--ok); }
.flash-error { background: rgba(212,90,74,.14); color: #ff8a8a; }

/* ── layout ── */
.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 48px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.side, .rail, .feed { min-width: 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.side-card .who {
  display: flex; gap: 10px; align-items: center; margin-bottom: 12px; color: var(--cream);
}
.side-card .who b { display: block; }
.side-card .who small { color: var(--mute); }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  color: var(--mute); padding: 8px 10px; border-radius: 10px; font-weight: 500;
}
.side-nav a:hover, .side-nav a.is-on { background: rgba(228,90,26,.12); color: var(--cream); }

.composer textarea {
  width: 100%; min-height: 84px; resize: vertical;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; outline: none;
}
.composer textarea:focus, .composer input:focus { border-color: var(--ember); }
.composer-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.composer input[type=file] { font-size: 13px; color: var(--mute); }

.post {
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.post-head { padding: 14px 16px 0; }
.post-who { display: flex; gap: 10px; align-items: center; color: var(--cream); }
.post-who small { display: block; color: var(--mute); font-weight: 400; }
.post-body { padding: 10px 16px 8px; white-space: pre-wrap; }
.post-photo img { width: 100%; max-height: 520px; object-fit: cover; }
.post-meta {
  display: flex; gap: 14px; padding: 8px 16px; color: var(--mute); font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.post-actions { display: flex; gap: 4px; padding: 6px 8px; }
.act {
  flex: 1; background: transparent; border: 0; color: var(--mute);
  padding: 8px; border-radius: 10px; cursor: pointer; font-weight: 600; text-align: center;
}
.act:hover { background: var(--panel-2); color: var(--cream); }
.act.like.is-on { color: var(--ember); }
.comments { padding: 8px 16px 0; display: grid; gap: 10px; }
.comment { display: flex; gap: 8px; font-size: 14.5px; }
.comment p { margin: 2px 0; }
.comment small { color: var(--dim); font-size: 12px; }
.comment-form {
  display: flex; gap: 8px; padding: 10px 16px 14px;
}
.comment-form input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px; outline: none;
}
.comment-form button {
  background: var(--ember); color: #1a0c08; border: 0; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
}

.avatar {
  border-radius: 50%; object-fit: cover; flex: none;
  display: inline-grid; place-items: center;
  font-weight: 700; color: #fff;
}
.avatar-letter { font-family: var(--display); letter-spacing: .04em; }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 40px; height: 40px; font-size: 13px; }
.avatar-md { width: 56px; height: 56px; font-size: 18px; }
.avatar-lg { width: 96px; height: 96px; font-size: 28px; border: 3px solid var(--bg); }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  display: inline-block; margin-right: 6px;
}

.rail-list { display: grid; gap: 10px; }
.rail-row { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.rail-row small { display: block; color: var(--mute); }
.muted { color: var(--mute); }
.dim { color: var(--dim); }

/* ── profile ── */
.profile-cover {
  height: 220px; border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden; position: relative;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.profile-main { padding: 0 18px 18px; }
.profile-id { display: flex; gap: 14px; align-items: end; margin-top: -48px; position: relative; }
.profile-id h1 { margin: 0; font-size: 1.6rem; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }

/* ── friends / lists ── */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.person {
  display: flex; gap: 10px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px;
  color: var(--cream);
}
.person .grow { flex: 1; min-width: 0; }
.person small { display: block; color: var(--mute); }

/* ── messages ── */
.msg-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; min-height: 480px; }
.msg-list a {
  display: flex; gap: 10px; padding: 10px; border-radius: 12px; color: var(--cream);
}
.msg-list a.is-on, .msg-list a:hover { background: var(--panel-2); }
.thread { display: flex; flex-direction: column; min-height: 480px; }
.bubbles { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 8px 0; }
.bubble {
  max-width: 78%; padding: 10px 12px; border-radius: 14px;
  background: var(--panel-2); align-self: flex-start;
}
.bubble.mine { background: rgba(228,90,26,.22); align-self: flex-end; }
.bubble small { display: block; color: var(--dim); font-size: 11px; margin-top: 4px; }
.thread form { display: flex; gap: 8px; margin-top: 10px; }
.thread form textarea {
  flex: 1; min-height: 48px; resize: vertical;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}

/* ── auth ── */
.auth-wrap { width: min(440px, calc(100% - 28px)); margin: 28px auto 64px; }
.auth-card h1 { font-size: 1.8rem; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); font-weight: 600; }
.form input, .form textarea, .form select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; outline: none; color: var(--cream);
}
.form input:focus, .form textarea:focus { border-color: var(--ember); }
.hp { position: absolute; left: -9999px; }

.legal { width: min(760px, calc(100% - 28px)); margin: 28px auto 64px; }
.legal .card { padding: 28px; white-space: pre-wrap; }

.landing {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 22px;
  align-items: start;
}
.landing-cta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.gallery-band {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 8px;
}
.gallery-head { margin-bottom: 12px; }
.gallery-head h2 { font-size: 1.45rem; margin: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
  color: var(--cream);
  min-height: 0;
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 42%;
  transition: transform .45s ease;
}
.gallery-item:hover { color: var(--gold); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gal-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px 14px 12px;
  background: linear-gradient(transparent, rgba(8,5,4,.86));
  font-family: var(--display);
  font-size: 0.98rem;
  letter-spacing: .02em;
  pointer-events: none;
}
.gal-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(12,9,8,.72); color: var(--gold);
  border: 1px solid rgba(212,162,74,.35);
}
.gallery-item.is-embed,
.gallery-item.is-video {
  aspect-ratio: 9 / 16;
  min-height: 320px;
}
.gallery-item.is-facebook { aspect-ratio: 4 / 5; }
.gallery-item.is-embed iframe,
.gallery-item.is-video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; background: #000;
  object-fit: cover;
  aspect-ratio: auto;
}

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8,5,4,.9);
  display: grid; place-items: center;
  padding: 28px 20px 40px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1120px, 94vw);
  max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.lightbox .lb-cap {
  position: absolute; left: 0; right: 0; bottom: 12px;
  text-align: center; color: var(--cream);
  text-shadow: 0 2px 12px #000;
  padding: 0 20px;
}
.lightbox .lb-cap b { display: block; font-family: var(--display); }
.lightbox .lb-cap span { color: var(--mute); font-size: 14px; }
.lightbox .lb-x {
  position: absolute; top: 14px; right: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(244,232,212,.25); background: rgba(12,9,8,.55);
  color: var(--cream); font-size: 22px; cursor: pointer;
}
.lightbox .lb-x:hover { background: var(--ember); border-color: var(--ember); }

.site-foot {
  border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--dim); font-size: 13.5px;
}
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: min(1180px, calc(100% - 28px)); margin-inline: auto; }
.site-foot a { color: var(--mute); }
.foot-credit {
  width: min(1180px, calc(100% - 28px));
  margin: 10px auto 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--dim);
}
.foot-credit a { color: var(--gold); }
.foot-credit a:hover { color: var(--ember-2); }

.page-head { margin-bottom: 12px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .rail { order: 3; }
  .people { grid-template-columns: 1fr; }
  .msg-layout { grid-template-columns: 1fr; }
  .slider { height: min(58vh, 460px); }
  .slider.is-compact { height: min(46vh, 380px); }
  .slide img { object-position: center 38%; }
  .slide figcaption { left: 16px; right: 16px; max-width: none; }
  .top-search { display: none; }
  .top-nav a span { display: none; }
  .top-nav .ghost { display: none; }
  .landing { grid-template-columns: 1fr; }
}
