/* Asteri self-hosted — visual parity with the hosted Site:
   starfield + nebulae, Avant Garde / Space Grotesk, glass + frosted panels,
   banner, hosted-style header with icon buttons, mobile two-row header. */

:root {
  --night: #030f2a;
  --deep: #04143d;
  --panel: #0b2a6c;
  --panel-2: #10347e;
  --panel-border: rgba(159, 191, 224, 0.22);
  --ink: #b2dbe3;
  --heading: #eeffff;
  --dim: #9fbfe0;
  --subtle: #7d9cc4;
  --silver: #c0c0c0;
  --venus: #d4cec0;
  --gold: #f3efc6;
  --rose: #b0bcc7;
  --link: #8fb5ec;
  --danger: #ee8fa3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ink);
  font-family: 'ITC Avant Garde Gothic LT', 'Century Gothic', Futura, 'Trebuchet MS', system-ui, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
}

::selection { background: rgba(178, 219, 227, 0.35); color: #eeffff; }

.page { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: 'ITC Avant Garde Gothic LT', 'Century Gothic', Futura, sans-serif;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.01em;
}
h1 { font-size: 1.6rem; margin: 0.4rem 0 0.2rem; }
h2 { font-size: 1.15rem; margin: 1.1rem 0 0.4rem; }

/* ---- Starfield / nebula backdrop ---- */
.starfield {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 75% -5%, rgba(16, 52, 126, 0.55), transparent 65%),
    radial-gradient(ellipse 70% 55% at 8% 105%, rgba(11, 42, 108, 0.5), transparent 65%),
    radial-gradient(ellipse 45% 35% at 55% 45%, rgba(176, 188, 199, 0.06), transparent 70%),
    var(--night);
}
.nebula { position: absolute; border-radius: 9999px; filter: blur(60px); }
.nebula-a {
  width: 55vw; height: 55vw; top: -22vw; right: -15vw;
  background: radial-gradient(circle, rgba(16, 52, 126, 0.8), transparent 70%);
  animation: nebula-drift 42s ease-in-out infinite alternate;
}
.nebula-b {
  width: 46vw; height: 46vw; bottom: -20vw; left: -12vw;
  background: radial-gradient(circle, rgba(11, 42, 108, 0.9), transparent 70%);
  animation: nebula-drift 56s ease-in-out infinite alternate-reverse;
}
.nebula-c {
  width: 30vw; height: 30vw; top: 34%; left: 58%;
  background: radial-gradient(circle, rgba(176, 188, 199, 0.1), transparent 70%);
  animation: nebula-drift 64s ease-in-out infinite alternate;
}
.stars { position: absolute; inset: 0; }
.stars::before { content: ''; position: absolute; border-radius: 9999px; background: transparent; }
.stars-a::before {
  width: 2px; height: 2px;
  box-shadow:
    8vw 12vh #eeffff, 15vw 45vh rgba(238,255,255,0.8), 22vw 78vh rgba(204,255,255,0.9),
    30vw 22vh rgba(238,255,255,0.7), 38vw 60vh #eeffff, 45vw 8vh rgba(204,255,255,0.8),
    52vw 38vh rgba(238,255,255,0.75), 60vw 82vh #eeffff, 66vw 18vh rgba(204,255,255,0.85),
    72vw 55vh rgba(238,255,255,0.7), 80vw 30vh #eeffff, 86vw 70vh rgba(204,255,255,0.8),
    92vw 12vh rgba(238,255,255,0.9), 5vw 88vh rgba(204,255,255,0.75),
    33vw 92vh rgba(238,255,255,0.8), 58vw 65vh rgba(204,255,255,0.7),
    78vw 90vh #eeffff, 95vw 45vh rgba(238,255,255,0.8);
  animation: twinkle 5s ease-in-out infinite alternate;
}
.stars-b::before {
  width: 1px; height: 1px;
  box-shadow:
    12vw 30vh rgba(192,192,192,0.85), 18vw 62vh rgba(243,239,198,0.6), 26vw 40vh rgba(159,191,224,0.8),
    34vw 74vh rgba(192,192,192,0.7), 42vw 28vh rgba(243,239,198,0.55), 49vw 88vh rgba(159,191,224,0.75),
    55vw 14vh rgba(192,192,192,0.8), 63vw 48vh rgba(243,239,198,0.5), 70vw 74vh rgba(159,191,224,0.8),
    76vw 8vh rgba(192,192,192,0.85), 84vw 44vh rgba(243,239,198,0.6), 90vw 84vh rgba(159,191,224,0.7),
    97vw 26vh rgba(192,192,192,0.8), 3vw 52vh rgba(243,239,198,0.5), 9vw 70vh rgba(159,191,224,0.8),
    28vw 6vh rgba(192,192,192,0.75), 47vw 52vh rgba(159,191,224,0.7), 68vw 34vh rgba(192,192,192,0.8),
    82vw 58vh rgba(243,239,198,0.55), 51vw 76vh rgba(192,192,192,0.7), 37vw 34vh rgba(243,239,198,0.5),
    74vw 94vh rgba(159,191,224,0.75);
  animation: twinkle 7.5s ease-in-out infinite alternate-reverse;
}
.stars-c::before {
  width: 3px; height: 3px;
  box-shadow:
    25vw 15vh 3px rgba(238,255,255,0.95), 70vw 10vh 3px rgba(243,239,198,0.85),
    88vw 55vh 3px rgba(238,255,255,0.9), 40vw 85vh 3px rgba(204,255,255,0.9),
    8vw 55vh 3px rgba(176,188,199,0.75), 55vw 28vh 3px rgba(238,255,255,0.85);
  animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes nebula-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3vw, -2vh, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .nebula, .stars::before { animation: none !important; }
}

