/* Member app, admin console, demo hub. Loaded after app.css; unlayered so it wins over layered base styles. */

:root {
  --app-bg: #f6f1ec;
  --app-surface: #ffffff;
  --app-line: #ece4dc;
  --app-ink: #1c1320;
  --app-soft: #6b6070;
  --app-wine: #9a0f21;
  --app-wine-deep: #6e0a17;
  --app-gold: #c9a227;
  --app-gold-soft: #f6ecc9;
  --app-navy: #0033a0;
  --app-ok: #1f7a4d;
  --app-err: #b3261e;
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --app-radius: var(--r-md);
  --app-radius-sm: var(--r-sm);
  --app-shadow: 0 1px 2px rgb(28 19 32 / 6%), 0 8px 24px rgb(28 19 32 / 6%);
  --app-shadow-lg: 0 30px 80px rgb(28 19 32 / 28%), 0 10px 30px rgb(28 19 32 / 18%);
  --tab-h: 64px;
  --top-h: 56px;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

/* ---------- Base for app and admin (declared first so component rules win) ---------- */

:is(.app-body, .desk-body, .hub-body) :is(h1, h2, h3) {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

:is(.app-body, .desk-body) h1 { font-size: 1.6rem; }
:is(.app-body, .desk-body) h2 { font-size: 1.2rem; }
:is(.app-body, .desk-body) h3 { font-size: 1rem; }

:is(.app-body, .desk-body, .hub-body) .btn {
  white-space: nowrap;
  line-height: 1.15;
}

:is(.app-body, .desk-body) .btn .icon {
  margin-inline: -0.1rem;
}

:is(.app-body, .desk-body) {
  accent-color: var(--app-wine);
}

.app-body :is(.auth-body, .form, .composer, .feed, .event-list, .lib-grid, .comments, .pay-buttons, .poll, .composer-poll, .mentor-card) {
  grid-template-columns: minmax(0, 1fr);
}

:is(.app-body, .desk-body) fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

:is(.app-body, .desk-body) input[type="file"] {
  max-width: 100%;
  font-size: 0.82rem;
  color: var(--app-soft);
}

:is(.app-body, .desk-body) input[type="file"]::file-selector-button {
  margin-right: 0.6rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--app-line);
  border-radius: var(--r-xs);
  background: var(--app-surface);
  color: var(--app-ink);
  font: 600 0.8rem var(--display);
  cursor: pointer;
}

:where(.app-body, .desk-body) input:is([type="radio"], [type="checkbox"]) {
  width: 18px;
  height: 18px;
  flex: none;
}

.desk-body .btn {
  border-radius: var(--r-sm);
}

.desk-body .btn-sm {
  border-radius: var(--r-xs);
}

.app-body .timeline,
.app-body .timeline li {
  border: 0;
  padding: 0;
}

.app-body .timeline li::before {
  content: none;
}

.app-body .steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.desk-body .panel {
  box-shadow: none;
  align-self: stretch;
}

.desk-body .panel h2 {
  margin-bottom: 0;
}

/* ---------- Demo switcher ---------- */

.demo-switch {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 90;
  font-family: var(--display);
}

.demo-switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem 0.6rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--app-ink);
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 25%);
}

.demo-switch-toggle strong {
  color: var(--app-gold);
}

.demo-switch-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgb(61 220 132 / 60%);
  animation: demo-pulse 2s infinite;
}

@keyframes demo-pulse {
  70% { box-shadow: 0 0 0 9px rgb(61 220 132 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(61 220 132 / 0%); }
}

.demo-switch-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 290px;
  padding: 0.75rem;
  border-radius: var(--r-md);
  background: #fff;
  color: var(--app-ink);
  box-shadow: var(--app-shadow-lg);
}

.demo-switch-head {
  margin: 0.2rem 0.5rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-soft);
}

.demo-switch-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.demo-switch-panel li a {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: inherit;
}

.demo-switch-panel li a:hover,
.demo-switch-panel li a:focus-visible {
  background: var(--app-bg);
}

.demo-switch-panel li a[aria-current] {
  background: var(--app-gold-soft);
}

.demo-switch-panel li .icon {
  color: var(--app-wine);
}

.demo-switch-panel strong {
  display: block;
  font-size: 0.9rem;
}

.demo-switch-panel small {
  display: block;
  font-family: var(--body);
  font-size: 0.78rem;
  color: var(--app-soft);
}

.demo-switch-hub {
  display: block;
  margin-top: 0.4rem;
  padding: 0.6rem;
  border-top: 1px solid var(--app-line);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--app-wine);
  text-decoration: none;
}

/* ---------- Toasts ---------- */

.app-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 95;
  translate: -50% 0;
  max-width: min(92vw, 460px);
  margin: 0;
  padding: 0.75rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--app-ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.9rem;
  box-shadow: var(--app-shadow-lg);
  animation: toast-in 320ms cubic-bezier(.2, .9, .3, 1.2), toast-out 400ms ease 4.6s forwards;
}

.app-toast-ok { border-left: 4px solid #3ddc84; }
.app-toast-err { border-left: 4px solid #ff6b5e; }

@keyframes toast-in { from { opacity: 0; translate: -50% -14px; } }
@keyframes toast-out { to { opacity: 0; translate: -50% -14px; visibility: hidden; } }

/* ---------- Demo hub ---------- */

.hub-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgb(201 162 39 / 28%), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgb(196 30 58 / 35%), transparent 60%),
    linear-gradient(160deg, #2a0a12, #1c1320 55%, #0a1c4a);
  color: #fff;
}

.hub {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1.25rem 5rem;
}

.hub-head {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.hub-head img {
  width: 110px;
  height: auto;
  margin-bottom: 1.5rem;
}

.hub-head h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hub-head h1 em {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--app-gold);
}

.hub-lede {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: rgb(255 255 255 / 78%);
}

.hub-surfaces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.hub-surface {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 14%);
  backdrop-filter: blur(8px);
  color: #fff;
  text-decoration: none;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.hub-surface:hover,
.hub-surface:focus-visible {
  transform: translateY(-4px);
  background: rgb(255 255 255 / 12%);
  border-color: var(--app-gold);
}

.hub-surface h2 {
  font-size: 1.4rem;
}

.hub-surface p {
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.98rem;
  flex: 1;
}

.hub-surface-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--app-gold), #e6c65a);
  color: var(--app-ink);
  flex: none;
}

