:root {
  color-scheme: light;
  --ink: #0f1419;
  --soft-ink: #26313a;
  --muted: #687684;
  --line: #e6ecf0;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --accent: #a4036f;
  --accent-dark: #820258;
  --accent-soft: #f8e7f2;
  --blue: #2f6f8f;
  --green: #138a52;
  --danger: #2f3336;
  --secondary-button: #0f1419;
  --secondary-button-hover: #26313a;
  --disabled-button: #d5dce2;
  --disabled-button-text: #5f6b76;
  --shadow: 0 10px 30px rgba(15, 20, 25, 0.08);
  --shadow-soft: 0 3px 14px rgba(15, 20, 25, 0.06);
}

:root[data-theme="night"] {
  color-scheme: dark;
  --ink: #f3f5f7;
  --soft-ink: #d9e0e6;
  --muted: #aab6c2;
  --line: #27313b;
  --paper: #0d1117;
  --surface: #141a22;
  --surface-2: #1b232d;
  --accent: #d41493;
  --accent-dark: #f037ad;
  --accent-soft: #2b1327;
  --danger: #3a202a;
  --secondary-button: #27313b;
  --secondary-button-hover: #36424f;
  --disabled-button: #27313b;
  --disabled-button-text: #aab6c2;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(164, 3, 111, 0.13), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(164, 3, 111, 0.07), transparent 24%),
    linear-gradient(rgba(164, 3, 111, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 3, 111, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper) 420px, var(--paper) 100%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  background-attachment: scroll;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}
:root[data-theme="night"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(212, 20, 147, 0.18), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(212, 20, 147, 0.12), transparent 24%),
    linear-gradient(rgba(212, 20, 147, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 20, 147, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #0d1117 0%, #111620 420px, #0d1117 100%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  background-attachment: scroll;
}
.landing-page main {
  width: 100%;
  max-width: none;
  padding-top: 0;
}

a { color: inherit; text-decoration: none; }
main { width: min(1060px, 100%); margin: 0 auto; padding: 24px 18px 46px; flex: 1 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(38px, 6vw, 72px); line-height: 0.98; letter-spacing: 0; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.16; margin-bottom: 14px; }
h3 { font-size: 16px; margin-bottom: 12px; }
p { line-height: 1.55; }
code { background: var(--surface-2); border-radius: 5px; padding: 2px 6px; }
pre { overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 0 max(18px, calc((100vw - 1060px) / 2 + 18px));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}
.landing-page .topbar { display: none; }

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}
.brand-logo {
  display: block;
  width: 168px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}
.theme-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  width: 78px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  opacity: 0.82;
}
.theme-toggle:hover {
  background: var(--surface);
  opacity: 1;
}
.install-app-button {
  position: fixed;
  right: 104px;
  bottom: 14px;
  z-index: 20;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  opacity: 0.9;
}
.install-app-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.install-app-button-wide {
  right: 14px;
  width: min(320px, calc(100vw - 28px));
}
.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(164, 3, 111, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
}
:root[data-theme="night"] .theme-toggle-thumb {
  transform: translateX(40px);
  background: var(--accent);
}
.theme-toggle-option {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  line-height: 1;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.theme-toggle-option::before {
  content: "";
  display: block;
}
.theme-sun::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow:
    0 -8px 0 -5px currentColor,
    0 8px 0 -5px currentColor,
    8px 0 0 -5px currentColor,
    -8px 0 0 -5px currentColor,
    6px 6px 0 -5px currentColor,
    -6px -6px 0 -5px currentColor,
    6px -6px 0 -5px currentColor,
    -6px 6px 0 -5px currentColor;
}
.theme-moon::before {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  box-shadow: -5px 0 0 0 currentColor;
  transform: translateX(3px);
}
.theme-sun { color: #fff; }
.theme-moon { color: var(--muted); }
:root[data-theme="night"] .theme-toggle {
  background: color-mix(in srgb, var(--surface) 86%, #000 14%);
}
:root[data-theme="night"] .theme-sun { color: var(--muted); }
:root[data-theme="night"] .theme-moon { color: #fff; }
nav { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
nav a { color: var(--ink); font-weight: 850; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  white-space: nowrap;
}
.nav-member-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-member-label {
  min-width: 0;
}
.nav-change-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.nav-change-link:hover {
  color: var(--accent-dark);
}
.nav-chat-link {
  padding-right: 8px;
}
.nav-signout {
  padding-right: 0;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.nav-avatar,
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}
.profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  flex-basis: 86px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
  font-weight: 950;
}
.eyebrow { color: var(--accent); font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }

.gate {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 38px;
}
.join-gate {
  min-height: calc(100vh - 164px);
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 24px;
  text-align: center;
}
.join-copy {
  display: grid;
  justify-items: center;
  max-width: 680px;
}
.join-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}
.join-logo {
  display: block;
  width: min(74vw, 460px);
  max-height: 190px;
  object-fit: contain;
}
.gate p { max-width: 620px; color: var(--muted); font-size: 20px; line-height: 1.52; }

.panel, .post, .message-panel, .stat, .announcement, .legal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}
.panel, .message-panel { padding: 22px; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 850; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  background: var(--surface-2);
  outline: none;
  color-scheme: inherit;
  transition: none;
  transform: translateZ(0);
}
input:focus, textarea:focus, select:focus {
  background: var(--surface-2);
  border-color: rgba(164, 3, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(164, 3, 111, 0.16);
}
textarea { resize: vertical; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.12s ease, color 0.12s ease;
}
button:hover, .button:hover { background: var(--accent-dark); }
.secondary,
button.secondary,
.button.secondary,
a.button.secondary {
  background: var(--secondary-button);
  color: #fff;
}
.secondary:hover,
button.secondary:hover,
.button.secondary:hover,
a.button.secondary:hover {
  background: var(--secondary-button-hover);
  color: #fff;
}
.muted-button { background: var(--muted); }
.danger { background: var(--danger); color: #fff; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.join-actions { gap: 14px; flex-wrap: wrap; justify-content: center; }
.join-actions .button { min-width: 206px; }
.outline-button {
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
}
.outline-button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.site-footer {
  width: min(1060px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer span { color: var(--ink); font-weight: 900; }
.footer-logo {
  display: block;
  width: 138px;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}
.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}
.site-footer a { color: var(--accent); font-weight: 850; }

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.feed-header h1 { margin-bottom: 0; }
.feed-title {
  color: var(--accent);
  font-size: clamp(34px, 5vw, 56px);
}
.feed-header .button { flex: 0 0 auto; }
.post-detail-panel .feed-header {
  align-items: flex-start;
}
.post-detail-panel .feed-header > div {
  min-width: 0;
}
.post-detail-panel .feed-header h1 {
  margin: 8px 0 12px;
  line-height: 1.06;
  overflow-wrap: anywhere;
}
.post-detail-panel .feed-header .muted {
  margin: 0;
  line-height: 1.45;
}
.feed { display: grid; gap: 18px; }
.announcement {
  position: relative;
  overflow: hidden;
  border-color: rgba(164, 3, 111, 0.24);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
  padding: 18px 20px;
  margin-bottom: 18px;
  color: var(--text);
  font-weight: 850;
  line-height: 1.55;
}
.announcement::before {
  content: "Announcement";
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.post {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 18px;
}
.post-media {
  position: relative;
  background: #0f1419;
  min-height: 0;
}
.post-media img,
.gallery-slide img {
  width: 100%;
  height: auto;
  max-height: 820px;
  object-fit: contain;
  display: block;
  border: 0;
}
.post-media video, .post-media iframe,
.gallery-slide video, .gallery-slide iframe {
  width: 100%;
  min-height: 390px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  border: 0;
}
.locked-media {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.locked-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 45%, rgba(15, 20, 25, 0.18), rgba(15, 20, 25, 0.62)),
    linear-gradient(135deg, rgba(164, 3, 111, 0.34), rgba(15, 20, 25, 0.68));
  backdrop-filter: blur(8px);
}
.locked-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter: blur(34px) saturate(0.45) brightness(0.58);
  transform: scale(1.16);
}
.locked-placeholder {
  background:
    linear-gradient(135deg, rgba(164, 3, 111, 0.32), rgba(15, 20, 25, 0.88)),
    var(--secondary-button);
}
.locked-overlay {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.72);
  color: #fff;
  font-weight: 900;
  backdrop-filter: blur(12px);
}
.unlock-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  contain: layout paint;
  transform: translateZ(0);
}
.shop-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.shop-card-head h2 {
  margin-bottom: 0;
}
.shop-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}
.shop-teaser {
  color: var(--soft-ink);
  line-height: 1.55;
}
.shop-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.download-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  contain: layout paint;
  transform: translateZ(0);
}
.download-panel h3 {
  margin-bottom: 0;
}
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.download-button {
  min-height: 38px;
}
.paid-price {
  margin: 0;
  color: var(--text);
}
.price-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}
.paid-settings {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  contain: layout paint;
  transform: translateZ(0);
}
.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  contain: layout paint;
  transform: translateZ(0);
}
.form-section h2 {
  margin-bottom: 0;
  font-size: 24px;
}
.form-section > p {
  margin-bottom: 0;
}
.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.upload-preview-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.upload-preview-item img,
.upload-preview-item video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #111820;
}
.upload-preview-item span {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.paid-content-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 34px rgba(164, 3, 111, 0.28);
}
.paid-content-button:hover {
  background: var(--accent-dark);
  color: #fff;
}
.is-hidden {
  display: none !important;
}
.unlock-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.check-row input {
  width: 18px;
  min-height: 18px;
}
.notice {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(164, 3, 111, 0.24);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
}
.notice code {
  font-weight: 900;
  color: var(--accent);
}
.post-gallery {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: #0f1419;
}
.post-gallery::-webkit-scrollbar {
  display: none;
}
.gallery-slide {
  min-width: 100%;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  background: #0f1419;
}
.gallery-count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(15, 20, 25, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.48);
  color: #fff;
  font-size: 0;
  line-height: 0;
  transform: translateY(-50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}
