/* ============================================================
   WEAR RAME SOCIETY — COMPONENTS  (Modern health-app · FLO-style)
   ============================================================ */

/* ---- Modern page header (clean, no photo) ---- */
.page-head { padding-top: var(--sp-3); margin-bottom: var(--sp-5); }
.page-head .eyebrow { color: var(--c-blush-ink); }
.page-head h1 { font-size: var(--fs-2xl); font-weight: var(--weight-x); letter-spacing: var(--ls-tight); margin-top: 4px; }
.page-head p { color: var(--c-ink-muted); margin-top: 4px; font-size: var(--fs-sm); }

/* ---- Full-bleed cover hero (only for detail covers: class/venue/event) ---- */
.hero { position: relative; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--topbar-h) + var(--safe-top) + var(--sp-6)) var(--gutter) var(--sp-6);
  color: #fff; overflow: hidden; background: var(--c-surface-3); border-radius: 0 0 var(--r-2xl) var(--r-2xl); }
/* .hero.bleed must have auto width so the negative gutter margins widen it edge-to-edge */
.hero.bleed { width: auto; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(45,58,71,.42) 0%, rgba(45,58,71,.06) 32%, rgba(45,58,71,0) 50%, rgba(45,58,71,.2) 66%, rgba(45,58,71,.78) 100%); }
.hero > :not(.hero__img) { position: relative; z-index: 2; }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero__title { font-family: var(--font-head); font-weight: var(--weight-x); font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); color: #fff; margin-top: var(--sp-2); }
.hero__sub { color: rgba(255,255,255,.92); margin-top: var(--sp-2); font-size: var(--fs-sm); }
.hero--tall { min-height: 360px; }

/* ---- Bottom Tab Bar (5 tabs) ---- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: var(--content-max);
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 6px var(--sp-2) var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.9); backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid var(--c-line); z-index: var(--z-nav); }
.tabbar__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: none; cursor: pointer; color: var(--c-ink-muted); min-height: var(--tap-min); min-width: 0; padding-inline: 2px;
  transition: color var(--t-base) var(--ease-out); }
.tabbar__item .ico { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; transition: transform var(--t-base) var(--ease-soft); }
.tabbar__item span { font-size: var(--fs-2xs); letter-spacing: .01em; font-weight: var(--weight-semi); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar__item[aria-current="page"] { color: var(--c-blush-ink); }
.tabbar__item[aria-current="page"] .ico { transform: translateY(-1px) scale(1.04); }

/* ---- Top App Bar ---- */
.topbar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--content-max);
  height: calc(var(--topbar-h) + var(--safe-top)); padding: var(--safe-top) var(--gutter) 0;
  display: flex; align-items: center; gap: var(--sp-3); z-index: var(--z-sticky); color: var(--c-ink);
  transition: background var(--t-base), box-shadow var(--t-base); }
.topbar--over { color: #fff; }
.topbar--scrolled { background: rgba(251,246,243,.86); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--c-line); color: var(--c-ink); }
.topbar__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--grad-accent);
  display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--fs-sm); color: #fff; cursor: pointer; overflow: hidden; box-shadow: var(--sh-sm); padding: 0; }
.topbar__avatar img, .topbar__avatar .member-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.topbar__greet { font-weight: var(--weight-bold); font-size: var(--fs-md); line-height: 1.1; margin-right: auto; letter-spacing: var(--ls-tight); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar__greet small { display: block; font-family: var(--font-body); font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: .55; margin-bottom: 1px; font-weight: var(--weight-semi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.credit-badge { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 8px; border-radius: var(--r-pill);
  background: var(--c-gold-wash); border: 0; color: var(--c-gold-deep);
  font-size: var(--fs-sm); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; cursor: pointer; transition: transform var(--t-fast) var(--ease-soft); }
.topbar--over .credit-badge { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.credit-badge:active { transform: scale(.95); }
.credit-badge .coin { width: 18px; height: 18px; border-radius: 50%; background: var(--c-gold-grad); box-shadow: var(--sh-inset); }

.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); border: 0; cursor: pointer; flex: 0 0 auto; box-shadow: var(--sh-sm); }
.topbar--over .bell { background: rgba(255,255,255,.18); backdrop-filter: blur(6px); box-shadow: none; }
.bell .ico { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.bell[data-unread]::after { content:""; position:absolute; top:9px; right:10px; width:9px; height:9px; border-radius:50%; background: var(--c-blush); border: 2px solid var(--c-surface); }

/* ---- The RING (signature dashboard element) ---- */
.ring-card { background: var(--grad-hero); border-radius: var(--r-2xl); padding: var(--sp-6) var(--sp-5) var(--sp-5); box-shadow: var(--sh-md); text-align: center; }
.ring-wrap { position: relative; width: 210px; height: 210px; margin: var(--sp-2) auto var(--sp-4); }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,.7); }
.ring-prog { fill: none; stroke-linecap: round; transition: stroke-dashoffset var(--t-slow) var(--ease-out); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: var(--fs-num); font-weight: var(--weight-x); line-height: 1; letter-spacing: var(--ls-tight); color: var(--c-ink); }
.ring-num small { font-size: var(--fs-lg); font-weight: var(--weight-bold); color: var(--c-ink-muted); }
.ring-label { font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--c-ink-soft); margin-top: 8px; font-weight: var(--weight-bold); }
.ring-cap { font-size: var(--fs-sm); color: var(--c-ink-soft); font-weight: var(--weight-semi); margin-bottom: var(--sp-4); }