.hub-surface-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--display);
  font-weight: 600;
  color: var(--app-gold);
}

.hub-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.hub-panel {
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
}

.hub-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--app-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hub-journeys,
.hub-personas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.hub-journeys a,
.hub-personas a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
  color: #fff;
  text-decoration: none;
}

.hub-journeys a:hover,
.hub-personas a:hover,
.hub-journeys a:focus-visible,
.hub-personas a:focus-visible {
  background: rgb(255 255 255 / 9%);
}

.hub-journeys a > span:nth-child(2),
.hub-personas a > span:last-child {
  flex: 1;
}

.hub-journeys strong,
.hub-personas strong {
  display: block;
  font-family: var(--display);
}

.hub-journeys small,
.hub-personas small {
  display: block;
  color: rgb(255 255 255 / 65%);
  font-size: 0.86rem;
}

.hub-step {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--app-gold);
  color: var(--app-gold);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}

.hub-personas .hub-surface-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
}

.hub-foot {
  margin-top: 2rem;
  text-align: center;
  color: rgb(255 255 255 / 50%);
  font-size: 0.85rem;
}

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

/* ---------- Member app: stage & device ---------- */

.app-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 0% 0%, rgb(201 162 39 / 22%), transparent 60%),
    radial-gradient(800px 600px at 100% 100%, rgb(154 15 33 / 22%), transparent 60%),
    #f3ede7;
  color: var(--app-ink);
  font-size: 1rem;
}

.app-stage {
  display: grid;
  grid-template-columns: minmax(260px, 380px) auto;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  min-height: 100vh;
  padding: 24px;
}

.app-aside {
  max-width: 380px;
}

.app-aside-brand img {
  width: 110px;
  height: auto;
  margin-bottom: 1.6rem;
}

.app-aside-title {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0.4rem 0 1rem;
}

.app-aside-title em {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--app-wine);
}

.app-aside-lede {
  color: var(--app-soft);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 1.5rem 0 1rem;
  padding: 0;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  background: var(--app-ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
}

.store-badge small {
  display: block;
  font-weight: 400;
  font-size: 0.66rem;
  opacity: 0.75;
}

.app-aside-note {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--app-soft);
}

.app-aside-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.6rem;
  font-family: var(--display);
  font-weight: 600;
}

.app-aside-links a {
  color: var(--app-wine);
  text-decoration: none;
  border-bottom: 2px solid var(--app-gold);
}

.device {
  position: relative;
  width: 400px;
  height: min(860px, calc(100vh - 48px));
  padding: 12px;
  border-radius: 56px;
  background: linear-gradient(145deg, #2b2330, #0f0b12);
  box-shadow: var(--app-shadow-lg), inset 0 0 0 2px rgb(255 255 255 / 8%);
}

.device::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 5;
  width: 112px;
  height: 32px;
  translate: -50% 0;
  border-radius: 20px;
  background: #000;
}

.device-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 44px;
  background: var(--app-bg);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 8px 34px 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  flex: none;
  background: var(--app-surface);
}

.app-is-bare .status-bar {
  background: transparent;
  color: #fff;
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
}

.status-icons {
  display: inline-flex;
  gap: 4px;
  align-items: flex-end;
}

.status-icons i {
  display: block;
  width: 4px;
  border-radius: 1px;
  background: currentColor;
}

.status-icons i:nth-child(1) { height: 6px; }
.status-icons i:nth-child(2) { height: 9px; }
.status-icons i:nth-child(3) { width: 22px; height: 10px; border-radius: 3px; }

@media (max-width: 900px), (max-height: 640px) {
  .app-stage {
    display: block;
    padding: 0;
    min-height: 0;
  }

  .app-aside,
  .status-bar,
  .device::before {
    display: none;
  }

  .device {
    width: 100%;
    height: 100dvh;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .device-screen {
    border-radius: 0;
  }

  .demo-switch {
    left: auto;
    right: 12px;
    bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));
  }

  .demo-switch-panel {
    left: auto;
    right: 0;
  }

  .app-is-bare .demo-switch {
    bottom: 12px;
  }
}

/* ---------- Member app: chrome ---------- */

.app-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: var(--top-h);
  padding: 0 0.75rem;
  padding-top: env(safe-area-inset-top);
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
  flex: none;
  z-index: 2;
}

.app-top-brand img {
  width: 46px;
  height: auto;
}

.app-top-title {
  flex: 1;
  margin: 0 0.25rem;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--app-ink);
  text-decoration: none;
  background: none;
  border: 0;
}

.app-icon-btn:hover,
.app-icon-btn:focus-visible {
  background: var(--app-bg);
}

.app-avatar-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
}

.app-avatar-btn .face {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--app-gold);
}

.app-dot {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--app-wine);
  color: #fff;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
}

.app-main::-webkit-scrollbar {
  display: none;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--app-line);
  flex: none;
}

.app-tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #948a98;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 600;
}

.app-tabs a[aria-current] {
  color: var(--app-wine);
}

.app-tab-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 30px;
  border-radius: var(--r-pill);
  transition: background 180ms ease;
}

.app-tabs a[aria-current] .app-tab-icon {
  background: color-mix(in srgb, var(--app-wine) 11%, transparent);
}

.app-tab-icon .app-dot {
  top: -4px;
  right: 4px;
}

/* ---------- Member app: building blocks ---------- */

.app-body .face {
  background: linear-gradient(135deg, #f3dfa0, #e8c766);
  color: var(--app-wine-deep);
}

.screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1rem 2rem;
}

.screen-intro h2 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.screen-intro p {
  margin-top: 0.3rem;
  color: var(--app-soft);
  font-size: 0.95rem;
}

.card {
  padding: 1rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--app-line);
}

.card > h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.block-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.4rem 0.1rem -0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-soft);
}

.block-title a {
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--app-wine);
  text-decoration: none;
  font-weight: 600;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--app-wine) 0%, #c41e3a 60%, #d9534f 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgb(154 15 33 / 30%);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(201 162 39 / 55%), transparent 70%);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card .kicker {
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffe08a;
}

