/* HOOPERS Sosyal — cream, ink and HOOPERS red. */
:root {
  --red: #d91414; --red-deep: #b40e0e; --red-soft: #fde9e7;
  --cream: #fbf9f5; --beige: #f4efe6; --card: #fff; --ink: #1a1a1a; --muted: #7a746c; --line: #ebe4d8; --line-strong: #ddd3c2;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font-display: "Modak", cursive; --font-head: "Space Grotesk", sans-serif; --font-body: "Plus Jakarta Sans", sans-serif;
  --radius: 22px; --shadow: 0 1px 2px rgba(26, 20, 12, .04), 0 8px 28px rgba(26, 20, 12, .06);
  --side: 264px; --main: 640px; --rail: 320px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
/* The scrollbar's space stays reserved, so opening a dialog does not shift the page sideways. */
html { scrollbar-gutter: stable; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Icons, buttons, fields ---------- */
.icon { flex: none; }
.icon path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill path { fill: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 999px; background: var(--beige); font: 700 14px/1 var(--font-head); letter-spacing: .01em; white-space: nowrap; transition: transform .3s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(217, 20, 20, .22); }
.btn.primary:hover { background: var(--red-deep); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--beige); }
.btn.danger { background: var(--ink); color: #fff; }
.btn.danger:hover { background: var(--red-deep); }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.danger-text { color: var(--red) !important; }

.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); transition: background-color .2s, color .2s; }
.icon-button:hover { background: var(--beige); }
.icon-button.tinted { color: var(--red); }
.icon-button.tinted:hover { background: var(--red-soft); }
.icon-button.bordered { border: 1.5px solid var(--line-strong); width: 44px; height: 44px; }
.link-button { border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.link-button:hover { color: var(--ink); }
.link-button.strong { color: var(--red); font-weight: 700; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); outline: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: var(--ink) !important; box-shadow: 0 0 0 4px rgba(26, 26, 26, .06); }
textarea { resize: vertical; min-height: 44px; }
.field { display: grid; gap: 6px; }
.field > span { font: 700 13px var(--font-head); }
.field small, .hint { color: var(--muted); font-size: 12.5px; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red-deep); font-size: 13.5px; font-weight: 600; }
.stack { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); font-size: 13px; font-weight: 600; }
.chip.red { background: var(--red-soft); border-color: transparent; color: var(--red-deep); }
.chip.link:hover { border-color: var(--ink); }
.chip.toggle { cursor: pointer; }
.chip.toggle.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .08); }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.badge-soft { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--beige); color: var(--muted); font-size: 11.5px; font-weight: 700; vertical-align: 2px; }

.avatar { position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--beige); color: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; line-height: 1; }

.loader { width: 28px; height: 28px; margin: 32px auto; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.loader.small { width: 20px; height: 20px; margin: 12px auto; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { min-height: 40px; }
.empty-line { margin: 8px 0; color: var(--muted); font-size: 14px; }
.empty-line.wide { grid-column: 1 / -1; text-align: center; padding: 32px 0; }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--cream); }
.boot-ring { width: 58px; height: 58px; border: 7px solid var(--red); border-radius: 50%; animation: breathe 1.2s var(--ease) infinite alternate; }
.boot-word { font: 34px/1 var(--font-display); color: var(--ink); letter-spacing: .02em; }
@keyframes breathe { from { transform: scale(.86); } to { transform: scale(1.06); } }