/* ---- Cards ---- */
.card { background: var(--c-surface); border-radius: var(--r-xl); padding: var(--card-pad); box-shadow: var(--sh-sm); border: 0; transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.card--press { cursor: pointer; }
.card--press:active { transform: scale(.985); box-shadow: var(--sh-sm); }
.card--grad-warm { background: var(--grad-warm); }
.card--grad-cool { background: var(--grad-cool); }
.card__media { aspect-ratio: 16/10; border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface-3); position: relative; }
.card__media img { width:100%; height:100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.card--press:active .card__media img { transform: scale(1.03); }
.card__title { font-family: var(--font-head); font-weight: var(--weight-bold); font-size: var(--fs-md); letter-spacing: var(--ls-snug); margin: var(--sp-3) 0 3px; line-height: var(--lh-snug); }
.card__meta { font-size: var(--fs-xs); color: var(--c-ink-muted); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; font-weight: var(--weight-semi); }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-ink-faint); }

/* class cards */
.class-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-3); }
.class-card { padding: 0; background: none; border: 0; box-shadow: none; }
.class-card .card__media { aspect-ratio: 3/4; border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.class-card__body { padding: var(--sp-3) 4px 0; }
.class-card .card__title { margin-top: 0; font-size: var(--fs-base); }
.duration-badge { position: absolute; bottom: var(--sp-2); left: var(--sp-2); background: rgba(45,58,71,.55); backdrop-filter: blur(8px); color:#fff; font-size: var(--fs-2xs); font-weight: var(--weight-bold); letter-spacing: .02em; padding: 5px 10px; border-radius: var(--r-pill); }
.lock-corner { position:absolute; top: var(--sp-2); right: var(--sp-2); width:28px; height:28px; border-radius:50%; background: rgba(255,255,255,.94); color: var(--c-gold-deep); display:grid; place-items:center; box-shadow: var(--sh-sm); }
.lock-corner .ico { width:14px; height:14px; stroke: currentColor; stroke-width:2; fill:none; }

/* venue masonry */
.venue-masonry { columns: 2; column-gap: var(--sp-3); }
.venue-card { break-inside: avoid; margin-bottom: var(--sp-3); border-radius: var(--r-lg); overflow: hidden; position: relative; box-shadow: var(--sh-sm); cursor: pointer; }
.venue-card img { width: 100%; display: block; transition: transform var(--t-slow) var(--ease-out); }
.venue-card:active img { transform: scale(1.04); }
.venue-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(45,58,71,.8) 0%, rgba(45,58,71,0) 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: var(--sp-3); gap: 6px; }
.venue-card__name { font-family: var(--font-head); font-weight: var(--weight-bold); color:#fff; font-size: var(--fs-md); line-height: 1.15; letter-spacing: var(--ls-snug); }
.venue-card__pills { display: flex; gap: 5px; flex-wrap: wrap; }
.venue-card__pills .tag { font-size: var(--fs-2xs); letter-spacing: .03em; color: rgba(255,255,255,.88); text-transform: uppercase; font-weight: var(--weight-bold); }
.perk-badge { position:absolute; top: var(--sp-2); left: var(--sp-2); background: var(--grad-accent); color: #fff; font-size: var(--fs-2xs); font-weight: var(--weight-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; padding: 5px 10px; border-radius: var(--r-pill); box-shadow: var(--sh-accent); }

/* event card */
.event-card { display: flex; gap: var(--sp-3); align-items: center; }
.event-card__date { flex: 0 0 58px; height: 58px; background: var(--grad-cool); border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.event-card__date b { font-family: var(--font-head); font-weight: var(--weight-x); font-size: var(--fs-lg); color: var(--c-blush-ink); line-height: 1; }
.event-card__date span { font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--c-ink-muted); margin-top: 2px; font-weight: var(--weight-bold); }
.event-card__body { flex: 1; min-width: 0; }
.event-card__spots { font-size: var(--fs-xs); color: var(--c-success); font-weight: var(--weight-semi); }

/* horizontal content cards */
.content-card { width: 230px; flex: 0 0 auto; padding: 0; background: none; border: 0; box-shadow: none; }
.content-card .card__media { aspect-ratio: 4/3; border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.content-card__body { padding: var(--sp-3) 4px 0; }
.read-time { font-size: var(--fs-2xs); letter-spacing: .03em; text-transform: uppercase; color: var(--c-ink-muted); font-weight: var(--weight-bold); }
.hscroll { display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px var(--gutter); margin: 0 calc(-1 * var(--gutter)); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }

/* ---- Pills / Filters ---- */
.filter-row { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px var(--gutter); margin: 0 calc(-1*var(--gutter)) var(--sp-5); scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; min-height: var(--tap-min); padding: 0 18px; border-radius: var(--r-pill); background: var(--c-surface); border: 0; box-shadow: var(--sh-xs); color: var(--c-ink-soft); font-size: var(--fs-sm); font-weight: var(--weight-bold); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-soft); }
.pill[aria-pressed="true"] { background: var(--c-ink); color: var(--c-on-accent); box-shadow: var(--sh-sm); }
.pill--blush[aria-pressed="true"] { background: var(--grad-btn); }
.pill--sage  { background: var(--c-sage-wash);  color: var(--c-sage-deep);  box-shadow:none; }
.pill--teal  { background: var(--c-teal-wash);  color: var(--c-teal-deep);  box-shadow:none; }
.pill--amber { background: var(--c-amber-wash); color: var(--c-amber-deep); box-shadow:none; }

/* ---- Buttons ---- */
.btn { font-family: var(--font-body); font-size: var(--fs-base); font-weight: var(--weight-semi); border: 0; border-radius: var(--r-pill); padding: 0 var(--sp-6); height: 52px; min-width: 64px; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); cursor: pointer; letter-spacing: var(--ls-snug); transition: transform var(--t-fast) var(--ease-soft), box-shadow var(--t-base), filter var(--t-base); }
.btn:active { transform: scale(.97); }
.btn--block { width: 100%; }
.btn--sm { height: 42px; font-size: var(--fs-sm); padding: 0 var(--sp-5); }
.btn--primary { background: var(--grad-btn); color: #fff; box-shadow: var(--sh-accent); }
.btn--primary:hover { filter: brightness(1.04); }
.btn--accent { background: var(--grad-accent); color: #fff; box-shadow: var(--sh-accent); }
.btn--ghost { background: var(--c-surface-2); color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-surface-3); }
.btn--gold { background: var(--c-gold-grad); color: var(--c-on-gold); box-shadow: var(--sh-gold); }
.btn--ink { background: var(--c-ink); color: var(--c-on-accent); }
.btn--danger { background: var(--c-danger); color: #fff; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ---- Weekly rhythm dots (used in small contexts; ring is the hero) ---- */
.rhythm { display: flex; gap: 8px; align-items: center; }
.rhythm__dots { display: flex; gap: 8px; }
.rhythm__dot { width: 15px; height: 15px; border-radius: 50%; background: var(--c-surface-3); transition: background var(--t-base) var(--ease-soft); }
.rhythm__dot.on { background: var(--grad-accent); }
.rhythm__dot.today { box-shadow: 0 0 0 3px var(--c-blush-soft); }

/* ---- Streak chip (quiet, Profile only) ---- */
.streak-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px 0 10px; border-radius: var(--r-pill); background: var(--c-surface-2); color: var(--c-ink-soft); font-size: var(--fs-sm); font-weight: var(--weight-bold); }
.streak-chip .flame { width: 14px; height: 14px; color: var(--c-streak); }

/* ---- Toasts ---- */
.toast-stack { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--sp-3)); width: calc(100% - 2*var(--gutter)); max-width: calc(var(--content-max) - 2*var(--gutter)); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none; }
.toast { pointer-events: auto; background: var(--c-ink); color: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); font-weight: var(--weight-semi); animation: toast-in var(--t-slow) var(--ease-soft); }
.toast .ico { stroke: #fff; }
.toast--credit { background: var(--grad-btn); }
.toast--credit .coin { width: 28px; height: 28px; border-radius: 50%; background: var(--c-gold-grad); box-shadow: var(--sh-gold); flex: 0 0 auto; animation: coin-pop var(--t-slow) var(--ease-soft); }
.toast--credit b { color: #fff; font-weight: var(--weight-x); font-size: var(--fs-md); }
.toast--danger { background: var(--c-danger); }
@keyframes toast-in { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes coin-pop { 0% { transform: scale(.3) rotate(-20deg); } 100% { transform: none; } }
.toast--out { animation: toast-out var(--t-base) var(--ease-in-out) forwards; }
@keyframes toast-out { to { transform: translateY(120%); opacity: 0; } }

/* ---- Modal + Bottom Sheet ---- */
.scrim { position: fixed; inset: 0; background: var(--c-overlay-scrim); backdrop-filter: blur(3px); z-index: var(--z-sheet); opacity: 0; animation: fade-in var(--t-base) forwards; }
@keyframes fade-in { to { opacity: 1; } }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: var(--content-max); background: var(--c-surface); border-radius: var(--r-2xl) var(--r-2xl) 0 0; box-shadow: var(--sh-xl); z-index: var(--z-sheet); padding: var(--sp-3) var(--gutter) calc(var(--gutter) + var(--safe-bottom)); max-height: 88dvh; overflow-y: auto; animation: sheet-up var(--t-screen) var(--ease-out); }
.sheet__grab { width: 40px; height: 5px; border-radius: var(--r-pill); background: var(--c-line-strong); margin: 0 auto var(--sp-4); }
@keyframes sheet-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--gutter); background: var(--c-overlay-scrim); backdrop-filter: blur(8px); animation: fade-in var(--t-base) forwards; }
.modal__panel { width: 100%; max-width: 380px; animation: modal-in var(--t-slow) var(--ease-soft); }
@keyframes modal-in { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Perk Card ---- */
.perk-card { position: relative; border-radius: var(--r-2xl); overflow: hidden; aspect-ratio: 1.586/1; color:#fff; background: var(--grad-accent); box-shadow: var(--sh-lg); padding: var(--sp-5); display: flex; flex-direction: column; justify-content: space-between; }
.perk-card::before { content:""; position:absolute; inset:0; background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.25), transparent 60%); }
.perk-card__top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.perk-card__logo { font-family: var(--font-head); font-weight: var(--weight-x); letter-spacing: var(--ls-wide); font-size: var(--fs-md); text-transform: uppercase; }
.perk-card__photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.6); }
.perk-card__name { font-family: var(--font-head); font-weight: var(--weight-x); font-size: var(--fs-lg); position: relative; }
.perk-card__venue { font-size: var(--fs-sm); opacity: .92; font-weight: var(--weight-semi); }
.perk-card__id { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: var(--ls-wide); color: rgba(255,255,255,.9); position: relative; }
.perk-card__perk { background: rgba(255,255,255,.18); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); font-weight: var(--weight-semi); backdrop-filter: blur(4px); position: relative; }

