:root {
  --red: #e10600;
  --red-dark: #b00000;
  --black: #0a0a0a;
  --ink: #111111;
  --muted: #8a96a3;
  --line: #ececec;
  --bg: #ffffff;
  --soft: #f4f6f8;
  --danger: #e11d48;
  --shadow: 0 12px 40px rgba(17, 17, 17, 0.12);
  --sidebar: 250px;
  --rail: 320px;
  --gutter: 32px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.thread > a.meta { display: none; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { background: #ffd0d0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }

.wordmark {
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-decoration: none;
  font-size: 26px;
  line-height: 1;
}
.wordmark span { color: var(--red); }
.wordmark em {
  display: inline-block;
  margin-left: 6px;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 0.72em;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  color: #5c6370;
  transform: none;
}
.gate .wordmark, .sidebar .wordmark, .mobile-top .wordmark { color: #fff; }
.sidebar .wordmark em, .mobile-top .wordmark em, .gate .wordmark em { color: #9aa3ad; }
.gate .lede { color: #f2f2f2; }
.gate .fine { color: #c8c8c8; }

#auth, #app { display: none; }
html.show-auth #auth { display: grid; }
html.in-app #app { display: flex; }
html.embed-caldwell.show-auth #auth { display: none; }
html.embed-caldwell #app { min-height: 100vh; }
html.embed-caldwell body { min-height: 100vh; }

.landing {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.75fr);
  background: var(--black);
  overflow: hidden;
}
.landing-photos {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: 1.15fr 0.85fr;
  gap: 12px;
  padding: var(--gutter);
  height: 100%;
  min-height: 0;
}
.shot { position: relative; margin: 0; overflow: hidden; background: #1a1a1a; min-height: 0; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-a { grid-row: 1 / span 2; }
.shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 13px;
}
.shot figcaption b { font-size: 16px; letter-spacing: -0.02em; }
.shot figcaption span { color: #f0f0f0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.landing-panel {
  background: #fff;
  color: var(--ink);
  height: 100%;
  overflow: auto;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing-panel .brand,
.landing-brand {
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  background: transparent;
  color: #111;
  padding: 0 0 20px;
  gap: 12px;
}
.landing-brand .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.landing-brand .wordmark {
  color: #111111;
  font-size: 34px;
  letter-spacing: -0.045em;
  line-height: 1;
}
.landing-brand .wordmark span { color: #e10600; }
.landing-brand .wordmark em {
  color: #5c6370;
  font-size: 0.58em;
  letter-spacing: 0.18em;
  margin-left: 8px;
  top: -1px;
  position: relative;
}
.landing-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.landing-panel .lede { color: #333; font-size: 16px; max-width: 38ch; }

.gate, .auth-card {
  width: min(440px, 100%);
  text-align: center;
}
.age-icon {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.age-icon.small { width: 72px; height: 72px; border-radius: 20px; }
.gate h1, .auth-card h1 { margin: 16px 0 8px; }
.lede { color: #3c4650; font-size: 17px; line-height: 1.45; margin: 0 0 18px; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; }
.age-actions, .stack { display: flex; flex-direction: column; gap: 10px; }
.age-actions { margin: 8px 0 14px; }

.btn {
  border: 0;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  padding: 11px 18px;
  font-weight: 750;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: 0.65; cursor: default; }
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #dedede;
}
.btn.ghost:hover { background: var(--soft); }
.btn.subscribed { background: var(--black); color: #fff; }
.btn.subscribed:hover { background: #000; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #be123c; }
.signup-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}
.signup-row span { font-weight: 700; }
.btn.signup-switch {
  min-width: 168px;
  height: 44px;
  border-radius: 999px;
  color: #fff;
}
.btn.signup-switch.off { background: #e10600; }
.btn.signup-switch.off:hover { background: #b10500; }
.btn.signup-switch.on { background: #15803d; }
.btn.signup-switch.on:hover { background: #166534; }
.btn.block { width: 100%; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.sidebar .btn.block { margin: 0 8px; width: auto; padding: 8px 14px; white-space: nowrap; }
.auth-card .btn { width: 100%; }
.btn.small { padding: 7px 12px; font-size: 13px; }

.auth-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: var(--shadow);
}
.auth-card .wordmark, .auth-card .lede, .auth-card .age-icon { display: block; }
.auth-card .age-icon, .auth-card .wordmark, .auth-card .lede { text-align: center; margin-left: auto; margin-right: auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tab { border: 0; background: transparent; border-radius: 9px; padding: 8px; font-weight: 700; color: #556; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4b5560; margin-bottom: 12px; font-weight: 650; font-weight: 600; }
.field input, .field select, .field textarea, .bare {
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  width: 100%;
}
.field textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 14px; color: #333; }
.check input { margin-top: 3px; }

.app {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  align-items: stretch;
}
.sidebar {
  position: relative;
  z-index: 8;
  height: auto;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 0 var(--gutter);
  background: var(--black);
  color: #fff;
  border-bottom: 1px solid #000;
}
.sidebar-grow { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 10px 8px; flex: 0 0 auto; position: relative; z-index: 2; background: var(--black); }
.wordmark { white-space: nowrap; }
.brand-img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.nav { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 2px; flex: 1; min-width: 0; align-items: center; overflow-x: auto; }
.nav a, .more-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  font-weight: 650;
  font-weight: 600;
  background: transparent;
  border: 0;
  text-align: left;
  width: auto;
}
.nav a svg, .more-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav a:hover, .more-link:hover { background: #1a1a1a; }
.nav a.active { color: var(--red); }
.badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.sidebar-grow { flex: 1; }
.me-menu { position: relative; flex: 0 0 auto; }
.me-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  appearance: none;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.me-chip:hover { background: #1a1a1a; }
.me-chip strong, .me-chip span { display: block; }
.me-chip span { color: var(--muted); font-size: 13px; font-weight: 500; }
.account-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  color: #111;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  z-index: 40;
}
.account-drop button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #111;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 650;
  font-weight: 600;
}
.account-drop button:hover { background: var(--soft); }
.initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}
.brand-mark { width: 40px; height: 40px; display: block; flex: 0 0 auto; overflow: hidden; border-radius: 12px; }
.mobile-brand { padding: 0; }
.icon { width: 26px; height: 26px; }
.mark-lg { width: 88px; height: 88px; margin: 0 auto; }
.stage {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}
.view {
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-width: none;
  width: 100%;
  border-right: 0;
  overflow: auto;
  padding: 8px var(--gutter) 32px;
}
.rail {
  width: var(--rail);
  flex: 0 0 var(--rail);
  padding: 22px var(--gutter) 32px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fafafa;
}
.rail > * { max-width: 100%; }
.featured-row .grow { min-width: 0; }
.featured-row strong, .featured-row .handle { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal { min-height: 100vh; background: #fff; color: #111; }
.legal-doc { width: min(820px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0 72px; }
.legal-doc h1 { letter-spacing: -0.04em; margin-bottom: 8px; }
.legal-doc h2 { margin-top: 32px; font-size: 20px; scroll-margin-top: 18px; }
.legal-doc h3 { margin: 18px 0 6px; font-size: 16px; }
.legal-doc p, .legal-doc li { line-height: 1.55; }
.legal-doc ol, .legal-doc ul { margin: 8px 0 16px; padding-left: 1.35em; }
.legal-doc li { margin: 6px 0; }
.legal-doc a { color: var(--red); font-weight: 700; }
.legal-doc .legal-meta { color: #5c6370; font-size: 14px; }
.legal-doc .toc { columns: 2; column-gap: 28px; font-size: 14px; }
.legal-doc .toc a { font-weight: 600; }
@media (max-width: 700px) { .legal-doc .toc { columns: 1; } }
.fine a { color: var(--red); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 8px; margin: 12px 0 24px; }
.bar { flex: 1; min-width: 0; text-align: center; }
.bar small, .bar b { display: block; font-size: 11px; font-weight: 600; }
.bar b { font-size: 10px; color: #333; }
.bar-track { height: 120px; display: flex; align-items: flex-end; background: #f3f3f3; border-radius: 6px 6px 0 0; overflow: hidden; }
.bar-fill { width: 100%; background: #e10600; }
.sheet { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; }
.sheet th, .sheet td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee; vertical-align: top; }
.sheet th { font-size: 12px; color: #666; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.admin-piece { border: 1px solid #ececec; background: #fff; padding: 12px; }
.admin-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #111;
  cursor: zoom-in;
}
.admin-still, .admin-open video, .admin-piece video { width: 100%; max-height: 360px; object-fit: cover; background: #111; display: block; pointer-events: none; }
.admin-piece-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.admin-piece audio { width: 100%; margin-top: 8px; }
.admin-text { white-space: pre-wrap; background: #f6f6f6; padding: 10px; font-size: 13px; }
.admin-piece h2 { font-size: 16px; margin: 10px 0 4px; }
.note-drop {
  position: fixed;
  top: 62px;
  left: 168px;
  width: 340px;
  max-height: 380px;
  overflow: auto;
  background: #fff;
  color: #111;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  z-index: 40;
}
.note-drop-head { padding: 12px 14px 8px; font-weight: 700; }
.note-drop .note-row { border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .note-drop { left: 12px; right: 12px; width: auto; top: auto; bottom: 74px; }
}
.verify-cam, .verify-preview { width: 100%; max-height: 220px; background: #111; border-radius: 8px; object-fit: cover; margin-bottom: 10px; }
.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 16px 24px; }
.risk-col { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; min-height: 180px; }
@media (max-width: 800px) { .risk-grid { grid-template-columns: 1fr; } }
body[data-view="messages"] .rail,
body[data-view="studio"] .rail,
body[data-view="settings"] .rail { display: none; }
body[data-view="messages"] .view,
body[data-view="studio"] .view,
body[data-view="settings"] .view { max-width: none; }

.mobile-top, .tabbar { display: none; }

.page-pad { padding: 8px 0 40px; width: 100%; }
.feed-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
  padding: 0 18px 8px;
  width: 100%;
}
.feed-board .post,
.feed-board .post + .post {
  border: 1px solid #e4e4e4;
  border-radius: 2px;
  background: #fff;
  margin: 0;
}
.creator-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 14px;
  padding: 4px 18px 28px;
  width: 100%;
}
.creator-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e4e4e4;
  min-width: 0;
}
.creator-card-photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #111; }
.creator-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.creator-card-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.creator-card-body .btn { margin-top: 8px; }
.section-title { font-size: 20px; margin: 8px 16px 12px; letter-spacing: -0.03em; }
.admin-search { display: flex; flex-direction: column; gap: 6px; margin: 4px 16px 8px; max-width: 640px; font-size: 13px; font-weight: 700; color: #4b5560; }
.admin-search input { height: 44px; border: 1px solid #d9dde3; border-radius: 10px; padding: 0 12px; font-size: 16px; font-weight: 500; color: #111; background: #fff; }
.admin-search-count { margin: 0 16px 8px; color: var(--muted); font-size: 13px; min-height: 18px; }
.admin-account { justify-content: space-between; }
.admin-account-link { display: flex; gap: 12px; align-items: center; min-width: 0; text-decoration: none; color: inherit; }
.admin-controls { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.admin-trash-note { margin: 0 16px 8px; }
.page-pad .admin-controls { margin: 0 16px 12px; }
.home-lists { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 16px 8px; }
.home-lists .chip { font-size: 13px; padding: 6px 12px; }
.home-new-list, .home-add { display: flex; gap: 8px; align-items: center; }
.home-new-list input, .home-add select {
  height: 34px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
}
.home-add { margin: 0 16px 12px; }
.demo-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 12px 16px;
  padding: 12px 14px;
  background: var(--black);
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.demo-banner p { margin: 0; flex: 1 1 200px; min-width: 0; }
.demo-banner button { flex: 0 0 auto; }

.post + .post { border-top: 1px solid var(--line); }
.post { padding: 14px 0 8px; }
.post-top { display: flex; gap: 10px; align-items: center; padding: 0 16px 8px; }
.user-logo {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
.user-logo svg { width: 100%; height: 100%; display: block; }
.user-logo.lg {
  border-radius: 22px;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.avatar, .avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}
.avatar-wrap { position: relative; flex: 0 0 auto; }
.who { min-width: 0; }
.who .name { font-weight: 750; font-weight: 700; text-decoration: none; }
.meta { color: var(--muted); font-size: 13px; }
.caption { margin: 0; padding: 0 16px 10px; line-height: 1.45; white-space: pre-wrap; }
.media {
  position: relative;
  margin: 0 16px 8px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #141414;
}
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media.locked img { filter: blur(18px) brightness(0.62) saturate(0.85); transform: scale(1.14); }
.media.mine {
  background: linear-gradient(145deg, #e10600, #1a1a1a 72%);
}
.lock-overlay, .play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-align: center;
  padding: 16px;
}
.lock-overlay p { margin: 0; font-weight: 750; font-weight: 700; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.lock-overlay svg, .play svg { width: 34px; height: 34px; }
.chip-on-media {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0,0,0,.62);
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 650;
  font-weight: 600;
}
.actions { display: flex; gap: 2px; padding: 4px 10px 0; }
.action {
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  color: #222;
}
.action:hover { background: #f3f4f6; }
.action svg { width: 22px; height: 22px; }
.action.liked { color: #ff2d55; }
.counts { padding: 2px 16px 10px; font-size: 14px; }
.counts b { font-weight: 750; font-weight: 700; }
.comments { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.comments p { margin: 0; font-size: 14px; }
.comment-form, .composer { display: flex; gap: 8px; }
.comment-form input, .composer input { flex: 1; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 16px 8px;
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 14px;
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search input { border: 0; background: transparent; width: 100%; padding: 4px; outline: none; }
.advanced-toggle { margin: 0 16px 10px; border-radius: 999px; }
.advanced-toggle.on { background: #111; color: #fff; }
.advanced-panel {
  margin: 0 16px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.advanced-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.advanced-grid .field { margin: 0; }
.advanced-grid input, .advanced-grid select { height: 42px; border: 1px solid #d9dde3; border-radius: 10px; padding: 0 10px; background: #fff; width: 100%; }
@media (max-width: 800px) { .advanced-grid { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 8px; overflow: auto; padding: 4px 16px 10px; align-items: center; }
.explore-filters .btn { border-radius: 999px; flex: 0 0 auto; }
.library-page { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 32px; }
.library-page .section-title { margin-left: 0; }
.library-side, .library-main { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; }
.library-new { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.library-new .field { margin: 0; }
.library-new .btn, .library-upload .btn { height: 44px; border-radius: 10px; }
.folder-list { display: flex; flex-direction: column; gap: 8px; }
.folder-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid #e4e7eb;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}
.folder-btn.on { border-color: #111; background: #111; color: #fff; }
.folder-btn b { font-size: 12px; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.library-head h2, .library-empty h2 { margin: 0; font-size: 20px; }
.library-upload { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: end; margin-bottom: 16px; }
.library-upload .field { margin: 0; }
.library-upload .field:last-of-type, .library-upload .pay-actions { grid-column: 1 / -1; }
.library-upload input[type="file"] { height: 44px; padding: 10px 12px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.library-card { border: 1px solid #e6e6e6; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.library-card img, .library-card video { width: 100%; height: 150px; object-fit: cover; display: block; background: #111; }
.library-audio { height: 150px; display: grid; place-items: center; background: #111; color: #fff; font-weight: 700; }
.library-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.library-card-body p { margin: 0; color: #555; font-size: 13px; }
.library-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.library-card-actions form { display: flex; gap: 6px; align-items: center; flex: 1; }
.library-card-actions select { height: 36px; border: 1px solid #e1e4e8; border-radius: 8px; padding: 0 8px; min-width: 0; flex: 1; }
@media (max-width: 800px) {
  .library-page, .library-upload, .library-new { grid-template-columns: 1fr; }
}
.tile-caption { margin: 8px 2px 0; color: #333; font-size: 13px; line-height: 1.35; }
.chip {
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.chip.on { background: #111; color: #fff; border-color: #111; }

.creator-row, .suggest, .note-row, .sub-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.creator-row .grow, .suggest .grow, .note-row .grow, .sub-row .grow { flex: 1; min-width: 0; }
.creator-row strong, .suggest strong, .note-row strong { display: block; }
.handle { color: var(--muted); font-size: 13px; }
.price-note { color: #333; font-size: 13px; margin-top: 2px; }

.banner { position: relative; height: 240px; background: #111 center/cover no-repeat; overflow: hidden; }
.banner.editing { box-shadow: inset 0 0 0 2px var(--red); }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-img.is-framed { inset: auto; max-width: none; max-height: none; }
.banner-tools, .photo-tools { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.banner-tools { position: absolute; left: 12px; right: 12px; top: 12px; }
.banner-tools .btn.on { background: #111; color: #fff; }
.banner.editing { cursor: grab; }
.banner-img.can-drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; }
.banner-move { position: absolute; inset: 0; z-index: 3; cursor: grab; touch-action: none; }
.banner-size { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border-radius: 8px; background: #fff; color: #111; font-size: 12px; font-weight: 700; }
.banner-size input { width: 110px; }
.banner-resize { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 28px; height: 28px; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: nwse-resize; }
.banner-resize::before { content: ""; display: block; width: 12px; height: 12px; margin: 8px 0 0 8px; border-right: 2px solid #111; border-bottom: 2px solid #111; }
.photo-tools { margin-top: 8px; }
.banner-tools select, .photo-tools select { height: 34px; border-radius: 8px; border: 1px solid #ddd; background: #fff; max-width: 180px; }
.banner-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.banner-pick { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #f3f3f3; color: #111; text-align: left; cursor: pointer; }
.banner-pick.on { border-color: var(--red); }
.banner-pick img { display: block; width: 100%; height: 110px; object-fit: cover; }
.banner-pick span { display: block; padding: 6px 8px 8px; font-size: 12px; line-height: 1.3; }
.profile-photo-col { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; }
.profile-photo-col .user-logo.lg, .profile-photo-col .profile-avatar { position: relative; z-index: 3; }
.me-photo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; display: block; }
.profile-head { padding: 0 16px 8px; }
.profile-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-top: -46px; }
.profile-avatar {
  width: 104px;
  height: 104px;
  border-radius: 22px;
  object-fit: cover;
  border: 4px solid #fff;
  background: #111;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.creator-card-photo { position: relative; }
.creator-card-photo .user-logo {
  position: absolute;
  left: 10px;
  bottom: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.featured-face {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  background: #111;
  flex: 0 0 auto;
}
.featured-row strong { font-size: 15px; }
.featured-card .creator-card-photo { position: relative; }
.featured-card .featured-face { width: 100%; height: 100%; border-radius: 0; }
.featured-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.featured-head .section-title { margin-left: 0; margin-right: 0; }
.featured-head:not(.rail) { padding: 0 16px; }
.featured-head.rail { padding: 0; flex-wrap: wrap; }
.featured-head.rail h2 { margin: 8px 0; }
.hot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  flex: 0 1 auto;
  max-width: 100%;
}
.hot-btn:hover { background: #2a2a2a; }
.hot-flame { width: 16px; height: 16px; display: block; }
.hot-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 28px; }
.hot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fff;
  color: inherit;
}
.hot-rank { width: 28px; text-align: center; font-weight: 800; color: #ff4d00; }
.hot-row .handle { display: block; }
.featured-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-bottom: 8px; }
.profile-id { padding-top: 8px; }
.profile-id h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.profile-id .meta { margin-top: 2px; }
.bio { margin: 12px 0; line-height: 1.45; }
.bio-edit { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 12px 0; }
.bio-edit textarea { width: min(560px, 100%); border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; font: inherit; }
.social-editor { margin: 8px 0 14px; }
.social-add, .social-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.social-add input { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; min-width: 180px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.social-links a, .social-row a { color: var(--red); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 8px 0 0; }
.stats b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.stats span { color: var(--muted); font-size: 12px; }
.shelf-tabs { gap: 0; }
.shelf-tab {
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: inherit;
}
.shelf-tab.on b, .shelf-tab.on span { color: var(--red); }
.shelf-audio-grid { grid-template-columns: 1fr; }
.shelf-audio { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.shelf-audio audio { width: 100%; margin-top: 8px; }
.feature-manager h2 { margin: 0 0 6px; }
.call-settings { max-width: 720px; }
.call-settings h2 { margin: 18px 0 6px; }
.call-settings h2:first-child { margin-top: 0; }
.call-settings .muted { margin: 0 0 14px; }
.call-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: end;
  margin-bottom: 8px;
}
.call-grid .field { margin: 0; }
.call-grid .span-2,
.call-settings .span-2 { grid-column: 1 / -1; }
.call-grid .field input,
.call-grid .field select,
.call-settings .field select {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}
.call-submit { grid-column: 1; }
.call-submit .btn { width: 100%; height: 44px; border-radius: 10px; }
.call-slot-list { margin-top: 8px; }
.call-slot-list li { min-height: 44px; }
.call-slot-list .btn { height: 36px; min-width: 96px; }
@media (max-width: 700px) {
  .call-grid { grid-template-columns: 1fr; }
  .call-submit { grid-column: 1; }
}
.cal { margin: 8px 0 16px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week span { text-align: center; font-size: 12px; color: var(--muted); }
.cal-day {
  height: 42px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
}
.cal-day.outside { color: #bbb; }
.cal-day.today { border-color: #111; }
.cal-day.selected { background: var(--red); color: #fff; border-color: var(--red); }
.cal-day.paid { box-shadow: inset 0 -3px 0 #111; }
.cal-day.booked { box-shadow: inset 0 -3px 0 var(--red); }
.call-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.live-eta { padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.live-eta h2 { margin: 0 0 4px; font-size: 15px; }
.live-eta p { margin: 0 0 8px; }
.live-eta-form, .live-eta-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.live-eta-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.live-eta-form input { width: 88px; height: 36px; border: 1px solid #e4e4e4; border-radius: 10px; padding: 0 10px; background: #fff; }
.call-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.cal-day:disabled { background: #f6f6f6; color: #ccc; }
.feature-total { margin: 0 0 4px; }
.feature-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.feature-controls .btn { min-width: 96px; height: 42px; border-radius: 10px; }
.menu { display: flex; justify-content: flex-end; padding: 0 0 8px; }
.menu button { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 8px 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 12px; margin-top: 12px; width: 100%; }
.tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: #ddd;
  overflow: hidden;
  color: #fff;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.locked img { filter: blur(9px) brightness(0.7) saturate(0.9); transform: scale(1.08); }
.tile .mini-lock, .tile .mini-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.tile .mini-lock svg, .tile .mini-play svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.45)); }
.tile .corner {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,.55);
  border-radius: 6px;
  padding: 2px 5px;
}

.messages { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); height: 100%; min-height: 0; width: 100%; }
.messages.with-library { grid-template-columns: 220px minmax(420px, 1.2fr) minmax(300px, 0.82fr); }
.inbox, .thread, .library { min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.library { border-left: 1px solid var(--line); background: #fafafa; }
.lib-list { overflow: auto; flex: 1; }
.lib-item, .file-card { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.lib-item { grid-template-columns: 22px 72px minmax(0, 1fr); padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lib-item.picked { background: #fff5f5; box-shadow: inset 3px 0 0 var(--red); }
.lib-pick { width: 18px; height: 18px; }
.lib-item img, .file-card img { width: 64px; height: 64px; object-fit: cover; background: #111; }
.lib-item img.blurred, .file-card img.blurred { filter: blur(6px) brightness(0.7); }
.file-mark { width: 64px; height: 64px; display: grid; place-items: center; background: var(--black); color: #fff; font-weight: 800; }
.lib-item .btn, .file-card .btn { margin-top: 6px; }
.lib-foot { padding: 12px; border-top: 1px solid var(--line); }
.file-card { margin-top: 8px; padding: 8px; background: #fff; color: var(--ink); border: 1px solid #e6e6e6; }
.bubble.me .file-card { color: var(--ink); }
.tip-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.tip-custom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tip-custom input, .tip-custom select, .field select { border: 1px solid #ddd; border-radius: 4px; padding: 7px 8px; background: #fff; }
.field select { width: 100%; padding: 11px 12px; }
.tip-custom input { width: 110px; }
.tip-custom select { max-width: 180px; }
.card-list { list-style: none; margin: 0 0 14px; padding: 0; }
.card-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tip-row span { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.bubble.tip { border: 1px solid #111; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.presets .btn.on { background: var(--black); color: #fff; border-color: var(--black); }
.tile-count {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}
.tile-wrap { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tile-wrap .tile { width: 100%; }
.tile-wrap > .tile-like,
.dialog > .tile-like {
  position: static;
  align-self: flex-start;
  margin: 0;
  background: #fff;
  color: #111;
  border: 1px solid #e4e4e4;
}
.tile-like {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.tile-like svg { width: 16px; height: 16px; }
.tile-like.liked, .tile-wrap > .tile-like.liked, .dialog > .tile-like.liked { background: var(--red); color: #111; border-color: var(--red); }
.tile-like.liked svg, .tile-wrap > .tile-like.liked svg, .dialog > .tile-like.liked svg { color: #111; fill: #111; }
.tile-caption { margin: 0; }
.media-frame { position: relative; }
.media-frame .media { margin: 0 0 12px; }
.media-frame .tile-like { left: 16px; bottom: 24px; }
.inbox { border-right: 1px solid var(--line); }
.inbox h1, .thread-head h1, .pad-title { font-size: 20px; margin: 0; letter-spacing: -0.03em; }
.inbox-head, .thread-head, .pad-head { padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.thread-log { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; max-height: none; min-height: 0; }
.bubble { max-width: min(92%, 520px); padding: 8px 12px; border-radius: 14px; background: #f2f4f6; line-height: 1.25; font-size: 17px; }
.bubble.me { margin-left: auto; background: var(--black); color: #fff; border-bottom-right-radius: 5px; }
.bubble.me .when { color: #cfcfcf; }
.bubble.them { border-bottom-left-radius: 5px; }
.bubble .when { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.bubble.locked { background: #fff; border: 1px dashed var(--red); color: var(--ink); text-align: center; max-width: 280px; }
.composer-dock {
  margin: 10px 12px 12px;
  padding: 12px;
  background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "write write" "tools send";
  gap: 10px;
}
.composer-dock textarea,
.composer-dock .dock-write {
  grid-area: write;
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  resize: vertical;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: #111;
  font-size: 16px;
}
.dock-tools { grid-area: tools; display: grid; grid-template-columns: 1.3fr 1.15fr 96px 138px; gap: 8px; align-items: end; }
.dock-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.dock-field span { color: #ffb4b4; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.dock-field select,
.dock-field input {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  background: #2a2a2a;
  color: #fff;
  font-size: 14px;
}
.dock-field input[type="file"] { padding: 8px; font-size: 12px; }
.dock-send { grid-area: send; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; min-width: 108px; }
.dock-send .btn { height: 44px; border-radius: 12px; }
.pick-count { font-size: 12px; font-weight: 700; color: #ffb4b4; min-height: 16px; }
.composer-bar.composer-dock { grid-template-areas: "write write" "tools send"; grid-template-columns: 1fr auto; align-items: end; }
.member-tools { grid-area: tools; display: flex; gap: 8px; align-items: end; }
.member-tools .btn { height: 40px; }
.member-tools .dock-field { min-width: 220px; }
.dialog.library-window { width: min(920px, calc(100% - 32px)); }
.library-window-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; min-height: 280px; }
.pick-card { cursor: pointer; }
.pick-card.picked { outline: 2px solid var(--red); outline-offset: -2px; }
.pick-card input { margin-right: 6px; }
.bubble-media { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.bubble-media img, .bubble-media video { max-width: 180px; margin-top: 0; }
@media (max-width: 800px) { .library-window-grid { grid-template-columns: 1fr; } }
.composer-bar.composer-dock input { min-height: 52px; border: 0; border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.tip-row { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #fff; }
.tip-custom { display: grid; grid-template-columns: 120px minmax(140px, 1fr) auto auto; gap: 8px; align-items: center; flex: 1; }
.tip-custom input, .tip-custom select { height: 36px; border: 1px solid #e4e4e4; border-radius: 10px; padding: 0 10px; background: #fafafa; }
.bubble video, .bubble img { max-width: 220px; border-radius: 8px; display: block; margin-top: 8px; }
.bubble audio { width: min(100%, 240px); height: 36px; margin-top: 0; display: block; }
.file-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #e4e4e4;
}
.composer-bar { padding: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.empty-thread { margin: auto; color: var(--muted); text-align: center; padding: 24px; }
.inbox a.row { text-decoration: none; color: inherit; display: flex; gap: 10px; padding: 12px; align-items: center; }
.inbox a.row.active, .inbox a.row:hover { background: #fff5f5; }
.inbox a.row p { margin: 2px 0 0; color: #556; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

.note-row { align-items: flex-start; }
.note-row p { margin: 3px 0 0; color: #444; font-size: 14px; }
.card {
  margin: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card h2 { margin: 0 0 6px; font-size: 16px; }
.muted { color: var(--muted); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8px; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 16px; }
.stat-cards .card { margin: 0; }
.stat-cards strong { display: block; font-size: 26px; letter-spacing: -0.04em; margin-top: 6px; }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 22, 0.56);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
}
.dialog {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  max-height: min(88vh, 820px);
  overflow: auto;
  box-shadow: var(--shadow);
}
.dialog.wide { width: min(560px, 100%); }
.dialog.schedule-dialog {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
  align-self: center;
}
.schedule-dialog .dialog-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  padding: 20px 20px 8px;
}
.schedule-dialog .dialog-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.schedule-dialog .cal-day { height: 34px; }
.dialog h2 { margin: 0 0 6px; letter-spacing: -0.03em; }
.amount { font-size: 34px; font-weight: 800; letter-spacing: -0.045em; margin: 8px 0; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card:has(.pay-panel) { max-width: 820px; }
.pay-panel h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.03em; }
.pay-panel .muted { display: block; margin: 0 0 14px; }
.pay-block + .pay-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.pay-empty { margin: 0 0 16px; color: var(--muted); }
.pay-cards { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pay-cards li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: #fafafa;
}
.pay-cards strong, .pay-cards .meta { display: block; min-width: 0; }
.pay-cards .meta { margin-top: 2px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pay-cards .btn { height: 36px; min-width: 96px; border-radius: 10px; }
.pay-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: end;
}
.pay-form .field { margin: 0; }
.pay-form .span-2,
.pay-form .pay-actions { grid-column: 1 / -1; }
.pay-form .field input,
.pay-form .field select {
  height: 44px;
  margin: 0;
  border: 1px solid #d9dde3;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  box-shadow: none;
}
.pay-actions { display: flex; justify-content: flex-start; }
.pay-actions .btn { height: 44px; min-width: 210px; border-radius: 10px; }
.pay-panel .chips { padding: 0 0 12px; margin: 0; }
.pay-books h2 { margin-top: 18px; }
.pay-books h2:first-child { margin-top: 0; }
.pay-books .sheet-wrap { overflow-x: auto; margin: 0 0 8px; }
.pay-books .sheet { width: 100%; min-width: 560px; margin: 0; }
.pay-books .sheet th,
.pay-books .sheet td { padding: 10px 8px; }
.pay-books .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) {
  .card:has(.pay-panel) { max-width: none; }
  .pay-form { grid-template-columns: 1fr; }
}
.dialog .media { margin: 0 0 12px; }
.dialog .caption, .dialog .comments, .dialog .counts { padding-left: 0; padding-right: 0; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.dialog .pay-form .dialog-actions { grid-column: 1 / -1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  z-index: 40;
  font-size: 14px;
  box-shadow: var(--shadow);
  max-width: min(520px, calc(100% - 24px));
}

@media (max-width: 1100px) {
  .rail { display: none; }
  .view { max-width: none; border-right: 0; }
  .landing { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: auto; }
  .landing-photos { height: 46vh; grid-template-columns: 1.2fr 1fr 1fr; }
  .landing-panel { height: auto; padding: 28px 22px 40px; }
}
@media (max-width: 800px) {
  .app { flex-direction: column; }
  .landing-photos { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 140px; height: auto; }
  .shot-a { grid-row: auto; grid-column: 1 / span 2; height: 220px; }
  .sidebar { display: none; }
  .mobile-top {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--black);
    padding: 12px var(--gutter);
    border-bottom: 1px solid #000;
    align-items: center;
  }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    background: var(--black);
    border-top: 1px solid #222;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1;
    text-decoration: none;
    color: #f2f2f2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 650;
    font-weight: 600;
    position: relative;
    padding: 4px 0;
  }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--red); }
  .tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); margin: 0; }
  :root { --gutter: 20px; }
  .view { padding: 8px var(--gutter) 84px; }
  .landing-photos { padding: 16px; }
  .messages, .messages.with-library { grid-template-columns: 1fr; height: auto; min-height: auto; }
  .inbox, .thread, .library { min-height: auto; height: auto; overflow: visible; }
  body:not([data-thread="open"]) .library { display: none; }
  .thread > a.meta { display: inline; padding: 12px 16px 0; }
  body[data-thread="open"] .inbox { display: none; }
  body:not([data-thread="open"]) .thread { display: none; }
  .thread-log { max-height: none; min-height: 50vh; }
  .toast { bottom: 84px; }
  .profile-top { flex-direction: column; align-items: flex-start; }
  .profile-actions { justify-content: flex-start; width: 100%; }
  .split, .stat-cards { grid-template-columns: 1fr; }
  .banner { height: 140px; }
}