.gallery-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  display: block;
}
.gallery-arrow-prev::before {
  transform: translateX(2px) rotate(-135deg);
}
.gallery-arrow-next::before {
  transform: translateX(-2px) rotate(45deg);
}
.gallery-arrow:hover {
  background: rgba(164, 3, 111, 0.86);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.gallery-arrow-prev {
  left: 10px;
}
.gallery-arrow-next {
  right: 10px;
}
.gallery-arrow:disabled {
  opacity: 0.42;
  cursor: default;
  background: rgba(15, 20, 25, 0.30);
}
.post-body { padding: 24px; }
.post-meta, .muted, time { color: var(--muted); font-size: 13px; }
.post-body > p { color: var(--soft-ink); }
.name-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  vertical-align: middle;
}
.member-name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  vertical-align: middle;
}
.member-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 160px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 52%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 13%, var(--surface));
  color: var(--badge-color, var(--accent));
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-badge {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #a8b3bd;
  box-shadow: 0 0 0 3px rgba(168, 179, 189, 0.16);
}
.online-badge.online {
  background: #14b866;
  box-shadow: 0 0 0 3px rgba(20, 184, 102, 0.16);
}
.online-badge.offline {
  background: #a8b3bd;
}
.post-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
}
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.comment-toggle { min-width: 130px; }
.icon-button {
  width: 42px;
  padding: 0;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 20px;
  border: 1px solid var(--line);
}
.icon-button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-likes-details {
  position: relative;
  display: inline-block;
}
.admin-likes-details summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.admin-likes-details summary::-webkit-details-marker {
  display: none;
}
.admin-likes-details summary:hover {
  border-color: rgba(164, 3, 111, 0.48);
}
.like-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}
.likers-list {
  min-width: min(420px, calc(100vw - 48px));
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}
.liker-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.liker-row:first-child {
  border-top: 0;
}
.liker-row span {
  color: var(--muted);
  font-size: 14px;
}
.code-row {
  align-items: flex-start;
}
.code-used-details {
  margin-top: 10px;
}
.code-used-details summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
}
.comments { border-top: 1px solid var(--line); padding-top: 18px; }
.comment-composer {
  margin-top: 16px;
}
.comment-composer.is-hidden {
  display: none;
}
.comment, .message { border-top: 1px solid var(--line); padding: 14px 0; }
.comment:first-of-type, .message:first-of-type { border-top: 0; }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-delete-form { margin: 0; }
.comment p, .message p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.comment-head time { display: block; margin-top: 3px; }
.comment-admin-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.comment-replies {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.comment-reply {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.comment-reply p { margin-top: 4px; color: var(--soft-ink); }
.admin-reply-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.admin-reply-form button { justify-self: start; min-height: 38px; padding: 0 18px; }
.post-detail-panel { max-width: 920px; margin: 0 auto; overflow: hidden; }
.admin-post-body { padding: 20px 0 0; }
.text-button {
  width: auto;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  font-size: 13px;
}
.text-button:hover {
  background: transparent;
  color: var(--accent-dark);
  transform: none;
}
.danger-text { color: var(--danger-text, var(--accent)); }
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.success-pill {
  background: color-mix(in srgb, var(--green) 18%, var(--surface-2));
  color: var(--green);
}
.message-panel { margin-top: 20px; }

.chat-shell { max-width: 900px; margin: 0 auto; }
.chat-thread { display: grid; gap: 12px; margin: 20px 0; }
.chat-bubble {
  max-width: min(680px, 88%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface);
}
.chat-bubble.admin { justify-self: start; border-color: rgba(164, 3, 111, 0.22); background: var(--accent-soft); }
.chat-bubble.member { justify-self: end; background: var(--surface-2); }
.chat-bubble p { margin: 6px 0 8px; color: var(--soft-ink); line-height: 1.5; }
.chat-bubble time { display: block; }
.chat-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-delete-form {
  margin: 0;
}
.chat-image { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; margin: 10px 0; background: #0f1419; }
.chat-form { position: sticky; bottom: 12px; box-shadow: var(--shadow); }
.emoji-toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.emoji-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  border: 1px solid var(--line);
}
.emoji-button:hover { background: var(--accent-soft); }

.auth { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.auth .panel { width: min(430px, 100%); }
.auth.access-choice .panel {
  width: min(920px, 100%);
}
.access-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.access-choice-grid form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.access-choice-grid h2 {
  margin: 0;
  font-size: 24px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.single-admin-grid {
  grid-template-columns: minmax(0, 1fr);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.compact-stats {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.stat { padding: 17px; background: var(--surface-2); }
.compact-stats .stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 14px;
}
.stat-link {
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.stat-link:hover {
  background: var(--accent-soft);
  border-color: rgba(164, 3, 111, 0.35);
}
.stat strong { display: block; font-size: 30px; letter-spacing: 0; color: var(--accent); }
.compact-stats .stat strong { font-size: 24px; line-height: 1; }
.stat span { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.compact-stats .stat span { font-size: 12px; line-height: 1.15; }
.dashboard-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: -2px 0 12px;
}
.dashboard-task-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.dashboard-task-grid .button {
  min-height: 48px;
}
.bulk-actions {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  align-items: end;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
}
.bulk-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  flex: 0 0 34px;
}
.bulk-check input {
  width: 18px;
  min-height: 18px;
}
.compact-header {
  margin-bottom: 0;
  padding-bottom: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.activity-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
}
.member-actions form,
.member-actions button {
  width: 100%;
}
.filters { margin-bottom: 18px; }
.compact-filters {
  padding: 14px 16px;
  margin-bottom: 14px;
}
.compact-filters h2 {
  display: none;
}
.filter-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 12px; align-items: end; contain: layout paint; }
.compact-filters .filter-grid {
  grid-template-columns: minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(210px, 1.15fr) auto;
  gap: 10px;
}
.compact-filters label { gap: 5px; font-size: 12px; }
.compact-filters input,
.compact-filters select {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 11px;
}
.compact-filters button { min-height: 40px; }
.filter-grid button { min-width: 112px; }
.single-filter {
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-bottom: 18px;
}
.post-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  contain: layout paint;
}
.schedule-fields {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
  contain: layout paint;
}
button:disabled, .button:disabled {
  background: var(--disabled-button);
  color: var(--disabled-button-text);
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}
button:disabled:hover, .button:disabled:hover {
  background: var(--disabled-button);
  color: var(--disabled-button-text);
}
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.admin-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.admin-post:first-of-type { border-top: 0; }
.admin-post.with-preview { align-items: stretch; }
.admin-post-main { flex: 1; min-width: 0; }
.admin-post span { font-weight: 850; }
.admin-post small { display: block; color: var(--muted); margin-top: 4px; }
.post-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.post-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.admin-post-link {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex: 1;
  min-width: 0;
  color: inherit;
  border-radius: 14px;
}
.admin-post-link:hover .admin-post-main > span {
  color: var(--accent);
}
.media-preview { width: 116px; height: 82px; flex: 0 0 116px; object-fit: cover; border: 0; border-radius: 12px; background: #0f1419; }
.video-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}
.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-preview-placeholder {
  background:
    radial-gradient(circle at 70% 30%, rgba(164, 3, 111, 0.42), transparent 42%),
    linear-gradient(135deg, #19232c, #0f1419);
}
.video-preview-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(164, 3, 111, 0.9);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.edit-preview { margin-bottom: 20px; background: #0f1419; border-radius: 16px; overflow: hidden; }
.edit-media-preview { width: 100%; max-height: 460px; object-fit: contain; display: block; border: 0; background: #0f1419; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.row-actions .button, .row-actions button { min-height: 34px; padding: 0 13px; font-size: 14px; }
.row-actions .secondary,
.row-actions .button.secondary,
.row-actions button.secondary,
.row-actions a.button.secondary {
  background: var(--secondary-button);
  color: #fff;
}
.row-actions .secondary:hover,
.row-actions .button.secondary:hover,
.row-actions button.secondary:hover,
.row-actions a.button.secondary:hover {
  background: var(--secondary-button-hover);
  color: #fff;
}
.access-code-created {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}
.access-code-created code {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 850;
  color: var(--accent);
}
.access-code-form {
  margin-bottom: 14px;
}
.access-code-row small {
  line-height: 1.55;
}
.access-code-row.is-new-code {
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  border-radius: 18px;
  padding: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.access-code-value {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.access-code-value code {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: normal;
}
.compact-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}
.badge-edit-row {
  align-items: flex-start;
}
.badge-edit-main {
  flex: 1;
  min-width: 0;
}
.inline-edit-details {
  margin-top: 10px;
}
.inline-edit-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--secondary-button);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.badge-edit-form {
  grid-template-columns: minmax(140px, 0.8fr) minmax(160px, 1fr) minmax(120px, 0.7fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.checkline { display: flex; grid-template-columns: none; align-items: center; gap: 10px; color: var(--ink); }
.checkline input { width: auto; }
.message.unread { border-left: 4px solid var(--accent); padding-left: 12px; background: var(--accent-soft); }
.message.read { opacity: 0.74; }
.lower-grid { margin-top: 18px; }
.admin-tools { margin-bottom: 18px; }
.edit-panel { max-width: 760px; margin: 0 auto; }
.ok { color: var(--green); }
.bad { color: var(--accent); }
.empty {
  padding: 42px;
  border: 1px dashed color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  font-weight: 850;
}
.member-admin-row {
  gap: 16px;
}
.member-note-form {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin-top: 12px;
}
.member-note-form textarea {
  min-height: 64px;
}

.legal { max-width: 820px; margin: 0 auto; padding: 34px; }
.friendly-error { min-height: calc(100vh - 180px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; max-width: 720px; margin: 0 auto; }
.friendly-error p { color: var(--muted); font-size: 18px; line-height: 1.55; }
.legal h1 { font-size: clamp(34px, 6vw, 64px); }
.legal h2 { font-size: 22px; margin-top: 28px; }
.legal p { color: var(--muted); line-height: 1.65; }
.legal-links { display: flex; gap: 18px; margin-top: 20px; font-size: 14px !important; }
.legal-links a { color: var(--accent); font-weight: 900; }

@media (max-width: 820px) {
  main { width: min(100% - 24px, 1060px); padding: 22px 0 42px; }
  .topbar { align-items: flex-start; padding: 12px; }
  nav { justify-content: flex-end; flex-wrap: wrap; gap: 8px; text-align: right; }
  .nav-link { min-height: 34px; padding: 0 9px; }
  .nav-profile { order: 10; max-width: 100%; }
  h1 { font-size: clamp(34px, 12vw, 54px); line-height: 1; }
  h2 { font-size: 23px; }
  .gate, .post, .admin-grid { grid-template-columns: 1fr; }
  .stats-grid, .filter-grid { grid-template-columns: 1fr 1fr; }
  .compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .bulk-actions { grid-template-columns: 1fr; }
  .compact-filters .filter-grid { grid-template-columns: 1fr 1fr; }
  .compact-filters label:nth-child(3) { grid-column: 1 / -1; }
  .compact-filters button { grid-column: 1 / -1; }
  .post-actions, .schedule-fields { grid-template-columns: 1fr; }
  .shop-card-head { flex-direction: column; gap: 10px; }
  .shop-price { min-height: 36px; padding: 0 14px; }
  .shop-actions { grid-template-columns: 1fr; }
  .download-actions { display: grid; grid-template-columns: 1fr; }
  .form-section { padding: 14px; }
  .gate { min-height: auto; align-items: start; gap: 22px; }
  .join-gate {
    min-height: calc(100vh - 122px);
    align-content: center;
    align-items: center;
    justify-items: center;
    gap: 22px;
  }
  .join-logo-wrap { min-height: 132px; }
  .join-logo {
    width: min(76vw, 320px);
    max-height: 118px;
  }
  .gate p { font-size: 17px; }
  .panel, .message-panel, .legal { padding: 18px; }
  .feed-header { align-items: stretch; flex-direction: column; }
  .feed-header .button { width: 100%; }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .join-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 12px;
    width: min(100%, 520px);
  }
  .join-actions .button {
    width: 100%;
    min-width: 0;
    padding: 0 14px;
  }
  .join-actions .button.secondary {
    grid-column: 1 / -1;
  }
  .site-footer {
    width: min(100% - 24px, 1060px);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .footer-logo {
    width: 104px;
    height: 32px;
  }
  .site-footer nav {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    text-align: right;
    white-space: nowrap;
  }
  .post-media video, .post-media iframe { min-height: 260px; }
  .unlock-form { grid-template-columns: 1fr; }
  .post-action-row { gap: 10px; }
  .comment-toggle { min-width: 0; }
  .post-body { padding: 19px; }
  .post-body h2 { font-size: 24px; }
  .comments textarea, .chat-form textarea { min-height: 112px; }
  .chat-bubble { max-width: 94%; padding: 13px 14px; }
  .chat-form { position: static; box-shadow: none; }
  .emoji-button { width: 38px; min-height: 38px; }
  .admin-post { align-items: stretch; flex-direction: column; }
  .admin-post-link { flex-direction: column; }
  .media-preview { width: 100%; height: 180px; flex-basis: auto; }
  .row-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; width: 100%; }
  .row-actions form, .row-actions .button, .row-actions button { width: 100%; }
  .legal-links { flex-direction: column; gap: 8px; }
}

@media (max-width: 520px) {
  main { width: min(100% - 18px, 1060px); padding-top: 16px; padding-bottom: 34px; }
  .topbar { position: static; gap: 10px; padding: 10px 12px; }
  .brand-logo { width: 124px; height: 40px; }
  nav { gap: 9px; font-size: 13px; }
  .nav-link { min-height: 32px; padding: 0 8px; }
  .nav-profile {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-avatar { width: 26px; height: 26px; flex-basis: 26px; }
  .nav-member-label {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-change-link { font-size: 11px; }
  input, textarea, select { font-size: 16px; }
  button, .button { width: 100%; min-height: 46px; }
  .theme-toggle {
    right: 12px;
    bottom: 12px;
    width: 72px;
    min-height: 36px;
    padding: 4px;
  }
  .install-app-button {
    right: 92px;
    bottom: 12px;
    width: auto;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .install-app-button-wide {
    right: 12px;
    width: calc(100vw - 24px);
  }
  .theme-toggle-thumb,
  .theme-toggle-option {
    width: 28px;
    height: 28px;
  }
  :root[data-theme="night"] .theme-toggle-thumb {
    transform: translateX(36px);
  }
  .join-actions {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .join-actions .button {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    font-size: 15px;
  }
  .join-actions .button.secondary {
    grid-column: 1 / -1;
  }
  .site-footer {
    width: min(100% - 18px, 1060px);
    padding: 16px 0 18px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    text-align: center;
  }
  .footer-logo {
    width: 96px;
    height: 30px;
    object-position: center;
  }
  .site-footer nav {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 14px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  .stats-grid, .filter-grid { grid-template-columns: 1fr; }
  .badge-edit-form { grid-template-columns: 1fr; }
  .inline-edit-details summary,
  .badge-edit-form button {
    width: 100%;
    justify-content: center;
  }
  .compact-stats { grid-template-columns: 1fr 1fr; gap: 7px; }
  .dashboard-task-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .compact-stats .stat { min-height: 48px; padding: 8px 10px; }
  .compact-stats .stat strong { font-size: 21px; }
  .compact-filters { padding: 12px; }
  .compact-filters .filter-grid { grid-template-columns: 1fr; }
  .compact-filters label:nth-child(3),
  .compact-filters button { grid-column: auto; }
  .stat strong { font-size: 25px; }
  .icon-button, .emoji-button { width: 40px; min-height: 40px; }
  .inline-form button, .emoji-toolbar button { width: 40px; }
  .post { border-radius: 16px; }
  .post-media video, .post-media iframe { min-height: 220px; }
  .gallery-arrow {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
  .gallery-arrow-prev { left: 6px; }
  .gallery-arrow-next { right: 6px; }
  .gallery-count { top: 8px; right: 8px; }
  .locked-media, .locked-media img { min-height: 240px; }
  .post-body { padding: 16px; }
  .post-action-row {
    align-items: stretch;
  }
  .post-action-row > .inline-form {
    justify-content: flex-start;
  }
  .post-action-row > .comment-toggle {
    width: 100%;
  }
  .comment, .message { overflow-wrap: anywhere; }
  .chat-thread { gap: 10px; margin: 18px 0; }
  .chat-bubble { max-width: 100%; }
  .chat-image { max-height: 360px; }
  .auth { min-height: auto; place-items: start; }
  .access-choice-grid { grid-template-columns: 1fr; }
  .access-choice-grid form { padding: 14px; }
  .empty { padding: 28px 18px; }
  .legal { padding: 18px 16px; }
  .friendly-error { min-height: auto; padding: 36px 0; }
  .join-gate { min-height: auto; padding-top: 56px; }
}

/* Premium responsive polish pass */
:root {
  --text: var(--ink);
  --surface-muted: color-mix(in srgb, var(--accent) 4%, var(--surface-2));
  --glass-bg: color-mix(in srgb, var(--surface) 86%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 94%, transparent);
  --premium-border: color-mix(in srgb, var(--accent) 12%, var(--line));
  --premium-shadow: 0 18px 48px rgba(15, 20, 25, 0.10);
}

:root[data-theme="night"] {
  --surface-muted: color-mix(in srgb, var(--accent) 5%, var(--surface-2));
  --glass-bg: color-mix(in srgb, var(--surface) 72%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 86%, transparent);
  --premium-border: color-mix(in srgb, var(--accent) 15%, var(--line));
  --premium-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

body {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 34%),
    linear-gradient(225deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 38%),
    linear-gradient(rgba(164, 3, 111, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 3, 111, 0.022) 1px, transparent 1px),
    linear-gradient(180deg, var(--paper), var(--paper));
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
}

:root[data-theme="night"] body {
  background:
    linear-gradient(135deg, rgba(212, 20, 147, 0.12), transparent 36%),
    linear-gradient(225deg, rgba(212, 20, 147, 0.08), transparent 40%),
    linear-gradient(rgba(212, 20, 147, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 20, 147, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #0b1017 0%, #111721 42%, #0b1017 100%);
  background-size: auto, auto, 52px 52px, 52px 52px, auto;
}

main {
  width: min(1120px, 100%);
  padding: 28px 20px 56px;
}

h1 {
  max-width: 100%;
  font-weight: 950;
  letter-spacing: 0;
}

h2,
h3 {
  letter-spacing: 0;
}

.topbar {
  min-height: 76px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2 + 20px));
  background: color-mix(in srgb, var(--glass-strong) 92%, transparent);
  border-bottom-color: var(--premium-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

:root[data-theme="night"] .topbar {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

nav {
  gap: 10px;
}

.nav-link,
.nav-profile {
  min-height: 42px;
}

.nav-link {
  padding: 0 13px;
  color: var(--soft-ink);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.nav-link:hover {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-2));
}

.nav-profile {
  padding: 5px 12px 5px 5px;
  background: var(--glass-bg);
  border-color: var(--premium-border);
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 180px;
  height: 56px;
}

.panel,
.post,
.message-panel,
.stat,
.announcement,
.legal,
.activity-panel,
.form-section,
.paid-settings,
.download-panel,
.unlock-panel,
.bulk-actions,
.access-choice-grid form {
  border-color: var(--premium-border);
  background: var(--glass-bg);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(16px);
}

.panel,
.message-panel,
.legal {
  padding: 26px;
  border-radius: 22px;
}

.post,
.announcement {
  border-radius: 22px;
}

input,
textarea,
select {
  min-height: 50px;
  border-radius: 16px;
  border-color: var(--premium-border);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
}

textarea {
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

button,
.button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

button:hover,
.button:hover {
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 25%, transparent);
}

.secondary,
button.secondary,
.button.secondary,
a.button.secondary {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.outline-button {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: none;
}

.theme-toggle,
.install-app-button {
  border-color: var(--premium-border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.join-gate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 128px);
  gap: 28px;
  padding: 54px 18px 34px;
  border-radius: 28px;
}

.join-gate::before,
.join-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.join-gate::before {
  background:
    radial-gradient(circle at 50% 20%, rgba(164, 3, 111, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.42), rgba(8, 10, 16, 0.72));
}

.join-gate::after {
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.12) 0%, rgba(8, 10, 16, 0.08) 58%, var(--paper) 98%),
    linear-gradient(90deg, rgba(164, 3, 111, 0.18), transparent 36%, rgba(164, 3, 111, 0.12));
}

.join-bg,
.join-bg span {
  position: absolute;
  z-index: -2;
}

.join-bg {
  inset: -24px;
}

.join-bg span {
  inset: 0;
  background-position: center 34%;
  background-size: cover;
  filter: saturate(0.98) contrast(0.98);
  opacity: 0;
  transform: scale(1.08);
  animation: joinBgFade 20s infinite;
}

.join-bg span:nth-child(2) { animation-delay: 4s; }
.join-bg span:nth-child(3) { animation-delay: 8s; }
.join-bg span:nth-child(4) { animation-delay: 12s; }
.join-bg span:nth-child(5) { animation-delay: 16s; }

@keyframes joinBgFade {
  0% { opacity: 0; transform: scale(1.08); }
  5% { opacity: 0.78; }
  20% { opacity: 0.78; }
  25% { opacity: 0; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.16); }
}

.join-logo-wrap {
  position: relative;
  z-index: 1;
  min-height: 150px;
  width: min(100%, 620px);
}

.join-logo {
  width: min(68vw, 440px);
  max-height: 178px;
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.36));
}

.join-copy {
  position: relative;
  z-index: 1;
  gap: 18px;
  padding: 0 14px;
  width: min(100%, 620px);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}

.gate p {
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: clamp(18px, 2.4vw, 22px);
}

.join-actions {
  width: min(100%, 700px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.join-actions .button {
  min-width: 0;
  min-height: 54px;
}

.join-actions .button.secondary {
  grid-column: auto;
}

.join-actions-login {
  width: min(100%, 300px);
  grid-template-columns: 1fr;
}

.join-copy-login-only {
  width: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.join-copy-login-only .join-actions {
  margin-top: 0;
}

.site-footer {
  width: min(1120px, calc(100% - 40px));
  padding: 24px 0 28px;
  border-top-color: var(--premium-border);
}

.feed-header {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom-color: var(--premium-border);
}

.feed-title {
  font-size: clamp(34px, 5vw, 52px);
}

.announcement {
  padding: 22px 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), var(--glass-bg));
}

.post-body {
  padding: 28px;
}

.post-media {
  overflow: hidden;
  border-radius: 22px 22px 0 0;
}

.post-action-row {
  gap: 14px;
}

.icon-button,
.emoji-button {
  border-color: var(--premium-border);
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}

.comments,
.comment,
.message,
.admin-reply-form {
  border-color: var(--premium-border);
}

.chat-thread {
  gap: 14px;
}

.chat-bubble {
  border-radius: 20px;
  padding: 16px 18px;
  background: var(--glass-bg);
  box-shadow: var(--shadow-soft);
}

.chat-bubble.admin {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.chat-form {
  border-radius: 22px;
}

.auth {
  padding: 28px 0;
}

.auth .panel {
  width: min(460px, 100%);
}

.auth.access-choice .panel {
  width: min(980px, 100%);
}

.access-choice-grid {
  gap: 20px;
}

.access-choice-grid form {
  padding: 20px;
}

.admin-grid {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
}

.stats-grid {
  gap: 14px;
}

.compact-stats {
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  padding: 20px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--glass-bg)), var(--glass-bg));
}

.compact-stats .stat {
  min-height: 66px;
  padding: 13px 14px;
  border-radius: 18px;
}

.stat strong {
  font-size: 34px;
}

.compact-stats .stat strong {
  font-size: 27px;
}

.dashboard-task-grid {
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-task-grid .button {
  min-height: 54px;
}

.compact-filters {
  padding: 18px;
  border-radius: 20px;
}

.admin-post {
  gap: 18px;
  padding: 18px 0;
  border-color: var(--premium-border);
}

.admin-post-link {
  gap: 18px;
  padding: 8px;
  margin: -8px;
  transition: background 0.14s ease;
}

.admin-post-link:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.media-preview {
  width: 132px;
  height: 94px;
  flex-basis: 132px;
  border-radius: 16px;
}

.post-metrics span,
.status-pill,
.member-badge,
.price-pill,
.shop-price {
  letter-spacing: 0;
}

.empty {
  padding: 50px 24px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-2)), var(--glass-bg));
}

.pagination a {
  min-width: 42px;
  min-height: 42px;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 42px;
  }

  .topbar {
    position: sticky;
    min-height: auto;
    padding: 12px;
    align-items: flex-start;
    border-radius: 0 0 22px 22px;
  }

  .brand-logo {
    width: 136px;
    height: 42px;
  }

  nav {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }

  .nav-link {
    min-height: 40px;
    padding: 0 11px;
  }

  .nav-profile {
    order: 10;
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(38px, 13vw, 60px);
    line-height: 0.98;
  }

  .panel,
  .message-panel,
  .legal {
    padding: 20px;
    border-radius: 20px;
  }

  .join-gate {
    width: 100%;
    min-height: 100svh;
    padding: 56px max(16px, env(safe-area-inset-left)) 104px max(16px, env(safe-area-inset-right));
    gap: 22px;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .join-bg span {
    background-position: center 28%;
    background-size: cover;
    filter: saturate(0.98) contrast(0.98);
    transform: scale(1.08);
  }

  .join-logo-wrap {
    min-height: 116px;
  }

  .join-logo {
    width: min(74vw, 320px);
    max-height: 122px;
  }

  .join-copy {
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    width: min(100%, 620px);
    margin-left: auto;
    margin-right: auto;
  }

  .gate p {
    font-size: 17px;
    line-height: 1.5;
  }

  .join-actions {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 11px;
  }

  .join-actions .button {
    min-height: 52px;
  }

  .feed-header {
    gap: 14px;
  }

  .feed-header .row-actions,
  .feed-header .button {
    width: 100%;
  }

  .stats-grid,
  .compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-stats .stat {
    min-height: 76px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .dashboard-task-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-task-grid .button {
    min-height: 54px;
  }

  .admin-grid,
  .single-admin-grid,
  .detail-grid,
  .filter-grid,
  .compact-filters .filter-grid,
  .bulk-actions,
  .post-actions,
  .schedule-fields,
  .shop-actions,
  .access-choice-grid {
    grid-template-columns: 1fr;
  }

  .admin-post {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-post-link {
    flex-direction: row;
    align-items: center;
  }

  .media-preview {
    width: 104px;
    height: 86px;
    flex-basis: 104px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .row-actions form,
  .row-actions .button,
  .row-actions button {
    width: 100%;
  }

  .post-body {
    padding: 20px;
  }

  .post-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .post-action-row .inline-form,
  .post-action-row button,
  .comment-toggle {
    width: 100%;
  }

  .icon-button {
    width: 52px;
    justify-self: start;
  }

  .chat-form {
    position: static;
    box-shadow: var(--premium-shadow);
  }

  .site-footer {
    width: min(100% - 24px, 1120px);
    padding: 20px 0 24px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .site-footer nav {
    width: 100%;
    justify-content: center;
  }
}

/* Community features ----------------------------------------------------- */
.community-shell { width: min(1000px, 100%); margin-inline: auto; display: grid; gap: 38px; }
.community-shell section > h2, .section-title h2 { font-size: 24px; }
.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.community-card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.story-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.story-card { min-width: min(310px, 82vw); scroll-snap-align: start; }
.story-dot { display: block; width: 11px; height: 11px; margin-bottom: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.story-card p { margin-bottom: 12px; }
.story-card time, .event-card time, .notification-item time { color: var(--muted); font-size: 11px; }
.event-list, .notification-list, .request-list { display: grid; gap: 10px; }
.event-card time { color: var(--accent); font-weight: 800; }
.event-card h3 { margin: 8px 0 5px; }
.event-card p { margin: 0; color: var(--muted); }
.poll-card { display: grid; gap: 10px; margin-bottom: 14px; }
.poll-option { grid-template-columns: auto 1fr auto; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.poll-option input { width: 18px; min-height: 18px; }
.poll-option small { color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-item.unread { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.notification-item p { margin: 5px 0; color: var(--muted); }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 14px; }
.saved-card { overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.saved-card .media-preview { width: 100%; height: 120px; }
.saved-card strong { display: block; padding: 12px; }
.request-panel { padding: clamp(20px,4vw,32px); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-soft); }
.request-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.request-row p { margin: 4px 0 0; color: var(--muted); }
.bookmark-button.active { color: #fff; background: var(--accent); }
.bookmark-button { min-width: 88px; }
.bookmark-button.active::before { content: "✓"; margin-right: 6px; }
.tier-locked .post-body { text-align: center; }
@media(max-width:760px){
  .community-shell { gap: 28px; }
  .community-grid { grid-template-columns: 1fr; }
  .nav-community-link { font-size: 10px !important; }
  .request-row { grid-template-columns: 1fr; }
  .saved-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Final utility states --------------------------------------------------- */
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}
.nav-link.is-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.friendly-error {
  width: min(680px, 100%);
  min-height: 430px;
  margin: 5vh auto;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(30px, 7vw, 70px);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.friendly-error .eyebrow { font-size: 13px; }
.friendly-error h1 { margin-block: 8px 16px; font-size: clamp(42px, 8vw, 74px); }
.friendly-error p:not(.eyebrow) { max-width: 480px; color: var(--muted); font-size: 17px; }
.friendly-error .actions { margin-top: 12px; }
.likers-list { margin-top: 10px; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.liker-row { padding: 10px 12px; border-radius: 12px; }
.liker-row + .liker-row { border-top: 1px solid var(--line); }
.inline-edit-details { margin-top: 10px; border-radius: 14px; background: var(--surface-2); }
.inline-edit-details summary { padding: 10px 12px; color: var(--accent); font-weight: 750; cursor: pointer; }
.inline-edit-details[open] { padding-bottom: 12px; }
.upload-preview-grid { padding: 12px; border-radius: 18px; background: var(--surface-2); }
.upload-preview-item { border: 0; box-shadow: var(--shadow-soft); }
.activity-panel { border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.message { margin: 8px 0; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--surface-2); }
.message.unread { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.setup-check .admin-post, .panel > .admin-post { box-shadow: none; }

@media (max-width: 760px) {
  .topbar nav .nav-link.is-active { color: var(--accent); background: var(--accent-soft); }
  .topbar nav .nav-link.is-active::before { position: absolute; top: 5px; width: 4px; height: 4px; }
  .topbar nav .nav-link { position: relative; }
  .friendly-error { min-height: 330px; margin: 2vh auto; border-radius: 24px; }
}

/* Mobile layout correction ------------------------------------------------ */
@media (max-width: 760px) {
  body:not(.landing-page) { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body:not(.landing-page) main { width: 100%; padding: 22px 12px 42px; }
  .topbar { position: sticky; top: 0; min-height: 58px; }
  .topbar nav {
    position: fixed !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    min-height: 58px;
    margin: 0 !important;
    transform: none !important;
  }
  .topbar nav .nav-link {
    flex: 1 1 0;
    justify-content: center;
    width: auto !important;
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
  }
  main > .feed-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 62px;
    margin: 0 0 16px;
    padding: 0 2px 14px;
  }
  main > .feed-header > div:first-child { width: auto; }
  main > .feed-header > .row-actions { display: none; }
  main > .feed-header .feed-title { font-size: 34px; line-height: 1; }
  .feed { gap: 16px; }
  .post { border-radius: 17px; }
  .post-body { padding: 17px; }
  .post-title { font-size: 24px; }
  .announcement { margin-bottom: 16px; padding: 16px 17px; border-radius: 17px; }
  .site-footer { padding-bottom: 22px; }
  .theme-toggle { bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
  .install-app-button { bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 380px) {
  .topbar nav .nav-link { padding-inline: 5px; font-size: 11px; }
  .nav-badge { min-width: 17px; height: 17px; padding-inline: 4px; }
}

/* End-to-end surface polish --------------------------------------------- */
.unlock-panel, .download-panel, .paid-settings {
  border: 0;
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
.shop-card-head { align-items: center; }
.shop-price { min-height: 48px; padding-inline: 21px; font-size: 17px; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 22%, transparent); }
.shop-teaser { font-size: 16px; line-height: 1.7; }
.shop-actions .button { min-height: 50px; }
.locked-media { min-height: 390px; }
.locked-overlay { min-height: 48px; padding-inline: 24px; background: rgba(17,13,15,.68); box-shadow: 0 12px 32px rgba(0,0,0,.22); }

.profile-form { width: min(560px, 100%) !important; }
.profile-form h1 { margin-bottom: 4px; font-size: clamp(38px, 6vw, 58px); }
.profile-preview { padding: 16px; border-radius: 20px; background: var(--surface-2); }
.profile-avatar { width: 96px; height: 96px; flex-basis: 96px; border: 4px solid var(--surface); box-shadow: var(--shadow-soft); }
.profile-form > button { margin-top: 8px; min-height: 52px; }

.comments { margin-top: 26px; padding-top: 24px; }
.comments > h3 { margin-bottom: 18px; font-size: 20px; }
.comment { margin-bottom: 10px; padding: 16px 18px; border: 1px solid var(--line) !important; border-radius: 18px; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.comment-head strong { font-size: 14px; }
.comment-head time { color: var(--muted); font-size: 11px; }
.comment p { color: var(--soft-ink); }
.comment-replies { margin: 13px 0 0 18px; padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.comment-reply { padding: 11px 13px; border-radius: 14px; background: var(--surface); }
.comment-composer, .admin-reply-form { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--surface); }

.post-detail-panel { border: 0; border-radius: 28px; padding: 0; box-shadow: var(--shadow); }
.post-detail-panel > .feed-header { margin: 0; padding: 26px 28px; }
.post-detail-panel .edit-preview { background: #0b0a09; }
.post-detail-panel .admin-post-body { padding: 28px; }
.post-detail-panel .post-media { border-radius: 0; }

.stats-grid { gap: 14px; }
.stat { position: relative; overflow: hidden; min-height: 126px; padding: 22px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.stat::after { content: ""; position: absolute; right: -25px; bottom: -35px; width: 95px; height: 95px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.stat strong { margin-top: 8px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.05em; }
.stat span { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.admin-grid { gap: 20px; }
.admin-grid > .panel { border: 0; box-shadow: var(--shadow-soft); }
.admin-post { margin: 7px 0; padding: 13px; border: 0; border-radius: 16px; background: var(--surface-2); transition: transform .18s, background .18s; }
.admin-post:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); transform: translateY(-1px); }
.admin-post-link { border-radius: 12px; }
.filters, .admin-tools, .bulk-actions { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.status-pill { min-height: 27px; padding-inline: 10px; border-radius: 999px; }
.form-section { border: 0; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }

.notification-prompt { border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); border-radius: 24px; background: color-mix(in srgb, var(--surface) 91%, transparent); box-shadow: 0 24px 70px rgba(30,20,17,.18); backdrop-filter: blur(24px) saturate(150%); }
.notification-prompt-close { border-radius: 50%; background: var(--surface-2); }
.notification-chat-nudge { border: 0; border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); box-shadow: var(--shadow-soft); }
.install-app-button { border-radius: 16px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(18px); }

.empty { position: relative; min-height: 220px; display: grid; place-items: center; padding: 70px 28px 28px; border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 24px; background: color-mix(in srgb, var(--accent) 3%, var(--surface)); text-align: center; }
.empty::before { content: "✦"; position: absolute; top: 30px; color: var(--accent); font-size: 28px; }
.notice { padding: 15px 17px; border: 0; border-left: 4px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow-soft); }

.legal { max-width: 760px; border: 0; border-radius: 28px; padding: clamp(28px, 6vw, 58px); box-shadow: var(--shadow); }
.legal h1 { margin-bottom: 10px; }
.legal h2 { margin: 34px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 21px; }
.legal p { font-size: 16px; line-height: 1.78; }
.auth .panel { border: 0; border-radius: 26px; box-shadow: var(--shadow); }
.auth .panel h1 { font-size: clamp(38px, 6vw, 58px); }
.pagination a { min-width: 42px; min-height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-soft); }

@media (max-width: 760px) {
  .shop-actions { grid-template-columns: 1fr; }
  .locked-media { min-height: 300px; }
  .comments { margin-top: 20px; }
  .comment { padding: 14px; }
  .comment-head { align-items: flex-start; }
  .comment-replies { margin-left: 8px; }
  .post-detail-panel > .feed-header, .post-detail-panel .admin-post-body { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 108px; padding: 17px; }
  .admin-grid { grid-template-columns: 1fr; }
  .legal { padding: 28px 20px; }
  .notification-prompt { border-radius: 20px; }
}

@media (max-width: 520px) {
  body {
    background-size: auto, auto, 42px 42px, 42px 42px, auto;
  }

  main {
    width: min(100% - 16px, 1120px);
    padding-top: 16px;
  }

  .topbar {
    gap: 8px;
  }

  nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .nav-profile {
    flex: 0 0 100%;
  }

  button,
  .button {
    min-height: 50px;
    padding: 0 18px;
  }

  .panel,
  .message-panel,
  .legal {
    padding: 18px;
    border-radius: 18px;
  }

  .join-gate {
    padding-top: 38px;
  }

  .join-logo {
    width: min(74vw, 280px);
    max-height: 106px;
  }

  .compact-stats {
    gap: 9px;
  }

  .compact-stats .stat {
    min-height: 82px;
    padding: 13px;
  }

  .compact-stats .stat strong {
    font-size: 28px;
  }

  .dashboard-task-grid {
    gap: 10px;
  }

  .admin-post-link {
    flex-direction: column;
    align-items: stretch;
  }

  .media-preview {
    width: 100%;
    height: 170px;
    flex-basis: auto;
  }

  .post-media video,
  .post-media iframe {
    min-height: 220px;
  }

  .post-body {
    padding: 18px;
  }

  .chat-bubble {
    max-width: 100%;
    padding: 15px;
  }

  .theme-toggle {
    opacity: 0.72;
  }

  .theme-toggle:hover {
    opacity: 1;
  }
}

/* Keep floating app controls clear of footer links on small screens. */
.theme-toggle,
.install-app-button,
.install-app-button-wide {
  right: 14px;
  width: 50px;
  min-height: 50px;
  height: 50px;
  padding: 7px;
  border: 1px solid var(--premium-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  opacity: 0.88;
}

.theme-toggle {
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 7px;
  grid-template-columns: 1fr;
  place-items: center;
  overflow: visible;
}

.install-app-button,
.install-app-button-wide {
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  max-width: none;
  font-size: 0;
  line-height: 0;
}

.theme-toggle:hover,
.install-app-button:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  opacity: 1;
}

.theme-toggle img,
.install-app-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.theme-toggle-thumb,
.theme-toggle-option {
  display: none;
}

.notification-prompt {
  position: fixed;
  right: 78px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 21;
  width: min(360px, calc(100vw - 110px));
  padding: 20px;
  border: 1px solid var(--premium-border);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(18px);
}

.notification-prompt h2 {
  margin-bottom: 8px;
}

.notification-prompt p:not(.eyebrow) {
  margin-bottom: 14px;
  color: var(--soft-ink);
}

.notification-prompt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
}

.notification-prompt-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.notification-chat-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--premium-border);
  border-radius: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), var(--glass-bg));
  box-shadow: var(--shadow-soft);
}

.notification-chat-nudge p {
  margin: 4px 0 0;
  color: var(--muted);
}

.notification-chat-nudge button {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .theme-toggle,
  .install-app-button,
  .install-app-button-wide {
    right: 12px;
    width: 46px;
    min-height: 46px;
    height: 46px;
    padding: 7px;
  }

  .theme-toggle {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .install-app-button {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  .install-app-button-wide {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .notification-prompt {
    left: 12px;
    right: 70px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    padding: 17px;
  }

  .notification-chat-nudge {
    align-items: stretch;
    flex-direction: column;
  }

.notification-chat-nudge button {
    width: 100%;
  }
}

/* 2026 editorial refresh -------------------------------------------------- */
:root {
  --ink: #191716;
  --soft-ink: #3e3936;
  --muted: #79716c;
  --line: #e9e3df;
  --paper: #f7f4f1;
  --surface: #fffdfb;
  --surface-2: #f1ece8;
  --accent: #b10f69;
  --accent-dark: #87064e;
  --accent-soft: #f8e8f0;
  --secondary-button: #211e1c;
  --secondary-button-hover: #3a3431;
  --shadow: 0 24px 70px rgba(48, 32, 26, .10);
  --shadow-soft: 0 8px 30px rgba(48, 32, 26, .07);
}

:root[data-theme="night"] {
  --ink: #f8f4f1;
  --soft-ink: #d8d0ca;
  --muted: #a79d96;
  --line: #322d2a;
  --paper: #12100f;
  --surface: #1b1816;
  --surface-2: #24201e;
  --accent: #ec4fa8;
  --accent-dark: #ff72bf;
  --accent-soft: #37182a;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 35rem),
    var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.01em;
}
:root[data-theme="night"] body {
  background: radial-gradient(circle at 8% -10%, rgba(236,79,168,.13), transparent 35rem), var(--paper);
}
main { width: min(1160px, 100%); padding: 42px 28px 72px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 650; letter-spacing: -.055em; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 650; letter-spacing: -.035em; }
p { line-height: 1.65; }

.topbar {
  min-height: 78px;
  padding-inline: max(28px, calc((100vw - 1160px) / 2 + 28px));
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(24px) saturate(140%);
}
.brand-logo { width: 142px; height: 48px; }
nav { gap: 4px; }
.nav-link { min-height: 42px; padding-inline: 14px; font-weight: 700; transition: background .2s, color .2s, transform .2s; }
.nav-link:hover { transform: translateY(-1px); }
.nav-profile { border: 0; background: var(--surface-2); padding: 5px 12px 5px 5px; }
.nav-change-link { font-weight: 750; }

.panel, .post, .message-panel, .stat, .announcement, .legal {
  border-color: color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}
.panel, .message-panel { padding: clamp(22px, 4vw, 34px); }
.feed { gap: 32px; max-width: 900px; margin-inline: auto; }
.feed-header { margin-bottom: 30px; padding-bottom: 24px; }
.feed-title { color: var(--ink); font-weight: 620; }
.announcement { max-width: 900px; margin: 0 auto 28px; padding: 22px 26px; }
.post { border: 0; border-radius: 26px; box-shadow: var(--shadow); background: var(--surface); }
.post-media { background: #0b0a09; }
.post-media img, .gallery-slide img { max-height: 880px; }
.post-body { padding: clamp(22px, 4vw, 34px); }
.post-title { font-size: clamp(25px, 4vw, 36px); letter-spacing: -.04em; }
.post-copy { color: var(--soft-ink); font-size: 16px; line-height: 1.7; }
.gallery-arrow { width: 48px; height: 48px; background: rgba(20,17,15,.58); }

input, textarea, select {
  min-height: 48px;
  border-radius: 14px;
  border-color: transparent;
  background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus, select:focus { background: var(--surface); }
button, .button {
  min-height: 46px;
  padding-inline: 21px;
  font-weight: 750;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: transform .2s, box-shadow .2s, background .2s;
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 24%, transparent); }
.secondary, button.secondary, .button.secondary, a.button.secondary { box-shadow: none; }
.site-footer { width: min(1104px, calc(100% - 56px)); padding-block: 28px; }

.theme-toggle, .install-app-button { box-shadow: var(--shadow-soft); border-color: var(--line); }
.theme-toggle { width: 46px; height: 46px; min-height: 46px; padding: 8px; }
.theme-toggle img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 760px) {
  body:not(.landing-page) { padding-bottom: 72px; }
  main { padding: 28px 14px 48px; }
  .topbar { min-height: 64px; padding: 0 16px; }
  .brand-logo { width: 112px; height: 40px; }
  .topbar nav {
    position: fixed;
    z-index: 15;
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 60px;
    justify-content: space-around;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 18px 50px rgba(20,14,12,.18);
    backdrop-filter: blur(24px) saturate(150%);
  }
  .topbar nav .nav-link { min-height: 44px; padding: 0 11px; font-size: 12px; }
  .nav-profile { display: none; }
  .nav-signout { display: none !important; }
  .feed { gap: 22px; }
  .feed-header { align-items: flex-end; margin-bottom: 20px; }
  .post { border-radius: 20px; }
  .post-body { padding: 20px; }
  .panel, .message-panel { border-radius: 20px; padding: 20px; }
  .site-footer { width: calc(100% - 28px); padding-bottom: 18px; }
  .theme-toggle { right: 12px; bottom: 84px; }
  .install-app-button { right: 68px; bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Modern messenger ------------------------------------------------------- */
.chat-shell {
  width: min(860px, 100%);
  min-height: min(780px, calc(100vh - 190px));
  margin-inline: auto;
  overflow: clip;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}
.chat-shell > .feed-header {
  position: sticky;
  top: 78px;
  z-index: 4;
  min-height: 104px;
  margin: 0;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
}
.chat-shell > .feed-header > div { position: relative; padding-left: 54px; }
.chat-shell > .feed-header > div::before {
  content: "L";
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateY(-50%);
}
.chat-shell > .feed-header .eyebrow { margin-bottom: 3px; font-size: 10px; }
.chat-shell > .feed-header h1 { margin: 0; font-size: clamp(23px, 4vw, 31px); letter-spacing: -.04em; }
.chat-shell > .feed-header .muted { margin: 4px 0 0; font-size: 12px; }
.chat-shell > .feed-header .button { min-height: 38px; padding-inline: 15px; font-size: 13px; }

.chat-thread {
  min-height: 420px;
  margin: 0;
  padding: 34px 28px 22px;
  gap: 10px;
  background:
    radial-gradient(circle at 20% 0, color-mix(in srgb, var(--accent) 5%, transparent), transparent 26rem),
    color-mix(in srgb, var(--paper) 55%, var(--surface));
}
.chat-thread > .muted { place-self: center; margin: auto; text-align: center; }
.chat-bubble {
  position: relative;
  max-width: min(610px, 78%);
  padding: 11px 15px 9px;
  border: 0;
  border-radius: 19px;
  box-shadow: 0 5px 18px rgba(35, 24, 19, .06);
}
.chat-bubble.admin {
  justify-self: start;
  border-bottom-left-radius: 6px;
  background: var(--surface);
}
.chat-bubble.member {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent-dark) 88%, #000));
  color: #fff;
}
.chat-bubble-head strong { font-size: 11px; font-weight: 750; letter-spacing: .02em; opacity: .72; }
.chat-bubble p { margin: 3px 0 4px; color: inherit; font-size: 15px; line-height: 1.48; overflow-wrap: anywhere; }
.chat-bubble time { color: inherit; font-size: 10px; line-height: 1.3; text-align: right; opacity: .56; }
.chat-bubble.member .text-button { color: #fff; opacity: .72; }
.chat-image { margin: 7px 0; border-radius: 13px; }

.chat-form {
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 12px;
  margin: 0;
  padding: 15px 18px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 -12px 30px rgba(35, 24, 19, .05);
  backdrop-filter: blur(22px) saturate(140%);
}
.chat-form .emoji-toolbar { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; padding: 1px; scrollbar-width: none; }
.chat-form .emoji-toolbar::-webkit-scrollbar { display: none; }
.chat-form .emoji-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}
.chat-form textarea {
  min-height: 50px;
  max-height: 130px;
  padding: 14px 16px;
  border-radius: 18px;
  resize: none;
}
.chat-form > button { align-self: end; min-width: 82px; min-height: 50px; }
.chat-form > label { grid-column: 1 / -1; }
.notification-chat-nudge { margin: 16px 20px 0; }

@media (max-width: 760px) {
  .chat-shell { min-height: calc(100dvh - 154px); border: 0; border-radius: 22px; }
  .chat-shell > .feed-header { top: 64px; min-height: 78px; padding: 13px 15px; }
  .chat-shell > .feed-header > div { padding-left: 46px; }
  .chat-shell > .feed-header > div::before { width: 36px; height: 36px; }
  .chat-shell > .feed-header h1 { font-size: 21px; }
  .chat-shell > .feed-header .eyebrow { display: none; }
  .chat-shell > .feed-header .button { min-height: 34px; padding-inline: 12px; font-size: 11px; }
  .chat-thread { min-height: 52dvh; padding: 24px 13px 18px; }
  .chat-bubble { max-width: 86%; padding: 10px 13px 8px; }
  .chat-form { padding: 11px 11px 14px; }
  .chat-form textarea { min-height: 48px; }
  .chat-form > button { min-width: 68px; min-height: 48px; padding-inline: 14px; }
  .notification-chat-nudge { margin-inline: 12px; }
}

/* Must remain last: mobile cascade guard */
@media (max-width: 760px) {
  body:not(.landing-page) { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body:not(.landing-page) main { width: 100%; padding: 22px 12px 42px; }
  .topbar nav {
    position: fixed !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    margin: 0 !important;
    transform: none !important;
  }
  .topbar nav .nav-link { flex: 1 1 0; justify-content: center; width: auto !important; min-width: 0; }
  main > .feed-header { display: flex; flex-direction: row; align-items: center; min-height: 62px; margin: 0 0 16px; padding: 0 2px 14px; }
  main > .feed-header > div:first-child { width: auto; }
  main > .feed-header > .row-actions { display: none !important; }
  main > .feed-header .feed-title { font-size: 34px; line-height: 1; }
  .feed { gap: 16px; }
  .theme-toggle, .install-app-button { bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Mobile viewport docks — keep this final in the cascade */
@media (max-width: 760px) {
  .topbar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    filter: none !important;
    contain: none !important;
    overflow: visible !important;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
  }
  .topbar nav {
    position: fixed !important;
    inset: auto 8px calc(8px + env(safe-area-inset-bottom, 0px)) 8px !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: auto !important;
    min-height: 60px;
    padding: 7px !important;
    margin: 0 !important;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 23px;
    background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .28) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
  }
  .topbar nav .nav-link {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    padding: 0 4px !important;
    justify-content: center;
    gap: 3px;
    border-radius: 17px;
    font-size: 11px !important;
    line-height: 1;
  }
  .topbar nav .nav-link.is-active::before { top: 4px; }
  .admin-topbar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9px; }
  body:not(.landing-page) { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

  .theme-toggle,
  .install-app-button,
  .install-app-button-wide {
    position: fixed !important;
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
    bottom: auto !important;
    z-index: 1001 !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 7px !important;
    border-radius: 13px !important;
    opacity: .72;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .16) !important;
  }
  .theme-toggle { right: 10px !important; left: auto !important; }
  .install-app-button,
  .install-app-button-wide { right: 54px !important; left: auto !important; }
  .theme-toggle:hover,
  .theme-toggle:focus-visible,
  .install-app-button:hover,
  .install-app-button:focus-visible { opacity: 1; }
  .theme-toggle img,
  .install-app-button img { width: 24px !important; height: 24px !important; object-fit: contain; }
}

@media (display-mode: standalone) and (max-width: 760px) {
  .install-app-button { display: none !important; }
}

/* Feed stories and navigation counters */
.feed-stories { max-width: 900px; margin: 0 auto 22px; padding: 16px 18px 13px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.feed-stories-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.feed-stories-title h2 { margin: 0; font-size: 17px; }
.feed-stories-title a { color: var(--accent); font-size: 12px; font-weight: 800; }
.feed-story-track { display: flex; gap: 17px; overflow-x: auto; padding: 2px 2px 7px; scroll-snap-type: x proximity; scrollbar-width: none; }
.feed-story-track::-webkit-scrollbar { display: none; }
.feed-story { width: 78px; min-width: 78px; display: grid; justify-items: center; gap: 5px; scroll-snap-align: start; text-align: center; }
.feed-story-ring { width: 58px; height: 58px; display: grid; place-items: center; padding: 3px; border-radius: 50%; background: conic-gradient(var(--accent), #f79acb, var(--accent)); }
.feed-story-ring span { width: 100%; height: 100%; display: grid; place-items: center; border: 3px solid var(--surface); border-radius: 50%; background: linear-gradient(145deg,var(--accent),var(--accent-dark)); color: #fff; font-weight: 900; }
.feed-story-ring img { width: 100%; height: 100%; display: block; border: 3px solid var(--surface); border-radius: 50%; object-fit: cover; }
.feed-story strong { width: 100%; overflow: hidden; color: var(--soft-ink); font-size: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.feed-story time { color: var(--muted); font-size: 9px; }
.nav-link { position: relative; }
.nav-link .nav-badge { position: absolute; top: -7px; right: -5px; min-width: 20px; height: 20px; border: 2px solid var(--surface); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.mobile-profile-link { display: none; }
@media (max-width:760px) {
  .feed-stories { margin-bottom: 16px; padding: 13px 12px 10px; border-radius: 18px; }
  .feed-story-track { gap: 12px; }
  .feed-story { width: 68px; min-width: 68px; }
  .feed-story-ring { width: 52px; height: 52px; }
  .topbar nav .nav-link .nav-badge { top: 1px; right: 1px; min-width: 18px; height: 18px; border-width: 2px; }
  .mobile-profile-link {
    position: fixed !important;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 98px;
    z-index: 1002;
    display: grid !important;
    place-items: center;
    width: 38px !important;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 6px 22px rgba(0,0,0,.16);
    overflow: hidden;
  }
  .mobile-profile-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    object-fit: cover;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
  }
}

/* Global notification center */
.notification-center-button {
  position: fixed;
  top: 86px;
  right: 14px;
  z-index: 30;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}
.notification-center-button > span { font-size: 0; }
.notification-center-button > span::before { content: "🔔"; font-size: 18px; }
.notification-center-button b { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border: 2px solid var(--surface); border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; }
.notification-center {
  width: min(460px, calc(100% - 28px));
  max-height: min(680px, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
}
.notification-center::backdrop { background: rgba(8,6,7,.62); backdrop-filter: blur(5px); }
.notification-center-head { display: flex; align-items: center; justify-content: space-between; padding: 21px 22px 17px; border-bottom: 1px solid var(--line); }
.notification-center-head h2, .notification-center-head p { margin: 0; }
.notification-center-head > button { width: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); box-shadow: none; font-size: 22px; }
.notification-center-list { max-height: min(480px, 60dvh); display: grid; gap: 8px; padding: 14px; overflow-y: auto; }
.notification-center-item { display: block; padding: 14px 15px; border-radius: 16px; background: var(--surface-2); }
.notification-center-item.unread { border-left: 4px solid var(--accent); background: var(--accent-soft); }
.notification-center-item p { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.notification-center-item time { color: var(--muted); font-size: 10px; }
.notification-center-empty { min-height: 240px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.notification-center-empty span { color: var(--accent); font-size: 30px; }
.notification-center-actions { padding: 14px; border-top: 1px solid var(--line); }
.notification-center-actions button { width: 100%; }
@media(max-width:760px){
  .notification-center-button { top: calc(10px + env(safe-area-inset-top,0px)); right: 142px; z-index: 1002; width: 38px; min-width: 38px; height: 38px; min-height: 38px; border-radius: 13px; opacity: .82; }
  .notification-center { margin: auto auto calc(82px + env(safe-area-inset-bottom,0px)); border-radius: 24px; }
  .notification-center-list { max-height: 55dvh; }
}

/* Mobile wordmark crop and alignment */
@media (max-width: 760px) {
  .topbar { height: calc(58px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 10px 0 !important; }
  .topbar .brand {
    position: relative;
    align-self: center;
    display: block;
    width: 132px;
    height: 48px;
    overflow: hidden;
  }
  .topbar .brand-logo {
    position: absolute;
    top: -23px;
    left: -25px;
    width: 180px !important;
    max-width: none !important;
    height: 120px !important;
    object-fit: contain;
  }
}

/* Community lifecycle polish */
.story-image { width: calc(100% + 36px); max-width: none; height: 180px; margin: -18px -18px 14px; border-radius: 20px 20px 10px 10px; object-fit: cover; }
.poll-option { position: relative; overflow: hidden; }
.poll-option span { position: relative; z-index: 1; }
.poll-option span i { position: absolute; z-index: -1; left: -12px; top: -12px; bottom: -12px; width: var(--poll-percent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.poll-option.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.poll-closed { opacity: .86; }
.community-manage { margin-top: 22px; }
.community-manage .admin-post { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

@media (max-width: 380px) {
  .install-app-button, .install-app-button-wide { display: none !important; }
  .theme-toggle { right: 8px !important; }
  .notification-center-button { right: 52px !important; }
  .mobile-profile-link { right: 96px !important; }
  .topbar .brand { width: 104px; }
  .topbar .brand-logo { left: -28px; width: 165px !important; height: 110px !important; top: -20px; }
}
.admin-story-preview {
  width: min(100%, 360px);
  max-height: 240px;
  object-fit: cover;
  border-radius: 18px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-label input {
  width: auto;
}

.preview-settings {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
}
.admin-preview-teaser {
  width: 120px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 16px;
  object-fit: cover;
}
.preview-warning {
  margin: 0;
  padding: 13px 15px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.55;
}

/* Creator-first entrance and public preview -------------------------------- */
.join-copy-login-only {
  width: min(560px, calc(100% - 32px));
}
.join-kicker {
  margin: 0 0 18px;
  color: rgba(255,255,255,.84) !important;
  font-size: clamp(13px, 1.5vw, 16px) !important;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.join-actions-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(460px, 100%);
  margin-inline: auto;
}
.join-actions-login .button {
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  font-size: 15px;
}
.join-preview-button,
.join-preview-button:hover {
  border: 1px solid rgba(255,255,255,.48) !important;
  background: rgba(17,12,15,.28) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12) !important;
  backdrop-filter: blur(14px);
}
.join-copy-login-only small {
  display: block;
  margin-top: 17px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  letter-spacing: .03em;
  text-align: center;
}

.preview-page {
  min-height: 100vh;
  background: #0d0a0c;
  color: #fff;
}
.preview-page .topbar,
.preview-page .site-footer,
.preview-page .theme-toggle,
.preview-page .install-app-button { display: none !important; }
.preview-page main {
  width: 100%;
  max-width: none;
  padding: 0 24px 96px;
  background:
    radial-gradient(circle at 15% 8%, rgba(177,15,105,.24), transparent 31rem),
    radial-gradient(circle at 90% 35%, rgba(104,30,74,.2), transparent 30rem),
    #0d0a0c;
}
.preview-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 0 4px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(13,10,12,.7);
  backdrop-filter: blur(22px) saturate(140%);
}
.preview-wordmark {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  letter-spacing: -.04em;
}
.preview-nav .button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 154px;
  min-height: 42px;
  padding-inline: 22px;
  font-size: 13px;
  white-space: nowrap;
}
.preview-hero {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(74px, 11vw, 150px) 0 clamp(54px, 8vw, 100px);
  text-align: center;
}
.preview-hero h1 {
  margin-bottom: 24px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 10vw, 126px);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .9;
}
.preview-hero > p:last-child {
  max-width: 610px;
  margin: 0 auto;
  color: rgba(255,255,255,.62);
  font-size: clamp(16px, 2vw, 20px);
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  width: min(1180px, 100%);
  margin: 0 auto;
}
.preview-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.preview-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1a1418;
}
.preview-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-card.is-blurred .preview-media > img {
  filter: blur(18px) brightness(.58) saturate(.75);
  transform: scale(1.1);
}
.preview-card.is-clear .preview-media > img { filter: none; transform: none; }
.preview-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg,#42152f,#171014); }
.preview-placeholder span { color: rgba(255,255,255,.17); font-family: Georgia,serif; font-size: 120px; }
.preview-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 24px;
  text-align: center;
}
.preview-lock > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(0,0,0,.26); font-size: 18px; backdrop-filter: blur(8px); }
.preview-lock strong { font-size: 15px; }
.preview-lock small { color: rgba(255,255,255,.65); }
.preview-free-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(13,10,12,.56);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.preview-card-copy { padding: 20px 22px 23px; }
.preview-card-copy span { color: #ee62b1; font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.preview-card-copy h2 { margin: 7px 0 0; color: #fff; font-size: 20px; }
.preview-empty { grid-column: 1 / -1; display: grid; justify-items: center; padding: 90px 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 28px; text-align: center; background: rgba(255,255,255,.04); }
.preview-empty > span { color: #ee62b1; font-size: 28px; }
.preview-empty h2 { max-width: 680px; margin: 14px 0 10px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: clamp(32px,5vw,54px); font-weight: 400; line-height: 1.05; }
.preview-empty p { max-width: 610px; margin: 0 0 26px; color: rgba(255,255,255,.64); font-size: 16px; }
.preview-empty .preview-join-button { width: auto !important; min-width: 210px; min-height: 52px; border-radius: 999px; }
.preview-cta { display: grid; justify-items: center; gap: 15px; width: min(760px,100%); margin: clamp(90px,13vw,160px) auto 0; text-align: center; }
.preview-cta h2 { margin: 0 0 12px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: clamp(44px,7vw,82px); font-weight: 400; letter-spacing: -.055em; }
.preview-cta > p:not(.eyebrow) { max-width: 520px; margin: -5px 0 10px; color: rgba(255,255,255,.62); font-size: 17px; }
.preview-cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.preview-cta .button { width: auto !important; min-width: 210px; min-height: 54px; border-radius: 999px; }
.preview-login-secondary,
.preview-login-secondary:hover { border: 1px solid rgba(255,255,255,.28) !important; background: transparent !important; color: #fff !important; box-shadow: none !important; }
.preview-cta > a:last-child { color: rgba(255,255,255,.55); font-size: 12px; }

@media (max-width: 820px) {
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 560px) {
  .join-actions-login { grid-template-columns: 1fr; }
  .join-actions-login .button { min-height: 52px; }
  .preview-page main { padding-inline: 14px; }
  .preview-nav { min-height: 64px; padding-inline: 2px; }
  .preview-wordmark { flex: 0 0 auto; font-size: 25px; }
  .preview-nav .button { width: auto !important; min-width: 0; min-height: 38px; padding-inline: 15px; font-size: 11px; }
  .preview-hero { padding-top: 72px; }
  .preview-hero h1 { font-size: clamp(52px, 18vw, 82px); }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-card { border-radius: 20px; }
  .preview-empty { padding: 62px 20px; }
  .preview-empty .preview-join-button { width: auto !important; }
  .preview-cta-actions { width: 100%; }
  .preview-cta .button { width: min(100%, 290px) !important; }
}

/* 2026 image-led editorial system ----------------------------------------- */
:root {
  --ink: #211d1b;
  --soft-ink: #4f4843;
  --muted: #817770;
  --line: #d9d0c8;
  --paper: #f4f0ea;
  --surface: #fbf8f3;
  --surface-2: #ebe5de;
  --accent: #a43858;
  --accent-dark: #7c263f;
  --accent-soft: #ead5dc;
  --shadow: 0 32px 90px rgba(60, 42, 35, .12);
  --shadow-soft: 0 12px 38px rgba(60, 42, 35, .08);
  --display: Georgia, "Times New Roman", serif;
  --body: "Satoshi", "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
:root[data-theme="night"] {
  --ink: #f3ede6;
  --soft-ink: #d2c8c0;
  --muted: #9d9188;
  --line: #39312d;
  --paper: #151210;
  --surface: #1c1816;
  --surface-2: #28221f;
  --accent: #c45a78;
  --accent-dark: #e17494;
  --accent-soft: #3a2029;
}

html { background: var(--paper); }
body {
  background:
    radial-gradient(circle at 18% -12%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-feature-settings: "kern", "liga";
  letter-spacing: -.015em;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1200;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

h1, h2, h3, .feed-title, .post-title { font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(3.2rem, 7vw, 6.7rem); line-height: .93; letter-spacing: -.055em; }
h2 { letter-spacing: -.035em; }
p { text-wrap: pretty; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .13em; }

button, .button {
  min-height: 48px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  box-shadow: none;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), background .22s ease, color .22s ease, border-color .22s ease;
}
button:hover, .button:hover { background: var(--accent-dark); box-shadow: none; transform: translateY(-2px); }
button:active, .button:active { transform: translateY(1px) scale(.985); }
.secondary, button.secondary, .button.secondary, a.button.secondary,
.outline-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.secondary:hover, button.secondary:hover, .button.secondary:hover, a.button.secondary:hover,
.outline-button:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

main { width: min(1240px, 100%); padding: clamp(40px, 6vw, 76px) clamp(18px, 4vw, 48px) 110px; }
.topbar {
  min-height: 76px;
  padding-inline: max(24px, calc((100vw - 1240px) / 2 + 48px));
  border-color: var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(18px);
}
.brand-logo { width: 132px; height: 44px; }
.nav-link { border-radius: 0; font-size: 13px; font-weight: 560; }
.nav-link:hover { background: transparent; color: var(--accent); }
.nav-link.is-active { background: transparent; color: var(--ink); }
.nav-link.is-active::after { content: ""; position: absolute; right: 12px; bottom: 4px; left: 12px; height: 1px; background: var(--accent); }

.panel, .message-panel, .stat, .announcement, .legal {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: none;
}
.panel, .message-panel { padding: clamp(24px, 4vw, 44px); }
.feed-header { margin-bottom: 44px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.feed-title { font-size: clamp(3.5rem, 8vw, 7.4rem); line-height: .8; letter-spacing: -.065em; text-transform: none; }

.feed { width: min(980px, 100%); max-width: none; gap: 72px; }
.post {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.post + .post { padding-top: 72px; border-top: 1px solid var(--line); }
.post-media, .post-gallery, .gallery-slide { border-radius: 3px; }
.post-media { overflow: hidden; background: #181411; }
.post-media img, .gallery-slide img { max-height: 980px; transition: transform .75s cubic-bezier(.2,.8,.2,1); }
.post:hover .post-media img { transform: scale(1.018); }
.post-body { padding: 28px 0 0; }
.post-title { max-width: 18ch; font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: .98; }
.post-copy { max-width: 65ch; color: var(--soft-ink); font-size: 16px; line-height: 1.78; }
.post-meta { margin-bottom: 12px; font-variant-numeric: tabular-nums; letter-spacing: .08em; text-transform: uppercase; }
.post-action-row { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.icon-button { border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); }
.comments { border-top-color: var(--line); }

.feed-stories {
  max-width: none;
  margin: -16px 0 58px;
  padding: 0 0 26px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.feed-stories-title h2 { font-family: var(--display); font-size: 24px; font-weight: 400; }
.feed-story-track { gap: 25px; }
.feed-story { width: 86px; min-width: 86px; }
.feed-story-ring { width: 66px; height: 66px; padding: 2px; background: var(--accent); }
.feed-story-ring img, .feed-story-ring span { border-color: var(--paper); }

.community-shell { width: min(1120px, 100%); gap: 76px; }
.community-grid { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 56px; }
.community-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.story-row { gap: 20px; }
.saved-grid { grid-auto-flow: dense; }
.request-panel { padding: 40px 0; border-block: 1px solid var(--line); }

.chat-shell {
  width: min(900px, 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  box-shadow: none;
}
.chat-shell > .feed-header { background: color-mix(in srgb, var(--surface) 96%, transparent); }
.chat-shell > .feed-header > div::before { border-radius: 2px; background: var(--accent); box-shadow: none; }
.chat-thread { background: var(--paper); }
.chat-bubble { border-radius: 14px; box-shadow: none; }
.chat-bubble.admin { border-bottom-left-radius: 2px; }
.chat-bubble.member { border-bottom-right-radius: 2px; background: var(--accent); }
.chat-form { background: var(--surface); box-shadow: none; }

input, textarea, select {
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: transparent; box-shadow: none; }
label { color: var(--soft-ink); font-weight: 580; }
.form-section {
  padding: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.form-section h2 { font-family: var(--display); font-size: 30px; font-weight: 400; }
.preview-settings { background: transparent; }
.preview-warning { border-left-color: var(--accent); background: var(--surface-2); }
.upload-preview-item { border-radius: 2px; }
.edit-panel { max-width: 1180px; margin-inline: auto; }
.edit-panel > form { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); column-gap: 64px; align-items: start; }
.edit-panel > form > h1, .edit-panel > form > input[type="hidden"] { grid-column: 1 / -1; }
.edit-panel > form > .form-section:nth-of-type(1),
.edit-panel > form > .form-section:nth-of-type(2) { grid-column: 1; }
.edit-panel > form > .form-section:nth-of-type(n+3),
.edit-panel > form > .row-actions,
.edit-panel > form > label:not(.check-row),
.edit-panel > form > .schedule-fields { grid-column: 2; }
.edit-panel > form > .form-section:nth-of-type(3) { grid-row: 2 / span 2; }
.edit-panel > form > .form-section:nth-of-type(4) { grid-column: 2; }

.admin-grid { gap: 1px; background: var(--line); }
.admin-grid > .panel { border: 0; border-radius: 0; box-shadow: none; }
.admin-post { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.admin-post:hover { background: var(--accent-soft); transform: none; }
.dashboard-task-grid { gap: 1px; background: var(--line); }
.dashboard-task-grid .button { border-radius: 0; background: var(--surface); color: var(--ink); }
.dashboard-task-grid .button:hover { background: var(--accent); color: #fff; }

.site-footer {
  width: min(1144px, calc(100% - 48px));
  padding: 42px 0 56px;
  border-top: 1px solid var(--line);
}
.site-footer nav { gap: 22px; }
.site-footer a { color: var(--muted); font-weight: 560; }
.site-footer a:hover { color: var(--accent); }

/* Entrance */
.landing-page { overflow-x: hidden; background: #11100f; }
.landing-page main { width: 100%; max-width: none; padding: 0; }
.join-gate { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); padding: 0; background: #11100f; }
.join-gate::before, .join-gate::after { display: none; }
.join-bg { position: relative; grid-column: 2; grid-row: 1; min-height: 100dvh; overflow: hidden; }
.join-bg::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(17,16,15,.32), transparent 24%), linear-gradient(0deg, rgba(17,16,15,.12), transparent 30%); }
.join-bg span { filter: saturate(.62) sepia(.18) contrast(1.06); }
.join-editorial { grid-column: 1; grid-row: 1; z-index: 3; display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; padding: clamp(28px, 4vw, 58px); }
.join-logo-wrap { align-self: start; min-height: 0; justify-content: start; }
.join-logo { width: 158px; height: 74px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.join-copy-login-only { align-self: center; width: min(650px, 100%); margin: 0; padding-bottom: 9vh; text-align: left; }
.join-copy-login-only h1 { max-width: 9ch; margin: 0 0 28px; color: #f2e9df; font-size: clamp(4.3rem, 7vw, 8.3rem); }
.join-intro { max-width: 46ch !important; margin-bottom: 34px !important; color: rgba(242,233,223,.72) !important; font-size: clamp(16px, 1.5vw, 20px) !important; line-height: 1.55 !important; }
.join-actions-login { width: min(520px, 100%); margin: 0; }
.join-actions-login .button { min-height: 58px; border-radius: 0; }
.join-copy-login-only small { text-align: left; }

/* Public preview */
.preview-page { background: #11100f; }
.preview-page main { padding-inline: clamp(20px, 4vw, 56px); background: radial-gradient(circle at 88% 6%, rgba(164,56,88,.13), transparent 30rem), #11100f; }
.preview-nav { width: min(1320px, 100%); min-height: 86px; border-color: rgba(242,233,223,.2); }
.preview-wordmark { font-size: 42px; }
.preview-hero { width: min(1320px, 100%); margin-inline: auto; padding: clamp(72px, 10vw, 150px) 0 clamp(66px, 8vw, 110px); text-align: left; }
.preview-hero h1 { max-width: 10ch; font-size: clamp(5.2rem, 10vw, 10rem); }
.preview-hero > p:last-child { max-width: 52ch; margin: 0; }
.preview-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(12px, 2vw, 26px); width: min(1320px, 100%); align-items: start; }
.preview-card { grid-column: span 5; border-radius: 3px; }
.preview-card:nth-child(4n+1), .preview-card:nth-child(4n+4) { grid-column: span 7; }
.preview-card:nth-child(3n+2) { margin-top: clamp(30px, 7vw, 100px); }
.preview-media { aspect-ratio: 4 / 5; }
.preview-card:nth-child(4n+1) .preview-media { aspect-ratio: 6 / 7; }
.preview-card-copy { padding: 20px 0 34px; }
.preview-card-copy h2 { font-family: var(--display); font-size: clamp(25px, 3vw, 38px); font-weight: 400; }
.preview-free-badge { border-radius: 2px; }
.preview-empty { border-radius: 3px; }
.preview-cta { width: min(1040px, 100%); margin-top: clamp(120px, 18vw, 230px); padding-block: 80px; border-block: 1px solid rgba(242,233,223,.18); }
.preview-cta h2 { max-width: 12ch; }

@media (max-width: 900px) {
  .edit-panel > form { grid-template-columns: 1fr; }
  .edit-panel > form > *, .edit-panel > form > .form-section:nth-of-type(n) { grid-column: 1; grid-row: auto; }
  .join-gate { grid-template-columns: 1fr; }
  .join-bg { position: absolute; inset: 0; min-height: 100dvh; opacity: .5; }
  .join-bg::after { background: linear-gradient(90deg, rgba(17,16,15,.95), rgba(17,16,15,.58) 74%, rgba(17,16,15,.2)); }
  .join-editorial { grid-column: 1; }
}

@media (max-width: 760px) {
  body:not(.landing-page):not(.preview-page) main { padding: 28px 14px 44px; }
  .topbar { min-height: 60px; }
  .topbar nav { border-radius: 3px; }
  .topbar nav .nav-link { border-radius: 2px; }
  .topbar nav .nav-link.is-active::after { display: none; }
  .post + .post { padding-top: 44px; }
  .post-body { padding-top: 20px; }
  .feed { gap: 44px; }
  .community-grid { grid-template-columns: 1fr; }
  .panel, .message-panel { padding: 22px; }
  .site-footer { width: calc(100% - 28px); }
  .join-editorial { padding: 22px; }
  .join-logo { width: 126px; height: 58px; }
  .join-copy-login-only { padding-bottom: 3vh; }
  .join-copy-login-only h1 { font-size: clamp(4rem, 20vw, 6.4rem); }
  .join-actions-login { grid-template-columns: 1fr; }
  .join-actions-login .button { width: 100% !important; }
  .preview-page main { padding-inline: 16px; }
  .preview-nav { min-height: 68px; }
  .preview-wordmark { font-size: 29px; }
  .preview-hero { padding-top: 74px; }
  .preview-hero h1 { font-size: clamp(4.2rem, 21vw, 7rem); }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-card, .preview-card:nth-child(n) { grid-column: 1; margin-top: 0; }
  .preview-card:nth-child(even) { margin-left: 12vw; }
  .preview-card:nth-child(odd) { margin-right: 8vw; }
  .preview-cta { margin-top: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-media img, .preview-media img, button, .button { transition: none !important; transform: none !important; }
}