/* ---- Progress ---- */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--c-surface-3); overflow: hidden; }
.progress__fill { height: 100%; border-radius: inherit; background: var(--grad-accent); transition: width var(--t-slow) var(--ease-out); }
.progress--gold .progress__fill { background: var(--c-gold-grad); }
.progress__label { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--c-ink-muted); margin-bottom: 6px; font-weight: var(--weight-semi); }
.progress-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.progress-seg i { flex: 1; min-width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--c-surface-3); }
.progress-seg i.done { background: var(--grad-accent); }
.progress-seg i.today { background: var(--c-blush); }

/* ---- Checklist (rituals) ---- */
.check-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; cursor: pointer; border-bottom: 1px solid var(--c-line-soft); }
.check-item:last-child { border-bottom: 0; }
.check-item .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c-line-strong); display: grid; place-items: center; flex: 0 0 auto; transition: background-color var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft); }
.check-item.done .box { background: var(--grad-accent); border-color: transparent; }
.check-item.done .box .ico { stroke: #fff; }
.check-item .box .ico { width: 13px; height: 13px; stroke: transparent; stroke-width: 3; fill: none; }
.check-item .label { text-transform: none; letter-spacing: var(--ls-snug); font-size: var(--fs-base); font-weight: var(--weight-semi); color: var(--c-ink); margin: 0; }
.check-item.done .label { color: var(--c-ink-muted); text-decoration: line-through; }

/* ---- Gating overlay ---- */
.gate { position: relative; border-radius: inherit; overflow: hidden; }
.gate > .gate__content { filter: blur(8px) saturate(.85); transform: scale(1.04); pointer-events: none; user-select: none; }
.gate__veil { position: absolute; inset: 0; z-index: var(--z-overlay); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); background: var(--c-blur-veil); backdrop-filter: blur(3px); text-align: center; padding: var(--sp-5); }
.gate__lock { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-accent); color: #fff; box-shadow: var(--sh-accent); }
.gate__lock .ico { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2; fill: none; }
.gate__title { font-weight: var(--weight-bold); font-size: var(--fs-md); color: var(--c-ink); }
.gate__sub { font-size: var(--fs-xs); color: var(--c-ink-soft); max-width: 26ch; font-weight: var(--weight-med); }
.gate-fade { position: relative; max-height: 16em; overflow: hidden; }
.gate-fade::after { content:""; position:absolute; inset:auto 0 0 0; height:7em; background: linear-gradient(to bottom, transparent, var(--c-surface)); }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 11px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--weight-bold); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.badge::before { content:""; width: 6px; height: 6px; border-radius: 50%; }
.badge--sand  { background: color-mix(in srgb, var(--c-tier-sand) 24%, var(--c-bg-tint)); color: #7A6A52; }
.badge--sand::before  { background: var(--c-tier-sand); }
.badge--blush { background: var(--c-blush-wash); color: var(--c-blush-ink); }
.badge--blush::before { background: var(--c-tier-blush); }
.badge--gold  { background: var(--c-gold-wash); color: var(--c-gold-deep); }
.badge--gold::before  { background: var(--c-gold-grad); }
.verified { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--c-verified); color: #fff; }
.verified .ico { width: 10px; height: 10px; stroke: #fff; stroke-width: 2.6; fill: none; }

/* ---- Reactions ---- */
.reactions { display: flex; gap: var(--sp-4); align-items: center; }
.reaction { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--c-ink-muted); font-size: var(--fs-sm); font-weight: var(--weight-bold); min-height: var(--tap-min); padding: 10px 2px; transition: color var(--t-fast); }
.reaction .ico { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; transition: transform var(--t-fast) var(--ease-soft); }
.reaction[aria-pressed="true"] { color: var(--c-blush-ink); }
.reaction[aria-pressed="true"] .ico { fill: var(--c-blush); stroke: var(--c-blush); transform: scale(1.15); }

/* ---- Banner ---- */
.banner { border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); font-weight: var(--weight-semi); display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.banner--blush { background: var(--c-blush-wash); color: var(--c-blush-ink); }
.banner--gold { background: var(--c-gold-wash); color: var(--c-gold-deep); }
.banner__close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; font-size: var(--fs-md); }

