:root {
  --bg: #050608;
  --bg-elevated: #0c0f14;
  --surface: #11151c;
  --surface-2: #181d27;
  --border: #242b38;
  --text: #f4f6fb;
  --muted: #9aa5b8;
  --accent: oklch(68% 0.12 250);
  --accent-strong: oklch(62% 0.14 250);
  --accent-hover: oklch(58% 0.14 250);
  --accent-fg: oklch(97% 0.005 240);
  --accent-glow: rgba(110, 181, 255, 0.15);
  --gold: #e8c547;
  --gold-glow: rgba(232, 197, 71, 0.12);
  --silver: #b8c4d4;
  --bronze: #c98a5a;
  --danger: #ef4444;
  --radius: 12px;
  --nav-h: 82px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
  --topbar-content-extra: 0px;
  --app-topbar-h: calc(78px + var(--topbar-content-extra) + env(safe-area-inset-top, 0px));
  --series-stage-height: 280px;
  --post-series-stage-height: 320px;
}

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

html, body {
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.nav-btn:focus-visible,
.ranking-tab:focus-visible,
.post-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden { display: none !important; }

.screen {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.desktop-only { display: none; }
.mobile-only { display: flex; }

@media (min-width: 768px) {
  .mobile-only { display: none; }
}

/* Shared header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  min-height: var(--header-h);
  flex-shrink: 0;
  z-index: 10;
}

.site-header.compact {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header.compact .btn-back {
  justify-self: start;
}

.site-header.compact .brand-name {
  justify-self: center;
  text-align: center;
  grid-column: 2;
}

.site-header.compact .header-spacer {
  justify-self: end;
  width: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-wordmark {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-wordmark-lg {
  font-size: 28px;
  letter-spacing: 0.14em;
}

.brand-sky {
  color: oklch(78% 0.14 250);
  text-shadow: 0 0 18px rgba(110, 181, 255, 0.35);
}

.brand-iso {
  color: var(--muted);
}

.btn-header,
.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-back {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}

.btn-back-close {
  font-size: 20px;
}

.btn-sheet-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-sheet-close:hover {
  border-color: var(--accent-strong);
  color: var(--accent);
}

.header-spacer { width: 36px; }

/* Landing */
#landing-screen {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #000;
}

.landing-bg-picture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.landing-bg-img {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 87vh;
  object-fit: contain;
  object-position: center 35%;
  transform: translateY(-2vh);
  display: block;
  filter: brightness(1.1) saturate(1.22) contrast(1.05);
}

.landing-overlay-cinema {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #000 0%,
    #000 2%,
    rgba(0, 0, 0, 0.94) 6%,
    rgba(0, 0, 0, 0.72) 11%,
    rgba(0, 0, 0, 0.38) 17%,
    rgba(0, 0, 0, 0.12) 22%,
    transparent 30%,
    transparent 76%,
    rgba(0, 0, 0, 0.22) 84%,
    rgba(0, 0, 0, 0.68) 92%,
    #050608 100%
  );
  pointer-events: none;
}

.landing-overlay-grade {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 88% 58% at 22% 36%,
    rgba(255, 168, 88, 0.24) 0%,
    rgba(255, 130, 55, 0.09) 40%,
    transparent 66%
  );
  mix-blend-mode: soft-light;
  opacity: 0.88;
  pointer-events: none;
}

.landing-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Landscape desktop */
@media (min-width: 901px) and (orientation: landscape) {
  .landing-bg-img {
    max-height: 92vh;
    object-position: 56% 46%;
    transform: none;
  }
}

.landing-content {
  position: relative;
  z-index: 2;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(48px + env(safe-area-inset-top, 0px)) 20px 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.landing-brand {
  gap: 8px;
}

.landing-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  background: transparent;
  border: none;
  padding: 0;
}

.landing-brand-name {
  font-family: "Rajdhani", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 22px 48px;
  text-align: left;
}

.landing-hero .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: oklch(84% 0.1 75);
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(232, 197, 71, 0.25);
  margin-top: 0;
  margin-bottom: 10px;
}

.landing-hero .hero-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 3.15rem;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  text-wrap: balance;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.65),
    0 1px 3px rgba(0, 0, 0, 0.9);
}

.landing-hero .hero-title .accent {
  color: var(--accent);
}

.landing-hero .hero-text {
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 20rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}

.landing-explore-wrap {
  display: none;
}

.explore-hint {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.explore-chevron {
  opacity: 1;
}

.landing-app-store {
  margin: 0 20px 10px;
  text-align: center;
}

.landing-app-store a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #050608;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.landing-app-store a:active {
  transform: scale(0.98);
}

.join-bar {
  margin: 0 20px calc(16px + var(--safe-bottom));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.07);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.join-bar-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent) 20%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.join-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.join-bar-copy strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.join-bar-copy span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
}

.join-bar-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  background: var(--accent-strong);
  color: var(--accent-fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.join-bar-signin:active {
  opacity: 0.9;
}

@media (min-width: 768px) {
  .landing-hero .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-height: 700px), (max-width: 360px) {
  .landing-hero {
    padding-bottom: 36px;
  }

  .landing-hero .hero-title {
    font-size: 2.65rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent-strong);
  color: #041018;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-outline,
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger { color: var(--danger); border-color: var(--danger); }

.btn-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Login */
#login-screen {
  background: var(--bg);
  min-height: 0;
  overflow: hidden;
}

#login-screen .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 20px calc(24px + var(--safe-bottom));
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin: 0 0 20px;
  flex-shrink: 0;
}

.login-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(110, 181, 255, 0.2);
}

.login-intro {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.auth-forgot-wrap {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 0;
}

.auth-forgot-wrap .btn-text-link {
  align-self: flex-end;
  padding: 2px 0 4px;
  font-size: 13px;
}

.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-oauth {
  width: 100%;
  font-weight: 600;
}

.btn-oauth-google {
  background: #fff;
  color: #050608;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-oauth-apple {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

html.skyiso-native-app .landing-app-store {
  display: none !important;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.auth-actions .btn {
  width: 100%;
}

.btn-text-link {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-height: 740px) {
  .login-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .login-brand {
    margin: 0 0 14px;
    gap: 8px;
  }

  .email-form input {
    padding: 12px 14px;
  }
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

input, select {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--accent-strong);
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.email-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.4;
}

.auth-processing {
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  padding: 8px 0;
}

/* App shell */
#app-screen {
  position: relative;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  touch-action: manipulation;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, var(--accent-glow), transparent 55%),
    var(--bg);
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: rgba(5, 6, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  width: 100%;
}

.top-bar-leading {
  justify-self: start;
  min-width: 36px;
}

.top-bar-nav-slot {
  position: relative;
  width: 36px;
  height: 36px;
}

.top-bar-nav-slot .btn-back {
  position: absolute;
  top: 0;
  left: 0;
}

.top-bar-center {
  justify-self: center;
  text-align: center;
  min-width: 0;
  max-width: min(78vw, 440px);
  grid-column: 2;
}

.top-bar-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  grid-column: 3;
}

.admin-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-fg);
  background: var(--accent-strong);
  box-shadow: 0 0 14px var(--accent-glow);
}

#app-screen.admin-mode-active .top-bar {
  border-bottom-color: color-mix(in oklch, var(--accent-strong) 50%, var(--border));
  box-shadow: 0 1px 0 var(--accent-glow), inset 0 -1px 0 color-mix(in oklch, var(--accent-strong) 35%, transparent);
}

:root.admin-mode-active {
  --topbar-content-extra: 26px;
}

.admin-upload-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklch, var(--accent-strong) 45%, var(--border));
  background: var(--accent-glow);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.page-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
  font-family: "Rajdhani", sans-serif;
}

.top-bar-center h2,
.page-heading h2 {
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
}

.page-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.3;
}

#btn-back-landing.hidden-back {
  visibility: hidden;
  pointer-events: none;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.content {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 12px;
  padding-top: calc(var(--app-topbar-h) + 12px);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
}

