/* TOWN Web — Screen 01: Entry
   Visual system aligned with approved mobile Welcome principles:
   ivory ground, charcoal type, editorial calm, one principal action. */

:root {
  --ivory: #fdfbf7;
  --ivory-deep: #f7f2ea;
  --charcoal: #1e140f;
  --body: #2c241c;
  --muted: #8a7f74;
  --secondary: #f2ebe1;
  --secondary-hover: #ebe2d5;
  --primary-hover: #2a1d16;
  --focus: #5c4a3a;
  --max-copy: 28rem;
  --btn-width: 17.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--body);
  background:
    radial-gradient(120% 80% at 12% 0%, #fffdf9 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #f3ebe0 0%, transparent 50%),
    linear-gradient(165deg, var(--ivory) 0%, var(--ivory-deep) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--charcoal);
  color: var(--ivory);
  text-decoration: none;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

/* ——— Desktop entry composition (1280–1440 first) ——— */

.entry {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(22rem, 0.92fr) minmax(26rem, 1.08fr);
  align-items: stretch;
}

.entry__content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(2.5rem, 6vh, 4.5rem) clamp(2rem, 4vw, 4.5rem);
}

.entry__copy {
  width: 100%;
  max-width: var(--max-copy);
  padding-right: clamp(0.5rem, 2vw, 2rem);
}

.entry__brand {
  margin: 0 0 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 5.2vw, 4.75rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--charcoal);
  text-indent: 0.08em;
}

.entry__headline {
  margin: 0 0 1rem;
  max-width: 22ch;
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 1.7vw, 1.65rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--body);
}

.entry__support {
  margin: 0 0 2.25rem;
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: 0.015em;
  color: var(--body);
  opacity: 0.92;
}

.entry__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-width);
  max-width: 100%;
  min-height: 3.35rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition:
    background-color 180ms ease,
    transform 180ms var(--ease-out),
    box-shadow 180ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--charcoal);
  color: var(--ivory);
}

.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: var(--secondary);
  color: var(--charcoal);
  font-weight: 500;
}

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

.entry__note {
  margin: 0;
  max-width: 34ch;
  font-size: 0.84rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 220ms ease;
}

.entry__note.is-emphasized {
  color: var(--body);
}

.entry__sign-in-wrap {
  margin: 0.85rem 0 0;
  max-width: 34ch;
}

.entry__login-status {
  margin: 0.55rem 0 0;
  max-width: 34ch;
  font-size: 0.84rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.entry__login-status.is-success {
  color: var(--body);
}

.entry__login-status.is-error {
  color: var(--body);
}

.entry__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: stretch;
  min-height: 100%;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1.5rem, 3.5vw, 3.5rem)
    clamp(1.5rem, 4vh, 3rem) 0;
  overflow: hidden;
}

.entry__figure {
  margin: 0;
  width: 100%;
  height: min(78vh, 40rem);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.entry__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--ivory) 0%, transparent 14%),
    linear-gradient(180deg, rgba(253, 251, 247, 0.35) 0%, transparent 18%),
    linear-gradient(0deg, rgba(247, 242, 234, 0.45) 0%, transparent 22%);
}

.entry__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Entrance motion — calm, intentional; content remains visible without JS */

@media (prefers-reduced-motion: no-preference) {
  .entry__brand,
  .entry__headline,
  .entry__support,
  .entry__actions,
  .entry__note {
    animation: rise-in 800ms var(--ease-out) both;
  }

  .entry__brand {
    animation-delay: 60ms;
  }

  .entry__headline {
    animation-delay: 140ms;
  }

  .entry__support {
    animation-delay: 220ms;
  }

  .entry__actions {
    animation-delay: 300ms;
  }

  .entry__note {
    animation-delay: 380ms;
  }

  .entry__figure {
    animation: visual-in 1000ms var(--ease-out) both;
    animation-delay: 160ms;
  }
}

@keyframes rise-in {
  from {
    opacity: 0.35;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes visual-in {
  from {
    opacity: 0.45;
    transform: translateY(14px) scale(1.012);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* Learn more sheet — quiet explanation, same screen */

.sheet[hidden] {
  display: none;
}

.sheet:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 15, 0.28);
  animation: fade-backdrop 220ms ease forwards;
}

.sheet__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(28rem, calc(100% - 2rem));
  max-height: min(72vh, 36rem);
  overflow: auto;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--ivory);
  border-radius: 1.25rem;
  transform: translate(-50%, -46%);
  opacity: 0;
  animation: panel-in 280ms var(--ease-out) forwards;
  box-shadow: 0 18px 50px rgba(30, 20, 15, 0.14);
}

.sheet__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  line-height: 1.2;
}

.sheet__body {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.sheet__body p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--body);
}

.sheet__close {
  width: 100%;
}

@keyframes fade-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panel-in {
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet__backdrop,
  .sheet__panel {
    animation: none;
    opacity: 1;
  }

  .sheet__panel {
    transform: translate(-50%, -50%);
  }
}

/* ——— Tablet ——— */

@media (max-width: 1024px) {
  .entry {
    grid-template-columns: 1fr 1fr;
  }

  .entry__content {
    justify-content: center;
    padding-right: 1.5rem;
  }

  .entry__copy {
    padding-right: 0;
  }

  .entry__visual {
    padding-left: 0.5rem;
  }

  .entry__figure {
    height: min(70vh, 34rem);
  }
}

/* ——— Mobile web ——— */

