/* ============================================================
   RED™ OS Community — Design System
   Mobile-first PWA. Cyber-fashion, premium, minimal.
   ============================================================ */

:root {
  /* Core palette — deep black canvas */
  --bg: #050505;
  --bg-1: #0a0a0a;
  --bg-2: #0e0e0e;
  --ink: #f6f0e3;                 /* primary text (warm cream) */
  --ink-2: rgba(246, 240, 227, 0.74);
  --ink-3: rgba(246, 240, 227, 0.48);
  --ink-4: rgba(246, 240, 227, 0.16);

  /* Gold / brand */
  --gold: #d2ab57;
  --gold-soft: #f1ddb1;
  --line: rgba(196, 154, 77, 0.22);
  --line-strong: rgba(214, 174, 92, 0.42);

  /* Surfaces */
  --surface: rgba(14, 14, 14, 0.86);
  --surface-strong: rgba(20, 19, 17, 0.94);
  --panel: #111111;
  --panel-2: #171717;
  --panel-3: #1d1d1d;

  /* White / inverted */
  --white: #ffffff;
  --white-soft: #f4f1ea;

  /* Cyber accent gradient (primary CTA ring, story rings) */
  --grad: linear-gradient(135deg, #b17a1a 0%, #d4a84e 28%, #f4d68d 50%, #c89434 74%, #9f6a15 100%);
  --grad-soft: linear-gradient(135deg, rgba(177,122,26,0.72), rgba(244,214,141,0.72), rgba(159,106,21,0.72));

  /* Radii — squircle, premium */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-2xl: 44px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-dot: 'Micro 5', 'Silkscreen', monospace;

  /* Safe areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Layout */
  --max-w: 480px;
  --pad: 20px;
  --dock-h: 88px;
  --app-left: 0px;
  --app-width: 100vw;
}


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100svh;
  touch-action: pan-y;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(210,171,87,0.06), transparent 60%),
    radial-gradient(800px 500px at 80% 90%, rgba(107,71,255,0.07), transparent 60%),
    radial-gradient(900px 700px at 10% 60%, rgba(255,42,104,0.04), transparent 55%),
    #050505;
}

body.drawer-open {
  overflow: hidden;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: 0; color: inherit; font: inherit; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Noise overlay */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background-image: radial-gradient(rgba(255,255,255,0.035) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* ============================================================
   App shell
   ============================================================ */

body.install-gated {
  overflow: hidden;
}

body.install-gated #app,
body.install-gated #hub-panel,
body.install-gated #redos-lightbox,
body.install-gated #install-nudge,
body.install-gated #dock,
body.install-gated .toast {
  display: none !important;
}

.install-gate {
  position: relative;
  display: none;
  min-height: 100svh;
  width: 100%;
  padding: calc(var(--safe-top) + 16px) 18px calc(var(--safe-bottom) + 20px);
}

body.install-gated .install-gate {
  display: block;
}

.install-gate-shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.install-gate-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.install-gate-logo {
  width: 152px;
  height: auto;
  opacity: 0.96;
}

.install-gate-lang {
  padding: 0;
  border: 0;
  background: transparent;
}

.install-gate-lang .lang-btn {
  min-width: 34px;
  height: 30px;
  padding: 0;
  background: transparent;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.08em;
}

.install-gate-lang .lang-btn.is-active {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.install-gate-copy {
  display: grid;
  gap: 10px;
}

.install-gate-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.install-gate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.install-gate-text {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.install-gate-text strong {
  color: #ffffff;
  font-weight: 600;
}

.install-gate-stage-card {
  position: relative;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(20, 18, 14, 0.92), rgba(10, 10, 10, 0.98)),
    rgba(10, 10, 10, 0.96);
  box-shadow: 0 30px 70px rgba(0,0,0,0.42);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.install-gate-stage-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, rgba(241,221,177,0.08), transparent 55%);
}

.install-gate-stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.install-gate-stage-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.install-gate-stage-sub {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.install-gate-stage-pill {
  min-width: 62px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(241, 221, 177, 0.14);
  background: rgba(241, 221, 177, 0.06);
  color: var(--gold-soft);
  padding: 7px 12px;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.install-gate-media-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(19,19,19,0.96), rgba(8,8,8,0.98));
  border: 1px solid rgba(241, 221, 177, 0.08);
  aspect-ratio: 9 / 18.5;
  min-height: 440px;
}

.install-gate-media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.22));
}

.install-gate-media-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.install-gate-media-stage video,
.install-gate-media-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.install-gate-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(210,171,87,0.12), transparent 60%), #0b0b0b;
}

.install-gate-media-placeholder strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.install-gate-media-placeholder span {
  max-width: 24ch;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.install-gate-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.install-gate-page-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(241, 221, 177, 0.12);
  background: rgba(241, 221, 177, 0.04);
  color: var(--ink-2);
  font-size: 0.84rem;
}

.install-gate-page-btn.is-active {
  color: #0c0c0c;
  background: var(--grad);
  border-color: rgba(241, 221, 177, 0.24);
}

.install-gate-entry-wrap {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 14px 0 0;
}

.install-gate-entry-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

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

.install-gate-entry {
  min-height: 76px;
  border-radius: 22px;
  border: 1px solid rgba(241, 221, 177, 0.1);
  background: rgba(16, 16, 16, 0.86);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.install-gate-entry.is-active {
  border-color: rgba(241, 221, 177, 0.28);
  background: linear-gradient(180deg, rgba(28, 24, 16, 0.94), rgba(15, 14, 12, 0.98));
  box-shadow: inset 0 0 0 1px rgba(241, 221, 177, 0.04);
}

.install-gate-entry-os {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.install-gate-entry-copy {
  font-size: 0.95rem;
  color: var(--ink);
}

.install-gate-entry-note {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--ink-3);
}

body.app-light.install-gated {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(210,171,87,0.09), transparent 60%),
    #f3f3f3;
}

body.app-light.install-gated .install-gate-title { color: #141414; }

body.app-light.install-gated .install-gate-lang .lang-btn { color: rgba(20,20,20,0.34); }
body.app-light.install-gated .install-gate-lang .lang-btn.is-active { color: #121212; }
body.app-light.install-gated .install-gate-text,
body.app-light.install-gated .install-gate-entry-label,
body.app-light.install-gated .install-gate-stage-sub,
body.app-light.install-gated .install-gate-media-placeholder span { color: rgba(20,20,20,0.62); }
body.app-light.install-gated .install-gate-stage-card,
body.app-light.install-gated .install-gate-entry {
  background: rgba(255,255,255,0.84);
  border-color: rgba(191, 146, 63, 0.16);
}
body.app-light.install-gated .install-gate-stage-pill,
body.app-light.install-gated .install-gate-page-btn { color: #5f4413; }
body.app-light.install-gated .install-gate-entry-copy,
body.app-light.install-gated .install-gate-stage-label,
body.app-light.install-gated .install-gate-media-placeholder strong { color: #121212; }
body.app-light.install-gated .install-gate-entry-note { color: rgba(20,20,20,0.56); }
body.app-light.install-gated .install-gate-media-frame {
  background: linear-gradient(180deg, rgba(250,248,244,0.98), rgba(236,232,225,0.98));
  border-color: rgba(191,146,63,0.12);
}

@media (max-width: 380px) {
  .install-gate {
    padding-left: 14px;
    padding-right: 14px;
  }
  .install-gate-stage-card {
    padding: 14px;
  }
  .install-gate-media-frame {
    min-height: 400px;
  }
}

#app {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100svh;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--dock-h) + var(--safe-bottom) + 16px);
  overflow: visible;
}

.view {
  display: none;
  animation: viewIn .35s ease both;
}
.view.is-active { display: block; min-height: 100svh; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.motion-item {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.985);
  animation: motionItemIn .48s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(var(--motion-index, 0) * 42ms);
  will-change: transform, opacity;
}

@keyframes motionItemIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* ============================================================
   Brand wordmark — dot-matrix "RED" + "OS" + "Community"
   ============================================================ */

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.14em;
}
.wordmark .row {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.wordmark .red {
  font-family: var(--font-dot);
  font-size: 2.2rem;
  color: #fff;
  letter-spacing: 0.12em;
  line-height: 1;
  font-weight: 400;
}
.wordmark .os {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.08em;
}
.wordmark .community {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 500;
}

.wordmark.sm .red { font-size: 1.3rem; }
.wordmark.sm .os { font-size: 0.78rem; }
.wordmark.sm .community { font-size: 0.6rem; letter-spacing: 0.34em; }

/* ============================================================
   Typography helpers
   ============================================================ */

.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.eyebrow {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.32em; color: var(--gold); font-weight: 500;
}
.muted { color: var(--ink-2); }
.tiny { font-size: 0.78rem; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 22px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
  min-height: 52px;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Primary — the iconic gradient-ring pill */
.btn-grad {
  position: relative;
  background: linear-gradient(180deg, #18120b 0%, #110d09 100%);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--r-pill);
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255,235,190,0.14);
}
.btn-grad::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.btn-grad::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: inherit;
  background: var(--grad);
  filter: blur(16px);
  opacity: 0.42;
  z-index: -1;
  pointer-events: none;
}

.btn-solid {
  background: #fff; color: #0a0a0a;
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-dark {
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--ink-4);
}
.btn-block { width: 100%; }

/* ============================================================
   Inputs — dark pill
   ============================================================ */

.field { display: block; margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-3);
  margin: 0 0 8px 16px;
  letter-spacing: 0.04em;
}
.input, .textarea, .select {
  width: 100%;
  padding: 18px 20px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 0.98rem;
  transition: border-color .2s ease, background .2s ease;
}
.textarea {
  border-radius: var(--r-md);
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--line-strong);
  background: var(--panel-3);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.field-action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

/* ============================================================
   AUTH — Sign in / Sign up (liquid blob top)
   ============================================================ */

.auth {
  position: relative;
  min-height: 100svh;
  padding: 0 0 40px;
  overflow: hidden;
}

.auth-blob {
  position: relative;
  height: 300px;
  background: #f6f1e7;
  /* Organic bottom edge via SVG mask */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'><path d='M0,0 L400,0 L400,210 C360,250 320,220 280,240 C240,260 210,250 180,240 C140,225 110,265 70,250 C40,238 20,258 0,240 Z' fill='black'/></svg>");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' preserveAspectRatio='none'><path d='M0,0 L400,0 L400,210 C360,250 320,220 280,240 C240,260 210,250 180,240 C140,225 110,265 70,250 C40,238 20,258 0,240 Z' fill='black'/></svg>");
          mask-size: 100% 100%;
          mask-repeat: no-repeat;
  display: flex;
  align-items: flex-start;
  padding: calc(var(--safe-top) + 22px) 24px 0;
}

.auth-topbar {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
}
.auth-chip {
  width: 44px; height: 44px; border-radius: 12px;
  background: #0a0a0a; color: #fff;
  display: grid; place-items: center;
}
.auth-switch {
  display: inline-flex; align-items: center; gap: 8px;
  color: #0a0a0a; font-weight: 500;
  padding: 8px 10px; border-radius: var(--r-pill);
}
.auth-switch .ico {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid #0a0a0a;
  display: grid; place-items: center;
}

.auth-title {
  position: absolute;
  top: calc(var(--safe-top) + 100px);
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 500;
  color: #0a0a0a;
  letter-spacing: -0.01em;
}

.auth-body {
  padding: 40px 24px 24px;
  display: flex; flex-direction: column; gap: 6px;
}

.auth-footer {
  margin-top: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.auth-tagline {
  font-size: 0.74rem;
  color: var(--ink-3);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 10px;
}

.forgot {
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: -6px 16px 18px 0;
}

/* ============================================================
   ONBOARDING — category picker
   ============================================================ */

.onb {
  padding: calc(var(--safe-top) + 24px) var(--pad) 24px;
  min-height: 100svh;
}
.onb-head { text-align: center; margin-bottom: 28px; }
.onb-head h1 {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 500;
  margin: 16px 0 8px; letter-spacing: -0.01em;
}
.onb-head p { color: var(--ink-2); margin: 0; }

.category-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }

.category-card {
  position: relative;
  display: block;
  border-radius: var(--r-xl);
  padding: 28px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.category-card:active { transform: scale(0.99); }
.category-card[aria-pressed="true"] {
  border-color: transparent;
}
.category-card[aria-pressed="true"]::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.category-card .tag {
  font-size: 0.7rem; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.category-card h3 {
  font-family: var(--font-display);
  font-size: 1.85rem; font-weight: 500; margin: 0 0 8px;
}
.category-card p { color: var(--ink-2); margin: 0; font-size: 0.92rem; }
.category-card .chev {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  opacity: 0.5;
}

/* Profile setup */
.avatar-picker {
  position: relative;
  width: 130px; height: 130px;
  margin: 8px auto 22px;
  border-radius: 50%;
  background: var(--panel-2);
  display: grid; place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.avatar-picker::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 2px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.avatar-picker img { width: 100%; height: 100%; object-fit: cover; }
.avatar-picker .ph { color: var(--ink-3); font-size: 32px; }
.avatar-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ============================================================
   TOP APP BAR (feed)
   ============================================================ */

.topbar {
  position: sticky;
  top: 0; z-index: 20;
  padding: calc(var(--safe-top) + 14px) var(--pad) 10px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(5,5,5,0.95), rgba(5,5,5,0.75) 70%, rgba(5,5,5,0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-left, .topbar-right {
  display: flex; align-items: center; gap: 10px;
}

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #0a0a0a;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.icon-btn.ghost {
  background: transparent; color: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.icon-btn.dark {
  background: var(--panel-2); color: #fff;
  border: 1px solid var(--ink-4);
  box-shadow: none;
}

.bell-wrap { position: relative; }
.bell-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0d0d0d;
  color: #fff;
  font-size: 10px; font-weight: 600;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold);
}

/* ============================================================
   STORIES row
   ============================================================ */

.stories {
  display: flex;
  gap: 14px;
  padding: 14px var(--pad) 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }

.story {
  flex: 0 0 auto;
  width: 108px;
  scroll-snap-align: start;
  text-align: center;
  cursor: pointer;
}
.story-tile {
  position: relative;
  width: 108px; height: 132px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.story-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.story:active .story-tile img { transform: scale(1.04); }
.story-tile.is-new::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 2px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.story-name {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 4px;
}

/* ============================================================
   FEED — inverted white post cards
   ============================================================ */

.feed {
  display: flex; flex-direction: column; gap: 28px;
  padding: 6px var(--pad) 40px;
}

.post {
  position: relative;
  background: #f5f1e8;
  color: #0a0a0a;
  border-radius: var(--r-xl);
  padding: 18px 18px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.post-hint {
  font-weight: 600;
  text-align: center;
  font-size: 0.88rem;
  color: #0a0a0a;
  margin: 4px 0 14px;
  opacity: 0.78;
}

.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  background: #1f1f1f; overflow: hidden; flex-shrink: 0;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-ident { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.post-name { font-weight: 600; font-size: 1rem; }
.post-meta {
  display: flex; align-items: center; gap: 8px;
  color: #0a0a0a;
  font-size: 0.82rem;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #0a0a0a; opacity: 0.4; }
.post-meta .handle { opacity: 0.6; }

.post-body { display: grid; grid-template-columns: 1fr; gap: 14px; }
.post-body.has-media { grid-template-columns: 110px 1fr; }
.post-media {
  border-radius: 16px;
  background: #e9e3d6;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-text {
  font-size: 0.94rem;
  line-height: 1.45;
  color: #0a0a0a;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-foot {
  margin-top: 14px;
  display: flex; align-items: center; gap: 18px;
  font-size: 0.9rem;
}
.post-act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 2px;
  color: #0a0a0a;
}
.post-act.is-liked { color: #ff2a68; }
.post-act svg { width: 20px; height: 20px; }

/* Double-tap heart burst */
.post { overflow: hidden; }
.heart-burst {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  color: #ff2a68;
  filter: drop-shadow(0 10px 20px rgba(255,42,104,0.6));
}
.heart-burst.go { animation: burst .7s ease-out forwards; }
@keyframes burst {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.2); }
  35%  { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.8); }
}

/* ============================================================
   RIGHT FLOATING RAIL (feed actions)
   ============================================================ */

.rail {
  position: fixed;
  right: calc(max(8px, 50% - var(--max-w)/2 + 8px));
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 86px);
  z-index: 18;
  display: flex; flex-direction: column; gap: 6px;
  padding: 5px;
  border-radius: var(--r-pill);
  background: rgba(18,18,18,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ink-4);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
.rail .icon-btn.dark { width: 38px; height: 38px; }
.rail .icon-btn.dark svg { width: 15px; height: 15px; }
.rail.hide { opacity: 0; pointer-events: none; transform: translateY(8px); }
.rail:not(.hide) { opacity: 1; transform: translateY(0); transition: opacity .22s ease, transform .22s ease; }

/* ============================================================
   BOTTOM DOCK — floating pill (nav)
   ============================================================ */

.dock {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 14px);
  left: 50%; transform: translateX(-50%);
  width: calc(min(var(--max-w), 100vw) - 24px);
  height: 66px;
  z-index: 19;
  padding: 8px;
  border-radius: var(--r-pill);
  background: rgba(18,18,18,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--ink-4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
.dock-btn {
  height: 50px;
  display: grid; place-items: center;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: color .2s ease, background .2s ease;
}
.dock-btn.is-active { color: #fff; background: rgba(255,255,255,0.06); }
.dock-btn svg { width: 22px; height: 22px; }
.dock-btn.is-compose {
  position: relative;
  color: #fff;
}
.dock-btn.is-compose::before {
  content: ""; position: absolute; inset: 6px;
  border-radius: var(--r-pill);
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: 0 0 22px rgba(212,168,78,0.24);
}

/* ============================================================
   PROFILE
   ============================================================ */

.prof-head {
  padding: 16px var(--pad) 10px;
  display: flex; flex-direction: column; gap: 14px;
}
.prof-top { display: flex; gap: 18px; align-items: center; }
.prof-avatar {
  position: relative;
  width: 92px; height: 92px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--panel-2);
}
.prof-avatar::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 2px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-stats { display: flex; gap: 18px; flex: 1; }
.prof-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-stat .n {
  font-size: 1.1rem; font-weight: 600;
  font-family: var(--font-display);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.prof-stat .n.is-text {
  font-size: 0.85rem;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.prof-stat .l { color: var(--ink-3); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; }

.prof-ident h2 {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 500;
  margin: 4px 0 2px;
}
.prof-ident .handle {
  color: var(--ink-3);
  font-size: 0.92rem;
  margin-top: 2px;
}
.profile-cert-row {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  margin: 8px 0 10px;
}
.profile-cert-row.hide { display: none; }
.profile-cert-row .redos-cert-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: 0;
  max-width: min(260px, 100%);
}
.profile-cert-row .redos-cert {
  max-width: 100%;
}
.profile-cert-row .redos-cert-founder,
.profile-cert-row .redos-cert-selected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-cert-row .redos-cert-founder {
  padding: 5px 12px 4px;
  border-radius: 999px;
  letter-spacing: 0.12em;
}
.profile-cert-row .redos-cert-selected {
  padding: 5px 10px;
  border: 1px solid rgba(210, 171, 87, 0.42);
  border-radius: 999px;
}
.profile-cert-row .redos-cert-selected svg {
  width: 15px;
  height: 15px;
}
.prof-tags {
  margin-top: 0;
}
.prof-tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--panel-2);
  border: 1px solid var(--ink-4);
  font-size: 0.78rem;
  color: var(--ink-2);
}
.chip.gold { color: var(--gold); border-color: var(--line); }

.prof-bio {
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.5;
}
.prof-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold-soft);
  font-size: 0.88rem;
  word-break: break-all;
}

.prof-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px var(--pad) 18px;
  width: calc(100% - (var(--pad) * 2));
  max-width: 560px;
  margin: 0 auto;
  align-items: center;
}
.prof-actions .btn {
  justify-content: center;
  min-height: 56px;
}

.prof-tabs {
  display: flex;
  border-top: 1px solid var(--ink-4);
  margin: 4px 0 0;
}
.prof-tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  color: var(--ink-3);
  position: relative;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.prof-tab.is-active { color: var(--ink); }
.prof-tab.is-active::after {
  content: "";
  position: absolute; left: 30%; right: 30%; bottom: 0; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.prof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px var(--pad) 40px;
}
.prof-cell {
  width: 100%;
  min-height: 0;
  border-radius: var(--r-xl);
  background: #f5f1e8;
  color: #0a0a0a;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(20,19,17,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  padding: 18px 18px 16px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.prof-cell .post-head { margin-bottom: 14px; }
.prof-cell .post-body { display: grid; grid-template-columns: 1fr; gap: 14px; }
.prof-cell .post-body.has-media { grid-template-columns: 110px 1fr; }
.prof-cell .post-media {
  border-radius: 16px;
  background: #e9e3d6;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.prof-cell .post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prof-cell .post-text {
  font-size: 0.94rem;
  line-height: 1.45;
  color: #0a0a0a;
  white-space: pre-wrap;
  word-break: break-word;
}
.prof-cell .post-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
}
.prof-cell::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 120px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

/* ============================================================
   COMPOSE / POST create
   ============================================================ */

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 14px) var(--pad) 14px;
  border-bottom: 1px solid var(--ink-4);
}
.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 500; margin: 0;
}
.link-btn {
  font-size: 0.94rem;
  color: var(--gold-soft);
  padding: 8px 12px;
}
.link-btn[disabled] { opacity: 0.4; }

