/* ==========================================================================
   Crowdwide — single stylesheet
   Organized top to bottom as:
   1. Variables & reset      5. App shell (header/sidebar/footer)
   2. Base elements          6. Feed, composer, post cards & media
   3. Buttons & forms        7. Comments, notifications, profile, search
   4. Marketing site         8. Explore/communities & settings
                              9. Responsive breakpoints
   ========================================================================== */

/* 1. Variables & reset ----------------------------------------------------*/
:root {
  --ink: #080914;
  --ink-soft: #101226;
  --panel: #101226;
  --paper: #f7f6f3;
  --muted: #bcbfd2;
  --sf-0: #0d1020; --sf-1: #101226; --sf-2: #171a30; --sf-3: #222642;
  --bd-1: #32354e; --bd-2: #47507e;
  --ov-1: rgba(255,255,255,.04); --ov-2: rgba(255,255,255,.09);
  --tx-hi: #f6f6fa;
  --tx-mid: #dcdeeb;
  --tx-lo: #bdc0d4;
  --tx-faint: #a6a9c0;
  --ac-blue: #aab6ff;
  --ac-orange: #ffa468;
  --ac-teal: #9de1d8;
  --ac-gold: #ffc983;
  --ac-red: #ff6b6b;
  --ac-rose: #ffb0bf;
  --line: rgba(255, 255, 255, .13);
  --blue: #4d65ff;
  --cyan: #20b9ef;
  --orange: #ff8a30;
  --pink: #f23879;
  --green: #4cdb8a;
  --header-h: 68px;
  --gutter: clamp(16px, 3.2vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--tx-hi);
  font: 15px/1.55 'DM Sans', sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; line-height: 1.05; letter-spacing: -1.5px; margin: 0; }
h1 em, h2 em { color: #7192ff; font-style: normal; }
.container { width: min(1180px, calc(100% - 48px)); margin: auto; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 2.2px; color: var(--tx-lo); font-weight: 700; margin: 0 0 16px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 8px; box-shadow: 0 0 12px var(--orange); }

* { scrollbar-width: thin; scrollbar-color: rgba(126, 141, 255, .55) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(126, 141, 255, .45); border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(157, 169, 255, .78); }

/* 2. Base / avatars --------------------------------------------------------*/
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #d6453d, #4a5df0);
  font: 700 15px 'Space Grotesk', sans-serif; color: #fff;
}
.avatar img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; }
.avatar-initial { position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font: inherit; line-height: 1; text-align: center; pointer-events: none; }
.avatar.image-loaded .avatar-initial { visibility: hidden; }
.avatar.image-loaded img { opacity: 1; }
.avatar.small { width: 32px; height: 32px; font-size: 12px; display:flex; justify-content: center;align-items: center; }
.avatar.tiny { width: 29px; height: 29px; font-size: 11px; }
.avatar.large { width: 84px; height: 84px; font-size: 30px; border: 3px solid var(--ink); }
a.avatar-link { display: inline-flex; }
.name-link { color: inherit; }
.name-link:hover { text-decoration: underline; }
.mention-link { color: var(--ac-blue); font-weight: 600; }
.mention-link:hover { color: #fff; text-decoration: underline; }
.verified-tick { color: var(--cyan); margin-left: 8px; font-size: 11px;}

/* 3. Buttons & forms --------------------------------------------------------*/
.button {
  border: 0; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 12px; padding: 13px 20px; font-weight: 700; white-space: nowrap;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); }