@media (max-width: 820px) {
  .entry {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 100dvh;
  }

  .entry__content {
    order: 1;
    justify-content: center;
    padding: 2.5rem 1.5rem 1.25rem;
  }

  .entry__copy {
    max-width: 24rem;
    text-align: center;
    margin: 0 auto;
  }

  .entry__headline,
  .entry__support,
  .entry__note,
  .entry__sign-in-wrap,
  .entry__login-status {
    margin-left: auto;
    margin-right: auto;
  }

  .entry__headline {
    max-width: 20ch;
  }

  .entry__actions {
    align-items: center;
  }

  .btn {
    width: min(var(--btn-width), 100%);
  }

  .entry__visual {
    order: 2;
    padding: 0.5rem 1rem 2rem;
    min-height: auto;
  }

  .entry__figure {
    height: auto;
    max-height: 42vh;
  }

  .entry__figure::after {
    background:
      linear-gradient(180deg, var(--ivory) 0%, transparent 16%),
      linear-gradient(0deg, var(--ivory-deep) 0%, transparent 20%);
  }

  .entry__image {
    object-fit: contain;
    height: auto;
    max-height: 42vh;
    margin: 0 auto;
  }

  .sheet__panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 72vh;
    border-radius: 1.25rem 1.25rem 0 0;
    transform: translateY(12px);
    animation-name: sheet-up;
  }
}

@keyframes sheet-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
  .sheet__panel {
    transform: none;
  }
}

/* ——— Screen 02: Country selection ——— */

.country {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.country__frame {
  width: 100%;
  max-width: 28rem;
}

.country__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.country__back {
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.country__back:hover {
  color: var(--charcoal);
  border-bottom-color: rgba(30, 20, 15, 0.25);
}

.country__back:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.country__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
  text-indent: 0.08em;
}

.country__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--charcoal);
}

.country__lead {
  margin: 0 0 2rem;
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--body);
}

.country__fieldset {
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.country__legend {
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.country__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.country__option {
  display: block;
  cursor: pointer;
}

.country__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.country__option-face {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(30, 20, 15, 0.1);
  background: rgba(253, 251, 247, 0.55);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.country__option:hover .country__option-face {
  border-color: rgba(30, 20, 15, 0.22);
  background: rgba(255, 253, 249, 0.9);
}

.country__option input:focus-visible + .country__option-face {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.country__option input:checked + .country__option-face {
  border-color: var(--charcoal);
  background: var(--secondary);
  box-shadow: inset 0 0 0 1px var(--charcoal);
}

.country__flag {
  width: 1.75rem;
  height: 1.25rem;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.country__option-label {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--charcoal);
}

.country__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.country__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  background: #ddd4c8;
  color: #8a7f74;
  transform: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  background: #ddd4c8;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .country__title,
  .country__lead,
  .country__fieldset,
  .country__actions {
    animation: rise-in 700ms var(--ease-out) both;
  }

  .country__lead {
    animation-delay: 80ms;
  }

  .country__fieldset {
    animation-delay: 140ms;
  }

  .country__actions {
    animation-delay: 220ms;
  }
}

/* ——— Screen 03 boundary placeholder ——— */

.boundary {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.boundary__frame {
  width: 100%;
  max-width: 28rem;
}

.boundary__brand {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.boundary__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.boundary__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
}

.boundary__lead,
.boundary__meta {
  margin: 0 0 1rem;
  max-width: 36ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--body);
}

.boundary__meta {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.boundary__back {
  width: var(--btn-width);
  max-width: 100%;
  text-decoration: none;
}

#view-entry[hidden],
#view-country[hidden],
#view-city[hidden],
#view-location[hidden],
#view-feed[hidden],
#view-membership[hidden],
#view-ended[hidden] {
  display: none !important;
}

.city__context {
  margin: -0.75rem 0 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.city__thumb {
  object-fit: cover;
  border-radius: 3px;
}

.location__city {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.location__privacy {
  margin: 0 0 2rem;
  max-width: 36ch;
  font-size: 0.95rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.location__status-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.location__message {
  margin: -0.75rem 0 1.75rem;
  max-width: 36ch;
  font-size: 0.95rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--body);
}

.location__message[hidden] {
  display: none !important;
}

#location-idle[hidden],
#location-success[hidden],
#location-outside[hidden] {
  display: none !important;
}

/* ——— Screen 05: Visitor local feed ——— */

body.page-feed {
  background: #0a0a0a;
}

.feed {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  color: #f4efe6;
  overflow: hidden;
}

.feed__scroller {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.feed__scroller--locked {
  overflow: hidden;
  touch-action: none;
}

.feed__panel {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

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

.feed__live.is-surface {
  position: fixed;
  top: auto;
  left: 50%;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 28;
  width: min(22rem, calc(100vw - 2rem));
  height: auto;
  margin: 0;
  padding: 0.7rem 0.95rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
  border-radius: 0.7rem;
  transform: translateX(-50%);
  background: rgba(12, 12, 12, 0.88);
  color: #f4efe6;
  font-size: 0.82rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

@media (min-width: 721px) {
  .feed__live.is-surface {
    bottom: 1.5rem;
    left: calc(50% + 2.4rem);
  }
}

.feed__state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(54, 78, 92, 0.35), transparent 55%),
    linear-gradient(160deg, #14181c 0%, #0b0d0f 55%, #171310 100%);
  color: #f4efe6;
}

.feed__state[hidden] {
  display: none;
}

.feed__state-frame {
  width: min(26rem, 100%);
  text-align: center;
}

.feed__state-brand {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.feed__state-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  font-weight: 650;
  line-height: 1.2;
}

.feed__state-body {
  margin: 0 0 1.25rem;
  color: rgba(244, 239, 230, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}

.app-nav__item.is-unavailable {
  opacity: 0.55;
}

.app-nav__item.is-unavailable:hover {
  color: rgba(244, 239, 230, 0.62);
  background: transparent;
}

.feed__media {
  position: absolute;
  inset: 0;
}

.feed__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.feed__chrome,
.feed__actions {
  touch-action: manipulation;
}

.feed__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.28) 28%,
    rgba(0, 0, 0, 0.18) 48%,
    rgba(0, 0, 0, 0.55) 72%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

.feed__chrome {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.1rem, 3vh, 1.75rem) clamp(1.25rem, 4vw, 3.5rem)
    clamp(1.25rem, 3.5vh, 2rem);
  max-width: 44rem;
  box-sizing: border-box;
}

.feed__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feed__top-left,
.feed__top-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feed__top-right {
  align-items: flex-end;
  text-align: right;
}

.feed__back {
  align-self: flex-start;
  background: transparent;
  color: rgba(244, 239, 230, 0.74);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
}

.feed__back:hover {
  color: #f7f3ec;
}

.feed__back:focus-visible,
.feed__primary:focus-visible,
.feed__secondary:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 3px;
}

.feed__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f7f3ec;
}

.feed__visitor {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
}

.feed__pager {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.8);
}

.feed__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 34rem;
  padding: 1.5rem 0 1.25rem;
}

.feed__community {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.86);
}