.compose {
  padding: 18px var(--pad) calc(var(--dock-h) + var(--safe-bottom) + 34px);
  display: flex; flex-direction: column; gap: 16px;
}
.compose-top { display: flex; gap: 12px; align-items: center; }
.compose-top .av {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2);
}
.compose-top .av img { width: 100%; height: 100%; object-fit: cover; }
.compose-who { display: flex; flex-direction: column; }
.compose-who .n { font-weight: 600; }
.compose-who .c { font-size: 0.78rem; color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; }

.compose textarea {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.5;
  min-height: 180px;
  resize: none;
  padding: 0;
  width: 100%;
}
.compose textarea:focus { outline: none; }

.media-slot {
  position: relative;
  border-radius: var(--r-md);
  border: 1px dashed var(--ink-4);
  padding: 18px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.88rem;
  overflow: hidden;
}
.media-slot.has-img { border-style: solid; padding: 0; }
.media-slot img { width: 100%; max-height: 420px; object-fit: cover; }
.media-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-slot .rm {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  border: 1px solid var(--ink-4);
}

/* ============================================================
   COMMENTS
   ============================================================ */

.comments {
  padding: 10px var(--pad) 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.comment {
  display: flex; gap: 12px; align-items: flex-start;
}
.comment .av {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: var(--panel-2);
}
.comment .av img { width: 100%; height: 100%; object-fit: cover; }
.comment .body {
  background: var(--panel-2);
  border-radius: 16px;
  padding: 10px 14px;
  max-width: 85%;
}
.comment .body .n {
  font-size: 0.8rem; font-weight: 600; margin-bottom: 2px;
  color: var(--ink);
}
.comment .body .t { color: var(--ink-2); font-size: 0.9rem; }

.comment-composer {
  position: sticky;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 16px);
  margin: 0 var(--pad);
  display: flex; gap: 10px; align-items: center;
  padding: 8px;
  background: rgba(18,18,18,0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ink-4);
  border-radius: var(--r-pill);
}
.comment-composer input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 10px 14px;
  color: var(--ink);
}
.comment-composer input:focus { outline: none; }
.comment-composer button {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #0a0a0a;
  display: grid; place-items: center;
}

/* ============================================================
   MESSAGES — thread list + conversation
   ============================================================ */

.msg-list {
  padding: 6px 12px calc(var(--dock-h) + var(--safe-bottom) + 24px);
}
.msg-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border-radius: var(--r-lg);
  transition: background .2s ease;
  cursor: pointer;
}
.msg-item:active { background: var(--panel-2); }
.msg-item .av {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2); flex-shrink: 0;
}
.msg-item .av img { width: 100%; height: 100%; object-fit: cover; }
.msg-item .mid { flex: 1; min-width: 0; }
.msg-item .n { font-weight: 600; color: var(--ink); }
.msg-item .p {
  color: var(--ink-2);   /* was ink-3 (48%) — bumped to ink-2 (74%) for legibility */
  font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-item .time { font-size: 0.74rem; color: var(--ink-3); }

.thread-head {
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 14px) var(--pad) 14px;
  border-bottom: 1px solid var(--ink-4);
}
.thread-head .av {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2);
}
.thread-head .av img { width: 100%; height: 100%; object-fit: cover; }
.thread-head .who .n { font-weight: 600; }
.thread-head .who .s { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.thread-head .who { flex: 1; min-width: 0; }

.thread {
  padding: 18px var(--pad) 100px;
  display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.94rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.bubble.me {
  align-self: flex-end;
  background: #fff;
  color: #0a0a0a;
  border-bottom-right-radius: 6px;
}
.bubble.them {
  align-self: flex-start;
  background: var(--panel-2);
  color: var(--ink);
  border-bottom-left-radius: 6px;
  border: 1px solid var(--ink-4);
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings {
  padding: 8px var(--pad) 40px;
  display: flex; flex-direction: column; gap: 22px;
}
.settings-group { display: flex; flex-direction: column; gap: 2px; }
.settings-group .label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 16px 10px;
}
.settings-card {
  background: var(--panel);
  border: 1px solid var(--ink-4);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ink-4);
}
.settings-row:last-child { border-bottom: 0; }
.settings-row .k { color: var(--ink); font-size: 0.95rem; }
.settings-row .v { color: var(--ink-3); font-size: 0.88rem; }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px;
  background: var(--panel-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--ink-4);
}
.seg button {
  padding: 10px 12px;
  border-radius: var(--r-pill);
  font-size: 0.84rem;
  color: var(--ink-2);
  font-weight: 500;
}
.seg button.is-active {
  background: #fff; color: #0a0a0a;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 24px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  background: #fff; color: #0a0a0a;
  border-radius: var(--r-pill);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  z-index: 200;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   MODAL (image viewer / install prompt)
   ============================================================ */

.modal {
  position: fixed; inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}
.modal.show { display: flex; }
.modal-card {
  width: 100%; max-width: var(--max-w);
  background: var(--bg-1);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  border: 1px solid var(--ink-4);
  padding: 20px;
  animation: modalIn .28s ease both;
}
@keyframes modalIn {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   UTIL
   ============================================================ */

.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.center { text-align: center; }
.pad { padding: 0 var(--pad); }
.space { height: 20px; }

/* Scrollbars */
::-webkit-scrollbar { width: 0; height: 0; }

/* Respect larger screens but keep mobile framing */
@media (min-width: 520px) {
  body::before, body::after {
    content: "";
    position: fixed; top: 0; bottom: 0; width: calc((100vw - var(--max-w)) / 2);
    pointer-events: none; z-index: 0;
  }
  body::before { left: 0; background: radial-gradient(ellipse at right, rgba(255,255,255,0.015), transparent 70%); }
  body::after  { right: 0; background: radial-gradient(ellipse at left, rgba(255,255,255,0.015), transparent 70%); }
}

/* ============================================================
   V1.1 finishing layer — logo, language, intro, premium light app
   ============================================================ */

.brand-logo {
  display: block;
  width: min(220px, 62vw);
  height: auto;
}
.brand-logo-sm {
  width: min(180px, 52vw);
  margin-inline: auto;
}
.auth-logo {
  width: min(178px, 50vw);
  filter: brightness(1.08);
}
.auth-topbar-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10,10,10,0.06);
  border: 1px solid rgba(10,10,10,0.08);
}
.lang-btn {
  min-width: 42px;
  height: 34px;
  border-radius: 999px;
  color: rgba(10,10,10,0.72);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lang-btn.is-active {
  background: #0a0a0a;
  color: #fff;
}

.intro-screen {
  min-height: 100svh;
  padding: calc(var(--safe-top) + 18px) 16px calc(var(--safe-bottom) + 22px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(180deg, #faf7f2 0%, #f2ece4 100%);
}
.intro-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(20,19,17,0.08);
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
}
.intro-stage img {
  width: auto;
  max-width: calc(100% - 36px);
  height: auto;
  max-height: calc(100svh - 210px);
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}
.intro-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.intro-pill,
.intro-skip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  background: rgba(20,19,17,0.72);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
}
.intro-bottom {
  padding-bottom: 4px;
}
.intro-bottom .btn {
  min-height: 58px;
}

body.app-light {
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(255,255,255,0.95), transparent 55%),
    radial-gradient(900px 520px at 10% 30%, rgba(251,244,236,0.9), transparent 60%),
    linear-gradient(180deg, #fcfaf7 0%, #f5f1eb 50%, #f1ede6 100%);
}
body.app-light,
body.app-light html {
  color: #181614;
}
body.app-light .noise {
  opacity: 0.2;
  mix-blend-mode: multiply;
}
body.app-light {
  --bg: #f7f3ee;
  --bg-1: #fbf9f6;
  --bg-2: #f2ede6;
  --ink: #141311;
  --ink-2: rgba(20,19,17,0.72);
  --ink-3: rgba(20,19,17,0.48);
  --ink-4: rgba(20,19,17,0.12);
  --surface: rgba(255,255,255,0.82);
  --surface-strong: rgba(255,255,255,0.92);
  --panel: rgba(255,255,255,0.78);
  --panel-2: rgba(255,255,255,0.92);
  --panel-3: #ffffff;
  --line: rgba(20,19,17,0.1);
  --line-strong: rgba(20,19,17,0.18);
  --shadow-1: 0 14px 36px rgba(0,0,0,0.08);
  --shadow-2: 0 28px 64px rgba(0,0,0,0.12);
}
body.app-light .topbar,
body.app-light .sheet-head,
body.app-light .thread-head {
  background: linear-gradient(180deg, rgba(247,243,238,0.94), rgba(247,243,238,0.74));
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(20,19,17,0.08);
}
body.app-light .icon-btn,
body.app-light .icon-btn.dark {
  background: rgba(255,255,255,0.92);
  color: #141311;
  border: 1px solid rgba(20,19,17,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}
body.app-light .icon-btn.ghost {
  background: rgba(255,255,255,0.78);
}
body.app-light .stories {
  background: transparent;
}
body.app-light .story-name,
body.app-light .post-meta,
body.app-light .post-text,
body.app-light .prof-bio,
body.app-light .prof-link,
body.app-light .v,
body.app-light .comment .body .t,
body.app-light .msg-item .p,
body.app-light .time,
body.app-light .muted {
  color: rgba(20,19,17,0.62);
}
body.app-light .story-tile,
body.app-light .prof-avatar,
body.app-light .comment .av,
body.app-light .msg-item .av,
body.app-light .thread-head .av,
body.app-light .compose-top .av {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
body.app-light .post,
body.app-light .settings-card,
body.app-light .prof-head,
body.app-light .msg-item,
body.app-light .comment .body,
body.app-light .media-slot,
body.app-light .prof-cell,
body.app-light .modal-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,244,238,0.96));
  border-color: rgba(20,19,17,0.08);
  box-shadow: 0 18px 44px rgba(0,0,0,0.08);
}
body.app-light .post-hint {
  color: rgba(20,19,17,0.5);
}
body.app-light .post-media {
  background: linear-gradient(180deg, #ffffff, #f5efe8);
}
body.app-light .prof-cell {
  background: #f5f1e8;
  color: #141311;
}
body.app-light .prof-cell .post-text,
body.app-light .prof-cell .post-name,
body.app-light .prof-cell .post-meta,
body.app-light .prof-cell .post-act {
  color: #141311;
}
body.app-light .prof-cell .post-meta .handle { opacity: 0.6; }
body.app-light .prof-tab.is-active,
body.app-light .settings-row .k,
body.app-light .post-name,
body.app-light .prof-ident h2,
body.app-light .msg-item .n,
body.app-light .thread-head .who .n,
body.app-light .compose-who .n,
body.app-light .comment .body .n {
  color: #141311;
}
body.app-light .bubble.them {
  background: rgba(255,255,255,0.94);
  color: #141311;
  border-color: rgba(20,19,17,0.08);
}
body.app-light .bubble.me,
body.app-light .comment-composer button,
body.app-light .seg button.is-active {
  background: #141311;
  color: #fff;
}
body.app-light .comment-composer {
  background: rgba(255,255,255,0.9);
  border-color: rgba(20,19,17,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.1);
}
body.app-light .comment-composer input,
body.app-light .comment-composer textarea,
body.app-light .compose textarea,
body.app-light .thread input,
body.app-light .thread textarea {
  color: #141311;
}
body.app-light .input,
body.app-light .textarea,
body.app-light .select {
  background: rgba(255,255,255,0.94);
  color: #141311;
  border-color: rgba(20,19,17,0.08);
}
body.app-light .input::placeholder,
body.app-light .textarea::placeholder {
  color: rgba(20,19,17,0.36);
}
body.app-light .dock {
  background: rgba(255,255,255,0.85);
  border-color: rgba(20,19,17,0.08);
  box-shadow: 0 24px 50px rgba(0,0,0,0.12);
}
body.app-light .dock-btn {
  color: rgba(20,19,17,0.54);
}
body.app-light .dock-btn.is-active {
  color: #141311;
  background: rgba(20,19,17,0.06);
}
body.app-light .rail .icon-btn.dark {
  background: rgba(12,12,12,0.92);
  color: #fff;
}
body.app-light .seg {
  background: rgba(20,19,17,0.04);
  border-color: rgba(20,19,17,0.08);
}
body.app-light .seg button {
  color: rgba(20,19,17,0.56);
}
body.app-light .prof-tags .tag,
body.app-light .post-category-badge,
body.app-light .story-category {
  background: rgba(20,19,17,0.05);
  color: #141311;
  border: 1px solid rgba(20,19,17,0.08);
}
body.app-light .thread,
body.app-light .feed,
body.app-light .msg-list,
body.app-light .comments,
body.app-light .settings,
body.app-light .compose {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.prof-tags .tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ink-4);
  font-size: 0.78rem;
  color: var(--ink-2);
}
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ink-4);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.story-category {
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Dark mode bubble — matches light mode shape */
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(246, 240, 227, 0.14);
  color: var(--ink-2);
}

@media (max-width: 390px) {
  .intro-screen {
    padding-inline: 10px;
  }
  .intro-stage img {
    max-width: calc(100% - 18px);
  }
  .auth-title {
    font-size: 3rem;
  }
  .comment-composer {
    margin-inline: 14px;
  }
}

.notif-item { width: 100%; text-align: left; }
.empty-state { padding: 28px 16px; text-align: center; color: var(--ink-3); }


/* V17 safe additions */
.compose-seg { max-width: 240px; margin-bottom: 2px; }
.edit-presence-compose { padding-top: 8px; }
.edit-presence-hero { text-align: center; padding: 2px 0 8px; }
.edit-presence-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 500; margin: 0; color: var(--ink); }
.signal-card {
  background: rgba(255,248,232,0.96);
  color: #16130f;
  border: 1px solid rgba(210,171,87,0.22);
  border-radius: 28px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}