/* ---- Glass panels (hosted panel-glass) ---- */
.card, .topbar, .editor {
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.38), rgba(11, 42, 108, 0.26));
  border: 1px solid var(--panel-border);
  box-shadow:
    0 0 32px rgba(4, 20, 61, 0.8),
    0 0 18px rgba(159, 191, 224, 0.08),
    inset 0 1px 0 rgba(204, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
a.card, button.card { transition: box-shadow 0.25s ease, border-color 0.25s ease; }
a.card:hover, button.card:hover {
  border-color: rgba(204, 255, 255, 0.35);
  box-shadow:
    0 0 36px rgba(4, 20, 61, 0.9),
    0 0 26px rgba(159, 191, 224, 0.16),
    inset 0 1px 0 rgba(204, 255, 255, 0.1);
}

/* ---- Frosted cards (hosted frosted-card): brighter, icier, heavier blur ---- */
.frosted {
  background: linear-gradient(160deg, rgba(96, 165, 250, 0.24), rgba(59, 130, 246, 0.13) 55%, rgba(37, 99, 235, 0.16));
  border: 1px solid rgba(159, 191, 224, 0.42);
  box-shadow:
    0 0 36px rgba(4, 20, 61, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 24px rgba(238, 255, 255, 0.05),
    inset 0 -1px 0 rgba(159, 191, 224, 0.12);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
a.frosted:hover, button.frosted:hover {
  border-color: rgba(191, 219, 254, 0.6);
  box-shadow:
    0 0 40px rgba(4, 20, 61, 0.85),
    0 0 28px rgba(204, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 28px rgba(238, 255, 255, 0.08),
    inset 0 -1px 0 rgba(159, 191, 224, 0.14);
}

/* ---- Header (hosted layout: logo left, icon actions right) ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-width: 0 0 1px;
  border-radius: 0;
}
.topbar-inner {
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1.5rem;
}
@media (max-width: 640px) { .topbar-inner { padding: 0.55rem 1rem; } }

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.logo {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #10347e, #04143d 75%);
  border: 1px solid rgba(243, 239, 198, 0.4);
  box-shadow: 0 0 10px rgba(243, 239, 198, 0.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--heading); letter-spacing: 0.04em; }
.brand-sub { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--dim); }

.head-actions { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.head-link { color: var(--dim); font-size: 0.75rem; text-decoration: none; padding: 0.3rem 0.2rem; }
.head-link:hover { color: var(--heading); }
.head-break { display: none; }

/* Account link in the header: wide screens only. */
.profile-link { display: none; }
@media (min-width: 641px) { .profile-link { display: inline-block; } }

.icon-btn {
  min-width: 44px; min-height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; color: var(--ink); border-radius: 999px;
}
.icon-btn:hover { color: var(--heading); background: rgba(159, 191, 224, 0.1); }
.icon-btn svg { width: 20px; height: 20px; }

.bell-wrap { position: relative; }
.bell-unread { color: var(--gold); }
.badge {
  position: absolute; top: 4px; right: 4px;
  background: #b2dbe3; color: #04143d; font-size: 0.6rem; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  pointer-events: none;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30;
  width: calc(100vw - 2rem); max-width: 24rem; max-height: 85vh; overflow-y: auto;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.92), rgba(11, 42, 108, 0.9));
  border: 1px solid rgba(178, 219, 227, 0.45); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(3, 15, 42, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 0.5rem;
}
.notif-panel[hidden] { display: none; }
.notif-head {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--subtle); margin: 0.3rem 0.6rem 0.2rem;
}
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: block; text-decoration: none; border-radius: 10px; padding: 0.55rem 0.7rem; }
.notif-item:hover { background: rgba(159, 191, 224, 0.1); }
.notif-line { margin: 0; font-size: 0.85rem; color: var(--ink); }
.notif-title { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--dim); }
.notif-text { margin: 0.15rem 0 0; font-size: 0.75rem; color: var(--subtle); word-break: break-word; }
.notif-time { margin: 0.15rem 0 0; font-size: 0.66rem; color: var(--subtle); font-family: 'Space Grotesk', monospace; }

.signout {
  border: none; background: none; color: var(--dim);
  font-size: 0.75rem; min-height: 36px; padding: 0 0.8rem;
}
.signout:hover { color: var(--heading); background: rgba(159, 191, 224, 0.1); }

/* Mobile header: compose + bell + handle on row one; Members / Mod / Sign out on row two. */
@media (max-width: 640px) {
  .head-actions { flex-wrap: wrap; row-gap: 0; column-gap: 0.6rem; justify-content: flex-end; }
  .head-break { display: block; flex-basis: 100%; height: 0; order: 2; }
  #composeBtn, #bellSlot, #settingsBtn { order: 1; }
  #auth { display: contents; }
  #auth .who { order: 1; }
  #auth .signout { order: 3; }
  #auth .signin { order: 1; }
  #membersLink, #modLink { order: 3; }
  .head-link { font-size: 0.72rem; padding: 0.2rem 0.1rem; }
  .signout { font-size: 0.72rem; min-height: 30px; padding: 0 0.4rem; }
  .icon-btn { min-width: 38px; min-height: 38px; }
}