.view { min-width: 0; }

.section-eyebrow,
.ranking-eyebrow,
.bestof-eyebrow {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-hint,
.ranking-hint,
.bestof-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.view-hero {
  margin-bottom: 14px;
}

.view-hero-compact {
  padding: 2px 2px 10px;
}

.section-eyebrow {
  color: var(--accent);
}

/* Themed views */
.view-theme-spotting {
  position: relative;
}

.view-theme-spotting::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image:
    linear-gradient(rgba(110, 181, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 181, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.view-theme-spotting > * {
  position: relative;
  z-index: 1;
}

.view-theme-upload .upload-hero,
.view-theme-ranking .tower-hero,
.view-theme-bestof .hall-hero {
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.upload-hero .section-eyebrow {
  color: var(--accent);
}

.tower-hero {
  background: linear-gradient(135deg, var(--accent-glow), transparent 70%);
  border-radius: var(--radius);
  padding: 14px !important;
  border: 1px solid rgba(110, 181, 255, 0.15) !important;
}

.tower-hero .ranking-eyebrow {
  color: var(--accent);
}

.hall-hero {
  background: linear-gradient(135deg, var(--gold-glow), transparent 70%);
  border-radius: var(--radius);
  padding: 14px !important;
  border: 1px solid rgba(232, 197, 71, 0.2) !important;
}

.hall-hero .bestof-eyebrow {
  color: var(--gold);
}

.loading, .empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

.empty-state-card {
  margin: 24px 8px 12px;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(110, 181, 255, 0.05), transparent);
  border: 1px dashed rgba(110, 181, 255, 0.18);
  border-radius: calc(var(--radius) + 4px);
}

.empty-state-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.75;
}

.empty-state-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state-copy {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 260px;
  margin: 0 auto;
}

.muted { color: var(--muted); }

.storage-notice {
  background: #1a1710;
  border: 1px solid #7c5b12;
  color: #fcd34d;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Feed */
.feed-search-wrap {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(17, 21, 28, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.storage-notice.storage-notice-ok {
  background: rgba(48, 209, 88, 0.1);
  border-color: rgba(48, 209, 88, 0.35);
  color: #8ee99a;
}

.feed-search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.feed-search-input::placeholder {
  color: var(--muted);
}

.feed-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 25%, transparent);
}

.feed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.post-media-wrap.media-lazy-pending,
.profile-post-tile.media-lazy-pending,
.rank-item.media-lazy-pending,
.bestof-media-wrap.media-lazy-pending {
  background: linear-gradient(110deg, #11151c 8%, #1a2030 18%, #11151c 33%);
  background-size: 200% 100%;
  animation: media-shimmer 1.15s ease-in-out infinite;
}

@keyframes media-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

img.media-lazy-pending {
  opacity: 0;
}

img.post-media:not(.media-lazy-pending),
img.profile-post-thumb:not(.media-lazy-pending),
img.rank-thumb:not(.media-lazy-pending),
img.bestof-media:not(.media-lazy-pending),
img.post-media-crop-img:not(.media-lazy-pending) {
  opacity: 1;
  transition: opacity 0.22s ease;
}

.post-media-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 1;
}

.post-media {
  width: 100%;
  height: 100%;
  display: block;
  max-height: none;
  object-fit: cover;
  background: #000;
}

.post-media-crop-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
}

.post-media-crop-viewport .post-media-crop-img,
.post-media-crop-viewport img.post-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  max-height: none;
  background: #000;
}

.media-viewer-media-wrap.post-media-crop-viewport,
.media-viewer .post-media-crop-viewport {
  width: 100%;
  max-height: min(78vh, 720px);
  aspect-ratio: auto;
}

.media-viewer .post-media-crop-viewport .media-viewer-media,
.media-viewer .post-media-crop-viewport img {
  max-height: min(78vh, 720px);
}

.media-missing,
.post-media-wrap.media-broken,
.profile-post-tile.media-broken,
.rank-item.media-broken {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  background: #141820;
}

.post-media.media-broken {
  display: none;
}

.post-media-wrap.media-broken::after {
  content: "Media unavailable";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  background: #141820;
  pointer-events: none;
}

.post-media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 35%, transparent 70%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.post-author-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.post-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--accent-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.post-avatar-logo {
  background: var(--bg);
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.post-author-official-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.post-author-official-link:hover {
  text-decoration: underline;
}

.post-author-official-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}

.post-sheet-byline .post-author-official-link {
  color: var(--text);
}

.post-sheet-byline .post-author-official-badge {
  background: var(--accent-glow);
  color: var(--accent-strong);
}

.post-author-profile-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent-strong);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rank-name .post-author-official-link,
.bestof-author .post-author-official-link {
  color: var(--muted);
}

.rank-name .post-author-official-badge,
.bestof-author .post-author-official-badge {
  background: var(--surface-2);
  color: var(--accent-strong);
}

.bestof-author {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.post-body {
  padding: 10px 10px 12px;
}

.post-body-compact {
  padding: 6px 8px 8px;
}

.post-body-compact .post-actions {
  width: 100%;
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.post-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.post-date {
  font-size: 10px;
  color: var(--muted);
}

.post-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
}

.action-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 999px;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.action-btn:disabled,
.action-btn.vote-btn-disabled:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.action-btn.liked {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.35);
}

.action-btn.voted {
  color: var(--accent);
  border-color: rgba(126, 192, 255, 0.35);
}

.action-btn.has-activity {
  color: var(--text);
  border-color: rgba(126, 192, 255, 0.45);
}

.action-btn.has-activity .action-count {
  color: var(--accent);
  font-weight: 600;
}

.post-media-wrap img,
.post-media-wrap video,
.post-media-crop-viewport img,
.post-sheet-media img,
.post-sheet-media video,
.media-viewer-media,
.profile-post-tile img,
.rank-item img,
.bestof-media-wrap img {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.post-media-wrap img,
.post-media-crop-viewport img,
.post-sheet-media img:not(.edit-preview-img),
.media-viewer-media,
.profile-post-tile img,
.rank-item img,
.bestof-media-wrap img {
  pointer-events: none;
}

.master-caution-btn {
  position: relative;
  width: 54px;
  height: 38px;
  padding: 3px 4px;
  border: 2px solid #1a1208;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffd24d 0%, #f5a000 48%, #c97f00 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.master-caution-btn:active {
  filter: brightness(0.94);
}

.master-caution-btn.has-alerts {
  background: linear-gradient(180deg, #ffe566 0%, #ffb800 50%, #e89400 100%);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.45),
    0 0 12px rgba(255, 168, 0, 0.7);
  animation: master-caution-pulse 1.8s ease-in-out infinite;
}

@keyframes master-caution-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.14); }
}

.master-caution-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 1px;
  height: 100%;
}

.master-caution-line {
  font-family: "Rajdhani", sans-serif;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1a1208;
  text-transform: uppercase;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #1a1208;
  color: #ffd24d;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
  font-weight: 800;
  border: 1px solid #f5a000;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-item {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  cursor: pointer;
}

.notification-item.unread {
  background: color-mix(in oklch, var(--accent-strong) 32%, var(--surface-2));
  border-color: color-mix(in oklch, var(--accent) 55%, var(--border));
}

.notification-type {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 4px;
}

.notification-copy {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.notification-preview {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.notification-time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.action-icon {
  font-size: 15px;
  line-height: 1;
}

.badge {
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.feed-list .badge {
  font-size: 9px;
  padding: 2px 6px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Upload */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed rgba(110, 181, 255, 0.35);
  border-radius: calc(var(--radius) + 4px);
  color: var(--muted);
  padding: 24px 20px;
  text-align: center;
  gap: 10px;
  background:
    radial-gradient(circle at center, rgba(110, 181, 255, 0.08), transparent 65%),
    var(--surface);
  overflow: hidden;
}

.file-drop.is-picking {
  pointer-events: none;
}

.upload-pick-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(4px);
}

.upload-pick-overlay.hidden {
  display: none;
}

.upload-pick-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(126, 192, 255, 0.22);
  border-top-color: var(--accent);
  animation: upload-pick-spin 0.8s linear infinite;
}

.upload-pick-overlay p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 240px;
  line-height: 1.4;
}