/* ---- Stat tiles ---- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.stat-tile { background: var(--c-surface); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-2); text-align: center; box-shadow: var(--sh-sm); }
.stat-tile b { font-family: var(--font-head); font-weight: var(--weight-x); font-size: var(--fs-xl); display: block; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-tile span { font-size: var(--fs-2xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--c-ink-muted); display: block; margin-top: 6px; font-weight: var(--weight-bold); }

/* ---- Segmented control ---- */
.segmented { display: flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 4px; gap: 3px; }
.segmented button { flex: 1; min-height: 44px; border: 0; background: none; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: var(--weight-bold); color: var(--c-ink-soft); cursor: pointer; transition: color var(--t-fast), box-shadow var(--t-fast); }
.segmented button[aria-selected="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--sh-sm); }

/* ---- Video ---- */
.video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--c-ink); border-radius: var(--r-lg); overflow: hidden; }
.video-wrap video, .video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
/* image-free "tap to play" cover */
.video-facade { background: var(--grad-accent); display: grid; place-items: center; cursor: pointer; }
.video-facade::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, rgba(255,255,255,.18), transparent 60%); }
.video-play { position: relative; z-index: 1; width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: var(--sh-lg); transition: transform var(--t-fast) var(--ease-soft); }
.video-facade:active .video-play { transform: scale(.94); }
.video-play .ico { width: 26px; height: 26px; fill: var(--c-ink); stroke: var(--c-ink); margin-left: 3px; }

/* ---- Avatar ---- */
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--grad-accent); display: grid; place-items: center; font-weight: var(--weight-bold); color: #fff; flex: 0 0 auto; }
.avatar--lg { width: 96px; height: 96px; font-size: var(--fs-xl); }

/* ---- FAB ---- */
.fab { position: fixed; right: max(var(--gutter), calc(50% - var(--content-max)/2 + var(--gutter))); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--sp-3)); width: 56px; height: 56px; border-radius: 50%; background: var(--grad-btn); color: #fff; border: 0; box-shadow: var(--sh-accent); display: grid; place-items: center; cursor: pointer; z-index: var(--z-fab); }
.fab .ico { width: 26px; height: 26px; stroke: #fff; stroke-width: 2; fill: none; }

/* ---- List rows ---- */
.list-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-xs); margin-bottom: var(--sp-2); cursor: pointer; }
.list-row .ico-chev { margin-left: auto; width: 18px; height: 18px; stroke: var(--c-ink-faint); stroke-width: 2.2; fill: none; }