.signal-top { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.signal-icon { width:34px; height:34px; border-radius:999px; display:grid; place-items:center; background: rgba(210,171,87,0.12); color:#9d7423; }
.signal-kicker { font-size:0.72rem; letter-spacing:0.22em; text-transform:uppercase; color:#9d7423; font-weight:700; }
.signal-time { margin-left:auto; font-size:0.84rem; color:rgba(22,19,15,0.52); }
.signal-name { font-weight:600; margin-bottom:10px; }
.signal-copy { font-size:1.02rem; line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.signal-foot { margin-top:14px; display:flex; gap:16px; }
body.app-light .signal-card { background:#fffaf0; }
body.app-light .view[data-view="edit-profile"] .sheet-head { background: linear-gradient(180deg, rgba(247,243,238,0.96), rgba(247,243,238,0.82) 72%, rgba(247,243,238,0)); }
body.app-light .edit-presence-hero h1 { color:#141311; }


/* ============================================================
   V1.2 enhancement layer
   ============================================================ */

.business-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(4,4,4,0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity .22s ease;
}
.business-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(88vw, 390px);
  z-index: 121;
  background: linear-gradient(180deg, rgba(10,10,10,0.96), rgba(13,13,13,0.94));
  border-right: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  overflow-y: auto;
  transform: translateX(0);
  transition: transform .24s ease, opacity .24s ease;
}
.business-drawer.hide {
  transform: translateX(-102%);
  opacity: 0;
  pointer-events: none;
}
.business-drawer-backdrop.hide {
  opacity: 0;
  pointer-events: none;
}
.business-drawer-inner {
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 26px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.business-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.business-drawer-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
}
.business-drawer-sub {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 0.9rem;
  line-height: 1.45;
}
.business-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--ink-4);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}
.business-drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ink-4);
}
.business-drawer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-2);
  flex-shrink: 0;
}
.business-drawer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.business-drawer-user-name {
  font-weight: 600;
  color: var(--ink);
}
.business-drawer-user-meta {
  color: var(--ink-3);
  font-size: 0.84rem;
  margin-top: 2px;
}
.business-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.business-drawer-section-title,
.business-mini-label {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.business-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.business-inline-btn,
.business-link-row {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--ink-4);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.business-inline-btn.is-active {
  border-color: var(--line-strong);
  color: var(--gold-soft);
}
.business-link-row {
  width: 100%;
  justify-content: flex-start;
}
.business-link-row.danger {
  color: #ff8f8f;
}
.business-settings-block {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ink-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.business-drawer-hint {
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.45;
}
.business-seg {
  background: rgba(255,255,255,0.03);
}
.business-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 2px;
  color: var(--ink);
}
.business-link-card {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(210,171,87,0.18);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(210,171,87,0.08), transparent 55%),
    rgba(255,255,255,0.035);
  color: var(--ink);
}
.business-link-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.1;
}
.business-link-meta {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.84rem;
}

.business-form-shell {
  padding: 16px var(--pad) calc(var(--dock-h) + var(--safe-bottom) + 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.business-progress {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--ink-4);
  background: rgba(255,255,255,0.03);
}
.business-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.business-progress-step,
.business-progress-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.business-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.business-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad);
  transition: width .24s ease;
}
.business-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ink-4);
}
.business-step-label {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.08;
  color: var(--ink);
}
.business-input,
.business-textarea,
.business-readonly {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--ink-4);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  padding: 14px 16px;
}
.business-textarea {
  min-height: 180px;
  resize: none;
}
.business-textarea:focus,
.business-input:focus {
  outline: none;
  border-color: var(--line-strong);
}
.business-readonly {
  color: var(--ink-2);
  line-height: 1.5;
}
.business-form-actions {
  display: flex;
  gap: 10px;
}
.business-form-disclaimer {
  margin-top: -2px;
  padding: 0 6px;
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-align: center;
  opacity: 0.92;
}
.business-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.business-review-hint {
  color: var(--ink-3);
  font-size: 0.9rem;
}
.business-review-row {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ink-4);
}
.business-review-label {
  color: var(--gold-soft);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.business-review-value {
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.signal-meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.signal-meta-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.signal-meta-field span {
  margin-left: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.signal-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}
.signal-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(210,171,87,0.11);
  color: #8d6820;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.post-media.is-video {
  position: relative;
  background: #161514;
}
.post-media video,
.media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.post-media-badge,
.media-slot-type {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10,10,10,0.76);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 1;
}
.media-slot.has-video {
  min-height: 240px;
  padding: 0;
  background: #121212;
}
.media-slot.has-video video {
  aspect-ratio: 9/16;
  max-height: 460px;
}
.post-media-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 180px;
  padding: 18px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 0.86rem;
  line-height: 1.45;
}

.mini-toast {
  position: fixed;
  right: 14px;
  top: calc(var(--safe-top) + 18px);
  z-index: 130;
  max-width: min(320px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(14,14,14,0.92);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 42px rgba(0,0,0,0.32);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.mini-toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.app-light .business-drawer {
  background: linear-gradient(180deg, rgba(247,243,238,0.98), rgba(247,243,238,0.96));
  color: #141311;
}
body.app-light .business-drawer-sub,
body.app-light .business-drawer-user-meta,
body.app-light .business-drawer-hint,
body.app-light .business-review-hint,
body.app-light .business-form-disclaimer {
  color: rgba(20,19,17,0.58);
}
body.app-light .business-link-card,
body.app-light .business-settings-block,
body.app-light .business-step,
body.app-light .business-progress,
body.app-light .business-readonly,
body.app-light .business-input,
body.app-light .business-textarea {
  background: rgba(255,255,255,0.78);
  color: #141311;
  border-color: rgba(20,19,17,0.08);
}
body.app-light .business-inline-btn,
body.app-light .business-link-row {
  background: rgba(255,255,255,0.86);
  color: #141311;
  border-color: rgba(20,19,17,0.08);
}
body.app-light .post-media-badge,
body.app-light .media-slot-type,
body.app-light .mini-toast {
  background: rgba(20,19,17,0.88);
  color: #fff;
}
body.app-light .signal-meta-chip {
  background: rgba(210,171,87,0.15);
}
@media (max-width: 380px) {
  .signal-meta-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   V1.3 mobile polish + motion pass
   ============================================================ */

.btn,
.icon-btn,
.dock-btn,
.story-tile,
.story-name,
.post,
.signal-card,
.msg-item,
.settings-card,
.settings-row,
.business-inline-btn,
.business-link-row,
.business-link-card,
.seg button,
.comment-composer,
.comment-composer button,
.link-btn,
.prof-tab,
.tag,
.input,
.textarea,
.select {
  transition:
    transform .22s cubic-bezier(.22, 1, .36, 1),
    opacity .22s ease,
    background-color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    color .22s ease;
}

.btn:active,
.icon-btn:active,
.dock-btn:active,
.story:active .story-tile,
.msg-item:active,
.settings-row:active,
.business-inline-btn:active,
.business-link-row:active,
.business-link-card:active,
.comment-composer button:active,
.seg button:active,
.prof-tab:active {
  transform: scale(0.975);
}

.post,
.signal-card,
.msg-item,
.settings-card,
.business-settings-block,
.business-link-card,
.business-drawer-user,
.thread-head,
.comment .body,
.comment-composer,
.toast,
.mini-toast {
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.icon-btn:hover,
.business-link-card:hover,
.business-inline-btn:hover,
.business-link-row:hover {
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
}

.seg button.is-active {
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.toast {
  left: calc(var(--app-left) + (var(--app-width) / 2));
  max-width: min(360px, calc(var(--app-width) - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(210,171,87,0.18);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.business-drawer-backdrop {
  left: var(--app-left);
  right: auto;
  width: var(--app-width);
  background: rgba(4,4,4,0.38);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
}

.business-drawer {
  left: var(--app-left);
  top: calc(var(--safe-top) + 6px);
  bottom: calc(var(--safe-bottom) + 8px);
  width: min(390px, calc(var(--app-width) - 14px));
  max-width: calc(100vw - 14px);
  border-top-right-radius: 32px;
  border-bottom-right-radius: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid var(--line-strong);
  background:
    radial-gradient(560px 240px at 0% 0%, rgba(210,171,87,0.09), transparent 58%),
    linear-gradient(180deg, rgba(10,10,10,0.97), rgba(13,13,13,0.95));
  box-shadow: 0 24px 64px rgba(0,0,0,0.48);
  overflow-x: hidden;
  overscroll-behavior: contain;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .24s ease;
}

.business-drawer.hide {
  transform: translate3d(calc(-100% - 24px), 0, 0) scale(0.985);
}

.business-drawer-inner {
  min-height: 100%;
  padding: calc(var(--safe-top) + 18px) 16px calc(var(--safe-bottom) + 28px);
  gap: 14px;
}

.business-drawer-close {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.business-link-card,
.business-settings-block,
.business-drawer-user {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mini-toast {
  left: calc(var(--app-left) + 16px);
  right: auto;
  top: auto;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 18px);
  max-width: min(340px, calc(var(--app-width) - 32px));
  background: rgba(14,14,14,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(14px);
}

.mini-toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.app-light .mini-toast {
  background: rgba(247,243,238,0.94);
}

body.app-light .business-drawer {
  background:
    radial-gradient(560px 240px at 0% 0%, rgba(210,171,87,0.08), transparent 58%),
    linear-gradient(180deg, rgba(247,243,238,0.98), rgba(247,243,238,0.96));
}

#stories,
#feed,
#msg-list,
#notifications-list,
#comments-list,
#profile-grid,
.settings,
#business-form-shell,
#thread {
  scroll-padding-bottom: calc(var(--dock-h) + var(--safe-bottom) + 34px);
}

.input:focus,
.textarea:focus,
.select:focus,
.business-input:focus,
.business-textarea:focus,
#thread-input:focus,
#comment-input:focus,
#compose-text:focus {
  box-shadow: 0 0 0 4px rgba(210,171,87,0.09);
}

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

/* ============================================================
   RED™ OS — Ownership Actions (V1.2)
   Owner menu button + premium delete confirmation sheet.
   ============================================================ */

/* ── Owner menu button (⋯ dots on owned cards) ─────────────── */
.owner-menu-wrap {
  margin-left: auto;
  flex-shrink: 0;
}
.owner-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.owner-menu-btn:active,
.owner-menu-btn:hover {
  background: var(--ink-4);
  color: var(--ink);
}
.signal-top .owner-menu-wrap { margin-left: auto; }

/* ── Backdrop ───────────────────────────────────────────────── */
.owner-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 4, 4, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.owner-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Sheet container ────────────────────────────────────────── */
.owner-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(480px, 100vw);
  z-index: 201;
  background: linear-gradient(180deg, rgba(16, 14, 12, 0.97), rgba(12, 11, 10, 0.98));
  border: 1px solid var(--line-strong);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55), 0 -4px 16px rgba(0, 0, 0, 0.3);
  padding-bottom: calc(var(--safe-bottom) + 16px);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  overflow: hidden;
}
.owner-sheet.is-open {
  transform: translateX(-50%) translateY(0);
}

/* ── Drag handle ────────────────────────────────────────────── */
.owner-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: 12px auto 8px;
}

/* ── Sheet body ─────────────────────────────────────────────── */
.owner-sheet-body {
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Section label ──────────────────────────────────────────── */
.owner-sheet-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 6px 8px;
}

/* ── Action rows ────────────────────────────────────────────── */
.owner-sheet-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.owner-sheet-action:active {
  background: var(--panel-3);
  border-color: var(--line-strong);
}
.owner-sheet-action.danger {
  color: #ff3b5c;
  border-color: rgba(255, 59, 92, 0.22);
  background: rgba(255, 59, 92, 0.07);
}
.owner-sheet-action.danger:active {
  background: rgba(255, 59, 92, 0.14);
}
.owner-sheet-action-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.owner-sheet-action.cancel {
  color: var(--ink-2);
  border-color: transparent;
  background: transparent;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: 2px;
}
.owner-sheet-action.cancel:active {
  background: var(--ink-4);
}

/* ── Confirm step ───────────────────────────────────────────── */
.owner-sheet-confirm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b5c;
  padding: 12px 0 6px;
}
.owner-sheet-confirm-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  padding: 0 16px 8px;
  letter-spacing: 0.01em;
}
.owner-sheet-confirm-body {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.5;
  padding: 0 20px 18px;
}
.owner-sheet-confirm-btn {
  width: 100%;
  background: rgba(255, 59, 92, 0.12);
  color: #ff3b5c;
  border: 1px solid rgba(255, 59, 92, 0.3);
  border-radius: var(--r-md);
  padding: 16px;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.owner-sheet-confirm-btn:active {
  background: rgba(255, 59, 92, 0.22);
  border-color: rgba(255, 59, 92, 0.5);
}

/* ── Light mode overrides ───────────────────────────────────── */
body.app-light .owner-sheet {
  background: linear-gradient(180deg, rgba(252, 250, 247, 0.98), rgba(247, 243, 238, 0.99));
  border-color: rgba(20, 19, 17, 0.14);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.12), 0 -4px 16px rgba(0, 0, 0, 0.06);
}
body.app-light .owner-sheet-handle {
  background: rgba(20, 19, 17, 0.18);
}
body.app-light .owner-sheet-label {
  color: rgba(20, 19, 17, 0.48);
}
body.app-light .owner-sheet-action {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(20, 19, 17, 0.1);
  color: #141311;
}
body.app-light .owner-sheet-action:active {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(20, 19, 17, 0.16);
}
body.app-light .owner-sheet-action.danger {
  background: rgba(255, 59, 92, 0.06);
  border-color: rgba(255, 59, 92, 0.18);
}
body.app-light .owner-sheet-action.cancel {
  color: rgba(20, 19, 17, 0.52);
  background: transparent;
}
body.app-light .owner-sheet-confirm-title {
  color: #141311;
}
body.app-light .owner-sheet-confirm-body {
  color: rgba(20, 19, 17, 0.52);
}
body.app-light .owner-menu-btn {
  color: rgba(20, 19, 17, 0.4);
}
body.app-light .owner-menu-btn:active,
body.app-light .owner-menu-btn:hover {
  background: rgba(20, 19, 17, 0.07);
  color: #141311;
}


/* ============================================================
   V2.1 targeted polish patch
   ============================================================ */
body.app-light .mini-toast {
  color: rgba(20, 19, 17, 0.74);
  border-color: rgba(20, 19, 17, 0.08);
}

.business-drawer.drawer-right {
  left: auto;
  right: calc(100vw - (var(--app-left) + var(--app-width)));
  border-top-left-radius: 32px;
  border-bottom-left-radius: 32px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(560px 240px at 100% 0%, rgba(210,171,87,0.09), transparent 58%),
    linear-gradient(180deg, rgba(10,10,10,0.97), rgba(13,13,13,0.95));
}

.business-drawer.drawer-right.hide {
  transform: translate3d(calc(100% + 24px), 0, 0) scale(0.985);
}

body.app-light .business-drawer.drawer-right {
  background:
    radial-gradient(560px 240px at 100% 0%, rgba(210,171,87,0.08), transparent 58%),
    linear-gradient(180deg, rgba(247,243,238,0.98), rgba(247,243,238,0.96));
}


/* ============================================================
   TAGLINE — clickable links
   ============================================================ */

.auth-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.tagline-link {
  font-size: 11px;
  font-family: var(--font-dot);
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 3px;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tagline-link:hover,
.tagline-link:focus-visible {
  color: var(--gold-soft);
  outline: none;
}

.tagline-sep {
  font-size: 11px;
  font-family: var(--font-dot);
  color: var(--ink-4);
  pointer-events: none;
}


/* ============================================================
   INFO HUB — Backdrop
   ============================================================ */

.hub-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.22,1,.36,1);
}

.hub-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   INFO HUB — Panel
   ============================================================ */

.hub-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-w);
  height: 92svh;
  z-index: 901;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -24px 80px rgba(0,0,0,0.72), 0 0 0 0.5px rgba(210,171,87,0.10);
  overflow: hidden;
  transition: transform 0.42s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.hub-panel[hidden] { display: flex !important; }

.hub-panel.is-open {
  transform: translateX(-50%) translateY(0);
}

/* ── Hub inner wrapper ─────────────────────────────── */

.hub-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Hub header ─────────────────────────────────────── */

.hub-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.hub-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-logo {
  height: 28px;
  width: auto;
  display: block;
}

.hub-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.hub-close:hover {
  background: var(--panel-3);
  color: var(--ink);
}

/* ── Hub nav pills ──────────────────────────────────── */

.hub-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--line);
}

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

.hub-pill {
  flex-shrink: 0;
  font-size: 11.5px;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.hub-pill:hover {
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.hub-pill.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #050505;
  font-weight: 600;
}

/* ── Hub body ───────────────────────────────────────── */

.hub-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: calc(var(--safe-bottom) + 28px);
}

.hub-body::-webkit-scrollbar { display: none; }

/* ── Hub sections ───────────────────────────────────── */

.hub-section {
  display: none;
  padding: 28px 20px 20px;
  animation: hubSectionIn 0.3s cubic-bezier(.22,1,.36,1) both;
}

.hub-section.is-active {
  display: block;
}

@keyframes hubSectionIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hub-eyebrow {
  font-size: 10px;
  font-family: var(--font-dot);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.hub-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hub-lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 4px;
}

.hub-divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.hub-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0 0 14px;
}

.hub-text strong {
  color: var(--ink-2);
  font-weight: 500;
}

.hub-text-sm {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 16px;
}

/* Stats row */
.hub-stat-row {
  display: flex;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.hub-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-right: 1px solid var(--line);
}

.hub-stat:last-child { border-right: none; }

.hub-stat-n {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-soft);
  line-height: 1;
}

.hub-stat-l {
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 4px;
  text-align: center;
}

/* CTA row */
.hub-cta-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.hub-pill-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--gold-soft);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.hub-pill-btn:hover {
  background: var(--panel-3);
  border-color: var(--gold);
}

/* List */
.hub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.hub-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
}

.hub-list-icon {
  color: var(--gold);
  font-size: 8px;
  margin-top: 5px;
  flex-shrink: 0;
}