.hero-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-cream {
  padding-right: 5rem;
  background: linear-gradient(135deg, #fffaf0 0%, var(--app-gold-soft) 100%);
  border: 1px solid rgb(201 162 39 / 28%);
  color: var(--app-ink);
  box-shadow: var(--app-shadow);
}

.hero-cream::after {
  background: radial-gradient(circle, rgb(201 162 39 / 35%), transparent 70%);
}

.hero-cream .kicker {
  color: var(--app-wine);
}

.hero-cream p {
  color: var(--app-soft);
  opacity: 1;
}

.hero-mark {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  translate: 0 -50%;
  border-radius: var(--r-md);
  background: var(--app-surface);
  color: var(--app-wine);
  box-shadow: 0 6px 16px rgb(140 109 10 / 18%);
}

.hero-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.65rem;
}

.hero-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

.hero-card .avatars .face {
  box-shadow: 0 0 0 2px var(--app-wine);
}

.hero-card .avatars small {
  color: #fff;
  opacity: 0.88;
}

.btn-going {
  background: rgb(255 255 255 / 16%);
  border-color: rgb(255 255 255 / 45%);
  color: #fff;
}

.btn-going:hover {
  background: rgb(255 255 255 / 24%);
  color: #fff;
}

.hero-card h3 a {
  color: inherit;
  text-decoration: none;
}

.hero-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.date-tile {
  display: grid;
  place-items: center;
  width: 54px;
  height: 58px;
  border-radius: var(--r-sm);
  background: var(--app-gold-soft);
  color: var(--app-wine-deep);
  font-family: var(--display);
  line-height: 1;
  flex: none;
}

.date-tile strong {
  font-size: 1.35rem;
}

.date-tile span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-card .date-tile {
  background: rgb(255 255 255 / 18%);
  color: #fff;
}

.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.2rem;
  border-radius: var(--r-md);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  color: var(--app-ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.quick .icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--app-wine) 9%, transparent);
  color: var(--app-wine);
}

.quick li:nth-child(2) .icon { background: rgb(201 162 39 / 18%); color: #8c6d0a; }
.quick li:nth-child(3) .icon { background: rgb(0 51 160 / 10%); color: var(--app-navy); }
.quick li:nth-child(4) .icon { background: rgb(31 122 77 / 12%); color: var(--app-ok); }

.chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0.1rem 1rem;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-pill);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  color: var(--app-ink);
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.chip[aria-current],
.chip.is-on {
  background: var(--app-ink);
  border-color: var(--app-ink);
  color: #fff;
}

.composer-bar {
  display: grid;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.composer-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.composer-bar-row > .face {
  width: 38px;
  height: 38px;
  font-size: 0.78rem;
}

.composer-bar button.fake-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 0.95rem;
  border-radius: var(--r-sm);
  background: var(--app-bg);
  color: var(--app-soft);
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-bar button.fake-input:hover {
  background: var(--app-line);
}

.composer-actions {
  display: flex;
  gap: 0.4rem;
  flex: none;
}

.composer-bar .kinds {
  display: flex;
  gap: 0;
  flex: none;
  margin-right: -0.2rem;
}

.composer-bar .kinds button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  color: var(--app-soft);
}

.composer-bar .kinds button:hover {
  background: var(--app-bg);
  color: var(--app-wine);
}

.composer {
  display: grid;
  gap: 0.7rem;
}

.composer[hidden] { display: none; }

.composer textarea {
  width: 100%;
  min-height: 96px;
  padding: 0.8rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius-sm);
  background: var(--app-bg);
  resize: vertical;
}

.composer .seg {
  justify-self: start;
}

.composer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.composer-row select {
  flex: 1 1 140px;
  min-width: 0;
  width: auto;
  min-height: 40px;
  padding: 0.35rem 2.5rem 0.35rem 0.8rem;
  font-size: 0.88rem;
}

.composer-media {
  display: grid;
  place-items: center;
  gap: 0.3rem;
  padding: 1rem;
  border: 1.5px dashed var(--app-line);
  border-radius: var(--app-radius-sm);
  color: var(--app-soft);
  font-size: 0.85rem;
  text-align: center;
}

.composer-media[hidden],
.composer-poll[hidden] {
  display: none;
}

.composer-poll {
  display: grid;
  gap: 0.5rem;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-sm);
  background: var(--app-bg);
}

.seg button,
.seg a,
.seg label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-xs);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-soft);
  text-decoration: none;
  cursor: pointer;
}

.seg-fill {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  justify-self: stretch;
}

.seg-fill > * {
  justify-content: center;
}

.seg [aria-pressed="true"],
.seg [aria-current],
.seg input:checked + span {
  background: var(--app-surface);
  color: var(--app-ink);
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.feed {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post {
  padding: 0.95rem 1rem 0.5rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.post-head .face {
  width: 42px;
  height: 42px;
  font-size: 0.85rem;
}

.post-head strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.2;
}

.post-head small {
  display: block;
  color: var(--app-soft);
  font-size: 0.78rem;
  line-height: 1.3;
}

.post-head .grow {
  flex: 1;
  min-width: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-pill);
  background: var(--app-gold-soft);
  color: #7a5d00;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag-wine { background: color-mix(in srgb, var(--app-wine) 10%, transparent); color: var(--app-wine); }
.tag-navy { background: rgb(0 51 160 / 9%); color: var(--app-navy); }
.tag-ok { background: rgb(31 122 77 / 11%); color: var(--app-ok); }
.tag-mute { background: var(--app-bg); color: var(--app-soft); }

.post-body {
  margin: 0.7rem 0 0;
  font-size: 0.97rem;
  line-height: 1.55;
}

.post-body a {
  color: inherit;
  text-decoration: none;
}

.post-media {
  display: block;
  width: calc(100% + 2rem);
  max-width: none;
  height: 220px;
  margin: 0.75rem -1rem 0;
  object-fit: cover;
}

.poll {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.poll-opt {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: var(--r-sm);
  background: var(--app-surface);
  font-size: 0.9rem;
  text-align: left;
}

.poll-opt::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  background: color-mix(in srgb, var(--app-gold) 24%, transparent);
  transition: width 600ms ease;
}

.poll-opt > * {
  position: relative;
}

.poll-opt:not(:disabled):hover {
  border-color: var(--app-wine);
}

.poll-opt strong {
  font-family: var(--display);
}

.poll-meta {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--app-soft);
}

.post-actions {
  display: flex;
  gap: 0.25rem;
  margin: 0.6rem -0.4rem 0;
  padding-top: 0.35rem;
  border-top: 1px solid var(--app-line);
}

.post-actions a,
.post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-sm);
  color: var(--app-soft);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.post-actions a:hover,