/* ---- Brand logo image (app sidebar + admin rail) ---- */
.brand-logo { height: 52px; width: auto; max-width: 210px; object-fit: contain; display: block; }
.home-rhythm-overlap { position: relative; }

/* ============================================================
   RESPONSIVE  (iPad ≥700 · desktop ≥1024 sidebar)
   ============================================================ */
.sidebar { display: none; }
@media (min-width: 700px) {
  :root { --content-max: 740px; --section-gap: 2.25rem; }
  .class-grid { grid-template-columns: repeat(3, 1fr); }
  .venue-masonry { columns: 3; }
  .content-card { width: 248px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 2rem; }
  .app { max-width: 1240px; display: flex; align-items: flex-start; }
  .topbar, .tabbar { display: none !important; }
  #view { flex: 1 1 auto; min-width: 0; }
  .screen { max-width: 980px; margin: 0 auto; padding-top: var(--sp-8); padding-bottom: var(--sp-16); }
  .screen--bleed { padding-top: var(--sp-6); }
  .hero { border-radius: var(--r-2xl); min-height: 340px; padding-top: var(--sp-8); }

  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start; height: 100dvh; width: 260px; flex: 0 0 260px; padding: var(--sp-6) var(--sp-3); border-right: 1px solid var(--c-line); background: var(--c-bg-tint); }
  .sidebar__brand { font-family: var(--font-head); font-weight: var(--weight-x); font-size: var(--fs-lg); letter-spacing: var(--ls-tight); padding: var(--sp-2) var(--sp-3) var(--sp-8); }
  .sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar__item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-3) var(--sp-4); border: 0; background: none; cursor: pointer; color: var(--c-ink-soft); border-radius: var(--r-md); font-family: var(--font-body); font-size: var(--fs-base); font-weight: var(--weight-bold); text-align: left; transition: background var(--t-fast), color var(--t-fast); }
  .sidebar__item .ico { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; flex: 0 0 auto; }
  .sidebar__item:hover { background: var(--c-surface-2); color: var(--c-ink); }
  .sidebar__item[aria-current="page"] { background: var(--grad-btn); color: #fff; box-shadow: var(--sh-accent); }
  .sidebar__item[data-unread]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-blush); margin-left: auto; }
  .sidebar__coin { width: 22px; height: 22px; border-radius: 50%; background: var(--c-gold-grad); flex: 0 0 auto; }
  .sidebar__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--grad-accent); display: grid; place-items: center; font-size: 11px; font-weight: var(--weight-bold); color: #fff; flex: 0 0 auto; overflow: hidden; }
  .sidebar__spacer { flex: 1 1 auto; min-height: var(--sp-6); }
  .sidebar__foot { border-top: 1px solid var(--c-line); padding-top: var(--sp-3); margin-top: var(--sp-3); }
  .class-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5) var(--sp-4); }
  .venue-masonry { columns: 3; column-gap: var(--sp-4); }
  .fab { right: 40px; bottom: 40px; }
  .toast-stack { left: auto; right: 40px; transform: none; bottom: 32px; width: 380px; }
}
@media (min-width: 1400px) { .app { max-width: 1320px; } }

/* ============================================================
   IMAGE-FREE MODE — no photographs in the member app; the warm
   gradient blocks carry the design instead (FLO/Oura style).
   (Admin uses #app, so its content thumbnails are unaffected.)
   ============================================================ */
.app img:not(.brand-logo):not(.member-photo):not(.avatar):not(.sidebar__avatar):not(.world-img):not(.food-img):not(.board-img) { display: none !important; }