@keyframes upload-pick-spin {
  to { transform: rotate(360deg); }
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.btn-pick-media {
  min-width: min(100%, 280px);
  min-height: 48px;
  z-index: 2;
}

.file-drop-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(110, 181, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.file-drop-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(110, 181, 255, 0.15);
  border-radius: 50%;
}

.file-drop-icon {
  color: var(--accent);
  margin-bottom: 4px;
}

.file-drop-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.file-drop-sub {
  font-size: 11px;
  color: var(--muted);
}

.file-drop.has-file {
  border-style: solid;
  border-color: var(--accent-strong);
  background: #0a0c10;
  min-height: auto;
  padding: 14px 14px 16px;
}

.file-drop.has-file .file-drop-ring,
.file-drop.has-file .file-drop-icon,
.file-drop.has-file .btn-pick-media {
  display: none;
}

.file-drop.has-file .file-drop-label {
  align-self: flex-start;
  font-size: 11px;
  margin-bottom: 6px;
  opacity: 0.85;
  text-transform: none;
  letter-spacing: 0;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  flex-shrink: 0;
}

.file-drop.has-file .photo-crop-viewport,
.file-drop.has-file .preview-video {
  width: 100%;
  height: var(--series-stage-height);
  min-height: var(--series-stage-height);
  max-height: var(--series-stage-height);
  margin-top: 0;
  flex-shrink: 0;
}

.file-drop.has-file .preview-img:not(.photo-crop-viewport .preview-img) {
  width: 100%;
  height: var(--series-stage-height);
  min-height: var(--series-stage-height);
  max-height: var(--series-stage-height);
  margin-top: 0;
  flex-shrink: 0;
}

.edit-post-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.edit-preview-img,
.edit-preview-video {
  width: 100%;
  height: var(--series-stage-height);
  min-height: var(--series-stage-height);
  max-height: var(--series-stage-height);
  object-fit: contain;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

#edit-media-editor-host .media-editor {
  margin-bottom: 14px;
}

.edit-post-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 4px;
}

.edit-post-form .edit-post-media {
  margin-bottom: 0;
}

.edit-post-form #edit-media-editor-host {
  margin: 0;
}

.edit-post-form #edit-media-editor-host .media-editor {
  margin-bottom: 0;
}

.edit-post-form .field-group {
  gap: 10px;
  margin: 0;
}

.edit-post-form .upload-field-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.edit-post-form #edit-aircraft-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.edit-post-form #edit-aircraft-chips .aircraft-chip {
  font-size: 12px;
  line-height: 1.25;
}

.edit-post-form .logbook-fields-collapsible {
  margin: 0;
}

.edit-post-form .spotting-details summary {
  flex-wrap: wrap;
  row-gap: 4px;
  padding: 12px 36px 12px 14px;
  min-height: 48px;
}

.edit-post-form .spotting-details-optional {
  font-size: 11px;
}

.edit-post-form #edit-post-error {
  margin: 0;
  text-align: left;
}

.edit-post-form #btn-save-post-edit {
  width: 100%;
  margin: 0;
}

.edit-post-form .edit-post-danger-zone {
  margin-top: 2px;
  padding-top: 18px;
}

.edit-post-form .photo-crop-viewport {
  isolation: isolate;
  contain: paint;
}

@media (max-width: 380px) {
  .edit-post-form #edit-aircraft-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.preview-img, .preview-video {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  display: block;
  object-fit: contain;
  background: #050608;
}

.photo-crop-viewport {
  position: relative;
  width: 100%;
  height: var(--series-stage-height);
  min-height: var(--series-stage-height);
  max-height: var(--series-stage-height);
  overflow: hidden;
  border-radius: 10px;
  background: #050608;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}

.photo-crop-viewport:active {
  cursor: grabbing;
}

.photo-crop-viewport .preview-img,
.photo-crop-viewport .edit-preview-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  margin-top: 0;
  border-radius: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-crop-frame {
  position: absolute;
  border: 2px solid rgba(126, 192, 255, 0.85);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  border-radius: 4px;
  z-index: 2;
}

.photo-crop-frame {
  position: absolute;
  border: 2px solid rgba(126, 192, 255, 0.85);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  border-radius: 4px;
  z-index: 2;
}

.post-media-with-overlay {
  position: relative;
  display: block;
  width: 100%;
}

.photo-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.photo-overlay-sticker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(88%, 320px);
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.78);
  border: 1px solid rgba(232, 197, 71, 0.55);
  color: #fff;
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.photo-overlay-sticker--light {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.95);
  color: #10151c;
}

.photo-overlay-sticker--gold {
  background: rgba(232, 197, 71, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
  color: #10151c;
}

.photo-overlay-sticker--minimal {
  background: rgba(0, 0, 0, 0.45);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.photo-overlay-sticker-editable {
  cursor: grab;
}

.photo-overlay-sticker-editable:active {
  cursor: grabbing;
}

.photo-overlay-sticker-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: center;
}

.overlay-text-group {
  display: flex;
  flex-direction: column;
}

#ve-overlay-text {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#ve-overlay-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(110, 181, 255, 0.2);
}

.btn-overlay-newline {
  margin-top: 8px;
  align-self: flex-start;
}

.overlay-style-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.overlay-style-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.overlay-style-chip.active {
  border-color: rgba(232, 197, 71, 0.65);
  background: rgba(232, 197, 71, 0.12);
  color: var(--text);
}

.editor-photo-overlay .field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.editor-photo-overlay .field-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

.editor-overlay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-overlay-editor {
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 28, 0.96);
}

.chat-overlay-preview-wrap {
  width: 100%;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #050608;
}

.chat-overlay-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.chat-overlay-editor .field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.chat-overlay-editor .field-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
}

.chat-overlay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-message-image-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
}

.edit-post-media .photo-crop-viewport {
  width: 100%;
}

.series-slide-image,
.preview-img.series-slide-image {
  transition: opacity 0.1s ease;
  will-change: transform, opacity;
}

.post-series-stage .series-slide-image {
  touch-action: pan-y pinch-zoom;
}

.series-slide-image.series-fading,
.preview-img.series-fading {
  opacity: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.field-group.required-empty > .field-label,
.upload-media-label.required-empty > .field-label {
  color: #f87171;
}

.field-group.required-empty #post-title,
.field-group.required-empty #edit-post-title {
  border-color: rgba(239, 68, 68, 0.65);
}

.field-group.required-empty .aircraft-chips {
  border: 2px solid rgba(239, 68, 68, 0.55);
  border-radius: var(--radius);
  padding: 8px;
}

.file-drop.required-empty {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 2px;
}

.upload-fields-intro,
.upload-field-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.upload-field-hint {
  margin-bottom: 10px;
}

.upload-media-label {
  margin-bottom: 10px;
}

#post-title:focus,
#edit-post-title:focus {
  border-color: rgba(110, 181, 255, 0.5);
}

.field-group.required-empty #post-title:focus,
.field-group.required-empty #edit-post-title:focus {
  border-color: rgba(239, 68, 68, 0.65);
}

.aircraft-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.aircraft-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 11px 10px;
  border-radius: var(--radius);
  min-height: 44px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.aircraft-chip.active {
  color: var(--accent);
  border-color: rgba(110, 181, 255, 0.5);
  background: var(--accent-glow);
}

.btn-upload-submit {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.upload-form input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
}

.upload-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(110, 181, 255, 0.5);
}

/* Profile */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}

.profile-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 14px;
  align-items: center;
  position: relative;
}

.profile-status-wrap {
  grid-column: 1 / -1;
  margin-top: -4px;
  padding-top: 12px;
  border-top: 1px solid rgba(110, 181, 255, 0.12);
}