.button span { font-size: 16px; }
.button-small { padding: 9px 15px; font-size: 12px; }
.button-primary { background: linear-gradient(110deg, #5068ff, #893cff); color: #fff; box-shadow: 0 10px 30px #3c31ac55; }
.button-primary:hover { box-shadow: 0 14px 32px #3c31ac88; }
.button-ghost { border: 1px solid var(--line); background: transparent; color: var(--tx-hi); }
.button-light { background: #f2f1ed; color: #111322; }
.button-dark { background: var(--sf-2); color: #fff; }
.button-danger { background: #72253e; color: #fff; }
.button-full { width: 100%; }
.button:disabled { opacity: .6; cursor: default; transform: none; }
.text-link { font-weight: 600; font-size: 13px; color: var(--tx-mid); }
.text-link span { color: var(--orange); margin-left: 5px; }
.round-action {
  border: 1px solid var(--bd-2); background: transparent; color: #aab4ff; border-radius: 50%;
  width: 26px; height: 26px; line-height: 18px; margin-left: auto; cursor: pointer; flex: none;
}
.round-action:hover { background: #586aff; color: #fff; }
.follow-button { border: 1px solid var(--bd-2); background: transparent; color: #cfd3ff; border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }
.follow-button:hover { background: #586aff; border-color: #586aff; color: #fff; }
.follow-button.is-following { background: var(--sf-2); border-color: var(--line); color: var(--tx-faint); }
.follow-button.is-following:hover { background: var(--sf-3); border-color: #914d63; color: var(--ac-rose); }
.mute-button { border: 1px solid var(--bd-2); background: transparent; color: #cfd3ff; border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }
.mute-button:hover, .mute-button.is-muted { background: var(--sf-3); border-color: #586aff; color: #fff; }
.joined-mark { margin-left: auto; color: #5ad99a !important; font-size: 10px !important; }
input, textarea, select {
  border: 1px solid var(--bd-1); border-radius: 8px; background: var(--sf-1); color: #fff;
  padding: 12px 13px; outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: #687cff; box-shadow: 0 0 0 3px #5369ff22; }
/* Custom chevron so <select> matches the theme instead of the browser's native
   grey dropdown arrow. The image is a tiny inline SVG - no extra request. */
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385889e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px; cursor: pointer;
}
select::-ms-expand { display: none; }
/* input[type=file]: the browser draws its own "Choose File" button, which we
   can restyle via ::file-selector-button, but the surrounding input box (and
   the "No file chosen" text) stays native and can't be recolored - so instead
   the whole control is made transparent and borderless, and the button alone
   is styled to look like the rest of the UI's buttons. Anywhere a nicer
   drag-and-drop target exists (.upload-dropzone) already hides this input
   completely, so this only affects the plain file fields (settings avatar,
   group picture, report evidence). */
input[type="file"] {
  border: 1px dashed var(--bd-2); background: transparent; padding: 8px; font-size: 12px; color: var(--tx-lo);
}
input[type="file"]::file-selector-button {
  font: inherit; margin-right: 12px; padding: 9px 16px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #4d65ff, #6b4dff); color: #fff; font-weight: 700; font-size: 12px;
  cursor: pointer; transition: filter .15s ease;
}
input[type="file"]::file-selector-button:hover { filter: brightness(1.1); }
input[type="file"]:focus-visible { outline: 3px solid #8da0ff; outline-offset: 3px; }
.button:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #8da0ff; outline-offset: 3px; }
.flash { font-size: 12px; padding: 11px 13px; border-radius: 8px; margin-bottom: 18px; }
.flash-error { background: var(--sf-3); color: var(--ac-rose); border: 1px solid #914d63; }
.flash-success { background: var(--sf-2); color: #9de8c1; border: 1px solid var(--bd-2); }
.empty-state, .empty-feed { width: 100%;text-align: center; border: 1px dashed var(--line); border-radius: 10px; padding: 60px 24px; }
.empty-state .empty-orbit, .empty-feed .empty-orbit { width: 65px; height: 65px; margin: 0 auto 20px; background: var(--sf-0); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 11px #181b31; }
.empty-state .empty-orbit img, .empty-feed .empty-orbit img { width: 45px; height: 45px; }
.empty-state h2, .empty-feed h2 { font-size: 24px; }
.empty-state p, .empty-feed p { color: var(--tx-faint); font-size: 13px; max-width: 380px; margin: 12px auto 20px; }
.reveal { animation: rise .8s ease both; }
.reveal-delay { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* 4. Marketing site ---------------------------------------------------------*/
.home-page { background: radial-gradient(circle at 72% 10%, #1c2250 0, transparent 30%), var(--ink); overflow-x: hidden; }
.ambient { position: absolute; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.ambient-one { width: 370px; height: 370px; top: -220px; left: -190px; background: #ed3a6540; }
.ambient-two { width: 260px; height: 260px; right: -150px; top: 520px; background: #3f5cfd2c; }

.site-nav { height: 88px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 21px 'Space Grotesk', sans-serif; letter-spacing: -.7px; }
.brand img { height: 38px; width: 38px; object-fit: contain; }
.nav-links { display: flex; gap: 34px; color: var(--tx-lo); font-size: 13px; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-menu-toggle { display: none; }

.hero { min-height: 620px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; padding-top: 20px; }
h1 { font-size: clamp(40px, 5.8vw, 76px); }
.hero-lede { font-size: 17px; line-height: 1.7; color: var(--tx-lo); max-width: 500px; margin: 26px 0; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 13px; margin-top: 46px; color: var(--tx-mid); font-size: 12px; }
.hero-proof p { margin: 0; line-height: 1.35; }
.hero-proof strong { color: white; }
.hero-proof p span { color: var(--tx-faint); }
.avatar-stack { display: flex; }
.avatar-stack > span { display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 50%; width: 31px; height: 31px; margin-right: -7px; border: 2px solid var(--ink); font-size: 10px; font-weight: 700; color: #fff; }
.avatar-stack > .avatar { width: 31px; height: 31px; }
.avatar-stack > span img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-stack span:nth-child(1) { background: #f26862; }
.avatar-stack span:nth-child(2) { background: #476cfa; }
.avatar-stack span:nth-child(3) { background: #ec4fa2; }
.avatar-stack span:nth-child(4) { background: var(--sf-3); }
.hero-visual { height: 460px; position: relative; display: grid; place-items: center; }
.orbit-card { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 18px; }
.orbit-card img { width: 118%; max-width: none; opacity: .94; mix-blend-mode: screen; }
.visual-note { position: absolute; background: #14172cdd; border: 1px solid var(--line); padding: 12px 16px; border-radius: 8px; display: grid; grid-template-columns: 30px auto; column-gap: 10px; line-height: 1.2; box-shadow: 0 12px 34px #0006; }
.visual-note strong { font-size: 12px; }
.visual-note small { font-size: 10px; color: var(--tx-faint); grid-column: 2; }
.note-icon { grid-row: span 2; color: var(--orange); font-size: 22px; }
.note-icon.blue { color: #5a86ff; }
.note-top { right: 3%; top: 18%; }
.note-bottom { left: 4%; bottom: 15%; }
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; display: flex; justify-content: space-around; color: var(--tx-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; }
.trust-strip i { width: 4px; height: 4px; background: var(--orange); border-radius: 50%; align-self: center; }

.principles { padding: 120px 0 100px; display: grid; grid-template-columns: 35% 1fr; gap: 60px; }
.principles h2 { font-size: 50px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.principle-grid article { border-top: 1px solid var(--line); padding-top: 20px; }
.principle-number { color: var(--orange); font-size: 11px; font-weight: 700; }
.principle-grid h3 { font-size: 20px; letter-spacing: -.7px; margin: 30px 0 12px; }
.principle-grid p { color: var(--tx-lo); font-size: 13px; line-height: 1.7; margin: 0; }

.section-copy { color: var(--tx-lo); font-size: 14px; line-height: 1.75; margin-top: 24px; max-width: 330px; }
.stats-section { padding: 30px 0 120px; display: grid; grid-template-columns: 35% 1fr; gap: 60px; }
.landing-highlight { padding-bottom: 90px; }
.landing-highlight h2 { font-size: 40px; margin-top: 10px; }
.stats-content { display: grid; gap: 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; gap: 18px; }
.stats-grid div { display: grid; gap: 3px; }
.stats-grid strong { font: 600 32px 'Space Grotesk', sans-serif; color: #fff; letter-spacing: -1px; }
.stats-grid span, .list-heading > span { color: var(--tx-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.community-list { border-top: 1px solid var(--line); }
.list-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.list-heading h3 { font-size: 17px; letter-spacing: -.4px; }
.community-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: start; border-top: 1px solid var(--line); padding: 17px 0; }
.community-index { color: var(--orange); font-size: 11px; font-weight: 700; }
.community-row h4 { font: 600 15px 'Space Grotesk', sans-serif; margin: 0 0 5px; }
.community-row p { color: var(--tx-faint); font-size: 12px; margin: 0; }
.community-members { color: var(--tx-faint); font-size: 11px; white-space: nowrap; }

.story-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 90px 8%; display: grid; grid-template-columns: 100px 1fr; gap: 26px; margin-bottom: 110px; }
.story-marker { width: 54px; height: 54px; border: 1px solid #f28b4d; border-radius: 50%; display: grid; place-items: center; color: var(--orange); font-size: 22px; }
.story-section h2 { font-size: 46px; }
.story-section p:not(.eyebrow) { color: var(--tx-lo); max-width: 590px; line-height: 1.8; margin: 24px 0; }
.cta-band { background: linear-gradient(110deg, #202554, #131630); border: 1px solid var(--bd-2); border-radius: 14px; padding: 56px 60px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 70px; }
.cta-band h2 { font-size: 42px; }

/* Footer — used for both the marketing site and the logged-in app shell */
.site-footer {
  border-top: 1px solid var(--line); padding: 56px 0 26px; color: var(--tx-lo); font-size: 13px;
}
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; padding-bottom: 40px; }
.footer-brand .brand { font-size: 17px; color: var(--tx-hi); margin-bottom: 14px; }
.footer-brand .brand img { height: 30px; width: 30px; }
.footer-tagline { color: var(--tx-faint); font-size: 13px; line-height: 1.7; max-width: 280px; margin: 0 0 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; }
.footer-social a:hover { background: var(--sf-2); color: #fff; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--tx-mid); margin: 0 0 16px; }
.footer-col a { display: block; color: var(--tx-lo); font-size: 13px; margin-bottom: 12px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--tx-faint); font-size: 12px; }
.footer-bottom .brand { font-size: 13px; color: var(--tx-lo); }
.footer-bottom .brand img { height: 20px; width: 20px; }
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a:hover { color: #fff; }

/* Auth pages */
.auth-page { background: radial-gradient(circle at 25% 15%, #20265a, transparent 34%), var(--ink); min-height: 100vh; }
.auth-shell { width: min(460px, calc(100% - 32px)); margin: auto; padding: 50px 0; }
.auth-brand { justify-content: center; margin-bottom: 44px; }
.auth-brand img { width: 31px; height: 31px; }
.auth-card { background: #111326d9; border: 1px solid var(--line); border-radius: 14px; padding: 40px; box-shadow: 0 24px 60px #0004; }
.auth-card h1 { font-size: 38px; }
.form-note { color: var(--tx-lo); font-size: 13px; margin: 16px 0 28px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label { font-size: 12px; color: var(--tx-lo); display: grid; gap: 8px; }
.auth-form label a { float: right; color: #7c91ff; }
.auth-form button { margin-top: 6px; }
.code-input { text-align: center; font: 700 24px 'Space Grotesk', sans-serif; letter-spacing: 8px; }
.switch-auth, .terms { text-align: center; color: var(--tx-faint); font-size: 12px; margin: 22px 0 0; }
.consent-check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px; }
.consent-check input { width: auto; margin-top: 2px; accent-color: var(--blue); flex: none; }
.consent-check span { color: var(--tx-lo); line-height: 1.6; }
.consent-check a { color: var(--ac-blue); }
.consent-check a:hover { text-decoration: underline; }
.switch-auth a { color: var(--ac-blue); font-weight: 700; }
.terms { font-size: 11px; }
.auth-foot { text-align: center; color: var(--tx-faint); font-size: 12px; margin: 20px; }
.info-page { min-height: 100vh; background: radial-gradient(circle at 75% 12%, #20265a, transparent 32%), var(--ink); }
.info-main { padding: 90px 0 130px; min-height: 560px; }
.info-main h1 { max-width: 800px; font-size: clamp(40px, 7vw, 76px); }
.info-intro { max-width: 620px; color: var(--tx-lo); font-size: 17px; line-height: 1.7; margin: 26px 0 80px; }
.info-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.info-sections article { border-top: 1px solid var(--line); padding-top: 18px; }
.info-sections h2 { font-size: 21px; letter-spacing: -.5px; margin: 30px 0 14px; }
.info-sections p { color: var(--tx-lo); font-size: 13px; line-height: 1.8; margin: 0; }
.info-page .site-footer { margin-top: 0; }

/* Growth comparison charts (illustrative model, used on /about) ------------*/
.growth-section { padding: 10px 0 110px; }
.growth-section .section-intro { max-width: 720px; margin-bottom: 46px; }
.growth-section .section-intro .eyebrow { display: flex; align-items: center; gap: 7px; color: var(--orange); }
.growth-section h2 { font-size: 42px; margin: 0 0 18px; }
.section-copy { color: var(--tx-lo); font-size: 14px; line-height: 1.8; margin: 0; max-width: 680px; }
.growth-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.growth-card { background: #111326d9; border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 22px; }
.growth-card-head h3 { font: 600 18px 'Space Grotesk', sans-serif; letter-spacing: -.4px; margin: 0 0 8px; color: #fff; }
.growth-card-head p { color: var(--tx-lo); font-size: 12.5px; line-height: 1.7; margin: 0 0 18px; }
.growth-chart { width: 100%; height: auto; display: block; }
.growth-chart .axis-line { stroke: rgba(255, 255, 255, .28); stroke-width: 1; }
.growth-chart .grid-line { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.growth-chart .axis-label { fill: #767995; font: 600 11px 'DM Sans', sans-serif; }
.growth-chart .series { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.growth-chart .series-typical, .growth-chart .series-large { stroke: #565a82; stroke-dasharray: 5 5; }
.growth-chart .series-crowdwide, .growth-chart .series-intermediate { stroke: var(--orange); filter: drop-shadow(0 0 6px rgba(255, 138, 48, .45)); }
.growth-chart .dots-typical circle, .growth-chart .dots-large circle { fill: #0d1020; stroke: #7d80a3; stroke-width: 2; }
.growth-chart .dots-crowdwide circle, .growth-chart .dots-intermediate circle { fill: var(--orange); stroke: #1a0d04; stroke-width: 1; }
.growth-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--tx-mid); }
.growth-legend span { display: inline-flex; align-items: center; gap: 7px; }
.growth-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.growth-legend .dot-crowdwide, .growth-legend .dot-intermediate { background: var(--orange); box-shadow: 0 0 8px rgba(255, 138, 48, .55); }
.growth-legend .dot-typical, .growth-legend .dot-large { background: transparent; border: 2px solid #7d80a3; }
.growth-caption { color: var(--tx-faint); font-size: 11px; line-height: 1.7; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Developer docs (/docs) - reuses .info-page/.info-main for the header, then
   switches to a single-column technical layout: endpoint cards with method
   badges, parameter tables, and code blocks instead of the 3-column prose
   grid the other info pages use. */
.docs-main { max-width: 820px; }
.docs-endpoint { border-top: 1px solid var(--line); padding-top: 34px; margin-top: 34px; }
.docs-endpoint:first-of-type { margin-top: 0; }
.docs-endpoint-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.docs-endpoint-head code { font-size: 19px; color: #fff; }
.docs-endpoint h2 { font-size: 24px; letter-spacing: -.4px; margin: 0 0 10px; }
.docs-endpoint h3 { font-size: 14px; letter-spacing: .4px; text-transform: uppercase; color: var(--tx-lo); margin: 30px 0 12px; }
.docs-endpoint > p { color: var(--tx-lo); font-size: 14.5px; line-height: 1.8; margin: 0 0 4px; }
.docs-method { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 6px; background: var(--sf-2); color: #6fe0b5; font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.docs-method-small { padding: 2px 8px; font-size: 10px; margin-right: 8px; vertical-align: 2px; }
code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: .92em; background: var(--sf-2); border-radius: 4px; padding: .15em .4em; color: #dfe1f2; }
.docs-code { display: block; background: var(--sf-1); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 0 0 18px; }
.docs-code code { background: none; padding: 0; color: #cfe8ff; font-size: 13px; line-height: 1.7; white-space: pre; }
.docs-table-wrap { overflow-x: auto; margin-bottom: 18px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.docs-table th, .docs-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-table th { color: var(--tx-lo); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.docs-table td { color: var(--tx-mid); line-height: 1.6; }
.docs-table td:first-child { white-space: nowrap; }
.docs-footnote { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--tx-lo); font-size: 13px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.guide-card { border-top: 1px solid var(--line); padding-top: 20px; }
.guide-card h2 { font-size: 21px; letter-spacing: -.5px; margin: 26px 0 14px; }
.guide-card ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.guide-card li { color: var(--tx-lo); font-size: 13px; line-height: 1.7; }
.guide-card li::marker { color: var(--orange); }
.two-factor-qr { display: block; width: 200px; height: 200px; margin: 6px auto 24px; border-radius: 10px; background: #fff; padding: 10px; }

/* 5. App shell: header / sidebar / layout / footer -------------------------*/
/* Keep the page width identical whether or not the page needs a scrollbar, so
   switching between a short and a long settings/profile section never nudges
   the centred layout sideways. */
html { scrollbar-gutter: stable; }

.dashboard-page {
  background: radial-gradient(circle at 80% 0%, #1c2250, transparent 28%), var(--ink);
  color: var(--tx-hi); min-height: 100vh; display: flex; flex-direction: column;
}
.dashboard-page .brand { color: var(--tx-hi); }
/* .dashboard-page is a flex column. Children with `margin: auto` (settings,
   profile, explore, community pages...) then shrink-to-fit their CONTENT instead
   of stretching, so the layout - and the sidebar/nav inside it - resized every
   time the content changed. Force full width; max-width + margin:auto on each
   layout still centres it. */
.dashboard-page > main, .dashboard-page > .container, .dashboard-page > section { width: 100%; }

.app-nav {
  height: var(--header-h); padding: 0 max(20px, calc((100% - 1400px) / 2));
  display: flex; align-items: center; gap: 18px;
  border-bottom: 1px solid var(--line); background: #080914e8;
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px);
}
.app-nav .brand { flex: none; }
.app-nav nav { display: flex; gap: 26px; align-items: center; flex: 1; }
.app-nav nav a { font-size: 13px; color: var(--tx-faint); display: inline-flex; align-items: center; gap: 7px; padding: 8px 4px; }
.app-nav nav a:hover, .app-nav .app-nav-active { color: #fff; }

.nav-search { flex: 1; max-width: 340px; position: relative; display: none; }
.nav-search input { padding: 9px 14px 9px 34px; border-radius: 999px; font-size: 12px; background: var(--sf-2); }
.nav-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tx-faint); pointer-events: none; font-size: 13px; }

.app-nav-actions { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.icon-button { background: transparent; border: 1px solid transparent; color: var(--tx-mid); font-size: 19px; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.icon-button:hover { border-color: var(--line); color: #fff; }
.notification-button { position: relative; display: grid; place-items: center; width: 34px; height: 34px; color: var(--tx-mid); border: 1px solid var(--bd-1); border-radius: 50%; font-size: 18px; }
.notification-button:hover { color: #fff; border-color: #6574ff; }
.notification-badge { position: absolute; right: -2px; top: -2px; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: #f06b76; color: #fff; font-size: 0; line-height: 0; box-shadow: 0 0 0 2px var(--bg); }
.notification-badge[hidden] { display: none; }
.welcome { font-size: 12px; color: var(--tx-faint); white-space: nowrap; }
.nav-menu-toggle {
  display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: #fff; font-size: 18px; cursor: pointer; align-items: center; justify-content: center;
}

/* Mobile nav drawer (shared by marketing + app header) */
.nav-drawer {
  position: fixed; inset: 0; z-index: 50; visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .24s ease, visibility .24s linear .24s;
}
.nav-drawer.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.nav-drawer-backdrop { position: absolute; inset: 0; background: #05060fcc; backdrop-filter: blur(2px); opacity: 0; transition: opacity .24s ease; }
.nav-drawer.is-open .nav-drawer-backdrop { opacity: 1; }
.nav-drawer-panel {
  position: absolute; top: 0; right: 0; width: min(320px, 86vw); height: 100%;
  background: var(--sf-1); border-left: 1px solid var(--line); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.75,.25,1); box-shadow: -20px 0 60px #0008;
}
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }
.nav-drawer-close { align-self: flex-end; background: transparent; border: 0; color: var(--tx-mid); font-size: 22px; cursor: pointer; margin-bottom: 6px; }
.nav-drawer-panel a, .nav-drawer-panel form button {
  display: flex; align-items: center; gap: 12px; color: var(--tx-mid); font-size: 14px;
  padding: 13px 12px; border-radius: 8px; width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
}
.nav-drawer-panel a:hover, .nav-drawer-panel form button:hover { background: var(--sf-2); color: #fff; }
.nav-drawer-search { margin: 4px 0 10px; }
.nav-drawer-hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }

.app-layout {
  max-width: 1520px; margin: auto; flex: 1; width: 100%;
  display: grid; grid-template-columns: 230px minmax(0, 880px) 330px; justify-content: center; gap: 34px; padding: 34px var(--gutter) 60px;
}
.app-sidebar { position: sticky; top: calc(var(--header-h) + 34px); align-self: start; height: calc(100vh - var(--header-h) - 68px); border-right: 1px solid var(--line); padding-right: 24px; }
.sidebar-profile { display: flex; align-items: center; gap: 11px; margin-bottom: 32px; }
.sidebar-profile strong, .sidebar-profile span { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: 13px; }
.sidebar-profile span { color: var(--tx-faint); font-size: 11px; margin-top: 2px; }
.side-links { display: grid; gap: 6px; }
.side-links a { display: flex; gap: 13px; align-items: center; color: var(--tx-faint); padding: 11px 10px; border-radius: 8px; font-size: 13px; }
.side-links a:hover, .side-links .side-active { background: var(--sf-2); color: #fff; }
.sidebar-note { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 22px; display: flex; gap: 10px; color: var(--ac-orange); font-size: 20px; }
.sidebar-note p { font-size: 11px; color: var(--tx-faint); line-height: 1.6; margin: 0; }
.sidebar-note strong { color: var(--tx-mid); }
.sidebar-toggle { position: absolute; right: -13px; top: 20px; width: 26px; height: 26px; border: 1px solid var(--bd-2); border-radius: 50%; background: var(--sf-2); color: #fff; cursor: pointer; z-index: 2; }
.app-layout.sidebar-collapsed { grid-template-columns: 48px minmax(0, 880px) 330px; }
.app-layout.sidebar-collapsed .app-sidebar { padding-right: 10px; }

.app-footer { border-top: 1px solid var(--line); margin-top: auto; }
.app-footer .footer-top { grid-template-columns: 1.3fr repeat(3, 1fr); }
.profile-layout > div { min-width: 0; }
.profile-layout { max-width: 1240px; margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 40px var(--gutter) 70px; }
.profile-banner { width: 100%; height: 200px; border-radius: 14px; overflow: hidden; background: linear-gradient(120deg, #232a5c, #171a30); margin-bottom: 20px; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
/* Only the avatar pokes up into the banner (a common, intentional overlap);
   the name/handle text next to it stays in normal flow so it can never end
   up rendered on top of the (often busy) banner image - see profile.ejs. */
/* .profile-avatar-slot.has-banner { margin-top: -50px; } */
.profile-hero { position: relative; z-index: 1; }
.profile-identity { min-width: 0; flex: 1 1 280px; }
.profile-identity > div:last-child { min-width: 0; }
.profile-identity h1 { overflow-wrap: anywhere; }
.profile-hashtags { margin: 12px 0 0; }
.profile-hero .profile-links { margin-top: 12px; }
.profile-actions { flex: 0 1 auto; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.profile-link-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--ac-blue); background: var(--sf-2); border: 1px solid var(--bd-1); border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 600; }
.profile-link-chip:hover { background: var(--sf-3); color: #fff; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.block-button { border: 1px solid var(--bd-1); background: transparent; color: var(--tx-lo); border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
.block-button:hover, .block-button.is-blocked { background: var(--sf-3); border-color: #914d63; color: var(--ac-rose); }
.activity-section { margin-bottom: 6px; }
.activity-row { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); padding: 14px 0; }
.activity-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sf-2); color: var(--ac-orange); font-size: 13px; }
.activity-row p { margin: 0; font-size: 13px; color: var(--tx-mid); line-height: 1.6; }
.activity-row a { color: var(--ac-blue); }
.activity-row small { display: block; color: var(--tx-faint); font-size: 10px; margin-top: 4px; }

/* Conversations (Groups / Messages list pages) ------------------------------*/
.conversations-page { width: 100%; max-width: 1520px; margin: auto; padding: 40px var(--gutter) 70px; }
.conversations-hero { padding-top: 6px; margin-bottom: 22px; }
.conversations-hero .eyebrow { display: flex; align-items: center; gap: 7px; }
.conversations-hero h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -1px; margin: 10px 0 8px; }
.conversations-hero p { color: var(--tx-lo); font-size: 13.5px; line-height: 1.7; max-width: 520px; margin: 0; }
.conversations-search { display: flex; align-items: center; gap: 10px; background: var(--sf-1); border: 1px solid var(--bd-1); border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; color: var(--tx-faint); }
.conversations-search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--tx-hi); font-size: 13px; }
.conversations-search input::placeholder { color: var(--tx-faint); }
.activity-row.message-row, .activity-row.group-row { align-items: center; }
.activity-row.message-row > div, .activity-row.group-row > div { min-width: 0; flex: 1; }
.activity-row.message-row strong, .activity-row.group-row strong { display: block; font-size: 14px; }
.activity-row.message-row p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-row.is-unread strong { color: #fff; }
.activity-row.is-unread p { color: var(--tx-mid); font-weight: 500; }
.unread-badge, .row-arrow { flex: none; margin-left: 8px; }
.unread-badge { background: var(--orange); color: #1a0d04; font: 700 11px 'Space Grotesk', sans-serif; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.row-arrow { color: var(--tx-faint); display: grid; place-items: center; }
.filter-empty { text-align: center; color: var(--tx-faint); font-size: 12px; padding: 30px 0; }
.create-group-panel { margin-bottom: 22px; }
.create-group-form { grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; }
@media (max-width: 640px) { .create-group-form { grid-template-columns: 1fr; } }

/* 6. Feed, composer, post cards, media --------------------------------------*/
.feed-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.feed-heading h1 { font-size: 32px; letter-spacing: -1.5px; }
.feed-heading .eyebrow { margin-bottom: 10px; }
.feed-tabs { border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 22px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tabs a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 12px 0 11px; font-size: 13px; color: var(--tx-faint); border-bottom: 2px solid transparent; white-space: nowrap; }
.feed-tabs a:hover { color: var(--tx-mid); }
.feed-tabs .feed-tab-active { color: #fff; border-color: var(--orange); }
.feed-tabs .feed-tab-active .icon { color: var(--orange); }
.feed-note { margin: 0 0 18px; color: var(--tx-faint); font-size: 12px; line-height: 1.5; }
.feed-end-note { text-align: center; padding: 18px 0; }

.composer, .post-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.composer { padding: 18px; display: flex; gap: 12px; margin-bottom: 18px; }
.composer.composer-hidden { display: none; }
.composer-body { flex: 1; min-width: 0; }
.composer textarea { background: transparent; border: 0; color: var(--tx-hi); resize: vertical; min-height: 96px; width: 100%; outline: none; padding: 4px 0 8px; font-size: 16px; line-height: 1.6; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer textarea::placeholder { color: var(--tx-faint); }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; flex-wrap: wrap; }
.composer select { background: var(--sf-2); color: var(--tx-lo); border: 1px solid var(--bd-1); border-radius: 8px; padding: 8px; font-size: 11px; max-width: 150px; width: auto; }
.coauthor-picker { min-width: 210px; max-width: 300px; padding: 8px 10px; border: 1px solid var(--bd-1); background: var(--sf-2); border-radius: 10px; display: grid; gap: 8px; }
.coauthor-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--tx-mid); font-size: 11px; font-weight: 700; }
.coauthor-picker-head small { color: var(--tx-faint); font-size: 10px; font-weight: 600; }
.coauthor-empty { margin: 0; color: var(--tx-faint); font-size: 10px; line-height: 1.45; }
.coauthor-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.coauthor-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--sf-3); border: 1px solid var(--bd-2); border-radius: 999px; padding: 4px 8px 4px 4px; color: #dfe4ff; font-size: 10px; cursor: pointer; }
.coauthor-chip input { accent-color: var(--orange); margin: 0; }
.coauthor-avatar {aspect-ratio: 1/1; width: 18px; height: 18px; border-radius: 3px; background: linear-gradient(135deg, #8fa2ff, #ff9d5c); color: #0d1020; font-weight: 700; display: grid; place-items: center; font-size: 9px; }
.poll-composer { border: 1px solid var(--bd-1); border-radius: 10px; background: var(--sf-1); padding: 12px; margin: 12px 0 0; }
.poll-composer legend { color: var(--ac-blue); font-size: 11px; font-weight: 700; padding: 0 5px; }
.poll-composer input { background: var(--sf-2); font-size: 11px; padding: 9px 10px; }
.poll-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.composer-media-details { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.composer-media-details summary { cursor: pointer; color: #92a0ff; font-size: 11px; font-weight: 600; padding: 4px 0; }
.composer-media-meta { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; border: 0; min-width: 0; }
.composer-media-meta[hidden] { display: none; }
.composer-media-meta legend { padding: 0; color: var(--tx-mid); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.composer-media-meta label { display: grid; gap: 4px; font-size: 11px; color: var(--tx-faint); }
.composer-media-meta input, .composer-media-meta textarea { background: var(--sf-2); border: 1px solid var(--bd-1); border-radius: 6px; padding: 8px 10px; color: var(--tx-hi); font-size: 12px; font-family: inherit; }
.composer-media-meta textarea { min-height: 50px; resize: vertical; }
.media-picker { font-size: 11px; color: var(--tx-lo); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.media-picker input { display: none; }
.schedule-picker { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-lo); font-size: 11px; white-space: nowrap; }
.schedule-picker input { width: auto; padding: 7px 8px; color-scheme: dark; font-size: 11px; }
.upload-help { display: block; color: var(--tx-faint); font-size: 10px; margin-top: 8px; line-height: 1.5; }

.post-card { padding: 20px; margin-bottom: 14px; }
.content-warning-toggle { display: block; width: 100%; border: 1px solid var(--bd-2); border-radius: 8px; background: var(--sf-2); color: #ffc3d0; padding: 10px 12px; text-align: left; cursor: pointer; font-size: 11px; margin-bottom: 12px; }
.content-warning-toggle:hover { background: var(--sf-3); }
.has-content-warning .post-body, .has-content-warning .post-poll, .has-content-warning .post-media, .has-content-warning .quoted-post, .has-content-warning .reply-source { filter: blur(14px); user-select: none; pointer-events: none; }
.post-meta { display: flex; align-items: center; gap: 10px; }
.post-meta strong { font-size: 13px; display: block; }
.post-meta span { color: var(--tx-faint); font-size: 11px; display: block; margin-top: 3px; }
.post-source { margin-left: auto !important; color: var(--ac-orange) !important; font-size: 10px !important; text-align: right; }
.post-report-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.post-report-form input { flex: 1; min-width: 0; background: transparent; border: 1px solid var(--line); color: var(--tx-mid); border-radius: 7px; padding: 7px 9px; font-size: 11px; }
.post-report-form button { background: transparent; border: 0; color: var(--tx-faint); cursor: pointer; font-size: 11px; }
.report-evidence-label { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--tx-faint); }
.report-evidence-label input { flex: 1; padding: 4px; font-size: 10px; }
.report-options { color: var(--tx-faint); font-size: 12px; }
.report-options > summary { display: inline-flex; min-height: 32px; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; list-style: none; }
.report-options > summary::-webkit-details-marker { display: none; }
.report-options > summary:hover, .report-options[open] > summary { color: var(--ac-blue); background: var(--sf-2); border-color: var(--line); }
.report-options > form { display: grid; gap: 10px; min-width: min(280px, 100%); margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.report-reason-field { display: grid; gap: 5px; color: var(--tx-lo); font-size: 11px; font-weight: 600; }
.report-reason-field select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sf-2); color: var(--tx-hi); font: inherit; }
.report-options form > button { justify-self: start; min-height: 34px; padding: 7px 12px; border: 0; border-radius: 8px; background: var(--ac-blue); color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.report-options form > button:hover { filter: brightness(1.08); }
.post-report-form { display: grid; }
.post-report-form > .report-reason-field { flex: auto; }
.post-report-form .report-evidence-label { min-width: 0; flex-wrap: wrap; }
.post-moderation-tools { margin: 14px 0 8px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--sf-1); }
.post-moderation-heading { display: flex; align-items: center; gap: 8px; color: var(--ac-blue); }
.post-moderation-heading strong { color: var(--tx-hi); font-size: 13px; }
.post-moderation-form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.2fr) auto; align-items: end; gap: 10px; margin-top: 12px; }
.post-moderation-form label { display: grid; gap: 5px; color: var(--tx-lo); font-size: 11px; font-weight: 600; }
.post-moderation-form select, .post-moderation-form input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sf-2); color: var(--tx-hi); font: inherit; }
.post-moderation-form .form-optional { color: var(--tx-faint); font-weight: 400; }
.post-moderation-form .button { min-height: 36px; }
.report-context { max-width: 720px; margin: 8px 0 0; padding: 9px 11px; border-left: 2px solid var(--ac-blue); border-radius: 0 8px 8px 0; background: var(--sf-2); color: var(--tx-mid); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.admin-stats span { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--tx-lo); font-size: 12px; }
.admin-stats strong { color: var(--tx-hi); font-size: 20px; margin-right: 5px; }
.admin-console .settings-block { margin-top: 18px; }
.moderation-post { border-top: 1px solid var(--line); padding: 16px 0; }
.moderation-post > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: var(--tx-lo); font-size: 11px; }
.moderation-post > div:first-child strong { color: var(--tx-hi); font-size: 13px; }
.moderation-post p { color: var(--tx-mid); line-height: 1.55; margin: 10px 0; }
.moderation-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.moderation-actions form { display: flex; gap: 6px; flex: 1 1 180px; }
.moderation-actions input { min-width: 0; flex: 1; background: transparent; border: 1px solid var(--line); color: var(--tx-mid); border-radius: 7px; padding: 7px 9px; font-size: 11px; }
.post-body { font-size: 15px; line-height: 1.7; color: var(--tx-mid); margin: 16px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-poll { display: grid; gap: 8px; margin: 14px 0; padding: 14px; border: 1px solid var(--bd-2); border-radius: 12px; background: linear-gradient(135deg, #141a38, #101226); }
.post-poll > strong { color: var(--tx-hi); font-size: 13px; }
.post-poll form { margin: 0; }
.post-poll button { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--bd-2); border-radius: 8px; background: var(--sf-3); color: #dfe3ff; padding: 9px 11px; cursor: pointer; text-align: left; font-size: 12px; }
.post-poll button:hover { border-color: #7182ff; background: #253267; }
.post-poll button span, .post-poll > p span { color: #9eaaff; font-size: 11px; }
.post-poll > p { display: flex; justify-content: space-between; margin: 0; padding: 9px 11px; border: 1px solid var(--bd-2); border-radius: 8px; color: #dfe3ff; font-size: 12px; }
.quoted-post { display: block; margin: 12px 0 14px; padding: 12px; border: 1px solid var(--bd-2); border-radius: 10px; background: var(--sf-1); }
.quoted-post strong { color: var(--ac-blue); font-size: 11px; }
.quoted-post p { color: var(--tx-lo); font-size: 12px; line-height: 1.5; margin: 5px 0 0; white-space: pre-wrap; }
.post-owner-tools { margin-top: 10px; color: var(--tx-faint); font-size: 11px; }
.post-owner-tools summary { cursor: pointer; display: inline-block; padding: 5px 0; }
.post-owner-tools form { display: grid; gap: 10px; width: min(100%, 760px); margin-top: 8px; }
.post-owner-tools textarea { width: 100%; min-height: 240px; padding: 14px; font-size: 14px; line-height: 1.6; resize: vertical; }
.post-owner-tools button { justify-self: start; min-height: 38px; border: 0; border-radius: 7px; padding: 8px 14px; background: var(--sf-3); color: #fff; font-size: 12px; cursor: pointer; }
.hashtag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.hashtag-chip { display: inline-block; color: var(--ac-blue); background: var(--sf-2); border: 1px solid var(--bd-1); border-radius: 999px; padding: 4px 11px; font-size: 11px; font-weight: 600; }
.hashtag-chip:hover { background: var(--sf-3); color: #fff; }

/* Media frames (images, video, audio) live in responsive-media.css. */
.media-caption { padding: 8px 10px; margin: 0; font-size: 12px; color: var(--tx-mid); background: var(--sf-1); }
.media-transcript { padding: 8px 10px; font-size: 12px; color: var(--tx-mid); background: var(--sf-1); }
.media-transcript summary { cursor: pointer; color: #92a0ff; }
.media-transcript p { margin: 8px 0 0; white-space: pre-wrap; }
.link-preview-card { display: flex; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; background: var(--sf-1); }
.link-preview-card img { width: 120px; height: 120px; object-fit: cover; flex: none; }
.link-preview-body { padding: 10px 14px; min-width: 0; display: grid; gap: 3px; align-content: center; }
.link-preview-site { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--tx-faint); }
.link-preview-body strong { font-size: 13px; color: var(--tx-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-preview-body p { margin: 0; font-size: 12px; color: var(--tx-faint); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quest-board { display: grid; gap: 12px; margin-bottom: 18px; }
.quest-card, .quest-manage-card { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sf-2); margin-top: 15px;}
.quest-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quest-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.quest-badge-open { background: rgba(143, 162, 255, 0.12); color: #c9d2ff; border: 1px solid rgba(143, 162, 255, 0.3); }
.quest-badge-complete { background: rgba(62, 176, 126, 0.12); color: #a9f1c9; border: 1px solid rgba(62, 176, 126, 0.3); }
.quest-card strong, .quest-manage-card strong { color: var(--tx-hi); font-size: 14px; }
.quest-card p, .quest-manage-card p { margin: 0; color: var(--tx-mid); font-size: 12px; line-height: 1.6; }
.quest-card small, .quest-manage-card small { color: var(--tx-faint); font-size: 11px; }
.quest-reward, .quest-winner, .quest-rewarded { display: inline-block; color: var(--ac-gold); font-size: 11px; font-weight: 600; }
.quest-post-picker { display: grid; gap: 4px; color: var(--tx-lo); font-size: 10px; }
.quest-post-picker select:disabled { opacity: .55; cursor: not-allowed; }
.quest-picker-hint { flex-basis: 100%; color: var(--tx-faint); font-size: 10px; }
.quest-post-label {margin-top: 10px; display: inline-flex; width: fit-content; max-width: 100%; margin: 0 0 8px; padding: 4px 8px; border: 1px solid rgba(99, 198, 186, .3); border-radius: 6px; color: var(--ac-teal); background: rgba(99, 198, 186, .08); font-size: 10px; overflow-wrap: anywhere; }
.profile-community-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 18px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-highlight-group { min-width: 0; }
.profile-highlight-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.profile-highlight-heading h2 { margin: 0; font-size: 14px; }
.profile-highlight-heading > span { color: var(--tx-lo); font-size: 11px; }
.profile-community-item, .profile-achievement-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 8px 0; border-top: 1px solid var(--line); color: var(--tx-hi); font-size: 12px; text-decoration: none; }
.profile-community-item > span { overflow-wrap: anywhere; }
.profile-community-item b { flex: none; color: var(--ac-teal); font-size: 10px; }
.profile-achievement-item { justify-content: flex-start; align-items: flex-start; }
.profile-achievement-item > span:last-child { display: grid; gap: 3px; min-width: 0; }
.profile-achievement-item b { color: var(--ac-gold); font-size: 12px; overflow-wrap: anywhere; }
.profile-achievement-item small, .profile-highlight-empty { color: var(--tx-lo); font-size: 10px; }
.profile-achievement-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 201, 131, .1); color: var(--ac-gold); }
.quest-winner { color: #c2f0ff; }
.quest-rewarded { color: #a9f1c9; }
.quest-progress { color: var(--tx-lo); font-size: 10px; }
.quest-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.quest-manage-card form { display: grid; gap: 8px; }
.quest-manage-card select { width: 100%; background: var(--sf-2); color: #dfe5ff; border: 1px solid var(--bd-2); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 480px) { .link-preview-card img { width: 84px; height: 84px; } }

.post-actions { border-top: 1px solid var(--line); padding-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; position: relative; z-index: 1; }
.post-actions > form { display: flex; min-width: 0; }
.post-actions button, .post-actions span { background: transparent; border: 0; color: var(--tx-faint); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; }
.post-actions button { min-height: 36px; white-space: nowrap; }
.post-actions button:hover { color: #fff; background: var(--sf-2); }
.post-actions button > span { padding: 0; border-radius: 0; cursor: inherit; }
.post-actions .post-stat { color: var(--tx-faint); font-size: 12px; text-decoration: none; cursor: pointer; text-align: center; }
.post-actions a.post-stat{
  color: #fff; display: flex; padding: 8px 10px; justify-content: center; align-items: center; border-radius: 999px;
}
.post-actions a.post-stat:hover { color: #fff; background: var(--sf-2); display: flex; justify-content: center; align-items: center; }
.post-actions > form button, .post-actions > a, .post-actions > button, .post-actions > span { width: 100%; min-width: 0; justify-content: center; white-space: nowrap; }
.post-actions .post-views { margin-left: 0; cursor: default; }
.post-secondary-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 6px; }
.post-secondary-actions .post-owner-tools { margin-top: 4px; }
.post-read-more { display: inline-block; margin: -8px 0 14px; color: #92a0ff; font-size: 12px; font-weight: 600; }
.post-read-more:hover { color: #fff; }
.reaction-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reaction-bar form { display: inline-flex; }
.reaction-bar button { border: 1px solid var(--bd-1); border-radius: 999px; background: var(--sf-2); color: #bfc7ff; padding: 5px 8px; cursor: pointer; font-size: 11px; }
.reaction-bar button:hover { border-color: #7482ff; background: var(--sf-3); color: #fff; }
.reaction-bar button.is-selected, .post-poll button.is-selected { border-color: #8290ff; background: #303d7a; color: #fff; }
.interaction-message { display: block; color: #78e0a5; font-size: 10px; margin: 6px 0; }
.share-form { position: relative; }
.share-menu { display: none; position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 150px; padding: 6px; background: var(--sf-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.share-menu.is-open { display: grid; gap: 2px; }
.share-menu button, .share-menu a { width: 100%; padding: 7px 9px; border-radius: 5px; color: var(--tx-mid); font-size: 11px; text-align: left; text-decoration: none; white-space: nowrap; }
.share-menu button:hover, .share-menu a:hover { background: var(--sf-3); color: #fff; }
.post-open-link { display: inline-flex; margin: -4px 0 14px; color: #92a0ff; font-size: 11px; font-weight: 600; }
.post-open-link:hover { color: #fff; }
.post-stat-row { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; display: flex; gap: 16px; color: var(--tx-faint); font-size: 11px; }
.post-stat-row span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.post-stat-row svg { color: var(--tx-faint); }
.interaction-error { color: #ff91a7; font-size: 10px; margin-left: 8px; }

.post-card[data-post-url] { position: relative; cursor: pointer; transition: border-color .15s ease; }
.post-card[data-post-url]:hover { border-color: rgba(255, 255, 255, .22); }
.post-card[data-post-url] .post-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.feed-stream-groups { display: grid; gap: 28px; }
.feed-group { min-width: 0; }
.feed-group .panel-heading { margin-bottom: 10px; }
.composer-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 8px; color: var(--tx-faint); font-size: 11px; }
.hashtag-suggestions:empty { display: none; }
.word-limit-status { display: grid; gap: 5px; width: min(210px, 42%); }
.word-limit-warning { color: #ff8a9d; }
.word-limit-meter { width: 100%; height: 5px; overflow: hidden; border-radius: 999px; background: var(--sf-3); }
.word-limit-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--cyan); transition: width .16s ease, background .16s ease; }
.word-limit-meter.is-warning span { background: var(--orange); }
.word-limit-meter.is-over span { background: #ff5f78; }
.hashtag-suggestions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.hashtag-suggestions button { border: 1px solid var(--bd-2); background: var(--sf-2); color: var(--ac-blue); border-radius: 999px; padding: 4px 8px; font-size: 10px; cursor: pointer; }
.hashtag-suggestions button:hover { color: #fff; background: var(--sf-3); }
/* Wrapper that anchors the @mention dropdown to its input. */
.mention-wrap { position: relative; min-width: 0; width: 100%; }
/* A dropdown that floats over the content below the input. `[hidden]` must
   win over display:grid, otherwise an empty bordered box (the stray "line")
   stays on screen when there are no suggestions. */
.mention-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; display: grid; gap: 2px; max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid var(--bd-2); border-radius: 12px; background: var(--sf-2); box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.mention-suggestions[hidden], .mention-suggestions:empty { display: none; }
.mention-suggestions button { border: 0; border-radius: 8px; background: transparent; color: #dfe3ff; padding: 10px 12px; text-align: left; cursor: pointer; font-size: 13px; width: 100%; }
.mention-suggestions button:hover { background: var(--sf-3); }
.mention-suggestions button span { color: var(--tx-faint); margin-left: 4px; }

/* 7. Comments / notifications / profile / search ---------------------------*/
.comment-thread { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.comment { border-left: 2px solid var(--bd-2); padding: 9px 0 9px 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.comment strong { font-size: 11px; margin-right: 7px; }
.comment > span { font-size: 12px; color: var(--tx-lo); }
.comment form { display: flex; gap: 7px; margin-top: 8px; width: 100%; }
.comment input { flex: 1; padding: 7px 9px; font-size: 11px; }
.comment button { background: transparent; border: 0; color: #8e9eff; font-size: 10px; cursor: pointer; }

.post-detail-thread { max-height: 620px; overflow-y: auto; padding-right: 8px; }
.thread-comment { position: relative; padding: 14px 0 14px 18px; border-left: 1px solid var(--bd-2); }
.thread-comment[data-depth="1"] { margin-left: 24px; border-left-color: #5d6cc1; }
.thread-comment[data-depth="2"] { margin-left: 48px; border-left-color: #7e8dff; }
.thread-comment[data-depth="3"] { margin-left: 66px; border-left-color: #9aa4ff; }
.thread-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.thread-comment strong { display: block; color: var(--tx-hi); font-size: 12px; }
.thread-comment p { color: var(--tx-mid); font-size: 13px; line-height: 1.6; margin: 0; }
.thread-comment time { display: block; color: var(--tx-faint); font-size: 10px; margin-top: 7px; }
.thread-reply { margin-top: 8px; }
.thread-reply summary { list-style: none; cursor: pointer; color: var(--ac-blue); font-size: 11px; font-weight: 600; display: inline-block; }
.thread-reply summary::-webkit-details-marker { display: none; }
.thread-reply[open] summary { margin-bottom: 8px; }
.thread-reply summary { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; }
.thread-comment .comment-owner-tools summary { display: inline-flex; align-items: center; gap: 5px; }

.public-post-cta { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.public-post-cta p { margin: 0; color: var(--tx-lo); font-size: 13px; }

.notifications-page { max-width: 1080px; width:100%; margin: auto; padding: 48px var(--gutter) 100px; }
.notifications-heading { display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.notifications-heading h1 { font-size: 44px; }
.notifications-heading em { font: 500 15px 'DM Sans', sans-serif; color: var(--ac-orange); }
.notification-list { margin-top: 20px; display: grid; gap: 10px; }
.notification-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .15s ease, background .15s ease; }
.notification-item:hover { border-color: var(--bd-2); background: var(--sf-2); }
.notification-item > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.notification-item strong { font-size: 14px; }
.notification-item span { color: var(--tx-lo); font-size: 13px; }
.notification-item small { color: var(--tx-faint); font-size: 11px; }
.notification-unread { background: var(--sf-2); border-color: var(--bd-2); box-shadow: inset 3px 0 0 var(--orange); }

/* Profile page */
.profile-hero { border-bottom: 1px solid var(--line); padding-bottom: 30px; margin-bottom: 30px; }
.profile-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.profile-identity { display: flex; align-items: center; gap: 16px; }
.profile-identity h1 { font-size: 30px; }
.profile-handle { color: var(--tx-faint); font-size: 13px; margin-top: 4px; }
.profile-bio { color: var(--tx-mid); font-size: 14px; line-height: 1.7; max-width: 560px; margin: 18px 0 0; }
.profile-stats { display: flex; gap: 22px; margin-top: 18px; font-size: 13px; color: var(--tx-faint); flex-wrap: wrap; row-gap: 8px; }
.profile-stats strong { color: #fff; }
.profile-joined { color: var(--tx-faint); font-size: 11px; margin-top: 10px; }
.profile-engagement { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-engagement .panel-heading { margin-bottom: 14px; }
.engagement-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.engagement-grid div { background: var(--sf-1); border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px; display: grid; gap: 5px; }
.engagement-grid strong { display: flex; align-items: center; gap: 7px; font: 700 20px 'Space Grotesk', sans-serif; color: #fff; letter-spacing: -.5px; }
.engagement-grid strong svg { color: var(--orange); flex: none; }
.engagement-grid span { color: var(--tx-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
@media (max-width: 560px) { .engagement-grid { grid-template-columns: repeat(2, 1fr); } }
.stats-tab-section { padding: 22px; }
.stats-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.stats-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.stats-bar-track { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; }
.stats-bar-fill { width: 100%; min-height: 3px; background: linear-gradient(180deg, var(--orange), #b35a12); border-radius: 5px 5px 2px 2px; display: flex; justify-content: center; padding-top: 6px; position: relative; }
.stats-bar-fill span { color: #1a0d04; font: 700 10px 'Space Grotesk', sans-serif; }
.stats-bar-col label { color: var(--tx-faint); font-size: 10px; margin-top: 8px; text-transform: uppercase; letter-spacing: .5px; }
.stats-mix-grid { grid-template-columns: repeat(4, 1fr); }
.top-post-row { align-items: center; }
.top-post-row .rank-badge { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sf-2); border: 1px solid var(--line); color: var(--ac-orange); font: 700 10px 'Space Grotesk', sans-serif; display: grid; place-items: center; }
.top-post-row p { color: var(--tx-mid); font-size: 13px; line-height: 1.6; margin: 0 0 6px; }
.top-post-row small { display: flex; gap: 14px; color: var(--tx-faint); font-size: 11px; }
.top-post-row small span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 560px) { .stats-mix-grid { grid-template-columns: repeat(2, 1fr); } }
.profile-tabs { display: flex; gap: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.profile-tabs a { flex: none; padding: 13px 2px 11px; color: var(--tx-faint); font-size: 12px; border-bottom: 2px solid transparent; }
.profile-tabs a:hover, .profile-tabs .profile-tab-active { color: #fff; border-color: var(--orange); }

/* Search page */
.search-form { display: flex; gap: 10px; max-width: 620px; margin: 30px 0 40px; }
.search-form input { flex: 1; }
.search-filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; width: 100%; max-width: 100%; }
.search-filter-form > input[type="search"] { grid-column: span 2; width: 100%; min-width: 0; }
.search-filter-form > select { width: 100%; min-width: 0; padding: 10px; }
.search-date { display: grid; gap: 3px; color: var(--tx-faint); font-size: 10px; }
.search-date input { width: 100%; min-width: 0; padding: 9px; }
.search-filter-toggles { display: flex; grid-column: span 2; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.search-media { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--tx-lo); font-size: 11px; white-space: nowrap; cursor: pointer; }
.search-media input { width: 15px; height: 15px; flex: none; margin: 0; padding: 0; accent-color: var(--ac-blue); }
.search-filter-form > button { grid-column: span 2; width: 100%; white-space: nowrap; }
.search-section { margin-bottom: 40px; }
.search-section h2 { font-size: 18px; margin-bottom: 14px; }
.search-discovery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; gap: 20px; margin: 28px 0; }
.popular-search-list { display: grid; gap: 7px; }
.popular-search-list a { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; color: #c7ceff; background: var(--sf-1); font-size: 13px; }
.popular-search-list a:hover { border-color: #586aff; background: var(--sf-2); }
.popular-search-list a > .icon { color: #6f7ac8; flex: none; }
.popular-search-list .search-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-search-list .search-meta { color: var(--tx-faint); font-size: 11px; flex: none; }
.popular-search-list .search-tag-suggested { color: var(--tx-faint); }
.search-user-row, .search-community-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 14px 0; }
.search-user-row div:nth-child(2), .search-community-row div:nth-child(2) { flex: 1; min-width: 0; }
.search-user-row strong, .search-community-row strong { display: block; font-size: 13px; }
.search-user-row span, .search-community-row span { display: block; color: var(--tx-faint); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 8. Explore / communities / settings ---------------------------------------*/
.explore-page { max-width: 1320px; margin: auto; padding: 56px var(--gutter) 100px; }
.community-map-page { max-width: 1440px; margin: auto; padding: 32px var(--gutter) 80px; }
.community-map-heading { max-width: 760px; margin-bottom: 24px; }
.community-map-heading .back-link { margin-bottom: 22px; }
.community-map-heading h1 { margin: 4px 0 10px; font-size: 42px; }
.community-map-heading > p:last-child { max-width: 620px; margin: 0; color: var(--tx-lo); font-size: 13px; }
.community-map-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.community-map-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 180px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--tx-lo); }
.community-map-search input { width: 100%; min-width: 0; border: 0; background: transparent; }
.community-map-search input:focus { outline: 0; }
.community-map-category select { min-width: 170px; }
.community-map-count { flex: none; margin: 0; color: var(--tx-lo); font-size: 11px; }
.community-map-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 14px; align-items: start; }
.community-map-canvas { width: 100%; height: min(72vh, 720px); min-height: 440px; border: 1px solid var(--line); border-radius: 10px; background: #d9e4df; overflow: hidden; z-index: 0; }
.community-map-tile-error { margin: 8px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 183, 106, .3); border-radius: 7px; background: rgba(255, 183, 106, .08); color: #f4c38f; font-size: 11px; line-height: 1.5; }
.community-map-results { min-width: 0; }
.community-map-results-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.community-map-results-heading h2 { font-size: 15px; }
.community-map-results-heading span { color: var(--tx-lo); font-size: 11px; }
.community-map-list { max-height: min(72vh, 720px); overflow-y: auto; padding-right: 5px; }
.community-map-row { margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.community-map-row[hidden] { display: none; }
.community-map-row-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.community-map-row-top img, .community-map-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--sf-2); color: #63c6ba; font: 700 15px/1 'Space Grotesk', sans-serif; padding-bottom: .04em; }
.community-map-row-top > div { display: grid; min-width: 0; }
.community-map-row-top a { overflow: hidden; color: var(--tx-hi); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.community-map-row-top span { color: var(--tx-lo); font-size: 10px; }
.community-map-row > p { margin: 8px 0; color: var(--tx-lo); font-size: 11px; line-height: 1.45; }
.community-map-row-meta { display: flex; gap: 12px; color: var(--tx-lo); font-size: 10px; }
.community-map-row .hashtag-row { margin-top: 7px; }
.community-map-row .hashtag-chip { padding: 3px 6px; font-size: 9px; }
.community-map-focus { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 0; border: 0; background: transparent; color: #7ed6cb; font-size: 10px; cursor: pointer; }
.community-map-empty { padding: 22px 10px; color: var(--tx-lo); font-size: 12px; text-align: center; }
.community-map-attribution { margin: 8px 0 0; color: var(--tx-lo); font-size: 10px; }
.community-map-attribution a { text-decoration: underline; }
.community-map-popup { display: grid; gap: 4px; min-width: 150px; }
.community-map-popup strong { color: #19221e; font-size: 13px; }
.community-map-popup span { color: #52615a; font-size: 11px; }
.community-map-popup a { color: #197b70; font-size: 11px; font-weight: 700; }
.community-location-settings { display: grid; gap: 11px; margin: 8px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.community-location-settings legend { padding: 0 5px; color: var(--tx-hi); font-size: 13px; font-weight: 700; }
.community-location-settings > label:not(.privacy-check) { display: grid; gap: 5px; }
.community-location-settings small { color: var(--tx-lo); font-size: 10px; }
.community-location-map { width: 100%; height: 260px; border-radius: 7px; background: #d9e4df; }
.community-location-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.community-location-actions small { min-width: 0; }
.community-location-status { margin: 0; color: var(--ac-teal); font-size: 11px; line-height: 1.5; }
.community-location-status:empty { display: none; }
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper { border-radius: 8px; }
.explore-hero { border-bottom: 1px solid var(--line); padding-bottom: 44px; }
.explore-hero h1 { font-size: clamp(40px, 6vw, 68px); }
.explore-search { display: flex; gap: 10px; max-width: 720px; margin-top: 34px; }
.explore-search input { flex: 1; }
.explore-search select { width: 150px; }
.community-map-entry { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: #8bd8ce; font-size: 12px; font-weight: 600; }
.community-map-entry:hover { color: var(--tx-hi); }
.community-radar-page { max-width: 1240px; margin: auto; padding: 32px var(--gutter) 80px; }
.community-radar-heading { max-width: 760px; margin-bottom: 24px; }
.community-radar-heading .back-link { margin-bottom: 18px; }
.community-radar-heading h1 { margin: 4px 0 10px; font-size: 42px; }
.community-radar-heading > p:last-child { max-width: 620px; margin: 0; color: var(--tx-lo); font-size: 13px; }
.community-radar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.community-radar-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.community-radar-top { display: flex; justify-content: space-between; align-items: center; }
.community-radar-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 26px; border-radius: 999px; background: rgba(75, 160, 255, 0.14); color: #9ecbff; font-size: 10px; font-weight: 700; }
.community-radar-score { color: var(--tx-lo); font-size: 11px; }
.community-radar-name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.community-radar-name-row a { color: var(--tx-hi); font-size: 17px; font-weight: 700; }
.community-radar-name-row span { color: var(--tx-lo); font-size: 11px; }
.community-radar-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--sf-3); color: var(--ac-orange); object-fit: cover; flex: none; font: 700 16px/1 'Space Grotesk', sans-serif; padding-bottom: .04em; }
.community-radar-description { margin: 0; color: var(--tx-lo); font-size: 12px; line-height: 1.55; }
.community-radar-metrics { display: flex; flex-wrap: wrap; gap: 8px; color: var(--tx-lo); font-size: 10px; }
.community-radar-link { width: fit-content; }
.explore-rising-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.community-radar-preview { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: .2s transform, .2s border-color; }
.community-radar-preview:hover { transform: translateY(-2px); border-color: #586aff; }
.community-radar-preview-top { display: flex; justify-content: space-between; gap: 10px; color: var(--tx-lo); font-size: 10px; }
.community-radar-preview .community-radar-score { color: #90d7c8; }
.community-radar-trend { color: #d7c78f; }
.community-radar-name-row strong { color: var(--tx-hi); font-size: 14px; }
.community-radar-preview p { margin: 0; color: var(--tx-lo); font-size: 11px; line-height: 1.5; }
.community-radar-preview footer { display: flex; justify-content: space-between; gap: 8px; color: var(--tx-faint); font-size: 9px; border-top: 1px solid var(--line); padding-top: 10px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 40px; }
.explore-section { margin-top: 46px; padding-top: 6px; }
.explore-viral-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.viral-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: inherit; transition: .2s transform, .2s border-color; }
.viral-card:hover { transform: translateY(-3px); border-color: #586aff; }
.viral-card p { color: var(--tx-mid); font-size: 13px; line-height: 1.6; margin: 12px 0 10px; }
.viral-likes { color: #ff8a9d; font-size: 12px; font-weight: 700; }
.explore-people-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.explore-people-cols .discover-panel { margin: 0; }
.community-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; transition: .2s transform, .2s border-color; }
.community-card:hover { transform: translateY(-4px); border-color: #586aff; }
.community-card-top { display: flex; justify-content: space-between; }
.community-card h2 { font-size: 22px; margin: 24px 0 10px; }
.community-card p { color: var(--tx-lo); font-size: 13px; line-height: 1.7; min-height: 66px; }
.community-card footer { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; display: flex; justify-content: space-between; color: var(--tx-faint); font-size: 11px; }
.community-glyph { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: var(--sf-3); color: var(--ac-orange); flex: none; overflow: hidden; font: 700 13px/1 'Space Grotesk', sans-serif; padding-bottom: .04em; }
.search-community-glyph { position: relative; }
.search-community-avatar { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.search-community-glyph.image-loaded .search-community-avatar { opacity: 1; }
.search-community-glyph.image-loaded > .icon { visibility: hidden; }
.community-category { color: var(--ac-orange); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }

.community-detail { max-width: 1040px; margin: auto; padding: 50px var(--gutter) 100px; }
.post-detail-page { max-width: 1040px; margin: 0 auto; }
.post-detail-page .public-post { width: 100%; }
.post-detail-page .post-body { font-size: 17px; line-height: 1.8; }
.page-preloader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; gap: 12px; align-content: center; background: var(--sf-0); transition: opacity .35s ease, visibility .35s ease; }
.page-preloader .preloader-mark { width: 64px; height: 64px; object-fit: contain; animation: preloader-pulse 1s ease-in-out infinite; }
.page-preloader .preloader-label { color: var(--tx-mid); font: 600 13px 'Space Grotesk', sans-serif; letter-spacing: .2px; }
.preloader-line { width: 90px; height: 2px; overflow: hidden; background: var(--sf-3); }
.preloader-line::after { content: ''; display: block; width: 45%; height: 100%; background: var(--orange); animation: preloader-slide 1s ease-in-out infinite; }
.page-preloader { animation: preloader-failsafe .01s linear 3.5s forwards; }
.page-ready .page-preloader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes preloader-pulse { 50% { transform: scale(1.18); opacity: .65; } }
@keyframes preloader-slide { from { transform: translateX(-100%); } to { transform: translateX(220%); } }
.post-card video, .post-card audio { accent-color: var(--orange); }
.community-directory { max-width: 1320px; margin: auto; padding: 56px var(--gutter) 100px; }
.directory-heading { max-width: 720px; margin-bottom: 48px; }
.directory-heading h1 { font-size: clamp(36px, 5vw, 62px); margin: 10px 0 14px; }
.directory-heading p:not(.eyebrow) { color: var(--tx-lo); line-height: 1.7; }
.directory-section { margin-top: 34px; }
.community-directory-grid, .directory-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.directory-empty { grid-column: 1 / -1; color: var(--tx-faint); }
.community-post-link { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--tx-mid); }
.community-post-link span { color: var(--tx-faint); font-size: 11px; }
.community-post-link p { margin: 4px 0 0; color: var(--tx-lo); font-size: 12px; line-height: 1.5; }
.directory-post-grid .viral-card { min-height: 150px; }
.community-detail-hero { border-bottom: 1px solid var(--line); padding-bottom: 40px; }
.back-link { display: inline-block; color: var(--tx-faint); font-size: 12px; margin-bottom: 40px; }
.community-detail-hero h1 { font-size: clamp(40px, 7vw, 74px); }
.community-detail-hero > p:not(.eyebrow) { color: var(--tx-lo); font-size: 16px; max-width: 650px; line-height: 1.7; margin: 22px 0; }
.community-detail-meta { display: flex; align-items: center; gap: 20px; color: var(--tx-faint); font-size: 12px; flex-wrap: wrap; }
.community-detail-meta strong { color: var(--ac-orange); font: 600 22px 'Space Grotesk', sans-serif; }
.community-posts { max-width: 1570px; width: 100%; padding-top: 34px; }
.community-posts .panel-heading { margin-bottom: 14px; }
.privacy-check { display: flex !important; align-items: center; gap: 8px !important; }
.privacy-check input { width: auto !important; }
.role-button { border: 1px solid var(--bd-2); background: transparent; color: #aab4ff; border-radius: 8px; padding: 6px 8px; font-size: 10px; cursor: pointer; }
.role-button:hover { background: #586aff; color: #fff; }

.recap-layout { max-width: 1100px; margin: auto; padding: 42px var(--gutter) 90px; display: grid; gap: 18px; }
.recap-heading { padding: 8px 0 18px; }
.recap-heading h1 { font-size: 36px; margin: 4px 0 8px; }
.recap-heading > p:last-child { color: var(--tx-lo); font-size: 13px; margin: 0; }
.recap-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.recap-stat { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.recap-stat span { display: block; color: var(--tx-lo); font-size: 11px; }
.recap-stat strong { display: block; margin-top: 8px; color: var(--tx-hi); font: 600 28px 'Space Grotesk', sans-serif; }
.recap-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.recap-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.recap-section-heading .eyebrow, .recap-highlight .eyebrow { margin: 0 0 5px; }
.recap-section-heading h2, .recap-highlight h2 { margin: 0; font-size: 19px; }
.recap-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--tx-lo); font-size: 11px; }
.recap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.recap-legend i { width: 8px; height: 8px; border-radius: 2px; }
.recap-key-posts, .recap-bar-posts { background: #ff9850; }
.recap-key-comments, .recap-bar-comments { background: #63c6ba; }
.recap-key-shares, .recap-bar-shares { background: #aab4ff; }
.recap-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; height: 190px; padding-top: 4px; border-bottom: 1px solid var(--line); }
.recap-month { min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) 24px; gap: 7px; text-align: center; }
.recap-bar-track { min-height: 0; display: flex; align-items: end; border-radius: 4px 4px 0 0; background: var(--ov-1); }
.recap-bar { width: 100%; height: 100%; display: flex; flex-direction: column-reverse; overflow: hidden; border-radius: 4px 4px 0 0; }
.recap-bar span { display: block; flex: 0 0 auto; width: 100%; min-height: 0; }
.recap-month-label { color: var(--tx-lo); font-size: 10px; white-space: nowrap; }
.recap-empty { margin: 24px 0 10px; color: var(--tx-lo); font-size: 13px; }
.recap-highlight { display: grid; gap: 14px; }
.recap-highlight blockquote { margin: 0; color: var(--tx-hi); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.recap-highlight-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--tx-lo); font-size: 11px; }
.recap-highlight-meta a { color: var(--ac-teal); text-decoration: none; }
.recap-highlight-meta a:hover { color: #fff; }
.recap-muted { color: var(--tx-lo); font-size: 11px; }
.recap-topic-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.recap-topic { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 2px 8px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--ov-1); }
.recap-topic > b { grid-row: span 2; color: var(--ac-orange); font: 600 12px 'Space Grotesk', sans-serif; }
.recap-topic > span { overflow-wrap: anywhere; color: var(--tx-hi); font-size: 12px; font-weight: 600; }
.recap-topic > small { color: var(--tx-lo); font-size: 10px; }
.recap-month-topics { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); margin-top: 14px; width: 100%;}
.recap-month-topics > div { display: flex; justify-content: space-between; gap: 12px; min-width: 0; padding: 8px 0; border-top: 1px solid var(--line); font-size: 10px; min-width: 100%; max-width: 100vw}
.recap-month-topics strong { flex: none; color: var(--tx-lo); font-weight: 500; }
.recap-month-topics span { min-width: 0; overflow-wrap: anywhere; color: #74cfc4; text-align: right; }
.recap-comment-context { margin: 0; color: var(--tx-lo); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.discover-column { display: grid; align-content: start; gap: 18px; }
.discover-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-heading h2 { font-size: 15px; letter-spacing: -.5px; }
.panel-heading a, .panel-heading span { font-size: 10px; color: var(--ac-orange); text-transform: uppercase; letter-spacing: 1px; }
.discover-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 0; }
.discover-row strong { font-size: 12px; display: block; }
.discover-row span { color: var(--tx-faint); font-size: 10px; display: block; margin-top: 3px; }
.create-community { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.create-community input { padding: 9px; font-size: 11px; }
.create-community button { justify-self: start; margin-top: 3px; }

.settings-layout, .owner-layout { max-width: 1280px; margin: auto; padding: 55px var(--gutter) 100px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 55px); align-self: start; }
.settings-layout.sidebar-collapsed { grid-template-columns: 48px 1fr; }
.settings-layout.sidebar-collapsed .settings-nav > *:not(.sidebar-toggle) { visibility: hidden; }
.settings-nav h1 { font-size: 38px; margin-bottom: 30px; }
.settings-tabs { display: grid; gap: 2px; }
.settings-tabs > a, .settings-nav > a { display: block; padding: 11px 13px; color: var(--tx-faint); font-size: 13px; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.settings-tabs > a:hover, .settings-tabs .settings-active, .settings-nav > a:hover, .settings-nav .settings-active { color: #fff; border-color: var(--orange); background: var(--sf-2); }
.settings-content h2 { font-size: 34px; margin-bottom: 28px; }
.settings-form { display: grid; gap: 18px; width: 100%; }
.settings-form.compact { width: 100%; }
/* Fixed navigation column + flexible content column. The nav never resizes or
   moves between sections; only the content pane changes, and it always fills
   the remaining space (min-width:0 stops long text such as user-agent strings
   from stretching the grid, min-height keeps short sections from making the
   footer jump). Every section shares one readable max width. */
.settings-layout > .settings-nav { width: 100%; min-width: 0; }
.settings-content { min-width: 0; min-height: 60vh; }
.settings-content > .settings-form, .settings-content > .settings-block, .settings-content > .settings-form.compact { width: 100%; max-width: 820px; }
.settings-content .device-row strong { overflow-wrap: anywhere; }
.settings-form label, .settings-block label { display: grid; gap: 8px; color: var(--tx-lo); font-size: 12px; }
.settings-form label > span { display: flex; align-items: center; gap: 9px; }
.settings-form label > span input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 0; padding: 0; accent-color: var(--orange); }
.settings-block label{
  margin-top: 25px;
}
.link-fields { display: grid; gap: 8px; }
.link-field-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.link-field-row input { font-size: 12px; }
.settings-form textarea, .settings-block textarea { min-height: 110px; resize: vertical; }
.settings-form small, .settings-block p { color: var(--tx-faint); font-size: 11px; }
.settings-block { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 24px; margin-top: 26px; max-width: 820px; }
.settings-block h3, .settings-block h2 { font-size: 17px; margin: 0 0 8px; }
.settings-block-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.settings-theme-form { margin-top: 18px; }
.settings-theme-form label { margin-top: 0; }
.settings-content > form[action="/auth/logout"] { margin-top: 24px; }
.settings-block.danger-zone form[action="/settings/account/delete"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 18px; }
.settings-block.danger-zone form[action="/settings/account/delete"] input { min-width: 0; }
.settings-block.danger-zone form[action="/settings/account/delete"] button { min-height: 44px; }
.device-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 15px 0; }
.device-icon { width: 34px; height: 34px; flex: none; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ac-blue); font-size: 15px; display: flex; justify-content: center;align-items: center;}
.device-row > div:nth-child(2) { flex: 1; min-width: 0; }
.device-row strong, .device-row span { display: block; }
.device-row strong { font-size: 12px; }
.device-row span { color: var(--tx-faint); font-size: 10px; margin-top: 4px; }
.device-row em { color: #5ad99a; font-style: normal; font-size: 10px; }
.danger-zone { border-color: var(--bd-2); }
.settings-link { display: block; color: #8e9eff; font-size: 12px; margin: 8px 2px; font-weight: 600; }
.owner-layout { display: block; max-width: 1120px; }
.owner-hero { border-bottom: 1px solid var(--line); padding-bottom: 40px; }
.owner-hero h1 { font-size: 54px; }
.owner-hero > p:not(.eyebrow) { color: var(--tx-lo); max-width: 590px; margin: 20px 0; }
.owner-stat { color: var(--tx-faint); font-size: 12px; }
.owner-stat strong { color: var(--ac-orange); font: 600 26px 'Space Grotesk', sans-serif; margin-right: 5px; }
.owner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; margin-top: 30px; }
.owner-grid .settings-block { max-width: none; margin-top: 30px; }
.owner-posts { grid-column: 1 / -1; }
.owner-posts article { border-top: 1px solid var(--line); padding: 14px 0; }
.owner-posts article p { color: var(--tx-mid); margin: 8px 0; }

/* Upload dropzone */
.upload-dropzone {
  position: relative; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 2px 12px;
  width: 100%; min-height: 90px; margin-top: 12px; padding: 15px; border: 1px dashed var(--bd-2); border-radius: 12px;
  background: var(--sf-1); color: var(--tx-mid); cursor: pointer; transition: border-color .2s, background .2s;
}
.upload-dropzone:hover, .upload-dropzone-active { border-color: #7d8cff; background: var(--sf-2); }
.upload-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-dropzone-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #5261a0; border-radius: 50%; color: #9cabff; font-size: 20px; grid-row: span 2; }
.upload-dropzone-copy { display: grid; gap: 2px; font-size: 12px; }
.upload-dropzone-copy strong { color: var(--tx-hi); font-size: 12px; }
.upload-dropzone-copy small { color: var(--tx-faint); font-size: 10px; }
.upload-status { grid-column: 2; color: #66dfa3; font-size: 10px; min-height: 15px; }
.upload-status-error { color: #ff91a7; }
.upload-preview { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.upload-preview-item { position: relative; display: grid; grid-template-columns: 56px 1fr 22px; align-items: center; gap: 8px; min-width: 0; padding: 7px; background: var(--sf-2); border: 1px solid var(--bd-2); border-radius: 8px; }
.upload-preview-item img, .upload-preview-item video { width: 56px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--sf-0); }
.upload-preview-item audio { width: 56px; }
.upload-preview-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx-lo); font-size: 10px; }
.upload-remove { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--sf-3); color: #fff; cursor: pointer; }
.upload-remove:hover { background: #8d3852; }

/* ==========================================================================
   9. Responsive breakpoints
   ========================================================================== */
@media (max-width: 1150px) {
  .app-layout { grid-template-columns: 200px minmax(0, 1fr); justify-content: stretch; }
  .discover-column { display: none; }
  .profile-layout { grid-template-columns: 1fr; max-width: 900px; }
}

@media (max-width: 900px) {
  .app-nav nav { display: none; }
  .nav-links { display: none; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-search { display: none; }
  .welcome { display: none; }
  .app-layout { grid-template-columns: 1fr; padding: 22px 18px 40px; gap: 22px; }
  /* The hamburger drawer (opened from .nav-menu-toggle) already carries Home,
     Explore, Communities, Messages, Groups, Notifications, Profile and
     Settings, so the in-page sidebar copy is redundant below this width -
     showing both was also the source of a genuine layout bug (the sidebar's
     content could overlap the feed heading). Hide it outright rather than
     re-flowing it. */
  .app-sidebar, .sidebar-toggle { display: none; }
  .app-layout.sidebar-collapsed { display: block; }
  .discover-column { display: grid; order: 3; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .container { width: min(calc(100% - 32px), 600px); }
  .hero { grid-template-columns: 1fr; padding-top: 40px; min-height: auto; }
  .hero-visual { height: 360px; order: -1; }
  .hero-copy { padding-bottom: 60px; }
  h1 { font-size: 44px; }
  .trust-strip { gap: 14px; justify-content: flex-start; overflow: hidden; white-space: nowrap; }
  .principles { padding: 80px 0; display: block; }
  .principles h2 { font-size: 40px; margin-bottom: 44px; }
  .principle-grid { grid-template-columns: 1fr; gap: 34px; }
  .stats-section { display: block; padding: 20px 0 80px; }
  .stats-section .section-intro { margin-bottom: 40px; }
  .growth-section { padding: 0 0 70px; }
  .growth-section h2 { font-size: 32px; }
  .growth-grid { grid-template-columns: 1fr; gap: 20px; }
  .community-row { grid-template-columns: 24px 1fr; }
  .community-map-layout { grid-template-columns: 1fr; }
  .community-map-canvas { height: 56vh; min-height: 360px; }
  .community-map-list { max-height: 520px; }
  .community-map-tools { flex-wrap: wrap; }
  .community-map-search { flex-basis: 100%; }
  .community-map-category { flex: 1; }
  .community-map-category select { width: 100%; }
  .community-members { grid-column: 2; }
  .story-section { padding: 60px 0; display: block; margin-bottom: 80px; }
  .story-marker { margin-bottom: 30px; }
  .story-section h2 { font-size: 38px; }
  .cta-band { padding: 36px 24px; display: block; }
  .cta-band h2 { font-size: 34px; margin-bottom: 24px; }
  .info-main { padding: 60px 0 80px; }
  .info-intro { font-size: 15px; margin-bottom: 50px; }
  .info-sections { grid-template-columns: 1fr; gap: 36px; }
  .auth-shell { padding: 26px 0; }
  .auth-brand { margin-bottom: 26px; }
  .auth-card { padding: 28px 20px; }
  .explore-page, .community-detail { padding: 40px var(--gutter) 70px; }
  .explore-search { display: grid; }
  .explore-search select { width: 100%; }
  .explore-viral-grid { grid-template-columns: 1fr; }
  .explore-people-cols { grid-template-columns: 1fr; }
  .search-discovery-grid { grid-template-columns: 1fr; }
  .community-directory { padding: 40px var(--gutter) 70px; }
  .post-detail-page { max-width: none; margin: 0; }
  .community-detail-meta { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .settings-layout, .owner-layout { display: block; padding: 30px var(--gutter) 70px; }
  /* The desktop rule makes this sticky with a top offset for the sticky-scroll
     effect. Overriding position alone isn't enough: position:relative still
     honors that inherited `top`, which visually shifts the nav down from its
     layout box without moving where the next sibling starts - producing an
     overlap. Resetting top removes the offset along with the sticky behavior. */
  .settings-nav { position: static; top: auto; margin-bottom: 30px; }
  .settings-layout.sidebar-collapsed { display: block; }
  .settings-nav h1 { font-size: 32px; }
  /* A non-wrapping, horizontally scrollable strip of tabs. Because it never
     wraps to a second line, its height is fixed and it can't grow into the
     content below - that unpredictable height was what let the tabs overlap
     "Make your profile yours." and the rest of the settings form. */
  .settings-tabs { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .settings-tabs > a { flex: none; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; }
  .settings-content h2 { font-size: 28px; }
  .settings-block-heading form { margin-top: 12px; }
  .owner-hero h1 { font-size: 38px; }
  .owner-grid { display: block; }
  .owner-grid .settings-block { margin-top: 16px; }
  .profile-identity { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .app-nav { padding: 0 14px; gap: 10px; }
  .profile-community-highlights { grid-template-columns: 1fr; gap: 18px; }
  .recap-layout { padding-top: 28px; }
  .recap-heading h1 { font-size: 30px; }
  .recap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recap-section-heading { align-items: flex-start; flex-direction: column; }
  .recap-chart { gap: 4px; height: 155px; }
  .recap-panel { padding: 16px 12px; }
  .feed-heading h1 { font-size: 27px; max-width: 100%; overflow-wrap: anywhere; }
  .feed-heading .button { width: 100%; justify-content: center; }
  .feed-tabs { gap: 18px; }
  .composer-actions { justify-content: space-between; }
  .composer select { max-width: 46%; }
  .post-source { display: none !important; }
  .notifications-heading { display: block; }
  .notifications-heading form { margin-top: 12px; }
  .upload-preview { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 10. Messages ----------------------------------------------------------------*/
.community-posts > a.activity-row { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 16px 20px; margin-bottom: 10px; transition: border-color .15s ease, background .15s ease; }
.community-posts > a.activity-row:hover { border-color: var(--bd-2); background: var(--sf-2); }
.message-thread { display: grid; gap: 10px; margin: 18px 0; }
.message-thread .activity-row { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 12px 16px; max-width: min(82%, 680px); }
.message-thread .message-own { margin-left: auto; background: var(--sf-3); border-color: var(--bd-2); }
.group-thread .activity-row { border-radius: 14px; }
@media (max-width: 700px) { .message-thread .activity-row { max-width: 92%; } }


/* 11. Icons & interaction polish ---------------------------------------------*/
.icon { flex: none; display: inline-block; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-arrow { display: inline-flex; align-items: center; margin-left: 2px; }
.inline-arrow { margin-left: 3px; vertical-align: -2px; }
.button { align-items: center; }
.button span { font-size: inherit; display: inline-flex; align-items: center; }
.side-links a .icon { color: var(--tx-faint); }
.side-links a:hover .icon, .side-links .side-active .icon { color: var(--ac-blue); }
.sidebar-toggle { display: grid; place-items: center; padding: 0; }
.app-layout.sidebar-collapsed .sidebar-toggle svg, .settings-layout.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.nav-menu-toggle .icon, .nav-drawer-close .icon { display: block; }
.nav-drawer-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; }
.nav-drawer-panel a .icon, .nav-drawer-panel form button .icon { color: var(--ac-blue); }
.nav-search-icon { display: grid; place-items: center; }
.notification-button .icon { display: block; }
.round-action { display: inline-grid; place-items: center; padding: 0; line-height: 1; }
.community-glyph .icon { display: block; }
.preloader-mark .icon { display: block; }
.upload-dropzone-icon svg { display: block; }
.upload-remove { display: inline-grid; place-items: center; }
.viral-likes { display: inline-flex; align-items: center; gap: 5px; }
.viral-likes .icon { fill: currentColor; }
.activity-icon .icon { display: block; }
.post-open-link { display: inline-flex; align-items: center; gap: 6px; }

/* Post actions: SVG icon + count. */
.post-actions button, .post-actions .post-stat { gap: 7px; }
.post-actions .post-stat > span, .post-actions button > span.count, .post-actions button > span.label { padding: 0; border-radius: 0; cursor: inherit; font-variant-numeric: tabular-nums; }
.post-actions .icon, .reaction-bar .icon { transition: transform .15s ease, color .15s ease, fill .15s ease; }
.post-actions button:hover .icon-heart, .action-like:hover .icon-heart { transform: scale(1.12); }
.action-like.is-liked, .comment-like-form .action-like.is-liked { color: #ff5f8a; }
.action-like.is-liked .icon-heart { fill: currentColor; }
.action-save.is-saved { color: #ffb15c; }
.action-save.is-saved .icon-bookmark { fill: currentColor; }
.post-actions .action-like.is-liked:hover { color: #ff7ea1; }
.reaction-bar button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; }
.comment-like-form { display: inline-flex; margin-top: 6px; }
.comment-like-form button, .thread-comment .action-like { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; color: var(--tx-faint); font-size: 12px; cursor: pointer; padding: 4px 0; }
.comment-like-form button:hover { color: #fff; }
.post-owner-tools summary { display: inline-flex; align-items: center; gap: 6px; }
.profile-post-actions .action-like, .profile-post-actions .action-save { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 560px) {
  .composer { padding: 14px; gap: 10px; }
}

/* 12. Chat, GIFs, sharing, groups, post page ---------------------------------*/
body.no-scroll { overflow: hidden; }
.avatar.medium { width: 46px; height: 46px; font-size: 17px; }
.avatar.group-avatar { background: linear-gradient(135deg, #3b4bd6, #8a3bd6); }
.avatar.group-info-avatar { width: 92px; height: 92px; font-size: 34px; border: 3px solid var(--ink); }

/* Chat panel: header + scrolling messages + composer pinned at the bottom. */
.chat-main { width: 100%; margin: 0 auto; padding: 16px var(--gutter) 22px; }
.chat-shell { position: relative; display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 56px); height: calc(100dvh - var(--header-h) - 56px); min-height: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.chat-header { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sf-1); }
.chat-back, .chat-header-action { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--tx-mid); flex: none; }
.chat-back:hover, .chat-header-action:hover { background: var(--sf-2); color: #fff; }
.chat-title { display: grid; gap: 1px; min-width: 0; flex: 1; line-height: 1.3; }
.chat-title strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title span, .chat-title a { font-size: 12px; color: var(--tx-lo); }
.chat-search { display: flex; align-items: center; flex: 0 1 220px; min-width: 120px; height: 38px; padding: 0 4px 0 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--sf-2); }
.chat-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; border: none; box-shadow: none;}
.chat-search input::placeholder { color: var(--tx-lo); }
.chat-search button { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--tx-mid); cursor: pointer; }
.chat-search button:hover { background: var(--sf-3); }
.chat-search button:disabled { opacity: .5; cursor: wait; }
.chat-search-results { position: absolute; z-index: 5; top: calc(100% - 2px); right: 16px; display: grid; width: min(360px, calc(100vw - 32px)); max-height: min(55vh, 420px); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--sf-2); color: var(--tx-mid); font-size: 13px; box-shadow: 0 12px 30px #0008; }
.chat-search-results[hidden] { display: none; }
.chat-search-result { display: grid; gap: 3px; padding: 9px 10px; border-radius: 5px; color: inherit; text-decoration: none; }
.chat-search-result:hover { background: var(--sf-3); }
.chat-search-result strong { font-size: 12px; color: var(--ac-blue); }
.chat-search-result span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-search-result time { font-size: 10px; color: var(--tx-lo); }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 8px; overscroll-behavior: contain; display: flex; flex-direction: column; }
.chat-messages { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.chat-empty { margin: auto; padding: 40px 16px; text-align: center; color: var(--tx-faint); font-size: 14px; }
.chat-load-more { align-self: center; flex: none; margin-bottom: 12px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ac-blue); font-size: 12px; cursor: pointer; }
.chat-load-more:hover { background: var(--sf-2); }
.chat-day { display: flex; justify-content: center; margin: 14px 0 8px; }
.chat-day span { font-size: 11px; color: var(--tx-lo); background: var(--sf-2); padding: 4px 12px; border-radius: 999px; }
.chat-system { text-align: center; font-size: 12px; color: var(--tx-lo); margin: 8px 0; }
.chat-system strong { color: var(--tx-mid); font-weight: 600; }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.chat-msg.is-own { flex-direction: row-reverse; }
.chat-msg-avatar { flex: none; }
.chat-msg-main { display: flex; flex-direction: column; min-width: 0; max-width: min(85%, 720px); }
.chat-msg.is-own .chat-msg-main { align-items: flex-end; }
.chat-sender { font-size: 11px; color: var(--ac-blue); margin: 0 8px 3px; }
.chat-bubble { background: var(--sf-3); color: #eceefb; padding: 9px 14px; border-radius: 18px 18px 18px 6px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg.is-own .chat-bubble { background: linear-gradient(135deg, #4d65ff, #6b4dff); color: #fff; border-radius: 18px 18px 6px 18px; }
.chat-msg.is-search-match .chat-bubble { outline: 2px solid #f2a65a; outline-offset: 2px; }
.chat-bubble.is-media { padding: 3px; background: transparent !important; }
.chat-text { margin: 0; white-space: pre-wrap; }
.chat-gif { display: block; max-width: min(340px, 100%); height: auto; border-radius: 14px; background: var(--sf-2); }
.chat-bubble .chat-gif + .chat-text { margin-top: 6px; }
.chat-time { font-size: 10.5px; color: var(--tx-faint); margin: 3px 8px 0; }
.chat-post { display: flex; gap: 10px; width: min(380px, 100%); margin-bottom: 6px; background: rgba(0, 0, 0, .28); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; }
.chat-post img { width: 70px; height: 70px; object-fit: cover; flex: none; }
.chat-post-video { width: min(320px, 100%); max-height: min(45vh, 360px); background: var(--sf-2); border-radius: 12px; }
.chat-post.is-video { flex-direction: column; gap: 0; }
.chat-post-body { display: grid; gap: 2px; padding: 9px 11px; min-width: 0; align-content: center; color: inherit; text-decoration: none; }
.chat-post-kind { font-size: 11px; color: var(--ac-blue); }
.chat-post-text { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chat-post.is-unavailable { padding: 10px 12px; align-items: center; gap: 8px; font-size: 13px; color: var(--tx-mid); }
.chat-msg.is-pending .chat-bubble { opacity: .65; }
.chat-msg.is-failed .chat-bubble { outline: 1px solid #ff5f7a; }
.chat-msg.is-failed .chat-status { color: #ff8da2; }
.chat-message-report { align-self: flex-start; margin: 3px 8px 0; }
.chat-message-report > summary { min-height: 28px; padding: 3px 8px; font-size: 10px; }
.chat-message-report > form { width: min(280px, calc(100vw - 48px)); }
.chat-retry { border: 0; background: transparent; color: var(--ac-blue); font-size: 12px; text-decoration: underline; cursor: pointer; margin: 2px 8px 0; }
.chat-jump { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--orange); color: #1a0f05; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 3; }
.chat-jump[hidden] { display: none; }
.chat-jump-arrow { transform: rotate(90deg); }
.chat-error { flex: none; margin: 0; padding: 8px 18px; background: var(--sf-2); color: var(--ac-rose); font-size: 12px; }
.chat-error[hidden] { display: none; }
.chat-retention { margin: 0; padding: 0 18px 10px; font-size: 11px; line-height: 1.5; color: var(--tx-lo); }
.chat-composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--sf-1); }
.chat-composer textarea { flex: 1 1 180px; min-width: 0; min-height: 44px; max-height: 140px; resize: none; padding: 11px 18px; border-radius: 22px; background: var(--sf-2); border: 1px solid transparent; font-size: 15px; line-height: 1.4; overflow-y: auto; }
.chat-composer textarea:focus { border-color: #586aff; box-shadow: none; outline: none; }
.chat-send, .chat-tool { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; }
.chat-send { background: var(--orange); color: #1a0f05; }
.chat-send:hover { filter: brightness(1.08); }
.chat-tool { position: relative; background: var(--sf-2); color: var(--ac-blue); overflow: hidden; }
.chat-tool:hover { background: var(--sf-3); color: #fff; }
.chat-tool input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chat-attachment-plus { display: inline-block; font-size: 28px; line-height: 1; font-weight: 700; transform: translateY(-1px); }
.chat-attachment-selected { display: inline-flex; align-items: center; gap: 6px; max-width: min(220px, 36vw); padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--sf-2); border: 1px solid var(--line); color: #dfe1f2; font-size: 12px; line-height: 1.2; }
.chat-attachment-selected[hidden] { display: none; }
.chat-attachment-selected span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment-selected button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--tx-mid); cursor: pointer; }
.chat-attachment-selected button:hover { background: var(--sf-3); }
.chat-attachment-pending { display: inline-flex; align-items: center; max-width: 100%; padding: 6px 10px; border-radius: 999px; background: var(--ov-2); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 7px 10px; border-radius: 999px; background: var(--ov-1); color: #edf0ff; text-decoration: none; }
.chat-attachment-media { display: block; max-width: min(360px, 100%); max-height: min(60vh, 480px); height: auto; border-radius: 14px; background: var(--sf-2); object-fit: contain; }
.gif-badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; border: 1.5px solid currentColor; border-radius: 6px; padding: 1px 5px; line-height: 1.3; }

/* GIF picker */
.gif-picker { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: end center; }
.gif-picker[hidden] { display: none; }
.gif-picker-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 12, .6); }
.gif-picker-panel { position: relative; width: min(460px, 100%); height: min(560px, 82vh); margin: 0 0 16px; display: flex; flex-direction: column; background: var(--sf-1); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); overflow: hidden; }
.gif-picker-head { flex: none; display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.gif-picker-search { flex: 1; min-height: 42px; border-radius: 999px; padding: 0 16px; }
.gif-picker-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--sf-2); color: var(--tx-mid); font-size: 22px; cursor: pointer; }
.gif-picker-body { flex: 1; overflow-y: auto; padding: 10px; overscroll-behavior: contain; }
.gif-picker-grid { columns: 2; column-gap: 8px; }
.gif-item { display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--sf-2); cursor: pointer; break-inside: avoid; }
.gif-item img { display: block; width: 100%; height: auto; }
.gif-item:hover, .gif-item:focus-visible { outline: 2px solid var(--orange); }
.gif-picker-status { text-align: center; color: var(--tx-lo); font-size: 13px; margin: 10px 0; }
.gif-picker-status[hidden], .gif-picker-more[hidden] { display: none; }
.gif-picker-more { display: block; margin: 6px auto 10px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ac-blue); cursor: pointer; }
.gif-picker-credit { flex: none; margin: 0; padding: 6px; text-align: center; font-size: 10px; color: var(--tx-faint); border-top: 1px solid var(--line); }

/* Share sheet ("Send post") */
.share-sheet { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; }
.share-sheet[hidden] { display: none; }
.share-sheet-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 12, .66); }
.share-sheet-panel { position: relative; width: min(440px, 100%); max-height: min(640px, 88vh); display: flex; flex-direction: column; background: var(--sf-1); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); overflow: hidden; }
.share-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.share-sheet-head h2 { margin: 0; font-size: 16px; }
.share-sheet-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--tx-mid); cursor: pointer; }
.share-sheet-x:hover { background: var(--sf-2); }
.share-sheet-search { display: flex; align-items: center; gap: 8px; margin: 6px 16px 8px; padding: 0 14px; border-radius: 999px; background: var(--sf-2); color: var(--tx-lo); }
.share-sheet-search input { flex: 1; border: 0; background: transparent; min-height: 42px; padding: 0; box-shadow: none; }
.share-sheet-list { flex: 1; min-height: 160px; overflow-y: auto; padding: 0 10px 8px; }
.share-sheet-list h3 { margin: 12px 8px 4px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--tx-faint); }
.share-sheet-empty { padding: 28px 12px; text-align: center; color: var(--tx-lo); font-size: 13px; margin: 0; }
.share-target { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; position: relative; }
.share-target:hover { background: var(--sf-2); }
.share-target-name { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.share-target-name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-target-name small { color: var(--tx-lo); font-size: 11px; }
.share-target input { position: absolute; opacity: 0; pointer-events: none; }
.share-target-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bd-2); flex: none; display: grid; place-items: center; }
.share-target input:checked ~ .share-target-tick { background: var(--orange); border-color: var(--orange); }
.share-target input:checked ~ .share-target-tick::after { content: ''; width: 5px; height: 10px; border: solid #1a0f05; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.share-target input:focus-visible ~ .share-target-tick { outline: 2px solid #586aff; outline-offset: 2px; }
.share-sheet-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.share-sheet-note { flex: 1; min-width: 0; min-height: 42px; border-radius: 999px; padding: 0 16px; }
.share-sheet-send { flex: none; }
.share-sheet-links { display: flex; gap: 8px; padding: 0 16px 12px; }
.share-sheet-links button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--tx-mid); font-size: 12px; cursor: pointer; }
.share-sheet-links button[hidden] { display: none; }
.share-sheet-links button:hover { background: var(--sf-2); }
.share-sheet-status { margin: 0; padding: 0 16px 12px; font-size: 12px; color: #9de8c1; }
.share-sheet-status.is-error { color: var(--ac-rose); }
.share-sheet-status[hidden] { display: none; }

/* Group info / invite pages */
.group-info-page { width: min(760px, 100%); margin: 0 auto; padding: 22px var(--gutter) 60px; }
.group-info-head { display: flex; align-items: center; gap: 18px; margin: 12px 0 22px; }
.group-info-head h1 { margin: 2px 0; font-size: 26px; letter-spacing: -.5px; }
.group-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.group-panel h2 { margin: 0 0 12px; font-size: 16px; }
.group-form { display: grid; gap: 12px; margin-bottom: 14px; }
.group-form label { display: grid; gap: 6px; font-size: 12px; color: var(--tx-lo); }
.group-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.group-avatar-form { border-top: 1px dashed var(--line); padding-top: 14px; }
.invite-box { display: flex; gap: 8px; margin: 12px 0; }
.invite-box input { flex: 1; min-width: 0; }
.group-suggest { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; margin: 0; }
.group-suggest legend { font-size: 11px; color: var(--tx-lo); padding: 0 6px; }
.group-suggest-item { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px; padding: 5px 4px; cursor: pointer; color: #dfe1f2 !important; font-size: 13px !important; }
.group-suggest-item input { width: auto; }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.member-row:first-child { border-top: 0; }
.member-name { flex: 1; min-width: 120px; font-size: 14px; }
.member-badge { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: #ffb15c; border: 1px solid var(--bd-2); border-radius: 999px; padding: 2px 9px; }
.member-actions { display: flex; gap: 6px; }
.member-actions form { display: inline-flex; }
.member-action { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: transparent; color: var(--tx-mid); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.member-action:hover { background: var(--sf-2); }
.member-action.is-danger { color: #ff9db0; border-color: var(--bd-2); }
.group-danger { border-color: var(--bd-1); }
.group-join-card { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 34px 24px; margin-top: 30px; }
.group-join-card h1 { margin: 0; font-size: 26px; }
.group-row .avatar { flex: none; }

/* Post page (opened post) */
.post-page { width: min(1216px, 100%); margin: 0 auto; padding: 16px var(--gutter) 70px; }
.post-page-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-page-bar h1 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.post-back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--tx-mid); }
.post-back:hover { background: var(--sf-2); color: #fff; }
.post-view { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 10px; margin-bottom: 24px; }
.post-view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-view-author { display: grid; line-height: 1.35; }
.post-view-author strong { font-size: 15px; }
.post-view-author span { font-size: 12.5px; color: var(--tx-lo); }
.post-view-body { font-size: 18px; line-height: 1.75; color: var(--tx-hi); white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 16px; }
.post-view.has-content-warning .post-view-body { filter: blur(14px); user-select: none; pointer-events: none; }
.post-view-counts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 14px 0; margin-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--tx-lo); }
.post-view-counts strong { color: #fff; font-weight: 700; margin-right: 3px; }
/* Flat, icon-first actions - deliberately not boxed buttons. */
.post-view-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.post-view-actions form { display: flex; min-width: 0; }
.post-view-actions button, .post-view-actions .action-link { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--tx-lo); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease; }
.post-view-actions > form button, .post-view-actions > button, .post-view-actions > a { width: 100%; min-width: 0; white-space: nowrap; }
.post-view-actions button:hover, .post-view-actions .action-link:hover { background: var(--ov-1); color: #fff; }
.post-view-actions .action-like.is-liked { color: #ff4d7a; }
.post-view-actions .action-like.is-liked .icon-heart { fill: currentColor; }
.post-view-actions .action-save.is-saved { color: #ffb15c; }
.post-view-actions .action-save.is-saved .icon-bookmark { fill: currentColor; }
.just-liked .icon-heart { animation: heart-pop .38s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes heart-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.reaction-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.reaction-strip form { display: inline-flex; }
.reaction-strip button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--tx-lo); font-size: 12px; cursor: pointer; }
.reaction-strip button:hover { color: #fff; border-color: var(--bd-2); }
.reaction-strip button.is-selected { color: #fff; border-color: #586aff; background: rgba(77, 101, 255, .18); }
.reaction-strip .count { color: var(--tx-mid); font-variant-numeric: tabular-nums; }
.post-more { margin: 4px 0 10px; }
.post-more > summary { display: inline-flex; align-items: center; gap: 7px; padding: 6px 2px; color: var(--tx-lo); font-size: 12.5px; cursor: pointer; list-style: none; }
.post-more > summary::-webkit-details-marker { display: none; }
.post-more > summary:hover { color: #fff; }

/* Comments */
.replies-section .panel-heading { margin-bottom: 12px; }
.no-comments { color: var(--tx-faint); font-size: 13px; margin: 14px 0; }
.no-comments[hidden] { display: none; }
.post-detail-thread { max-height: none; overflow: visible; padding-right: 0; }
.comment-form { display: block; border-top: 0; padding-top: 0; margin-top: 0; }
.comment-form-row { display: flex; align-items: flex-end; gap: 10px; }
.comment-form .comment-field { flex: 1 1 auto; }
.comment-form textarea[name="body"] { display: block; width: 100%; min-height: 104px; padding: 12px 15px; border-radius: 12px; background: var(--sf-2); border: 1px solid transparent; font-size: 14px; line-height: 1.55; resize: vertical; }
.comment-form textarea[name="body"]:focus { border-color: #586aff; box-shadow: none; }
.comment-form .avatar { margin-bottom: 5px; }
.comment-tool { flex: none; display: grid; place-items: center; height: 40px; min-width: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--sf-2); color: var(--ac-blue); cursor: pointer; }
.comment-tool:hover { background: var(--sf-3); color: #fff; }
.comment-form .comment-submit { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--orange); color: #1a0f05; font-size: 13px; font-weight: 700; cursor: pointer; }
.comment-form .comment-submit:hover { filter: brightness(1.08); background: var(--orange); }
.comment-form .comment-submit:disabled { opacity: .55; cursor: default; }
.comment-form.is-compact { margin-top: 8px; }
.comment-form.is-compact textarea[name="body"] { min-height: 78px; font-size: 13px; }
.comment-form.is-compact .comment-submit { height: 40px; padding: 0 14px; font-size: 12px; }
.comment-gif-preview { position: relative; display: inline-block; margin: 10px 0 0 4px; }
.comment-gif-preview[hidden] { display: none; }
.comment-gif-preview img { display: block; max-height: 150px; max-width: 240px; height: auto; border-radius: 12px; }
.comment-gif-preview button { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(8, 9, 20, .8); color: #fff; cursor: pointer; }
.replies-section > .comment-form { margin-bottom: 18px; }
.comment-gif { display: block; max-width: min(260px, 100%); height: auto; border-radius: 14px; margin-top: 8px; }
.thread-comment-head time { display: inline; margin: 0 0 0 auto; }
.thread-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 8px; }
.thread-comment-actions .comment-like-form { margin: 0; }
.thread-comment-actions details { font-size: 12px; color: var(--tx-faint); }
.thread-comment-actions details[open] { flex-basis: 100%; }
.thread-comment-actions summary { cursor: pointer; }
.comment-report { flex-basis: auto !important; }
.comment-report[open] { flex-basis: 100% !important; }
.comment-report > form { width: min(320px, 100%); }
.thread-comment-actions .action-like.is-liked { color: #ff4d7a; }
.thread-comment-actions .action-like.is-liked .icon-heart { fill: currentColor; }
.thread-comment-new { animation: comment-in .4s ease; }
@keyframes comment-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .chat-main { padding: 0; }
  .chat-shell { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); border-radius: 0; border-left: 0; border-right: 0; }
  .chat-header { gap: 7px; padding: 10px; }
  .chat-search { flex-basis: 150px; min-width: 108px; }
  .chat-search-results { right: 10px; }
  .chat-msg-main { max-width: 84%; }
  .gif-picker-panel { margin: 0; border-radius: 18px 18px 0 0; width: 100%; height: 78vh; }
  .post-view { padding: 18px 16px 8px; border-radius: 16px; }
  .post-view-body { font-size: 17px; }
  .post-view-actions .label { display: none; }
  .comment-form .comment-submit span { display: none; }
  .comment-form .comment-submit { width: 44px; padding: 0; justify-content: center; }
  .group-info-head { flex-direction: column; text-align: center; }
}
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Dedicated community workspace and full-page post composition. */
.community-create-shortcut { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
.community-workspace { width: min(1280px, 100%); margin: auto; padding: 42px var(--gutter) 80px; }
.community-workspace-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.community-workspace-header .back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; color: var(--tx-lo); font-size: 12px; }
.community-workspace-header .eyebrow { margin-bottom: 9px; }
.community-workspace-header h1 { font-size: 38px; }
.community-workspace-count { display: grid; justify-items: end; line-height: 1.2; }
.community-workspace-count strong { font: 700 28px 'Space Grotesk', sans-serif; color: var(--orange); }
.community-workspace-count span { color: var(--tx-faint); font-size: 11px; text-transform: uppercase; }
.community-workspace-layout { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 54px); padding-top: 28px; }
.community-workspace-create { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.community-workspace-section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; }
.community-workspace-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 152, 80, .12); color: var(--orange); }
.community-workspace-section-heading h2 { font-size: 16px; letter-spacing: 0; }
.community-workspace-section-heading p { margin: 4px 0 0; color: var(--tx-faint); font-size: 11px; line-height: 1.5; }
.community-workspace-form { display: grid; gap: 14px; }
.community-workspace-form > label:not(.community-workspace-private) { display: grid; gap: 6px; color: var(--tx-lo); font-size: 11px; font-weight: 600; }
.community-workspace-form input:not([type="checkbox"]), .community-workspace-form textarea { width: 100%; min-width: 0; border: 1px solid var(--bd-1); border-radius: 7px; background: var(--sf-1); color: var(--tx-hi); padding: 10px 11px; font-size: 13px; }
.community-workspace-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.community-workspace-private { display: flex; align-items: center; gap: 8px; color: var(--tx-lo); font-size: 12px; }
.community-workspace-private input { width: 16px; height: 16px; margin: 0; accent-color: var(--orange); }
.community-workspace-form > button { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 2px; }
.community-workspace-owned { min-width: 0; }
.community-workspace-owned > .community-workspace-section-heading { padding: 0 0 4px; }
.community-owned-list { display: grid; border-top: 1px solid var(--line); }
.community-owned-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.community-owned-mark { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 9px; background: var(--sf-3); color: #ffc078; font: 700 17px/1 'Space Grotesk', sans-serif; padding-bottom: .04em; }
.community-owned-mark img { width: 100%; height: 100%; object-fit: cover; }
.community-owned-copy { min-width: 0; }
.community-owned-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.community-owned-title h3 { min-width: 0; overflow-wrap: anywhere; font-size: 15px; letter-spacing: 0; }
.community-owned-title > span { flex: none; padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--tx-lo); font-size: 9px; text-transform: uppercase; }
.community-owned-copy p { margin: 4px 0; overflow-wrap: anywhere; color: var(--tx-lo); font-size: 12px; line-height: 1.5; }
.community-owned-copy small { color: var(--tx-faint); font-size: 10px; }
.community-owned-actions { display: flex; align-items: center; gap: 7px; }
.community-owned-actions .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.community-workspace-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; border: 1px dashed var(--line); border-radius: 8px; color: var(--tx-faint); text-align: center; }
.community-workspace-empty strong { color: var(--tx-mid); font-size: 13px; }
.community-workspace-empty span { font-size: 11px; }
.post-tool-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; color: var(--tx-mid); font-size: 12px; font-weight: 600; }
.post-tool-link:hover { color: #fff; }
.post-compose-page { width: min(820px, 100%); margin: 0 auto; padding: 36px var(--gutter) 76px; }
.post-compose-heading { margin-bottom: 22px; }
.post-compose-heading .back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; color: var(--tx-lo); font-size: 12px; }
.post-compose-heading .eyebrow { margin-bottom: 8px; }
.post-compose-heading h1 { font-size: 36px; }
.post-compose-source, .post-compose-form { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.post-compose-source { margin-bottom: 14px; padding: 18px 20px; }
.post-compose-source > header, .post-compose-form-heading { display: flex; align-items: center; gap: 10px; }
.post-compose-source > header > div, .post-compose-form-heading > div { display: grid; gap: 3px; min-width: 0; }
.post-compose-source > header strong, .post-compose-form-heading strong { font-size: 12px; }
.post-compose-source > header span, .post-compose-form-heading span { color: var(--tx-faint); font-size: 10px; }
.post-compose-source-body { margin: 14px 0 0 42px; color: var(--tx-mid); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.post-compose-context { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--tx-lo); font-size: 12px; }
.post-compose-context svg { color: var(--orange); }
.post-compose-form { padding: 20px; }
.post-compose-form-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.post-compose-field { display: grid; gap: 9px; margin: 17px 0; color: var(--tx-lo); font-size: 12px; font-weight: 600; }
.post-compose-field textarea { width: 100%; min-height: 320px; resize: vertical; padding: 16px; border: 1px solid var(--bd-1); border-radius: 8px; background: var(--sf-1); color: var(--tx-hi); font-size: 15px; font-weight: 400; line-height: 1.7; }
.post-compose-field textarea:focus { border-color: #6979ff; outline: 0; box-shadow: 0 0 0 3px rgba(105, 121, 255, .16); }
.post-compose-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.post-compose-footer > small { color: var(--tx-faint); font-size: 11px; }
.post-compose-footer > small.is-over { color: #ff6b80; font-weight: 700; }
.post-compose-footer > div { display: flex; align-items: center; gap: 9px; }
.post-compose-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; }
.post-compose-reply-options { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.post-compose-warning { display: grid; flex: 1 1 240px; gap: 6px; color: var(--tx-lo); font-size: 11px; font-weight: 600; }
.post-compose-warning input { min-height: 40px; padding: 9px 11px; border: 1px solid var(--bd-1); border-radius: 7px; background: var(--sf-1); color: var(--tx-hi); font-size: 13px; }
.post-compose-reply-options .media-picker { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--sf-2); color: #d9def2; }
.post-compose-media-details { margin: 12px 0 6px; }
.post-compose-upload-help { margin: 8px 0 14px; }

/* Saved appearance preferences. Default intentionally keeps the existing
   Crowdwide palette; the alternatives recolor shared app surfaces too. */
body[data-theme="dark"] {
  --sf-0: #0a0a0a; --sf-1: #111111; --sf-2: #191919; --sf-3: #242424; --bd-1: #333; --bd-2: #4a4a4a;
  --muted: #c4c4c4; --tx-mid: #e2e2e2; --tx-lo: #c2c2c2; --tx-faint: #acacac;
  --ink: #050505;
  --ink-soft: #0d0d0d;
  --panel: #111111;
  --line: rgba(255, 255, 255, .17);
  --blue: #8092ff;
  --orange: #f2a05e;
  background: var(--ink);
  color: #f5f5f5;
}
body[data-theme="light"] {
  --sf-0: #f8fafc; --sf-1: #ffffff; --sf-2: #eef1f6; --sf-3: #e2e7ef; --bd-1: #cbd3de; --bd-2: #b4bfce;
  --ov-1: rgba(30,41,59,.035); --ov-2: rgba(30,41,59,.07);
  --tx-hi: #1c2433; --tx-mid: #34404f; --tx-lo: #4a5667; --tx-faint: #586374;
  --ac-blue: #2a4fae; --ac-gold: #8a5300; --ac-red: #b4233d; --ac-orange: #9a4410; --ac-teal: #0b665c; --ac-rose: #a3254a;
  --ink: #f2f4f6;
  --ink-soft: #ffffff;
  --panel: #ffffff;
  --paper: #222936;
  --muted: #5d6675;
  --line: rgba(35, 44, 58, .15);
  --blue: #315bc4;
  --cyan: #087d98;
  --orange: #b65319;
  --pink: #bd386c;
  --green: #16854c;
  background: var(--ink);
  color: #202735;
  color-scheme: light;
}
body[data-theme="violet"] {
  --sf-0: #150b1d; --sf-1: #21132d; --sf-2: #2b1a3a; --sf-3: #36204a; --bd-1: #4a2f63; --bd-2: #6a4590;
  --tx-hi: #fff8ff; --tx-mid: #ecdff3; --tx-lo: #d3c3de; --tx-faint: #bba9c9; --ac-blue: #dcb4ff;
  --ink: #100817;
  --ink-soft: #1a1024;
  --panel: #21132d;
  --line: rgba(237, 213, 255, .25);
  --blue: #d4a2ff;
  --cyan: #65e6ee;
  --orange: #e1b5ff;
  --pink: #ff8ecb;
  background: var(--ink);
  color: #fff8ff;
}
body[data-theme="pink"] {
  --sf-0: #fff8fa; --sf-1: #ffffff; --sf-2: #fbeef2; --sf-3: #f4e0e8; --bd-1: #e3c9d3; --bd-2: #cfaabb;
  --ov-1: rgba(91,40,59,.04); --ov-2: rgba(91,40,59,.08);
  --tx-hi: #35222a; --tx-mid: #4a343d; --tx-lo: #5c4650; --tx-faint: #6a535d;
  --ac-blue: #8a2f5c; --ac-gold: #8a5300; --ac-red: #b4233d; --ac-orange: #9a3d5f; --ac-teal: #1a6a70; --ac-rose: #a3254a;
  --ink: #fff3f6;
  --ink-soft: #ffffff;
  --panel: #ffffff;
  --paper: #35222a;
  --muted: #725b64;
  --line: rgba(91, 40, 59, .18);
  --blue: #9d3f68;
  --cyan: #247d83;
  --orange: #b84870;
  --pink: #b33368;
  --green: #26794f;
  background: var(--ink);
  color: #382a30;
  color-scheme: light;
}
body[data-theme="light"] .app-nav,
body[data-theme="pink"] .app-nav,
body[data-theme="light"] .app-sidebar,
body[data-theme="pink"] .app-sidebar,
body[data-theme="light"] .settings-nav,
body[data-theme="pink"] .settings-nav { background-color: var(--ink); }
body[data-theme="light"] .post-card,
body[data-theme="light"] .composer,
body[data-theme="light"] .settings-block,
body[data-theme="light"] .notification-item,
body[data-theme="light"] .community-posts,
body[data-theme="pink"] .post-card,
body[data-theme="pink"] .composer,
body[data-theme="pink"] .settings-block,
body[data-theme="pink"] .notification-item,
body[data-theme="pink"] .community-posts { background: var(--panel); color: #282d38; border-color: var(--line); }
body[data-theme="light"] .post-body,
body[data-theme="light"] .profile-bio,
body[data-theme="light"] .activity-row p,
body[data-theme="light"] .community-owned-copy p,
body[data-theme="pink"] .post-body,
body[data-theme="pink"] .profile-bio,
body[data-theme="pink"] .activity-row p,
body[data-theme="pink"] .community-owned-copy p { color: #48515e; }
body[data-theme="light"] .settings-form input,
body[data-theme="light"] .settings-form textarea,
body[data-theme="light"] .settings-form select,
body[data-theme="light"] .settings-block input,
body[data-theme="light"] .settings-block textarea,
body[data-theme="pink"] .settings-form input,
body[data-theme="pink"] .settings-form textarea,
body[data-theme="pink"] .settings-form select,
body[data-theme="pink"] .settings-block input,
body[data-theme="pink"] .settings-block textarea { background: #fff; color: #282d38; border-color: #cbd0d8; }
body[data-theme="light"] .comment-form textarea[name="body"],
body[data-theme="pink"] .comment-form textarea[name="body"] { background: #f5f6f8; color: #282d38; border-color: #d4d8df; }
body[data-theme="light"] .side-links a,
body[data-theme="light"] .settings-tabs > a,
body[data-theme="light"] .settings-nav > a,
body[data-theme="pink"] .side-links a,
body[data-theme="pink"] .settings-tabs > a,
body[data-theme="pink"] .settings-nav > a { color: #596372; }
body[data-theme="light"] .side-links a:hover,
body[data-theme="light"] .side-links .side-active,
body[data-theme="pink"] .side-links a:hover,
body[data-theme="pink"] .side-links .side-active { background: #e6eaf0; color: #202735; }
body[data-theme="light"] .profile-stats,
body[data-theme="pink"] .profile-stats,
body[data-theme="light"] .settings-block p,
body[data-theme="pink"] .settings-block p { color: #5d6675; }
body[data-theme="light"] .settings-content h2,
body[data-theme="light"] .settings-block h3,
body[data-theme="pink"] .settings-content h2,
body[data-theme="pink"] .settings-block h3 { color: #202735; }
body[data-theme="light"] .community-workspace-create,
body[data-theme="pink"] .community-workspace-create { background: #fff; color: #282d38; }
body[data-theme="light"] .community-workspace-form input:not([type="checkbox"]),
body[data-theme="light"] .community-workspace-form textarea,
body[data-theme="pink"] .community-workspace-form input:not([type="checkbox"]),
body[data-theme="pink"] .community-workspace-form textarea { background: #f7f8fa; color: #282d38; border-color: #cbd0d8; }
body[data-theme="light"] .community-workspace-section-heading p,
body[data-theme="pink"] .community-workspace-section-heading p { color: #5d6675; }
body[data-theme="light"] .community-workspace-form > label:not(.community-workspace-private),
body[data-theme="pink"] .community-workspace-form > label:not(.community-workspace-private),
body[data-theme="light"] .community-workspace-private,
body[data-theme="pink"] .community-workspace-private { color: #48515e; }
body[data-theme="light"] .post-compose-source-body,
body[data-theme="pink"] .post-compose-source-body { color: #48515e; }
body[data-theme="light"] .post-compose-field,
body[data-theme="pink"] .post-compose-field { color: #48515e; }
body[data-theme="light"] .post-compose-field textarea,
body[data-theme="pink"] .post-compose-field textarea { background: #f7f8fa; color: #282d38; border-color: #cbd0d8; }
body[data-theme="light"] .post-compose-context,
body[data-theme="pink"] .post-compose-context { color: #48515e; }
body[data-theme="dark"] .post-card,
body[data-theme="dark"] .composer,
body[data-theme="dark"] .settings-block { background: #111; border-color: var(--line); }
body[data-theme="violet"] .post-card,
body[data-theme="violet"] .composer,
body[data-theme="violet"] .settings-block { background: var(--panel); border-color: var(--line); }

/* The light palette is a true light surface system, not the dark interface
   with only its page background switched. */
body[data-theme="light"] {
  --ink: #f3f5f8;
  --ink-soft: #e9edf2;
  --panel: #fff;
  --line: #d9dee6;
  background: #f3f5f8;
  color: #263244;
}
body[data-theme="light"] .app-nav,
body[data-theme="light"] .nav-drawer-panel,
body[data-theme="light"] .app-sidebar,
body[data-theme="light"] .settings-nav { background: #fff; border-color: #d9dee6; color: #263244; }
body[data-theme="light"] .app-nav nav a,
body[data-theme="light"] .app-nav .welcome,
body[data-theme="light"] .nav-drawer-panel a,
body[data-theme="light"] .nav-drawer-panel button,
body[data-theme="light"] .nav-menu-toggle,
body[data-theme="light"] .icon-button,
body[data-theme="light"] .notification-button,
body[data-theme="light"] .app-sidebar .sidebar-profile strong,
body[data-theme="light"] .app-sidebar .sidebar-note strong { color: #465365; }
body[data-theme="light"] .app-nav nav a:hover,
body[data-theme="light"] .app-nav .app-nav-active { color: #202b3a; }
body[data-theme="light"] .notification-button { border-color: #d9dee6; }
body[data-theme="light"] .sidebar-toggle { background: #fff; color: #465365; border-color: #cbd3de; }
body[data-theme="light"] .nav-search,
body[data-theme="light"] .nav-drawer-search,
body[data-theme="light"] .conversations-search { background: #f5f7fa; border-color: #d9dee6; color: #596577; }
body[data-theme="light"] .nav-search input,
body[data-theme="light"] .nav-drawer-search input { color: #263244; }
body[data-theme="light"] :is(.post-card, .composer, .post-view, .post-compose-source, .post-compose-form, .settings-block, .notification-item, .community-workspace-create, .discover-panel, .conversation-panel) { background: #fff; border-color: #d9dee6; color: #263244; }
body[data-theme="light"] :is(.post-body, .post-view-body, .post-compose-source-body, .profile-bio, .activity-row p, .notification-item span, .community-owned-copy p, .comment-body, .thread-comment-body) { color: #3e4a5b; }
body[data-theme="light"] :is(.post-meta strong, .post-view-author strong, .post-view-counts strong, .profile-stats strong, .engagement-grid strong, .community-owned-title h3, .post-compose-form-heading strong, .post-compose-source > header strong, .settings-content h2, .settings-block h3) { color: #202b3a; }
body[data-theme="light"] :is(.post-meta span, .post-view-author span, .post-view-counts, .post-view-actions button, .post-view-actions .action-link, .profile-handle, .profile-stats, .profile-joined, .post-compose-footer > small, .post-compose-field, .post-compose-context, .settings-form label, .community-workspace-form > label:not(.community-workspace-private)) { color: #596577; }
body[data-theme="light"] :is(.post-view, .post-compose-source, .post-compose-form, .post-card, .composer, .settings-block, .notification-item, .community-workspace-create) { box-shadow: none; }
body[data-theme="light"] :is(.auth-card, .nav-drawer-panel, .visual-note, .mention-suggestions, .share-menu, .chat-search-results, .gif-picker-panel, .share-sheet-panel, .reaction-picker) { box-shadow: 0 3px 12px rgba(30, 41, 59, .08); }
body[data-theme="light"] .button-primary { background: #315ba5; color: #fff; box-shadow: none; }
body[data-theme="light"] .button-primary:hover { background: #274d91; box-shadow: none; }
body[data-theme="light"] .button-dark { background: #e9edf2; color: #263244; }
body[data-theme="light"] .post-compose-warning input,
body[data-theme="light"] .post-compose-field textarea,
body[data-theme="light"] .community-workspace-form input:not([type="checkbox"]),
body[data-theme="light"] .community-workspace-form textarea,
body[data-theme="light"] .settings-form input,
body[data-theme="light"] .settings-form textarea,
body[data-theme="light"] .settings-form select,
body[data-theme="light"] .settings-block input,
body[data-theme="light"] .settings-block textarea,
body[data-theme="light"] .comment-form textarea[name="body"] { background: #f8fafc; color: #263244; border-color: #cbd3de; }
body[data-theme="light"] .composer textarea { color: #263244; }
body[data-theme="light"] .post-poll,
body[data-theme="light"] .quoted-post,
body[data-theme="light"] .link-preview-card,
body[data-theme="light"] .media-caption,
body[data-theme="light"] .media-transcript,
body[data-theme="light"] .poll-composer { background: #f5f7fa; color: #263244; border-color: #d9dee6; }
body[data-theme="light"] .post-poll > strong,
body[data-theme="light"] .quoted-post strong,
body[data-theme="light"] .link-preview-body strong { color: #263244; }
body[data-theme="light"] .post-poll button { background: #e9eef7; color: #263244; border-color: #cbd5e4; }
body[data-theme="light"] .profile-tabs a,
body[data-theme="light"] .feed-tabs a,
body[data-theme="light"] .settings-tabs > a,
body[data-theme="light"] .settings-nav > a { color: #596577; }
body[data-theme="light"] .profile-tabs a:hover,
body[data-theme="light"] .feed-tabs a:hover,
body[data-theme="light"] .settings-tabs > a:hover,
body[data-theme="light"] .settings-nav > a:hover { color: #202b3a; }
body[data-theme="light"] .profile-tabs .profile-tab-active,
body[data-theme="light"] .feed-tabs .feed-tab-active,
body[data-theme="light"] .settings-tabs .settings-active { color: #244e91; }
body[data-theme="light"] .settings-tabs .settings-active,
body[data-theme="light"] .settings-nav .settings-active { background: #eaf0f8; }
body[data-theme="light"] .side-links a:hover,
body[data-theme="light"] .side-links .side-active,
body[data-theme="light"] .nav-drawer-panel a:hover,
body[data-theme="light"] .nav-drawer-panel button:hover { background: #eef2f7; color: #202b3a; }
body[data-theme="light"] .post-actions button,
body[data-theme="light"] .post-actions .post-stat,
body[data-theme="light"] .post-actions a.post-stat,
body[data-theme="light"] .post-stat-row,
body[data-theme="light"] .thread-comment p,
body[data-theme="light"] .thread-comment strong,
body[data-theme="light"] .profile-community-item,
body[data-theme="light"] .profile-achievement-item,
body[data-theme="light"] .top-post-row p { color: #3e4a5b; }
body[data-theme="light"] .post-actions a.post-stat:hover,
body[data-theme="light"] .post-actions button:hover { background: #edf1f6; color: #202b3a; }
body[data-theme="light"] .engagement-grid div,
body[data-theme="light"] .post-poll,
body[data-theme="light"] .notification-unread,
body[data-theme="light"] .quest-card,
body[data-theme="light"] .quest-manage-card,
body[data-theme="light"] .post-compose-reply-options .media-picker { background: #f5f7fa; border-color: #d9dee6; color: #344154; }
body[data-theme="light"] .engagement-grid strong,
body[data-theme="light"] .post-poll > strong,
body[data-theme="light"] .quest-card strong,
body[data-theme="light"] .quest-manage-card strong { color: #202b3a; }
body[data-theme="light"] .engagement-grid span,
body[data-theme="light"] .quest-card p,
body[data-theme="light"] .quest-manage-card p,
body[data-theme="light"] .profile-achievement-item small,
body[data-theme="light"] .profile-highlight-empty { color: #596577; }
body[data-theme="light"] .profile-achievement-icon,
body[data-theme="light"] .profile-link-chip,
body[data-theme="light"] .hashtag-chip { background: #edf2f8; border-color: #d4dce7; color: #315687; }
body[data-theme="light"] .post-owner-tools button { background: #315ba5; color: #fff; }
body[data-theme="light"] .post-owner-tools button:hover { background: #274d91; }
body[data-theme="light"] .settings-form input:focus,
body[data-theme="light"] .settings-form textarea:focus,
body[data-theme="light"] .settings-form select:focus,
body[data-theme="light"] .post-compose-field textarea:focus { box-shadow: 0 0 0 3px rgba(49, 91, 165, .13); }
body[data-theme="light"] .post-compose-footer > small.is-over { color: #bd243d; }
body[data-theme="light"] :is(.post-compose-warning, .post-compose-upload-help, .composer-media-details, .composer-media-meta, .composer-actions, .coauthor-picker, .schedule-picker, .quest-picker-hint) { color: #465365; }
body[data-theme="light"] :is(.post-compose-form, .post-compose-source, .post-card, .composer, .settings-block, .notification-item, .community-workspace-create, .post-view) { box-shadow: none; }
body[data-theme="light"] :is(.auth-card, .nav-drawer-panel, .visual-note, .mention-suggestions, .share-menu, .chat-search-results, .gif-picker-panel, .share-sheet-panel, .reaction-picker) { box-shadow: 0 4px 16px rgba(38, 50, 68, .06); }
body[data-theme="light"] :is(.reaction-pill.is-selected, .reaction-strip button.is-selected, .reaction-bar button.is-selected, .post-poll button.is-selected) { background: #eaf0f8; border-color: #9fb3d2; color: #244e91; }

@media (max-width: 640px) {
  .community-create-shortcut { width: 100%; }
  .community-workspace { padding-top: 28px; }
  .community-workspace-header { align-items: flex-start; }
  .community-workspace-header h1 { font-size: 31px; }
  .community-workspace-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .community-owned-row { grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 10px; }
  .community-owned-mark { width: 38px; height: 38px; }
  .community-owned-actions { grid-column: 2; }
  .post-compose-page { padding-top: 24px; }
  .post-compose-heading h1 { font-size: 30px; }
  .post-compose-form { padding: 15px; }
  .post-compose-field textarea { min-height: 240px; }
  .post-compose-footer { align-items: flex-start; flex-direction: column; }
  .post-compose-footer > div { width: 100%; justify-content: flex-end; }
  .post-compose-reply-options { align-items: stretch; flex-direction: column; }
  .post-compose-reply-options .media-picker { align-self: flex-start; }
  .settings-block.danger-zone form[action="/settings/account/delete"] { grid-template-columns: 1fr; }
  .settings-block.danger-zone form[action="/settings/account/delete"] button { justify-self: start; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .community-workspace-layout { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 24px; }
  .community-owned-row { grid-template-columns: 38px minmax(0, 1fr); }
  .community-owned-actions { grid-column: 2; }
}

.staging-banner { background: #f0b429; color: #1a1300; text-align: center; font: 600 12px 'DM Sans', sans-serif; padding: 6px 12px; position: relative; z-index: 50; }

.growth-empty { color: var(--tx-lo); font-size: 13px; padding: 40px 10px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* ---- Emoji reactions (comments, DMs, group chats) ---------------------- */
.reaction-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.chat-msg .reaction-row { margin: 4px 8px 0; }
.chat-msg.is-own .reaction-row { justify-content: flex-end; }
.reaction-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--ov-1); color: var(--tx-mid); font-size: 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.reaction-pill:hover { border-color: #4d65ff; }
.reaction-pill.is-selected { border-color: #586aff; background: rgba(77, 101, 255, .18); color: #fff; }
.reaction-pill .reaction-emoji { font-size: 13px; line-height: 1; }
.reaction-pill .count { font-variant-numeric: tabular-nums; }
.reaction-add { position: relative; }
.reaction-add-trigger { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--tx-faint); cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.reaction-add-trigger:hover { color: #fff; border-color: #4d65ff; }
.reaction-picker { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; display: flex; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.reaction-picker[hidden] { display: none; }
.chat-msg.is-own .reaction-picker { left: auto; right: 0; }
.reaction-picker-option { padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; font-size: 17px; line-height: 1; cursor: pointer; transition: background .12s ease, transform .12s ease; }
.reaction-picker-option:hover { background: var(--ov-2); transform: scale(1.15); }

/* ---- Post-author "heart" on a comment (like a creator heart) ----------- */
.action-author-heart { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tx-faint); cursor: pointer; transition: color .15s ease; }
.action-author-heart:hover { color: #ff5f8a; }
.action-author-heart.is-selected { color: #ff5f8a; }
.action-author-heart.is-selected svg { fill: currentColor; }
.author-heart-badge { display: inline-flex; align-items: center; color: #ff5f8a; margin-left: 2px; }
.author-heart-badge svg { fill: currentColor; }
.thread-comment.is-hearted { border-left-color: #ff5f8a; }

/* ---- Translate ----------------------------------------------------------- */
.action-translate { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; color: var(--tx-faint); font-size: 12px; cursor: pointer; padding: 0; }
.action-translate:hover { color: #fff; }
.action-translate.is-translated { color: #7e8dff; }
.action-translate.is-busy { opacity: .6; cursor: wait; }
.action-translate-inline { margin: 6px 0 0; font-size: 12.5px; }
.post-view-actions .action-translate.is-translated { color: #7e8dff; }
.translate-lang-select { margin-left: 8px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--tx-mid); font-size: 11px; }
.translate-note { display: block; margin-top: 4px; color: #ff8da2; font-size: 11px; }

/* ---- Message requests ---------------------------------------------------- */
.request-inbox-link { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 18px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--tx-mid); font-size: 13px; font-weight: 600; width: fit-content; transition: border-color .15s ease; }
.request-inbox-link:hover { border-color: #4d65ff; }
.request-row { gap: 12px; }
.request-row .request-actions { display: flex; gap: 8px; flex-shrink: 0; }
.chat-request-gate { padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(77, 101, 255, .06); }
.chat-request-gate p { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx-mid); }
.chat-request-gate .request-actions { display: flex; gap: 8px; }

/* Some UI fixes  */
.upper-margin-15{
  margin-top: 15px;
}

/* Final shared pass for the two light palettes; keep it after component styles
   so older dark-surface declarations cannot leak through. */
body[data-theme="light"] {
  --theme-fg: #263244;
  --theme-muted: #596577;
  --theme-page: #f3f5f8;
  --theme-surface: #fff;
  --theme-soft: #eef2f7;
  --theme-border: #d9dee6;
  --theme-accent: #315ba5;
  --theme-accent-hover: #274d91;
}
body[data-theme="pink"] {
  --theme-fg: #382a30;
  --theme-muted: #725b64;
  --theme-page: #fff3f6;
  --theme-surface: #fff;
  --theme-soft: #f7e8ed;
  --theme-border: #e5cbd3;
  --theme-accent: #9d3f68;
  --theme-accent-hover: #843455;
}
:is(body[data-theme="light"], body[data-theme="pink"]) {
  color: var(--theme-fg);
  color-scheme: light;
}
:is(body[data-theme="light"], body[data-theme="pink"]) :is(h1, h2, h3, h4, h5, h6, p, span, strong, small, label, legend, summary, li, dt, dd, th, td, blockquote, code, button, a) {
  color: var(--theme-fg);
}
:is(body[data-theme="light"], body[data-theme="pink"]) :is(a, .text-link, .mention-link, .profile-link-chip, .hashtag-chip) { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.eyebrow, .hero-lede, .hero-proof, .hero-proof p span, .trust-strip, .principle-grid p, .section-copy, .stats-grid span, .list-heading > span, .community-row p, .community-members, .story-section p:not(.eyebrow), .site-footer, .footer-tagline, .footer-col a, .footer-bottom, .post-meta span, .post-view-author span, .profile-handle, .profile-stats, .post-compose-upload-help, .feed-note, .form-note, .switch-auth, .terms, .auth-foot, .settings-form label) { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.avatar, .avatar-initial, .avatar-stack > span) { color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.verified-tick, .joined-mark, .principle-number, .community-index, .story-marker, .viral-likes, .action-author-heart, .author-heart-badge) { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.button-primary, .button-danger, .post-owner-tools button) { background: var(--theme-accent); color: #fff; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.button-primary, .button-danger, .post-owner-tools button) * { color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.button-primary, .post-owner-tools button):hover { background: var(--theme-accent-hover); }
:is(body[data-theme="light"], body[data-theme="pink"]) .button-dark { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .button-ghost { border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) {
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-fg);
  color-scheme: light;
}
:is(body[data-theme="light"], body[data-theme="pink"]) input[type="file"] { border-color: var(--theme-border); color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) input[type="file"]::file-selector-button { background: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.app-nav, .app-sidebar, .settings-nav, .nav-drawer-panel, .site-nav) { background: var(--theme-surface); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-card, .composer, .post-view, .post-compose-source, .post-compose-form, .settings-block, .notification-item, .community-workspace-create, .discover-panel, .conversation-panel, .auth-card, .growth-card, .visual-note, .viral-card, .share-menu, .mention-suggestions, .chat-search-results, .gif-picker-panel, .share-sheet-panel, .reaction-picker, .profile-achievement-item, .quest-card, .quest-manage-card) {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-fg);
  box-shadow: 0 3px 14px rgba(38, 50, 68, .06);
}
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-card, .composer, .post-view, .post-compose-source, .post-compose-form, .settings-block, .notification-item, .community-workspace-create) { box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-poll, .quoted-post, .link-preview-card, .media-caption, .media-transcript, .poll-composer, .engagement-grid div, .notification-unread, .post-compose-reply-options .media-picker) { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-poll button, .reaction-pill, .reaction-strip button, .reaction-bar button) { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.reaction-pill.is-selected, .reaction-strip button.is-selected, .reaction-bar button.is-selected, .post-poll button.is-selected) { background: #eaf0f8; border-color: #9fb3d2; color: #244e91; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.home-page, .auth-page, .info-page, .dashboard-page) { background: var(--theme-page); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .cta-band { background: var(--theme-soft); border-color: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .empty-state .empty-orbit,
:is(body[data-theme="light"], body[data-theme="pink"]) .empty-feed .empty-orbit { background: var(--theme-soft); box-shadow: 0 0 0 10px var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-row, .principle-grid article, .story-section, .docs-endpoint, .guide-card, .stats-grid, .community-list, .footer-bottom) { border-color: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(h1 em, h2 em, .story-marker) { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.follow-button, .mute-button, .round-action) { background: transparent; border-color: var(--theme-border); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.follow-button.is-following, .mute-button.is-muted) { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.icon-button, .notification-button, .nav-menu-toggle, .sidebar-toggle, .nav-drawer-close):hover { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .flash-error { background: #fce9ed; border-color: #e6aeb9; color: #8a2438; }
:is(body[data-theme="light"], body[data-theme="pink"]) .flash-success { background: #e5f5ee; border-color: #abd8c1; color: #246345; }
:is(body[data-theme="light"], body[data-theme="pink"]) code { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .docs-code { background: var(--theme-soft); border-color: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .docs-code code { background: transparent; color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-bubble { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-msg.is-own .chat-bubble { background: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-msg.is-own .chat-bubble * { color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) .app-sidebar { border-right: 1px solid var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .sidebar-toggle { background: var(--theme-surface); border-color: var(--theme-border); color: var(--theme-fg); box-shadow: 0 1px 4px rgba(38, 50, 68, .1); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.side-links a:hover, .side-links .side-active, .nav-drawer-panel a:hover, .nav-drawer-panel button:hover) { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .word-limit-meter { background: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .word-limit-meter > span { background: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .word-limit-meter.is-warning > span { background: #a45608; }
:is(body[data-theme="light"], body[data-theme="pink"]) .word-limit-meter.is-over > span { background: #b4233d; }
:is(body[data-theme="light"], body[data-theme="pink"]) .word-limit-warning { color: #b4233d; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.composer select, .coauthor-picker, .composer-media-meta) { background: var(--theme-surface); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .coauthor-chip { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .coauthor-picker-head small { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .media-picker { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) { --line: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.app-nav nav a:hover, .app-nav .app-nav-active, .site-nav .nav-links a:hover, .side-links a:hover, .side-links .side-active, .nav-drawer-panel a:hover, .nav-drawer-panel button:hover) { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.feed-tabs a:hover, .feed-tabs .feed-tab-active, .profile-tabs a:hover, .profile-tabs .profile-tab-active, .settings-tabs > a:hover, .settings-tabs .settings-active, .settings-nav > a:hover, .settings-nav .settings-active) { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.settings-tabs .settings-active, .settings-nav .settings-active) { background: var(--theme-soft); border-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .hashtag-chip { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .hashtag-chip:hover { background: var(--theme-accent); border-color: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-card, .post-view) { border-color: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .post-card[data-post-url]:hover { border-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-actions, .post-view-actions, .post-stat-row, .comment-thread, .comment, .thread-comment, .thread-comment[data-depth="1"], .thread-comment[data-depth="2"], .thread-comment[data-depth="3"]) { border-color: var(--theme-border); }
:is(body[data-theme="light"], body[data-theme="pink"]) .thread-comment.is-hearted { border-left-color: #d64d70; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-actions button:hover, .post-actions a.post-stat:hover, .post-view-actions button:hover, .post-view-actions .action-link:hover, .comment-tool:hover) { background: var(--theme-soft); border-color: var(--theme-border); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-actions a.post-stat, .post-view-actions button, .post-view-actions .action-link, .comment-tool) { color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):hover { border-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):focus { border-color: var(--theme-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(input, textarea)::placeholder { color: var(--theme-muted); opacity: .8; }
:is(body[data-theme="light"], body[data-theme="pink"]) select option { background: var(--theme-surface); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.side-links a:hover, .nav-drawer-panel a:hover, .nav-drawer-panel button:hover) { background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.side-links .side-active, .nav-drawer-panel .side-active) { background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); font-weight: 700; }
:is(body[data-theme="light"], body[data-theme="pink"]) .app-sidebar { background: transparent; border-right: 0; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-card, .post-view) { border-color: transparent; box-shadow: 0 2px 8px rgba(38, 50, 68, .04); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.comment-thread, .comment, .thread-comment, .thread-comment[data-depth="1"], .thread-comment[data-depth="2"], .thread-comment[data-depth="3"]) { border-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .comment-thread { padding-top: 0; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.comment, .thread-comment) { border-left: 0; }
:is(body[data-theme="light"], body[data-theme="pink"]) .thread-comment.is-hearted { box-shadow: inset 2px 0 #d64d70; }
:is(body[data-theme="light"], body[data-theme="pink"]) .comment-form .comment-submit { background: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) .comment-form .comment-submit:hover { background: var(--theme-accent-hover); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) .button-light { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.follow-button, .mute-button, .round-action):hover { background: var(--theme-soft); border-color: var(--theme-accent); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-actions button:hover, .post-actions a.post-stat:hover, .post-view-actions button:hover, .post-view-actions .action-link:hover, .comment-tool:hover) { background: var(--theme-soft); border-color: transparent; color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.comment button:hover, .thread-comment button:hover) { background: transparent; color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(button, a, input, textarea, select, summary):focus-visible { outline-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .app-nav nav a { border: 0; background: transparent; color: var(--theme-muted); transition: color .15s ease; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.app-nav nav a:hover, .app-nav .app-nav-active, .site-nav .nav-links a:hover) { border: 0; background: transparent; box-shadow: none; color: var(--theme-accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--theme-accent) 45%, transparent); text-underline-offset: 5px; }
:is(body[data-theme="light"], body[data-theme="pink"]) .notification-button { border-color: transparent; background: transparent; color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .notification-button:hover { border-color: transparent; background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-link-chip { border-color: transparent; background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-link-chip:hover { border-color: transparent; background: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.profile-hero, .profile-engagement, .profile-community-highlights, .profile-community-item, .profile-achievement-item) { border-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-tabs { border-bottom-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-tabs a { color: var(--theme-muted); border-bottom-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-tabs a:hover { color: var(--theme-accent); border-bottom-color: transparent; background: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-tabs .profile-tab-active { color: var(--theme-accent); border-bottom-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .engagement-grid div { border-color: transparent; background: var(--theme-soft); }
:is(body[data-theme="light"], body[data-theme="pink"]) .notification-item { border-color: transparent; box-shadow: 0 1px 3px rgba(38, 50, 68, .04); }
:is(body[data-theme="light"], body[data-theme="pink"]) .notification-item:hover { border-color: transparent; background: var(--theme-soft); }
:is(body[data-theme="light"], body[data-theme="pink"]) .notification-unread { background: color-mix(in srgb, var(--theme-accent) 8%, var(--theme-surface)); box-shadow: inset 3px 0 var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.settings-tabs > a, .settings-nav > a) { border: 0; border-radius: 6px; background: transparent; color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.settings-tabs > a:hover, .settings-nav > a:hover) { border: 0; background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.settings-tabs .settings-active, .settings-nav .settings-active) { border: 0; background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); font-weight: 700; }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-block:not(.danger-zone) { border-color: transparent; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .popular-search-list a { border: 0; background: var(--theme-soft); color: var(--theme-fg); transition: color .15s ease, background .15s ease; }
:is(body[data-theme="light"], body[data-theme="pink"]) .popular-search-list a:hover { border: 0; background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .popular-search-list a > .icon { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .popular-search-list .search-meta { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .popular-search-list .search-tag-suggested { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-card, .community-post-link, .community-radar-card, .community-radar-preview) { border-color: transparent; background: var(--theme-surface); box-shadow: none; color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-card:hover, .community-post-link:hover, .community-radar-preview:hover) { border-color: transparent; background: var(--theme-soft); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-card footer, .community-detail-hero, .community-row, .community-posts .post-stat-row, .community-posts .post-actions) { border-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .community-posts .post-card { border: 0; background: transparent; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .community-posts > a.activity-row { border: 0; background: var(--theme-soft); box-shadow: none; color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .community-posts > a.activity-row:hover { border: 0; background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-detail-hero > p:not(.eyebrow), .directory-heading p:not(.eyebrow), .community-card p, .community-post-link p, .community-post-link span, .community-posts .post-body, .community-posts .activity-row p, .community-posts .activity-row small, .community-guidelines-copy) { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-detail-meta, .community-detail-meta a, .community-post-author, .community-posts .post-meta strong) { color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .community-moderator-label { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .community-glyph { background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface)); color: var(--theme-accent); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.activity-row.message-row, .activity-row.group-row) { border-top-color: transparent; border-radius: 9px; color: var(--theme-fg); transition: background .15s ease, color .15s ease; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.activity-row.message-row:hover, .activity-row.group-row:hover) { background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.activity-row.is-unread strong, .activity-row.is-unread p) { color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .request-inbox-link { border-color: transparent; background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .request-inbox-link:hover { border-color: transparent; background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-shell { border-color: transparent; background: var(--theme-surface); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-header, .chat-composer) { border-color: transparent; background: var(--theme-surface); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-back, .chat-header-action, .post-back) { background: transparent; color: var(--theme-muted); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-back:hover, .chat-header-action:hover, .post-back:hover) { background: var(--theme-soft); color: var(--theme-accent); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-title :is(strong, a) { color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search { border-color: transparent; background: var(--theme-soft); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search-results { border-color: transparent; background: var(--theme-surface); color: var(--theme-fg); box-shadow: 0 4px 14px rgba(38, 50, 68, .08); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search-result:hover { background: var(--theme-soft); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-search-result strong, .chat-search-result time, .chat-title span) { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-bubble { background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-msg.is-own .chat-bubble { background: var(--theme-accent); color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-msg.is-own .chat-bubble * { color: #fff; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-tool, .chat-day span, .chat-attachment-selected) { border-color: transparent; background: var(--theme-soft); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-tool:hover, .chat-search button:hover, .chat-attachment-selected button:hover) { background: color-mix(in srgb, var(--theme-accent) 11%, var(--theme-surface)); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-send, .chat-jump) { background: var(--theme-accent); color: #fff; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.chat-send:hover, .chat-jump:hover) { background: var(--theme-accent-hover); color: #fff; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-view-counts, .post-view-actions, .post-actions, .post-stat-row) { border-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .post-more > summary { border-radius: 7px; color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .post-more > summary:hover { background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-tool-link, .post-owner-tools summary):hover { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.post-back, .chat-back, .chat-header-action, .back-link, .row-arrow, .sidebar-toggle, .btn-arrow, .inline-arrow) { color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.back-link:hover, .row-arrow:hover) { color: var(--theme-accent-hover); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.icon, svg) { filter: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.community-glyph, .activity-icon, .row-arrow, .post-back, .chat-back, .chat-header-action, .post-more > summary, .post-actions button, .post-view-actions button) { box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .conversations-search { border: 0; background: var(--theme-soft); color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .conversations-search:focus-within { outline: 2px solid color-mix(in srgb, var(--theme-accent) 45%, transparent); outline-offset: 2px; }
:is(body[data-theme="light"], body[data-theme="pink"]) .conversations-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { min-width: 0; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .conversations-search input:focus,
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search input:focus { border: 0; background: transparent; box-shadow: none; outline: 0; }
:is(body[data-theme="light"], body[data-theme="pink"]) .conversations-search input::placeholder,
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search input::placeholder { color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .chat-search:focus-within { outline: 2px solid color-mix(in srgb, var(--theme-accent) 45%, transparent); outline-offset: 2px; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-layout .post-card { border-color: transparent; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .profile-avatar-slot .avatar.large { border-color: var(--theme-surface); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.profile-community-item, .profile-achievement-item):hover { border-color: transparent; border-radius: 7px; background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) { border-color: var(--theme-border); background: var(--theme-surface); color: var(--theme-fg); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):hover { border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--theme-border)); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select):focus { border-color: var(--theme-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 16%, transparent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout input[type="checkbox"],
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout input[type="radio"] { accent-color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout :is(.device-row, .owner-posts article) { border-color: transparent; }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout .device-row:hover { border-radius: 8px; background: var(--theme-soft); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout .device-icon { border-color: transparent; background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout .settings-block.danger-zone { border-color: color-mix(in srgb, #b4233d 26%, var(--theme-border)); background: color-mix(in srgb, #b4233d 4%, var(--theme-surface)); }
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-layout :is(.button-ghost, .button-dark):hover { border-color: transparent; background: var(--theme-soft); color: var(--theme-accent); box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .block-button { border-color: var(--theme-border); background: transparent; color: var(--theme-muted); }
:is(body[data-theme="light"], body[data-theme="pink"]) .block-button:hover:not(.is-blocked) { border-color: var(--theme-border); background: var(--theme-soft); color: var(--theme-accent); }
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.block-button.is-blocked, .block-button.is-blocked:hover) { border-color: color-mix(in srgb, #b4233d 28%, var(--theme-border)); background: color-mix(in srgb, #b4233d 9%, var(--theme-surface)); color: #a51f36; }
:is(body[data-theme="light"], body[data-theme="pink"]) .button-danger { background: #b4233d; color: #fff; box-shadow: none; }
:is(body[data-theme="light"], body[data-theme="pink"]) .button-danger:hover { background: #921d32; color: #fff; box-shadow: none; }

/* Keep supporting text readable in every dark palette, and give secondary
   components the same surface treatment as the rest of each light theme. */
:root {
  --theme-fg: #f6f6fa;
  --theme-muted: #c3c6d4;
  --theme-page: var(--ink);
  --theme-surface: var(--panel);
  --theme-soft: #1a1d32;
  --theme-border: var(--line);
  --theme-accent: #9eafff;
  --theme-accent-hover: #bdc8ff;
}
body[data-theme="dark"] {
  --theme-fg: #f5f5f5;
  --theme-muted: #c8c8c8;
  --theme-soft: #1c1c1c;
  --theme-accent: #aab6ff;
  --theme-accent-hover: #c7ceff;
}
body[data-theme="violet"] {
  --theme-fg: #fff8ff;
  --theme-muted: #e0d5e8;
  --theme-soft: #30203a;
  --theme-accent: #e0b5ff;
  --theme-accent-hover: #f0d8ff;
}
:is(body[data-theme="default"], body[data-theme="dark"], body[data-theme="violet"])
  :is(.eyebrow, .section-copy, .feed-tabs a, .feed-note, .post-meta span,
    .post-actions button, .post-actions .post-stat, .post-stat-row,
    .profile-handle, .profile-stats, .profile-joined, .settings-form label,
    .settings-form small, .settings-block p, .device-row span, .community-row p,
    .community-members, .empty-state p, .empty-feed p, .upload-help,
    .composer-meta, .schedule-picker, .media-picker, .coauthor-picker-head small,
    .coauthor-empty, .composer-media-meta label, .quest-picker-hint,
    .quest-progress, .profile-achievement-item small, .profile-highlight-empty,
    .recap-muted, .recap-month-label, .recap-highlight-meta,
    .recap-comment-context, .discover-row span, .admin-table th,
    .admin-edit-form label, .report-evidence-label, .form-note, .switch-auth,
    .terms, .auth-foot, .site-footer, .footer-tagline, .footer-bottom,
    .info-intro, .info-sections p, .hero-proof p span, .visual-note small,
    .story-section p:not(.eyebrow)) {
  color: var(--theme-muted);
}
:is(body[data-theme="default"], body[data-theme="dark"], body[data-theme="violet"])
  :is(.feed-tabs .feed-tab-active, .profile-tabs .profile-tab-active,
    .settings-tabs .settings-active, .settings-nav .settings-active) {
  color: var(--theme-accent);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.mention-suggestions, .share-menu, .chat-search-results, .gif-picker-panel,
    .share-sheet-panel, .reaction-picker, .poll-composer, .coauthor-picker,
    .composer-media-meta, .post-compose-reply-options .media-picker) {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-fg);
  box-shadow: 0 3px 14px rgba(38, 50, 68, .08);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.share-menu button, .share-menu a, .mention-suggestions button,
    .chat-search-results button, .gif-picker-panel button, .reaction-picker button) {
  color: var(--theme-fg);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.share-menu button:hover, .share-menu a:hover, .mention-suggestions button:hover,
    .chat-search-results button:hover, .gif-picker-panel button:hover,
    .reaction-picker button:hover) {
  background: var(--theme-soft);
  color: var(--theme-accent);
}
:is(body[data-theme="light"], body[data-theme="pink"]) .poll-composer input,
:is(body[data-theme="light"], body[data-theme="pink"]) .composer-media-meta input,
:is(body[data-theme="light"], body[data-theme="pink"]) .composer-media-meta textarea {
  background: var(--theme-soft);
  border-color: var(--theme-border);
  color: var(--theme-fg);
}

/* Menu surfaces need enough separation to read as overlays, not as part of
   the page behind them. */
:root {
  --theme-menu: #202338;
  --theme-menu-border: #4a5068;
  --theme-menu-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
body[data-theme="dark"] {
  --theme-menu: #222;
  --theme-menu-border: #505050;
  --theme-menu-shadow: 0 12px 32px rgba(0, 0, 0, .7);
}
body[data-theme="violet"] {
  --theme-menu: #30213a;
  --theme-menu-border: #604a70;
  --theme-menu-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}
:is(body[data-theme="default"], body[data-theme="dark"], body[data-theme="violet"])
  :is(.nav-drawer-panel, .share-menu, .mention-suggestions, .chat-search-results,
    .gif-picker-panel, .share-sheet-panel, .reaction-picker, .cw-speed-menu) {
  background-color: var(--theme-menu);
  border-color: var(--theme-menu-border);
  box-shadow: var(--theme-menu-shadow);
}
:is(body[data-theme="default"], body[data-theme="dark"], body[data-theme="violet"])
  :is(.share-menu button, .share-menu a, .mention-suggestions button,
    .chat-search-result, .chat-search-result strong, .chat-search-result time,
    .gif-picker-close, .gif-picker-status, .gif-picker-credit, .share-sheet-head h2,
    .share-sheet-list h3, .share-sheet-empty, .share-target-name,
    .share-target-name strong, .share-target-name small, .share-sheet-links button,
    .reaction-picker-option, .cw-speed-menu button) {
  color: #f4f3fa;
}
:is(body[data-theme="default"], body[data-theme="dark"], body[data-theme="violet"])
  :is(.share-menu button:hover, .share-menu a:hover, .mention-suggestions button:hover,
    .chat-search-result:hover, .gif-picker-close:hover, .share-target:hover,
    .share-sheet-x:hover, .share-sheet-links button:hover,
    .reaction-picker-option:hover, .cw-speed-menu button:hover) {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
:is(body[data-theme="light"], body[data-theme="pink"]) {
  --theme-menu: #fff;
  --theme-menu-border: #cbd4e0;
  --theme-menu-shadow: 0 12px 30px rgba(30, 41, 59, .2), 0 2px 6px rgba(30, 41, 59, .1);
}
body[data-theme="pink"] {
  --theme-menu: #fffafb;
  --theme-menu-border: #dfc4cd;
  --theme-menu-shadow: 0 12px 30px rgba(91, 40, 59, .18), 0 2px 6px rgba(91, 40, 59, .08);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.nav-drawer-panel, .share-menu, .mention-suggestions, .chat-search-results,
    .gif-picker-panel, .share-sheet-panel, .reaction-picker, .cw-speed-menu) {
  background-color: var(--theme-menu);
  border: 1px solid var(--theme-menu-border);
  box-shadow: var(--theme-menu-shadow);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.share-menu button, .share-menu a, .mention-suggestions button,
    .chat-search-result, .chat-search-result strong, .chat-search-result time,
    .gif-picker-close, .gif-picker-status, .gif-picker-credit, .share-sheet-head h2,
    .share-sheet-list h3, .share-sheet-empty, .share-target-name,
    .share-target-name strong, .share-target-name small, .share-sheet-links button,
    .reaction-picker-option, .cw-speed-menu button) {
  color: var(--theme-fg);
}
:is(body[data-theme="light"], body[data-theme="pink"])
  :is(.share-menu button:hover, .share-menu a:hover, .mention-suggestions button:hover,
    .chat-search-result:hover, .gif-picker-close:hover, .share-target:hover,
    .share-sheet-x:hover, .share-sheet-links button:hover,
    .reaction-picker-option:hover, .cw-speed-menu button:hover) {
  background: var(--theme-soft);
  color: var(--theme-accent);
}

/* Navigation columns should sit on the page surface rather than read as
   oversized blank cards when a light appearance is selected. */
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.settings-nav, .app-sidebar) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.app-nav, .site-nav) {
  background: var(--theme-page);
  border-color: var(--theme-border);
  box-shadow: none;
}
/* Theme polish: small badges/buttons that carried dark-theme-only colors. */
body[data-theme="light"] .docs-method, body[data-theme="pink"] .docs-method { background: #d9f3e8; color: #0b6b45; }
body[data-theme="light"] .member-action.is-danger, body[data-theme="pink"] .member-action.is-danger { color: #a3254a; border-color: #e3b3c1; background: #fff; }
body[data-theme="light"] .reaction-strip .count, body[data-theme="pink"] .reaction-strip .count { color: var(--tx-lo); }
body[data-theme="light"] .gif-badge, body[data-theme="pink"] .gif-badge { color: inherit; }
body[data-theme="pink"] .post-card span.gif-badge { color: var(--tx-hi); }
body[data-theme="light"] .button-primary, body[data-theme="pink"] .button-primary,
body[data-theme="light"] .button-primary *, body[data-theme="pink"] .button-primary * { color: #fff; }
.comment-submit * { color: inherit; }
:is(body[data-theme="light"], body[data-theme="pink"]) .comment-form .comment-submit span { color: #fff; }

/* Refreshed settings, composer, cards and identity details. */
.avatar-initial {
  display: grid;
  place-items: center;
  padding-bottom: .05em;
  transform: translateY(-.035em);
}
.verified-tick {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 0 2px 9px;
  border: 1px solid rgba(95, 205, 255, .45);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(58, 169, 255, .2), rgba(112, 111, 255, .14));
  color: #72cfff;
  vertical-align: middle;
  box-shadow: 0 0 16px rgba(76, 154, 255, .14);
}
.verified-tick .icon { display: block; stroke-width: 3; }
.settings-layout {
  max-width: 1240px;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: calc(var(--header-h) + 22px);
}
.settings-nav h1 { letter-spacing: -1.8px; }
.settings-nav .settings-link { margin: -18px 0 24px; }
.settings-tabs {
  display: grid;
  gap: 5px;
}
.settings-nav > nav > a {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  border-left-width: 1px;
  padding: 9px 12px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.settings-nav > nav > a:hover,
.settings-nav > nav > .settings-active {
  border-color: var(--line);
  background: linear-gradient(110deg, rgba(107, 126, 255, .14), rgba(107, 126, 255, .035));
}
.settings-content {
  min-width: 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(25, 29, 54, .78), rgba(14, 16, 33, .94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .16);
}
.settings-content > .eyebrow { margin-bottom: 10px; }
.settings-content > h2 {
  margin-bottom: 28px;
  font-size: clamp(29px, 4vw, 40px);
  letter-spacing: -1.5px;
}
.settings-form { gap: 17px; }
.settings-form label,
.settings-block label { gap: 9px; font-weight: 600; }
.settings-form input:not([type="checkbox"]):not([type="file"]),
.settings-form textarea,
.settings-form select,
.settings-block input:not([type="checkbox"]):not([type="file"]),
.settings-block textarea {
  border-radius: 11px;
  padding: 13px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.settings-form :is(input, textarea, select):focus,
.settings-block :is(input, textarea, select):focus {
  border-color: rgba(128, 148, 255, .78);
  box-shadow: 0 0 0 3px rgba(105, 126, 255, .12);
}
.settings-block {
  max-width: 760px;
  margin-top: 18px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 28, 51, .7), rgba(16, 18, 38, .85));
}
.settings-block h3 { margin-bottom: 8px; }
.settings-block p { line-height: 1.65; }
.settings-block-heading { align-items: center; }
.settings-block .device-row { gap: 14px; }
.notification-group {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 9, 20, .2);
}
.notification-group legend {
  padding: 0 8px;
  color: var(--tx-hi);
  font: 600 15px 'Space Grotesk', sans-serif;
}
.notification-group > p { margin: 0 0 12px; }
.notification-option {
  min-height: 67px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.notification-option > span { gap: 4px; }
.notification-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: #7e8dff; }
.settings-theme-form { padding-top: 8px; }
.danger-zone {
  border-color: rgba(255, 107, 132, .28);
  background: linear-gradient(145deg, rgba(91, 30, 54, .2), rgba(16, 18, 38, .85));
}
.composer {
  border-color: rgba(144, 157, 255, .2);
  background: linear-gradient(145deg, rgba(25, 29, 54, .94), rgba(16, 18, 38, .98));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .13);
}
.composer-intro { display: grid; gap: 4px; margin: 1px 0 12px; }
.composer-intro strong { font-size: 14px; }
.composer-intro span { color: var(--tx-faint); font-size: 11px; line-height: 1.5; }
.composer textarea {
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 9, 20, .22);
}
.composer textarea:focus { border-color: rgba(128, 148, 255, .7); }
.composer-actions { align-items: center; gap: 8px; }
.composer-actions .button { min-height: 38px; }
.composer-options,
.composer-media-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(8, 9, 20, .16);
}
.composer-options summary,
.composer-media-details summary { min-height: 40px; }
.post-compose-page { max-width: 850px; }
.post-compose-heading h1 { letter-spacing: -2px; }
.post-compose-form {
  border: 1px solid rgba(144, 157, 255, .2);
  border-radius: 20px;
  padding: clamp(17px, 4vw, 28px);
  background: linear-gradient(145deg, rgba(25, 29, 54, .94), rgba(16, 18, 38, .98));
  box-shadow: 0 20px 56px rgba(0, 0, 0, .18);
}
.post-compose-form-heading { margin-bottom: 17px; }
.post-compose-field textarea {
  min-height: 230px;
  border-radius: 14px;
  padding: 15px;
  background: rgba(8, 9, 20, .25);
}
.post-compose-footer {
  align-items: center;
  padding-top: 18px;
}
.post-card {
  padding: clamp(16px, 3vw, 22px);
  border-color: rgba(255, 255, 255, .1);
  background: linear-gradient(145deg, rgba(20, 23, 44, .98), rgba(15, 17, 35, .98));
}
.post-card[data-post-url]:hover {
  border-color: rgba(144, 157, 255, .34);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .16);
}
.post-meta { min-width: 0; }
.post-meta > div { min-width: 0; }
.post-meta strong { overflow-wrap: anywhere; }
.action-translate-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: fit-content;
  min-height: 34px;
  margin: 4px 0 10px auto;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(126, 141, 255, .08);
}
.post-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 13px;
}
.post-actions > :is(form, a, button, span) {
  min-width: 0;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
}
.post-actions > :is(form, a, button, span):hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .055);
}
.post-actions > form button,
.post-actions > a,
.post-actions > button,
.post-actions > span {
  height: 100%;
  padding: 8px 6px;
}
.thread-comment {
  min-width: 0;
  padding: 15px 0 15px 16px;
}
.thread-comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.thread-comment-head > strong { margin: 0; }
.thread-comment-head time { margin: 0 0 0 auto; }
.thread-comment-text { margin: 8px 0; }
.thread-comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}
.thread-comment-actions > :is(form, details) { min-width: 0; }
.thread-comment-actions .action-translate {
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 8px;
}
.thread-reply > summary,
.comment-report > summary,
.comment-owner-tools > summary {
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 8px;
}
.comment-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(16, 18, 38, .66);
}
.comment-form-row { align-items: center; gap: 9px; }
.comment-form .comment-field { flex: 1 1 220px; }
.comment-form textarea {
  min-height: 44px;
  max-height: 160px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 9, 20, .34);
}
.comment-form .comment-submit {
  align-self: stretch;
  min-width: 94px;
  border-radius: 11px;
}
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-content,
:is(body[data-theme="light"], body[data-theme="pink"]) .settings-block,
:is(body[data-theme="light"], body[data-theme="pink"]) .post-compose-form,
:is(body[data-theme="light"], body[data-theme="pink"]) .composer,
:is(body[data-theme="light"], body[data-theme="pink"]) .post-card {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  box-shadow: 0 12px 35px rgba(22, 34, 52, .06);
}
:is(body[data-theme="light"], body[data-theme="pink"]) :is(.notification-group, .comment-form) {
  background: var(--theme-soft);
  border-color: var(--theme-border);
}

@media (max-width: 750px) {
  .settings-nav { position: static; }
  .settings-content { margin-top: 18px; padding: 20px 16px; border-radius: 16px; }
  .settings-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 6px; }
  .settings-nav > nav > a { flex: none; min-height: 38px; }
  .notification-option { align-items: center; }
  .post-compose-footer { align-items: stretch; flex-direction: column; }
  .post-compose-footer > div { width: 100%; }
}
@media (max-width: 560px) {
  .composer { padding: 14px; }
  .composer-actions { justify-content: flex-start; }
  .composer-actions select { flex: 1 1 125px; max-width: none; }
  .composer-actions .button { flex: 1 1 auto; }
  .post-actions { gap: 4px; }
  .post-actions > :is(form, a, button, span) { min-height: 38px; }
  .post-actions button, .post-actions .post-stat { gap: 4px; padding-inline: 3px; font-size: 11px; }
  .thread-comment { padding-left: 10px; }
  .thread-comment-head time { margin-left: 0; }
  .comment-form { padding: 9px; }
  .comment-form-row { flex-wrap: wrap; }
  .comment-form .comment-field { flex: 1 1 100%; order: -1; }
  .comment-form .comment-submit { margin-left: auto; min-height: 40px; }
}

/* ==========================================================================
   Mobile hardening - phone widths (<= 900px). Fixes grid columns that grew to
   their content's min-width (causing sideways scroll), the footer grid that
   ignored the breakpoints, a crowded public header, and small tap targets.
   ========================================================================== */
html, body { max-width: 100%; }
body { overflow-x: clip; }
img, video, canvas, iframe, table { max-width: 100%; }
pre, code { overflow-wrap: anywhere; }
pre { overflow-x: auto; }

@media (max-width: 900px) {
  /* 1fr is minmax(auto, 1fr): a wide child stretched the whole column. */
  .app-layout, .app-layout.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .app-layout > *, .settings-layout > *, .profile-layout > *, .community-detail > *, .explore-page > * { min-width: 0; }
  .feed-column, .discover-column { min-width: 0; max-width: 100%; }
  .app-footer .footer-top { grid-template-columns: 1fr 1fr; }
  .post-card, .composer, .settings-block, .discover-panel { max-width: 100%; }
  .post-body, .post-view-body, .comment-body, .chat-msg-main, .profile-bio { overflow-wrap: anywhere; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 700px) {
  .app-footer .footer-top { grid-template-columns: 1fr; }
  .footer-col a { padding: 4px 0; margin-bottom: 6px; }
  .post-actions { gap: 0; }
  .post-actions button, .post-actions .post-stat, .post-actions a { min-width: 0; justify-content: center; }
  .post-actions .label { display: none; }
  .hashtag-row, .post-meta { min-width: 0; }
  .feed-heading { flex-wrap: wrap; gap: 12px; }
  .panel-heading { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 420px) {
  .site-nav { height: 68px; gap: 8px; }
  .site-nav .brand { font-size: 18px; min-width: 0; }
  .site-nav .brand img { height: 30px; width: 30px; }
  .nav-actions { gap: 6px; flex: none; }
  .nav-actions .button { padding: 0 12px; font-size: 12px; white-space: nowrap; }
  .container { width: calc(100% - 28px); }
  h1 { font-size: clamp(32px, 11vw, 44px); }
  .auth-card { padding: 24px 16px; }
  .hero-actions { gap: 14px; }
  .hero-actions .button { width: 100%; justify-content: center; }
}

/* Touch devices: comfortable hit areas without changing how things look. */
@media (pointer: coarse) {
  .back-link, .settings-link, .text-link, .post-open-link { display: inline-flex; align-items: center; min-height: 40px; }
  .footer-legal a, .footer-col a { display: inline-flex; align-items: center; min-height: 36px; }
  summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; }
  .hashtag-chip { min-height: 34px; display: inline-flex; align-items: center; }
  .post-actions button, .post-actions .post-stat, .post-view-actions button, .post-view-actions .action-link,
  .action-like, .action-translate, .reaction-add-trigger, .comment-tool, .icon-button { min-height: 40px; min-width: 40px; }
  .avatar-link, .name-link, .chat-sender a { position: relative; }
  .avatar-link::after, .name-link::after { content: ''; position: absolute; inset: -9px -6px; }
}
@media (max-width: 800px) { .ambient { display: none; } }

@media (max-width: 560px) {
  /* Comment composer: full-width field on top, avatar + tools on the row below. */
  .comment-form-row { flex-wrap: wrap; }
  .comment-form .comment-field { flex: 1 1 100%; order: -1; }
  .comment-form-row > .avatar { margin: 0 auto 0 0; }
}
@media (pointer: coarse) {
  .button-small, .button.button-small { min-height: 38px; }
  .site-nav .brand { min-height: 40px; }
}

.chat-attachment-picker { position: relative; overflow: hidden; }
.chat-attachment-picker input[type="file"] { font-size: 0; }
.docs-table { min-width: 520px; }

/* Phones: lift the smallest (9-10px) captions to a readable size. */
@media (max-width: 700px) {
  small, time, .upload-help, .report-evidence-label, .community-map-attribution, .member-badge,
  .post-meta span, .device-row span, .thread-comment time, .upload-dropzone-copy small,
  .profile-achievement-item small, .quest-progress, .recap-muted, .form-note { font-size: 11.5px; }
}