.feed__category {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c419;
}

.feed__headline {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #faf6ef;
  max-width: 18ch;
}

.feed__area {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(244, 239, 230, 0.84);
}

.feed__summary {
  margin: 0 0 0.9rem;
  max-width: 38ch;
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  line-height: 1.58;
  color: #f4efe6;
}

.feed__meta {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.7);
}

.feed__source-lang,
.signal-detail__source-lang {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: rgba(244, 239, 230, 0.52);
}

.feed__source-lang[hidden],
.signal-detail__source-lang[hidden] {
  display: none !important;
}

.feed__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  max-width: 22rem;
}

/* Product navigation — desktop left rail / mobile bottom bar */
.app-nav {
  position: fixed;
  z-index: 30;
  color: #f4efe6;
}

.app-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.app-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.4rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: rgba(244, 239, 230, 0.62);
  font: inherit;
  cursor: pointer;
  transition:
    color 160ms var(--ease-out),
    background 160ms var(--ease-out);
}

.app-nav__item:hover {
  color: #f7f3ec;
  background: rgba(244, 239, 230, 0.06);
}

.app-nav__item:active {
  color: #fbf7f0;
  background: rgba(244, 239, 230, 0.1);
}

.app-nav__item:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 2px;
}

.app-nav__item.is-active {
  color: #fbf7f0;
  background: rgba(244, 239, 230, 0.1);
}

.app-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-nav__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Desktop / tablet: left rail (existing mobile breakpoint is 720px) */
@media (min-width: 721px) {
  .app-nav {
    top: 0;
    left: 0;
    bottom: 0;
    width: 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0.55rem;
    background:
      linear-gradient(
        90deg,
        rgba(8, 8, 8, 0.72) 0%,
        rgba(8, 8, 8, 0.28) 70%,
        rgba(8, 8, 8, 0) 100%
      );
    pointer-events: none;
  }

  .app-nav__list {
    pointer-events: auto;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
  }

  .app-nav__item {
    flex-direction: column;
    gap: 0.35rem;
    min-height: 3.65rem;
    padding: 0.55rem 0.25rem;
  }

  .app-nav__label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-align: center;
    max-width: 5.1rem;
  }

  /* Keep editorial chrome clear of the rail */
  .feed__chrome {
    margin-left: 5.75rem;
  }
}

