[hidden] { display: none !important; }

/* ====== TOKENS ====== */
:root {
  --bg: #14110E;
  --surface: #1C1815;
  --elevated: #241F1B;
  --ink: #EDE6D9;
  --ink-soft: #B8AC9C;
  --muted: #7A6F62;
  --border: rgba(237,230,217,0.10);
  --border-strong: rgba(237,230,217,0.22);
  --primary: #D97706;
  --primary-soft: rgba(217,119,6,0.12);
  --flame: #F97316;
  --alert: #EF4444;
  --radius-btn: 4px;
  --radius-sheet: 8px 8px 0 0;
  --header-h: 56px;
  --nav-h: 60px;
  --col: 600px;
  --font-serif: Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: 0.15s ease;
  color-scheme: dark;
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  letter-spacing: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  touch-action: manipulation;
}
input, textarea { outline: none; border-radius: 0; -webkit-appearance: none; appearance: none; }
textarea { resize: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: 1; }

/* ====== BASE ====== */
.icon { flex: none; vertical-align: middle; display: inline-block; fill: none; }
.icon--14 { width: 14px; height: 14px; }
.icon--18 { width: 18px; height: 18px; }
.icon--20 { width: 20px; height: 20px; }
.icon--24 { width: 24px; height: 24px; }
.icon--32 { width: 32px; height: 32px; }

.avatar, .avatar--sm, .avatar--lg { display: none !important; }

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
}

/* ====== TYPOGRAPHY ====== */
h1, h2, h3 { font-family: var(--font-sans); }
strong { font-weight: 600; }
.page-header__title, .me-screen__alias {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.comments__heading, .me-section-title, .activity-day-header, .section-header {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ====== LAYOUT ====== */
.app-shell { min-height: 100dvh; }
.view-root {
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px) 20px calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 32px);
}
.screen { display: block; animation: screen-in 0.2s ease; }
.screen__header { display: flex; align-items: center; min-height: 44px; margin: 0 0 8px -12px; }
.page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 24px;
}
.page-body { padding-bottom: 24px; }
.page-body h2 { font-size: 16px; font-weight: 600; margin: 32px 0 8px; }
.page-body p { font-family: var(--font-serif); font-size: 16px; line-height: 1.6; color: var(--ink-soft); }

/* ====== HEADER ====== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  max-width: var(--col);
  margin: 0 auto;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-bottom: 1px solid rgba(237,230,217,0.06);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__dot { display: none; }
.brand__name { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.app-header .btn--ghost {
  border: 0;
  background: none;
  padding: 0 4px;
  min-height: 44px;
  color: var(--primary);
}
.app-header .btn--ghost:hover { background: none; text-decoration: underline; }

/* ====== NAV ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  max-width: var(--col);
  margin: 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.bottom-nav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--nav-h);
  min-height: 44px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color var(--ease);
}
.bottom-nav__item:hover { text-decoration: none; }
.bottom-nav__item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 24px;
  height: 2px;
  margin-left: -12px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--ease);
}
.bottom-nav__item.is-active { color: var(--ink); }
.bottom-nav__item.is-active::before { opacity: 1; }
.bottom-nav__badge {
  position: absolute;
  top: 12px;
  left: 50%;
  margin-left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  font-size: 0;
  color: transparent;
  overflow: hidden;
}
.bottom-nav__compose {
  justify-self: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--bg);
  transition: transform var(--ease);
}
.bottom-nav__compose:active { transform: scale(0.94); }

/* ====== LANDING ====== */
body.on-landing .app-header,
body.on-landing .bottom-nav { display: none !important; }
body.on-landing .view-root { padding: 0; max-width: none; }
body.on-landing .landing { min-height: 100dvh; }