.post-actions button:hover {
  background: var(--app-bg);
  color: var(--app-wine);
}

.post-actions .is-on {
  color: var(--app-wine);
}

.post-actions .is-on .icon {
  fill: currentColor;
}

.post-actions .push {
  margin-left: auto;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  overflow: hidden;
}

.list-flush {
  margin: 0 -1rem -1rem;
  border-top: 1px solid var(--app-line);
  border-radius: 0 0 var(--app-radius) var(--app-radius);
  box-shadow: none;
}

.list > li + li {
  border-top: 1px solid var(--app-line);
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  color: inherit;
  text-decoration: none;
}

a.row:hover,
a.row:focus-visible {
  background: #fcfaf7;
}

.row .grow {
  flex: 1;
  min-width: 0;
}

.row strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.25;
}

.row small {
  display: block;
  color: var(--app-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.row .clip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row > .icon:last-child {
  color: #b9afbb;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--app-wine) 9%, transparent);
  color: var(--app-wine);
  flex: none;
}

.row-icon.gold { background: rgb(201 162 39 / 18%); color: #8c6d0a; }
.row-icon.navy { background: rgb(0 51 160 / 10%); color: var(--app-navy); }
.row-icon.ok { background: rgb(31 122 77 / 12%); color: var(--app-ok); }
.row-icon.mute { background: var(--app-bg); color: var(--app-soft); }

.row .face {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.pip {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--app-wine);
  color: #fff;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0 0.9rem;
  border: 1px solid var(--app-line);
  border-radius: var(--r-sm);
  background: var(--app-surface);
  color: var(--app-soft);
  cursor: text;
}

.search-field-flat {
  background: var(--app-bg);
}

.search-field input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--app-ink);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 400;
}

.search-field input::placeholder {
  color: #9a8f9c;
}

.form .interest-chips label,
.form .amounts label {
  display: block;
  margin: 0;
}

.search-field input:focus {
  outline: none;
  box-shadow: none;
}

.search-field:focus-within {
  border-color: var(--app-wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 16%, transparent);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.profile-top {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.4rem 1rem 1.1rem;
  text-align: center;
  border-radius: var(--r-lg);
  background:
    radial-gradient(140px 90px at 50% 0%, rgb(201 162 39 / 35%), transparent),
    var(--app-surface);
  box-shadow: var(--app-shadow);
}

.profile-top .face {
  width: 88px;
  height: 88px;
  font-size: 1.6rem;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--app-gold);
  margin-bottom: 0.4rem;
}

.profile-top h2 {
  font-size: 1.35rem;
}

.profile-top p {
  margin: 0;
  color: var(--app-soft);
  font-size: 0.92rem;
}

.profile-top .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.actions > * {
  flex: 1;
}

.actions form {
  display: flex;
}

.actions .btn,
.btn-block {
  width: 100%;
}

.app-body .btn {
  min-height: 44px;
  font-size: 0.9rem;
}

.desk-body .btn {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

.desk-body .btn-sm {
  padding: 0.3rem 0.7rem;
}

.btn-sm {
  min-height: 34px !important;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem !important;
}

.btn-soft {
  background: var(--app-surface);
  border-color: var(--app-line);
  color: var(--app-ink);
}

.btn-soft:hover {
  background: var(--app-bg);
  border-color: color-mix(in srgb, var(--app-ink) 25%, transparent);
  color: var(--app-ink);
}

.btn-dark {
  background: var(--app-ink);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.stats div + div {
  border-left: 1px solid var(--app-line);
}

.stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
}

.stats span {
  font-size: 0.75rem;
  color: var(--app-soft);
}

.kv {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.kv div {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.15rem 0.6rem;
  align-items: start;
}

.kv .icon {
  grid-row: span 2;
  color: var(--app-wine);
  margin-top: 2px;
}

.kv dt {
  font-size: 0.75rem;
  color: var(--app-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.kv dd {
  margin: 0;
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 0.85rem;
}

.form p {
  margin: 0;
}

.form label:not([class]),
.field-label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-soft);
}

:where(.app-body) :where(input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--app-line);
  border-radius: var(--r-sm);
  background: var(--app-surface);
  font-size: 0.95rem;
}

:where(.app-body, .desk-body) select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6070' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  text-overflow: ellipsis;
  cursor: pointer;
}

:where(.app-body) textarea {
  min-height: 96px;
}

:where(.app-body) :where(input, select, textarea):focus {
  outline: none;
  border-color: var(--app-wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 16%, transparent);
}

.form-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.field-error {
  display: block;
  margin-top: 0.25rem;
  color: var(--app-err);
  font-size: 0.8rem;
}

.form-error {
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  background: rgb(179 38 30 / 9%);
  color: var(--app-err);
  font-size: 0.88rem;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.toggle span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: #d8d0d6;
  transition: background 180ms ease;
  pointer-events: none;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
  transition: translate 180ms ease;
}

.toggle input:checked + span {
  background: var(--app-ok);
}

.toggle input:checked + span::after {
  translate: 20px 0;
}

.toggle input:focus-visible + span {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 30%, transparent);
}

.avatars {
  display: flex;
  align-items: center;
}

.avatars .face {
  width: 30px;
  height: 30px;
  font-size: 0.65rem;
  box-shadow: 0 0 0 2px #fff;
}

.avatars .face + .face {
  margin-left: -8px;
}

.avatars small {
  margin-left: 0.5rem;
  font-size: 0.82rem;
  color: var(--app-soft);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--app-soft);
}

.empty .icon {
  width: 52px;
  height: 52px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--app-surface);
  color: var(--app-wine);
  box-shadow: var(--app-shadow);
}

.bubbles {
  display: grid;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bubbles li {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: 18px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.bubbles .theirs {
  justify-self: start;
  background: var(--app-surface);
  border-bottom-left-radius: 6px;
  box-shadow: var(--app-shadow);
}

.bubbles .mine {
  justify-self: end;
  background: var(--app-wine);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.reply-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  margin: 0 -1rem -2rem;
  padding: 0.6rem 0.75rem;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
}

.reply-bar textarea {
  min-height: 42px !important;
  height: 42px;
  border-radius: var(--r-sm) !important;
  resize: none;
  padding: 0.55rem 0.9rem !important;
}

.reply-bar button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--app-wine);
  color: #fff;
  flex: none;
}