/* ---- Site banner ---- */
.site-banner {
  position: relative; display: block;
  max-width: 72rem; margin: 1rem auto 0;
  height: 9rem; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(159, 191, 224, 0.28);
  box-shadow: 0 0 36px rgba(4, 20, 61, 0.8), inset 0 1px 0 rgba(204, 255, 255, 0.08);
  background: linear-gradient(120deg, #04143d, #0b2a6c 55%, #10347e);
}
@media (min-width: 640px) { .site-banner { height: 12rem; } }
@media (max-width: 640px) { .site-banner { margin-left: 1rem; margin-right: 1rem; } }
.banner-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.75; transform: scale(1.07);
}
.banner-frost {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(238, 255, 255, 0.1), rgba(4, 20, 61, 0.55));
  backdrop-filter: blur(2px) saturate(1.05);
  -webkit-backdrop-filter: blur(2px) saturate(1.05);
}
.banner-title {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem; pointer-events: none;
}
/* Only the text area of the banner is clickable (it goes home to Boards). */
.banner-link {
  pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 1rem;
}
.banner-name { font-size: 1.9rem; font-weight: 700; color: var(--heading); letter-spacing: 0.02em; }
@media (min-width: 640px) { .banner-name { font-size: 3rem; } }
.banner-title-box {
  font-size: 0.85rem; color: var(--dim);
  background: rgba(4, 20, 61, 0.6);
  border: 1px solid rgba(159, 191, 224, 0.28);
  border-radius: 1rem; padding: 0.35rem 1rem;
  box-shadow: 0 0 28px rgba(4, 20, 61, 0.65);
  backdrop-filter: blur(4px) saturate(1.05);
  -webkit-backdrop-filter: blur(4px) saturate(1.05);
}

.app { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }
@media (max-width: 640px) { .app { padding: 1rem 1rem 3rem; } }

.footer { text-align: center; padding: 1.5rem 1rem 2.5rem; margin-top: 2.5rem; }
.footer-home {
  display: inline-block; font-size: 22px; color: var(--ink);
  font-family: 'Segoe UI', system-ui, sans-serif; text-decoration: none;
}
.footer-home:hover { text-decoration: underline; }

.muted { color: var(--dim); }
.center { text-align: center; }
.pad { padding: 2.5rem 0; }
.small { font-size: 0.8rem; }

.card {
  display: block;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .card { padding: 1rem 1.25rem; } }
a.card { text-decoration: none; color: inherit; }
button.card { width: 100%; text-align: left; color: inherit; font: inherit; border-radius: 16px; }

.boards-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.boards-head h1 { margin: 0; }
.boards-head p { margin: 0.1rem 0 0; }

.board-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.board-name { font-weight: 700; font-size: 1.1rem; color: var(--heading); }
.board-theme { font-weight: 500; font-size: 0.85rem; margin-left: 0.4rem; }
.board-stats {
  color: var(--subtle); font-size: 0.78rem; margin-top: 0.15rem;
  font-family: 'Space Grotesk', 'Century Gothic', Futura, sans-serif;
}

.post-title { font-weight: 600; color: #fff8e7; font-size: 1rem; }

/* Long content never escapes its container. */
.post-title, .comment-body, .topic-link, .card p, .card li, .notif-text, .board-stats { overflow-wrap: anywhere; }

/* Feed rows: vote pill + cream title link + icy domain, like the hosted Site. */
.post-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.post-title-link { font-weight: 600; color: #fff8e7; text-decoration: none; overflow-wrap: anywhere; }
.post-title-link:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 2px; }
.domain-link { color: var(--ink); font-size: 0.8rem; text-decoration: none; font-family: 'Space Grotesk', monospace; }
.domain-link:hover { color: var(--heading); text-decoration: underline; }

/* Poll options with a gold progress fill, like the hosted Site. */
.poll { margin-top: 0.9rem; border: 1px solid rgba(159, 191, 224, 0.15); border-radius: 12px; padding: 0.75rem 1rem; }
.poll-head { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin: 0 0 0.5rem; }
.poll-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.poll-opt { position: relative; display: block; width: 100%; text-align: left; overflow: hidden; border-radius: 10px; padding: 0.55rem 0.8rem; min-height: 44px; }
.poll-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(243, 239, 198, 0.08); color: var(--heading); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: rgba(243, 239, 198, 0.12); pointer-events: none; }
.poll-row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.poll-label { min-width: 0; overflow-wrap: anywhere; }
.poll-nums { flex-shrink: 0; font-family: 'Space Grotesk', monospace; font-size: 0.75rem; color: var(--dim); }
.poll-hint { font-size: 0.75rem; color: var(--subtle); margin: 0.6rem 0 0; }
.meta { color: var(--dim); font-size: 0.76rem; margin-top: 0.3rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: center; }
.toolpair { display: inline-flex; gap: 0.6rem; align-items: center; }
.meta .points { color: var(--gold); }
.meta a { color: var(--link); }

.tag {
  font-size: 0.66rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid rgba(159, 191, 224, 0.3); color: var(--dim);
  background: transparent; cursor: default; text-decoration: none;
}