.landing {
  max-width: 500px;
  min-height: calc(100dvh - var(--header-h) - var(--nav-h));
  margin: 0 auto;
  padding: 40px 20px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing__hero { text-align: center; margin-bottom: 32px; }
.landing__logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.landing__logo svg { width: 100%; height: 100%; display: block; }
.landing__title { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.landing__tagline { font-family: var(--font-serif); font-size: 16px; font-style: italic; color: var(--ink-soft); }
.landing__body { margin-bottom: 32px; }
.landing__intro { font-size: 16px; line-height: 1.5; text-align: center; color: var(--ink); margin-bottom: 8px; }
.landing__intro-sub { font-size: 15px; line-height: 1.5; text-align: center; color: var(--muted); font-style: italic; margin-bottom: 32px; }
.landing__benefits {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.landing__benefit { display: block; }
.landing__benefit-icon { display: none; }
.landing__benefit strong {
  display: block;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}
.landing__benefit p { font-size: 15px; line-height: 1.55; color: var(--ink); }
.landing__note { text-align: center; font-size: 13px; color: var(--muted); font-style: italic; }
.landing__cta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.landing__cta .btn { width: 100%; }
.landing__footer { text-align: center; font-size: 12px; color: var(--muted); }
.landing__footer a { color: var(--primary); }

/* ====== FEED / POST CARD ====== */
.screen--feed { padding-top: 16px; }
.screen--feed .pin-banner { margin-bottom: 8px; }
.feed-list { display: flex; flex-direction: column; gap: 0; padding: 32px 0 16px; }
.feed-list > .post-card:first-child { padding-top: 0; }

.pin-banner { padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.pin-banner__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.pin-banner__text { font-family: var(--font-serif); font-size: 17px; font-style: italic; line-height: 1.5; color: var(--ink-soft); }

.post-card {
  position: relative;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 24px 0;
}
.post-card__header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.post-card__body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.001em;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.post-card__alias-row { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; }
.post-card__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.post-card__alias, .post-card__time, .post-card__category {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.85;
  background: none;
  padding: 0;
}
.post-card__alias { overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.post-card__dot { color: var(--muted); opacity: 0.5; font-size: 12px; }
.post-card__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.post-card__action,
.post-card__menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  transition: color var(--ease), background-color var(--ease), transform var(--ease);
}
.post-card__action::before,
.post-card__menu::before,
.photo-preview__remove::before,
.poll-editor__remove::before,
.ask-card__copy::before,
.message-item__action::before,
.activity-item__reply-btn::before,
.comment__reply::before,
.comment__more::before,
.chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: 44px;
  transform: translate(-50%, -50%);
}
.post-card__action:active, .post-card__menu:active { background: var(--elevated); color: var(--ink); }
.post-card__menu { padding: 0; width: 32px; }
.post-card__count { font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-card__count:empty, .post-card__count[data-count="0"] { display: none; }
.post-card__action .icon { fill: none; }
.post-card__action--heat.is-hot, .post-card__action.is-liked { color: var(--flame); }
.post-card__action--heat.is-hot .icon, .post-card__action.is-liked .icon { fill: var(--flame); }
.post-card__action--heat.is-hot .post-card__count, .post-card__action.is-liked .post-card__count { color: var(--flame); }
.post-card__action--heat.heat-bump .icon { animation: bump 0.2s ease; }
.post-card__action--whatsapp { color: var(--muted); }

.post-card__teaser {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.post-card__teaser__author { flex: none; }
.post-card__teaser__text { flex: 1; min-width: 0; font-family: var(--font-serif); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card__stats { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.post-card__reach { font-variant-numeric: tabular-nums; display: inline-block; }
.post-card__reach-icon { color: var(--muted); }

.post-card--short .post-card__body { font-size: 20px; font-weight: 400; line-height: 1.4; }
.post-card--long .post-card__body { font-size: 16px; line-height: 1.65; }
.post-card--quote { padding-left: 20px; border-left: 2px solid var(--primary); }
.post-card--quote .post-card__body { font-size: 19px; font-style: italic; }
.post-card--photo .post-card__body { font-size: 15px; color: var(--ink-soft); }
.post-card--mine { background: none; }
.post-card--mine .post-card__alias::after { content: none; }
.post-card--pinned { position: relative; }
.post-card--pinned::before {
  content: "Pinned";
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--primary);
}
.post-card--hot { border-bottom: 1px solid var(--border); }
.post-card__hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--flame);
}
.post-card--poll { }

/* polls */
.poll { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.poll-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.poll-option--vote { cursor: pointer; transition: border-color var(--ease), background-color var(--ease); }
.poll-option--vote:hover { border-color: var(--border-strong); }
.poll-option--vote:active { background: var(--elevated); }
.poll-option__radio { flex: none; width: 16px; height: 16px; margin-right: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.poll-option__label { position: relative; flex: 1; text-align: left; z-index: 1; font-family: var(--font-serif); font-size: 15px; }
.poll-option--result { position: relative; overflow: hidden; }
.poll-option__fill { position: absolute; inset: 0; width: 0%; background: var(--elevated); transition: width 0.4s ease; pointer-events: none; }
.poll-option__percent { position: relative; z-index: 1; min-width: 40px; text-align: right; font-size: 13px; font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.poll-option--result.is-mine { border-color: var(--primary); }
.poll-option--result.is-mine::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.poll__meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.poll--empty, .poll--fallback { padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 4px; color: var(--muted); font-style: italic; text-align: center; }

/* ====== POST MEDIA ====== */
.post-media {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-media:empty { display: none; }
.post-media--single { grid-template-columns: 1fr; }
.post-media--double { grid-template-columns: 1fr 1fr; }
.post-media__item { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 0; background: var(--elevated); cursor: pointer; overflow: hidden; }
.post-media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-media__watermark { position: absolute; bottom: 8px; right: 8px; font-size: 10px; color: var(--muted); opacity: 0.3; pointer-events: none; user-select: none; -webkit-user-select: none; }

.photo-picker { padding: 12px 0; }
.photo-picker__add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color var(--ease), color var(--ease);
}
.photo-picker__add:hover { border-color: var(--border-strong); color: var(--ink); }
.photo-picker__add:disabled { opacity: 0.4; pointer-events: none; }
.photo-picker__label { font-size: 14px; font-weight: 500; }
.photo-picker__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.photo-picker__previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-preview { position: relative; width: 80px; height: 80px; border-radius: 4px; border: 1px solid var(--border); overflow: hidden; }
.photo-preview__img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview__remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.photo-preview__remove .icon { width: 14px; height: 14px; }

#photo-lightbox-root, .photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.94);
  display: grid;
  place-items: center;
  animation: fade-in 0.15s ease;
}
.photo-lightbox__img { max-width: 100vw; max-height: 92dvh; object-fit: contain; user-select: none; -webkit-user-select: none; }
.photo-lightbox__watermark { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: 20px; font-size: 12px; color: rgba(245,240,232,0.55); pointer-events: none; user-select: none; }
.photo-lightbox__close, .photo-lightbox__nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: rgba(245,240,232,0.12);
  color: var(--bg);
  z-index: 2;
}
.photo-lightbox__close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.photo-lightbox__nav { top: 50%; transform: translateY(-50%); }
.photo-lightbox__nav--prev { left: 12px; }
.photo-lightbox__nav--prev .icon { transform: rotate(180deg); }
.photo-lightbox__nav--next { right: 12px; }

/* ====== COMMENTS ====== */
.screen--post [data-role="post"] .post-card { border-bottom: 0; padding-top: 8px; }
.screen--post [data-role="post"] .post-card__body { font-size: 19px; line-height: 1.6; cursor: auto; }
.comments { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments__heading { margin-bottom: 20px; }
.comment { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment__body {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment__header { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-sans); font-size: 12px; color: var(--muted); }
.comment__alias { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.comment__dot { color: var(--muted); opacity: 0.5; font-size: 12px; }
.comment__time { font-size: 12px; color: var(--muted); }
.comment__reply {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: none;
  border: 0;
}
.comment__reply:hover { text-decoration: underline; }
.comment__more { position: relative; margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.comment__replies { margin-top: 12px; padding-left: 20px; border-left: 1px solid var(--border); background: none; }
.comment__replies .comment { padding: 12px 0 0; border-bottom: 0; }
.comment.is-deleted .comment__body { font-style: italic; color: var(--muted); opacity: 0.6; }
.comment.is-deleted .comment__alias { font-size: 0; }
.comment.is-deleted .comment__alias::before { content: "\2014"; font-size: 12px; }
.comments__empty { padding: 32px 0; text-align: center; color: var(--muted); font-size: 14px; }
.comments__guest-wall { padding: 32px 0; text-align: center; }
.comments__guest-wall p { font-size: 15px; color: var(--ink-soft); margin-bottom: 16px; }

/* ====== REPLY BAR ====== */
.reply-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.reply-bar__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: border-color var(--ease);
}
.reply-bar__input:focus { border-bottom-color: var(--primary); }
.reply-bar__send { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: none; color: var(--primary); padding: 0; min-height: 44px; border: 0; }
.reply-bar__send .icon { transform: rotate(180deg); }
.reply-bar__guest { padding: 12px 0; border-top: 1px solid var(--border); text-align: center; }

/* ====== COMPOSE ====== */
.compose {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  overflow-y: auto;
  animation: compose-in 0.2s ease;
}
.compose > * { width: 100%; max-width: var(--col); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.compose__header { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.compose__tabs { display: flex; gap: 20px; padding-bottom: 0; border-bottom: 1px solid var(--border); }
.compose__tab { min-height: 44px; padding: 0; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; transition: color var(--ease); }
.compose__tab.is-active { color: var(--ink); font-weight: 500; border-bottom-color: var(--primary); }
.compose__body { display: flex; flex-direction: column; flex: 1; padding-left: 0; padding-right: 0; }
.compose__textarea {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 24px 20px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  background: transparent;
  border: 0;
}
.compose__textarea--question { flex: none; min-height: 88px; }
.compose__counter { padding: 0 20px; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.compose__chips { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.compose__chips::-webkit-scrollbar { display: none; }
.compose__shareable { padding-top: 0; padding-bottom: 0; }
.compose__footnote { padding-top: 8px; padding-bottom: 16px; font-size: 12px; color: var(--muted); }
.poll-editor { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px; }
.poll-editor__row { display: flex; align-items: center; gap: 8px; }
.poll-editor__input { flex: 1; min-width: 0; min-height: 44px; padding: 12px 14px; font-size: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; transition: border-color var(--ease); }
.poll-editor__input:focus { border-color: var(--primary); }
.poll-editor__remove { position: relative; flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border-radius: 4px; }
.poll-editor__remove:disabled { opacity: 0.3; pointer-events: none; }
.poll-editor__add { margin: 0 20px 12px; align-self: flex-start; }

/* ====== SHEETS ====== */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.2s;
}
.sheet-wrap.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; transition: opacity 0.2s ease; }
.sheet-wrap.is-open .scrim { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  transform: translateY(100%);
  transition: transform 0.2s ease;
}
.sheet-wrap.is-open .sheet, .sheet.is-open { transform: translateY(0); }
.sheet__handle { width: 32px; height: 3px; margin: 10px auto 8px; background: var(--border-strong); }
.sheet__header { padding: 8px 20px 0; }
.sheet__title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.sheet__subtitle { font-size: 14px; color: var(--muted); margin-top: 4px; }
.sheet__body { padding: 20px; }
.sheet__body--menu { display: flex; flex-direction: column; padding: 8px 8px 12px; }
.sheet__footnote { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
.sheet__menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px; font-size: 15px; border-radius: 4px; transition: background-color var(--ease); }
.sheet__menu-item:hover, .sheet__menu-item:active { background: var(--elevated); }
.sheet__menu-item--danger { color: var(--alert); }

.recap-list { display: flex; flex-direction: column; margin-bottom: 20px; }
.recap-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.recap-item__icon { flex: none; width: 24px; display: grid; place-items: center; color: var(--muted); }
.recap-item__icon--replies, .recap-item__icon--upvotes, .recap-item__icon--posts { background: none; color: var(--muted); }
.recap-item__body { display: flex; align-items: baseline; gap: 8px; }
.recap-item__count { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.recap-item__label { font-size: 14px; color: var(--muted); }

.story-preview { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; margin-bottom: 16px; padding: 32px 24px; text-align: center; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.story-preview__label { margin-bottom: 16px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.story-preview__text { margin-bottom: 20px; font-family: var(--font-serif); font-size: 17px; font-style: italic; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.story-preview__watermark { font-size: 12px; color: var(--muted); opacity: 0.7; }
.reply-compose__quote { margin-bottom: 16px; padding: 4px 0 4px 14px; border-left: 2px solid var(--border-strong); font-family: var(--font-serif); font-size: 15px; font-style: italic; line-height: 1.5; color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-compose__textarea { width: 100%; min-height: 100px; margin-bottom: 12px; padding: 12px 14px; font-family: var(--font-serif); font-size: 16px; line-height: 1.5; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; resize: vertical; }
.reply-compose__textarea:focus { border-color: var(--primary); }

/* ====== ACTIVITY ====== */
.activity-tabs { display: flex; gap: 20px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.activity-tab { min-height: 44px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; transition: color var(--ease); }
.activity-tab.is-active { color: var(--ink); font-weight: 500; border-bottom-color: var(--primary); }
.screen--activity .activity-list { margin: 0; }
.activity-item { position: relative; display: flex; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.activity-item__icon { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.activity-item__body { flex: 1; min-width: 0; padding-right: 12px; }
.activity-item__title { font-size: 14px; color: var(--ink); }
.activity-item__excerpt { margin-top: 4px; font-family: var(--font-serif); font-size: 15px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.activity-item__time { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.activity-item__reply-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px 0; font-size: 12px; color: var(--muted); }
.activity-item__reply-btn:hover { text-decoration: underline; }
.activity-item__reply-btn .icon { transform: rotate(180deg); }
.activity-day-header { list-style: none; padding: 24px 0 8px; }
.activity-reply-box { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.activity-reply-box__input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 0; font-size: 16px; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.activity-reply-box__input:focus { border-bottom-color: var(--primary); }
.activity-reply-box__send { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--primary); }
.activity-mark-read { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 5; margin-top: 12px; }
.activity-empty { padding: 32px 0; text-align: center; color: var(--muted); }
.is-unread::after { content: ""; position: absolute; top: 26px; right: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* ====== ME ====== */
.me-screen__identity { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 0 8px; }
.me-screen__since { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.me-section-title { display: flex; align-items: center; gap: 6px; margin: 32px 0 12px; }
.me-section-title .icon { display: none; }
.me-weekly__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.me-weekly__stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 68px; padding: 14px 8px; }
.me-weekly__stat + .me-weekly__stat { border-left: 1px solid var(--border); }
.me-weekly__stat strong { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.me-weekly__stat span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.me-best-post__card { display: block; width: 100%; padding: 4px 0 4px 16px; text-align: left; border-left: 2px solid var(--border-strong); cursor: pointer; }
.me-best-post__quote { font-family: var(--font-serif); font-size: 17px; font-style: italic; line-height: 1.5; margin-bottom: 10px; }
.me-best-post__meta { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.me-best-post__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.me-campus-goal__card { padding: 0; }
.me-campus-goal__text { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.me-campus-goal__sep { color: var(--muted); font-weight: 400; }
.me-campus-goal__label { font-size: 13px; font-weight: 400; color: var(--muted); }
.me-campus-goal__bar { height: 3px; background: var(--elevated); overflow: hidden; }
.me-campus-goal__fill { height: 100%; background: var(--ink); transition: width 0.4s ease; }
.me-campus-goal__share { margin-top: 14px; }
.me-milestones__list { display: flex; flex-direction: column; }
.milestone { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.milestone__dot { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); color: transparent; }
.milestone__label { flex: 1; color: var(--muted); }
.milestone__progress { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.milestone.is-achieved .milestone__dot { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.milestone.is-achieved .milestone__label { color: var(--ink); }
.me-post-row { padding: 20px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.me-post-row:last-child { border-bottom: 0; }
.me-post-row:active { opacity: 0.7; }
.me-post-row__content { font-family: var(--font-serif); font-size: 16px; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.me-post-row__meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.me-post-row__reach-label, .me-post-row__reach { opacity: 0.8; }
.me-posts-list { list-style: none; }
.me-posts-empty { padding: 24px 0; text-align: center; font-size: 14px; color: var(--muted); }
.me-settings { margin-top: 32px; }
.me-settings__summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 0; list-style: none; cursor: pointer; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.me-settings__summary::-webkit-details-marker { display: none; }
.me-settings__summary span { flex: 1; }
.me-settings__chevron { color: var(--muted); transition: transform 0.15s ease; }
.me-settings[open] .me-settings__chevron { transform: rotate(180deg); }
.me-screen__list li { border-bottom: 1px solid var(--border); }
.me-screen__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 12px 0; font-size: 15px; color: var(--ink); text-align: left; }
.me-screen__item:hover { text-decoration: none; color: var(--primary); }
.me-screen__item .icon, .me-screen__item [data-role="notif-state"] { color: var(--muted); }
.me-screen__item--danger, .me-screen__item--danger .icon { color: var(--alert); }
.me-screen__item--danger:hover { color: var(--alert); }
.me-screen__version { margin-top: 32px; text-align: center; font-size: 12px; color: var(--muted); }

.ask-card { margin-bottom: 32px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ask-card__heading { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ask-card__body { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 12px; }
.ask-card__link { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; }
.ask-card__url { flex: 1; min-width: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-card__copy { position: relative; flex: none; min-width: 36px; min-height: 36px; color: var(--muted); }
.ask-card__share { width: 100%; }

.screen--ask { padding-bottom: 32px; }
.ask-page__header { text-align: center; padding: 12px 0 32px; }
.ask-page__title { padding: 0 8px; margin-bottom: 8px; font-family: var(--font-serif); font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; }
.ask-page__subtitle { font-size: 14px; color: var(--muted); }
.ask-page__form { margin-bottom: 32px; }
.ask-page__textarea { width: 100%; min-height: 160px; padding: 14px; font-family: var(--font-serif); font-size: 17px; line-height: 1.5; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; resize: vertical; }
.ask-page__textarea:focus { border-color: var(--primary); }
.ask-page__counter { margin: 8px 0 16px; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.ask-page__min { color: var(--muted); opacity: 0.7; }
.ask-page__send { width: 100%; }
.ask-page__send:disabled { opacity: 0.4; pointer-events: none; }
.ask-page__remaining { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.ask-page__success { margin-bottom: 32px; padding: 32px 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); animation: rise 0.2s ease; }
.ask-page__success .icon { width: 32px; height: 32px; margin-bottom: 12px; color: var(--ink); }
.ask-page__success h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.ask-page__success p { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.ask-page__footer { margin-top: 32px; padding: 16px 0; text-align: center; border-top: 1px solid var(--border); }
.ask-page__footer p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.messages-screen__unread { display: inline-block; margin-left: 8px; padding: 1px 6px; font-size: 11px; font-weight: 500; color: var(--primary); background: var(--primary-soft); border-radius: 4px; }
.messages-screen__list { display: flex; flex-direction: column; }
.message-item { display: flex; flex-direction: column; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.message-item__content { font-family: var(--font-serif); font-size: 17px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-item__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.message-item__unread-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.message-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.message-item__action { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; transition: color var(--ease), border-color var(--ease); }
.message-item__action:hover { color: var(--ink); border-color: var(--border-strong); }
.message-item__action:active { background: var(--elevated); }
.message-item__action--icon { margin-left: auto; min-width: 32px; padding: 4px; justify-content: center; }
.message-item__action[data-action="reply-public"] .icon { transform: rotate(180deg); }

/* ====== DISCOVER ====== */
.screen--discover .feed-list { padding-top: 8px; }
.screen--discover .compose__chips { margin: 0 -20px; padding: 0 20px 12px; }

/* ====== BUTTONS / INPUTS / CHIPS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  transition: border-color var(--ease), background-color var(--ease), opacity var(--ease), transform var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--primary); color: #14110E; }
.btn--primary:disabled { opacity: 0.4; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn--icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.btn--danger { background: var(--alert); color: #fff; }

.field { position: relative; margin-bottom: 20px; }
.field__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.field__input, .compose__textarea--question {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color var(--ease);
}
.field__input:focus { border-color: var(--primary); }
.field__group { position: relative; }
.field__group .field__input { padding-right: 48px; }
.field__toggle { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }

.checkbox { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 4px 0; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.checkbox input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); -webkit-appearance: auto; appearance: auto; }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}
.chip--active, .chip.is-active { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }

.is-active { color: inherit; }
.bottom-nav__item.is-active { color: var(--ink); }
.compose__tab.is-active, .activity-tab.is-active { color: var(--ink); }
.chip--active, .chip.is-active { color: var(--primary); }

/* ====== EMPTY STATES ====== */
.empty-state { padding: 64px 24px; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 16px; color: var(--muted); }
.empty-state__title { font-family: var(--font-serif); font-size: 19px; font-weight: 400; margin-bottom: 4px; }
.empty-state__text { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.soft-wall { margin: 24px 0; padding: 32px 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.soft-wall__title { font-family: var(--font-serif); font-size: 20px; font-weight: 400; margin-bottom: 4px; }
.soft-wall__text { color: var(--muted); margin-bottom: 20px; }
.skeleton { position: relative; display: block; background: var(--elevated); animation: pulse 1.4s ease-in-out infinite; }
.skeleton--avatar { display: none; }
.skeleton--line { height: 12px; border-radius: 4px; }
.skeleton-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.skeleton-card__header { display: flex; align-items: center; gap: 12px; }
.skeleton-card__meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.spice-card { margin: 8px 0 16px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.spice-card__badge { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.spice-card__text { margin-bottom: 14px; font-family: var(--font-serif); font-size: 17px; font-style: italic; line-height: 1.45; }
.spice-card__cta { color: var(--primary); }
.new-posts-bar { display: block; width: 100%; min-height: 44px; margin: 0 0 8px; font-size: 13px; color: var(--primary); text-align: center; }
.new-posts-bar:hover { text-decoration: underline; }

/* ====== TOAST / COOKIE ====== */
.toast {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  font-size: 13px;
  color: #EDE6D9;
  background: #241F1B;
  border: 1px solid var(--border);
  border-radius: 6px;
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cookie-banner button { min-height: 44px; padding: 0 8px; font-size: 13px; font-weight: 500; color: var(--primary); background: none; border: 0; }

/* ====== KEYFRAMES ====== */
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes compose-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes bump { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ====== MEDIA QUERIES ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====== UTILITIES ====== */
.post-card--landed { animation: fade-in 0.4s ease; }
.post-card__reach--quiet { opacity: 0.5; font-size: 11px; }
.post-card__reach--warm { color: var(--ink-soft); opacity: 1; }
.post-card__reach--hot { color: var(--ink); font-weight: 500; }
.post-card__reach--bump, .count-bump { animation: bump 0.2s ease; }
.is-mine { border-color: var(--primary); }
.tap-haptic:active { transform: scale(0.97); }