.profile-status {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-status a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-status-placeholder {
  color: var(--muted);
  font-style: italic;
}

.profile-page-public .pilot-card-badge {
  right: 16px;
}

.pilot-card {
  padding: 18px 16px 16px;
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(110, 181, 255, 0.1) 0%, transparent 55%),
    var(--surface);
  border: 1px solid rgba(110, 181, 255, 0.2);
}

.pilot-card-badge {
  position: absolute;
  top: 10px;
  right: 48px;
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}

.profile-identity {
  min-width: 0;
}

.profile-identity h3 {
  font-family: "Rajdhani", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-identity .muted {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #041018;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-menu-btn:hover {
  color: var(--text);
  border-color: var(--accent-strong);
}

.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 20;
  overflow: hidden;
  padding: 6px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.profile-dropdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-strong);
  flex-shrink: 0;
}

.profile-dropdown-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--border);
}

.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.profile-dropdown-item.danger {
  color: var(--danger);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
}

.profile-stat-value {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--accent);
}

.profile-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.profile-actions.profile-public {
  grid-template-columns: 1fr;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 10px;
}

.profile-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.profile-content-hub {
  padding-top: 14px;
}

.profile-content-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-content-tab {
  flex: 1;
  padding: 11px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-content-tab.active {
  color: var(--text);
  border-color: rgba(255, 184, 107, 0.45);
  background: rgba(255, 184, 107, 0.08);
}

.profile-content-panel {
  display: none;
}

.profile-content-panel.is-active {
  display: block;
}

.profile-panel-sub {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
}

.profile-library-header {
  margin-bottom: 14px;
}

.profile-library-title {
  margin: 0 0 4px;
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-library-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.profile-library-public-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.library-filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.library-filter-chip.active {
  border-color: rgba(232, 197, 71, 0.45);
  background: rgba(232, 197, 71, 0.12);
  color: var(--accent-strong);
}

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(5, 6, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.profile-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: "Rajdhani", sans-serif;
}

.profile-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent-strong);
}

.profile-posts-status {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 12px;
}

.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .profile-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-post-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.profile-post-tile img,
.profile-post-tile video,
.profile-post-tile .profile-post-thumb,
.profile-post-tile .post-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-video-thumb-pending {
  background: rgba(255, 255, 255, 0.06);
  min-height: 140px;
}

.post-media.post-video-thumb,
.rank-thumb.post-video-thumb,
.bestof-media.post-video-thumb,
.profile-post-thumb.post-video-thumb {
  object-fit: cover;
}

.profile-post-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px;
  pointer-events: none;
}

.profile-post-tile-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.profile-post-tile-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.profile-post-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
}

.profile-post-badge.photo {
  right: auto;
  left: 6px;
}

.profile-post-manage {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.upload-rework-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 197, 71, 0.35);
  background: rgba(232, 197, 71, 0.08);
}

.upload-rework-banner.hidden {
  display: none !important;
}

.upload-rework-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.upload-rework-title {
  margin: 0;
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-upload-rework-cancel {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.legal-hub-intro {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.legal-hub-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-hub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.legal-hub-item:hover,
.legal-hub-item:active {
  border-color: rgba(126, 192, 255, 0.35);
  background: var(--surface-2);
}

.legal-hub-label {
  font-size: 14px;
  font-weight: 600;
}

.legal-hub-chevron {
  color: var(--muted);
  font-size: 16px;
}

.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edit-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  align-self: center;
}

.edit-avatar-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #041018;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.edit-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-avatar-hint {
  font-size: 12px;
  color: var(--accent-strong);
  text-decoration: underline;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.edit-profile-form input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
}

.edit-profile-form .edit-status-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

.edit-profile-form .field-hint {
  margin: -8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* Legacy profile-card (unused) */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.profile-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.stats {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Ranking */
.ranking-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(5, 6, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ranking-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: "Rajdhani", sans-serif;
}

.ranking-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent-strong);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.rank-item:active {
  transform: scale(0.99);
}

.rank-item.rank-gold {
  border-color: rgba(232, 197, 71, 0.45);
  background: linear-gradient(90deg, rgba(232, 197, 71, 0.1), var(--surface) 40%);
}

.rank-item.rank-silver {
  border-color: rgba(184, 196, 212, 0.35);
  background: linear-gradient(90deg, rgba(184, 196, 212, 0.08), var(--surface) 40%);
}

.rank-item.rank-bronze {
  border-color: rgba(201, 138, 90, 0.35);
  background: linear-gradient(90deg, rgba(201, 138, 90, 0.08), var(--surface) 40%);
}

.rank-pos {
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  font-weight: 800;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.rank-tie-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.rank-item-tied .rank-count {
  color: var(--muted);
}

.rank-pos-gold { color: var(--gold); }
.rank-pos-silver { color: var(--silver); }
.rank-pos-bronze { color: var(--bronze); }
.rank-pos-default { color: var(--accent); }

.rank-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-count {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  font-family: "Rajdhani", sans-serif;
}

.rank-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
}

.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rank-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Best Of */
.bestof-hero {
  margin-bottom: 16px;
}

.bestof-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8c547;
  margin-bottom: 6px;
}

.bestof-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bestof-list,
.bestof-archive {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bestof-spotlight {
  margin-bottom: 22px;
}

.bestof-spotlight-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bestof-spotlight-header {
  padding: 0 2px;
}

.bestof-spotlight-eyebrow {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e8c547;
  margin-bottom: 4px;
}

.bestof-spotlight-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0;
}

.bestof-spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bestof-month-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bestof-month-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8c547;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(232, 197, 71, 0.2);
}

.bestof-month-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bestof-card {
  background: var(--surface);
  border: 1px solid rgba(232, 197, 71, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bestof-card:active {
  transform: scale(0.995);
}

.bestof-card-spotlight {
  border-color: rgba(232, 197, 71, 0.45);
  box-shadow: 0 8px 28px rgba(232, 197, 71, 0.12);
}

.bestof-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(232, 197, 71, 0.08);
  border-bottom: 1px solid rgba(232, 197, 71, 0.15);
}

.bestof-card-spotlight .bestof-card-header {
  padding: 12px 16px;
}

.bestof-card-crown {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8c547;
}

.bestof-champion-label {
  line-height: 1.2;
}

.bestof-vote-badge {
  font-size: 10px;
  font-weight: 700;
  color: #e8c547;
  background: rgba(232, 197, 71, 0.15);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.bestof-media-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.bestof-card-spotlight .bestof-media-wrap {
  aspect-ratio: 3 / 2;
}

.bestof-media-wrap > img.bestof-media,
.bestof-media-wrap > img.post-media-crop-img,
.bestof-media-wrap > img.post-video-thumb,
.bestof-media-wrap > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: auto;
}

.bestof-media-wrap > .post-media-crop-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bestof-media-wrap .post-media-crop-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bestof-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--muted);
}

.bestof-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.bestof-card-body {
  padding: 12px 14px;
}

.bestof-card-spotlight .bestof-card-body {
  padding: 14px 16px;
}

.bestof-card-body h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.bestof-card-spotlight .bestof-card-body h4 {
  font-size: 16px;
}

.bestof-card-compact .bestof-card-body h4 {
  font-size: 13px;
}

.bestof-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-width: 0;
}

.bestof-author-row .user-avatar-sm {
  flex-shrink: 0;
}

.bestof-card-body p {
  font-size: 11px;
  color: var(--muted);
}

.bestof-author {
  margin: 0;
  min-width: 0;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px calc(12px + var(--safe-bottom));
  z-index: 100;
  pointer-events: none;
}