/* Quote */
.hub-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-3);
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 2px solid var(--gold);
  background: rgba(210,171,87,0.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* Tag row */
.hub-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.hub-tag {
  font-size: 11px;
  font-family: var(--font-dot);
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--ink-3);
  background: var(--panel);
}

/* Blog placeholder */
.hub-blog-placeholder {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.hub-blog-item {
  padding: 16px 18px;
  background: var(--panel);
  transition: background 0.15s;
}

.hub-blog-item + .hub-blog-item {
  border-top: 1px solid var(--line);
}

.hub-blog-tag {
  font-size: 9.5px;
  font-family: var(--font-dot);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 5px;
}

.hub-blog-title {
  font-size: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.hub-blog-meta {
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 4px;
}

/* FAQ */
.hub-faq {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.hub-faq-item {
  padding: 16px 18px;
  background: var(--panel);
}

.hub-faq-item + .hub-faq-item {
  border-top: 1px solid var(--line);
}

.hub-faq-q {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.hub-faq-a {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* Legal blocks */
.hub-legal-block {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.hub-legal-title {
  font-size: 10.5px;
  font-family: var(--font-dot);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.hub-legal-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}

.hub-link-text {
  color: var(--gold-soft);
  font-style: italic;
}

/* Footer brand */
.hub-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px 8px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}

.hub-footer-logo {
  height: 24px;
  width: auto;
  opacity: 0.6;
}

.hub-footer-copy {
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
}

.hub-footer-copy-sm {
  font-size: 10px;
  font-family: var(--font-dot);
  letter-spacing: 0.06em;
  color: var(--ink-4);
  opacity: 0.6;
}

/* ── Light theme overrides ─────────────────────────── */

body.theme-light .hub-panel {
  background: #faf8f4;
  border-top-color: rgba(180, 140, 60, 0.25);
}

body.theme-light .hub-header {
  border-bottom-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-close {
  background: #f0ece4;
  border-color: rgba(0,0,0,0.1);
  color: #444;
}

body.theme-light .hub-close:hover {
  background: #e8e4dc;
}

body.theme-light .hub-nav {
  border-bottom-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-pill {
  border-color: rgba(0,0,0,0.12);
  color: #888;
}

body.theme-light .hub-pill:hover {
  color: #444;
}

body.theme-light .hub-pill.is-active {
  background: var(--gold);
  color: #fff;
}

body.theme-light .hub-divider {
  background: rgba(0,0,0,0.08);
}

body.theme-light .hub-title {
  color: #111;
}

body.theme-light .hub-lead {
  color: #444;
}

body.theme-light .hub-text {
  color: #666;
}

body.theme-light .hub-blog-item,
body.theme-light .hub-faq-item,
body.theme-light .hub-legal-block {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-stat {
  border-right-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-stat-row {
  border-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-faq-q,
body.theme-light .hub-blog-title {
  color: #111;
}

body.theme-light .hub-faq-a,
body.theme-light .hub-legal-body {
  color: #555;
}

body.theme-light .hub-list-item {
  color: #444;
}

body.theme-light .hub-tag {
  background: #f0ece4;
  border-color: rgba(0,0,0,0.1);
  color: #666;
}

body.theme-light .hub-pill-btn {
  background: #f0ece4;
  border-color: rgba(180,140,60,0.35);
}

body.theme-light .hub-footer-brand {
  border-top-color: rgba(0,0,0,0.08);
}

body.theme-light .hub-footer-copy {
  color: rgba(0,0,0,0.35);
}

body.theme-light .tagline-link {
  color: rgba(0,0,0,0.35);
}

body.theme-light .tagline-link:hover {
  color: var(--gold);
}

body.theme-light .tagline-sep {
  color: rgba(0,0,0,0.18);
}


/* ============================================================
   EMAIL CONFIRM VIEW
   ============================================================ */

.email-confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 32px;
}

.email-confirm-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--gold-soft);
  box-shadow: 0 0 40px rgba(210, 171, 87, 0.12);
}

.email-confirm-title {
  font-size: 28px !important;
  margin-bottom: 16px !important;
}

.email-confirm-sub {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 8px;
  max-width: 320px;
}

.email-confirm-sub strong {
  color: var(--gold-soft);
  font-weight: 500;
}

.email-confirm-hint {
  font-size: 12px;
  color: var(--ink-4);
  margin: 0;
}

.ec-btn-signin {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-3) !important;
  font-size: 13px !important;
  transition: border-color 0.18s, color 0.18s !important;
}

.ec-btn-signin:hover {
  border-color: var(--line-strong) !important;
  color: var(--ink-2) !important;
}

/* Light overrides */
body.theme-light .email-confirm-icon {
  background: #f0ece4;
  border-color: rgba(180,140,60,0.3);
}

body.theme-light .email-confirm-sub { color: #444; }
body.theme-light .email-confirm-hint { color: #aaa; }
body.theme-light .ec-btn-signin {
  border-color: rgba(0,0,0,0.12) !important;
  color: #888 !important;
}


/* ============================================================
   INSTALL NUDGE — first-login banner
   ============================================================ */

.install-nudge {
  margin: 0 var(--pad) 14px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg,
    rgba(210,171,87,0.13) 0%,
    rgba(241,221,177,0.08) 100%);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  animation: nudgeIn 0.5s cubic-bezier(.22,1,.36,1) both;
  animation-delay: 0.6s;
  opacity: 0;
}

.install-nudge.hide { display: none !important; }

@keyframes nudgeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.install-nudge-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
}

.install-nudge-icon {
  flex-shrink: 0;
  color: var(--gold);
  display: flex;
  align-items: center;
}

.install-nudge-text {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
  font-weight: 500;
}

.install-nudge-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.install-nudge-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--ink);
}

/* Light */
body.theme-light .install-nudge {
  background: linear-gradient(135deg,
    rgba(210,171,87,0.10) 0%,
    rgba(241,221,177,0.06) 100%);
  border-color: rgba(180,140,60,0.3);
}

body.theme-light .install-nudge-text { color: #444; }
body.theme-light .install-nudge-close {
  background: rgba(0,0,0,0.04);
  color: #999;
}
body.theme-light .install-nudge-close:hover {
  background: rgba(0,0,0,0.08);
  color: #333;
}


/* ============================================================
   RED™ V5 — Community Layer
   PROFILE BANNER · LOCKED SEARCH · FOLLOW BUTTON · EDIT ALIGN
   Additive only — no overrides of existing rules.
   ============================================================ */

/* ── EDIT-PROFILE: textarea alignment with inputs ─────────── */
/* Match padding + line-height so the typed text sits exactly where
   input text sits (same visual left edge + first-line baseline).
   box-sizing: border-box so width matches input width to the pixel. */
.edit-presence-compose .field .textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 120px;
  padding: 16px 20px;
  line-height: 1.55;
  font: inherit;
  resize: none;
  overflow: auto;
  display: block;
  vertical-align: top;
  border-radius: var(--r-md);
}

/* ── PROFILE BANNER (profile view) ────────────────────────── */
.view[data-view="profile"] { position: relative; }
.view[data-view="profile"] .topbar {
  background: transparent; /* sticky + z-index preserved from core */
}
.view[data-view="profile"] .topbar {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.view[data-view="profile"] .topbar .icon-btn {
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  background: rgba(10, 10, 10, 0.38);
  color: #fff;
}
body.theme-light .view[data-view="profile"] .topbar .icon-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.prof-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  background: #0a0a0a;
}
.prof-banner-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Cinematic fallback tuned to RED™ palette */
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(241, 221, 177, 0.10) 0%, transparent 55%),
    radial-gradient(90% 70% at 80% 100%, rgba(180, 30, 40, 0.18) 0%, transparent 60%),
    linear-gradient(160deg, #1a1410 0%, #0a0a0a 55%, #0e0b10 100%);
  transition: background-image .4s ease;
}
.prof-banner-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(5,5,5,0.10) 0%,
    rgba(5,5,5,0.35) 55%,
    var(--bg, #0a0a0a) 100%);
}
.view[data-view="profile"] .prof-head {
  position: relative;
  z-index: 2;
  margin-top: 104px;
}
.view[data-view="profile"] .prof-avatar {
  position: relative;
  z-index: 2;
  box-shadow:
    0 0 0 2px rgba(241, 221, 177, 0.18),
    0 18px 40px rgba(0,0,0,0.55);
}

body.theme-light .prof-banner { background: #f5f0e8; }
body.theme-light .prof-banner-veil {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.35) 55%,
    var(--bg, #fff) 100%);
}

/* ── BANNER PICKER (edit-profile) ─────────────────────────── */
.banner-picker {
  display: block;
  position: relative;
  width: 100%;
  height: 130px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 18px;
  border: 1px solid rgba(241, 221, 177, 0.14);
}
.banner-picker input[type="file"] { display: none; }
.banner-picker-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(241, 221, 177, 0.10) 0%, transparent 55%),
    radial-gradient(90% 70% at 80% 100%, rgba(180, 30, 40, 0.18) 0%, transparent 60%),
    linear-gradient(160deg, #1a1410 0%, #0a0a0a 55%, #0e0b10 100%);
  transition: background-image .4s ease;
}
.banner-picker-hint {
  position: absolute;
  left: 12px; bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f1ddb1;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.banner-picker-status {
  position: absolute;
  right: 12px; bottom: 12px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: #f1ddb1;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.banner-picker-status.is-visible { opacity: 1; }
.banner-picker-status.is-error { color: #ff9a9a; }

/* ── LOCKED SEARCH VIEW ───────────────────────────────────── */
.search-wrap {
  padding: 24px 18px 60px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.search-locked {
  text-align: center;
  padding: 60px 20px 40px;
}
.search-locked-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(241, 221, 177, 0.08);
  color: #f1ddb1;
  border: 1px solid rgba(241, 221, 177, 0.18);
}
.search-locked h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.search-locked p { max-width: 320px; margin: 0 auto; font-size: 13.5px; line-height: 1.55; }

.search-form {
  display: flex; gap: 10px;
  margin-top: 8px;
  margin-bottom: 10px;
}
.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(241, 221, 177, 0.14);
  border-radius: 12px;
  padding: 0 12px 0 30px;
  transition: border-color .18s ease;
}
.search-input-wrap:focus-within { border-color: rgba(241, 221, 177, 0.42); }
.search-at {
  position: absolute;
  left: 12px;
  color: #f1ddb1;
  opacity: 0.7;
  font-size: 14px;
}
.search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  padding: 12px 0;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.search-hint {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin: 6px 2px 18px;
}
.search-result { margin-top: 12px; }

.search-result .sr-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(241, 221, 177, 0.12);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.search-result .sr-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(241, 221, 177, 0.28);
  transform: translateY(-1px);
}
.search-result .sr-av {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(241, 221, 177, 0.2);
}
.search-result .sr-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result .sr-mid { flex: 1; min-width: 0; }
.search-result .sr-n {
  font-weight: 500; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result .sr-h { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.search-result .sr-empty {
  text-align: center;
  padding: 28px 10px;
  font-size: 13px;
  opacity: 0.55;
  font-style: italic;
}

/* ── FOLLOW / MESSAGE BUTTON STATES ───────────────────────── */
.btn.btn-following {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(241, 221, 177, 0.22);
  color: #f1ddb1;
}
.btn.btn-following:hover {
  background: rgba(180, 30, 40, 0.12);
  border-color: rgba(180, 30, 40, 0.35);
  color: #f1ddb1;
}
.btn.btn-locked-msg {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(241, 221, 177, 0.22);
  color: rgba(241, 221, 177, 0.55);
  cursor: not-allowed;
  /* -25% font size to differentiate from the primary Follow action */
  font-size: 0.75em;
  letter-spacing: 0.04em;
  padding-top: 14px;
  padding-bottom: 14px;
}
.btn.btn-locked-msg svg {
  vertical-align: -2px;
  margin-right: 5px;
  width: 12px; height: 12px;
}

/* ── LOCKED SEARCH VIEW ───────────────────────────────────── */
.search-wrap {
  padding: 24px 18px 60px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.search-locked {
  text-align: center;
  padding: 60px 20px 40px;
}
.search-locked-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(241, 221, 177, 0.08);
  color: #f1ddb1;
  border: 1px solid rgba(241, 221, 177, 0.18);
}
.search-locked h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.search-locked p { max-width: 320px; margin: 0 auto; font-size: 13.5px; line-height: 1.55; }

.search-form {
  display: flex; gap: 10px;
  margin-top: 8px;
  margin-bottom: 10px;
}
.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(241, 221, 177, 0.14);
  border-radius: 12px;
  padding: 0 12px 0 30px;
  transition: border-color .18s ease;
}
.search-input-wrap:focus-within {
  border-color: rgba(241, 221, 177, 0.42);
}
.search-at {
  position: absolute;
  left: 12px;
  color: #f1ddb1;
  opacity: 0.7;
  font-size: 14px;
}
.search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  padding: 12px 0;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.search-hint {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin: 6px 2px 18px;
}
.search-result { margin-top: 12px; }

.search-result .sr-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(241, 221, 177, 0.12);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.search-result .sr-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(241, 221, 177, 0.28);
  transform: translateY(-1px);
}
.search-result .sr-av {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(241, 221, 177, 0.2);
}
.search-result .sr-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result .sr-mid { flex: 1; min-width: 0; }
.search-result .sr-n {
  font-weight: 500; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result .sr-h {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 2px;
}
.search-result .sr-empty {
  text-align: center;
  padding: 28px 10px;
  font-size: 13px;
  opacity: 0.55;
  font-style: italic;
}

/* ── FOLLOW / MESSAGE BUTTON STATES ───────────────────────── */
.btn.btn-follow {
  /* Use the existing btn-grad look for unfollowed state */
}
.btn.btn-following {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(241, 221, 177, 0.22);
  color: #f1ddb1;
}
.btn.btn-following:hover {
  background: rgba(180, 30, 40, 0.12);
  border-color: rgba(180, 30, 40, 0.35);
  color: #f1ddb1;
}
.btn.btn-locked-msg {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(241, 221, 177, 0.22);
  color: rgba(241, 221, 177, 0.55);
  cursor: not-allowed;
  position: relative;
}
.btn.btn-locked-msg svg {
  vertical-align: -3px;
  margin-right: 6px;
}

/* Subtle lock hint next to locked dock items (discover stays locked) */
.dock-btn[data-nav="discover"]::after {
  content: "";
  position: absolute;
  top: 8px; right: calc(50% - 14px);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(241, 221, 177, 0.4);
  box-shadow: 0 0 8px rgba(241, 221, 177, 0.35);
  opacity: 0;
  transition: opacity .2s;
}


/* ============================================================
   TASK 2 — DESKTOP / TABLET BLOCKER
   Mobile-only by design. Hidden on mobile, revealed ≥820px.
   The mobile layout is NEVER affected by this block.
   ============================================================ */
.redos-only-mobile { display: none; }

.redos-only-mobile [lang="fr"],
.redos-only-mobile [lang="en"] { display: none; }
html[lang^="fr"] .redos-only-mobile [lang="fr"] { display: inline; }
html[lang^="en"] .redos-only-mobile [lang="en"] { display: inline; }
/* fallback if html lang is unset */
html:not([lang]) .redos-only-mobile [lang="fr"] { display: inline; }

@media (min-width: 820px), (min-device-width: 820px) and (orientation: landscape) {
  body > main#app,
  body > .hub-panel,
  body > .toast,
  body > #install-nudge { display: none !important; }

  body {
    background:
      radial-gradient(120% 80% at 50% 0%, rgba(210,171,87,0.08) 0%, transparent 55%),
      radial-gradient(90% 60% at 50% 100%, rgba(210,171,87,0.05) 0%, transparent 60%),
      var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .redos-only-mobile {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    padding: 48px 40px;
    z-index: 99999;
    color: var(--ink);
    font-family: var(--font-body);
    animation: redosOnlyMobileFade 1.1s ease both;
  }

  .redos-only-mobile::before {
    content: "";
    position: absolute; inset: 0;
    background:
      linear-gradient(180deg, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0.9) 100%),
      repeating-linear-gradient(0deg, rgba(246,240,227,0.02) 0 1px, transparent 1px 3px);
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  .redos-only-mobile-frame {
    position: relative;
    max-width: 560px;
    padding: 56px 48px 48px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(20,19,17,0.92), rgba(10,10,10,0.96));
    box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(210,171,87,0.06);
  }

  .redos-only-mobile-frame::before {
    content: "";
    position: absolute; inset: 14px;
    border: 1px solid rgba(210,171,87,0.12);
    border-radius: calc(var(--r-lg) - 10px);
    pointer-events: none;
  }

  .redos-only-mobile-kicker {
    font-family: var(--font-dot);
    font-size: 1.1rem;
    letter-spacing: 0.22em;
    color: var(--gold-soft);
    text-transform: uppercase;
    margin-bottom: 22px;
  }

  .redos-only-mobile-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 22px;
  }

  .redos-only-mobile-copy {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 0 auto 12px;
    max-width: 44ch;
  }

  .redos-only-mobile-hint {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-family: var(--font-dot);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  .redos-only-mobile-sigil {
    margin-top: 28px;
    color: var(--gold);
    opacity: 0.85;
    display: inline-flex;
  }
}

@keyframes redosOnlyMobileFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TASK 3 — FULLSCREEN POST IMAGE VIEWER (lightbox)
   Cinematic, minimal, blends with the brand.
   ============================================================ */
.redos-lightbox {
  position: fixed; inset: 0;
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
  background: rgba(3, 3, 3, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition:
    background 0.42s ease,
    backdrop-filter 0.42s ease,
    -webkit-backdrop-filter 0.42s ease,
    opacity 0.42s ease;
}
.redos-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(3, 3, 3, 0.96);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.redos-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.redos-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.6),
    0 0 0 1px rgba(210,171,87,0.08);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1), opacity 0.4s ease;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none; /* prevent long-press save menu */
}
.redos-lightbox.is-open img {
  transform: scale(1);
  opacity: 1;
}

.redos-lightbox-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 14px;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(20, 19, 17, 0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.redos-lightbox-close:active { transform: scale(0.92); }
.redos-lightbox-close:hover  { background: rgba(30, 28, 24, 0.85); }

.redos-lightbox-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  left: 50%; transform: translateX(-50%);
  font-family: var(--font-dot);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}

/* cursor cue on feed images */
.post-media img { cursor: zoom-in; }
.post-media.is-video img,
.post-media.is-video video { cursor: default; }

/* lock body scroll while lightbox is open */
body.redos-lightbox-open {
  overflow: hidden;
  touch-action: none;
}

/* ============================================================
   TASK 4 — SOFT ANTI-COPY / ANTI-DOWNLOAD
   Makes casual saving / copying much harder.
   Inputs & textareas stay fully selectable.
   ============================================================ */
.post-media img,
.redos-lightbox img,
.prof-cell img,
.post-avatar img,
.story img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

/* Block selection across premium content surfaces.
   Interactive inputs are excluded below. */
.post,
.signal-card,
.post-text,
.post-name,
.post-meta,
.signal-copy,
.signal-name,
.post-category-badge,
.hub-text,
.hub-faq-q,
.hub-faq-a {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Keep forms fully usable */
input,
textarea,
select,
[contenteditable="true"],
.input,
.textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

/* ============================================================
   RED™ CERTIFICATION — badges + universal popup
   ============================================================ */
.redos-cert-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.redos-cert {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}
.redos-cert:active { transform: scale(0.92); }
.redos-cert:hover  { color: var(--gold-soft); }
.redos-cert:focus-visible {
  outline: 1px solid var(--line-strong);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Badge B — Selected talent: the shield sigil */
.redos-cert-selected svg {
  width: 13px;
  height: 13px;
  display: block;
}

/* Badge C — Founder: dot-matrix cartouche */
.redos-cert-founder {
  font-family: var(--font-dot);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 7px 1px;
  border: 1px solid rgba(210, 171, 87, 0.42);
  border-radius: 2px;
  line-height: 1.2;
  white-space: nowrap;
}

/* Comments use class "n" — scale down the badges there */
.n .redos-cert-badges { margin-left: 5px; }
.n .redos-cert-founder { font-size: 0.68rem; padding: 1px 6px 0; }
.n .redos-cert-selected svg { width: 11px; height: 11px; }

/* Signal cards */
.signal-name .redos-cert-badges { margin-left: 6px; }

/* Profile screen — inline badges are suppressed because the main badge now lives on its own row */
#profile-name .redos-cert-badges { display: none; }
#profile-name .redos-cert-selected svg { width: 13px; height: 13px; }
#profile-name .redos-cert-founder { font-size: 0.75rem; }

/* ============================================================
   RED™ CERTIFICATION POPUP (universal)
   ============================================================ */
.redos-cert-popup {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(3, 3, 3, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition:
    background 0.42s ease,
    backdrop-filter 0.42s ease,
    -webkit-backdrop-filter 0.42s ease,
    opacity 0.42s ease;
}
.redos-cert-popup.is-open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(3, 3, 3, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.redos-cert-popup-frame {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 40px 32px 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 19, 17, 0.96), rgba(10, 10, 10, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  color: var(--ink);
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 0.48s cubic-bezier(.2, .7, .2, 1), opacity 0.4s ease;
}
.redos-cert-popup.is-open .redos-cert-popup-frame {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.redos-cert-popup-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(210, 171, 87, 0.14);
  border-radius: calc(var(--r-lg) - 8px);
  pointer-events: none;
}

.redos-cert-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease;
}
.redos-cert-popup-close:hover  { color: var(--ink); }
.redos-cert-popup-close:active { transform: scale(0.92); }

.redos-cert-popup-kicker {
  font-family: var(--font-dot);
  font-size: 0.85rem;
  letter-spacing: 0.26em;
  color: var(--gold-soft);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.redos-cert-popup-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--gold);
}
.redos-cert-popup-crest.is-selected svg {
  width: 52px;
  height: 52px;
}
.redos-cert-popup-crest.is-founder {
  height: 52px;
  flex-direction: column;
  gap: 10px;
}
.redos-cert-popup-crest.is-founder .redos-cert-popup-crest-line {
  width: 64px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.redos-cert-popup-crest.is-founder::before,
.redos-cert-popup-crest.is-founder::after {
  content: "RED™";
  font-family: var(--font-dot);
  font-size: 1rem;
  letter-spacing: 0.26em;
  color: var(--gold);
}
.redos-cert-popup-crest.is-founder::after {
  content: "OS";
  font-size: 0.78rem;
  opacity: 0.6;
  margin-top: -4px;
}

.redos-cert-popup-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}

.redos-cert-popup-number {
  font-family: var(--font-dot);
  font-size: 1rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.redos-cert-popup-number-label { opacity: 0.7; }
.redos-cert-popup-number-value { color: var(--gold-soft); font-size: 1.2rem; }
.redos-cert-popup-number-total { opacity: 0.5; font-size: 0.85rem; }

.redos-cert-popup-body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 auto 24px;
  max-width: 42ch;
}

.redos-cert-popup-sig {
  font-family: var(--font-dot);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

body.redos-cert-popup-open {
  overflow: hidden;
  touch-action: none;
}

/* ============================================================
   ADMIN INBOX (visible only to @redcreatorcommunity + @cleobellanov)
   ============================================================ */
.admin-inbox-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #c53030;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}
.admin-inbox-chip[hidden] { display: none; }

.admin-inbox-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.92rem;
  font-family: var(--font-body);
}

.admin-inbox-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.admin-inbox-item:last-child { border-bottom: none; }
.admin-inbox-item.is-unread {
  background: linear-gradient(90deg, rgba(210, 171, 87, 0.04), transparent 60%);
}

.admin-inbox-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-inbox-kind {
  font-family: var(--font-dot);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.admin-inbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c53030;
  box-shadow: 0 0 6px rgba(197, 48, 48, 0.6);
}
.admin-inbox-time {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.admin-inbox-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-inbox-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  flex: 0 0 46px;
  background: rgba(255,255,255,0.04);
}
.admin-inbox-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-inbox-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-inbox-handle {
  font-size: 0.82rem;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-inbox-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.admin-inbox-preview {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-inbox-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.admin-inbox-actions button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-inbox-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.admin-inbox-actions button:active { transform: scale(0.97); }
.admin-inbox-actions button[data-act="download"] {
  color: var(--gold);
  border-color: var(--line-strong);
}

/* ── Light-theme adjustments for the popup only (inbox stays dark-friendly) */
body.theme-light .redos-cert-popup-frame {
  background: linear-gradient(180deg, #fbf7ec, #f3ecd9);
  color: #1a1714;
}
body.theme-light .redos-cert-popup-title { color: #1a1714; }
body.theme-light .redos-cert-popup-body  { color: rgba(26, 23, 20, 0.72); }
body.theme-light .redos-cert-popup-close {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(26, 23, 20, 0.5);
}
body.theme-light .redos-cert-popup-close:hover { color: #1a1714; }

/* ============================================================
   RED™ OS — V8 Community Score & Sponsor flow
   Premium dark surface, harmonized with existing business-drawer
   tokens (--gold, --gold-soft, --ink, --line-strong, --font-display).
   Light-mode parity at the bottom.
   ============================================================ */

/* Upgrade body — host container the IIFE writes into */
.upgrade-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upgrade-body .business-link-card { margin: 0; }

/* ── Community Score block ─────────────────────────────────── */
.cs-block {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(210, 171, 87, 0.18);
  background:
    radial-gradient(420px 200px at 0% 0%, rgba(210, 171, 87, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.035);
}
.cs-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex: 0 0 110px;
}
.cs-ring {
  width: 100%;
  height: 100%;
  display: block;
}
.cs-ring-bg {
  fill: none;
  stroke: rgba(210, 171, 87, 0.16);
  stroke-width: 6;
}
.cs-ring-fg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(210, 171, 87, 0.28));
  transition: stroke-dashoffset 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cs-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}
.cs-ring-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cs-ring-num {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
}
.cs-ring-out {
  font-size: 0.78rem;
  color: var(--ink-3);
  margin-left: 2px;
}
.cs-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.cs-meta-label {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.15;
  color: var(--ink);
}
.cs-meta-level {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

/* ── Section sub-labels inside Upgrade ─────────────────────── */
.cs-block-label {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin: 4px 4px -4px;
}

/* ── Sponsor card (current sponsor display) ────────────────── */
.cs-sponsor-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 22px;
  border: 1px solid rgba(210, 171, 87, 0.18);
  background:
    radial-gradient(380px 180px at 100% 0%, rgba(210, 171, 87, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.035);
}
.cs-sponsor-bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-sponsor-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cs-sponsor-bubble-fallback {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-soft);
}
.cs-sponsor-mid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cs-sponsor-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.15;
}
.cs-sponsor-handle {
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.cs-sponsor-status {
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-top: 2px;
  line-height: 1.35;
}
.cs-sponsor-score {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--font-display);
  color: var(--gold-soft);
  flex-shrink: 0;
}
.cs-sponsor-score-num {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
}
.cs-sponsor-score-out {
  font-size: 0.7rem;
  color: var(--ink-3);
}
.cs-sponsor-cooldown {
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 6px 4px 0;
}
.cs-sponsor-change {
  margin-top: 4px;
}
.cs-sponsor-cta {
  cursor: pointer;
}

/* ── Sponsorship placeholder ───────────────────────────────── */
.cs-sponsorship-placeholder {
  padding: 16px 16px;
  border-radius: 22px;
  border: 1px dashed rgba(246, 240, 227, 0.16);
  background: rgba(255, 255, 255, 0.02);
}
.cs-sponsorship-text {
  color: var(--ink-3);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* ── Sponsor flow micro-pages ──────────────────────────────── */
.cs-flow-section {
  padding-top: 4px;
}
.cs-flow-back {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ink-4);
  color: var(--ink-2);
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  cursor: pointer;
}
.cs-flow-back:active { transform: scale(0.95); }

.cs-flow-input-wrap {
  margin-top: 8px;
}
.cs-flow-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink-4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.18s ease;
}
.cs-flow-input::placeholder { color: var(--ink-3); }
.cs-flow-input:focus {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.cs-flow-error {
  color: #ff8f8f;
  font-size: 0.82rem;
  padding: 4px 4px 0;
  letter-spacing: 0.01em;
}

.cs-flow-preview { margin-top: 10px; }

.cs-flow-confirm-body {
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: 6px 4px 4px;
}

.cs-flow-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: stretch;
}
.cs-flow-secondary {
  flex: 0 0 auto;
}
.cs-flow-primary {
  flex: 1;
  text-align: center;
  padding: 14px 16px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(210, 171, 87, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.18s ease;
}
.cs-flow-primary:active { transform: scale(0.98); }
.cs-flow-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Step 3 spinner ────────────────────────────────────────── */
.cs-flow-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.cs-spin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(210, 171, 87, 0.18);
  border-top-color: var(--gold);
  animation: csSpin 900ms linear infinite;
}
@keyframes csSpin { to { transform: rotate(360deg); } }

/* ── Light-theme parity ────────────────────────────────────── */
body.app-light .cs-block,
body.app-light .cs-sponsor-card {
  background:
    radial-gradient(420px 200px at 0% 0%, rgba(210, 171, 87, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.025);
  border-color: rgba(210, 171, 87, 0.32);
}
body.app-light .cs-meta-label,
body.app-light .cs-sponsor-name,
body.app-light .cs-ring-num { color: #1a1714; }
body.app-light .cs-meta-level,
body.app-light .cs-sponsor-score { color: #8a6c2f; }
body.app-light .cs-sponsor-status,
body.app-light .cs-sponsorship-text { color: rgba(26, 23, 20, 0.62); }
body.app-light .cs-ring-bg { stroke: rgba(138, 108, 47, 0.22); }
body.app-light .cs-flow-input {
  color: #1a1714;
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.12);
}
body.app-light .cs-flow-input::placeholder { color: rgba(26, 23, 20, 0.42); }
body.app-light .cs-sponsorship-placeholder {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.02);
}
body.app-light .cs-flow-primary { color: #1a1714; }

/* ============================================================
   RED™ OS — V8 Edit / Delete window (5 minutes)
   Adds the visible × affordance on own posts/comments and
   the inline edit pane. Premium dark surface, harmonized.
   ============================================================ */

/* The owner-menu-btn now hosts an × glyph; tighten the visual
   so it reads as a close-style affordance, not a kebab. */
.owner-menu-btn-x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(246, 240, 227, 0.10);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.owner-menu-btn-x:hover {
  background: rgba(0, 0, 0, 0.62);
  color: var(--ink);
}
.owner-menu-btn-x:active { transform: scale(0.92); }

/* Position relative to .post-head (reuses existing .owner-menu-wrap) */
.owner-menu-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

/* ── × on own comments (no .comment markup change needed) ── */
.comment.owns-x {
  position: relative;
  padding-right: 36px;
}
.owner-comment-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(246, 240, 227, 0.10);
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.18s ease, transform 0.14s ease, color 0.14s ease;
}
.comment.owns-x:hover .owner-comment-x,
.owner-comment-x:focus { opacity: 1; }
.owner-comment-x:hover { color: var(--ink); }
.owner-comment-x:active { transform: scale(0.92); }

/* ── Inline action strip on a comment after × tap ──────── */
.owner-comment-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(246, 240, 227, 0.10);
  animation: owner-strip-in 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes owner-strip-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.owner-comment-strip-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--ink-4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}
.owner-comment-strip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}
.owner-comment-strip-btn:active { transform: scale(0.97); }
.owner-comment-strip-btn.danger { color: #ff8f8f; }
.owner-comment-strip-btn.danger:hover { color: #ffb0b0; }

/* ── Edit pane (used in owner sheet for posts AND inline comments) */
.owner-edit-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--ink-4);
  background: rgba(255, 255, 255, 0.035);
  animation: owner-strip-in 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.owner-edit-title {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.owner-edit-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--ink-4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease;
}
.owner-edit-textarea:focus {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}
.owner-edit-error {
  color: #ff8f8f;
  font-size: 0.82rem;
}
.owner-edit-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.owner-edit-actions .business-inline-btn { flex: 0 0 auto; }
.owner-edit-actions .cs-flow-primary     { flex: 1; }

/* The edit row inside the owner sheet (added above Delete) */
.owner-sheet-edit { color: var(--gold-soft); }

/* While a comment is in edit mode, hide the original row contents
   gracefully (the IIFE swaps innerHTML on save / cancel). */
.comment.is-editing {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
}

/* ── Light-theme parity ──────────────────────────────────── */
body.app-light .owner-menu-btn-x {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.10);
  color: rgba(26, 23, 20, 0.62);
}
body.app-light .owner-menu-btn-x:hover {
  background: rgba(255, 255, 255, 1);
  color: #1a1714;
}
body.app-light .owner-comment-x {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.10);
  color: rgba(26, 23, 20, 0.62);
}
body.app-light .owner-comment-x:hover { color: #1a1714; }
body.app-light .owner-comment-strip-btn {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(26, 23, 20, 0.72);
}
body.app-light .owner-comment-strip-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1714;
}
body.app-light .owner-edit-pane {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.12);
}
body.app-light .owner-edit-textarea {
  background: rgba(0, 0, 0, 0.035);
  color: #1a1714;
  border-color: rgba(0, 0, 0, 0.12);
}
body.app-light .owner-edit-title { color: #8a6c2f; }


/* ============================================================
   RED™ CERTIFICATION POPUP — light theme fix
   Use the real runtime class body.app-light (not body.theme-light)
   so certification explainer frames stay white in light mode.
   ============================================================ */
body.app-light .redos-cert-popup-frame {
  background: linear-gradient(180deg, rgba(252, 248, 242, 0.98), rgba(246, 240, 232, 0.99));
  border-color: rgba(26, 23, 20, 0.10);
  color: #1a1714;
  box-shadow: 0 24px 60px rgba(17, 14, 10, 0.12);
}
body.app-light .redos-cert-popup-frame::before {
  border-color: rgba(210, 171, 87, 0.22);
}
body.app-light .redos-cert-popup-title { color: #1a1714; }
body.app-light .redos-cert-popup-body  { color: rgba(26, 23, 20, 0.72); }
body.app-light .redos-cert-popup-sig   { color: rgba(26, 23, 20, 0.52); border-top-color: rgba(26, 23, 20, 0.10); }
body.app-light .redos-cert-popup-close {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(26, 23, 20, 0.10);
  color: rgba(26, 23, 20, 0.64);
}
body.app-light .redos-cert-popup-close:hover { color: #1a1714; }

/* ============================================================
   YouTube embeds, premium native render
   ============================================================ */
.post-media.is-youtube {
  aspect-ratio: auto;
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10,10,10,0.96), rgba(18,18,18,0.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 42px rgba(0,0,0,0.28);
}

.youtube-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
  border-radius: inherit;
}

.youtube-ratio.is-compact {
  padding-top: 70%;
}

.youtube-embed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px 12px;
}

.youtube-embed-meta.is-compact {
  padding: 9px 10px 10px;
}

.youtube-inline-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(210,171,87,0.28);
  background: rgba(210,171,87,0.10);
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.youtube-watch-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.youtube-watch-link:active {
  transform: scale(0.985);
}

.youtube-watch-link-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.youtube-watch-link-arrow {
  font-size: 0.92rem;
  opacity: 0.72;
}

body.app-light .post-media.is-youtube {
  background: linear-gradient(180deg, #fffdf9, #f3ece3);
  border-color: rgba(20,19,17,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

body.app-light .youtube-inline-kicker {
  border-color: rgba(196,154,77,0.24);
  background: rgba(210,171,87,0.12);
  color: #8d6820;
}

body.app-light .youtube-watch-link {
  border-color: rgba(20,19,17,0.10);
  background: rgba(255,255,255,0.88);
  color: #141311;
}


/* ============================================================
   V10.1 — Home strip label + premium DM inbox + stable thread composer
   ============================================================ */

/* Label sits in normal flow between topbar and stories.
   Scrolls naturally with content. No sticky, no shadow. */
.stories-top-label {
  position: relative;
  padding: 14px var(--pad) 8px;
  margin: 2px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.82;
  background: transparent;
  pointer-events: none;
}

/* Only the functional top row is sticky on home. No extra shadow layer. */
.view[data-view="feed"] .topbar {
  position: sticky;
  top: 0;
  z-index: 48;
}
.view[data-view="feed"] .topbar::after { content: none !important; }

/* Tighten the top of the stories rail so label → strip feels cohesive */
.view[data-view="feed"] .stories {
  padding-top: 6px;
}
body.app-light .stories-top-label {
  color: #c49a4d;
  opacity: 0.9;
}

.dm-inbox-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
}
.dm-inbox-label {
  margin: 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}
.dm-inbox-filter-wrap {
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(17,17,17,0.96), rgba(10,10,10,0.94));
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(0,0,0,0.34);
}
.dm-inbox-filter {
  width: 100%;
}
.dm-inbox-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dm-inbox-empty {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,17,17,0.94), rgba(11,11,11,0.92));
}
.dm-inbox-card {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(640px 220px at 0% 0%, rgba(210,171,87,0.05), transparent 62%),
    linear-gradient(180deg, rgba(17,17,17,0.98), rgba(11,11,11,0.96));
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.dm-inbox-card:active {
  transform: scale(0.985);
}
.dm-inbox-card.is-unread {
  border-color: rgba(214,174,92,0.48);
  box-shadow: 0 22px 42px rgba(0,0,0,0.38);
}
.dm-inbox-card.is-unread .dm-inbox-preview {
  color: var(--ink);
}
.dm-inbox-card.is-invitation {
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(210,171,87,0.07), transparent 60%),
    linear-gradient(180deg, rgba(20,18,14,0.98), rgba(11,11,11,0.96));
}
.dm-inbox-card-head,
.dm-inbox-user,
.dm-inbox-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-inbox-time {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-3);
}
.dm-inbox-head-spacer {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  opacity: 0;
}
.dm-inbox-kind {
  font-family: var(--font-dot);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}
.dm-inbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c53030;
  box-shadow: 0 0 6px rgba(197,48,48,0.56);
}
.dm-inbox-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  flex: 0 0 52px;
}
.dm-inbox-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dm-inbox-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dm-inbox-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.dm-inbox-handle {
  font-size: 0.82rem;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-inbox-preview {
  font-size: 0.92rem;
  line-height: 1.46;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dm-inbox-foot {
  flex-wrap: wrap;
  gap: 8px;
}
.dm-unread-pill,
.dm-state-pill,
.dm-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}
.dm-unread-pill {
  min-width: 26px;
  background: rgba(197,48,48,0.14);
  border-color: rgba(197,48,48,0.32);
  color: #f7d1d1;
  font-weight: 700;
}
.dm-state-pill,
.dm-category-pill {
  background: rgba(255,255,255,0.03);
  color: var(--ink-2);
}

body.app-light .dm-inbox-label,
body.app-light .dm-inbox-kind,
body.app-light .stories-top-label {
  color: #c49a4d;
}
body.app-light .dm-inbox-filter-wrap,
body.app-light .dm-inbox-card,
body.app-light .dm-inbox-empty {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,244,238,0.96));
  border-color: rgba(20,19,17,0.09);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