@media (min-width: 960px) {
  .app-nav {
    width: 6.15rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .feed__chrome {
    /* Desktop Feed Experience V1 margin plus rail clearance */
    margin-left: calc(6.15rem + clamp(1.35rem, 4vw, 3.35rem));
  }
}

@media (min-width: 1280px) {
  .feed__chrome {
    margin-left: calc(6.15rem + clamp(2.1rem, 5.5vw, 4.85rem));
  }
}

/* Mobile: bottom navigation at existing 720px breakpoint */
@media (max-width: 720px) {
  .app-nav {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background:
      linear-gradient(
        0deg,
        rgba(8, 8, 8, 0.92) 0%,
        rgba(8, 8, 8, 0.78) 72%,
        rgba(8, 8, 8, 0.35) 100%
      );
    border-top: 1px solid rgba(244, 239, 230, 0.08);
  }

  .app-nav__list {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.15rem;
    width: 100%;
  }

  .app-nav__item {
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.22rem;
    min-height: 3.15rem;
    padding: 0.4rem 0.15rem;
    border-radius: 0.55rem;
  }

  .app-nav__label {
    font-size: 0.54rem;
    letter-spacing: 0.06em;
    text-align: center;
  }

  .app-nav__icon svg {
    width: 18px;
    height: 18px;
  }

  /* Minimum clearance so feed actions stay above the bottom bar */
  .feed__chrome {
    padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  }

  .signal-detail__chrome {
    padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Shared authentication window (visual review) */
.auth-window[hidden] {
  display: none !important;
}

.auth-window {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auth-window__dim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(20, 16, 12, 0.35) 0%, transparent 70%),
    rgba(0, 0, 0, 0.62);
}

.auth-window__panel {
  position: relative;
  z-index: 1;
  width: min(26.5rem, 100%);
  max-height: min(92dvh, 40rem);
  overflow: auto;
  padding: clamp(1.45rem, 3.5vh, 1.9rem) clamp(1.35rem, 3.5vw, 1.75rem)
    clamp(1.35rem, 3vh, 1.7rem);
  border-radius: 1.15rem;
  background:
    radial-gradient(120% 80% at 12% 0%, #fffdf9 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #f3ebe0 0%, transparent 50%),
    linear-gradient(165deg, var(--ivory) 0%, var(--ivory-deep) 100%);
  color: var(--body);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

.auth-window__close {
  position: absolute;
  top: 0.95rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.25rem 0.2rem;
}

.auth-window__close:hover {
  color: var(--charcoal);
}

.auth-window__close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.auth-window__frame {
  width: 100%;
  max-width: 22rem;
}

.auth-window__brand {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.auth-window__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.auth-window__mode-toggle {
  display: inline-block;
  margin: 0 0 1.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--body);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.auth-window__mode-toggle:hover {
  color: var(--charcoal);
}

.auth-window__mode-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.auth-window__channel {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
}

.auth-window__channel-btn {
  flex: 1 1 0;
  min-height: 2.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(30, 20, 15, 0.16);
  border-radius: 0.55rem;
  background: rgba(255, 253, 249, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 160ms var(--ease-out),
    background 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.auth-window__channel-btn:hover {
  color: var(--charcoal);
  border-color: rgba(30, 20, 15, 0.28);
}

.auth-window__channel-btn.is-selected {
  color: var(--charcoal);
  background: var(--secondary);
  border-color: var(--charcoal);
  box-shadow: inset 0 0 0 1px var(--charcoal);
}

.auth-window__channel-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.auth-window__field-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.auth-window__input {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(30, 20, 15, 0.18);
  border-radius: 0.55rem;
  background: rgba(255, 253, 249, 0.92);
  color: var(--charcoal);
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.4;
  outline: none;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.auth-window__input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(92, 74, 58, 0.16);
}

.auth-window__status {
  margin: 0.9rem 0 0;
  min-height: 1.35em;
  font-size: 0.84rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.auth-window__status.is-success {
  color: var(--body);
}

.auth-window__status.is-error {
  color: var(--body);
}

.auth-window__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.45rem;
}

.auth-window__actions .btn {
  width: 100%;
  max-width: none;
}

@media (max-width: 720px) {
  .auth-window {
    align-items: flex-end;
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .auth-window__panel {
    width: 100%;
    max-height: min(88dvh, 36rem);
    border-radius: 1.05rem 1.05rem 0.85rem 0.85rem;
  }
}

/* Profile V1 — registered civic identity overlay */
.profile-panel[hidden] {
  display: none !important;
}

.profile-panel {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.profile-panel__dim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(20, 16, 12, 0.28) 0%, transparent 70%),
    rgba(0, 0, 0, 0.58);
}

.profile-panel__sheet {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  max-height: 100dvh;
  margin: 0 auto;
  overflow: auto;
  padding:
    clamp(1.4rem, 3.5vh, 2rem)
    clamp(1.25rem, 4vw, 2rem)
    calc(1.5rem + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, #1a1511 0%, #120e0b 48%, #0d0a08 100%);
  color: #f4efe6;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.profile-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: rgba(244, 239, 230, 0.72);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.2rem;
}

.profile-panel__close:hover {
  color: #fbf7f0;
}

.profile-panel__close:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 3px;
}

.profile-panel__inner {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding-top: 0.35rem;
}

.profile-panel__brand {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #fbf7f0;
}

.profile-panel__label {
  margin: 0 0 1.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
}

.profile-panel__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.profile-panel__avatar {
  flex: 0 0 auto;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: #1a1511;
  background:
    radial-gradient(circle at 30% 25%, #fff8ef 0%, #e8dccb 55%, #cbb89f 100%);
}

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

.profile-panel__title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fbf7f0;
}

.profile-panel__handle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(244, 239, 230, 0.62);
  word-break: break-word;
}

.profile-panel__bio {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.86);
}

.profile-panel__meta {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.55rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
}

.profile-panel__meta-item {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(244, 239, 230, 0.78);
}

.profile-panel__activity-title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
}

.profile-panel__activity-empty {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.62);
}

.profile-panel__activity-list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.profile-panel__activity-item {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: 0.75rem;
  background: rgba(244, 239, 230, 0.04);
}

.profile-panel__activity-item-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-panel__activity-item-btn:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 3px;
}

.profile-panel__activity-date {
  display: block;
  margin: 0 0 0.28rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.5);
}

.profile-panel__activity-headline {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  color: #f7f1e8;
}

.profile-panel__actions {
  display: grid;
  gap: 0.65rem;
}

.profile-panel__actions .btn {
  width: 100%;
}

.profile-panel__status {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #f0d7c4;
}

.profile-panel__status[data-tone="error"] {
  color: #f0b4a4;
}

.profile-panel__status[data-tone="status"] {
  color: #e8e0d4;
}

/* Member Activity — backend truth only */
.activity-panel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.activity-panel[hidden] {
  display: none !important;
}

.activity-panel__dim {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.45);
}

.activity-panel__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  height: 100%;
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.25rem 1.75rem;
  background:
    radial-gradient(120% 70% at 80% 0%, rgba(232, 214, 180, 0.16), transparent 55%),
    linear-gradient(180deg, #1c1814 0%, #12100e 100%);
  color: #f4efe6;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.activity-panel__inner {
  max-width: 22rem;
}

.activity-panel__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.activity-panel__label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
}

.activity-panel__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fbf7f0;
}

.activity-panel__lead {
  margin: 0 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.78);
}

.activity-panel__status,
.activity-panel__empty {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.62);
}

.activity-panel__list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.activity-panel__item {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: 0.75rem;
  background: rgba(244, 239, 230, 0.04);
}

.activity-panel__item-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.activity-panel__item-btn:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 3px;
}

.activity-panel__item-kind {
  display: block;
  margin: 0 0 0.28rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.5);
  text-transform: uppercase;
}

.activity-panel__item-headline {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #f7f1e8;
}

.activity-panel__item-detail {
  display: block;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(244, 239, 230, 0.7);
}

.activity-panel__item-when {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: rgba(244, 239, 230, 0.45);
}

.activity-panel__actions {
  display: grid;
  gap: 0.65rem;
}

.activity-panel__actions .btn {
  width: 100%;
}

.activity-panel__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  font: inherit;
  color: rgba(244, 239, 230, 0.7);
  cursor: pointer;
}