.comments {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.comments li {
  display: flex;
  gap: 0.6rem;
}

.comments .face {
  width: 34px;
  height: 34px;
  font-size: 0.7rem;
}

.comments .bubble {
  flex: 1;
  padding: 0.55rem 0.8rem;
  border-radius: 4px 16px 16px 16px;
  background: var(--app-bg);
  font-size: 0.9rem;
}

.comments .bubble strong {
  font-family: var(--display);
  font-size: 0.85rem;
}

.comments .bubble small {
  color: var(--app-soft);
  margin-left: 0.3rem;
}

.comments .bubble p {
  margin: 0.15rem 0 0;
}

.event-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  min-height: 150px;
  padding: 1rem;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, transparent 20%, rgb(28 19 32 / 72%)),
    linear-gradient(135deg, var(--app-wine), #c41e3a 60%, var(--app-gold));
  color: #fff;
  overflow: hidden;
}

.event-cover.tone-navy {
  background:
    linear-gradient(180deg, transparent 20%, rgb(10 28 74 / 75%)),
    linear-gradient(135deg, var(--app-navy), #3a6fd8 60%, var(--app-gold));
}

.event-cover.tone-gold {
  background:
    linear-gradient(180deg, transparent 20%, rgb(28 19 32 / 70%)),
    linear-gradient(135deg, #8c6d0a, var(--app-gold) 55%, #f2d98a);
}

.event-cover h2 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.event-cover .date-tile {
  background: #fff;
}

.event-cover p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.event-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-item {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.event-item .grow {
  flex: 1;
  min-width: 0;
}

.event-item h3 {
  font-size: 0.98rem;
  line-height: 1.25;
}

.event-item h3 a {
  color: inherit;
  text-decoration: none;
}

.event-item h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.event-item {
  position: relative;
}

.event-item p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--app-soft);
}

.event-item .tag {
  position: relative;
  z-index: 1;
}

.cal-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.cal-links a {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.3rem;
  border-radius: var(--r-sm);
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.cal-links a:hover {
  background: var(--app-gold-soft);
}

.cal-links .icon {
  color: var(--app-wine);
}

.chapter-card {
  position: relative;
  display: block;
  padding: 1.1rem;
  border-radius: var(--r-lg);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  background: linear-gradient(135deg, var(--app-wine), #c41e3a);
  box-shadow: var(--app-shadow);
}

.chapter-card.tone-gold { background: linear-gradient(135deg, #8c6d0a, var(--app-gold)); }
.chapter-card.tone-navy { background: linear-gradient(135deg, #0a1c4a, var(--app-navy)); }

.chapter-card h3 {
  font-size: 1.3rem;
}

.chapter-card p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  opacity: 0.88;
}

.chapter-card .meta {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.8rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
}

.chapter-card .meta span {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.chapter-card .tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgb(255 255 255 / 22%);
  color: #fff;
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product {
  display: block;
  padding: 0.6rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  color: inherit;
  text-decoration: none;
}

.product img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: var(--app-bg);
}

.product strong {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--display);
  font-size: 0.85rem;
  line-height: 1.25;
}

.product span {
  font-size: 0.85rem;
  color: var(--app-wine);
  font-weight: 700;
}

.product-hero {
  border-radius: var(--r-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  overflow: hidden;
}

.product-hero img {
  width: 100%;
  aspect-ratio: 1.1;
  object-fit: contain;
  background: linear-gradient(180deg, #fff, var(--app-bg));
}

.product-hero div {
  padding: 1rem;
}

.product-hero h2 {
  font-size: 1.25rem;
}

.price {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--app-wine);
}

.pay-buttons {
  display: grid;
  gap: 0.5rem;
}

.btn-apple {
  background: #000;
  color: #fff;
}

.btn-apple:hover { background: #222; color: #fff; }

.btn-gpay {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.btn-paypal {
  background: #ffc439;
  color: #003087;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.amounts label {
  position: relative;
}

.amounts input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.amounts span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--app-line);
  background: var(--app-surface);
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
}

.amounts input:checked + span {
  border-color: var(--app-wine);
  background: color-mix(in srgb, var(--app-wine) 8%, #fff);
  color: var(--app-wine);
}

.amounts input:focus-visible + span {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 25%, transparent);
}

.sponsor-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sponsor-wall li {
  display: grid;
  place-items: center;
  aspect-ratio: 1.5;
  padding: 0.5rem;
  border-radius: var(--r-sm);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
}

.sponsor-wall img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.lib-grid {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lib-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.lib-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  flex: none;
  color: #fff;
  background: linear-gradient(135deg, var(--app-wine), #c41e3a);
}

.lib-thumb.kind-pdf { background: linear-gradient(135deg, #0a1c4a, var(--app-navy)); }
.lib-thumb.kind-article { background: linear-gradient(135deg, #8c6d0a, var(--app-gold)); }
.lib-thumb.kind-webinar { background: linear-gradient(135deg, #1c1320, #4a4150); }
.lib-thumb.kind-picture { background: linear-gradient(135deg, var(--app-ok), #4fb286); }

.lib-item h3 {
  font-size: 0.95rem;
  line-height: 1.25;
}

.lib-item p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--app-soft);
}

.lib-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.mentor-card {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.mentor-card .match {
  font-family: var(--display);
  font-weight: 700;
  color: var(--app-ok);
  font-size: 0.8rem;
}

.mentor-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 0.7rem;
  margin: 0 -1rem;
  padding: 0.2rem 1rem 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
}

.mentor-scroll > li {
  scroll-snap-align: start;
}

.mentor-scroll::-webkit-scrollbar { display: none; }

/* Bare member screens: sign in, join, reset, waiting */

.auth {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto 1fr;
  background: var(--app-bg);
}

.auth-hero {
  position: relative;
  padding: 4.2rem 1.4rem 2.2rem;
  color: #fff;
  background:
    radial-gradient(220px 160px at 90% 10%, rgb(201 162 39 / 60%), transparent 70%),
    linear-gradient(160deg, #6e0a17, var(--app-wine) 45%, #c41e3a);
  border-radius: 0 0 32px 32px;
}

.auth-hero img {
  width: 76px;
  height: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.auth-hero h1 {
  font-size: 1.9rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-hero h1 em {
  font-family: var(--serif);
  font-weight: 500;
  color: #ffe08a;
}

.auth-hero p {
  margin-top: 0.5rem;
  opacity: 0.85;
  font-size: 0.95rem;
}

.auth-body {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  padding: 1.2rem 1.2rem 2rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: -2.9rem;
  padding: 4px;
  border-radius: var(--r-sm);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.auth-tabs a {
  padding: 0.6rem;
  border-radius: var(--r-xs);
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--app-soft);
  text-decoration: none;
}

.auth-tabs a[aria-current] {
  background: var(--app-wine);
  color: #fff;
}

.sso {
  display: grid;
  gap: 0.5rem;
}

.sso button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid var(--app-line);
  background: var(--app-surface);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
}

.sso button:hover {
  border-color: var(--app-ink);
}

.sso .sso-apple {
  background: #000;
  border-color: #000;
  color: #fff;
}

.sso .sso-linkedin {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.sso-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-weight: 800;
  font-size: 0.9rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--app-soft);
  font-size: 0.8rem;
}

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

.steps {
  display: flex;
  gap: 0.3rem;
}

.steps span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--app-line);
}

.steps span.on {
  background: var(--app-wine);
}

.step[hidden] { display: none; }

.fine {
  font-size: 0.82rem;
  color: var(--app-soft);
  text-align: center;
}

.fine a {
  color: var(--app-wine);
  font-weight: 600;
}

.photo-pick {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.photo-pick .face {
  width: 64px;
  height: 64px;
  font-size: 1.2rem;
}

.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.interest-chips label {
  position: relative;
}

.interest-chips input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.interest-chips span {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--app-line);
  background: var(--app-surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.interest-chips input:checked + span {
  background: var(--app-ink);
  border-color: var(--app-ink);
  color: #fff;
}

.interest-chips input:focus-visible + span {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 25%, transparent);
}

.waiting-art {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--app-gold-soft);
  color: var(--app-wine);
}

.timeline {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

.timeline .dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--app-line);
  color: var(--app-soft);
  flex: none;
}

.timeline .done .dot {
  background: var(--app-ok);
  color: #fff;
}

.timeline .now .dot {
  background: var(--app-gold);
  color: var(--app-ink);
}

/* ---------- Admin console ---------- */

.desk-body {
  background: #f5f3f1;
  color: var(--app-ink);
  font-size: 0.97rem;
}

.desk-shell {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.desk-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 1.1rem 0.8rem;
  overflow-y: auto;
  background: linear-gradient(180deg, #1c1320, #2a0a12);
  color: #e9e1ea;
}

.desk-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.3rem 0.6rem 1.1rem;
  color: #fff;
  text-decoration: none;
}

.desk-brand img {
  width: 50px;
  height: auto;
}

.desk-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.desk-brand small {
  display: block;
  font-size: 0.75rem;
  color: var(--app-gold);
}

.desk-nav-group {
  margin: 1rem 0.7rem 0.35rem;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(233 225 234 / 45%);
}

.desk-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.desk-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-sm);
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
}

.desk-nav a:hover,
.desk-nav a:focus-visible {
  background: rgb(255 255 255 / 7%);
  color: #fff;
}

.desk-nav a[aria-current] {
  position: relative;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  font-weight: 600;
}

.desk-nav a[aria-current]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.8rem;
  width: 4px;
  height: 20px;
  translate: 0 -50%;
  border-radius: 0 4px 4px 0;
  background: var(--app-gold);
}

.desk-nav a[aria-current] .icon {
  color: var(--app-gold);
}

.desk-nav-foot {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.desk-main {
  min-width: 0;
}

.desk-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 64px;
  padding: 0 1.5rem;
  background: rgb(245 243 241 / 88%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e7e1dc;
}

.desk-menu {
  display: none !important;
}

.desk-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 460px;
  padding: 0 0.85rem;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid #e7e1dc;
  color: var(--app-soft);
}

.desk-search input {
  flex: 1;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
  box-shadow: none;
}

.desk-search input:focus {
  outline: none;
  box-shadow: none;
}

.desk-search:focus-within {
  border-color: var(--app-wine);
}

.desk-scope {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--app-gold-soft);
  color: #6b5200;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
}

.desk-user {
  position: relative;
}

.desk-user summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  list-style: none;
}

.desk-user summary::-webkit-details-marker { display: none; }

.desk-user summary:hover {
  background: #fff;
}

.desk-user .face {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  background: linear-gradient(135deg, #f3dfa0, #e8c766);
  color: var(--app-wine-deep);
}

.desk-user strong {
  display: block;
  font-family: var(--display);
  font-size: 0.85rem;
  line-height: 1.1;
}

.desk-user small {
  display: block;
  font-size: 0.72rem;
  color: var(--app-soft);
}

.desk-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 0.4rem;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--app-shadow-lg);
}

.desk-user-menu a,
.desk-user-menu button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--r-xs);
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  text-align: left;
}

.desk-user-menu a:hover,
.desk-user-menu button:hover {
  background: var(--app-bg);
}

.desk-content {
  padding: 1.6rem 1.5rem 4rem;
  outline: none;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.page-head h1 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 0.25rem 0 0;
  color: var(--app-soft);
}

.page-head .actions {
  flex: none;
}

.page-head .actions > * {
  flex: none;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
}

.kpi {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid #ece6e1;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--app-soft);
  font-weight: 600;
}

.kpi-label .icon {
  color: var(--app-wine);
}

.kpi strong {
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi .delta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--app-ok);
}

.kpi .delta.down {
  color: var(--app-err);
}

.kpi .spark {
  width: 100%;
  height: 30px;
  margin-top: 0.3rem;
}

.panels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid #ece6e1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.panel-head h2 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--app-soft);
}

.panel-head a {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-wine);
  text-decoration: none;
  white-space: nowrap;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart.tone-wine { color: var(--app-wine); }
.chart.tone-gold { color: var(--app-gold); }
.chart.tone-navy { color: var(--app-navy); }
.chart.tone-ok { color: var(--app-ok); }

.spark.tone-wine { color: var(--app-wine); }
.spark.tone-gold { color: var(--app-gold); }
.spark.tone-navy { color: var(--app-navy); }
.spark.tone-ok { color: var(--app-ok); }

.chart-grid {
  stroke: #efe9e4;
  stroke-width: 1;
}

.chart-axis {
  fill: #9a8f9c;
  font-family: var(--display);
  font-size: 11px;
}

.chart-donut {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.chart-donut svg {
  width: 150px;
  height: 150px;
  flex: none;
}

.chart-donut ul {
  display: grid;
  gap: 0.4rem;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}

.chart-donut li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-donut i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.chart-donut strong {
  margin-left: auto;
  font-family: var(--display);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -1.2rem -1.1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid #ece6e1;
  background: #fbf9f7;
  text-align: left;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-soft);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid #f2ede9;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fcfaf8;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 180px;
}

.who .face {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
  background: linear-gradient(135deg, #f3dfa0, #e8c766);
  color: var(--app-wine-deep);
}

.who strong {
  display: block;
  font-family: var(--display);
  font-size: 0.9rem;
  line-height: 1.2;
}

.who small {
  display: block;
  font-size: 0.78rem;
  color: var(--app-soft);
}

.inline-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.inline-actions form {
  margin: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.toolbar .chip {
  font-size: 0.8rem;
}

.toolbar .push {
  margin-left: auto;
}

.feed-mini {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-mini li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.feed-mini .queue-item {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.7rem;
}

.queue-item .who {
  flex: 1 1 170px;
  min-width: 0;
}

.queue-item .who > span {
  min-width: 0;
}

.queue-item .who small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item + .queue-item {
  padding-top: 0.85rem;
  border-top: 1px solid #f2ede9;
}

.empty-sm {
  padding: 1rem;
}

.feed-mini .row-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
}

.feed-mini small {
  display: block;
  color: var(--app-soft);
  font-size: 0.78rem;
}

.progress {
  height: 8px;
  border-radius: 4px;
  background: #f0ebe6;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--app-wine), #c41e3a);
}

.bars-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bars-list li {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
}

.bars-list .top {
  display: flex;
  justify-content: space-between;
}

.bars-list strong {
  font-family: var(--display);
}

.desk-form {
  display: grid;
  gap: 1rem;
}

.desk-form p {
  margin: 0;
}

.desk-form label,
.desk-body .field-label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-soft);
}

:where(.desk-body) :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="search"]), select, textarea) {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #e3dcd6;
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 0.93rem;
}