body.app-light .dm-inbox-card.is-invitation {
  background:
    radial-gradient(640px 220px at 0% 0%, rgba(210,171,87,0.09), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,244,238,0.97));
}
body.app-light .dm-inbox-name,
body.app-light .dm-inbox-preview {
  color: #141311;
}
body.app-light .dm-inbox-handle,
body.app-light .dm-inbox-time {
  color: rgba(20,19,17,0.58);
}
body.app-light .dm-state-pill,
body.app-light .dm-category-pill {
  background: rgba(20,19,17,0.03);
  border-color: rgba(20,19,17,0.08);
  color: rgba(20,19,17,0.72);
}
body.app-light .dm-unread-pill {
  background: rgba(197,48,48,0.10);
  color: #922b2b;
}
body.app-light .dm-inbox-avatar {
  background: rgba(255,255,255,0.86);
  border-color: rgba(20,19,17,0.12);
}

:root {
  --thread-composer-h: 74px;
  --thread-keyboard-offset: 0px;
  --thread-vv-height: 100svh;
}

/* When the thread view is active, lock everything to the visual viewport and
   turn the thread view into a self-contained flex column.
   Messages pane scrolls internally; composer sits in flow at the bottom.
   No fixed positioning → no keyboard double-offset, no floating composer. */