.label-chips { display: inline-flex; gap: 0.3rem; }
.label-chip {
  font-size: 0.66rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  border: 1px solid rgba(224, 170, 90, 0.45); color: #d8a24a;
  background: rgba(224, 170, 90, 0.08); cursor: default; text-decoration: none;
}
.label-chip-warn {
  border-color: rgba(224, 110, 90, 0.5); color: #e0705a;
  background: rgba(224, 110, 90, 0.08);
}
button.tag { cursor: pointer; }
button.tag:hover { color: var(--heading); border-color: rgba(178, 219, 227, 0.45); }

button, .btn {
  font: inherit; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--panel-border);
  background: transparent; color: var(--ink);
  padding: 0.45rem 1rem; min-height: 40px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
button:hover, .btn:hover { border-color: rgba(238, 255, 255, 0.5); color: var(--heading); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
  background: var(--gold); border-color: transparent; color: #04143d; font-weight: 600;
  box-shadow: 0 0 16px rgba(243, 239, 198, 0.3);
}
button.primary:hover { background: #faf7dd; }
button.vote { min-height: 36px; min-width: 36px; padding: 0.2rem 0.55rem; font-size: 0.95rem; border: none; color: var(--subtle); border-radius: 999px; }
button.vote:hover { color: var(--gold); background: rgba(4, 20, 61, 0.6); border-color: transparent; }
button.vote[aria-pressed="true"] {
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(243, 239, 198, 0.6));
}
button.linklike { border: none; padding: 0.2rem 0.4rem; min-height: 0; color: var(--dim); font-size: 0.76rem; background: none; }
button.linklike:hover { color: var(--heading); }
button.textlink {
  border: none; background: none; padding: 0.2rem 0; min-height: 0;
  color: var(--gold); font-size: 0.85rem;
}
button.textlink:hover { color: var(--heading); text-decoration: underline; }
.backbar {
  display: inline-flex; align-items: center; width: fit-content;
  text-decoration: none; color: var(--dim);
  border: 1px solid var(--panel-border); border-radius: 999px; background: transparent;
  min-height: 36px; padding: 0 1rem; font-size: 0.75rem;
  margin-bottom: 0.9rem;
}
.backbar:hover { border-color: rgba(238, 255, 255, 0.5); color: var(--heading); }

/* Board tag filters + sort: breathing room around the whole row. */
.board-tagbar { margin: 0.25rem 0 1.5rem; gap: 0.5rem 0.6rem; align-items: center; }

input, textarea, select {
  font: inherit; width: 100%;
  background: rgba(3, 15, 42, 0.6); color: var(--heading);
  border: 1px solid var(--panel-border); border-radius: 10px;
  padding: 0.55rem 0.75rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(243, 239, 198, 0.5); border-color: transparent; }
textarea { min-height: 5.5rem; resize: vertical; }
label { display: block; font-size: 0.82rem; color: var(--dim); margin: 0.7rem 0 0.25rem; }

.form-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; align-items: center; }
.searchform { display: flex; gap: 0.5rem; margin: 0.6rem 0 0.8rem; }
.searchform input { flex: 1; min-width: 0; }