@media (max-width: 719px) {
  .activity-panel {
    align-items: flex-end;
    justify-content: center;
  }

  .activity-panel__sheet {
    width: 100%;
    height: auto;
    max-height: min(92vh, 40rem);
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 721px) {
  .profile-panel {
    align-items: center;
    padding: 1.25rem;
  }

  .profile-panel__sheet {
    max-height: min(92dvh, 44rem);
    border-radius: 1.15rem;
  }
}

/* Desktop Feed Experience V1 — left editorial column on full-bleed scene */
@media (min-width: 960px) {
  .feed__veil {
    background:
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.86) 0%,
        rgba(0, 0, 0, 0.68) 22%,
        rgba(0, 0, 0, 0.34) 46%,
        rgba(0, 0, 0, 0.12) 68%,
        rgba(0, 0, 0, 0.18) 100%
      ),
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.42) 0%,
        rgba(0, 0, 0, 0.08) 30%,
        rgba(0, 0, 0, 0.12) 58%,
        rgba(0, 0, 0, 0.62) 100%
      );
  }

  .feed__chrome {
    max-width: 36rem;
    padding: clamp(1.5rem, 3.5vh, 2.35rem) clamp(1.5rem, 3vw, 2.5rem)
      clamp(1.6rem, 4vh, 2.6rem);
    gap: 0.35rem;
  }

  .feed__brand {
    font-size: 1.28rem;
    color: #fbf7f0;
  }

  .feed__visitor {
    font-size: 0.8rem;
    color: rgba(244, 239, 230, 0.68);
  }

  .feed__pager {
    font-size: 1rem;
    color: rgba(244, 239, 230, 0.84);
  }

  .feed__body {
    max-width: 32rem;
    padding: 2rem 0 1.6rem;
    justify-content: center;
  }

  .feed__community {
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
  }

  .feed__category {
    margin-bottom: 0.85rem;
  }

  .feed__headline {
    margin-bottom: 0.9rem;
    font-size: clamp(2.15rem, 3.2vw, 3rem);
    line-height: 1.12;
    max-width: 16ch;
    color: #fbf7f0;
  }

  .feed__area {
    margin-bottom: 1rem;
    font-size: 1.05rem;
  }

  .feed__summary {
    margin-bottom: 1.1rem;
    max-width: 36ch;
    font-size: 1.2rem;
    line-height: 1.68;
    color: #f4efe6;
  }

  .feed__meta {
    font-size: 1rem;
    color: rgba(244, 239, 230, 0.74);
  }

  .feed__actions {
    max-width: 20.5rem;
    gap: 0.8rem;
  }

  .feed__done-title {
    color: #f7f3ec;
  }

  .feed__done-note {
    color: rgba(244, 239, 230, 0.76);
  }
}

@media (min-width: 1280px) {
  .feed__chrome {
    max-width: 38rem;
  }

  .feed__headline {
    font-size: clamp(2.35rem, 3vw, 3.15rem);
  }

  .feed__summary {
    font-size: 1.24rem;
    line-height: 1.7;
  }
}

.feed__primary,
.feed__secondary {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.feed__primary {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: #e8772e;
  color: #111;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed__primary:hover {
  background: #f08a45;
}

.feed__done {
  width: 100%;
  padding: 0.85rem 0.2rem 0.35rem;
}

.feed__done-title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f7f3ec;
}

.feed__done-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.74);
}

.feed__confirm-count {
  margin: 0.15rem 0 0;
  width: 100%;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.62);
}

.feed__confirm-count[hidden] {
  display: none !important;
}

#feed-see-too-done[hidden] {
  display: none !important;
}

.feed__secondary {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.12);
  color: #f4efe6;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.feed__secondary:hover {
  background: rgba(244, 239, 230, 0.18);
}

/* ——— City-discovery editorial story (after five public signals) ——— */

.feed__panel--discovery {
  background: #0a0a0a;
}

.discovery__media .discovery__image {
  filter: brightness(0.42) saturate(0.78);
}

.discovery__veil {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.45) 32%,
    rgba(0, 0, 0, 0.55) 58%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

.discovery__chrome {
  max-width: 40rem;
}

.discovery__brand {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: 0.18em;
}

.discovery__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 28rem;
  padding: clamp(2rem, 6vh, 3.5rem) 0 clamp(1.5rem, 4vh, 2.25rem);
}

.discovery__headline {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #fbf7f0;
  max-width: 16ch;
}

.discovery__headline--second {
  margin: 0 0 1.15rem;
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  font-weight: 600;
  color: #f7f3ec;
  max-width: 18ch;
}

.discovery__support {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.6;
  font-weight: 400;
  color: rgba(244, 239, 230, 0.72);
}

.discovery__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(100%, 22rem);
  padding-bottom: 0.25rem;
}

.discovery__actions .feed__primary {
  border-radius: 0.2rem;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  background: #f4efe6;
  color: #14110e;
}

.discovery__actions .feed__primary:hover {
  background: #fffaf2;
}

.discovery__actions .feed__secondary {
  border-radius: 0.2rem;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  background: transparent;
  color: rgba(244, 239, 230, 0.82);
  border: 1px solid rgba(244, 239, 230, 0.28);
}

.discovery__actions .feed__secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(244, 239, 230, 0.42);
}

@media (min-width: 960px) {
  .feed__panel--discovery .discovery__veil {
    background: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.62) 42%,
      rgba(0, 0, 0, 0.28) 72%,
      rgba(0, 0, 0, 0.2) 100%
    );
  }

  .discovery__chrome {
    max-width: 36rem;
    padding-left: clamp(2rem, 6vw, 4.5rem);
  }

  .discovery__body {
    padding-top: 4rem;
  }
}

@media (max-width: 720px) {
  .feed__chrome {
    max-width: none;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .feed__headline {
    max-width: none;
  }

  .feed__actions {
    max-width: none;
  }
}

/* ——— Signal Detail V1: cinematic editorial continuation ——— */

.signal-detail[hidden] {
  display: none !important;
}

.signal-detail {
  position: fixed;
  inset: 0;
  z-index: 40;
  color: #f4efe6;
  overflow: hidden;
}

.signal-detail__media {
  position: absolute;
  inset: 0;
}

.signal-detail__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.signal-detail__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.42) 22%,
    rgba(0, 0, 0, 0.55) 48%,
    rgba(0, 0, 0, 0.86) 78%,
    rgba(0, 0, 0, 0.94) 100%
  );
}