:where(.desk-body) :where(input, select, textarea):focus {
  outline: none;
  border-color: var(--app-wine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-wine) 14%, transparent);
}

.desk-body .form-2 {
  gap: 0.8rem;
}

.form-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-grid li {
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid #ece6e1;
  overflow: hidden;
}

.media-grid .thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1.3;
  background: #f5f1ed;
  color: var(--app-wine);
}

.media-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.media-grid div:last-child {
  padding: 0.55rem 0.7rem;
}

.media-grid strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-grid small {
  font-size: 0.75rem;
  color: var(--app-soft);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  padding: 1.6rem;
  border: 2px dashed #e0d7cf;
  border-radius: var(--r-md);
  background: #fbf9f7;
  color: var(--app-soft);
  text-align: center;
}

.dropzone .icon {
  color: var(--app-wine);
}

.integrations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.integration {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid #ece6e1;
}

.integration .grow {
  flex: 1;
  min-width: 0;
}

.integration strong {
  display: block;
  font-family: var(--display);
  font-size: 0.92rem;
}

.integration small {
  display: block;
  color: var(--app-soft);
  font-size: 0.8rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}

.preview-frame {
  border-radius: var(--r-sm);
  border: 1px solid #ece6e1;
  overflow: hidden;
  background: #fff;
}