/* Segmented hot/new/top control — the hosted sort pill, right end of the tag row. */
.sortseg {
  display: flex; border-radius: 999px; overflow: hidden; margin-left: auto;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.38), rgba(11, 42, 108, 0.26));
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sortseg button {
  border: none; border-radius: 0; min-height: 34px; padding: 0 0.9rem;
  font-size: 0.75rem; font-weight: 500; color: var(--dim); background: none;
}
.sortseg button:hover { color: var(--heading); border-color: transparent; }
.sortseg button.seg-on { background: var(--gold); color: #04143d; }

/* Comments: vote rail left, content right; replies get one thread line. */
.comment { display: flex; gap: 0.5rem; }
.comment.reply {
  margin-left: 1.25rem; padding-left: 0.75rem;
  border-left: 2px solid rgba(159, 191, 224, 0.15);
  border-radius: 4px 16px 16px 4px;
}
.vote-rail { width: 2rem; flex-shrink: 0; display: flex; justify-content: center; padding-top: 2px; }
.comment-main { flex: 1; min-width: 0; }
.comment-body { white-space: pre-wrap; word-break: break-word; color: #ffffff; margin-top: 0.35rem; }
.comment-body p { margin: 0 0 0.6em; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-body ul { list-style: disc; padding-left: 1.5em; margin: 0.4em 0 0.7em; }
.comment-body ol { list-style: decimal; padding-left: 1.5em; margin: 0.4em 0 0.7em; }
.comment-body li { margin: 0.15em 0; }
.comment-body blockquote {
  border-left: 2px solid rgba(159, 191, 224, 0.4);
  padding-left: 0.9em; margin: 0.5em 0 0.5em 1em; color: var(--dim);
}
.comment-body a { color: var(--venus); text-decoration: underline; text-underline-offset: 2px; }
.comment-body a:visited { color: var(--link); }
/* Standalone post links (the URL under a topic title). */
.card > p a { color: var(--venus); }
.card > p a:visited { color: var(--link); }
.comment-body s, .comment-body strike { text-decoration: line-through; }

.author { color: var(--link); font-weight: 500; text-decoration: none; }
.author:hover { text-decoration: underline; }
.avatar { width: 20px; height: 20px; border-radius: 50%; vertical-align: -4px; margin-right: 0.3rem; }

.error-box {
  border: 1px solid rgba(238, 143, 163, 0.5); background: rgba(238, 143, 163, 0.08);
  color: var(--danger); border-radius: 12px; padding: 0.8rem 1rem; margin: 1rem 0;
}

/* Toast: fully hidden until shown — no gold sliver at the page bottom. */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translateX(-50%) translateY(150%);
  visibility: hidden; opacity: 0;
  background: var(--gold); color: #04143d; font-weight: 600;
  padding: 0.7rem 1.2rem; border-radius: 999px; z-index: 50;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  max-width: 90vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; opacity: 1; }

.auth { display: flex; align-items: center; gap: 0.6rem; }
.auth .who { color: var(--ink); font-size: 0.85rem; text-decoration: none; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth .who:hover { color: var(--heading); text-decoration: underline; }

/* media — full-width embeds everywhere */
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
@media (min-width: 640px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
.media-cell {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--panel-border); display: block;
}
.media-thumb {
  width: 100%; max-height: 280px; object-fit: cover;
  border-radius: 10px; margin-top: 0.5rem; display: block;
}
.media-img {
  width: 100%; max-width: 100%; height: auto;
  border-radius: 10px; margin-top: 0.6rem; display: block;
}

/* rich editor */
.editor { border-radius: 10px; overflow: hidden; background: rgba(3, 15, 42, 0.6); }
.editor:focus-within { outline: 2px solid rgba(243, 239, 198, 0.5); }
.editor-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem;
  border-bottom: 1px solid rgba(159, 191, 224, 0.15); padding: 0.25rem 0.4rem;
}
.editor-bar .linklike { font-size: 0.85rem; padding: 0.25rem 0.35rem; min-height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; }
.editor-bar .linklike svg { width: 16px; height: 16px; display: block; }
.editor-colors { display: inline-flex; gap: 0.3rem; align-items: center; margin-right: 0.4rem; }
.color-dot {
  width: 12px; height: 12px; min-height: 0; padding: 0;
  border-radius: 50%; border: 1px solid var(--panel-border);
}

.color-dot[aria-pressed="true"] { outline: 2px solid var(--heading); outline-offset: 2px; }

/* Flair color picker on the profile form: the same bubbles, larger. */
.flair-colors { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin-top: 0.25rem; }
.flair-colors .color-dot { width: 22px; height: 22px; }
.editor-area {
  padding: 0.6rem 0.75rem; min-height: 7rem; color: #ffffff;
  outline: none; word-break: break-word;
}
.editor-area:empty::before { content: attr(data-placeholder); color: var(--subtle); pointer-events: none; }
.editor-area a { color: var(--ink); text-decoration: underline; }

/* home tab bar: a pill per tab inside the larger pill, every title an equal
   share of the full-width span. The + stays compact at the right end. */
.tabbar {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.35rem;
  width: 100%; border-radius: 999px;
  margin-bottom: 1rem; padding: 0.35rem;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.38), rgba(11, 42, 108, 0.26));
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar-left, .tabbar-center, .tabbar-right { display: contents; }
.tabbar button {
  border: 1px solid var(--panel-border); border-radius: 999px;
  background: rgba(3, 15, 42, 0.45);
  min-height: 44px;
  flex: 1 1 0; padding: 0 0.25rem; text-align: center;
  font-weight: 500; font-size: 0.85rem;
}
.tabbar button:hover { opacity: 0.85; }
.tabbar .tab-plus { color: #ddeeff; font-size: 1.35rem; font-weight: 700; line-height: 1; flex: 0 0 auto; padding: 0 1rem; }
.empty-title { font-size: 1.25rem; font-weight: 700; color: var(--heading); margin: 0 0 0.3rem; }

@media (max-width: 640px) {
  .tabbar { border-radius: 14px; }
  .tabbar button { font-weight: 400; font-size: 0.8rem; min-height: 38px; padding: 0 0.15rem; flex: 1 1 18%; }
  .tabbar .tab-plus { font-size: 1.15rem; flex: 0 0 auto; }
}
/* The sun: a solid bright disc inside a pill button at the left end of the bar,
   mirroring the + at the right end; links to your profile. */
.tabbar .tab-sun {
  flex: 0 0 auto; padding: 0 1rem; min-height: 44px;
  border: 1px solid var(--panel-border); border-radius: 999px;
  background: rgba(3, 15, 42, 0.45);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.1rem; line-height: 1;
  color: #ffd94d; text-shadow: 0 0 8px rgba(255, 217, 77, 0.8), 0 0 3px rgba(255, 217, 77, 1);
}
.tabbar .tab-sun:hover { opacity: 0.85; text-shadow: 0 0 14px rgba(255, 217, 77, 1), 0 0 5px rgba(255, 217, 77, 1); }

/* topics table */
.topics-wrap { overflow-x: auto; border-radius: 14px;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.38), rgba(11, 42, 108, 0.26));
  border: 1px solid var(--panel-border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topics-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.topics-table th { text-align: left; font-size: 0.72rem; color: var(--subtle); font-weight: 500; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--panel-border); }
.topics-table th.num, .topics-table td.num { text-align: right; }
.topics-table td { padding: 0.65rem 0.8rem; border-bottom: 1px solid rgba(159, 191, 224, 0.1); vertical-align: top; }
.topics-table tr:last-child td { border-bottom: none; }
.topic-link { color: #fff8e7; font-weight: 600; text-decoration: none; }
.topic-link:hover { text-decoration: underline; }
.num.gold { color: var(--gold); font-family: 'Space Grotesk', monospace; }
.num.muted-cell { color: var(--dim); white-space: nowrap; }

.signature { margin: 0.6rem 0 0; padding-top: 0.45rem; border-top: 1px solid rgba(159, 191, 224, 0.15); font-size: 0.8rem; font-style: italic; color: var(--subtle); }

.edited { color: var(--subtle); font-style: italic; }

/* spaces */
.spaces { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.spaces-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.spaces-head h2 { margin: 0; }
.space-card { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0; }
.space-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 42, 108, 0.4); border: 1px solid var(--panel-border); color: var(--link);
}
.space-body { flex: 1; min-width: 0; }
.space-name { font-weight: 700; color: var(--heading); margin: 0; font-size: 1.05rem; }
.space-body .muted { margin: 0.15rem 0 0; }

/* member profile */
.profile-card { padding: 0; overflow: hidden; }
.profile-banner { position: relative; height: 6.5rem; background: linear-gradient(90deg, #04143d, #0b2a6c, #10347e); }
@media (min-width: 640px) { .profile-banner { height: 9rem; } }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar {
  position: absolute; left: 1rem; bottom: -2.2rem; width: 4.5rem; height: 4.5rem;
  border-radius: 50%; border: 2px solid #04143d; overflow: hidden;
  background: var(--deep); display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: var(--heading);
}
@media (min-width: 640px) { .profile-avatar { width: 5.5rem; height: 5.5rem; } }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-body { padding: 2.8rem 1rem 1rem; }
.verified { color: #b2dbe3; font-size: 0.95rem; }
.verified.gold { color: var(--gold); }

/* sign-in dropdown */
.signin { position: relative; }
.signin-btn {
  background: rgba(243, 239, 198, 0.14); border: 1px solid var(--gold); color: var(--gold);
  font-weight: 600; font-size: 0.78rem;
  padding: 0.4rem 1.1rem; min-height: 36px;
}
.signin-btn:hover { background: rgba(243, 239, 198, 0.28); }
.pds-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30;
  width: calc(100vw - 2rem); max-width: 22rem;
  background: #0b2a6c; border: 1px solid rgba(178, 219, 227, 0.45); border-radius: 14px;
  padding: 0.75rem; box-shadow: 0 12px 40px rgba(3, 15, 42, 0.8);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.pds-menu[hidden] { display: none; }
.pds-head {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--subtle); margin: 0 0 0.2rem;
}
.pds-opt {
  display: block; width: 100%; text-align: left; border-radius: 10px;
  border: 1px solid var(--panel-border); padding: 0.5rem 0.7rem; min-height: 44px;
}
.pds-name { display: block; font-weight: 600; color: var(--heading); font-size: 0.88rem; }
.pds-hint { display: block; font-size: 0.75rem; color: var(--dim); margin-top: 0.1rem; }
.pds-foot { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.pds-foot input { flex: 1; min-width: 0; }

/* comment pager */
.pager { justify-content: space-between; margin-top: 0.8rem; }
.pager span { display: inline-flex; align-items: center; gap: 0.2rem; }

/* Tighter rhythm on phones: editor tools and the Edit/Delete pair. */
@media (max-width: 640px) {
  .editor-bar { gap: 0.05rem; }
  .editor-bar .linklike { min-height: 28px; min-width: 28px; padding: 0.15rem 0.25rem; }
  .meta { gap: 0.3rem 0.5rem; }
  .toolpair { gap: 0.5rem; }
}

@media (max-width: 480px) {
  .brand-text { display: none; }
  .comment.reply { margin-left: 0.9rem; padding-left: 0.6rem; }
}

/* ==== Batch 1: polish ==== */

/* Sign-in card goes glassy */
.pds-menu {
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.975), rgba(11, 42, 108, 0.925));
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(159, 191, 224, 0.35);
  box-shadow: 0 12px 40px rgba(3, 15, 42, 0.8), inset 0 1px 0 rgba(238, 255, 255, 0.08);
}

/* Long strings in feed descriptions and cards wrap instead of overflowing */
.card p, .card span, .comment-body, .media-grid a { overflow-wrap: anywhere; }

/* Notification panel fits a phone screen */
@media (max-width: 640px) {
  .notif-panel {
    position: fixed; left: 0.5rem; right: 0.5rem; top: 4rem;
    width: auto; max-width: none; max-height: 70vh;
  }
}

/* Feed card actions: larger, real buttons (wired up in Batch 3) */
.fp-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.fp-actions button, .fp-actions a {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 40px; padding: 0 0.9rem; border-radius: 999px;
  border: 1px solid var(--panel-border); background: rgba(3, 15, 42, 0.45);
  color: var(--ink); font-size: 0.85rem; text-decoration: none;
}
.fp-actions button:hover, .fp-actions a:hover { color: var(--heading); border-color: rgba(204, 255, 255, 0.35); }
.fp-actions button.on { color: var(--gold); border-color: rgba(243, 239, 198, 0.5); }
/* Feed action icons + active colors */
.fp-actions svg { width: 1.05rem; height: 1.05rem; }
.fp-actions button.on-repost { color: #7cb587; border-color: rgba(124, 181, 135, 0.5); }
.fp-actions button.on-like { color: #ee8fa3; border-color: rgba(238, 143, 163, 0.5); }

/* Toasts: wider, shorter, less spherical */
.toast {
  border-radius: 12px; padding: 0.55rem 1.4rem;
  max-width: min(92vw, 36rem); font-size: 0.85rem; line-height: 1.35;
}

/* Composer image picks (used by Batch 2) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; margin-top: 0.4rem; }
.pick-cell { position: relative; display: flex; flex-direction: column; gap: 0.3rem; }
.pick-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--panel-border); }
.pick-rm {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 999px;
  background: rgba(3, 15, 42, 0.85); color: #fff; border: 1px solid var(--panel-border);
  font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.pick-alt { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
/* Lightbox: full-screen overlay for viewing an image with its alt text. */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; padding: 1rem;
  background: rgba(3, 15, 42, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lightbox img {
  max-width: 92vw; max-height: 78vh; border-radius: 10px;
  border: 1px solid var(--panel-border); object-fit: contain;
}
.lightbox .lb-alt {
  max-width: min(92vw, 40rem); color: var(--ink); font-size: 0.85rem;
  text-align: center; overflow-wrap: anywhere;
}
.lightbox .lb-row { display: flex; gap: 0.5rem; }
.lightbox .lb-row a, .lightbox .lb-row button {
  min-height: 40px; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid var(--panel-border); background: rgba(3, 15, 42, 0.6);
  color: var(--ink); font-size: 0.85rem; text-decoration: none;
  display: inline-flex; align-items: center;
}
.lightbox .lb-row a:hover, .lightbox .lb-row button:hover { color: var(--heading); border-color: rgba(204, 255, 255, 0.35); }

/* In-post images render as compact thumbnails; click opens the lightbox. */
.media-thumb { cursor: zoom-in; }

/* In-post image grid: two square cells per row, cyan-bordered; images at a
   2:1-or-wider ratio span both columns as a rectangle (like Bluesky). */
.post-media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.post-media-grid .media-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover; max-height: none; margin-top: 0;
  border: 1px solid rgba(178, 219, 227, 0.65); border-radius: 10px;
}
.post-media-grid .media-thumb.wide { grid-column: span 2; aspect-ratio: 2 / 1; }

/* Rich link preview card: shown on a post's link when no known-media embed
   applies and the indexer's scrape returned a title/image. */
.link-card {
  display: flex; flex-direction: column; margin-top: 0.6rem;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 10px; overflow: hidden; text-decoration: none;
  transition: border-color 0.15s ease;
}
.link-card:hover { border-color: var(--link); }
.link-card-image {
  width: 100%; max-height: 320px; object-fit: cover; display: block;
}
.link-card-body {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.7rem 0.9rem;
}
.link-card-domain { color: var(--subtle); font-size: 0.8rem; text-transform: lowercase; }
.link-card-title { color: var(--heading); font-weight: 600; line-height: 1.3; }
.link-card-desc {
  color: var(--dim); font-size: 0.9rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Always show the vertical scrollbar — no layout shift between pages. */
html { overflow-y: scroll; }
/* Scrollbar: dim silver track, bright moonlight thumb */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 235, 241, 0.85) rgba(192, 192, 192, 0.3);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: rgba(192, 192, 192, 0.3);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: rgba(230, 235, 241, 0.85);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #eeffff; }

/* In-app thread view */
.thread-panel {
  width: min(94vw, 40rem); max-height: 85vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.thread-panel .card { margin: 0; }
.thread-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 1;
  min-height: 40px; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid var(--panel-border); background: rgba(3, 15, 42, 0.8);
  color: var(--ink); font-size: 0.85rem;
}
.thread-panel textarea { width: 100%; }

/* "New Bluesky post" toggle on Feeds / Following: breathing room, stays left.
   Padding, not margin — it can't collapse against the neighbors. */
.bsky-compose { padding: 1rem 0 1.2rem; }
.backpill { border: 1px solid var(--panel-border); border-radius: 999px; background: rgba(3, 15, 42, 0.45); color: var(--dim); font-size: 0.8rem; min-height: 36px; padding: 0 1rem; }
.backpill:hover { color: var(--heading); border-color: rgba(204, 255, 255, 0.35); }
/* Board pages' submit button always hugs the right end of the header row,
   even if the description wraps short. */
.boards-head { width: 100%; }
.boards-head > button { margin-left: auto; margin-bottom: 0.6rem; }
/* Composer overlay: a card sized to the task, cyan-bordered like images. */
.compose-panel {
  width: min(92vw, 32rem); max-height: 80vh;
  border: 1px solid rgba(178, 219, 227, 0.65); border-radius: 14px;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.97), rgba(11, 42, 108, 0.95));
  padding: 1rem 1.1rem;
}
/* Compact crosspost toggle */
.crosspost { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--dim); margin-top: 0.2rem; cursor: pointer; }
.crosspost input { width: 1rem; height: 1rem; accent-color: var(--gold); margin: 0; }
/* Home | title | post button share one row; the title flexes, wraps only on phones. */
.boards-head > div { min-width: 0; flex: 1; }
.boards-head > div p { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 640px) {
  .boards-head { flex-wrap: wrap; }
}

/* Boards header: title centered on its own line; Home and New Boards post
   share the row below at opposite ends. Applies to the Boards tab and every
   board page (sophia, astra, …), which share .boards-head. */
.boards-head { flex-wrap: wrap; justify-content: space-between; align-items: center; }
.boards-head > div { order: -1; flex: 1 1 100%; min-width: 0; text-align: center; }
.boards-head > div p { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .boards-head { gap: 0.5rem; }
  .boards-head h1 { font-size: 1.45rem; }
}

/* Second row of the boards header: Home hard left, post button hard right. */
.boards-head > button.backpill { margin-right: auto; }
.boards-head > button.primary { margin-left: auto; }

/* Home wins the left edge — beats the older catch-all button rule. */
.boards-head > button.backpill { margin: 0; margin-right: auto; }

/* Media embeds (YouTube, Vimeo, SoundCloud, Bandcamp) */
.embed-frame { margin-top: 0.6rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--panel-border); background: #000; }
.embed-frame iframe { width: 100%; height: 100%; min-height: 120px; border: 0; display: block; }

/* Settings: reduced motion */
body.reduced-motion .nebula, body.reduced-motion .stars::before { animation: none !important; }

/* Floating top/refresh button on the feed tabs: left edge, silver ring, blue caret */
.feed-top {
  position: fixed; left: 1rem; top: 50%; transform: translateY(-50%);
  z-index: 60; width: 3rem; height: 3rem; border-radius: 50%;
  border: 2px solid #c0c0c0; background: rgba(3, 15, 42, 0.85);
  color: #7ba3e8; font-size: 1.6rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
  cursor: pointer; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.feed-top:hover { border-color: #eeffff; color: #b2dbe3; }
@media (max-width: 900px) {
  .feed-top { top: auto; bottom: 1.1rem; transform: none; width: 2.7rem; height: 2.7rem; }
}

/* Top/refresh button: bottom-left beside the body on all sizes; bigger,
   optically centered caret (the glyph sits high, so it pads from the top). */
.feed-top {
  top: auto; bottom: 1.2rem; left: 1.2rem; transform: none;
  width: 3.4rem; height: 3.4rem; font-size: 2.2rem;
  padding-top: 0.55rem;
}
@media (max-width: 900px) {
  .feed-top { bottom: 1.1rem; left: 1rem; width: 3rem; height: 3rem; font-size: 1.9rem; padding-top: 0.45rem; }
}

/* Top/refresh button hugs the left edge of the 60rem content column. */
.feed-top { left: calc(50% - 30rem - 4.6rem); }
@media (max-width: 75rem) {
  .feed-top { left: 1rem; }
}

/* Top/refresh: one button-width further left; gold ring, pale caret. */
.feed-top { left: calc(50% - 30rem - 8rem); border-color: #f3efc6; color: #eeeeee; }
.feed-top:hover { border-color: #eeffff; color: #ffffff; }
@media (max-width: 75rem) {
  .feed-top { left: 1rem; }
}

/* Top/refresh: final nudge left. */
.feed-top { left: calc(50% - 30rem - 9.5rem); }

/* Fullscreen looping background video, under the starfield; scrim keeps text readable. */
.bg-video {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.bg-scrim {
  position: fixed; inset: 0; z-index: 0;
  background: rgba(3, 15, 42, 0.55);
  pointer-events: none;
}
body.reduced-motion .bg-video { display: none; }

/* Compact "copy link" button shared by board and post pages — sits between
   the Home and Submit buttons on the boards-head row, understated styling. */
.link-copy-btn {
  background: none; border: 1px solid var(--panel-border); color: var(--dim);
  font-size: 0.78rem; padding: 0.25rem 0.6rem; border-radius: 999px;
  margin: 0 auto; cursor: pointer;
}
.link-copy-btn:hover { color: var(--heading); border-color: var(--dim); }

/* Reply card footer: Reply link on the left, share icon pinned to the right. */
.reply-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.4rem; }
.share-icon-btn {
  background: none; border: none; color: rgb(178, 219, 227);
  display: inline-flex; align-items: center; padding: 0.2rem;
  cursor: pointer; opacity: 0.85; border-radius: 6px;
}
.share-icon-btn:hover { opacity: 1; background: rgba(178, 219, 227, 0.12); }
.reply-footer .share-icon-btn { margin-left: auto; }

/* Title + share icon rows: post page (left-aligned) and board page (centered
   as a unit, since .boards-head centers titleWrap's whole contents). */
.title-row { display: flex; align-items: center; gap: 0.5rem; }
.title-row h1 { margin: 0; }
.board-title-row { display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center; }
.board-title-row h1 { margin: 0; }

/* "Share to Bluesky" overlay: generated card image + editable text + post
   button, styled like .compose-panel (bordered gradient card). */
.share-panel {
  position: relative;
  width: min(92vw, 34rem); max-height: 85vh; overflow-y: auto;
  border: 1px solid rgba(178, 219, 227, 0.65); border-radius: 14px;
  background: linear-gradient(165deg, rgba(16, 52, 126, 0.97), rgba(11, 42, 108, 0.95));
  padding: 1rem 1.1rem;
}
.share-panel textarea { width: 100%; }
.share-panel h2 { margin-top: 0; }