.signal-detail__chrome {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(1.1rem, 3vh, 1.75rem) clamp(1.25rem, 4vw, 3.5rem)
    clamp(1.15rem, 3vh, 1.85rem);
  max-width: 44rem;
}

@media (min-width: 1100px) {
  .signal-detail__chrome {
    margin-left: clamp(2rem, 8vw, 7rem);
  }
}

.signal-detail__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.signal-detail__top-left,
.signal-detail__top-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.signal-detail__top-right {
  align-items: flex-end;
  text-align: right;
}

.signal-detail__close {
  align-self: flex-start;
  background: transparent;
  color: rgba(244, 239, 230, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
}

.signal-detail__close:hover {
  color: #f7f3ec;
}

.signal-detail__close:focus-visible,
#detail-see-too:focus-visible {
  outline: 2px solid #e8772e;
  outline-offset: 3px;
}

.signal-detail__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f7f3ec;
}

.signal-detail__status-user {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.68);
}

.signal-detail__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.35rem 0 1.1rem;
  max-width: 34rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 239, 230, 0.28) transparent;
}

.signal-detail__community {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.88);
}

.signal-detail__category {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c419;
}

.signal-detail__headline {
  margin: 0 0 0.95rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.65rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: #faf6ef;
  max-width: 18ch;
}

.signal-detail__meta {
  margin: 0 0 0.95rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.74);
}

.signal-detail__civic {
  margin: 0 0 1.35rem;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.45;
  color: rgba(247, 243, 236, 0.94);
}

.signal-detail__lead {
  margin: 0 0 1.65rem;
  max-width: 40ch;
  font-size: clamp(1.24rem, 1.78vw, 1.4rem);
  line-height: 1.68;
  color: #f4efe6;
}

.signal-detail__section {
  margin: 0 0 1.55rem;
  max-width: 40ch;
}

.signal-detail__label {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
}

.signal-detail__text {
  margin: 0;
  font-size: clamp(1.21rem, 1.67vw, 1.36rem);
  line-height: 1.68;
  color: #f4efe6;
}

@media (min-width: 1100px) {
  .signal-detail__lead {
    font-size: 1.45rem;
    line-height: 1.72;
    margin-bottom: 1.85rem;
  }

  .signal-detail__text {
    font-size: 1.38rem;
    line-height: 1.72;
  }

  .signal-detail__section {
    margin-bottom: 1.75rem;
  }

  .signal-detail__civic {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .signal-detail__meta {
    font-size: 1.02rem;
  }

  .signal-detail__headline {
    color: #fbf7f0;
  }
}

.signal-detail__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 22rem;
  padding-top: 0.35rem;
}

.signal-detail__actions .feed__primary,
.signal-detail__actions .feed__done,
.signal-detail__actions .feed__secondary {
  width: 100%;
}

/* Civic discussion session on a signal — solution-oriented, not chat. */
.signal-detail__session {
  animation: town-session-in 0.55s ease both;
}

.signal-detail__session-empty {
  margin: 0.85rem 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.72);
}

.signal-detail__session-empty[hidden] {
  display: none !important;
}

.signal-detail__session-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.signal-detail__session-list:empty {
  display: none;
}

.signal-detail__session-item {
  margin: 0;
  padding: 0 0 0 0.85rem;
  border-left: 2px solid rgba(232, 119, 46, 0.55);
  animation: town-session-item-in 0.45s ease both;
}

.signal-detail__session-meta {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
}

.signal-detail__session-text {
  margin: 0;
  font-size: clamp(1.12rem, 1.5vw, 1.26rem);
  line-height: 1.6;
  color: #f4efe6;
}

.signal-detail__session-item .signal-detail__demo-testimony-media {
  margin-top: 0.7rem;
}

.signal-detail__session-compose {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  margin-top: 0.35rem;
  animation: town-session-in 0.4s ease both;
}

.signal-detail__session-compose[hidden] {
  display: none !important;
}

.signal-detail__session-compose-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: #faf6ef;
}

.signal-detail__session-compose-guide {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(244, 239, 230, 0.78);
}

.signal-detail__session-intent {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.signal-detail__session-intent-legend {
  margin: 0 0 0.15rem;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
}

.signal-detail__session-intent-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: rgba(244, 239, 230, 0.9);
  cursor: pointer;
}

.signal-detail__session-intent-option input {
  accent-color: #e8772e;
}

.signal-detail__session-intent-badge {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 119, 46, 0.95);
}

.signal-detail__session-input {
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  border: 1px solid rgba(244, 239, 230, 0.28);
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.28);
  color: #f7f3ec;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  padding: 0.75rem 0.85rem;
}

.signal-detail__session-input:focus {
  outline: 2px solid #e8772e;
  outline-offset: 2px;
  border-color: rgba(232, 119, 46, 0.7);
}

.signal-detail__session-compose-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.signal-detail__session-demo-note {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.58);
}

.signal-detail__session-demo-note[hidden] {
  display: none !important;
}

@keyframes town-session-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes town-session-item-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signal-detail__session,
  .signal-detail__session-item,
  .signal-detail__session-compose {
    animation: none;
  }
}

/* Compose-time media preview; published media is loaded from the authenticated API proxy. */
.signal-detail__demo-testimony {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.signal-detail__demo-testimony[hidden] {
  display: none !important;
}

.signal-detail__demo-testimony-note {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.62);
}

.signal-detail__demo-testimony-media {
  width: 100%;
  max-height: 14rem;
  object-fit: cover;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
}

.signal-detail__demo-testimony-media[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .signal-detail__chrome {
    max-width: none;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .signal-detail__headline {
    max-width: none;
  }

  .signal-detail__actions {
    max-width: none;
  }
}

/* ——— Screen 06: membership invitation ——— */

.invite[hidden] {
  display: none !important;
}

.invite {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.invite__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.invite__panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  padding: 1.7rem 1.6rem 1.45rem;
  border-radius: 1.15rem;
  background: #141414;
  color: #f5f5f5;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.invite__title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: #f5f5f5;
}

.invite__body {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.86);
}