.preview-frame .bar {
  display: flex;
  gap: 5px;
  padding: 0.55rem 0.7rem;
  background: #f5f1ed;
  border-bottom: 1px solid #ece6e1;
  font-size: 0.75rem;
  color: var(--app-soft);
  align-items: center;
}

.preview-frame .bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e0d7cf;
}

.preview-frame .bar span {
  margin-left: 0.6rem;
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
}

.rte-bar {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid #e3dcd6;
  border-bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: #fbf9f7;
}

.rte-bar button {
  min-width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--app-soft);
}

.rte-bar button:hover {
  background: #fff;
  color: var(--app-ink);
}

.rte-bar + textarea {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f2ede9;
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row strong {
  display: block;
  font-family: var(--display);
  font-size: 0.92rem;
}

.check-row small {
  display: block;
  color: var(--app-soft);
  font-size: 0.8rem;
}

/* Admin: bare sign-in */

.desk-bare {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background:
    radial-gradient(900px 500px at 0% 0%, rgb(201 162 39 / 22%), transparent 60%),
    linear-gradient(160deg, #2a0a12, #1c1320 60%, #0a1c4a);
}

.desk-signin {
  width: min(420px, 100%);
  padding: 2rem;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--app-shadow-lg);
}

.desk-signin img {
  width: 70px;
  height: auto;
  margin-bottom: 1rem;
}

.desk-signin h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.desk-signin > p {
  margin: 0.3rem 0 1.2rem;
  color: var(--app-soft);
}

.desk-signin .roles {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--app-line);
}

.desk-signin .roles a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-sm);
  background: var(--app-bg);
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
}

.desk-signin .roles a:hover {
  background: var(--app-gold-soft);
}

.desk-signin .roles .icon {
  color: var(--app-wine);
}

@media (max-width: 1100px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .editor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .desk-shell {
    grid-template-columns: 1fr;
  }

  .desk-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: 272px;
    translate: -100% 0;
    transition: translate 240ms ease;
  }

  .desk-nav.is-open {
    translate: 0 0;
    box-shadow: var(--app-shadow-lg);
  }

  .desk-menu {
    display: inline-grid !important;
  }

  .desk-scope,
  .desk-user summary span {
    display: none;
  }

  .desk-top {
    padding: 0 0.8rem;
  }

  .desk-content {
    padding: 1.2rem 0.9rem 5rem;
  }

  .form-2, .form-3 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-switch-pulse,
  .app-toast {
    animation: none;
  }
}

/* ---------- Member web: one responsive layout (phone below 900px, desktop above) ---------- */

.app-top-search {
  display: none;
}

.app-web {
  background: var(--app-bg);
}