/* ---- Nourish / food scanner ---- */
.food-thumb { width: 56px; height: 56px; border-radius: var(--r-md); object-fit: cover; flex: none; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--c-blush-wash); border-top-color: var(--c-blush); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ---- Wear Ramé World (editorial imagery + shop/styling) ---- */
.world-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 2; display: flex; align-items: flex-end; }
.world-hero img.world-img, .world-card img.world-img, .world-look img.world-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.world-hero__veil, .world-card__veil, .world-look__veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(45,58,71,0) 28%, rgba(45,58,71,.62)); }
.world-hero__content { position: relative; z-index: 2; padding: var(--sp-5); color: #fff; }
.world-hero__title { font-family: var(--font-script); font-size: var(--fs-3xl); line-height: 1.05; }
.world-hero__sub { font-size: var(--fs-sm); color: rgba(255,255,255,.92); margin: var(--sp-1) 0 var(--sp-3); max-width: 30ch; }
.btn--white { background: #fff; color: var(--c-ink); }
.world-edit { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.world-look { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 4; display: block; border: 0; cursor: pointer; padding: 0; }
.world-look__label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: var(--sp-3); color: #fff; font-weight: var(--weight-bold); text-align: left; }
.world-look__eyebrow { font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: .85; font-weight: var(--weight-bold); }
/* Home entry card */
.world-card { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: flex-end; width: 100%; border: 0; cursor: pointer; padding: 0; }
.world-card__content { position: relative; z-index: 2; padding: var(--sp-4); color: #fff; text-align: left; }
.world-card__title { font-family: var(--font-script); font-size: var(--fs-2xl); line-height: 1; }
.world-card__sub { font-size: var(--fs-xs); color: rgba(255,255,255,.9); margin-top: 2px; }

/* ---- Journal "Pinterest" masonry board ---- */
.journal-masonry { column-count: 2; column-gap: var(--sp-3); }
@media (min-width: 760px) { .journal-masonry { column-count: 3; } }
@media (min-width: 1100px) { .journal-masonry { column-count: 4; } }
.journal-masonry > .card { break-inside: avoid; width: 100%; margin: 0 0 var(--sp-3); display: inline-block; }
.journal-masonry .journal-photo { max-height: none; margin-top: var(--sp-2); }
.journal-tile { cursor: pointer; text-align: left; transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.journal-tile:hover { box-shadow: var(--sh-md); }
.journal-tile:active { transform: scale(.99); }
.journal-tile__text { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Member-added journal photos (their own, private) ---- */
.journal-photo { display: block; width: 100%; max-height: 56vh; object-fit: cover; border-radius: var(--r-lg); margin-top: var(--sp-3); background: var(--c-surface-2); }
.photo-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--c-surface-2); }
.photo-preview { position: relative; margin-top: var(--sp-3); }
.photo-preview .photo-remove { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(45,58,71,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo-preview .photo-remove .ico { width: 16px; height: 16px; stroke: #fff; }

/* Media blocks where the title sits BELOW → soft glossy gradient tiles, alternating */
.card__media { background: var(--grad-cool); position: relative; }
.card__media::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 80% at 28% 18%, rgba(255,255,255,.4), transparent 58%); }
.duration-badge, .lock-corner { z-index: 2; }
.class-grid .class-card:nth-child(3n+1) .card__media,
.hscroll .content-card:nth-child(3n+1) .card__media { background: var(--grad-warm); }
.class-grid .class-card:nth-child(3n+2) .card__media,
.hscroll .content-card:nth-child(3n+2) .card__media { background: linear-gradient(160deg,#EDF0E2 0%,#E8EDF2 100%); }
.class-grid .class-card:nth-child(3n) .card__media,
.hscroll .content-card:nth-child(3n) .card__media { background: var(--grad-cool); }

/* Venue masonry cards get height + colour without photos (dark scrim keeps the white name legible) */
.venue-card { aspect-ratio: 4 / 5; background: var(--grad-accent); }
.venue-card:nth-child(3n+1) { background: var(--grad-cool); }
.venue-card:nth-child(3n+2) { background: var(--grad-warm); }
.venue-card:nth-child(3n)   { background: var(--grad-accent); }
.venue-card:nth-child(4n+2) { aspect-ratio: 1 / 1; }
.venue-card:nth-child(5n+3) { aspect-ratio: 5 / 6; }

/* Detail cover heroes → rich gradient banners (white title over the existing scrim) */
.hero { background: var(--grad-accent); }

/* venue cards filled the column via their image before; now force block width */
.venue-masonry .venue-card { display: block; width: 100%; }

/* ============================================================
   BRAND SCRIPT — retro beach script (Pacifico) on the wordmark + section
   titles only; everything else stays Plus Jakarta Sans for readability.
   ============================================================ */
.wordmark, .topbar__greet small, .page-head h1, .sidebar__brand {
  font-family: var(--font-script); font-weight: 400; letter-spacing: 0;
}
.topbar__greet small { text-transform: none; font-size: var(--fs-base); opacity: .82; line-height: 1; margin-top: 3px; }
.page-head h1 { line-height: 1.18; }
.sidebar__brand { font-size: var(--fs-xl); line-height: 1.1; }

/* ---- Meta chips (icon-style scannable attributes on class detail) ---- */
.meta-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: var(--r-pill);
  background: var(--c-surface-2); color: var(--c-ink-soft); font-size: var(--fs-xs); font-weight: var(--weight-bold); white-space: nowrap; }
.meta-chip .ico { width: 15px; height: 15px; stroke: var(--c-blush-ink); stroke-width: 1.9; fill: none; flex: 0 0 auto; }

/* ---- Emoji-only mood chips ---- */
.pill[data-mood] { font-size: 1.4rem; line-height: 1; min-width: 54px; justify-content: center; padding: 0 14px; }

/* ---- Privacy reassurance shown where a member writes ---- */
.privacy-note { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-2); color: var(--c-ink-soft); font-size: var(--fs-xs); }
.privacy-note .ico { width: 13px; height: 13px; stroke: var(--c-blush-ink); stroke-width: 1.9; flex: 0 0 auto; }

/* ---- Voice dictation button (recording state) ---- */
.voice-btn.is-recording { color: var(--c-on-accent); background: var(--c-danger); }
.voice-btn.is-recording .ico { stroke: var(--c-on-accent); animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ---- Stories (IG-style swipeable viewer) ---- */
.stories { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(20,24,28,.72); backdrop-filter: blur(6px); animation: stories-in var(--t-base) var(--ease-out); }
.stories__card { position: relative; width: 100%; height: 100%; max-width: 460px; max-height: 100%; overflow: hidden; color: #fff; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 18px) var(--sp-5) calc(env(safe-area-inset-bottom) + 22px); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
@media (min-width: 540px) { .stories__card { height: min(92vh, 880px); border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); } }
.stories__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 28%, transparent 62%, rgba(0,0,0,.28)); pointer-events: none; }
.stories__bars { display: flex; gap: 5px; position: relative; z-index: 2; }
.stories__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.32); overflow: hidden; }
.stories__bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.stories__close { position: absolute; top: calc(env(safe-area-inset-top) + 26px); right: 12px; z-index: 3; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.stories__close .ico { width: 24px; height: 24px; stroke: #fff; }
.stories__content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-3); }
.stories__eyebrow { font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; font-weight: var(--weight-bold); color: rgba(255,255,255,.85); }
.stories__title { font-family: var(--font-head); font-size: var(--fs-2xl); font-weight: var(--weight-x); line-height: 1.16; letter-spacing: var(--ls-tight); color: #fff; }
.stories__body { font-size: var(--fs-lg); line-height: var(--lh-loose); color: rgba(255,255,255,.94); }
.stories__lock { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--weight-bold); color: rgba(255,255,255,.92); }
.stories__lock .ico { width: 16px; height: 16px; stroke: #fff; }
.stories__foot { position: relative; z-index: 2; }
.stories__label { font-size: var(--fs-xs); font-weight: var(--weight-bold); color: rgba(255,255,255,.8); }
.btn--light { background: #fff; color: var(--c-ink); }
@keyframes stories-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stories-out { from { opacity: 1; } to { opacity: 0; } }

/* ---- Self-Development Corner cards ---- */
.corner-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-sm); min-height: 158px; border: 0; cursor: pointer; }
.hscroll .corner-card { width: 244px; flex: 0 0 auto; }
.corner-card__topic { font-size: var(--fs-2xs); letter-spacing: var(--ls-caps); text-transform: uppercase; font-weight: var(--weight-bold); color: var(--c-blush-ink); }
.corner-card__title { font-size: var(--fs-md); font-weight: var(--weight-bold); line-height: var(--lh-snug); color: var(--c-ink); }
.corner-card__sub { font-size: var(--fs-xs); color: var(--c-ink-soft); line-height: var(--lh-base); }
.corner-card__meta { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--weight-bold); color: var(--c-ink-muted); padding-top: var(--sp-3); }
.corner-card__meta .ico { width: 14px; height: 14px; stroke: var(--c-blush-ink); fill: none; }
.corner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
@media (max-width: 520px) { .corner-grid { grid-template-columns: 1fr; } }
.corner-card[data-topic="creator"]   { background: linear-gradient(160deg, var(--c-blush-wash), var(--c-surface)); }
.corner-card[data-topic="body"]      { background: linear-gradient(160deg, var(--c-sage-wash), var(--c-surface)); }
.corner-card[data-topic="nutrition"] { background: linear-gradient(160deg, var(--c-gold-wash), var(--c-surface)); }
.corner-card[data-topic="wellness"]  { background: linear-gradient(160deg, var(--c-teal-wash), var(--c-surface)); }
.corner-card[data-topic="mindset"]   { background: linear-gradient(160deg, var(--c-surface-2), var(--c-surface)); }

/* ---- Ritual "complete for today" card ---- */
.ritual-done { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--c-sage-wash), var(--c-surface)); }
.ritual-done__badge { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--grad-ring); color: var(--c-on-accent); box-shadow: 0 8px 20px rgba(168,181,138,.4); }
.ritual-done__badge .ico { width: 24px; height: 24px; stroke: var(--c-on-accent); }
.ritual-done__title { font-weight: var(--weight-bold); font-size: var(--fs-md); color: var(--c-ink); }
.ritual-done__sub { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-top: 2px; }