.invite__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

body.page-membership,
body.page-ended {
  background:
    radial-gradient(120% 80% at 12% 0%, #fffdf9 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #f3ebe0 0%, transparent 50%),
    linear-gradient(165deg, var(--ivory) 0%, var(--ivory-deep) 100%);
}

.membership,
.ended {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.membership__frame,
.ended__frame {
  width: 100%;
  max-width: 32rem;
}

.membership__brand,
.ended__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.membership__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.membership__title,
.ended__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.membership__community {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--body);
}

.membership__lead,
.ended__lead {
  margin: 0 0 0.85rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.membership__price {
  margin: 1.1rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--charcoal);
}

.membership__note {
  margin: 0 0 0.45rem;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.membership__subtitle {
  margin: 1.45rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.membership__list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  max-width: 40ch;
  color: var(--body);
}

.membership__list li {
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.membership__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.membership__actions .btn,
.ended__frame .btn {
  width: var(--btn-width);
  max-width: 100%;
}

.ended__lead {
  margin-bottom: 1.75rem;
}

/* ——— Screen 07: Account Setup Introduction ——— */

.page-account {
  overflow: auto;
}

.account {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.account__frame {
  width: 100%;
  max-width: 32rem;
}

.account__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.account__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.account__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.account__community {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--body);
}

.account__lead {
  margin: 0 0 0.85rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.account__subtitle {
  margin: 1.45rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.account__list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  max-width: 40ch;
  color: var(--body);
}

.account__list li {
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.account__note {
  margin: 0 0 0.55rem;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.account__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.account__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-account[hidden] {
  display: none !important;
}

/* ——— Screen 08: Email Entry Mock ——— */

.page-email {
  overflow: auto;
}

.email {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.email__frame {
  width: 100%;
  max-width: 32rem;
}

.email__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.email__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.email__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.email__lead {
  margin: 0 0 0.75rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.email__note {
  margin: 0 0 0.85rem;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.email__field-label {
  display: block;
  margin: 1.35rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.email__input {
  display: block;
  width: 100%;
  max-width: 22rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(30, 20, 15, 0.18);
  border-radius: 0.55rem;
  background: rgba(255, 253, 249, 0.92);
  color: var(--charcoal);
  font-size: 1.02rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.email__input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(92, 74, 58, 0.16);
}

.email__error {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #8a4a32;
}

.email__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.email__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-email[hidden] {
  display: none !important;
}

/* ——— Screen 09: Verification Code Mock ——— */

.page-code {
  overflow: auto;
}

.code {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.code__frame {
  width: 100%;
  max-width: 32rem;
}

.code__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.code__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.code__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.code__lead {
  margin: 0 0 0.55rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.code__email {
  margin: 0 0 1.2rem;
  max-width: 40ch;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  word-break: break-word;
}

.code__field-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.code__input {
  display: block;
  width: 100%;
  max-width: 12rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(30, 20, 15, 0.18);
  border-radius: 0.55rem;
  background: rgba(255, 253, 249, 0.92);
  color: var(--charcoal);
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  line-height: 1.4;
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.code__input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(92, 74, 58, 0.16);
}

.code__note {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.code__error {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #8a4a32;
}

.code__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.code__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-code[hidden] {
  display: none !important;
}

/* ——— Screen 10: Passkey Introduction Mock ——— */

.page-passkey {
  overflow: auto;
}

.passkey {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.passkey__frame {
  width: 100%;
  max-width: 32rem;
}

.passkey__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.passkey__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.passkey__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.passkey__lead {
  margin: 0 0 0.85rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.passkey__subtitle {
  margin: 1.35rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.passkey__list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  max-width: 40ch;
  color: var(--body);
}

.passkey__list li {
  margin-bottom: 0.4rem;
  line-height: 1.45;
}

.passkey__note {
  margin: 1rem 0 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.passkey__error {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #8a4a32;
}

.passkey__status {
  margin: 0 0 0.45rem;
  max-width: 40ch;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--charcoal);
}

.passkey__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.passkey__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-passkey[hidden],
#passkey-intro[hidden],
#passkey-success[hidden] {
  display: none !important;
}

.passkey-notice[hidden] {
  display: none !important;
}

.passkey-notice {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.passkey-notice__dim {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 15, 0.42);
}

.passkey-notice__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 1.75rem 1.6rem;
  border-radius: 1rem;
  background: rgba(253, 251, 247, 0.98);
  box-shadow: 0 18px 48px rgba(30, 20, 15, 0.18);
}

.passkey-notice__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
}

.passkey-notice__body {
  margin: 0 0 1.35rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.passkey-notice__panel .btn {
  width: 100%;
}

/* ——— Screen 11: Account Ready Mock ——— */

.page-ready {
  overflow: auto;
}

.ready {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.ready__frame {
  width: 100%;
  max-width: 32rem;
}

.ready__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.ready__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ready__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.ready__community {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--body);
}

.ready__email {
  margin: 0 0 1.1rem;
  max-width: 40ch;
  font-size: 0.98rem;
  color: var(--muted);
  word-break: break-word;
}

.ready__status {
  margin: 0 0 0.4rem;
  max-width: 40ch;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--charcoal);
}

.ready__lead {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.ready__inactive {
  margin: 1.2rem 0 0;
  max-width: 40ch;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--charcoal);
}

.ready__membership {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--charcoal);
}

.ready__note {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.ready__error {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #8a4a32;
}

.ready__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.ready__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-ready[hidden] {
  display: none !important;
}

/* ——— Pre-Checkout community commitment ——— */

.commitment__fieldset {
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.commitment__fieldset[disabled] {
  opacity: 0.45;
}

.commitment__legend {
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.commitment__options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.commitment__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--body);
  cursor: pointer;
}

.commitment__option input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--charcoal);
}

.commitment__review {
  margin-top: 1.35rem;
}

.commitment__accept {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.25rem 0 0;
  max-width: 42ch;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--body);
  cursor: pointer;
}

.commitment__accept input {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  accent-color: var(--charcoal);
}

#view-commitment[hidden] {
  display: none !important;
}

/* ——— Screen 12: Membership Payment Boundary Mock ——— */

.page-payment,
.page-commitment {
  overflow: auto;
}

.payment {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.payment__frame {
  width: 100%;
  max-width: 32rem;
}

.payment__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.payment__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.payment__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.payment__community {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--body);
}

.payment__price {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--charcoal);
}

.payment__lead {
  margin: 0.95rem 0 0;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.payment__note {
  margin: 0.45rem 0 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.payment__status {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--charcoal);
}

.payment__error {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #8a4a32;
}

.payment__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.payment__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-payment[hidden],
#payment-intro[hidden],
#payment-success[hidden],
#payment-confirming[hidden] {
  display: none !important;
}

.payment-notice[hidden] {
  display: none !important;
}

.payment-notice {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.payment-notice__dim {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 15, 0.42);
}

.payment-notice__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 1.75rem 1.6rem;
  border-radius: 1rem;
  background: rgba(253, 251, 247, 0.98);
  box-shadow: 0 18px 48px rgba(30, 20, 15, 0.18);
}

.payment-notice__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
}

.payment-notice__body {
  margin: 0 0 1.35rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.payment-notice__panel .btn {
  width: 100%;
}

/* ——— Screen 13: Membership Active confirmation ——— */

.page-active {
  overflow: auto;
}

.active {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem;
}

.active__frame {
  width: 100%;
  max-width: 32rem;
}

.active__brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--charcoal);
}

.active__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.active__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

.active__community {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--body);
}

.active__status {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--charcoal);
}

.active__lead {
  margin: 0 0 0.85rem;
  max-width: 40ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--body);
}

.active__note {
  margin: 0.85rem 0 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.active__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.active__actions .btn {
  width: var(--btn-width);
  max-width: 100%;
}

#view-active[hidden] {
  display: none !important;
}


/* Member civic signal create */
.signal-create {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.signal-create[hidden] {
  display: none !important;
}

.signal-create__dim {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.55);
}

.signal-create__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  max-height: min(92vh, 52rem);
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.25rem 1.75rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(232, 214, 180, 0.35), transparent 55%),
    linear-gradient(180deg, #f7f1e6 0%, #efe6d6 100%);
  color: #2a241c;
  box-shadow: 0 -12px 40px rgba(20, 16, 10, 0.25);
}

