:root {
  --bg: #070506;
  --card: #141014;
  --gold: #e3c16a;
  --rose: #c98990;
  --rose-hot: #d9a0a8;
  --text: #f6f1ea;
  --muted: #b6a4ac;
  --line: rgba(227,193,106,.16);
  --ok: #8fbf9a;
  --rail: 248px;
  --right: 320px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, .btn { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.gold { color: var(--gold); }
.rose { color: var(--rose-hot); }
.muted { color: var(--muted); }

.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 680px) var(--right);
  justify-content: center;
  min-height: 100vh;
  column-gap: 12px;
  padding: 0 12px;
}
.rail {
  position: sticky; top: 0;
  height: 100vh;
  padding: 16px 8px 24px;
  overflow: auto;
}
.rail-left {
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.rail-right { border-left: 1px solid var(--line); }
.brand-stack { display: flex; align-items: center; gap: 10px; padding: 8px 10px 18px; font-weight: 700; }
.brand-stack img { height: 44px; width: auto; }
.brand-stack .fans { color: var(--rose-hot); }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; color: var(--text);
  padding: 12px 14px; border-radius: 999px; font-size: 17px; font-weight: 650;
}
.nav-link:hover { background: #161014; }
.nav-link.on { color: var(--gold); background: #1a140c; }
.nav-link.create {
  margin-top: 10px; justify-content: center;
  background: var(--gold); color: #1a1208;
}
.nav-link.create:hover { background: #edd28a; color: #1a1208; }
.badge { font-size: 10px; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 1px 6px; margin-left: 6px; }
.rail-foot { margin-top: auto; padding: 16px 10px; color: var(--muted); font-size: 12px; }

.col-center {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7,5,6,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
}
.topbar h1 { font-size: 1.15rem; font-weight: 700; }
.top-tabs { display: flex; gap: 0; margin-left: auto; }
.top-tabs .chip { border-radius: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.top-tabs .chip.on { border-bottom-color: var(--gold); color: var(--gold); }

.wrap { width: 100%; }
.view { display: none; padding: 16px 16px 88px; }
.view.on { display: block; }
.hero { text-align: center; padding: 8px 0 4px; }
.hero-mark { width: min(420px, 92%); margin: 0 auto 8px; }
.kicker { letter-spacing: .22em; text-transform: uppercase; font-size: 11px; color: var(--rose-hot); font-weight: 600; }
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.08; font-weight: 650; }
h1 em { font-family: "Playfair Display", serif; font-style: italic; color: var(--rose-hot); font-weight: 500; }
.lede { max-width: 560px; margin: 12px auto 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
}
.card.creator { background: #18140f; }
.card.fan { background: #1d1218; }
.card h2 { font-size: 1.15rem; margin: 6px 0 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 650;
}
.btn.gold { background: var(--gold); color: #1a1208; }
.btn.rose { background: var(--rose-hot); color: #2a1016; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.full { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #140e12; color: var(--text);
  border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600;
}
.chip.on { border-color: var(--gold); color: var(--gold); }
input, textarea, select {
  width: 100%; background: #120c10; border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.drop { border: 1.5px dashed rgba(227,193,106,.35); border-radius: 16px; padding: 32px 16px; text-align: center; color: var(--muted); }

.stories {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 14px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story {
  flex: 0 0 auto; width: 72px; text-align: center; font-size: 11px; color: var(--muted);
}
.story-ring {
  width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%;
  padding: 2px; background: linear-gradient(135deg, var(--gold), var(--rose-hot));
}
.story-ring span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: #120c10; color: var(--gold); font-weight: 700; font-size: 13px;
}
.composer {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  padding: 12px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}

.feed { display: grid; gap: 0; }
.post {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px;
  padding: 14px 0 16px; border-bottom: 1px solid var(--line);
  background: transparent;
}
.why { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.avatar, .profile-ava {
  border-radius: 50%;
  background: linear-gradient(135deg, #3a2a18, #4a2432);
  display: grid; place-items: center; font-weight: 700; color: var(--gold);
}
.avatar { width: 44px; height: 44px; }
.media-block {
  margin-top: 10px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #2a1c12 0%, #3a1824 55%, #1a1014 100%);
  min-height: 180px;
}
.media-block img, .media-block video, .feed-media {
  width: 100%; max-height: 420px; object-fit: cover; display: block; margin: 0;
}
.media-ph {
  min-height: 180px; display: grid; place-items: center; color: var(--gold);
  font-family: "Playfair Display", serif; font-style: italic; padding: 24px; text-align: center;
}
.actions { display: flex; gap: 6px; margin-top: 10px; }
.actions button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 650;
}
.actions button:hover { background: #161014; color: var(--text); }
.actions button.on { color: var(--rose-hot); }

.suggest { display: grid; gap: 10px; }
.suggest a, .suggest .row-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
}
.rail-card { background: #110d10; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.rail-card h3 { font-size: 15px; margin-bottom: 10px; }
.trend { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
.trend:last-child { border-bottom: 0; }

.profile-head { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; }
.profile-ava { width: 96px; height: 96px; border-radius: 28px; font-size: 2rem; }
.verified { color: var(--ok); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pending { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step { font-size: 12px; color: var(--muted); }
.step.on { color: var(--gold); }
.notice { font-size: 13px; color: var(--muted); margin-top: 10px; }
.media-preview { margin-top: 10px; }
.media-preview img, .media-preview video, .profile-ava-img {
  width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin-top: 8px;
}
.profile-ava-img { width: 96px; height: 96px; border-radius: 28px; margin: 0; }
.cover {
  height: 160px; border-radius: 16px 16px 0 0; margin-bottom: -28px;
  background: linear-gradient(135deg, #2a1c12, #3a1824);
  overflow: hidden;
}
.cover img { width: 100%; height: 160px; object-fit: cover; }
.profile-shell .profile-head { position: relative; }
.file-link { display: inline-block; margin-top: 8px; color: var(--gold); font-size: 13px; font-weight: 600; cursor: pointer; }
.file-link input { display: none; }
.notice.ok { color: var(--ok); }

.disc-card { padding: 0; overflow: hidden; }
.disc-cover {
  height: 110px;
  background: linear-gradient(135deg, #3a2a18, #4a2432);
}
.disc-card .pad { padding: 12px 14px 14px; }

.age-gate {
  display: none;
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8,5,6,.94);
  place-items: center;
  padding: 24px;
}
.age-gate.on { display: grid; }
.pillar-link { display: block; transition: border-color .15s, transform .15s; }
.pillar-link:hover { border-color: var(--gold); transform: translateY(-1px); }
.search { margin: 14px 0 0; }
.feed-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.prompt-box {
  background: #120c10; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; min-height: 180px; white-space: pre-wrap; font-size: 14px; color: var(--text);
}
.toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #2a1c12; color: var(--gold); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 650;
  opacity: 0; pointer-events: none; z-index: 70; transition: .2s ease;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.bell {
  margin-left: 8px; background: #161014; border: 1px solid var(--line);
  color: var(--gold); border-radius: 999px; padding: 6px 10px; font-weight: 700;
}
.alert-panel {
  position: fixed; top: 56px; right: 16px; z-index: 50;
  width: min(360px, calc(100% - 24px));
  background: #141014; border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; max-height: 70vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.alert-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.alert-item { display: block; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.alert-item.unread { color: var(--gold); }

.inbox { display: grid; grid-template-columns: 220px 1fr; min-height: 62vh; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.thread-list { border-right: 1px solid var(--line); background: #110d10; overflow: auto; }
.thread-row { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.thread-row.on { background: #1a140c; }
.thread-row .preview { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-view { display: flex; flex-direction: column; min-height: 62vh; }
.thread-msgs { flex: 1; padding: 16px; display: grid; gap: 8px; align-content: start; }
.bubble { max-width: 80%; padding: 10px 12px; border-radius: 14px; font-size: 14px; }
.bubble.them { background: #1d1218; }
.bubble.you { background: #1a160c; margin-left: auto; }
.thread-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

.tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(7,5,6,.94);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.tabbar a {
  font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 6px;
}
.tabbar a.on { color: var(--gold); }

.site-foot { display: none; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .rail-right, .rail-left .hide-narrow, .brand-stack div { display: none; }
  .nav-link { justify-content: center; font-size: 0; padding: 12px; }
  .nav-link::before { font-size: 18px; }
  .nav-link.create { font-size: 18px; }
}
@media (max-width: 800px) {
  .app { display: block; padding: 0; }
  .rail-left, .rail-right { display: none; }
  .col-center { border: 0; }
  .tabbar { display: flex; }
  .split, .grid3, .profile-head, .studio-grid { grid-template-columns: 1fr; }
  .view { padding-bottom: 96px; }
  .inbox { grid-template-columns: 1fr; }
  .thread-list { max-height: 28vh; }
}
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-top: 14px; }
label.check input { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.empty-state { padding: 18px; text-align: center; }
.danger { color: #e07a7a; }
/* phone tab bar: every tab fits on screen */
.tabbar { gap: 2px; padding-left: 4px; padding-right: 4px; }
.tabbar a { flex: 1 1 0; min-width: 0; padding: 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.tabbar a.nav-link { justify-content: center; }
.badge:empty { display: none; }
.post > div { min-width: 0; }
.media-block, .media-block img, .media-block video { max-width: 100%; }
.actions { flex-wrap: wrap; }