body.thread-view-active,
body.thread-view-active #app {
  height: var(--thread-vv-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
body.thread-view-active #app { padding-top: 0; }

body.thread-view-active .view[data-view="thread"] {
  height: var(--thread-vv-height, 100dvh);
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: none;
}
body.thread-view-active .view[data-view="thread"].is-active {
  min-height: 0;
}

body.thread-view-active .thread-head {
  flex: 0 0 auto;
  position: relative;
  z-index: 28;
  background: linear-gradient(180deg, rgba(5,5,5,0.98), rgba(5,5,5,0.94));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.thread-view-active #thread {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px var(--pad) 14px;
  scroll-padding-bottom: calc(var(--thread-composer-h, 72px) + 20px);
}

body.thread-view-active #thread-form.comment-composer {
  position: relative;
  flex: 0 0 auto;
  left: auto;
  right: auto;
  width: auto;
  max-width: none;
  bottom: auto;
  z-index: 2;
  margin: 0 var(--pad);
  margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  padding: 8px;
  align-items: flex-end;
  min-height: 58px;
  box-shadow: 0 -10px 28px rgba(0,0,0,0.32);
  transition: padding 0.18s ease, box-shadow 0.22s ease;
}
body.thread-view-active #thread-form.comment-composer textarea,
body.thread-view-active #thread-form.comment-composer input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  max-height: var(--thread-composer-max, 320px);
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  resize: none;
  display: block;
  overflow-y: hidden;
  overscroll-behavior: contain;
}
body.thread-view-active #thread-form.comment-composer textarea {
  white-space: pre-wrap;
  word-break: break-word;
}
body.thread-view-active #thread-form.comment-composer textarea::placeholder,
body.thread-view-active #thread-form.comment-composer input::placeholder {
  color: var(--ink-3);
}
body.thread-view-active #thread-form.comment-composer textarea:focus,
body.thread-view-active #thread-form.comment-composer input:focus {
  outline: none;
}
body.thread-view-active #thread-form.comment-composer button {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-bottom: 1px;
}

.thread-seen-state {
  min-height: 12px;
  padding: 0 14px 2px;
  display: flex;
  justify-content: flex-end;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

body.app-light.thread-view-active .thread-head {
  background: linear-gradient(180deg, rgba(247,243,238,0.98), rgba(247,243,238,0.94));
}
body.app-light.thread-view-active #thread-form.comment-composer {
  background: rgba(247,243,238,0.96);
  border-color: rgba(20,19,17,0.08);
  box-shadow: 0 -10px 28px rgba(0,0,0,0.08);
}
body.app-light.thread-view-active #thread-form.comment-composer textarea::placeholder,
body.app-light.thread-view-active #thread-form.comment-composer input::placeholder {
  color: rgba(20,19,17,0.38);
}
body.app-light .thread-seen-state {
  color: rgba(20,19,17,0.52);
}

@media (max-width: 390px) {
  .dm-inbox-card {
    padding-inline: 15px;
  }
  body.thread-view-active #thread-form.comment-composer {
    margin-inline: 14px;
  }
}


/* ============================================================
   V10.2 — real-only home rail + explicit feed-only sticky topbar
   ============================================================ */
.view[data-view="feed"] .topbar {
  position: sticky;
  top: 0;
  z-index: 48;
}
.view[data-view="feed"] .stories-top-label,
.view[data-view="feed"] .stories {
  position: static !important;
  top: auto !important;
  z-index: 0 !important;
}

/* ============================================================
   RED™ OS — Exclusive Offers
   ============================================================ */
.offer-admin-sheet,
.offer-flow-shell,
.offer-application-detail {
  position: fixed;
  inset: 0;
  z-index: 1400;
}
.offer-admin-backdrop,
.offer-flow-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,7,0.76);
  backdrop-filter: blur(12px);
}
.offer-admin-panel,
.offer-detail-panel,
.offer-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  margin: 0 auto;
  min-height: 100dvh;
  background: linear-gradient(180deg, rgba(10,10,12,0.92) 0%, rgba(7,7,9,0.98) 100%);
  color: #f7f0df;
  border-left: 1px solid rgba(210,171,87,0.18);
  border-right: 1px solid rgba(210,171,87,0.18);
  overflow: hidden;
}
.offer-stage--loading,
.offer-stage--thankyou {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.offer-loading-card,
.offer-thankyou-card {
  width: 100%;
  border: 1px solid rgba(210,171,87,0.26);
  border-radius: 28px;
  background: rgba(255,255,255,0.03);
  padding: 28px 22px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.36);
}
.offer-sheet-head,
.offer-stage-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 18px 14px;
}
.offer-stage-head--tight {
  padding-bottom: 0;
}
.offer-sheet-kicker {
  color: #d2ab57;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
.offer-sheet-head h3,
.offer-stage-head h2,
.offer-thankyou-card h2,
.offer-loading-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.04;
  color: #f7f0df;
}
.offer-sheet-head p,
.offer-stage-head p,
.offer-thankyou-card p,
.offer-loading-card p {
  margin: 8px 0 0;
  color: rgba(247,240,223,0.78);
  line-height: 1.45;
}
.offer-close-btn,
.offer-nav-btn,
.offer-close-btn--light {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.offer-close-btn--light {
  position: absolute;
  top: 18px;
  right: 18px;
}
.offer-admin-search {
  padding: 0 18px 14px;
}
.offer-admin-search input,
.offer-field,
.offer-phone-row select,
.offer-phone-row input {
  width: 100%;
  border: 1px solid rgba(210,171,87,0.2);
  background: rgba(255,255,255,0.04);
  color: #f7f0df;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
}
.offer-admin-results {
  padding: 0 18px 28px;
  display: grid;
  gap: 12px;
}
.offer-admin-result,
.offer-admin-empty {
  border: 1px solid rgba(210,171,87,0.18);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
}
.offer-admin-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.offer-admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.offer-admin-user img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.offer-admin-name { font-weight: 700; }
.offer-admin-handle { color: rgba(247,240,223,0.64); font-size: 13px; }
.offer-pages {
  position: relative;
  flex: 1;
  min-height: calc(100dvh - 96px);
  height: calc(100dvh - 96px);
  overflow: hidden;
}
.offer-page-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(12px) scale(0.985);
  pointer-events: none;
  transition: opacity .32s ease, transform .38s ease;
}
.offer-page-card.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.offer-media-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.offer-page-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform .6s ease, opacity .45s ease;
}
.offer-page-card.is-active .offer-page-bg {
  transform: scale(1);
}
.offer-page-overlay {
  position: absolute;
  top: 48px;
  left: 50%;
  width: 80%;
  height: auto;
  max-width: 80%;
  max-height: calc(100% - 164px - env(safe-area-inset-bottom, 0px));
  object-fit: contain;
  object-position: top center;
  opacity: 0;
  transform: translate(-50%, 12px) scale(0.985);
  transform-origin: top center;
  transition: opacity .34s ease .09s, transform .44s ease .09s;
}
.offer-page-card.is-active .offer-page-overlay {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.offer-page-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px calc(38px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.offer-page-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(247,240,223,0.78);
  font-size: 13px;
}
.offer-page-meta span:last-child {
  color: rgba(109, 109, 109, 0.92);
}
.offer-page-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.offer-page-actions .btn[disabled] {
  opacity: .45;
}
.offer-question-wrap {
  padding: 18px;
}
.offer-question-progress {
  display: flex;
  justify-content: space-between;
  color: rgba(247,240,223,0.68);
  font-size: 12px;
  margin-bottom: 12px;
}
.offer-question-card {
  min-height: calc(100dvh - 180px);
  border-radius: 28px;
  padding: 18px;
  background: radial-gradient(circle at top, rgba(60,120,200,0.22), transparent 44%), rgba(255,255,255,0.035);
  border: 1px solid rgba(129,177,255,0.18);
  box-shadow: 0 24px 64px rgba(0,0,0,0.32);
}
.offer-question-label {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.22;
  font-weight: 700;
  margin-bottom: 10px;
}
.offer-question-note {
  color: rgba(247,240,223,0.68);
  margin-bottom: 16px;
}
.offer-question-input {
  display: grid;
  gap: 12px;
}
.offer-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 14px;
}
.offer-choice input { margin-top: 3px; }
.offer-field--area { min-height: 160px; resize: vertical; }
.offer-question-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.offer-phone-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}
.offer-upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-radius: 22px;
  border: 1px dashed rgba(129,177,255,0.42);
  background: rgba(255,255,255,0.04);
  text-align: center;
  padding: 18px;
}
.offer-upload-box input {
  display: none;
}
.offer-upload-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9fbdfd;
  font: inherit;
}
.offer-thankyou-meta {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.offer-thankyou-meta div,
.offer-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.offer-thankyou-meta span,
.offer-detail-row strong {
  color: rgba(247,240,223,0.68);
  font-weight: 600;
}
.offer-detail-panel {
  padding-bottom: 24px;
}
.offer-detail-grid {
  padding: 0 18px 18px;
  display: grid;
  gap: 16px;
}
.offer-detail-column,
.offer-detail-media {
  border: 1px solid rgba(210,171,87,0.18);
  border-radius: 24px;
  background: rgba(255,255,255,0.03);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.offer-detail-media img {
  width: 100%;
  border-radius: 16px;
  display: block;
}
#notifications-list .notif-item.offer-invitation {
  border: 1px solid rgba(210,171,87,0.16);
  background: linear-gradient(180deg, rgba(210,171,87,0.08), rgba(255,255,255,0.02));
}
#offer-send-row .v {
  color: rgba(247,240,223,0.58);
}
@media (min-width: 720px) {
  .offer-admin-panel,
  .offer-detail-panel,
  .offer-stage { border-radius: 32px; min-height: min(920px, calc(100dvh - 24px)); margin-top: 12px; }
}

/* ============================================================
   PATCH — image-first feed + threaded comments
   ============================================================ */

.post.post-image-first {
  padding-top: 16px;
}

.post.post-image-first .post-media.post-media-hero {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 280px;
  max-height: 520px;
  margin: 0 0 14px;
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.post.post-image-first .post-head {
  margin-bottom: 10px;
}

.post.post-image-first .post-text.post-teaser-text,
.post .post-text.post-teaser-text {
  display: block;
  margin-top: 2px;
}

.post-teaser-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.5;
}

.post-see-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  color: rgba(10, 10, 10, 0.58);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.post-see-more:hover,
.post-see-more:active {
  color: rgba(10, 10, 10, 0.8);
}

.post.post-image-first .post-category-badge {
  margin-top: 10px;
}

.comment-composer {
  flex-wrap: wrap;
  align-items: stretch;
  padding-top: 10px;
}

.comment-reply-state {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px 4px;
  color: var(--gold-soft);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.comment-reply-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-reply-cancel {
  flex-shrink: 0;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 0.78rem;
}

.comment-thread-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 8px;
  margin-left: calc(min(var(--comment-depth, 0), 4) * 14px);
}

.comment-thread-row .body {
  max-width: none;
  min-width: 0;
}

.comment-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 3px;
}

.comment-time {
  color: var(--ink-3);
  font-size: 0.75rem;
  white-space: nowrap;
}

.comment-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 2px;
}

.comment-action {
  padding: 0;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.comment-action.is-liked {
  color: var(--gold-soft);
}

.comment-action:hover,
.comment-action:active {
  color: var(--ink-2);
}

body.app-light .comment-reply-state {
  color: #9f7420;
}

body.app-light .comment-reply-cancel,
body.app-light .comment-time,
body.app-light .comment-action {
  color: rgba(246, 240, 227, 0.64);
}

body.app-light .comment-action.is-liked {
  color: #f1ddb1;
}

body.app-light .post-see-more {
  color: rgba(10, 10, 10, 0.56);
}

@media (max-width: 420px) {
  .post.post-image-first .post-media.post-media-hero {
    min-height: 240px;
    border-radius: 20px;
  }

  .comment-thread-row {
    margin-left: calc(min(var(--comment-depth, 0), 4) * 11px);
  }

  .comment-actions {
    gap: 12px;
  }
}


/* ===== V10 feed/image-first + threaded comments hotfix ===== */
#feed > .post.post-feed-patched {
  display: flex;
  flex-direction: column;
}

#feed > .post.post-image-first .post-media.post-media-hero {
  order: 1;
  width: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 5;
  margin: 0 0 14px;
  border-radius: 28px;
  overflow: hidden;
}

#feed > .post.post-image-first .post-head {
  order: 2;
}

#feed > .post.post-image-first .post-teaser-text {
  order: 3;
  margin-top: 12px;
}

#feed > .post.post-image-first .post-foot {
  order: 4;
}

#feed > .post.post-image-first .post-media.post-media-hero img,
#feed > .post.post-image-first .post-media.post-media-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#feed > .post .post-teaser-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

#comments-list .comment-thread-row {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  grid-template-areas:
    'avatar body'
    '. actions';
  row-gap: 8px;
}