.signal-create__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.signal-create__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.2;
}

.signal-create__lead {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #4a4236;
}

.signal-create__form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.signal-create__label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a5144;
}

.signal-create__input,
.signal-create__textarea,
.signal-create__select {
  width: 100%;
  border: 1px solid rgba(60, 48, 32, 0.22);
  border-radius: 0.55rem;
  background: rgba(255, 252, 246, 0.9);
  color: #241f18;
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.signal-create__textarea {
  resize: vertical;
  min-height: 7rem;
}

.signal-create__file {
  font: inherit;
}

.signal-create__preview {
  margin: 0.35rem 0 0.2rem;
}

.signal-create__preview img {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
  border-radius: 0.55rem;
}

.signal-create__accept {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.7rem 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.signal-create__accept input {
  margin-top: 0.2rem;
}

.signal-create__error {
  margin: 0.2rem 0 0;
  color: #8a2f24;
  font-size: 0.92rem;
}

.signal-create__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.signal-create__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  font: inherit;
  color: #5a5144;
  cursor: pointer;
}

@media (min-width: 720px) {
  .signal-create {
    align-items: center;
  }

  .signal-create__sheet {
    border-radius: 1rem;
    max-height: min(88vh, 48rem);
  }
}

/* Owner moderation — existing hide/unhide + ban/unban tools */
.owner-moderation {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.owner-moderation[hidden] {
  display: none !important;
}

.owner-moderation__dim {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.55);
}

.owner-moderation__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  max-height: min(92vh, 54rem);
  overflow: auto;
  margin: 0;
  padding: 1.25rem 1.25rem 1.75rem;
  border-radius: 1.25rem 1.25rem 0 0;
  background:
    radial-gradient(120% 80% at 12% 0%, rgba(210, 224, 214, 0.4), transparent 55%),
    linear-gradient(180deg, #f3f6f2 0%, #e7ebe4 100%);
  color: #1f2922;
  box-shadow: 0 -12px 40px rgba(16, 22, 18, 0.25);
}

.owner-moderation__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.owner-moderation__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
}

.owner-moderation__lead {
  margin: 0 0 1rem;
  font-size: 0.96rem;
  line-height: 1.5;
  color: #3d4a41;
}

.owner-moderation__label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4a5a50;
}

.owner-moderation__select {
  width: 100%;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(40, 56, 46, 0.22);
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  color: inherit;
}

.owner-moderation__status,
.owner-moderation__error {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.owner-moderation__status {
  color: #24553a;
}

.owner-moderation__error {
  color: #8a2f2f;
}

.owner-moderation__section {
  margin-top: 1rem;
}

.owner-moderation__section-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.owner-moderation__empty {
  margin: 0 0 0.75rem;
  color: #526257;
  font-size: 0.92rem;
}

.owner-moderation__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.owner-moderation__item {
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(40, 56, 46, 0.14);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.55);
}

.owner-moderation__item-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.owner-moderation__item-meta {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  color: #526257;
  line-height: 1.4;
}

.owner-moderation__item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.owner-moderation__item-actions .btn {
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.86rem;
}

.owner-moderation__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  font: inherit;
  color: #526257;
  cursor: pointer;
}

@media (min-width: 720px) {
  .owner-moderation {
    align-items: center;
  }

  .owner-moderation__sheet {
    border-radius: 1rem;
    max-height: min(88vh, 50rem);
  }
}