.bottom-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.92) 0%, rgba(10, 12, 18, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 58px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.nav-btn:active {
  transform: scale(0.97);
}

.nav-btn.active {
  color: var(--accent);
  background: rgba(126, 192, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(126, 192, 255, 0.18);
}

.nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

/* Sheets — always fullscreen (like Messages) */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.sheet.hidden { display: none !important; }

.sheet-backdrop {
  display: none;
}

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg);
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet-header {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet-header .btn-back {
  justify-self: start;
}

.sheet-title {
  justify-self: center;
  text-align: center;
  grid-column: 2;
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-header .header-spacer {
  justify-self: end;
  width: auto;
  min-width: 36px;
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.sheet-body.help-sheet-body,
.sheet-body.messages-sheet-body,
.sheet-body.notifications-sheet-body,
.sheet-body.legal-doc-sheet-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-sheet-meta {
  margin: 12px 0 0;
}

.post-sheet-owner-actions {
  margin-top: 14px;
}

.post-sheet-owner-actions .btn {
  width: 100%;
}

.post-sheet-engagement-wrap {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.post-sheet-engagement-wrap.hidden {
  display: none !important;
}

.post-sheet-engagement {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}

.post-engagement-item {
  position: relative;
}

.post-engagement-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.post-engagement-toggle:hover {
  background: var(--surface-2);
}

.post-engagement-toggle.is-open {
  border-color: rgba(110, 181, 255, 0.35);
  background: var(--surface-2);
}

.post-engagement-toggle:disabled {
  opacity: 0.55;
  cursor: default;
}

.post-engagement-icon {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}

.post-engagement-label {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.post-engagement-chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.post-engagement-toggle.is-open .post-engagement-chevron {
  transform: rotate(180deg);
}

.post-engagement-panel {
  margin-top: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.post-engagement-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
}

.post-engagement-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.post-engagement-user:last-child {
  border-bottom: none;
}

.post-engagement-user:hover {
  background: var(--surface-2);
}

.post-engagement-empty,
.post-engagement-note {
  margin: 0;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.post-engagement-note {
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.post-sheet-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 16px;
}

.post-sheet-share-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.post-sheet-byline {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.post-sheet-detail-grid {
  display: grid;
  gap: 8px;
}

.post-sheet-detail-row {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr;
  gap: 10px;
  align-items: start;
}

.post-sheet-detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.post-sheet-detail-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
}

.post-sheet-logbook-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.post-sheet-logbook-heading {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.post-sheet-logbook-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.comments-section h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.comment-swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.comment-swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  align-items: stretch;
}

.comment-swipe-action {
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 4px;
}

.comment-swipe-edit {
  width: 72px;
  background: #2f6fed;
}

.comment-swipe-edit:active {
  background: #2558c7;
}

.comment-swipe-delete {
  width: 88px;
  background: #c0392b;
}

.comment-swipe-delete:active {
  background: #a93226;
}

.comment-swipe-report {
  width: 88px;
  background: #6c5c2e;
}

.comment-swipe-report:active {
  background: #5a4d26;
}

.comment-swipe-content {
  position: relative;
  z-index: 1;
  will-change: transform;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.comment-swipe-row.is-open .comment-swipe-content {
  transform: translateX(var(--comment-swipe-offset, -88px));
}

.comment-swipe-row.is-editing {
  overflow: visible;
}

.comment-swipe-row.is-editing .comment-swipe-content {
  transform: none !important;
}

.comment-swipe-row.is-editing .comment-swipe-actions {
  display: none;
}

.comment-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.comment-item-main.is-reply,
.comment-item-reply {
  margin-left: 12px;
  border-left: 2px solid rgba(126, 192, 255, 0.35);
  padding-left: 10px;
}

.comment-reply-quote {
  font-size: 11px;
  color: var(--muted);
}

.comment-reply-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.comment-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(126, 192, 255, 0.35);
  background: rgba(126, 192, 255, 0.08);
}

.comment-reply-label {
  font-size: 12px;
  color: var(--text);
  line-height: 1.35;
}

.comment-reply-cancel {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.comment-highlight {
  box-shadow: 0 0 0 2px rgba(126, 192, 255, 0.55);
}

.comment-author {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.45;
}

.comment-item.is-editing,
.comment-swipe-row.is-editing .comment-swipe-content {
  padding-bottom: 12px;
}

.comment-edit-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.comment-edit-form input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
}

.comment-action-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.comment-edited-tag {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

.comment-form,
.chat-form {
  display: flex;
  gap: 8px;
}

.comment-form input,
.chat-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
}

.btn-compact {
  width: auto;
  padding: 12px 16px;
  white-space: nowrap;
}

/* Messages */
.messages-home {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.messages-home.messages-compose-open {
  gap: 8px;
}

.messages-section-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.messages-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.messages-inbox-section {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.messages-new-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 8px;
  background: linear-gradient(to bottom, var(--bg) 82%, transparent);
}

.messages-new-actions .messages-new-chat-btn {
  width: 100%;
  margin-top: 0;
}

.messages-new-actions .messages-new-chat-btn.is-active {
  border-color: var(--accent);
  background: rgba(110, 181, 255, 0.12);
  color: var(--accent);
}

.group-icon-picker {
  margin-bottom: 18px;
}

.group-icon-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-icon-preview {
  flex-shrink: 0;
}

.group-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.group-member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
}

.group-member-chip-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.user-search-pick-item.is-selected {
  opacity: 0.55;
}

.user-search-pick-item .group-add-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.user-search-pick-item .group-add-label {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-chat-attach {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
}

.btn-chat-attach.has-attachment {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.chat-form #chat-input {
  flex: 1;
  min-width: 0;
}

.chat-sender-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.chat-group-members {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.chat-group-members-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.chat-group-members-toggle-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

#chat-group-members-summary {
  flex: 1;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
}

.chat-group-members-chevron {
  color: var(--muted);
  transition: transform 0.15s ease;
}

.chat-group-members.is-open .chat-group-members-chevron {
  transform: rotate(180deg);
}

.chat-group-members-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(36vh, 260px);
  overflow-y: auto;
  padding: 0 12px 12px;
  -webkit-overflow-scrolling: touch;
}

.chat-group-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.chat-group-member-item.is-static {
  cursor: default;
}

.chat-group-member-item:not(.is-static):active {
  background: var(--surface-2);
}

.chat-system-row {
  display: flex;
  justify-content: center;
  padding: 6px 12px;
}

.chat-system-message {
  margin: 0;
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(110, 181, 255, 0.1);
  border: 1px solid rgba(110, 181, 255, 0.18);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.chat-message-image {
  display: block;
  max-width: min(240px, 100%);
  border-radius: 12px;
  margin-bottom: 6px;
}

.chat-message-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-word;
}

.chat-shared-post-card {
  display: grid;
  gap: 8px;
  width: min(260px, 100%);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.chat-shared-post-card:active {
  transform: scale(0.99);
}

.chat-shared-post-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.chat-shared-post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-shared-post-video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
}

.chat-shared-post-meta {
  display: grid;
  gap: 2px;
  padding: 0 10px 10px;
}

.chat-shared-post-title {
  font-size: 14px;
  line-height: 1.3;
}

.chat-shared-post-author {
  font-size: 12px;
  color: var(--muted);
}

.chat-shared-post-caption {
  margin-top: 8px;
}

.share-chat-sheet-body {
  display: grid;
  gap: 14px;
}

.share-chat-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.share-chat-list {
  display: grid;
  gap: 8px;
}

.share-chat-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
}

.share-chat-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.share-chat-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.share-chat-row-copy strong,
.share-chat-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-chat-row-copy span {
  font-size: 12px;
  color: var(--muted);
}

.share-chat-new-btn {
  width: 100%;
}

.inbox-item-copy .inbox-group-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.group-avatar-icon {
  background: linear-gradient(135deg, rgba(110, 181, 255, 0.25), var(--surface-2));
  color: var(--accent);
  font-weight: 800;
}

.messages-new {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.messages-group-name-field {
  margin-bottom: 18px;
}

#group-name-input {
  display: block;
  width: 100%;
  min-height: 48px;
  line-height: 1.35;
  padding: 12px 14px;
  font-size: 16px;
  margin-bottom: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.messages-add-pilots-label {
  margin-top: 4px;
}

.messages-users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.messages-users-toolbar #user-search,
.messages-users-toolbar #group-user-search {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-bottom: 0;
  box-sizing: border-box;
}

.messages-user-sort {
  flex-shrink: 0;
  width: auto;
  min-width: 88px;
  max-width: 108px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

.messages-users-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.messages-users-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.user-search-pick-copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.messages-users-more {
  width: 100%;
  margin-top: 4px;
}

.messages-user-actions {
  margin-top: 12px;
}

.messages-user-actions-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.messages-user-actions-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.messages-user-actions-name {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.messages-user-actions-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.messages-user-actions-buttons .btn {
  width: 100%;
  margin: 0;
}

.user-search-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.user-search-pick-item:active {
  background: var(--surface-2);
  border-color: rgba(126, 192, 255, 0.35);
}

.user-search-pick-item strong {
  font-size: 15px;
}

.messages-sheet-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding-bottom: calc(12px + var(--safe-bottom));
}

#messages-sheet #messages-home {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#messages-sheet #messages-home.messages-keyboard-open {
  padding-bottom: min(40vh, 280px);
}

#messages-sheet .messages-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#messages-sheet .chat-messages {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
  padding: 12px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

#messages-sheet .chat-messages-flow {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

#messages-sheet .chat-messages-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#messages-sheet .chat-form {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.notifications-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.legal-doc-sheet-body {
  padding: 0;
}

.legal-doc-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  background: var(--bg);
}

.notification-swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.notification-swipe-row .notification-item {
  position: relative;
  z-index: 1;
  will-change: transform;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.notification-swipe-row.is-open .notification-item {
  transform: translateX(-88px);
}

.notification-swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88px;
  z-index: 0;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.notification-swipe-row.is-open .notification-swipe-actions {
  pointer-events: auto;
}

.notification-swipe-delete {
  width: 88px;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.messages-inbox,
.user-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-user-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.search-user-row .search-user-item {
  flex: 1;
}

.search-user-side-btn {
  min-width: 52px;
  height: 44px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
}

.search-user-side-btn:hover,
.search-user-side-btn:active {
  border-color: rgba(232, 197, 71, 0.35);
}

.inbox-swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.inbox-swipe-actions {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  align-items: stretch;
}

.inbox-swipe-delete {
  width: 88px;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.inbox-swipe-delete:active {
  background: #a93226;
}

.inbox-swipe-content {
  position: relative;
  z-index: 1;
  will-change: transform;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.inbox-swipe-row.is-open .inbox-swipe-content {
  transform: translateX(-88px);
}

.inbox-item,
.search-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.search-user-item {
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-user-item:active,
.inbox-item:active {
  background: var(--surface-2);
  border-color: rgba(126, 192, 255, 0.35);
}

.search-user-action {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.inbox-item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.inbox-item strong,
.search-user-item strong {
  display: block;
  font-size: 15px;
}

.inbox-item span,
.search-user-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-new input:not(.messages-users-toolbar input) {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.messages-users-toolbar input[type="search"] {
  width: auto;
  min-width: 0;
  margin-bottom: 0;
  padding: 12px 14px;
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .messages-users-toolbar {
    grid-template-columns: 1fr;
  }

  .messages-user-sort {
    max-width: none;
    width: 100%;
  }
}

.messages-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.messages-chat.hidden { display: none !important; }

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  max-height: 50dvh;
  overflow-y: auto;
  margin-bottom: 12px;
}

.help-messages.chat-messages {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
}

.chat-message-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--accent-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.user-avatar-md {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.user-avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.messages-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(100%, 220px);
}

.messages-title-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.chat-row.mine {
  justify-content: flex-end;
}

.chat-row.theirs {
  justify-content: flex-start;
}

.chat-row .chat-bubble {
  max-width: calc(82% - 36px);
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent-strong);
  color: var(--accent-fg);
}

.chat-bubble.theirs {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
}

.help-sheet-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.help-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}

.help-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.help-suggestion {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

.help-suggestion:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.help-disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.help-disclaimer a {
  color: var(--accent-strong);
}

.btn-help-clear,
.btn-notifications-clear {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px;
}

.btn-notifications-clear:not(.hidden):disabled {
  opacity: 0.5;
}

.btn-text {
  background: none;
  border: none;
  cursor: pointer;
}

.chat-bubble.typing {
  color: var(--muted);
  font-style: italic;
}

/* Media editor */
.media-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.btn-editor-reset {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-editor-reset:hover {
  color: var(--text);
  border-color: var(--accent-strong);
}

.editor-tool-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.editor-tool-tabs::-webkit-scrollbar {
  display: none;
}

.editor-tool-tab {
  flex: 1 1 0;
  min-width: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.editor-tool-tab.active {
  color: var(--accent);
  border-color: rgba(126, 192, 255, 0.45);
  background: rgba(126, 192, 255, 0.1);
}

.editor-tool-tab.hidden {
  display: none;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-panel.hidden {
  display: none;
}

.editor-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.preset-chip.active {
  color: var(--accent);
  border-color: rgba(126, 192, 255, 0.45);
  background: rgba(126, 192, 255, 0.1);
}

.editor-sliders,
.editor-video-tools,
.editor-photo-crop,
.editor-photo-overlay {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-crop-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.crop-aspect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crop-aspect-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.crop-aspect-chip.active {
  color: var(--accent);
  border-color: rgba(126, 192, 255, 0.45);
  background: rgba(126, 192, 255, 0.1);
}

.editor-video-tools {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.editor-audio-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.video-audio-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-audio-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.video-audio-chip.active {
  color: var(--accent);
  border-color: rgba(110, 181, 255, 0.5);
  background: var(--accent-glow);
}

.slider-row {
  display: grid;
  grid-template-columns: 76px 1fr 44px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent-strong);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  background: rgba(20, 24, 32, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 300;
  pointer-events: none;
}

/* Legal pages */
html:has(body.legal-body) {
  overflow: auto;
  height: auto;
}

body.legal-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.legal-header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  line-height: 1.6;
}

.legal-doc h1 {
  font-family: "Rajdhani", sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
}

.legal-doc h2 {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.2rem;
  margin: 28px 0 10px;
}

.legal-doc h3 {
  font-size: 1rem;
  margin: 18px 0 8px;
}

.legal-doc p,
.legal-doc li {
  color: var(--text);
  font-size: 15px;
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.2rem;
  margin: 8px 0 14px;
}

.legal-doc a {
  color: var(--accent-strong);
}

.legal-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.legal-notice {
  background: rgba(232, 197, 71, 0.12);
  border: 1px solid rgba(232, 197, 71, 0.35);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0 20px;
  font-size: 14px;
  line-height: 1.5;
}

.blocked-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.blocked-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.blocked-user-info {
  min-width: 0;
}

.blocked-user-info strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.blocked-user-unblock {
  flex-shrink: 0;
}

/* Terms acceptance */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  margin: 4px 0 6px;
  max-width: 100%;
}

.terms-checkbox input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.terms-checkbox span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terms-checkbox a {
  color: var(--accent-strong);
}

.terms-sheet-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

#terms-sheet {
  z-index: 1500;
}

.terms-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

.terms-sheet-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.terms-sheet-body .terms-checkbox {
  margin: 0;
}

.terms-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.upload-limits-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.upload-legal-compact {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  margin: 4px 0 10px;
}

.upload-legal-compact a {
  color: var(--accent-strong);
  text-decoration: none;
}

.upload-legal-compact a:hover {
  text-decoration: underline;
}

.upload-legal-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 10px 0 12px;
}

.upload-legal-note a {
  color: var(--accent-strong);
}

/* Moderation */
.btn-sheet-action {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
}

.post-sheet-more-wrap {
  position: relative;
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
  z-index: 2;
}

.post-sheet-menu-dropdown {
  top: calc(100% + 4px);
}

.danger-outline {
  border-color: rgba(255, 90, 90, 0.45);
  color: #ff8f8f;
}

.edit-post-danger-zone {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.edit-post-danger-zone.hidden {
  display: none !important;
}

.edit-post-danger-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.btn-danger-link {
  background: none;
  border: none;
  color: #ff8f8f;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  text-align: left;
}

.btn-danger-link:active {
  opacity: 0.75;
}

.comment-report-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 0;
  flex-shrink: 0;
}

.comment-report-btn:hover {
  color: var(--accent-strong);
}

.report-form select,
.report-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 12px;
}

.report-form textarea {
  resize: vertical;
  min-height: 84px;
}

/* Admin dashboard */
.view-theme-admin {
  padding-bottom: 8px;
}

.admin-hero {
  margin-bottom: 14px;
}

.admin-eyebrow {
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb86b;
  margin-bottom: 4px;
}

.admin-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.admin-stat-pill.muted {
  color: var(--text);
  opacity: 1;
}

.admin-users-panel {
  margin-bottom: 16px;
}

.admin-users-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-users-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.admin-users-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.admin-user-search {
  flex: 1 1 180px;
  min-width: 0;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-users-select-wrap {
  flex: 0 1 auto;
}

.admin-users-select {
  min-width: 132px;
  padding: 11px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.admin-users-summary {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding-right: 2px;
}

.admin-users-more {
  width: 100%;
  margin-top: 10px;
}

.admin-user-card {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-user-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.admin-user-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.admin-user-card-stats {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.admin-user-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.admin-user-card-meta {
  min-width: 0;
  flex: 1;
}

.admin-user-card-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.admin-user-card-email {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-card-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-user-card-status.is-blocked {
  color: #f87171;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(5, 6, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  flex: 0 0 auto;
  min-width: 4.8rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.admin-tab.active {
  color: var(--text);
  border-color: rgba(255, 184, 107, 0.45);
  background: rgba(255, 184, 107, 0.08);
}

.admin-analytics-panel {
  margin-bottom: 16px;
}

.admin-analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-analytics-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.admin-analytics-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 52ch;
}

.admin-analytics-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-analytics-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-analytics-card-wide {
  grid-column: 1 / -1;
}

.admin-analytics-card-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-analytics-card-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display, inherit);
  line-height: 1.1;
}

.admin-analytics-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.admin-analytics-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.admin-analytics-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-analytics-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.admin-analytics-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 184, 107, 0.85), rgba(255, 214, 153, 0.65));
}

.admin-analytics-bar-count {
  min-width: 2.2rem;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.admin-analytics-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.admin-reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.admin-report-card.resolved {
  opacity: 0.72;
}

.admin-report-card.admin-report-highlight {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--accent) 45%, transparent);
  animation: admin-report-pulse 0.55s ease 2;
}

@keyframes admin-report-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}

.notification-item[data-report-id] .notification-type {
  color: var(--danger);
}

.admin-report-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-report-type {
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-report-status {
  font-size: 11px;
  color: var(--muted);
}

.admin-report-reason {
  font-size: 14px;
  margin-bottom: 6px;
}

.admin-report-details,
.admin-report-meta,
.admin-report-missing {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.admin-report-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.admin-report-preview strong,
.admin-report-preview span {
  display: block;
}

.admin-report-preview span {
  font-size: 12px;
  color: var(--muted);
}

.admin-report-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.admin-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-reports-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-reports-toolbar-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.admin-reports-toolbar.hidden {
  display: none;
}

/* Tablet & wide screens */
@media (min-width: 768px) {
  #app-screen .top-bar,
  #app-screen .content {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }

  #app-screen .top-bar {
    padding-left: 24px;
    padding-right: 24px;
  }

  .content {
    padding: 16px 24px calc(var(--nav-h) + var(--safe-bottom) + 16px);
    padding-top: calc(var(--app-topbar-h) + 16px);
  }

  .feed-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .profile-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .bestof-spotlight-grid {
    grid-template-columns: 1.45fr 1fr;
    gap: 14px;
  }

  .bestof-spotlight-grid .bestof-card-spotlight:only-child {
    grid-column: 1 / -1;
  }

  .bestof-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .upload-form {
    max-width: 640px;
  }

  .login-panel {
    max-width: 480px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .landing-hero {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
  }

  .landing-header {
    padding-left: 32px;
    padding-right: 32px;
  }

  .join-bar {
    margin-left: 24px;
    margin-right: 24px;
  }

  .bottom-nav-inner {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .top-bar-center h2,
  .page-heading h2 {
    font-size: 24px;
  }

  .post-body {
    padding: 12px 12px 14px;
  }

  .post-title {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  #app-screen .top-bar,
  #app-screen .content {
    max-width: 1280px;
  }

  .feed-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .profile-posts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bestof-spotlight-title {
    font-size: 26px;
  }

  .ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 768px) and (orientation: landscape) {
  .landing-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: center;
  }

  .landing-header {
    grid-column: 1 / -1;
  }

  .landing-hero {
    grid-column: 1;
    justify-content: center;
    padding-bottom: 24px;
  }

  .landing-explore-wrap {
    display: none;
  }

  .join-bar {
    grid-column: 1 / -1;
  }
}

/* Spotter Logbook */
.field-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}

.spotting-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.spotting-details summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.spotting-details-title {
  flex: 1;
  min-width: 0;
}

.spotting-details-optional {
  flex-shrink: 0;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.spotting-details summary::-webkit-details-marker {
  display: none;
}

.spotting-details summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 400;
}

.spotting-details[open] summary::after {
  content: "−";
}

#upload-step-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.logbook-fields-collapsible {
  margin-top: 4px;
  margin-bottom: 8px;
}

.spotting-details-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
}

.post-sheet-hint,
.comments-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.comments-hint {
  margin-top: -4px;
}

.logbook-fields .logbook-input-row,
.spotting-details-body .logbook-input-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 8px;
}

.logbook-fields input,
.spotting-details-body input {
  width: 100%;
}

.profile-logbook {
  margin-top: 8px;
}

.logbook-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.logbook-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
}

.logbook-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.logbook-stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.logbook-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logbook-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.logbook-row:hover,
.logbook-row:active {
  border-color: var(--accent);
  background: var(--surface-2);
}

.logbook-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.logbook-row-reg {
  font-weight: 600;
  font-size: 0.95rem;
}

.logbook-row-title {
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logbook-row-note {
  font-size: 0.72rem;
  color: #ffb86b;
}

.logbook-row-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logbook-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.logbook-row-date {
  font-size: 0.72rem;
  color: var(--muted);
}

.logbook-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(110, 181, 255, 0.15);
  color: var(--accent);
}

.logbook-badge.new {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}

/* Photo series */
.post-series-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.series-preview-strip,
.edit-series-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
}

.series-preview-thumb,
.edit-series-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--surface);
  cursor: pointer;
}

.series-preview-thumb.active,
.edit-series-thumb.active {
  border-color: var(--accent);
}

.series-preview-thumb img,
.edit-series-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-sheet-media-wrap {
  margin-bottom: 12px;
}

.post-sheet-media-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}