#comments-list .comment-thread-row > .av {
  grid-area: avatar;
}

#comments-list .comment-thread-row > .body {
  grid-area: body;
  min-width: 0;
}

#comments-list .comment-thread-row > .comment-actions {
  grid-area: actions;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* ===== V10 feed/image-first stability hotfix v3 ===== */
#feed > .post.post-feed-patched {
  display: flex;
  flex-direction: column;
}

#feed > .post.post-feed-patched .post-head {
  margin-bottom: 8px;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-top: 0;
  padding-bottom: 0;
}

#feed > .post.post-feed-patched .post-teaser-copy {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 1.48;
}

#feed > .post.post-feed-patched .post-see-more {
  margin-top: 6px;
}

#feed > .post.post-feed-patched .post-category-badge {
  margin-top: 8px;
}

#feed > .post.post-feed-patched .post-foot {
  margin-top: 12px;
}

#feed > .post.post-feed-patched.post-text-first .post-head {
  margin-bottom: 10px;
}

#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 5;
  margin: 0 0 14px;
  border-radius: 28px;
  overflow: hidden;
}

#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero img,
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 420px) {
  #feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero {
    min-height: 300px;
    border-radius: 24px;
  }
}


/* ===== V10 feed/comment stability hotfix v4 ===== */
#feed > .post.post-feed-patched .post-text.post-teaser-text {
  white-space: normal;
  min-height: 0;
}

#feed > .post.post-feed-patched .post-teaser-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  width: 100%;
  line-height: 1.48;
  margin: 0;
}

#feed > .post.post-feed-patched .post-category-badge {
  margin-top: 6px;
}

#feed > .post.post-feed-patched .post-foot {
  margin-top: 10px;
}

#comments-list .comment-thread-row {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-template-areas:
    'avatar body'
    '. actions' !important;
  row-gap: 6px;
}

#comments-list .comment-thread-row > .comment-actions {
  grid-area: actions;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* ===== V10 reply bar + teaser spacing hotfix v6 ===== */
.comment-composer {
  align-items: center;
}

.comment-reply-state {
  width: calc(100% - 14px);
  margin: 0 7px 8px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(210,171,87,0.14);
  background: rgba(8, 8, 8, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.comment-reply-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.comment-reply-cancel {
  min-width: 0;
  width: auto;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.comment-reply-cancel:hover,
.comment-reply-cancel:active {
  background: rgba(255,255,255,0.10);
}

body.app-light .comment-reply-state {
  border-color: rgba(159,116,32,0.16);
  background: rgba(255,255,255,0.52);
}

body.app-light .comment-reply-cancel {
  background: rgba(10,10,10,0.06);
  border-color: rgba(10,10,10,0.08);
  color: rgba(10,10,10,0.72);
}

#feed > .post.post-feed-patched .post-text.post-teaser-text {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

#feed > .post.post-feed-patched .post-teaser-copy {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 0 0 auto;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

#feed > .post.post-feed-patched .post-category-badge {
  display: none !important;
}

#feed > .post.post-feed-patched .post-foot {
  margin-top: 8px;
}


/* ===== V10 micro-finish v7 ===== */
#feed > .post.post-feed-patched .post-text.post-teaser-text {
  display: inline-block !important;
  width: 100%;
  margin-top: 2px !important;
  margin-bottom: 0 !important;
  line-height: 0;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text > .post-teaser-copy {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  line-height: 1.48 !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text > .post-see-more {
  margin-top: 6px !important;
}


/* ===== V10 composer polish hotfix v7 ===== */
.comment-composer,
body.thread-view-active #thread-form.comment-composer {
  border-radius: 26px !important;
  padding: 8px 10px !important;
}

.comment-composer input,
.comment-composer textarea,
body.thread-view-active #thread-form.comment-composer input,
body.thread-view-active #thread-form.comment-composer textarea {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 16px !important;
}

.comment-reply-state {
  width: calc(100% - 18px) !important;
  margin: 0 9px 8px !important;
  min-height: 38px !important;
  padding: 7px 8px 7px 10px !important;
  border-radius: 6px !important;
}

.comment-reply-cancel {
  height: 26px !important;
  padding: 0 7px !important;
  font-size: 0.66rem !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text .post-category-badge {
  display: none !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text,
#feed > .post.post-feed-patched .post-text.post-teaser-text .post-teaser-copy {
  min-height: 0 !important;
  max-height: none !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text .post-teaser-copy {
  margin-bottom: 0 !important;
}


/* ===== V10 micro-finish v8 ===== */
.comment-composer,
body.thread-view-active #thread-form.comment-composer {
  border-radius: 20px !important;
  padding: 8px 10px !important;
}

.comment-reply-state {
  width: calc(100% - 12px) !important;
  margin: 0 6px 8px !important;
  min-height: 36px !important;
  padding: 6px 8px 6px 10px !important;
  border-radius: 4px !important;
}

.comment-reply-cancel {
  height: 24px !important;
  padding: 0 6px !important;
  font-size: 0.62rem !important;
}

.comment-composer input,
.comment-composer textarea,
body.thread-view-active #thread-form.comment-composer input,
body.thread-view-active #thread-form.comment-composer textarea {
  border-radius: 10px !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text {
  display: block !important;
  width: 100% !important;
  margin-top: 2px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  line-height: normal !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text > .post-teaser-copy {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  line-height: 1.48 !important;
  margin: 0 !important;
}


/* ============================================================
   PATCH — V10.2 feed youtube visibility + see more detection
   ============================================================ */
#feed > .post.post-feed-patched .post-text.post-teaser-text {
  line-height: normal !important;
}

#feed > .post.post-feed-patched .post-text.post-teaser-text > .post-teaser-copy {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: pre-line !important;
  word-break: break-word !important;
  line-height: 1.48 !important;
}

#feed > .post.post-feed-patched .post-inline-youtube {
  margin-top: 10px;
}

#feed > .post.post-feed-patched .post-media.post-media-hero.is-youtube,
#feed > .post.post-feed-patched .post-inline-youtube.is-youtube {
  overflow: hidden;
}

#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-youtube {
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  margin-bottom: 10px;
}

#feed > .post.post-feed-patched .post-media.post-media-hero.is-youtube .youtube-ratio,
#feed > .post.post-feed-patched .post-inline-youtube.is-youtube .youtube-ratio.is-compact,
#feed > .post.post-feed-patched .post-inline-youtube.is-youtube .youtube-ratio {
  min-height: 0;
}

#feed > .post.post-feed-patched .post-media.post-media-hero.is-youtube .youtube-ratio {
  padding-top: 56.25%;
}

#feed > .post.post-feed-patched .post-inline-youtube.is-youtube .youtube-ratio.is-compact,
#feed > .post.post-feed-patched .post-inline-youtube.is-youtube .youtube-ratio {
  padding-top: 56.25%;
}

#comments-list > .post .owner-menu-wrap {
  margin-left: auto;
}


/* ============================================================
   PATCH — V10.4 tighten youtube footer + quieter owner close x
   ============================================================ */
#feed > .post.post-feed-patched .post-head,
#comments-list > .post .post-head {
  position: relative;
  padding-right: 32px;
}

#feed > .post.post-feed-patched .post-media.is-youtube,
#feed > .post.post-feed-patched .post-inline-youtube.is-youtube {
  margin-top: 8px;
}

#feed > .post.post-feed-patched .youtube-embed-meta,
#feed > .post.post-feed-patched .youtube-embed-meta.is-compact {
  padding: 8px 10px 10px;
  gap: 8px;
}

#feed > .post.post-feed-patched .youtube-inline-kicker {
  min-height: 26px;
  padding: 5px 10px;
}

#feed > .post.post-feed-patched .youtube-watch-link {
  min-height: 30px;
  padding: 6px 12px;
}

#feed > .post.post-feed-patched .owner-menu-wrap {
  position: absolute;
  top: 2px;
  right: 0;
  margin-left: 0;
  z-index: 2;
}

#feed > .post.post-feed-patched .owner-menu-btn-x,
#comments-list > .post .owner-menu-btn-x {
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(246, 240, 227, 0.04);
  color: rgba(246, 240, 227, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#feed > .post.post-feed-patched .owner-menu-btn-x:hover,
#comments-list > .post .owner-menu-btn-x:hover {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(246, 240, 227, 0.08);
  color: rgba(246, 240, 227, 0.56);
}

body.app-light #feed > .post.post-feed-patched .owner-menu-btn-x,
body.app-light #comments-list > .post .owner-menu-btn-x {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(0, 0, 0, 0.04);
  color: rgba(26, 23, 20, 0.28);
}

body.app-light #feed > .post.post-feed-patched .owner-menu-btn-x:hover,
body.app-light #comments-list > .post .owner-menu-btn-x:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(26, 23, 20, 0.42);
}

/* ============================================================
   PATCH — V10.7 profile post youtube hero spacing fix
   ============================================================ */
.post.post-image-first .post-media.post-media-hero.is-youtube {
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  margin-bottom: 10px;
}

.post.post-image-first .post-media.post-media-hero.is-youtube .youtube-ratio {
  min-height: 0;
  padding-top: 56.25%;
}


/* ===== V11.5 media ratio + teaser paragraph alignment ===== */
.post.post-feed-patched .post-teaser-copy {
  white-space: pre-line;
}

.post-media video,
.post-media img,
.media-slot video,
.media-slot img {
  display: block;
}

.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-landscape {
  min-height: 0;
  aspect-ratio: var(--media-aspect-ratio, 16 / 9);
  background: #000;
}

.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-square {
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-landscape video,
.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-landscape img,
.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-square video,
.post.post-feed-patched.post-image-first .post-media.post-media-hero.media-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 420px) {
  .post.post-feed-patched.post-image-first .post-media.post-media-hero.media-landscape {
    border-radius: 24px;
  }
}

/* ===== RED™ subscription gate ===== */
.subscription-gate-shell{
  padding-bottom:32px;
}
.subscription-gate-card{
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.subscription-gate-status-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.subscription-gate-status-copy{
  max-width:520px;
}
.subscription-plan-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.subscription-plan-card{
  border:1px solid rgba(210,171,87,.42);
  border-radius:28px;
  background:linear-gradient(180deg,rgba(8,8,12,.96),rgba(4,4,6,.98));
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:0 20px 50px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.02);
}
.subscription-plan-card.is-current{
  box-shadow:0 26px 60px rgba(156,118,35,.18), inset 0 0 0 1px rgba(241,221,177,.12);
}
.subscription-plan-top{
  display:flex;
  align-items:center;
  gap:14px;
}
.subscription-plan-icon{
  width:58px;
  height:58px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:#d2ab57;
  background:radial-gradient(circle at 50% 32%, rgba(210,171,87,.18), rgba(0,0,0,.24));
  box-shadow:inset 0 0 0 1px rgba(210,171,87,.2);
  flex:0 0 58px;
}
.sub-plan-svg{ width:34px; height:34px; }
.subscription-plan-head{ min-width:0; }
.subscription-plan-name{
  font-family:Georgia, 'Times New Roman', serif;
  font-size:1.5rem;
  line-height:1.05;
}
.subscription-plan-price{
  font-size:.95rem;
  color:#d2ab57;
  margin-top:5px;
}
.subscription-plan-desc{
  color:var(--muted);
  min-height:88px;
  line-height:1.45;
}
.subscription-plan-bullets{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.subscription-plan-bullets li{
  position:relative;
  padding-left:15px;
  line-height:1.38;
}
.subscription-plan-bullets li::before{
  content:'';
  position:absolute;
  left:0;
  top:.58em;
  width:5px;
  height:5px;
  border-radius:999px;
  background:#d2ab57;
}
.subscription-plan-btn{ margin-top:auto; }
.subscription-gate-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.subscription-open-btn{ margin-top:4px; }
.subscription-logout-btn{
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.12);
}
.subscription-gate-expiry-line{
  text-align:center;
  line-height:1.45;
  margin-top:-2px;
}
.subscription-faq-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:6px;
}
.subscription-faq-title{
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.72rem;
  color:#d2ab57;
}
.subscription-faq-item{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(255,255,255,.02);
  padding:12px 14px;
}
.subscription-faq-item summary{
  cursor:pointer;
  list-style:none;
  font-weight:600;
}
.subscription-faq-item summary::-webkit-details-marker{ display:none; }
.subscription-faq-item p{
  margin:10px 0 0;
  color:var(--muted);
  line-height:1.5;
}
.subscription-settings-card{ padding:14px; }
.subscription-settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.subscription-settings-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(210,171,87,.38);
  color:#d2ab57;
  font-size:.78rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.subscription-settings-main{
  font-weight:600;
  line-height:1.3;
}
.subscription-settings-sub{
  color:var(--muted);
  margin-top:4px;
  line-height:1.35;
}
.subscription-settings-btn{
  width:auto;
  min-width:180px;
}
.cs-private-subscription{
  margin-top:10px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(210,171,87,.22);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}
.cs-private-subscription-top{
  font-weight:600;
  line-height:1.35;
}
.cs-private-subscription-bottom{
  margin-top:4px;
  color:var(--muted);
  line-height:1.35;
}
@media (max-width: 900px){
  .subscription-plan-grid{ grid-template-columns:1fr; }
  .subscription-plan-desc{ min-height:0; }
  .subscription-settings-row{ flex-direction:column; align-items:flex-start; }
  .subscription-settings-btn{ width:100%; min-width:0; }
  .subscription-gate-actions{ width:100%; }
}


/* ============================================================
   RED™ OS Community — User-uploaded video posts: adaptive framing
   Keeps true widescreen uploads in 16:9, but lets portrait /
   near-portrait uploads render in 3:4. For those taller videos we
   prioritise preserving the sides and crop from the bottom first by
   pinning the framing to the top-center. YouTube remains excluded.
   ============================================================ */

/* Feed hero: landscape videos stay 16:9. */
.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-landscape:not(.is-youtube),
#feed > .post.post-image-first .post-media.post-media-hero.is-video.media-landscape:not(.is-youtube),
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-landscape:not(.is-youtube) {
  aspect-ratio: 16 / 9 !important;
  min-height: 0;
  background: #000;
}

/* Feed hero: portrait + near-3/4 videos switch to 3:4. */
.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube),
.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube),
#feed > .post.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube),
#feed > .post.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube),
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube),
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube) {
  aspect-ratio: 3 / 4 !important;
  min-height: 0;
  background: #000;
}

.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video:not(.is-youtube) video,
#feed > .post.post-image-first .post-media.post-media-hero.is-video:not(.is-youtube) video,
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video:not(.is-youtube) video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center center;
}

.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube) video,
.post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube) video,
#feed > .post.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube) video,
#feed > .post.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube) video,
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-portrait:not(.is-youtube) video,
#feed > .post.post-feed-patched.post-image-first .post-media.post-media-hero.is-video.media-square:not(.is-youtube) video {
  object-position: top center;
}

/* Profile grid cells: mirror the same logic so feed + profile stay coherent. */
.prof-cell .post-media.is-video.media-landscape:not(.is-youtube) {
  aspect-ratio: 16 / 9 !important;
  background: #000;
}

.prof-cell .post-media.is-video.media-portrait:not(.is-youtube),
.prof-cell .post-media.is-video.media-square:not(.is-youtube) {
  aspect-ratio: 3 / 4 !important;
  background: #000;
}

.prof-cell .post-media.is-video:not(.is-youtube) video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center center;
}

.prof-cell .post-media.is-video.media-portrait:not(.is-youtube) video,
.prof-cell .post-media.is-video.media-square:not(.is-youtube) video {
  object-position: top center;
}

/* ============================================================
   RED OS V12 — Pending verification + Castings Platform
   ============================================================ */