/* ---------- Welcome ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1240px; margin: 0 auto; padding: 48px clamp(16px, 5vw, 64px); overflow-x: clip; }
.welcome-hero { position: relative; }
.welcome-logo img { height: 44px; width: auto; }
.welcome h1 { margin: 36px 0 20px; font: clamp(58px, 9vw, 120px)/.86 var(--font-display); letter-spacing: -.01em; }
.welcome h1 span { color: var(--red); }
.welcome-lead { max-width: 520px; margin: 0 0 28px; color: #4c463f; font-size: 17px; }
.welcome-points { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.welcome-points li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.welcome-points span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--cream); font: 700 12px var(--font-head); }
.welcome-proof { display: inline-flex; align-items: center; gap: 6px; margin: 26px 0 0; padding: 10px 18px; border-radius: 999px; background: var(--red-soft); color: var(--red-deep); font: 600 14px var(--font-head); }
.welcome-proof strong { font-weight: 700; }
.welcome-orbit { position: absolute; right: -40px; top: -20px; width: 220px; height: 220px; pointer-events: none; z-index: -1; }
.welcome-orbit span { position: absolute; inset: 0; border: 2px solid var(--red); border-radius: 50%; opacity: .18; animation: orbit 9s linear infinite; }
.welcome-orbit span:nth-child(2) { inset: 34px; opacity: .3; animation-duration: 6s; animation-direction: reverse; border-style: dashed; }
.welcome-orbit span:nth-child(3) { inset: 78px; background: var(--red); opacity: .9; border: 0; animation: breathe 2.4s var(--ease) infinite alternate; }
@keyframes orbit { to { transform: rotate(360deg); } }
.welcome-card { padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 30px 80px rgba(26, 20, 12, .1); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 999px; background: var(--beige); }
.auth-tabs button { min-height: 42px; border: 0; border-radius: 999px; background: transparent; font: 700 14px var(--font-head); color: var(--muted); transition: background-color .25s, color .25s; }
.auth-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font: 700 13px var(--font-head); }
.auth-form label small { font: 500 12px var(--font-body); color: var(--muted); }
.auth-form label.check { display: flex; align-items: flex-start; gap: 10px; font: 500 13px var(--font-body); }
.auth-form label.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.auth-form label.check a { color: var(--red); text-decoration: underline; }
.input-prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.input-prefix:focus-within { border-color: var(--ink); }
.input-prefix > span { padding-left: 14px; color: var(--muted); font-weight: 700; }
.input-prefix input { border: 0 !important; box-shadow: none !important; padding-left: 4px !important; }
.auth-hint { margin: 0; text-align: center; color: var(--muted); font: 500 13px var(--font-body); }
.auth-hint a { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, var(--main)) var(--rail); grid-template-areas: "side main rail"; justify-content: center; gap: 0 32px; min-height: 100vh; padding-right: 16px; }
.sidebar { grid-area: side; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 8px; padding: 22px 12px 18px; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px 18px; }
.brand img { height: 26px; width: auto; }
.brand span { font: 26px/1 var(--font-display); color: var(--red); letter-spacing: .02em; }
.side-nav { display: grid; gap: 2px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border: 0; border-radius: 16px; background: none; font: 600 15.5px var(--font-head); color: #3a3530; transition: background-color .2s, color .2s; }
.nav-link:hover { background: var(--beige); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-link[aria-current="page"] .icon path { stroke-width: 2.4; }
.side-nav .nav-link[aria-current="page"] { background: var(--card); box-shadow: var(--shadow); }
.side-nav .nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.nav-icon { position: relative; display: inline-grid; place-items: center; }
.count { position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid var(--cream); border-radius: 999px; background: var(--red); color: #fff; font: 800 10px/14px var(--font-body); font-style: normal; text-align: center; }
.side-compose { margin: 14px 0 0; min-height: 50px; font-size: 15px; }
.side-me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px; border-radius: 18px; transition: background-color .2s; }
.side-me:hover { background: var(--beige); }
.side-me > span:nth-child(2) { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.side-me strong, .side-me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me small { color: var(--muted); }
.topbar, .tabbar { display: none; }
.view { grid-area: main; min-width: 0; padding: 28px 0 80px; outline: 0; }
.rail { grid-area: rail; position: sticky; top: 0; align-self: start; display: grid; gap: 16px; max-height: 100vh; overflow-y: auto; padding: 28px 0; scrollbar-width: none; }
body[data-route="messages"] .rail { display: none; }
body[data-route="messages"] .app { grid-template-columns: var(--side) minmax(0, calc(var(--main) + var(--rail) + 32px)); grid-template-areas: "side main"; }
body[data-route="messages"] .view { padding-bottom: 24px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font: 700 30px/1.1 var(--font-head); letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.section-title { margin: 28px 0 14px; font: 700 18px var(--font-head); letter-spacing: -.01em; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--ink); }

/* Rail */
.rail-me { position: relative; display: grid; justify-items: center; padding: 22px 18px 18px; overflow: hidden; text-align: center; }
.rail-me strong { margin-top: 8px; font: 700 16px var(--font-head); }
.rail-me small { color: var(--muted); font-size: 13px; }
.rail-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.rail-stats b { margin-right: 4px; color: var(--ink); font-family: var(--font-head); }
.rail-box { padding: 18px; }
.rail-box h3 { margin: 0 0 8px; font: 700 15px var(--font-head); }
.rail-event { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rail-event > span:last-child { display: grid; min-width: 0; line-height: 1.3; }
.rail-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rail-event small { color: var(--muted); }
.mini-date { display: grid; place-items: center; width: 46px; height: 50px; flex: none; border-radius: 14px; background: var(--red-soft); color: var(--red-deep); font: 700 10px/1 var(--font-head); }
.mini-date b { font-size: 19px; }
.rail-foot { margin: 0; padding: 0 6px; color: var(--muted); font-size: 12px; }
.rail-foot a:hover { color: var(--ink); }

/* People */
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.person-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.person-text { display: grid; min-width: 0; line-height: 1.3; }
.person-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.person-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.people-list { display: grid; }
.user-name { display: inline-flex; gap: 6px; align-items: baseline; }
.user-name .handle { color: var(--muted); font-size: 13px; }

/* ---------- Feed ---------- */
.stories { display: flex; gap: 14px; margin-bottom: 16px; padding: 16px; overflow-x: auto; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { position: relative; display: grid; justify-items: center; gap: 6px; width: 72px; flex: none; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 600; }
.story-bubble > span:last-child { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring { display: grid; place-items: center; padding: 3px; border: 0; border-radius: 50%; background: conic-gradient(from 210deg, var(--red), #ff7a3d, #ffb13d, var(--red)); }
.ring .avatar { border: 3px solid var(--card); }
.ring.seen { background: var(--line-strong); }
.ring.none { background: transparent; }
.story-add { position: absolute; top: 48px; left: 48px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 3px solid var(--card); border-radius: 50%; background: var(--red); color: #fff; }
.story-add .icon path { stroke-width: 3; }
.stories-hint { align-self: center; max-width: 240px; margin: 0; color: var(--muted); font-size: 13px; }

.prompt { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 14px; }
.prompt-input { flex: 1; min-width: 0; min-height: 46px; padding: 0 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-radius: 999px; background: var(--cream); color: var(--muted); text-align: left; transition: background-color .2s; }
.prompt-input:hover { background: var(--beige); }
.post-list { display: grid; gap: 16px; }

.post { overflow: hidden; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 10px 10px 16px; }
.post-author { display: flex; align-items: center; gap: 11px; min-width: 0; }
.post-author > span { display: grid; line-height: 1.3; min-width: 0; }
.post-author strong { font-size: 15px; }
.post-author small { color: var(--muted); font-size: 12.5px; }
.post-text { margin: 0; padding: 0 18px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.post-text a, .bio a, .bubble a, .comment-body p a:not(.comment-author) { color: var(--red); font-weight: 600; }
.post-text a:hover, .bio a:hover { text-decoration: underline; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.more-text { margin: -6px 18px 12px; }
.post-media { position: relative; background: var(--beige); max-height: 720px; user-select: none; }
.media-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.media-track::-webkit-scrollbar { display: none; }
.media-slide { flex: 0 0 100%; scroll-snap-align: center; }
.media-slide img { width: 100%; height: 100%; object-fit: cover; }
.media-dots { position: absolute; left: 50%; bottom: 12px; display: flex; gap: 5px; transform: translateX(-50%); }
.media-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background-color .2s, transform .2s; }
.media-dots span.on { background: #fff; transform: scale(1.25); }
.media-count { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; }
.media-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); opacity: 0; transition: opacity .2s; }
.media-nav.prev { left: 10px; }
.media-nav.next { right: 10px; }
.media-nav.next .icon { transform: rotate(180deg); }
.post-media:hover .media-nav { opacity: 1; }
@media (pointer: coarse) { .media-nav { display: none; } }
.heart-burst { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .3)); animation: burst .9s var(--ease) forwards; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
.post-actions { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px; }
.action-group { display: inline-flex; align-items: center; gap: 2px; margin-right: 8px; font: 700 14px var(--font-head); }
.action { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); transition: background-color .2s, color .2s; }
.action:hover { background: var(--beige); }
.action.like.on { color: var(--red); }
.action.like.pop .icon { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.action.share { margin-left: auto; }
.comments { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.comment-list { display: grid; gap: 12px; padding: 12px 0; max-height: 420px; overflow-y: auto; }
.comment { display: flex; gap: 10px; }
.comment-body { min-width: 0; }
.comment-body p { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.comment-author { font-weight: 700; }
.comment-body small { display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.comment-body .link-button { font-size: 12px; }
.comment-form { display: flex; align-items: center; gap: 10px; }
.comment-form input { border-radius: 999px !important; padding: 10px 16px !important; background: var(--cream) !important; }

.empty { display: grid; justify-items: center; padding: 44px 28px; text-align: center; }
.empty h3 { margin: 18px 0 6px; font: 700 20px var(--font-head); }
.empty p { max-width: 380px; margin: 0; color: var(--muted); }
.empty-ring { width: 64px; height: 64px; border: 9px solid var(--red); border-radius: 50%; box-shadow: 18px 10px 0 -14px var(--ink); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.suggest { margin-top: 16px; padding: 18px 20px; }
.post-list > .suggest, .post-list > .invite { margin-top: 0; }
.view > .invite { margin-bottom: 14px; }
.suggest h3 { margin: 0 0 6px; font: 700 16px var(--font-head); }

/* ---------- Explore & grids ---------- */
.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--muted); }
.search:focus-within { border-color: var(--ink); color: var(--ink); }
.search input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 13px 0 !important; }
.search-results { margin-top: 10px; padding: 8px 18px; }
.people-strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.person-card { display: grid; justify-items: center; gap: 10px; width: 168px; flex: none; padding: 20px 14px 16px; text-align: center; }
.person-card a { display: grid; justify-items: center; gap: 4px; min-width: 0; width: 100%; }
.person-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.person-card span:not(.avatar):not(.avatar-initials) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--beige); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
@media (hover: hover) { .tile:hover img { transform: scale(1.04); } .tile:hover .tile-meta { opacity: 1; } }
.tile-text { position: absolute; inset: 0; display: flex; align-items: center; padding: 14px; background: linear-gradient(140deg, var(--ink), #3b2a24); color: var(--cream); font: 600 13px/1.4 var(--font-head); overflow: hidden; text-align: left; }
.tile-multi { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); }
.tile-meta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(26, 26, 26, .45); color: #fff; font-weight: 800; opacity: 0; transition: opacity .2s; }
.tile-meta .icon:last-of-type { margin-left: 12px; }
.tile:focus-visible .tile-meta { opacity: 1; }

/* ---------- Profile ---------- */
.profile { overflow: hidden; margin-bottom: 16px; }
.profile-main { padding: 24px 24px 22px; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.profile-avatar { box-shadow: 0 6px 20px rgba(0, 0, 0, .1); }
/* Your own photo is a button: tap it to change it. */
.avatar-change { position: relative; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.avatar-change:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.avatar-badge { position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 32px; height: 32px; border: 3px solid var(--card); border-radius: 50%; background: var(--red); color: #fff; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-bottom: 6px; }
.profile h1 { margin: 0; font: 700 26px/1.15 var(--font-head); letter-spacing: -.02em; }
.profile .handle { margin: 2px 0 0; color: var(--muted); }
.profile .headline { margin: 10px 0 0; font-weight: 600; font-size: 15.5px; }
.profile .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile .bio { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile .chips { margin-top: 14px; }
.stats { display: flex; gap: 26px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.stats > * { display: inline-flex; align-items: baseline; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; }
.stats strong { color: var(--ink); font: 700 18px var(--font-head); }
.stats button:hover strong { color: var(--red); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; padding: 4px; border-radius: 999px; background: var(--beige); }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: none; font: 700 14px var(--font-head); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.about { display: grid; gap: 4px; padding: 10px 22px; }
.about-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.about-item:last-child { border-bottom: 0; }
.about-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; background: var(--red-soft); color: var(--red); }
.about-item h3 { margin: 0 0 6px; font: 700 14px var(--font-head); color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.about-item p { margin: 0; }

/* Edit profile */
.edit { overflow: hidden; }
.edit-media { display: flex; align-items: center; gap: 18px; padding: 22px; }
.edit-media-text { display: grid; gap: 4px; min-width: 0; }
.edit-media-text small { color: var(--muted); font-size: 13px; }
.edit-media-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }

/* Profile photo crop */
/* Never taller than the screen leaves room for, so Kaydet stays in view on small phones. */
.crop-stage { position: relative; width: min(100%, calc(100dvh - 360px)); min-width: 200px; margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: #1a1612; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-stage:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.crop-canvas { display: block; width: 100%; height: 100%; }
/* Darkens what will be cut away; the circle is exactly the kept area. */
.crop-ring { position: absolute; inset: 0; border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 0 0 100vmax rgba(26, 22, 18, .55); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; color: var(--muted); }
.crop-zoom input { flex: 1; min-width: 0; height: 32px; accent-color: var(--red); }
.crop-preview { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; }
.crop-mini { flex: none; border-radius: 50%; background: var(--beige); }
.crop-preview small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.modal-panel.crop .modal-body { padding-top: 16px; }
.edit fieldset { display: grid; gap: 14px; margin: 0; padding: 22px; border: 0; border-top: 1px solid var(--line); }
.edit fieldset:first-of-type { border-top: 0; }
.edit legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; font: 700 17px var(--font-head); }
.chips.editable:empty { display: none; }
.edit .form-error { margin: 0 22px; }
.edit-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 22px; border-top: 1px solid var(--line); }

/* ---------- Messenger ---------- */
.view.wide { padding-top: 24px; }
.messenger { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; height: calc(100vh - 48px); height: calc(100dvh - 48px); }
.chat-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px 20px; }
.chat-list-head h1 { margin: 0; font: 700 24px var(--font-head); letter-spacing: -.02em; }
.segmented { display: flex; gap: 4px; margin: 0 14px 8px; padding: 4px; border-radius: 999px; background: var(--beige); }
.segmented button { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border: 0; border-radius: 999px; background: none; font: 700 13px var(--font-head); color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.chat-items { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-items .empty-line { padding: 12px; }
.chat-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; transition: background-color .2s; }
.chat-item:hover { background: var(--cream); }
.chat-item.active { background: var(--beige); }
.chat-item-text { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.chat-item-text strong { font-size: 14.5px; }
.chat-item-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.chat-item.unread .chat-item-text span { color: var(--ink); font-weight: 700; }
.chat-item small { align-self: flex-start; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.chat-item .dot { position: absolute; right: 14px; bottom: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat > .loader { margin: auto; }
.chat-empty { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; padding: 24px; text-align: center; }
.chat-empty h2 { margin: 12px 0 0; font: 700 22px var(--font-head); }
.chat-empty p { margin: 0 0 10px; color: var(--muted); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.chat-back { display: none; }
.chat-who { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.chat-who > span { display: grid; line-height: 1.3; }
.chat-who small { color: var(--muted); }
.chat-banner { padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--cream); font-size: 14px; }
.chat-banner p { margin: 0; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chat-scroll { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; padding: 18px 18px 8px; }
.older { align-self: center; margin-bottom: 10px; }
.day { align-self: center; margin: 14px 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--beige); color: var(--muted); font-size: 12px; font-weight: 700; }
.bubble { position: relative; display: flex; align-items: flex-end; gap: 8px; max-width: min(78%, 520px); padding: 9px 12px 7px 14px; border-radius: 20px 20px 20px 6px; background: var(--beige); animation: rise .25s var(--ease); }
.bubble.mine { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--red); color: #fff; }
.bubble.mine a { color: #fff; text-decoration: underline; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { flex: none; font-size: 10.5px; opacity: .6; transform: translateY(2px); }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
.seen { align-self: flex-end; margin: 2px 4px 0; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.typing { display: flex; gap: 4px; align-self: flex-start; margin: 0 18px 8px; padding: 12px 14px; border-radius: 20px 20px 20px 6px; background: var(--beige); }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 46px; max-height: 140px; padding: 12px 18px !important; border-radius: 24px !important; resize: none; background: var(--cream) !important; }
.send { display: grid; place-items: center; width: 46px; height: 46px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--red); color: #fff; transition: transform .2s var(--ease), opacity .2s; }
.send:disabled { opacity: .35; cursor: default; }
.send:not(:disabled):hover { transform: scale(1.06); }

/* ---------- Notifications, events, settings ---------- */
.notes { padding: 6px; }
.note { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; }
.note.new { background: var(--red-soft); }
.note-text { flex: 1; min-width: 0; font-size: 14.5px; }
.note-text small { display: block; color: var(--muted); font-size: 12px; }
.note-thumb img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.events { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px; }
.event-date { display: grid; place-items: center; width: 74px; height: 82px; border-radius: 18px; background: var(--ink); color: var(--cream); font: 700 12px/1 var(--font-head); letter-spacing: .08em; }
.event-date strong { font: 38px/.9 var(--font-display); color: var(--red); letter-spacing: 0; }
.event-body h2 { margin: 8px 0 4px; font: 700 19px/1.2 var(--font-head); }
.event-body .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: var(--muted); font-size: 13.5px; }
.going { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.going .stack { display: inline-flex; }
.going .stack .avatar { margin-left: -8px; border: 2px solid var(--card); }
.going .stack .avatar:first-child { margin-left: 0; }
.event-actions { display: grid; justify-items: end; gap: 8px; }
.settings { margin-bottom: 14px; padding: 20px 22px; }
.settings h2 { margin: 0 0 14px; font: 700 17px var(--font-head); }
.settings dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0; }
.settings dt { color: var(--muted); }
.settings dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.settings p { margin: 0; }
.settings a { text-decoration: underline; }
.settings form { max-width: 380px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Modal, menu, toasts ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(26, 22, 18, .5); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.modal.open { opacity: 1; }
.modal-panel { position: relative; width: min(100%, 480px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--card); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); transform: translateY(14px) scale(.98); transition: transform .3s var(--ease); }
.modal.open .modal-panel { transform: none; }
.modal-panel.wide { width: min(100%, 640px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 12px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 700 17px var(--font-head); }
.modal-panel > .modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.modal-body { overflow-y: auto; padding: 18px 22px 22px; }
.dialog-text { margin: 0 0 14px; color: #4c463f; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.radio-list { display: grid; gap: 6px; }
.radio { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--ink); background: var(--cream); }
.radio input { accent-color: var(--red); }
.post-modal .modal-body { padding: 0; }
.post-modal .post { border: 0; border-radius: 0; box-shadow: none; }
.composer-form { display: grid; gap: 12px; }
.composer-who { display: flex; align-items: center; gap: 10px; }
.composer-form textarea { border: 0 !important; box-shadow: none !important; padding: 4px 0 !important; font-size: 17px; resize: none; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.preview { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--beige); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview.add { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--cream); color: var(--muted); }
.preview-remove { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; }
.composer-bar { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.composer-bar .counter { margin-left: auto; color: var(--muted); font-size: 12px; }
.composer-status { margin: 0; color: var(--muted); font-size: 13px; }
.composer-status:empty { display: none; }
.story-create .modal-body { display: grid; gap: 12px; }
.story-frame { position: relative; aspect-ratio: 9 / 16; max-height: 60vh; margin: 0 auto; overflow: hidden; border-radius: 20px; background: #111; }
.story-frame img { width: 100%; height: 100%; object-fit: cover; }
.story-caption-edit { position: absolute; left: 12px; right: 12px; bottom: 14px; }
.story-caption-edit input { border: 0 !important; background: rgba(0, 0, 0, .5) !important; color: #fff; text-align: center; font-weight: 600; }
.story-caption-edit input::placeholder { color: rgba(255, 255, 255, .7); }
.menu-pop { position: fixed; z-index: 180; display: grid; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 18px 50px rgba(0, 0, 0, .16); animation: rise .18s var(--ease); }
.menu-pop button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 12px; background: none; font-weight: 600; text-align: left; }
.menu-pop button:hover, .menu-pop button:focus-visible { background: var(--beige); outline: 0; }
.menu-pop button.danger { color: var(--red); }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 250; display: grid; gap: 8px; width: min(calc(100% - 32px), 420px); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 14px; padding: 13px 16px 13px 18px; border-radius: 16px; background: var(--ink); color: var(--cream); font-size: 14px; font-weight: 600; box-shadow: 0 14px 40px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .3s var(--ease); pointer-events: auto; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--red-deep); }
.toast span { flex: 1; overflow-wrap: anywhere; }
.toast button { padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }

/* ---------- Story viewer ---------- */
.story-viewer { position: fixed; inset: 0; z-index: 170; display: grid; place-items: center; background: #0d0b0a; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.story-stage { position: relative; width: min(100vw, calc(100dvh * 9 / 16)); height: min(100dvh, calc(100vw * 16 / 9)); max-height: 100dvh; overflow: hidden; background: #000; user-select: none; touch-action: pan-y; }
@media (min-width: 600px) { .story-stage { height: calc(100dvh - 48px); width: calc((100dvh - 48px) * 9 / 16); border-radius: 18px; } }
.story-image { width: 100%; height: 100%; object-fit: cover; }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.story-bars i { display: block; height: 100%; background: #fff; }
.story-head { position: absolute; top: 22px; left: 12px; right: 56px; z-index: 3; }
.story-user { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.story-user small { opacity: .8; }
.story-text { position: absolute; left: 16px; right: 16px; bottom: 76px; z-index: 3; margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.story-zone { position: absolute; top: 0; bottom: 0; z-index: 2; width: 35%; padding: 0; border: 0; background: none; cursor: pointer; }
.story-zone.prev { left: 0; }
.story-zone.next { right: 0; width: 65%; }
.story-foot { position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.story-pill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: 13px; backdrop-filter: blur(8px); }
.story-close { position: fixed; top: 16px; right: 16px; z-index: 4; color: #fff; background: rgba(255, 255, 255, .12); }
.story-close:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .app { grid-template-columns: var(--side) minmax(0, var(--main)); grid-template-areas: "side main"; }
  .rail { display: none; }
  body[data-route="messages"] .app { grid-template-columns: var(--side) minmax(0, 900px); }
}
@media (max-width: 1000px) {
  :root { --side: 84px; }
  .sidebar { align-items: center; padding: 18px 10px; }
  .sidebar .brand span, .nav-label, .side-me > span, .side-me > .icon { display: none; }
  .sidebar .brand { padding: 6px 0 18px; }
  .sidebar .brand img { height: 22px; }
  .nav-link { padding: 12px; }
  .side-nav .nav-link[aria-current="page"]::before { left: -10px; }
  .side-compose { width: 52px; min-height: 52px; margin: 12px 0 0; padding: 0; font-size: 0; }
  .side-compose::before { content: "+"; font-size: 28px; font-weight: 500; line-height: 1; }
  .messenger { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .app { display: block; padding: 0; }
  .sidebar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 8px 0 16px; padding-top: env(safe-area-inset-top); background: rgba(251, 249, 245, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; }
  .topbar .brand img { height: 22px; }
  .topbar .brand span { font-size: 24px; }
  .topbar-actions { display: flex; }
  .topbar-actions .nav-link { padding: 9px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar .nav-link { padding: 10px 14px; }
  .tabbar .nav-link .avatar { outline: 2px solid transparent; outline-offset: 2px; }
  .tabbar .nav-link[aria-current="page"] .avatar { outline-color: var(--ink); }
  .tabbar .compose { padding: 0; }
  .tabbar .compose .nav-icon { width: 46px; height: 38px; border-radius: 14px; background: var(--red); color: #fff; }
  .tabbar .compose .icon path { stroke-width: 2.4; }
  .view { padding: 14px 12px calc(96px + env(safe-area-inset-bottom)); }
  .card { border-radius: 18px; }
  .post { border-radius: 0; border-left: 0; border-right: 0; margin: 0 -12px; box-shadow: none; }
  .post-list { gap: 10px; }
  .stories { margin: -14px -12px 10px; padding: 14px 12px; border-radius: 0; border-width: 0 0 1px; box-shadow: none; }
  /* In the feed everything runs edge to edge, like the posts. */
  .prompt, .post-list > .suggest, .post-list > .invite { margin: 0 -12px 10px; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .post-list > .suggest, .post-list > .invite { margin-bottom: 0; }
  .page-head h1 { font-size: 25px; }
  .grid { gap: 2px; margin: 0 -12px; }
  .tile { border-radius: 0; }
  .profile { margin: -14px -12px 12px; border-radius: 0; border-width: 0 0 1px; box-shadow: none; }
  .profile-main { padding: 18px 16px 18px; }
  .profile-avatar { width: 104px !important; height: 104px !important; }
  .profile-actions .btn { padding: 0 14px; }
  .two { grid-template-columns: 1fr; }
  .edit fieldset { padding: 18px 16px; }
  .edit-media { padding: 18px 16px; gap: 14px; }
  .modal-panel.crop { width: 100%; }
  .modal-panel.crop .modal-body { padding: 14px 16px 18px; }
  .event { grid-template-columns: auto 1fr; gap: 14px; }
  .event-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .event-date { width: 62px; height: 70px; }
  .view.wide { padding: 0; }
  .messenger { display: block; height: calc(100dvh - 58px - 64px - env(safe-area-inset-bottom)); }
  .chat-list, .chat { height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .messenger .chat { display: none; }
  .messenger.has-chat .chat-list { display: none; }
  .messenger.has-chat .chat { display: flex; }
  .chat-back { display: inline-grid; }
  body[data-route="messages"] .messenger.has-chat { height: calc(100dvh - 58px); }
  body[data-route="messages"]:has(.messenger.has-chat) .tabbar { display: none; }
  .bubble { max-width: 84%; }
  .modal { align-items: end; padding: 0; }
  .modal-panel, .modal-panel.wide { width: 100%; max-height: 92dvh; border-radius: 26px 26px 0 0; transform: translateY(40px); }
  .modal-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .welcome { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 40px; }
  .welcome h1 { margin: 26px 0 14px; }
  .welcome-lead { font-size: 15.5px; }
  .welcome-orbit { width: 150px; height: 150px; right: -30px; top: -10px; }
  .welcome-card { padding: 20px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Growth: invites, suggestions, onboarding, mentions ---------- */
.person-reason { display: block; margin-top: 2px; color: var(--red); font-size: 12px; font-weight: 700; }
.suggest-more { display: block; margin-top: 6px; font-size: 13.5px; }
.invite { display: grid; gap: 10px; padding: 18px; background: linear-gradient(135deg, #fff 0%, var(--red-soft) 140%); }
.invite-head { display: flex; align-items: center; gap: 12px; }
.invite-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; }
.invite-icon svg { display: block; }
.invite-head h3 { margin: 0; font: 800 16px/1.25 var(--font-head); font-variant-numeric: lining-nums; }
.invite-text { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.invite.compact { padding: 16px; }
.invite.compact .invite-head h3 { font-size: 15px; }
.invite-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border-radius: 16px; background: var(--red-soft); }
.invite-banner p { margin: 0; font-size: 14px; line-height: 1.4; }
.feed-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0; color: var(--muted); font: 700 13px var(--font-head); }
.feed-divider::before, .feed-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.feed-divider span { display: inline-flex; align-items: center; gap: 6px; color: var(--red); }
.going .link-button { font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mention-list { position: fixed; z-index: 1000; display: grid; max-height: 280px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 12px 40px rgba(26, 20, 12, .16); }
.mention-option { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.mention-option span { display: grid; min-width: 0; }
.mention-option strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-option small { color: var(--muted); font-size: 12px; }
.mention-option.on, .mention-option:hover { background: var(--beige); }
.onboarding .steps { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.onboarding .steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.onboarding .steps li.on { background: var(--red); }
.onboarding .people-list { max-height: 46vh; overflow-y: auto; margin-bottom: 14px; }
.onboarding .invite { margin-bottom: 14px; }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onboarding-head .dialog-text { margin: 0; }
.link-button.center { justify-self: center; }
.tile-text > span { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Board, campus, password reset ---------- */
.chip.sm { padding: 5px 11px; font-size: 12.5px; }
.post-topic { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0 16px 10px; padding: 4px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-deep); font-size: 12.5px; font-weight: 700; }
.post-topic:hover { background: var(--red); color: #fff; }
.post-actions .post-reply { min-height: 34px; margin-left: 4px; padding: 0 12px; }
.composer-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.composer-topics-label { margin-right: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.board-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.board-topics::-webkit-scrollbar { display: none; }
.board-topics .chip { flex: none; }
.segmented.board-scope { margin: 0 0 14px; }
.board-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; font-size: 13.5px; color: var(--muted); }
.board-hint a { font-weight: 700; color: var(--red-deep); }
.campus-hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 22px; margin-bottom: 18px; }
.campus-hero small { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red-deep); }
.campus-hero h1 { margin: 2px 0 4px; font: 800 clamp(22px, 4vw, 30px)/1.15 var(--font-head); overflow-wrap: anywhere; }
.campus-hero p { margin: 0; color: var(--muted); }
.campus-badge { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--red-soft); color: var(--red-deep); }
.campus-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.campus-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.campus-shortcut { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; font-weight: 600; font-size: 14.5px; transition: transform .2s, box-shadow .2s; }
.campus-shortcut .icon { flex: none; color: var(--red); }
.campus-shortcut:hover { transform: translateY(-2px); }
.auth-title { margin: 0 0 6px; font: 800 22px var(--font-head); }
.auth-lead { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.forgot-done { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: #e9f6ec; color: #1f6b35; font-size: 14px; }
.forgot-done .icon { flex: none; margin-top: 1px; }
.form-error a { font-weight: 700; text-decoration: underline; }
@media (max-width: 900px) {
  .board-topics { flex-wrap: nowrap; margin: 0 -12px 12px; padding: 0 12px 4px; overflow-x: auto; scrollbar-width: none; }
  .campus-hero { padding: 18px; }
  .campus-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lock-screen notifications card */
.push-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.push-card .row-actions { align-items: center; gap: 14px; }
.view > .invite-push { margin: 0 0 14px; }