.post-sheet-media-stage {
  position: relative;
}

.post-sheet-media-open .post-series-stage {
  height: var(--post-series-stage-height);
  min-height: var(--post-series-stage-height);
}

.post-sheet-media-open .post-series-slide,
.post-sheet-media-open .post-media.post-video-thumb {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.post-sheet-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.post-sheet-media-hint,
.post-sheet-fullscreen-btn {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.post-series-viewer {
  display: grid;
  gap: 10px;
}

.post-series-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #050608;
  cursor: zoom-in;
  height: var(--post-series-stage-height);
  min-height: var(--post-series-stage-height);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.series-carousel {
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.series-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

.series-carousel-page {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.series-carousel-page .series-slide-image,
.series-carousel-page .post-series-slide {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.series-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 10px;
}

.series-carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.series-carousel-dot.active {
  background: var(--accent, #ffb86b);
  transform: scale(1.15);
}

#media-viewer-stage.series-carousel {
  display: block;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
  touch-action: pan-y;
}

#media-viewer-stage.series-carousel .series-carousel-track {
  height: 100%;
}

#media-viewer-stage.series-carousel .series-carousel-page {
  padding:
    calc(52px + env(safe-area-inset-top, 0px))
    calc(12px + env(safe-area-inset-right, 0px))
    calc(36px + env(safe-area-inset-bottom, 0px))
    calc(12px + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.post-series-stage .series-slide-image,
.post-series-stage .post-series-slide {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  display: block;
}

.post-series-slide {
  width: 100%;
  object-fit: contain;
  display: block;
}

.post-series-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.post-series-counter {
  font-size: 13px;
  color: var(--muted);
  min-width: 72px;
  text-align: center;
}

.swipe-carousel-hint {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.swipe-carousel,
.file-drop.has-file {
  touch-action: pan-y;
}

/* Fullscreen media viewer */
.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #000;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
}

.media-viewer-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(52px + env(safe-area-inset-top, 0px))
    calc(12px + env(safe-area-inset-right, 0px))
    calc(36px + env(safe-area-inset-bottom, 0px))
    calc(12px + env(safe-area-inset-left, 0px));
  position: relative;
}

.media-viewer-stage.media-viewer-loading::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  animation: media-viewer-spin 0.8s linear infinite;
  pointer-events: none;
}

.media-viewer-stage.media-viewer-error::after {
  content: "Video could not load";
  position: absolute;
  inset: auto 16px 24px;
  width: auto;
  height: auto;
  border: none;
  animation: none;
  color: #f8fafc;
  font-size: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 10px 14px;
  border-radius: 10px;
  pointer-events: none;
}

@keyframes media-viewer-spin {
  to { transform: rotate(360deg); }
}

.media-viewer img.media-viewer-media,
.media-viewer video.media-viewer-media {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.media-viewer video.media-viewer-media {
  pointer-events: auto;
}

.media-viewer:fullscreen,
.media-viewer:-webkit-full-screen {
  width: 100%;
  height: 100%;
}

.media-viewer:fullscreen .media-viewer-stage,
.media-viewer:-webkit-full-screen .media-viewer-stage {
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

@media (orientation: landscape) {
  .media-viewer-stage {
    padding:
      env(safe-area-inset-top, 8px)
      calc(56px + env(safe-area-inset-right, 0px))
      env(safe-area-inset-bottom, 8px)
      calc(56px + env(safe-area-inset-left, 0px));
  }
}

.media-viewer-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 12px));
  right: max(12px, env(safe-area-inset-right, 12px));
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.media-viewer-nav {
  display: none;
}

.media-viewer-counter {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.feed-load-more {
  width: 100%;
  margin: 14px 0 8px;
}

html.legal-embedded .legal-header,
html.legal-embedded .legal-back {
  display: none;
}

html.legal-embedded .legal-doc {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: var(--bg);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.onboarding-card {
  width: 100%;
  max-width: none;
  height: 100dvh;
  background: var(--bg);
  border: none;
  border-radius: 0;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(18px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.onboarding-slide {
  display: none;
}

.onboarding-slide.is-active {
  display: block;
}

.onboarding-eyebrow {
  margin: 0 0 8px;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.onboarding-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
}

.onboarding-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 16px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.onboarding-dot.active {
  background: var(--accent);
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.upload-stepper {
  display: grid;
  gap: 14px;
}

.upload-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.upload-step-dot.active {
  border-color: rgba(232, 197, 71, 0.45);
  color: var(--accent);
  background: rgba(232, 197, 71, 0.08);
}

.upload-step-line {
  width: 28px;
  height: 1px;
  background: var(--border);
}

.upload-step-label {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.upload-step.hidden {
  display: none;
}

.upload-step:not(.hidden) {
  display: block;
}

#upload-step-details:not(.hidden) {
  display: block;
}

.upload-step-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  z-index: 110;
  padding: 10px 16px 12px;
  background: rgba(5, 6, 8, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.upload-footer-actions {
  display: grid;
  gap: 8px;
}

.upload-footer-actions.has-news {
  grid-template-columns: 1fr 1fr;
}

.upload-footer .btn-upload-submit,
.upload-footer .btn-upload-news {
  width: 100%;
  min-height: 52px;
  margin: 0;
  font-size: 15px;
}

.upload-footer .btn-upload-news {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feed-news-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(var(--app-topbar-h) + 20px)
    14px
    calc(var(--nav-h) + var(--safe-bottom) + 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.feed-news-overlay:not(.hidden) {
  pointer-events: auto;
}

.feed-news-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.feed-news-card {
  position: relative;
  width: min(calc(100vw - 28px), 420px);
  max-width: 100%;
  box-sizing: border-box;
  max-height: none;
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(232, 197, 71, 0.45);
  background: rgba(8, 12, 18, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.feed-news-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.feed-news-media-wrap {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(42vh, 400px);
  background: #050608;
  border-bottom: 1px solid var(--border);
}

.feed-news-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 400px);
  object-fit: cover;
}

.feed-news-body {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px 0;
}

.feed-news-body:not(:empty) {
  padding-bottom: 4px;
}

.feed-news-footer {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(8, 12, 18, 0.98);
  display: grid;
  gap: 12px;
}

.feed-news-admin-actions {
  padding: 0;
  border: 0;
  background: transparent;
}

.feed-news-card.is-fms-template .feed-news-media-wrap,
.feed-news-card.is-fms-template .feed-news-image {
  max-height: min(38vh, 360px);
}

.feed-news-eyebrow {
  margin: 0 0 4px;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.feed-news-title {
  margin: 0 0 12px;
  font-family: "Rajdhani", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
  white-space: pre-wrap;
  color: var(--text);
}

.feed-news-card.is-fms-template .feed-news-title,
.feed-news-card.is-fms-template .feed-news-eyebrow {
  display: none;
}

.feed-news-image.is-fms-template {
  object-fit: contain;
  background: #050608;
}

.news-fms-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}

.news-fms-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-news-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(110, 181, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(110, 181, 255, 0.06);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#upload-news-text-group .upload-field-hint {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-news-panel.hidden {
  display: none;
}

.field-group.hidden {
  display: none;
}

.upload-news-panel-title {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.upload-news-active {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 120, 100, 0.28);
  border-radius: 10px;
  background: rgba(255, 100, 80, 0.06);
}

.upload-news-active-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.upload-news-active-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-news-revoke {
  width: 100%;
}

.news-fms-toggle input {
  margin-top: 3px;
  flex-shrink: 0;
}

#news-message {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#news-message:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(110, 181, 255, 0.2);
}

.field-group.required-empty #news-message {
  border-color: rgba(255, 107, 107, 0.65);
}

.btn-news-newline {
  margin-top: 8px;
  align-self: flex-start;
}

#upload-news-font-group {
  margin-top: 4px;
}

#upload-news-font-group .slider-row {
  margin: 0;
}

.btn-publish-news {
  margin-top: 12px;
  width: 100%;
  min-height: 48px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#upload-news-text-group {
  display: flex;
  flex-direction: column;
}

.news-fms-preview-wrap.hidden {
  display: none;
}

.news-fms-preview-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #050608;
}

.news-fms-preview {
  display: block;
  width: 100%;
  height: auto;
}

.feed-news-card.is-fms-template .feed-news-body {
  display: none;
}

.feed-news-card.is-fms-template .feed-news-footer {
  border-top: 0;
  padding-top: 14px;
}

.feed-news-dismiss-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}

.feed-news-dismiss-label span {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  padding-top: 2px;
}

.feed-news-dismiss-label input {
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

#app-screen[data-active-view="upload"].has-upload-footer .content {
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 88px);
}

.upload-step-nav .btn {
  width: 100%;
  margin: 0;
}

.upload-summary-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
}

.upload-summary-title {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.upload-summary-line {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