/* ---- Ritual streaks (Feature 1) ---- */
.streak-hero { text-align: center; padding: var(--sp-5) 0 var(--sp-4); }
.streak-hero__flame { font-size: 2.4rem; line-height: 1; }
.streak-hero__num { font-family: var(--font-head); font-size: 4.2rem; font-weight: var(--weight-x); color: var(--c-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.streak-hero__label { color: var(--c-ink-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); font-weight: var(--weight-bold); margin-top: 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.badge-tile { text-align: center; padding: var(--sp-4) var(--sp-2); border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-xs); }
.badge-tile.locked { opacity: .4; filter: grayscale(.5); }
.badge-tile__emoji { font-size: 2rem; line-height: 1; }
.badge-tile__label { font-size: var(--fs-2xs); font-weight: var(--weight-bold); color: var(--c-ink-soft); margin-top: 6px; line-height: 1.2; }

/* ---- Ritual challenges ---- */
.challenge-bar { height: 10px; border-radius: var(--r-pill); background: var(--c-blush-wash); overflow: hidden; }
.challenge-bar__fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--c-blush), var(--c-gold)); transition: width var(--t-base); }

/* ---- Society passport ---- */
.passport-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.stamp { text-align: center; padding: var(--sp-4) var(--sp-2); border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-sm); border: 1.5px dashed transparent; }
.stamp--locked { opacity: .5; box-shadow: none; border-color: var(--c-line-soft); background: transparent; }
.stamp__emoji { font-size: 2rem; line-height: 1; }
.stamp__title { font-size: var(--fs-sm); font-weight: var(--weight-bold); color: var(--c-ink-soft); margin-top: 6px; line-height: 1.2; }
.stamp__date { font-size: var(--fs-2xs); color: var(--c-ink-muted); margin-top: 2px; }

/* ---- Worn by the Society (product carousel) ---- */
.world-product { display: block; width: 150px; flex: none; text-decoration: none; color: inherit; }
.world-product__img { aspect-ratio: 3/4; border-radius: var(--r-lg); overflow: hidden; background: var(--c-blush-wash); }
.world-product__img img { width: 100%; height: 100%; object-fit: cover; }
.world-product__tag { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--c-blush); font-weight: var(--weight-bold); margin-top: 8px; }
.world-product__title { font-weight: var(--weight-semi); font-size: var(--fs-sm); }
.world-product__price { font-size: var(--fs-xs); color: var(--c-ink-muted); }