/* ── Story tile pending-verification treatment ─────────────── */
.story.is-pending .story-tile.is-pending {
  position: relative;
  background: #000;
  border: 2px solid #d4b067;
  box-shadow: 0 0 0 1px rgba(212, 176, 103, 0.25), 0 2px 18px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.story.is-pending .story-pending-overlay {
  color: #e6c98a;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  padding: 8px 10px;
}
.story.is-pending .story-name {
  color: #777;
}
.story.is-pending .story-category {
  color: #8a7446;
  font-style: italic;
}

/* ── Profile pending locked screen ─────────────────────────── */
.profile-pending-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px;
}
.profile-pending-card {
  max-width: 420px;
  width: 100%;
  background: linear-gradient(160deg, rgba(212, 176, 103, 0.08), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(212, 176, 103, 0.35);
  border-radius: 22px;
  padding: 32px 26px 28px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.profile-pending-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(212, 176, 103, 0.5);
  color: #d4b067;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.35);
}
.profile-pending-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 12px;
  color: #fff;
  line-height: 1.2;
}
.profile-pending-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0 0 22px;
}
.profile-pending-card .btn {
  display: inline-flex;
  padding: 12px 24px;
}
.app-light .profile-pending-card {
  background: linear-gradient(160deg, rgba(212, 176, 103, 0.12), rgba(255, 255, 255, 0.6));
  border-color: rgba(212, 176, 103, 0.45);
}
.app-light .profile-pending-card h2 { color: #2a2420; }
.app-light .profile-pending-card p { color: rgba(42, 36, 32, 0.75); }
.app-light .profile-pending-mark {
  background: rgba(255, 255, 255, 0.7);
  color: #a97d2c;
}

/* ── Gateway drawer: Plateforme de Castings row ────────────── */
.gw-castings-section {
  margin-top: 6px;
  margin-bottom: 8px;
}
.gw-castings-row {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(212, 176, 103, 0.12), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(212, 176, 103, 0.35);
  border-radius: 14px;
  color: #f5e6c3;
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.gw-castings-row:hover { border-color: rgba(212, 176, 103, 0.6); }
.gw-castings-row:active { transform: scale(0.99); }
.gw-castings-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.gw-castings-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.gw-castings-badge {
  min-width: 34px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #7f0d12 0%, #bc1620 58%, #e7323f 100%);
  border: 1px solid rgba(255, 112, 112, 0.42);
  box-shadow: 0 10px 24px rgba(155, 12, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
}
.gw-castings-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(212, 176, 103, 0.18);
  color: #d4b067;
}
.app-light .gw-castings-row {
  background: linear-gradient(135deg, rgba(212, 176, 103, 0.18), rgba(255, 255, 255, 0.5));
  border-color: rgba(169, 125, 44, 0.4);
  color: #3a2e1b;
}
.app-light .gw-castings-dot { color: #a97d2c; background: rgba(169, 125, 44, 0.12); }
.app-light .gw-castings-badge { box-shadow: 0 10px 24px rgba(183, 35, 46, 0.16), inset 0 1px 0 rgba(255,255,255,0.18); }

/* ── Castings view: greeting + grid ────────────────────────── */
.castings-wrap { padding: 8px 16px 120px; }
.castings-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.castings-hello { padding: 8px 4px 18px; }
.castings-hello h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.75rem;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.15;
}
.castings-hello p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}
.app-light .castings-hello h1 { color: #2a2420; }
.app-light .castings-hello p { color: rgba(42, 36, 32, 0.7); }

.castings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (min-width: 520px) {
  .castings-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 780px) {
  .castings-grid { grid-template-columns: repeat(4, 1fr); }
}

.casting-tile {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  transition: transform 0.14s ease;
  box-sizing: border-box;
}
.casting-tile:active { transform: scale(0.98); }
.casting-tile-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  border: 2px solid #d4b067;
  box-shadow: 0 0 0 1px rgba(212, 176, 103, 0.15), 0 4px 22px rgba(0, 0, 0, 0.45);
}
.casting-tile-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
}
.casting-tile-meta {
  padding: 4px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.casting-tile-cat {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: #d4b067;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.casting-tile-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.98rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.casting-tile-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}
.app-light .casting-tile-frame {
  background: #f2e9d4;
  border-color: #c19a4a;
}
.app-light .casting-tile-cat   { color: #a97d2c; }
.app-light .casting-tile-title { color: #2a2420; }
.app-light .casting-tile-sub   { color: rgba(42, 36, 32, 0.65); }

.casting-tile-closed {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d4b067;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 12px;
}
.casting-tile.is-closed { opacity: 0.82; }

.casting-popup-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.casting-popup-admin-actions[hidden] { display: none !important; }
.casting-popup-admin-btn { min-width: 0; }
.casting-popup-admin-btn.is-danger {
  border-color: rgba(198, 52, 52, 0.42);
  color: #ff8585;
}
.app-light .casting-popup-admin-btn.is-danger {
  border-color: rgba(173, 63, 63, 0.34);
  color: #9f3535;
}

.castings-more-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 0 0;
}
.castings-more-btn { min-width: 160px; }
.castings-empty { padding: 48px 16px; text-align: center; }

/* ── Casting popup (bottom → top, transparent image bg) ───── */
.casting-popup {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
}
.casting-popup[hidden] { display: none !important; }
.casting-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}
.casting-popup.is-open .casting-popup-backdrop { opacity: 1; }
.casting-popup-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  top: 10px;
  border-radius: 22px;
  background: #07060a;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 0.68, 0.24, 0.98);
  pointer-events: auto;
  border: 1px solid rgba(212, 176, 103, 0.3);
  box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.7);
}
.casting-popup.is-open .casting-popup-panel { transform: translateY(0); }
.casting-popup-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.14; /* static, heavy transparency for premium dark read */
  filter: saturate(0.9);
  z-index: 0;
}
.casting-popup-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 6, 10, 0.4) 0%, rgba(7, 6, 10, 0.92) 100%);
  z-index: 1;
}
.casting-popup-scroll {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  padding: 48px 24px 32px;
  -webkit-overflow-scrolling: touch;
}
.casting-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 176, 103, 0.35);
  background: rgba(0, 0, 0, 0.55);
  color: #f5e6c3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.casting-popup-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #d4b067;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.casting-popup-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.8rem;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 16px;
}
.casting-popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.casting-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(212, 176, 103, 0.14);
  border: 1px solid rgba(212, 176, 103, 0.3);
  color: #f5e6c3;
  font-size: 0.78rem;
  font-weight: 500;
}
.casting-popup-section { margin-bottom: 22px; }
.casting-popup-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #d4b067;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.casting-popup-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.casting-popup-cta-wrap {
  position: sticky;
  bottom: 0;
  padding: 20px 0 8px;
  background: linear-gradient(180deg, rgba(7, 6, 10, 0) 0%, rgba(7, 6, 10, 0.92) 40%);
}
.casting-popup-cta.is-terminated {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  cursor: not-allowed;
}
.app-light .casting-popup-panel { background: #fbf7ee; border-color: rgba(169, 125, 44, 0.35); }
.app-light .casting-popup-bg { opacity: 0.18; }
.app-light .casting-popup-veil {
  background: linear-gradient(180deg, rgba(251, 247, 238, 0.4) 0%, rgba(251, 247, 238, 0.94) 100%);
}
.app-light .casting-popup-title { color: #2a2420; }
.app-light .casting-popup-body { color: rgba(42, 36, 32, 0.82); }
.app-light .casting-popup-close { background: rgba(255, 255, 255, 0.6); color: #3a2e1b; }
.app-light .casting-chip { color: #3a2e1b; background: rgba(169, 125, 44, 0.14); border-color: rgba(169, 125, 44, 0.3); }

body.casting-popup-open { overflow: hidden; }

/* ── Admin: create casting sheet ───────────────────────────── */
.casting-admin-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
}
.casting-admin-sheet[hidden] { display: none !important; }
.casting-admin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: auto;
}
.casting-admin-sheet.is-open .casting-admin-backdrop { opacity: 1; }
.casting-admin-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  background: #0d0c10;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid rgba(212, 176, 103, 0.35);
  padding: 18px 20px 26px;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 0.68, 0.24, 0.98);
  pointer-events: auto;
}
.casting-admin-sheet.is-open .casting-admin-panel { transform: translateY(0); }
.casting-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(212, 176, 103, 0.18);
}
.casting-admin-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.35rem;
  color: #fff;
  margin: 0;
}
.casting-admin-close {
  background: transparent;
  border: 1px solid rgba(212, 176, 103, 0.3);
  color: #f5e6c3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.casting-admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.casting-admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.casting-admin-field > span {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: #d4b067;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.casting-admin-field input[type="text"],
.casting-admin-field input[type="email"],
.casting-admin-field input[type="datetime-local"],
.casting-admin-field textarea,
.casting-admin-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: #fff;
  font-family: inherit;
}
.casting-admin-field textarea { resize: vertical; min-height: 84px; }
.casting-admin-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #d4b067 50%), linear-gradient(135deg, #d4b067 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.casting-admin-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.casting-admin-lang-seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
  align-self: flex-start;
}
.casting-admin-lang-seg button {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.casting-admin-lang-seg button.is-active {
  background: #d4b067;
  color: #0a0a0a;
}

.casting-admin-image-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.casting-admin-image-preview {
  width: 120px;
  height: 68px;
  border-radius: 10px;
  border: 2px solid rgba(212, 176, 103, 0.4);
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.casting-admin-image-btn { padding: 10px 16px; font-size: 0.85rem; }

.casting-admin-error {
  color: #ff8787;
  font-size: 0.85rem;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
}

.app-light .casting-admin-panel { background: #fbf7ee; border-top-color: rgba(169, 125, 44, 0.35); }
.app-light .casting-admin-head h3 { color: #2a2420; }
.app-light .casting-admin-close { color: #3a2e1b; border-color: rgba(169, 125, 44, 0.35); }
.app-light .casting-admin-field input[type="text"],
.app-light .casting-admin-field input[type="email"],
.app-light .casting-admin-field input[type="datetime-local"],
.app-light .casting-admin-field textarea,
.app-light .casting-admin-field select {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #2a2420;
}
.app-light .casting-admin-lang-seg { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
.app-light .casting-admin-lang-seg button { color: rgba(0,0,0,0.55); }
.app-light .casting-admin-lang-seg button.is-active { background: #a97d2c; color: #fff; }

body.casting-admin-open { overflow: hidden; }

/* Admin "+" button in castings topbar */
.castings-admin-create {
  color: #d4b067;
  border-color: rgba(212, 176, 103, 0.4);
}
.app-light .castings-admin-create { color: #a97d2c; border-color: rgba(169, 125, 44, 0.4); }


/* User button + Impulsion paywall inside castings */
.castings-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.castings-applications-btn {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.castings-paywall {
  margin: 2px 0 22px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(212, 176, 103, 0.22);
  background: linear-gradient(180deg, rgba(212, 176, 103, 0.06), rgba(255,255,255,0.02));
  box-shadow: 0 18px 48px rgba(0,0,0,0.24);
}
.castings-paywall-copy {
  margin-bottom: 14px;
}
.castings-paywall-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4b067;
  margin-bottom: 8px;
}
.castings-paywall-copy h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.42rem;
  font-weight: 500;
  line-height: 1.12;
}
.castings-paywall-copy p {
  margin: 0;
  color: rgba(255,255,255,0.66);
  line-height: 1.5;
}
.castings-paywall-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.castings-paywall-card .subscription-plan-desc {
  min-height: 72px;
}
@media (min-width: 720px) {
  .castings-paywall-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.app-light .castings-paywall {
  background: linear-gradient(180deg, rgba(169, 125, 44, 0.08), rgba(255,255,255,0.72));
  border-color: rgba(169, 125, 44, 0.22);
}
.app-light .castings-paywall-copy h2 { color: #2a2420; }
.app-light .castings-paywall-copy p { color: rgba(42,36,32,0.72); }
.app-light .castings-paywall-kicker { color: #a97d2c; }

/* Personal applications sheet */
.castings-apps-sheet {
  position: fixed;
  inset: 0;
  z-index: 1450;
  pointer-events: none;
}
.castings-apps-sheet[hidden] { display: none !important; }
.castings-apps-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: auto;
}
.castings-apps-sheet.is-open .castings-apps-backdrop { opacity: 1; }
.castings-apps-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  overflow: auto;
  background: #0d0c10;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid rgba(212,176,103,0.35);
  padding: 18px 18px 28px;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 0.68, 0.24, 0.98);
  pointer-events: auto;
}
.castings-apps-sheet.is-open .castings-apps-panel { transform: translateY(0); }
.castings-apps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212,176,103,0.16);
}
.castings-apps-head h3 {
  margin: 0;
  color: #fff;
  font-size: 1.32rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}
.castings-apps-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(212,176,103,0.35);
  background: transparent;
  color: #f5e6c3;
  font-size: 20px;
}
.castings-apps-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.castings-app-item,
.castings-apps-empty,
.castings-apps-upgrade {
  border-radius: 18px;
  border: 1px solid rgba(212,176,103,0.16);
  background: rgba(255,255,255,0.03);
}
.castings-app-item {
  padding: 14px 15px;
}
.castings-app-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.castings-app-cat {
  color: #d4b067;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.castings-app-date {
  color: rgba(255,255,255,0.46);
  font-size: 0.78rem;
}
.castings-app-title {
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 10px;
}
.castings-app-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212,176,103,0.24);
  background: rgba(212,176,103,0.12);
  color: #f5e6c3;
  font-size: 0.78rem;
  font-weight: 600;
}
.castings-app-status.is-sent {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.82);
}
.castings-apps-empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255,255,255,0.68);
}
.castings-apps-upgrade {
  padding: 22px 18px;
  text-align: center;
}
.castings-apps-upgrade-mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: rgba(212,176,103,0.12);
  border: 1px solid rgba(212,176,103,0.24);
  color: #d4b067;
  font-size: 1.1rem;
}
.castings-apps-upgrade h4 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.18rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}
.castings-apps-upgrade p {
  margin: 0 0 16px;
  color: rgba(255,255,255,0.68);
  line-height: 1.5;
}
body.castings-apps-open { overflow: hidden; }
.app-light .castings-apps-panel {
  background: #fbf7ee;
  border-top-color: rgba(169,125,44,0.35);
}
.app-light .castings-apps-head h3,
.app-light .castings-app-title,
.app-light .castings-apps-upgrade h4 { color: #2a2420; }
.app-light .castings-apps-close { color: #3a2e1b; border-color: rgba(169,125,44,0.35); }
.app-light .castings-app-item,
.app-light .castings-apps-empty,
.app-light .castings-apps-upgrade { background: rgba(255,255,255,0.72); border-color: rgba(169,125,44,0.16); }
.app-light .castings-app-date,
.app-light .castings-apps-empty,
.app-light .castings-apps-upgrade p { color: rgba(42,36,32,0.68); }
.app-light .castings-app-cat { color: #a97d2c; }
.app-light .castings-app-status {
  color: #6d5220;
  background: rgba(169,125,44,0.12);
  border-color: rgba(169,125,44,0.24);
}
.app-light .castings-app-status.is-sent {
  color: rgba(42,36,32,0.78);
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
.app-light .castings-apps-upgrade-mark {
  color: #a97d2c;
  background: rgba(169,125,44,0.12);
  border-color: rgba(169,125,44,0.2);
}




/* Legal floating CTA + sheet */
.castings-legal-fab {
  position: fixed;
  right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px));
  bottom: calc(var(--dock-h) + var(--safe-bottom) + 18px);
  z-index: 24;
  min-height: 44px;
  padding-inline: 18px;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}
.castings-legal-sheet {
  position: fixed;
  inset: 0;
  z-index: 1452;
  pointer-events: none;
}
.castings-legal-sheet[hidden] { display: none !important; }
.castings-legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: auto;
}
.castings-legal-sheet.is-open .castings-legal-backdrop { opacity: 1; }
.castings-legal-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 84vh;
  overflow: auto;
  background: #0d0c10;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid rgba(212,176,103,0.35);
  padding: 18px 18px calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 0.68, 0.24, 0.98);
  pointer-events: auto;
}
.castings-legal-sheet.is-open .castings-legal-panel { transform: translateY(0); }
.castings-legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212,176,103,0.16);
}
.castings-legal-head h3 {
  margin: 0;
  color: #fff;
  font-size: 1.32rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
}
.castings-legal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(212,176,103,0.35);
  background: transparent;
  color: #f5e6c3;
  font-size: 20px;
}
.castings-legal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.castings-legal-copy,
.castings-legal-contract-wrap {
  border-radius: 18px;
  border: 1px solid rgba(212,176,103,0.16);
  background: rgba(255,255,255,0.03);
}
.castings-legal-copy {
  padding: 16px 16px 14px;
}
.castings-legal-copy p {
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.58;
}
.castings-legal-copy p + p {
  margin-top: 12px;
}
.castings-legal-contract-wrap {
  padding: 16px;
}
.castings-legal-contract-btn {
  text-align: center;
  text-decoration: none;
}
.castings-legal-contract-note {
  margin: 10px 4px 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}
body.castings-legal-open { overflow: hidden; }
.app-light .castings-legal-fab {
  background: rgba(255,255,255,0.88);
  color: #2a2420;
  border-color: rgba(169,125,44,0.28);
}
.app-light .castings-legal-panel {
  background: #fbf7ee;
  border-top-color: rgba(169,125,44,0.35);
}
.app-light .castings-legal-head h3 { color: #2a2420; }
.app-light .castings-legal-close { color: #3a2e1b; border-color: rgba(169,125,44,0.35); }
.app-light .castings-legal-copy,
.app-light .castings-legal-contract-wrap {
  background: rgba(255,255,255,0.72);
  border-color: rgba(169,125,44,0.16);
}
.app-light .castings-legal-copy p,
.app-light .castings-legal-contract-note {
  color: rgba(42,36,32,0.72);
}

/* ── Castings / pending / gateway refinements (patch 3) ───── */
.view[data-view="profile-pending"].is-active {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.view[data-view="profile-pending"] .topbar {
  flex: 0 0 auto;
}
.profile-pending-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100dvh - 84px - var(--dock-h) - var(--safe-bottom));
  padding: 18px 24px calc(var(--dock-h) + var(--safe-bottom) + 12px);
  overflow: hidden;
}
.profile-pending-card {
  max-width: 430px;
  max-height: 100%;
  overflow: hidden;
}
@media (max-height: 760px) {
  .profile-pending-wrap {
    padding-top: 10px;
    padding-bottom: calc(var(--dock-h) + var(--safe-bottom) + 8px);
  }
  .profile-pending-card {
    padding: 24px 22px 22px;
    border-radius: 20px;
  }
  .profile-pending-mark {
    width: 62px;
    height: 62px;
    margin-bottom: 14px;
  }
  .profile-pending-card h2 {
    font-size: 1.42rem;
    margin-bottom: 10px;
  }
  .profile-pending-card p {
    font-size: 0.88rem;
    line-height: 1.46;
    margin-bottom: 18px;
  }
}
.castings-paywall-card .subscription-plan-top {
  align-items: flex-start;
}
.casting-plan-mini-icon {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4b067;
  background: rgba(212, 176, 103, 0.08);
  border: 1px solid rgba(212, 176, 103, 0.24);
  flex: 0 0 auto;
}
.casting-plan-mini-svg {
  width: 20px;
  height: 20px;
}
.app-light .casting-plan-mini-icon {
  color: #a97d2c;
  background: rgba(169, 125, 44, 0.10);
  border-color: rgba(169, 125, 44, 0.22);
}
#castings-grid[hidden],
#castings-more-wrap[hidden],
#castings-admin-create-btn[hidden],
#castings-applications-btn[hidden] {
  display: none !important;
}
.business-drawer-section-signout {
  margin-top: 10px;
  padding-top: 0;
}