.app-web .app-top {
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-web .app-main {
  flex: none;
  min-height: 0;
  overflow: visible;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

.app-web .app-tabs {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
}

.app-web .reply-bar {
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

.app-web .web-nav,
.app-web .web-rail {
  display: none;
}

.web-auth .app-aside {
  display: none;
}

.web-auth .auth-hero {
  padding-top: calc(2rem + env(safe-area-inset-top));
}

.app-web.app-is-bare .app-main {
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .app-web .demo-switch {
    bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));
  }

  .app-web.app-is-bare .demo-switch {
    bottom: 12px;
  }
}

@media (min-width: 901px) {
  .app-web .web-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
  }

  .app-web .web-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .app-web .app-tabs,
  .app-web .app-top-brand {
    display: none;
  }

  .app-web .app-main {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 2rem;
  }

  .app-web .screen {
    padding: 1.5rem 1.5rem 3rem;
    gap: 1.1rem;
  }

  .app-web .chips {
    margin: 0;
    padding: 0.1rem 0;
    flex-wrap: wrap;
  }

  .app-web .reply-bar {
    bottom: 0;
    margin: 0;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
  }

  .app-web .app-top {
    height: 68px;
    gap: 0.6rem;
    padding: 0 1.5rem;
    background: rgb(246 241 236 / 88%);
    backdrop-filter: blur(12px);
    border-bottom-color: transparent;
  }

  .app-web .app-top-title {
    flex: 0 1 auto;
    margin-right: auto;
    font-size: 1.3rem;
  }

  .app-web .app-top-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 340px;
    padding: 0 0.85rem;
    border-radius: var(--r-sm);
    background: var(--app-surface);
    border: 1px solid var(--app-line);
    color: var(--app-soft);
  }

  .app-web .app-top-search:focus-within {
    border-color: var(--app-wine);
  }

  .app-web .app-top-search input {
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.9rem;
  }

  .app-web .app-icon-btn:hover {
    background: var(--app-surface);
  }

  .app-web .post-media {
    height: 340px;
  }

  .app-web .products {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-web .mentor-scroll {
    grid-auto-columns: calc(50% - 0.35rem);
    margin: 0;
    padding: 0.2rem 0 0.6rem;
  }

  .app-web .web-nav {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1.1rem 0.9rem;
    overflow-y: auto;
    border-right: 1px solid var(--app-line);
    background: var(--app-surface);
  }

  .web-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.2rem 0.6rem 1.1rem;
    color: var(--app-ink);
    text-decoration: none;
  }

  .web-brand img {
    width: 48px;
    height: auto;
  }

  .web-brand strong {
    display: block;
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    line-height: 1.1;
  }

  .web-brand small {
    display: block;
    font-size: 0.75rem;
    color: var(--app-wine);
    font-weight: 600;
  }

  .web-nav ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .web-nav ul a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--r-sm);
    color: var(--app-ink);
    text-decoration: none;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 500;
  }

  .web-nav ul a .icon {
    color: var(--app-soft);
  }

  .web-nav ul a:hover,
  .web-nav ul a:focus-visible {
    background: var(--app-bg);
  }

  .web-nav ul a[aria-current] {
    background: color-mix(in srgb, var(--app-wine) 9%, transparent);
    color: var(--app-wine);
    font-weight: 600;
  }

  .web-nav ul a[aria-current] .icon {
    color: var(--app-wine);
  }

  .web-nav ul a .pip {
    margin-left: auto;
  }

  .web-nav-group {
    margin: 1.1rem 0.7rem 0.35rem;
    font-family: var(--display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--app-soft);
  }

  .web-nav-foot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid var(--app-line);
  }

  .web-me {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
    padding: 0.4rem;
    border-radius: var(--r-sm);
    color: inherit;
    text-decoration: none;
  }

  .web-me:hover {
    background: var(--app-bg);
  }

  .web-me .face {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .web-me span {
    min-width: 0;
  }

  .web-me strong,
  .web-me small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .web-me strong {
    font-family: var(--display);
    font-size: 0.88rem;
  }

  .web-me small {
    font-size: 0.75rem;
    color: var(--app-soft);
  }

  .app-web .demo-switch {
    left: auto;
    right: 18px;
  }

  .app-web .demo-switch-panel {
    left: auto;
    right: 0;
  }

  /* Sign in, join, waiting: brand panel beside a centered card */
  .web-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2rem;
  }

  .web-auth .app-aside {
    display: block;
    max-width: 440px;
  }

  .web-auth-main {
    border-radius: var(--r-lg);
    background: var(--app-bg);
    box-shadow: var(--app-shadow-lg);
    overflow: hidden;
  }

  .web-auth .auth-hero {
    padding-top: 2rem;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
  }
}

@media (min-width: 901px) {
  .app-web.app-is-bare {
    background:
      radial-gradient(900px 500px at 0% 0%, rgb(201 162 39 / 22%), transparent 60%),
      radial-gradient(800px 600px at 100% 100%, rgb(154 15 33 / 22%), transparent 60%),
      #f3ede7;
  }
}

@media (min-width: 1240px) {
  .app-web .web-shell {
    grid-template-columns: 248px minmax(1rem, 1fr) minmax(0, 720px) 320px minmax(1.5rem, 1fr);
  }

  .app-web .web-main {
    grid-column: 3;
    grid-row: 1;
  }

  .app-web .web-rail {
    grid-column: 4;
    grid-row: 1;
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 1rem;
    height: 100vh;
    padding: 1.5rem 0 1.5rem 0.5rem;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .rail-card {
    padding: 1rem 1.1rem;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
  }

  .rail-card h2 {
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-soft);
  }

  .rail-event,
  .rail-list a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
  }

  .rail-event strong,
  .rail-list strong {
    display: block;
    font-family: var(--display);
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .rail-event small,
  .rail-list small {
    display: block;
    font-size: 0.8rem;
    color: var(--app-soft);
  }

  .rail-event:hover strong,
  .rail-list a:hover strong {
    color: var(--app-wine);
  }

  .rail-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .rail-list .face {
    width: 38px;
    height: 38px;
    font-size: 0.75rem;
  }

  .rail-swatch {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--app-wine), #c41e3a);
  }

  .rail-swatch.tone-gold { background: linear-gradient(135deg, #8c6d0a, var(--app-gold)); }
  .rail-swatch.tone-navy { background: linear-gradient(135deg, #0a1c4a, var(--app-navy)); }

  .rail-more {
    display: inline-block;
    margin-top: 0.8rem;
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--app-wine);
    text-decoration: none;
  }

  .rail-app {
    background:
      radial-gradient(160px 120px at 100% 0%, rgb(201 162 39 / 30%), transparent 70%),
      var(--app-surface);
  }

  .rail-app p {
    margin: 0 0 0.8rem;
    font-size: 0.88rem;
    color: var(--app-soft);
  }
}