/* ---- Event ticket ---- */
.ticket { text-align: center; background: linear-gradient(180deg, var(--c-blush-wash), var(--c-surface)); border: 1.5px dashed var(--c-blush); margin: var(--sp-3) 0; }
.ticket__code { font-family: var(--font-head); font-weight: var(--weight-x); font-size: clamp(1.6rem, 8vw, 2.4rem); letter-spacing: 0.1em; line-height: 1.1; word-break: break-all; color: var(--c-ink); margin: 4px 0; }
.ticket__qr { background: #fff; border-radius: var(--r-md); padding: 10px; box-shadow: var(--sh-xs); }
.ticket__qr svg { display: block; width: 100%; height: auto; }

/* ---- Celebration moment (ritual complete, etc.) ---- */
.celebrate { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: var(--gutter); background: rgba(45,58,71,.34); backdrop-filter: blur(3px); animation: stories-in var(--t-base); overflow: hidden; }
.celebrate__card { position: relative; z-index: 2; text-align: center; max-width: 320px; background: var(--c-surface); border-radius: 28px; padding: var(--sp-6); box-shadow: 0 30px 80px rgba(45,58,71,.3); animation: celebrate-pop 360ms var(--ease-out); }
.celebrate__emblem { width: 76px; height: 76px; margin: 0 auto var(--sp-3); border-radius: 50%; display: grid; place-items: center; background: var(--grad-ring); color: var(--c-on-accent); box-shadow: 0 12px 30px rgba(180,106,114,.4); animation: celebrate-emblem 720ms var(--ease-out); }
.celebrate__emblem .ico { width: 38px; height: 38px; stroke: var(--c-on-accent); fill: none; }
.celebrate__title { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: var(--weight-x); letter-spacing: var(--ls-tight); color: var(--c-ink); line-height: 1.15; }
.celebrate__sub { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-top: var(--sp-2); line-height: var(--lh-base); }
.celebrate__points { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-4); background: var(--c-gold-wash); color: var(--c-gold-deep); font-weight: var(--weight-bold); font-size: var(--fs-sm); padding: 7px 14px; border-radius: var(--r-pill); }
.celebrate .petal { position: absolute; top: -28px; width: 11px; height: 11px; border-radius: 60% 40% 55% 45%; opacity: .85; animation: petal-fall ease-in 1 forwards; }
@keyframes petal-fall { 0% { transform: translateY(-10vh) rotate(0); opacity: 0; } 12% { opacity: .9; } 100% { transform: translateY(110vh) rotate(320deg); opacity: 0; } }
@keyframes celebrate-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes celebrate-emblem { 0% { transform: scale(.5); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---- Long-form reader (rendered markdown) ---- */
.rich { max-width: 66ch; line-height: var(--lh-loose); color: var(--c-ink-soft); font-size: var(--fs-md); }
.rich > *:last-child { margin-bottom: 0; }
.rich h2 { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: var(--weight-x); letter-spacing: var(--ls-tight); color: var(--c-ink); margin: var(--sp-6) 0 var(--sp-3); }
.rich > h2:first-child { margin-top: 0; }
.rich h3 { font-size: var(--fs-lg); font-weight: var(--weight-bold); color: var(--c-ink); margin: var(--sp-5) 0 var(--sp-2); }
.rich p { margin: 0 0 var(--sp-4); }
.rich ul, .rich ol { margin: 0 0 var(--sp-4); padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--sp-3); }
.rich li { line-height: var(--lh-loose); padding-left: .15em; }
.rich li::marker { color: var(--c-blush-ink); }
.rich strong { color: var(--c-ink); font-weight: var(--weight-bold); }
.rich em { font-style: italic; }
.rich a { color: var(--c-blush-ink); text-decoration: underline; }
.rich code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--c-surface-2); padding: 1px 6px; border-radius: 6px; }

/* ---- Inline "write a post" composer prompt ---- */
.composer-prompt { width: 100%; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--card-pad); margin-bottom: var(--sp-4); background: var(--c-surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-sm); cursor: pointer; text-align: left; }
.composer-prompt__text { flex: 1; color: var(--c-ink-muted); font-size: var(--fs-sm); }
.composer-prompt__cta { display: inline-flex; align-items: center; gap: 6px; background: var(--grad-btn); color: var(--c-on-accent); font-weight: var(--weight-bold); font-size: var(--fs-sm); padding: 8px 14px; border-radius: var(--r-pill); flex: 0 0 auto; }
.composer-prompt__cta .ico { width: 16px; height: 16px; stroke: var(--c-on-accent); }
.composer-prompt .avatar { width: 40px; height: 40px; flex: 0 0 auto; }

/* ---- Tappable post card (feed) — opens the post detail ---- */
.post-card { cursor: pointer; transition: box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.post-card:hover { box-shadow: var(--sh-md); }
.post-card:active { transform: scale(.995); }
.post-card .reaction, .post-card a, .post-card [role="button"], .post-card strong { cursor: pointer; }

/* ---- Direct messages ---- */
.dm-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.dm-row { width: 100%; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--card-pad); background: var(--c-surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-xs); cursor: pointer; text-align: left; }
.dm-row__body { flex: 1; min-width: 0; }
.dm-row__name { font-weight: var(--weight-semi); }
.dm-row__last { color: var(--c-ink-muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.dm-row__time { color: var(--c-ink-faint); font-size: var(--fs-2xs); }
.dm-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--grad-btn); color: var(--c-on-accent); font-size: var(--fs-2xs); font-weight: var(--weight-bold); display: inline-grid; place-items: center; }
.dm-thread { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) 0 var(--sp-5); }
.dm-bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: var(--fs-sm); line-height: var(--lh-base); white-space: pre-wrap; word-break: break-word; }
.dm-bubble--them { align-self: flex-start; background: var(--c-surface-2); color: var(--c-ink); border-bottom-left-radius: 6px; }
.dm-bubble--me { align-self: flex-end; background: var(--grad-btn); color: var(--c-on-accent); border-bottom-right-radius: 6px; }
.dm-day { align-self: center; color: var(--c-ink-faint); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: var(--ls-caps); margin: var(--sp-2) 0; }
.dm-composer { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: var(--z-nav); display: flex; gap: var(--sp-2); padding: var(--sp-3) 0; background: var(--c-bg); border-top: 1px solid var(--c-line); }
.dm-composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; }
@media (prefers-reduced-motion: reduce) { .voice-btn.is-recording .ico { animation: none; } }
