/* Splatter on the web. Same tokens as the iPhone app (Theme.swift) and the brand
   guideline: warm near-black ground, paper text, one saffron accent. */
:root {
  /* colour */
  --ground: #0E1110;   /* Ink 900 */
  --panel: #181C1B;    /* Ink 800 */
  --raised: #222726;   /* Ink 700 */
  --line: rgba(255, 255, 255, 0.09);
  --text: #F2F0EA;     /* Paper */
  --muted: rgba(242, 240, 234, 0.58);
  --faint: rgba(242, 240, 234, 0.38);
  --accent: #F4A62A;   /* Saffron */
  --accent-light: #FFD98A; /* Saffron tint: only the signed-out headline */
  --on-accent: #0E1110;
  --coral: #FF6B5E;
  --danger: var(--coral);
  --link: #8FB5FF;     /* Sky */
  --mint: #5FD3A0;
  --gradient: linear-gradient(135deg, var(--accent), var(--coral));
  /* radius */
  --r-small: 10px; --r-control: 14px; --r-card: 18px; --r-panel: 24px; --r-bar: 28px;
  /* space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --nav-text: rgba(242, 240, 234, 0.76);
  --topbar: rgba(14, 17, 16, 0.94);
  --hover: rgba(255, 255, 255, 0.07);
  --side: 236px;
  color-scheme: dark;
}
/* Light appearance: chosen in the ⋯ menu on your profile, or "System" with a light device. */
:root[data-theme="light"] {
  --ground: #F6F4EF; --panel: #FFFFFF; --raised: #ECE9E2;
  --line: rgba(14, 17, 16, 0.10);
  --text: #141716; --muted: rgba(20, 23, 22, 0.60); --faint: rgba(20, 23, 22, 0.40);
  --coral: #E5483B; --link: #2F6FE0; --mint: #1E9E6A;
  --nav-text: rgba(20, 23, 22, 0.72); --topbar: rgba(246, 244, 239, 0.94); --hover: rgba(14, 17, 16, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --ground: #F6F4EF; --panel: #FFFFFF; --raised: #ECE9E2;
    --line: rgba(14, 17, 16, 0.10);
    --text: #141716; --muted: rgba(20, 23, 22, 0.60); --faint: rgba(20, 23, 22, 0.40);
    --coral: #E5483B; --link: #2F6FE0; --mint: #1E9E6A;
    --nav-text: rgba(20, 23, 22, 0.72); --topbar: rgba(246, 244, 239, 0.94); --hover: rgba(14, 17, 16, 0.05);
    color-scheme: light;
  }
}
/* Videos, scenes and stories always stay dark. */
body.immersive, .scene, .story-viewer {
  --ground: #0E1110; --panel: #181C1B; --raised: #222726; --line: rgba(255, 255, 255, 0.09);
  --text: #F2F0EA; --muted: rgba(242, 240, 234, 0.58); --faint: rgba(242, 240, 234, 0.38);
  --coral: #FF6B5E; --link: #8FB5FF; --mint: #5FD3A0;
  --nav-text: rgba(242, 240, 234, 0.76); --topbar: rgba(14, 17, 16, 0.94); --hover: rgba(255, 255, 255, 0.07);
  color-scheme: dark; color: var(--text);
}
body.immersive { background: #000; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--text);
  font: 15px/1.45 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.icon { display: inline-flex; }
.muted { color: var(--muted); }
.center { text-align: center; }
.fine { color: var(--muted); font-size: 12.5px; }
.error { color: var(--danger); font-size: 13.5px; min-height: 0; }
.error:empty, .notice:empty { display: none; }
.notice { color: var(--accent); font-size: 13.5px; }
.grow { flex: 1; }

/* ---------- frame: sidebar on wide screens, bars top and bottom on phones */
#side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 22px 14px;
  display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line);
}
#top, #bar { display: none; }
#view { margin-left: var(--side); min-height: 100vh; padding: 26px 20px 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--accent); padding: 4px 12px 18px; }
.brand span:last-child { color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.nav {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 16px;
  color: var(--nav-text); font-size: 16px;
}
.nav:hover { background: var(--panel); }
.nav.on { color: var(--accent); font-weight: 700; }
.nav.make .plus {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--accent); color: var(--ground);
}
.dot { position: absolute; left: 30px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.join { margin-top: 14px; }

@media (max-width: 820px) {
  #side { display: none; }
  #view { margin-left: 0; padding: 66px 0 104px; }
  #top {
    display: flex; position: fixed; inset: 0 0 auto 0; z-index: 5; height: 54px; align-items: center; justify-content: space-between;
    padding: 0 14px; background: var(--topbar); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  #top .brand { padding: 0; }
  #top .brand span:last-child { font-size: 19px; }
  #top .nav { padding: 8px; }
  #top .dot { left: 26px; top: 6px; }
  #bar {
    display: flex; position: fixed; z-index: 5; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom));
    height: 70px; padding: 0 6px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
  }
  #bar .nav { flex: 1; flex-direction: column; gap: 3px; padding: 6px 0; font-size: 10.5px; }
  #bar .nav:hover { background: none; }
  #bar .nav.make .plus { width: 50px; height: 50px; border-radius: 19px; }
  #bar .nav.make .nav-label { display: none; }
}
body.immersive #view { padding: 0; }
body.immersive #top { display: none; }

/* ---------- shared pieces */
.column { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.column.wide { max-width: 900px; }
@media (max-width: 820px) { .column > :not(.feed):not(.grid):not(.card) { margin-left: 14px; margin-right: 14px; } }
.title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.section { font-size: 16px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: 16px; text-align: center;
}
.button.small { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.quiet { background: var(--panel); border: 1px solid var(--line); }
.button.danger { background: rgba(255, 107, 94, 0.14); color: var(--danger); }
.button:disabled { opacity: 0.45; cursor: default; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="search"], textarea {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: inherit; font-size: 16px; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.column > input, .column > .search { width: auto; align-self: stretch; }
.segments { display: flex; border-bottom: 1px solid var(--line); }
.segments button { flex: 1; min-height: 44px; position: relative; font-weight: 600; color: var(--muted); }
.segments button.on { color: var(--text); }
.segments button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--accent); }
/* One setting out of a few: rows in a panel, a ring that fills saffron. */
.choice-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; width: 100%; }
.choice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 16px; text-align: left; border-top: 1px solid var(--line); }
.choice-row:first-child { border-top: 0; }
.choice-row span { display: flex; flex-direction: column; gap: 2px; }
.choice-row small { color: var(--muted); font-weight: 500; }
.choice-ring { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); box-sizing: border-box; }
.choice-row.on .choice-ring { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 6px var(--accent), inset 0 0 0 7px var(--on-accent); }
.choice-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.label { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; }
.panel { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); }
.avatar {
  display: grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); color: var(--muted);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* No picture: the person outline fills the same circle at any size, even where CSS
   resizes the circle (profile header, story ring). */
.avatar > .icon { width: 100%; height: 100%; display: grid; place-items: center; }
.avatar > .icon svg { display: block; width: 56%; height: 56%; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 30px 20px; text-align: center; grid-column: 1 / -1; }
.empty p { color: var(--muted); max-width: 320px; }
.empty-arch, .auth-arch { color: var(--accent); }
.spinner {
  width: 28px; height: 28px; margin: 40px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; grid-column: 1 / -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { grid-column: 1 / -1; min-height: 1px; }
#toast {
  position: fixed; left: 50%; bottom: 110px; z-index: 40; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--on-accent); font-weight: 600; transition: 0.2s; max-width: 90vw;
}
#toast.shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- post card */
.feed { display: flex; flex-direction: column; gap: 30px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who small, .comment small { color: var(--muted); font-size: 12.5px; }
.more { width: 44px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.media { position: relative; overflow: hidden; background: #000; border-radius: var(--r-card); width: 100%; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.step {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 14.5px;
}
.media .step-row { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; }
.step-row { display: flex; align-items: center; gap: 8px; }
.mark-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; background: rgba(14, 17, 16, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.mark-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
/* What kind of post: small chips in the top-left corner (the carousel count is top-right). */
.type-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; gap: 6px; max-width: calc(100% - 90px); pointer-events: none; }
.type-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; min-width: 26px; padding: 0 6px; justify-content: center;
  border-radius: 999px; background: rgba(14, 17, 16, 0.6); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.type-badge.three-d { padding: 0 8px 0 6px; background: var(--accent); color: var(--on-accent); font-weight: 800; letter-spacing: .04em; }
.badge.three-d { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; border-radius: 99px; background: rgba(14, 17, 16, .6);
  font-size: 11px; font-weight: 800; letter-spacing: .04em; filter: none; }
.badge.three-d .icon { color: var(--accent); }
.caption-name { color: inherit; text-decoration: none; }
.caption-name:hover .name-tag { text-decoration: underline; }
.type-badge.place { pointer-events: auto; padding: 0 10px 0 7px; min-width: 0; color: #fff; text-decoration: none; border: 1px solid rgba(244, 166, 42, 0.55); }
.type-badge.place .icon { color: var(--accent); }
.type-badge.place span:not(.icon) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sound { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.55); }
.burst { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.burst.go { animation: burst 0.8s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: scale(0.5); } 25% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
.actions { display: flex; align-items: center; gap: 18px; padding: 0 4px; }
.actions button, .actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.actions .on { color: var(--accent); }
.actions .count-only { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.actions b { font-variant-numeric: tabular-nums; font-weight: 600; }
.actions b, .actions .views { white-space: nowrap; flex: none; }
.actions { flex-wrap: nowrap; }
.actions .views { margin-left: 0; }
.views { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.caption { padding: 0 4px; overflow-wrap: anywhere; }
@media (max-width: 820px) { .card header, .actions, .caption { padding-left: 14px; padding-right: 14px; } .media { border-radius: 0; } }

/* ---------- grids, people, comments, activity */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 821px) { .grid { gap: 8px; } .tile { border-radius: var(--r-small); } }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--panel); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7)); }
.search { border-radius: 999px !important; }
.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 14px; }
.person:hover { background: var(--panel); }
.person > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.person small { color: var(--muted); }
.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment p { overflow-wrap: anywhere; }
.comment small { display: flex; gap: 12px; align-items: center; }
.comment .link { font-size: 12.5px; }
.comment-form { display: flex; gap: 8px; position: sticky; bottom: 96px; background: var(--ground); padding: 8px 0; }
@media (min-width: 821px) { .comment-form { bottom: 0; } }
.comment-form input { border-radius: 999px; }
.activity { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity .who > span { white-space: normal; display: flex; flex-direction: column; gap: 4px; }
.activity { padding: 10px 14px; margin: 0 -14px; border-radius: var(--r-control); }
.activity.fresh { background: color-mix(in srgb, var(--tone) 8%, transparent); }
.activity .when { color: var(--muted); font-size: 13px; }
.activity-group { display: flex; flex-direction: column; gap: 2px; }
.activity-group h3 { font-size: 15px; font-weight: 700; margin: 14px 0 4px; }
.kind-wrap { position: relative; flex: none; display: inline-flex; }
.kind-badge { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tone); color: var(--on-accent); box-shadow: 0 0 0 2.5px var(--ground); }
.kind-badge.k-coral { color: #fff; }
.kind-badge.k-text { color: var(--ground); }
.quote { quotes: none; display: block; padding-left: 9px; border-left: 2.5px solid var(--tone); color: var(--muted); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-coral { --tone: var(--coral); } .k-link { --tone: var(--link); } .k-mint { --tone: var(--mint); } .k-accent { --tone: var(--accent); } .k-text { --tone: var(--text); }
.thumb { flex: none; width: 48px; height: 48px; border-radius: var(--r-small); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- profile */
.profile { display: flex; gap: 26px; align-items: flex-start; padding: 6px 4px 10px; }
.profile > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.profile h1 { font-size: 22px; letter-spacing: -0.01em; }
.stats { display: flex; gap: 26px; }
.stats > * { display: flex; flex-direction: column; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.25; }
.stats b { color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
.name { font-weight: 700; }
.bio { overflow-wrap: anywhere; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-actions .button { min-height: 40px; font-size: 14.5px; padding: 0 16px; }
@media (max-width: 520px) { .profile { gap: 16px; } .profile .avatar { width: 72px !important; height: 72px !important; } .stats { gap: 18px; } }

/* ---------- pop-ups */
.backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); }
.sheet {
  width: 100%; max-width: 400px; max-height: 88vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 26px;
}
.sheet h2 { font-size: 20px; }
.auth { display: flex; flex-direction: column; gap: 10px; }
.auth form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.auth small { color: var(--muted); font-size: 12px; margin-top: -4px; }
/* Birthday: three of Splatter's own drop-downs in a row. */
.birthday { border: 0; margin: 0; padding: 0; min-width: 0; }
.birthday legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.birthday-row { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; gap: 8px; }
.birthday select { width: 100%; min-width: 0; padding: 13px 10px; border-radius: 14px; border: 1px solid var(--line);
  background-color: var(--panel); color: var(--text); font: inherit; font-size: 16px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
.birthday select:invalid { color: var(--faint); }
.birthday select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 520px) { .backdrop { place-items: end center; padding: 0; } .sheet { border-radius: 26px 26px 0 0; max-width: none; padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }

/* ---------- create */
.preview { border-radius: 20px; overflow: hidden; background: #000; display: grid; place-items: center; }
.preview canvas, .preview img, .preview video { max-height: 56vh; width: auto; max-width: 100%; height: auto; }

/* ---------- Splats */
/* Phone: the video fills the screen. Desktop: a rounded video card in the middle, the
   buttons beside it, arrows and a close button on the far side. */
.reel { height: 100vh; height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; background: #000; }
.reel::-webkit-scrollbar { display: none; }
.reel-page { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.reel-card { position: relative; width: 100%; height: 100%; }
.reel-media { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; background: #000; cursor: pointer; }
.reel-media video { height: 100%; width: 100%; max-width: calc(100dvh * 9 / 16); object-fit: cover; }
.reel-media video.whole { object-fit: contain; max-width: 100%; }
.reel-media img.reel-still { height: 100%; width: 100%; max-width: calc(100dvh * 9 / 16); object-fit: cover; }
.reel-media .type-badges { top: 64px; left: 14px; } /* under the Splats / Friends switch */
.shade { position: absolute; inset: 40% 0 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); pointer-events: none; }
.details, .side { position: absolute; bottom: 104px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.details { left: max(16px, calc(50% - 50dvh * 9 / 16 + 16px)); right: 90px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 420px; cursor: default; }
.details p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.details .step { text-shadow: none; }
.side { right: max(12px, calc(50% - 50dvh * 9 / 16 + 12px)); display: flex; flex-direction: column; gap: 18px; align-items: center; z-index: 2; }
.side > * { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; }
.side small { font-weight: 600; font-size: 12px; }
.side .on { color: var(--accent); }
.side .on small { color: #fff; }
.play-mark { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.88); opacity: 0; transition: opacity 0.15s; pointer-events: none; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); }
.play-mark.on { opacity: 1; }
/* The seek line: thin until touched, with a tall touch area so a thumb finds it. */
.seek { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; cursor: pointer; touch-action: none; z-index: 1; }
.seek::before, .seek i { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; transition: height 0.12s; }
.seek::before { right: 0; background: rgba(255, 255, 255, 0.25); }
.seek i { width: 0; background: #fff; }
.seek:hover::before, .seek:hover i, .seek.drag::before, .seek.drag i, .seek:focus-visible::before, .seek:focus-visible i { height: 7px; }
.reel-close, .reel-hop { display: none; }
@media (max-width: 820px) { .seek { bottom: calc(86px + env(safe-area-inset-bottom)); } }
@media (min-width: 900px) {
  .reel-page { grid-template-columns: 1fr; }
  .reel-card { height: calc(100dvh - 28px); width: calc((100dvh - 28px) * 9 / 16); }
  .reel-media { border-radius: 18px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07); }
  .reel-media video, .reel-media video.whole, .reel-media img.reel-still { max-width: none; }
  .reel-media .type-badges { top: 50px; }
  .details { left: 18px; right: 18px; bottom: 34px; max-width: none; }
  .side { right: auto; left: calc(100% + 18px); bottom: 6px; }
  .side > * { width: 52px; }
  .side > button, .side > a { color: #fff; }
  .side > button > :first-child, .side > a > :first-child { width: 48px; height: 48px; padding: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); box-sizing: border-box; }
  .side .on > :first-child { background: rgba(255, 255, 255, 0.14); }
  .reel-close { display: grid; place-items: center; position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.12); z-index: 20; }
  .reel-hop { display: flex; flex-direction: column; gap: 12px; position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 20; }
  .reel-hop button { width: 44px; height: 44px; border-radius: 50%; border: 0; color: #fff; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; cursor: pointer; }
  .reel-hop button:hover, .reel-close:hover { background: rgba(255, 255, 255, 0.2); }
  .reel-hop button:first-child svg { transform: rotate(-90deg); }
  .reel-hop button:last-child svg { transform: rotate(90deg); }
}
@media (min-width: 821px) and (max-width: 899px) { .details, .side { bottom: 34px; } }
.reel .empty { height: 100dvh; justify-content: center; padding-top: 0; }

/* ---------- inside a scene */
.scene { position: fixed; inset: 0; z-index: 20; background: var(--ground); }
.scene-canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
.scene-canvas:active { cursor: grabbing; }
.scene-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; background: var(--ground); }
.bar { width: 200px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 4%; background: var(--accent); border-radius: 3px; transition: width 0.2s; }
.scene-hint {
  position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 9px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); font-size: 13.5px; text-align: center; max-width: 92vw; transition: opacity 0.4s; pointer-events: none;
}
.scene-hint.gone { opacity: 0; }
.round { position: absolute; top: calc(16px + env(safe-area-inset-top)); min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); font-weight: 600; }
.round.close { left: 16px; padding: 0; width: 44px; }
.round.reset { right: 16px; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- our own right-click menu, and pictures that cannot be dragged or long-pressed away */
.menu {
  position: fixed; z-index: 50; min-width: 190px; padding: 6px; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.menu > * { display: block; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; }
.menu > *:hover, .menu > *:focus-visible { background: var(--hover); }
img, video { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
video::-internal-media-controls-download-button { display: none; }

/* ---------- the owner's dashboard */
.admin .segments { max-width: 520px; }
.admin-body { display: flex; flex-direction: column; gap: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat b { font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12.5px; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.chart-card { margin: 0; padding: 14px 16px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; gap: 8px; }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chart-card figcaption span { color: var(--muted); font-size: 12.5px; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .column { fill: var(--accent); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover, .chart .hit:focus { fill: var(--hover); }
.chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 8px)); padding: 5px 9px; border-radius: 8px; background: var(--text); color: var(--on-accent);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.chart-tip.shown { opacity: 1; }
.chart-table summary { color: var(--muted); font-size: 12.5px; cursor: pointer; }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.chart-table td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.chart-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.admin-row .thumb { width: 64px; height: 64px; border-radius: 12px; }
.admin-row .thumb.blank { display: grid; place-items: center; background: var(--ground); color: var(--muted); }
.admin-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.admin-main small { color: var(--muted); }
.admin-main .quote { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.admin-actions .chip { min-height: 32px; font-size: 13px; padding: 0 12px; }
/* The dashboard page (admin.html): its own page, no app menus around it. */
body.admin-page main.admin { padding: 20px 16px 60px; max-width: 980px; gap: 16px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-top .brand { padding: 0; }
.admin-top .brand small { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 2px; }
.admin-top .brand span:last-of-type { color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.admin nav.segments { overflow-x: auto; max-width: none; }
.admin nav.segments a { flex: 1; min-height: 44px; position: relative; display: grid; place-items: center; padding: 0 12px; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; }
.admin nav.segments a.on { color: var(--text); }
.admin nav.segments a.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--accent); }
.admin .back-link { align-self: flex-start; }
.admin h3 { font-size: 15px; margin-top: 8px; }
.admin-person { display: flex; gap: 18px; align-items: flex-start; }
.admin-person .title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
.admin-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.admin-counts b { color: var(--text); }
.admin-counts button { color: var(--muted); padding: 0; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.admin-counts button:hover { color: var(--text); }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; font-size: 14px; }
.admin-facts dt { color: var(--muted); }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.admin-grid .tile { border: 0; padding: 0; cursor: pointer; border-radius: var(--r-small); }
.admin-grid .tile img { width: 100%; height: 100%; object-fit: cover; }
.admin-grid .tile.hidden-post img { opacity: .35; }
.admin-grid .badge.text { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(0,0,0,.6); filter: none; }
.admin-post-big { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 14px; background: #000; }
.admin-row.compact { padding: 10px 12px; }
.admin-map { height: min(62vh, 560px); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--ground); z-index: 0; }
.admin-map.dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.9) saturate(.6); }
.admin-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--muted); margin: -6px 0 0; }
.map-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; flex: none; }
.map-key.exact { width: 10px; height: 10px; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.map-key.soft { width: 16px; height: 16px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.admin-nearby { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.admin-bars { display: flex; flex-direction: column; gap: 8px; }
.admin-bar { display: grid; grid-template-columns: minmax(140px, 1.3fr) 2fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.admin-bar-track { height: 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.admin-bar-track i { display: block; height: 100%; background: color-mix(in srgb, var(--text) 45%, var(--panel)); border-radius: 99px; }
.admin-bar small { color: var(--muted); }
@media (max-width: 600px) { .admin-bar { grid-template-columns: 1fr auto; } .admin-bar-track { grid-column: 1 / -1; } .admin-bar small { display: none; } }
.admin-map .leaflet-tooltip { font: 600 12.5px/1.3 inherit; }
.admin-map .leaflet-control-attribution { font-size: 10.5px; }
.chart-table tr.clickable { cursor: pointer; }
.chart-table tr.clickable:hover td { color: var(--accent); }
.admin-map-detail h3 small { font-weight: 500; }
.admin-actions .chip.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.admin-actions a.chip { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.admin-profile-edit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.admin-profile-edit label { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 480px; }
.admin-profile-edit > .chip { display: inline-flex; align-items: center; gap: 6px; }
.caption-edit { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.caption-edit textarea { width: 100%; font-size: 15px; }
.caption-edit .chip { display: inline-flex; align-items: center; gap: 6px; }
.admin-signins { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; overflow-x: auto; max-width: 100%; }
.admin-signins > .chip { display: inline-flex; align-items: center; gap: 6px; }
.admin-table { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table code { font-size: 12.5px; }
@media (max-width: 600px) { .admin-person { flex-direction: column; } .admin-facts { grid-template-columns: 1fr; } .admin-facts dd { margin-bottom: 6px; } }
.pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(244, 166, 42, 0.16); color: var(--accent); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }

.legal-links { margin-top: auto; padding: 0 12px; font-size: 12.5px; color: var(--muted); }
.legal-links a:hover { color: var(--text); }

/* ---------- reposts, stories, messages */
.count {
  position: absolute; left: 24px; top: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
#top .count { left: 22px; top: 1px; }
.top-icons { display: flex; align-items: center; gap: 2px; }
.reposted { display: flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 820px) { .reposted { padding: 0 14px; } }

.profile-tabs { display: flex; border-top: 1px solid var(--line); }
.profile-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px;
  color: var(--muted); font-weight: 700; font-size: 13.5px; border-top: 2px solid transparent; margin-top: -1px;
}
.profile-tabs button.on { color: var(--text); border-top-color: var(--text); }
@media (max-width: 520px) { .profile-tabs .tab-label { display: none; } }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px; flex: none; }
.story-bubble small { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.story-face { position: relative; display: inline-grid; place-items: center; padding: 4px; border-radius: 50%; }
.story-face.ring { background: conic-gradient(from 200deg, #F4A62A, #FF6B5E, #F4A62A); }
.story-face.ring.seen { background: var(--line); }
.story-face.ring .avatar { box-shadow: 0 0 0 2.5px var(--ground); }
.story-add {
  position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--ground);
}
button.story-face { cursor: default; }
button.story-face.ring { cursor: pointer; }

.story-viewer { position: fixed; inset: 0; z-index: 40; background: #000; display: grid; place-items: center; }
.story-stage { position: relative; width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16); display: grid; place-items: center; overflow: hidden; background: #0b0b0b; }
@media (min-width: 821px) { .story-stage { height: calc(100dvh - 40px); border-radius: 18px; } }
.story-stage img, .story-stage video { width: 100%; height: 100%; object-fit: contain; }
.story-post { display: flex; flex-direction: column; gap: 10px; width: 78%; padding: 10px; border-radius: 20px; background: var(--panel); }
.story-post img { width: 100%; height: auto; max-height: 60dvh; object-fit: cover; border-radius: 12px; }
.story-post span { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.story-caption {
  position: absolute; left: 16px; right: 16px; bottom: 90px; text-align: center; font-size: 18px; font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); overflow-wrap: anywhere;
}
.story-bars, .story-head, .story-foot { position: absolute; left: 50%; transform: translateX(-50%); width: min(100%, calc(100dvh * 9 / 16)); z-index: 2; }
.story-bars { top: calc(10px + env(safe-area-inset-top)); display: flex; gap: 4px; padding: 0 10px; }
@media (min-width: 821px) { .story-bars { top: 30px; } .story-head { top: 42px !important; } .story-foot { bottom: 30px !important; } }
.story-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); overflow: hidden; }
.story-bars i { display: block; height: 100%; background: #fff; }
.story-head { top: calc(22px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.story-head .who small { color: rgba(255, 255, 255, 0.75); }
.story-head .who { flex-direction: row; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.story-head .who > b { font-size: 14px; }
.story-foot { bottom: calc(14px + env(safe-area-inset-bottom)); padding: 0 12px; display: flex; justify-content: center; }
.story-tap { position: absolute; top: 90px; bottom: 90px; width: 35%; z-index: 1; }
.story-tap.left { left: 0; }
.story-tap.right { right: 0; width: 65%; }
.story-head .round, .story-reply .round, .chat-form .round, .chat-head .round { position: static; flex: none; }
.story-reply { display: flex; gap: 8px; width: 100%; }
.story-reply input { flex: 1; border-radius: 999px; background: rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.4); }
.story-seen { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); font-weight: 700; font-size: 14px; }
.story-preview { max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; display: grid; place-items: center; background: #000; border-radius: 18px; overflow: hidden; }
.story-preview img, .story-preview video { width: 100%; height: 100%; object-fit: contain; }
.panel.lit { border-color: var(--accent); }

.send-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; }
.send-row { width: 100%; text-align: left; }
.send-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.send-row small { color: var(--muted); }
.send-row .state { padding: 6px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 13px; }
.send-row.sent .state { background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.sheet .people { max-height: 46dvh; overflow-y: auto; }

.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inbox { display: flex; flex-direction: column; }
.chat-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 16px; }
button.chat-row { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.chat-row:hover { background: var(--panel); }
.chat-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.chat-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row.unread .chat-text small { color: var(--text); font-weight: 700; }
.chat-row .dot { position: static; flex: none; }
.chat-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 0; background: var(--ground);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 820px) { .chat-head { top: 54px; } body.chatting #bar { display: none; } body.chatting #view { padding-bottom: 20px; } }
.bubbles { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; min-height: 40vh; }
.bubble {
  align-self: flex-start; max-width: 78%; display: flex; flex-direction: column; gap: 6px; padding: 9px 13px;
  border-radius: 20px 20px 20px 6px; background: var(--panel); border: 1px solid var(--line); overflow-wrap: anywhere;
}
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-color: transparent; border-radius: 20px 20px 6px 20px; }
.bubble.mine .muted { color: rgba(0, 0, 0, 0.62); }
.shared-post { display: flex; flex-direction: column; gap: 6px; width: 220px; max-width: 100%; }
.shared-post img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.shared-post span { display: flex; flex-direction: column; line-height: 1.3; }
.shared-post small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: 0.8; }
.story-thumb { width: 90px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; }
.chat-form { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--ground); }
.chat-form input { flex: 1; border-radius: 999px; }
.chat-form .round { background: var(--accent); color: var(--on-accent); }

/* ---------- splashes, marks, ticks, insights */
.name-tag { display: inline-flex; align-items: center; gap: 4px; }
.tick { position: relative; display: inline-flex; vertical-align: -3px; margin-left: 4px; cursor: help; outline: none; }
/* What the tick means: on hover, keyboard focus, or a tap on phones. */
.tick-tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 60; width: 230px;
  transform: translate(-50%, 4px); padding: 9px 11px; border-radius: var(--r-small);
  background: var(--raised); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.35);
  font-size: 12.5px; font-weight: 500; line-height: 1.35; text-align: left; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.tick:hover .tick-tip, .tick:focus-visible .tick-tip, .tick.show .tick-tip { opacity: 1; transform: translate(-50%, 0); }
.name-tag .tick { margin-left: 0; }
.profile h1 { display: flex; align-items: center; gap: 2px; }
.inline-link { color: #8FB4FF; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.splash-button.on b { color: var(--text); }
.splash-burst {
  position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -50%) scale(0.2) rotate(-20deg);
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); animation: splash-in 1.05s cubic-bezier(.2, .9, .3, 1.2) forwards;
}
@keyframes splash-in {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(-20deg); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1.12) rotate(4deg); opacity: 1; }
  32% { transform: translate(-50%, -50%) scale(0.96) rotate(0deg); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.02); opacity: 0; }
}
.splash-map { position: absolute; inset: 0; z-index: 2; background: rgba(0, 0, 0, 0.35); }
.splash-map i {
  position: absolute; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, color-mix(in srgb, var(--c) 45%, transparent) 35%, transparent 70%);
  mix-blend-mode: screen; opacity: 0.85;
}
.map-label {
  position: absolute; left: 12px; top: 12px; padding: 7px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.7);
  font-size: 13px; font-weight: 700;
}
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); background: var(--panel); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--muted); }
.compact-grid { grid-template-columns: repeat(2, 1fr) !important; }
.tile-stat {
  position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px;
  border-radius: 999px; background: rgba(0, 0, 0, 0.6); font-size: 12px; font-weight: 700;
}
.marks-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scene-mark {
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: auto;
  display: grid; place-items: center; transform-origin: 13px 13px;
}
.scene-mark i {
  width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), 0 0 18px 6px color-mix(in srgb, var(--c) 60%, transparent);
  animation: mark-glow 2.4s ease-in-out infinite;
}
@keyframes mark-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 20%, transparent), 0 0 26px 10px color-mix(in srgb, var(--c) 45%, transparent); } }
.mark-note {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: none; white-space: nowrap; max-width: 240px;
  overflow: hidden; text-overflow: ellipsis; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.78); font-size: 13px;
}
.scene-mark.open .mark-note, .scene-mark:hover .mark-note { display: block; }
.round.leave-mark { left: 50%; transform: translateX(-50%); gap: 8px; display: inline-flex; align-items: center; }

/* ---------- visitors (not signed in) */
body.visitor #bar { display: none; }
@media (max-width: 820px) { body.visitor #view { padding-bottom: 30px; } }
.welcome { gap: 22px; }
.welcome-hero {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 24px;
  border-radius: 26px; background: radial-gradient(circle at 85% 10%, rgba(244, 166, 42, 0.22), transparent 55%), var(--panel);
  border: 1px solid var(--line);
}
.welcome-hero h1 { font-size: clamp(30px, 6vw, 46px); letter-spacing: -0.03em; line-height: 1.05; }
.welcome-hero p { max-width: 520px; font-size: 16px; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.welcome-actions .button { min-width: 150px; }
.tile-step {
  position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800;
}
.panel.center { align-items: center; text-align: center; }

/* ---------- the row under a picture: every icon in the same box, numbers on the same line */
.actions { gap: 16px; min-height: 44px; }
.actions > button, .actions > a { display: inline-flex; align-items: center; gap: 5px; height: 40px; line-height: 1; }
.actions .icon, .actions > button > span:first-child, .actions > a > span:first-child { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
.actions svg { width: 26px; height: 26px; display: block; }
.actions b { font-size: 14px; font-weight: 700; line-height: 1; }
.actions .views { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1; }
.actions .views svg { width: 17px; height: 17px; }
.actions .grow { flex: 1; }

/* ---------- privacy */
.settings { gap: 0; padding: 4px 18px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting:last-child { border-bottom: 0; }
.setting > span { display: flex; flex-direction: column; gap: 3px; }
.setting small { color: var(--muted); font-size: 13px; }
.column-setting { flex-direction: column; align-items: flex-start; gap: 10px; cursor: default; }
.setting input[type="checkbox"] {
  appearance: none; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer;
  transition: background 0.15s;
}
.setting input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.15s;
}
.setting input[type="checkbox"]:checked { background: var(--accent); }
.setting input[type="checkbox"]:checked::after { transform: translateX(20px); }
.private-note { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 50px 20px; text-align: center; }
.request-actions { display: flex; gap: 6px; flex: none; }
.actions .views .icon { width: 17px; height: 17px; }
.splash-burst .icon { position: relative; z-index: 1; }
.splash-burst .drop {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: currentColor; opacity: 0; transform: translate(0, 0) scale(var(--s));
  animation: drop-fly 0.85s cubic-bezier(.15, .8, .3, 1) 0.04s forwards;
}
@keyframes drop-fly {
  0% { opacity: 0; transform: translate(0, 0) scale(var(--s)); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(calc(var(--s) * 0.4)); }
}
.send-shortcuts { gap: 6px; }
.share-target { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; font-size: 12px; font-weight: 600; color: var(--muted); }
.share-target > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--text); }

/* ---------- camera, music, places */
.media { border-radius: 16px; }
@media (max-width: 820px) { .feed .media, .card .media { border-radius: 14px; width: calc(100% - 16px); margin: 0 8px; } }
.who .when { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.who .song { display: inline-flex; align-items: center; gap: 4px; color: var(--text); opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-time { display: inline-flex; align-items: center; gap: 2px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; }
.story-head .who .song { color: #fff; }

/* ---------- selfie splashes */
.selfie-strip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 0 4px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.selfie-strip .faces { display: inline-flex; }
.selfie-strip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ground, #0E1110); margin-left: -9px; }
.selfie-strip img:first-child { margin-left: 0; }
@media (max-width: 820px) { .selfie-strip { margin-left: 14px; } }
.selfie-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 14px 0; }
.selfie { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.selfie .face { position: relative; width: 88px; height: 88px; }
.selfie .face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.selfie .face i { position: absolute; right: -4px; bottom: -4px; font-style: normal; font-size: 24px; }
.selfie small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- feed tabs: words with an accent line under the chosen one */
.feed-tabs { display: flex; border-bottom: 1px solid var(--line); }
.feed-tabs button { flex: 1; position: relative; padding: 10px 0 12px; font-size: 15px; font-weight: 500; color: var(--muted); }
.feed-tabs button.on { color: var(--text); font-weight: 700; }
.feed-tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 28px; height: 3px; margin-left: -14px; border-radius: 3px; background: var(--accent); }

/* ---------- desktop right rail: suggestions and the small print */
.with-rail { display: flex; justify-content: center; gap: 56px; align-items: flex-start; }
.with-rail > .column { margin: 0; }
/* The suggestions column sits beside the feed from 1160 px; below that it is not shown
   (Explore has suggestions), so it never covers the feed. */
.rail { display: none; width: 300px; flex: none; position: sticky; top: 26px; flex-direction: column; gap: var(--s-3); padding-top: 4px; }
@media (min-width: 1160px) { .rail { display: flex; } }
.rail h3 { font-size: 14px; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; }
.rail .person { padding: 6px 0; }
.rail .person:hover { background: none; }
.rail .rail-person { display: flex; align-items: center; gap: var(--s-3); }
.rail .rail-person .person { flex: 1; min-width: 0; }
.rail .rail-person small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .follow-link { color: var(--accent); font-weight: 700; font-size: 13.5px; }
.rail .fine { margin-top: var(--s-4); line-height: 1.7; }
.rail .fine a:hover { color: var(--text); }

/* ---------- profile: one row of actions, the rest behind a menu */
.profile-actions .icon-button { width: 40px; min-height: 40px; padding: 0; justify-content: center; }
@media (max-width: 520px) {
  .profile-actions { flex-wrap: nowrap; }
  .profile-actions .button:not(.icon-button) { flex: 1; padding: 0 10px; white-space: nowrap; }
}
.profile-link { display: inline-flex; align-items: center; gap: 5px; color: var(--link); font-weight: 600; max-width: 100%; }
.profile-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-link:hover span { text-decoration: underline; }

/* ---------- voice notes */
.voice-note { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.voice-play { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.bubble.mine .voice-play { background: rgba(14, 17, 16, 0.14); }
.voice-play.loading { opacity: 0.5; }
.wave { display: flex; align-items: center; gap: 2px; height: 24px; flex: 1; }
.wave i { width: 2.5px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.wave i.on { opacity: 1; }
.voice-time { font-variant-numeric: tabular-nums; font-weight: 600; opacity: 0.75; }
.chat-form { position: sticky; }
.chat-form .mic { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.recording-bar { position: absolute; inset: 8px 0; display: flex; align-items: center; gap: 8px; background: var(--ground); }
.recording-bar .rec { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.recording-bar .rec b { color: var(--text); font-variant-numeric: tabular-nums; }
.recording-bar .rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); animation: blink 1s infinite; }
.recording-bar .round.danger { color: var(--coral); background: var(--panel); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- chat: photos, replies, reactions, seen */
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 100%; }
.msg.mine { align-items: flex-end; }
.msg-line { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.msg-line > .bubble { max-width: min(78vw, 420px); align-self: auto; }
.msg .forward { width: 34px; height: 34px; background: var(--panel); border: 1px solid var(--line); color: var(--text); position: static; flex: none; }
.reply-quote { display: flex; flex-direction: column; gap: 2px; max-width: 70%; }
.msg.mine .reply-quote { align-items: flex-end; }
.reply-quote small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.reply-quote span {
  font-size: 13.5px; color: var(--muted); padding: 7px 12px; border: 1px solid var(--line); border-radius: 14px; opacity: 0.85;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reactions {
  margin-top: -10px; margin-inline: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; font-size: 13px;
  background: var(--raised); border: 2px solid var(--ground); border-radius: 999px; position: relative; z-index: 1;
}
.reactions small { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.bubble-media { display: flex; }
.chat-media {
  position: relative; display: block; width: 240px; max-width: 64vw; overflow: hidden; padding: 0; border-radius: 18px;
  border: 1px solid var(--line); background: var(--panel);
}
.chat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-media .play {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.45); color: #fff;
}
.chat-media-full { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 14px; background: #000; }
.chat-time { align-self: center; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.chat-seen { align-self: flex-end; font-size: 11.5px; font-weight: 600; color: var(--muted); margin: 0 4px; }
.chat-bottom { position: sticky; bottom: 0; background: var(--ground); z-index: 2; }
.chat-bottom .chat-form { position: static; align-items: center; gap: 4px; padding: 6px 6px 6px 6px; margin: 8px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--panel); border: 1px solid var(--line); border-radius: 26px; }
.chat-bottom .chat-form input { background: transparent; border: 0; padding-left: 6px; min-width: 0; }
.chat-bottom .chat-form input:focus { outline: none; box-shadow: none; }
.chat-form .round.camera { width: 36px; height: 36px; background: var(--accent); color: var(--on-accent); }
.chat-form .round.plain, .chat-form .mic { background: transparent; border: 0; color: var(--text); }
.chat-extras { display: flex; align-items: center; }
.chat-extras[hidden] { display: none; }
.send-text { font-weight: 700; color: var(--accent); padding: 0 12px; height: 40px; }
.send-text[hidden] { display: none; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 4px 0 12px; border-left: 3px solid var(--accent); margin-top: 8px; }
.reply-bar[hidden] { display: none; }
.reply-bar span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.reply-bar small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar .round { position: static; width: 32px; height: 32px; background: transparent; }
.chat-sending { text-align: right; font-size: 12.5px; color: var(--muted); margin: 6px 4px 0; }
.chat-sending[hidden] { display: none; }
.menu-emojis { display: flex; gap: 2px; padding: 4px !important; }
.menu-emojis button { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.menu-emojis button:hover, .menu-emojis button.on { background: var(--hover); }

/* ---------- suggested posts */
.follow-chip {
  margin-left: auto; height: 32px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); flex: none;
}
.follow-chip[data-state] { color: var(--muted); }
.card header .follow-chip + .more { margin-left: 4px; }

/* ---------- the ☰ menu: a dropdown like Instagram's "More" */
.more-nav { margin-top: auto; width: 100%; text-align: left; }
.more-nav + .legal-links { margin-top: 8px; }
.menu-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--text); }
.menu-button:hover, .menu-button[aria-expanded="true"] { background: var(--hover); }
.dropdown {
  position: fixed; z-index: 60; width: 270px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); animation: drop-in 0.14s var(--ease);
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.dropdown > a, .dropdown > button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; text-align: left;
  font-size: 15px; color: var(--text);
}
.dropdown > a:hover, .dropdown > button:hover, .dropdown > a:focus-visible, .dropdown > button:focus-visible { background: var(--hover); outline: none; }
.dropdown .danger { color: var(--danger); }
.dropdown-line { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* ---------- profile, laid out like Instagram */
.profile-page { width: 100%; max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; }
.phead {
  width: 100%; max-width: 860px; margin: 8px auto 22px; display: grid; grid-template-columns: 290px 1fr; column-gap: 8px; row-gap: 18px;
  align-items: center;
}
.phead-face { grid-row: 1; display: flex; justify-content: center; }
.phead-info { grid-row: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.phead > .profile-actions { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.phead > .profile-actions .icon-button { grid-auto-columns: auto; }
.phead-row { display: flex; align-items: center; gap: 8px; }
.phead-row h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.phead-menu { margin-left: 4px; }
.pname { font-weight: 600; font-size: 15px; }
.pstats { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; font-size: 16px; color: var(--muted); }
.pstats b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.pstats button:hover b { text-decoration: underline; }
.phead .bio { white-space: pre-line; font-size: 15px; }
.plock { display: inline-flex; align-items: center; gap: 6px; }
.phead .profile-actions .button { min-height: 40px; font-size: 14.5px; padding: 0 16px; }
.phead .story-face .avatar { transition: transform 0.2s var(--ease); }

.ptabs { display: flex; justify-content: center; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.ptabs button {
  flex: 0 1 180px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.ptabs button:hover { color: var(--text); }
.ptabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.ptabs .tab-label { display: none; }

.pgrid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 3px; }
.pgrid > .sentinel, .pgrid > .empty, .pgrid > .private-note, .pgrid > .panel { grid-column: 1 / -1; }
.ptile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--panel); }
.ptile.tall { aspect-ratio: 9 / 16; }
.ptile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile-kind { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }
.ptile-views {
  position: absolute; left: 10px; bottom: 9px; display: inline-flex; align-items: center; gap: 5px; color: #fff;
  font-size: 15px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.ptile-hover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 22px; color: #fff;
  background: rgba(0, 0, 0, 0.42); font-weight: 800; font-size: 16px; opacity: 0; transition: opacity 0.15s;
}
.ptile-hover span { display: inline-flex; align-items: center; gap: 6px; }
@media (hover: hover) { .ptile:hover .ptile-hover, .ptile:focus-visible .ptile-hover { opacity: 1; } .ptile:hover .ptile-views { opacity: 0; } }
@media (min-width: 900px) { .pgrid { --cols: 4; } }
@media (min-width: 1280px) { .pgrid { --cols: 5; } }
@media (min-width: 1560px) { .pgrid { --cols: 6; } }

@media (max-width: 820px) {
  .phead { grid-template-columns: 96px 1fr; column-gap: 18px; padding: 0 14px; margin-top: 0; }
  .phead-face { justify-content: flex-start; }
  .phead .story-face .avatar { width: 86px !important; height: 86px !important; }
  .phead-row h1 { font-size: 19px; }
  .phead-menu { margin-left: auto; }
  .pstats { gap: 16px; font-size: 14px; }
  .phead > .profile-actions .button { padding: 0 8px; white-space: nowrap; }
  .ptabs button { flex: 1; }
}
@media (max-width: 420px) { .pstats { flex-wrap: wrap; gap: 4px 14px; } }

/* ---------- edit profile page */
.edit-page { max-width: 640px; gap: 16px; }
.edit-form { display: flex; flex-direction: column; gap: 16px; }
.edit-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); flex-wrap: wrap; }
.edit-card .grow { display: flex; flex-direction: column; min-width: 120px; flex: 1; }
.edit-card label.button { cursor: pointer; }
.edit-face .avatar, .edit-face img { width: 64px !important; height: 64px !important; border-radius: 50%; object-fit: cover; }
.edit-group { gap: 18px; }
.edit-field { display: flex; flex-direction: column; gap: 7px; }
.edit-field > label, .edit-field > .field-label { font-weight: 700; font-size: 14.5px; color: var(--text); }
.edit-field .counter { align-self: flex-end; }
.edit-field input:disabled { opacity: 0.6; }
.edit-buttons { display: flex; justify-content: flex-end; gap: 10px; }
.edit-buttons .button { min-width: 120px; }
.link-row { color: var(--text); }
.link-row .icon { color: var(--muted); }
.private-value { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.edit-field > .button.small { align-self: flex-start; }
.edit-page .fine a { color: var(--link); }
.mark-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.auth .forgot { align-self: flex-end; font-size: 13.5px; }

/* Hashtags */
.inline-link.tag-link { text-decoration: none; font-weight: 600; }
.tag-mark { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); font-weight: 800; font-size: 20px; color: var(--text); }
.tag-mark.big { width: 76px; height: 76px; font-size: 34px; color: var(--accent); background: var(--raised); border: 0; }
.tag-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.tag-head > div { flex: 1; min-width: 0; }
.tag-head .title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-head small { color: var(--muted); }
.trending { margin: 4px 0 14px; }
.trending.gone { display: none; }
.trending h3, .list-head { margin: 4px 0 8px; font-size: 14px; color: var(--muted); font-weight: 700; }
.list-head { margin-top: 14px; }
.trending .chips, .tag-suggest { flex-wrap: wrap; }
.tag-suggest { margin: -4px 0 8px; }
.tag-suggest .chip small { margin-left: 6px; color: var(--muted); font-weight: 500; }
.trending .chip, a.chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.grid[hidden], .trending[hidden], .tag-suggest[hidden] { display: none; }

/* ---------- post pop-up (Instagram style): picture left, comments right; stacked on phones */
.post-modal { padding: 24px; }
.pm-close { position: fixed; top: 14px; right: 16px; z-index: 31; color: #fff; background: none; border: 0; padding: 6px; cursor: pointer; }
.pm-box {
  width: min(1120px, 94vw); height: min(90vh, 880px); display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  background: var(--ground); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.pm-box > .spinner { grid-column: 1 / -1; align-self: center; justify-self: center; }
.pm-media { background: #000; display: grid; place-items: center; min-height: 0; min-width: 0; }
.pm-media .media { border-radius: 0 !important; margin: 0 !important; width: 100% !important; height: 100% !important; max-height: 100%; aspect-ratio: auto !important; }
.pm-media .media img, .pm-media .media video { object-fit: contain; }
.pm-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.pm-scroll { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.pm-scroll .card { gap: 8px; }
.pm-scroll .card header, .pm-scroll .caption { padding-left: 0 !important; padding-right: 0 !important; }
.pm-scroll .section { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.pm-footer { border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: var(--ground); }
.pm-footer .actions { padding: 0 !important; }
@media (max-width: 820px) {
  .post-modal { padding: 0; place-items: stretch; }
  .pm-close { top: 8px; right: 8px; background: rgba(0, 0, 0, 0.5); border-radius: 50%; }
  .pm-box { width: 100vw; height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; overflow-y: auto; }
  .pm-media { flex: none; }
  .pm-media .media { height: auto !important; max-height: 70dvh; }
  .pm-side { border-left: 0; flex: none; min-height: auto; }
  .pm-scroll { overflow: visible; }
  .pm-footer { position: sticky; bottom: 0; }
}
.pm-footer .comment-form { position: static; padding: 0; }

.place-thumb { position: relative; flex: none; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: #000; }
.place-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-mark { position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.7); color: var(--accent); }
.place-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
/* Splash, comment, share and save a Place */
.place-actions { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.place-actions button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.place-actions button:hover { background: var(--hover); }
.place-actions button.saved { color: var(--accent); }
.place-comments { margin-top: 22px; }
.place-comment-list .comment { display: flex; gap: 10px; padding: 8px 0; }
.place-comment-list .comment p { margin: 0; }
.place-comment-list .comment small { color: var(--muted); font-size: 12px; }
.place-comment-list .comment .link { font-size: 12px; padding: 0; }
.place-comment-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.place-comment-form textarea { flex: 1; resize: none; min-height: 40px; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
/* The end of a video: carry on in Splats, or watch it again. */
.video-end { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(0,0,0,.5); }
.video-end[hidden] { display: none; }
.video-end button { width: auto; white-space: nowrap; flex: none; }
.video-end .watch-more { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.video-end .watch-again { height: 40px; padding: 0 16px; border: 0; background: none; color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }

/* Carousels: several photos and videos in one post */
.media.carousel { display: block; }
.carousel-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; overflow: hidden; }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-count { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.carousel-dots { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 5px; padding: 5px 8px; border-radius: 99px; background: rgba(0,0,0,.25); pointer-events: none; }
.carousel-dots { gap: 4px; align-items: center; }
.carousel-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .2s var(--ease), height .2s var(--ease); }
.carousel-dots i.near { width: 5px; height: 5px; }
.carousel-dots i.edge { width: 3.5px; height: 3.5px; }
.carousel-dots i.on { background: var(--accent); }
.carousel-dots i[hidden] { display: none; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); color: #111; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.carousel-arrow.prev { left: 10px; transform: translateY(-50%) rotate(180deg); }
.carousel-arrow.next { right: 10px; }
.carousel-arrow[hidden] { display: none; }
@media (hover: none) { .carousel-arrow { display: none; } }
.pm-media .media.carousel { aspect-ratio: auto !important; }
.pm-media .carousel-slide img, .pm-media .carousel-slide video { object-fit: contain; }
/* Tagged people */
.tag-layer { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s; }
.show-tags .tag-layer { opacity: 1; }
.show-tags .tag-layer .photo-tag { pointer-events: auto; }
.photo-tag { position: absolute; transform: translate(-50%, 6px); padding: 5px 10px; border-radius: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.photo-tag::before { content: ""; position: absolute; left: 50%; top: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top: 0; border-bottom-color: rgba(0,0,0,.78); }
.tags-toggle { position: absolute; left: 12px; bottom: 12px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; z-index: 2; }
/* Collaborations */
.collab-avatars { position: relative; display: inline-block; width: 42px; height: 40px; flex: none; }
.collab-avatars > * { position: absolute; }
.collab-avatars > :first-child { left: 14px; top: 0; }
.collab-avatars > :last-child { left: 0; top: 12px; box-shadow: 0 0 0 2px var(--bg, #0e1110); border-radius: 50%; }
.collab-names b { font-weight: 700; }
/* Grid mark for a carousel: two stacked squares */
.badge.multi, .ptile-kind.multi { width: 17px; height: 17px; }
.badge.multi::before, .badge.multi::after, .ptile-kind.multi::before, .ptile-kind.multi::after { content: ""; position: absolute; box-sizing: border-box; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 3px; }
.badge.multi::before, .ptile-kind.multi::before { right: 0; top: 0; }
.badge.multi::after, .ptile-kind.multi::after { left: 0; bottom: 0; background: rgba(255,255,255,.95); }
/* Sent, delivered, seen */
.ticks { display: inline-block; margin-right: 4px; font-size: 11px; font-weight: 800; letter-spacing: -3px; color: var(--muted); }
.ticks.seen { color: var(--accent); }
.chat-seen .ticks { letter-spacing: -3px; margin-right: 6px; }

/* Previous / next post in the pop-up */
.pm-nav { position: fixed; top: 50%; z-index: 31; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #111; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.pm-nav.prev { left: 14px; transform: rotate(180deg); }
.pm-nav.next { right: 14px; }
.pm-nav[hidden] { display: none; }
@media (max-width: 820px) { .pm-nav { top: 30dvh; width: 34px; height: 34px; opacity: .85; } .pm-nav.prev { left: 8px; } .pm-nav.next { right: 8px; } .post-modal .pm-media .media.carousel { aspect-ratio: 4 / 5 !important; height: auto !important; } }
.code-input { font-size: 24px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }

/* Comments: replies, GIFs, editing */
.thread { display: flex; flex-direction: column; gap: 10px; }
.comment.reply { margin-left: 42px; }
.comment-gif { display: block; width: 160px; max-width: 100%; border-radius: 10px; margin-top: 6px; background: var(--raised); }
.replies-toggle { align-self: flex-start; margin-left: 42px; font-size: 12.5px; color: var(--muted) !important; }
.reply-banner { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); padding: 0 4px 6px; }
.reply-banner[hidden] { display: none; }
.comment-form { flex-wrap: wrap; }
.comment-form > input { flex: 1 1 140px; min-width: 0; width: auto; }
.gif-button { flex: none; height: 34px; padding: 0 10px; border-radius: 8px; border: 1.6px solid var(--text); background: none; color: var(--text); font-weight: 900; font-size: 12px; cursor: pointer; }
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; max-height: 55vh; overflow-y: auto; margin-top: 10px; }
.gif-cell { padding: 0; border: 0; background: var(--raised); border-radius: 8px; overflow: hidden; cursor: pointer; }
.gif-cell img { width: 100%; height: 120px; object-fit: cover; display: block; }
.small-print { font-size: 11px; margin-top: 8px; }

/* Emoji instead of GIFs on the web */
.emoji-button { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; }
.emoji-row { width: 100%; display: flex; flex-wrap: wrap; gap: 2px; padding: 0 0 6px; }
.emoji-row[hidden] { display: none; }
.emoji-row button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; font-size: 22px; cursor: pointer; }
.emoji-row button:hover { background: var(--raised); }

/* ----- Echo, Rooms, Inner Circle, filters (Splatter's own extras) */
.story-face.ring.inner { background: var(--accent); }
.echo {
  position: relative; display: inline-block; max-width: 150px; padding: 6px 10px; border-radius: 12px;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center;
}
.echo-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.echo::after {
  content: ""; position: absolute; left: 18px; bottom: -6px; width: 9px; height: 9px; background: var(--panel);
  border-right: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  transform: rotate(45deg);
}
.echo.faint { opacity: 0.55; }
.phead-face { position: relative; }
.phead-face.has-echo { flex-direction: column; align-items: center; gap: 6px; }
.echo-button { padding: 0; background: none; border: 0; cursor: pointer; }
.echo-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 12px; }
.echo-row { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.echo-row::-webkit-scrollbar { display: none; }
.echo-item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 92px; background: none; border: 0; color: var(--text); cursor: pointer; }
.echo-item .echo { max-width: 92px; font-size: 11px; }
.echo-item small { color: var(--muted); font-size: 12px; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip-row.center { justify-content: center; }
.chip-row.filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chip-row.filters::-webkit-scrollbar { display: none; }
.chip-row.filters .chip { flex: none; }
.chip.emoji { font-size: 20px; padding: 0 10px; }
.chip.inner.on { background: var(--accent); }
.rooms { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 14px; scrollbar-width: none; }
.rooms::-webkit-scrollbar { display: none; }
.room { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; background: none; border: 0; color: var(--text); cursor: pointer; }
.room small { font-size: 12px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-door {
  display: block; width: 62px; height: 80px; border-radius: 31px 31px 6px 6px; overflow: hidden;
  background: var(--panel); box-shadow: 0 0 0 2px var(--accent);
}
.room-door img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room:hover .room-door { box-shadow: 0 0 0 3px var(--accent); }
.pcategory { color: var(--muted); font-size: 14px; margin: 0; }
.links-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.link-more { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; font-size: 14px; cursor: pointer; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-control); background: var(--raised); color: var(--text); }
.link-card span { display: flex; flex-direction: column; min-width: 0; }
.link-card small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.about-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 2px; }
.about-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.about-list li span { color: var(--muted); }
.more-links { display: grid; gap: 8px; margin: 6px 0; }
.more-link { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; align-items: center; }
@media (max-width: 560px) { .more-link { grid-template-columns: 1fr; } }
.reel-switch {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; gap: 18px;
  font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.reel-switch a { color: rgba(255, 255, 255, 0.6); font-size: 16px; }
.reel-switch a.on { color: #fff; font-size: 19px; }
.reel-switch { align-items: center; }
.reel-type { appearance: none; -webkit-appearance: none; padding: 5px 26px 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
  background-color: rgba(14,17,16,.55);
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
  color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.reel-type option { color: #000; }
@media (min-width: 900px) { .reel-switch { left: calc(50% + var(--side) / 2); } }

/* Master run: the feed's page scroll bar stays hidden, like on iOS. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- master run: audio, copyright, Founding */
.audio-link { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.audio-link:hover { color: var(--accent); }
.not-suggested { display: inline-flex; gap: 6px; align-items: center; margin: 0 16px 10px; padding: 4px 0; background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; }
.panel.rights { border-color: var(--line); }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; line-height: 1.35; cursor: pointer; }
.check-row.strong { font-weight: 600; }
.check-row input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); margin-top: 1px; }
.fine.warn { color: var(--accent); }
.arch-cover { display: inline-grid; place-items: center; flex: none; overflow: hidden; color: var(--accent);
  border-radius: 999px 999px 10px 10px; background: linear-gradient(180deg, rgba(244, 166, 42, 0.45), var(--panel)); }
.arch-cover img { width: 100%; height: 100%; object-fit: cover; }
.audio-head { display: flex; gap: 24px; align-items: center; padding: 16px 0 24px; flex-wrap: wrap; }
.audio-cover-wrap { position: relative; }
.play-big { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.row-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.row-buttons .disabled { opacity: 0.5; pointer-events: none; }
.accent { color: var(--accent); }
.grid.tall .tile { aspect-ratio: 9 / 16; }
.sound-list { gap: 4px; }
.sound-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sound-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.sound-row .grow b, .sound-row .grow small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sound-row .plain { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.sound-row .rank { width: 28px; text-align: center; font-weight: 800; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.sound-row .rank small { font-size: 9px; color: var(--muted); }
.sound-row .rank small.up { color: var(--accent); }
.sound-row .rank small.down { color: var(--coral); }
.upload-sound { display: flex; gap: 12px; align-items: center; width: 100%; padding: 14px 16px; margin: 8px 0 16px; border: 0; cursor: pointer;
  border-radius: 14px; background: rgba(244, 166, 42, 0.12); color: var(--accent); text-align: left; }
.upload-sound span { display: flex; flex-direction: column; }
.upload-sound small { color: var(--muted); }
.founding-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(244, 166, 42, 0.14); color: var(--accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; position: relative; }
.founding-badge .arch-dot { width: 8px; height: 11px; background: var(--accent); border-radius: 999px 999px 2px 2px; }
.founding-badge:hover::after, .founding-badge:focus::after { content: attr(title); position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.founder-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.55);
  border: 1px solid #fbcc5c; color: var(--accent); font-size: 12px; font-weight: 700; vertical-align: middle; position: relative; }
.founder-badge .arch-dot { width: 8px; height: 11px; background: var(--accent); border-radius: 999px 999px 2px 2px; }
.founder-badge.small { margin-left: 6px; padding: 1px 6px; font-size: 10px; }
.founder-badge.small .arch-dot { width: 6px; height: 8px; }
.founder-badge:hover::after, .founder-badge:focus::after { content: attr(title); position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line); font-weight: 500; font-size: 12px; }
.founders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; padding: 16px 0; }
.founder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; text-align: center; }
.founder .founding-badge { margin-left: 0; }
.row-link { display: block; padding: 12px 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.row-link:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .splash-burst, .splash-burst * { animation: none !important; } }
.stack label.check-row { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); font-size: 14px; }
.grid.tall .tile { aspect-ratio: 9 / 16; }
.grid.tall .tile img { height: 100%; object-fit: cover; }
/* Slim, flat bottom bar on phones (no outer rounded box), icons only, saffron when active. */
@media (max-width: 820px) {
  #view { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #bar { left: 0; right: 0; bottom: 0; height: calc(52px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
         border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--ground); }
  #bar .nav .nav-label { display: none; }
  #bar .nav { padding: 4px 0; }
  #bar .nav.make .plus { width: 38px; height: 34px; border-radius: 11px; }
}

/* ---------- sidebar: icons only between tablet and wide desktop */
@media (min-width: 821px) and (max-width: 1263px) {
  :root { --side: 76px; }
  #side { padding: 22px 10px; align-items: center; }
  #side .brand span:last-child, #side .nav-label, #side .legal-links { display: none; }
  #side .brand { padding: 4px 0 18px; }
  #side .nav { justify-content: center; padding: 12px; }
  #side .join, #side .button { display: none; }
  #side .dot { left: 34px; }
}
#side .nav { transition: background .18s var(--ease), transform .18s var(--ease); }
#side .nav:active { transform: scale(.97); }
body.modal-open { overflow: hidden; }

/* ---------- small round icon buttons that sit in the flow */
.activity-panel .round, .dock-bar .round, .dock-head .round, .cm-icon {
  position: static; width: 32px; min-width: 32px; height: 32px; padding: 0; background: transparent; backdrop-filter: none;
  display: grid; place-items: center; border-radius: 999px; color: var(--text);
}
.activity-panel .round:hover, .dock-bar .round:hover, .dock-head .round:hover, .cm-icon:hover { background: var(--hover); }
.cm-icon.small { width: 30px; min-width: 30px; height: 30px; }
.chev { display: inline-flex; transform: rotate(-90deg); transition: transform .2s var(--ease); }
.chev.down { transform: rotate(90deg); }

/* ---------- Discard? */
.confirm-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0, 0, 0, .6); padding: 16px; animation: fade .18s var(--ease); }
.confirm { width: min(400px, 100%); background: var(--panel); border-radius: var(--r-panel); overflow: hidden; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.confirm h3 { font-size: 19px; padding: 28px 24px 6px; }
.confirm p { color: var(--muted); font-size: 14px; padding: 0 24px 22px; }
.confirm button { display: block; width: 100%; min-height: 50px; border-top: 1px solid var(--line); font-size: 15px; }
.confirm button:hover { background: var(--hover); }
.confirm .confirm-danger { color: var(--danger); font-weight: 700; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Create dialog */
.create-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 60px;
  background: rgba(0, 0, 0, .66); backdrop-filter: blur(6px); animation: fade .2s var(--ease); }
.cm-close { position: absolute; top: 14px; right: 16px; color: #F2F0EA; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; }
.cm-close:hover { background: rgba(255,255,255,.12); }
.create-modal { position: relative; display: flex; flex-direction: column; width: min(760px, 100%); height: min(820px, calc(100dvh - 48px));
  background: var(--panel); color: var(--text); border-radius: var(--r-panel); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  animation: rise .22s var(--ease); transition: width .25s var(--ease); }
.create-modal[data-step="edit"], .create-modal[data-step="share"] { width: min(1120px, 100%); }
.cm-head { display: grid; grid-template-columns: 56px 1fr 96px; align-items: center; height: 52px; padding: 0 8px; border-bottom: 1px solid var(--line); flex: none; }
.cm-head h2 { text-align: center; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-head .cm-icon { justify-self: start; }
@media (min-width: 641px) { .cm-head-close { visibility: hidden; } }
.cm-next { justify-self: end; color: var(--accent); font-weight: 700; font-size: 15px; padding: 8px 10px; border-radius: var(--r-small); }
.cm-next:hover { background: var(--hover); }
.cm-next:disabled { opacity: .45; cursor: default; }
.cm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cm-busy { position: absolute; inset: 52px 0 0; z-index: 4; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--panel) 86%, transparent); font-weight: 600; }
.cm-busy[hidden] { display: none; }
.cm-modes { display: flex; justify-content: center; gap: 4px; padding: 12px 16px 0; }
.cm-mode { min-height: 32px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cm-mode:hover { color: var(--text); background: var(--hover); }
.cm-mode.on { color: var(--on-accent); background: var(--accent); }
.cm-drop { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; margin: 16px; padding: 24px;
  border: 2px dashed transparent; border-radius: var(--r-card); text-align: center; transition: border-color .18s var(--ease), background .18s var(--ease); }
.cm-drop .icon { color: var(--muted); }
.cm-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cm-drop.info p { max-width: 420px; }
.cm-drop-title { font-size: 20px; font-weight: 600; }
.cm-drop .button { display: inline-flex; align-items: center; gap: 6px; }
.cm-drafts { flex: none; padding: 0 16px 16px; }
.cm-drafts:empty { display: none; }
.cm-drafts h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cm-draft-row { display: flex; gap: 10px; overflow-x: auto; }
.cm-draft { position: relative; flex: none; }
.cm-draft-open { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.cm-draft-open img, .cm-draft-open .icon { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-small); background: var(--raised); display: grid; place-items: center; }
.cm-draft-delete { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.cm-camera { flex: 1; display: flex; flex-direction: column; background: #000; }
.cm-camera-feed { flex: 1; min-height: 0; width: 100%; object-fit: contain; transform: scaleX(-1); }
.cm-camera-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px; }
.cm-shutter { width: 64px; height: 64px; border-radius: 999px; background: #F2F0EA; box-shadow: 0 0 0 4px #0E1110, 0 0 0 7px #F4A62A; }
.cm-single { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cm-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: #0B0D0C; overflow: hidden; }
.cm-stage > canvas, .cm-stage > video, .cm-stage > img, .cm-video > video { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-stage canvas.movable { cursor: grab; touch-action: none; }
.cm-stage canvas.movable:active { cursor: grabbing; }
.cm-crop-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; padding: 12px 16px; border-top: 1px solid var(--line); }
.cm-ratios { display: flex; gap: 4px; background: var(--raised); border-radius: var(--r-control); padding: 4px; }
.cm-ratio { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 6px 8px; border-radius: var(--r-small); font-size: 11.5px; color: var(--muted); }
.cm-ratio:hover { color: var(--text); }
.cm-ratio.on { color: var(--accent); background: var(--panel); }
.cm-zoom { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cm-zoom input, .cm-adjust input { accent-color: var(--accent); }
.cm-fit { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.cm-fit.on { border-color: var(--accent); color: var(--accent); }
.cm-arrow { position: absolute; top: 40%; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: rgba(14,17,16,.7); color: #F2F0EA; }
.cm-arrow.prev { left: 12px; } .cm-arrow.next { right: 12px; }
.cm-arrow:disabled { opacity: 0; pointer-events: none; }
.cm-dots { position: absolute; left: 0; right: 0; bottom: 70px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.cm-left .cm-dots { bottom: 12px; }
.cm-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.45); }
.cm-dots i.on { background: var(--accent); }
.cm-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.cm-left { position: relative; min-height: 0; display: flex; }
.cm-left .cm-stage { height: 100%; }
.cm-side { min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.cm-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin: -14px -16px 0; }
.cm-tabs button { padding: 12px 0; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.cm-tabs button.on { color: var(--text); border-color: var(--accent); }
.cm-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cm-filter { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.cm-filter canvas { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-small); border: 2px solid transparent; }
.cm-filter.on { color: var(--accent); font-weight: 700; }
.cm-filter.on canvas { border-color: var(--accent); }
.cm-adjust { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cm-adjust-top { display: flex; justify-content: space-between; }
.cm-adjust output { color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-video { position: absolute; inset: 0; display: grid; place-items: center; }
.cm-play { position: absolute; width: 72px; height: 72px; border-radius: 999px; display: grid; place-items: center; background: rgba(14,17,16,.6); color: #F2F0EA; }
.cm-play[hidden] { display: none; }
.cm-section { display: flex; flex-direction: column; gap: 8px; }
.cm-section h3 { font-size: 14px; font-weight: 700; }
.cm-covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cm-cover { border-radius: var(--r-small); overflow: hidden; border: 2px solid transparent; aspect-ratio: 3 / 4; }
.cm-cover img { width: 100%; height: 100%; object-fit: cover; }
.cm-cover.on { border-color: var(--accent); }
.cm-trim { position: relative; height: 56px; border-radius: var(--r-small); overflow: hidden; background: var(--raised); }
.cm-strip { position: absolute; inset: 0; display: flex; opacity: .55; }
.cm-strip img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.cm-trim-fill { position: absolute; top: 0; bottom: 0; border: 3px solid var(--accent); border-radius: var(--r-small); pointer-events: none; }
.cm-trim input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; }
.cm-trim input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 14px; height: 56px; border-radius: 6px; background: var(--accent); cursor: ew-resize; }
.cm-trim input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 56px; border: 0; border-radius: 6px; background: var(--accent); cursor: ew-resize; }
.cm-trim input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); }
.cm-ruler { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.cm-switch-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.cm-switch-row > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cm-switch-row small { color: var(--muted); font-size: 12.5px; }
.cm-switch-row input { position: absolute; opacity: 0; width: 44px; height: 26px; right: 0; margin: 0; cursor: pointer; }
.cm-switch-row .switch { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); position: relative; transition: background .18s var(--ease); }
.cm-switch-row .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: var(--text); transition: transform .18s var(--ease); }
.cm-switch-row input:checked + .switch { background: var(--accent); border-color: transparent; }
.cm-switch-row input:checked + .switch::after { transform: translateX(18px); background: var(--on-accent); }
.cm-switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.cm-side.share { gap: 12px; }
.cm-author { display: flex; align-items: center; gap: 10px; }
.cm-caption { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.cm-caption-bar { display: flex; justify-content: space-between; align-items: center; }
.cm-count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.cm-emoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px 0; }
.cm-emoji button { font-size: 20px; height: 34px; border-radius: var(--r-small); }
.cm-emoji button:hover { background: var(--hover); }
.cm-emoji[hidden] { display: none; }
.cm-rows { display: flex; flex-direction: column; }
.cm-option { border-bottom: 1px solid var(--line); }
.cm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; text-align: left; }
.cm-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-row-text b { font-weight: 500; }
.cm-row-text small { color: var(--accent); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-row[aria-expanded="true"] > .icon:last-child { transform: rotate(90deg); }
.cm-row-body { display: flex; flex-direction: column; gap: 8px; padding: 0 0 12px; }
.cm-row-body[hidden] { display: none; }
.cm-row-body input[type="search"], .cm-side textarea { width: 100%; }
.cm-results { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.cm-result { text-align: left; padding: 9px 8px; border-radius: var(--r-small); font-size: 14px; }
.cm-result:hover { background: var(--hover); }
.cm-track { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: var(--r-small); }
.cm-track.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cm-track .cm-row-text small { color: var(--muted); }
.cm-audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--raised); border-radius: var(--r-control); }
.cm-seg { min-height: 36px; border-radius: var(--r-small); font-size: 13.5px; font-weight: 600; color: var(--muted); }
.cm-seg:hover { color: var(--text); }
.cm-seg.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.cm-seg.inner.on { color: var(--accent); }
.cm-more { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cm-more summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-weight: 600; cursor: pointer; list-style: none; }
.cm-more summary::-webkit-details-marker { display: none; }
.cm-more[open] summary .icon { transform: rotate(90deg); }
.cm-more > :not(summary) { margin-top: 8px; }
.cm-side .panel.rights { margin: 0; }
.cm-footer { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.cm-share-bar { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 6px; }
@media (max-width: 1099px) {
  .create-backdrop { padding: 16px; }
  .create-modal[data-step="edit"], .create-modal[data-step="share"] { height: calc(100dvh - 32px); }
  .cm-split { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 42%) 1fr; }
  .cm-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .create-backdrop { padding: 0; }
  .create-modal, .create-modal[data-step="edit"], .create-modal[data-step="share"] { width: 100%; height: 100dvh; border-radius: 0; }
  .cm-close { display: none; }
  .cm-head { grid-template-columns: 56px 1fr 80px; padding-top: env(safe-area-inset-top); height: calc(52px + env(safe-area-inset-top)); }
  .cm-ratio { min-width: 0; padding: 6px; }
  .cm-ratio span { display: none; }
}

/* ---------- caption highlighting: @mentions and #tags in saffron while typing */
.hl-wrap { position: relative; }
.hl-back, .hl-wrap .hl-field { font: inherit; font-size: 15px; line-height: 1.45; padding: 10px 2px; margin: 0; border: 1px solid transparent; letter-spacing: normal;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.hl-back { position: absolute; inset: 0; overflow: hidden; color: var(--text); pointer-events: none; }
.hl-wrap .hl-field { position: relative; display: block; width: 100%; min-height: 120px; resize: vertical; background: transparent; color: transparent;
  caret-color: var(--text); outline: none; box-shadow: none; border-radius: 0; }
.hl-wrap .hl-field::placeholder { color: var(--faint); }
.hl-wrap .hl-field::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: transparent; }
.hl-token { color: var(--accent); font-weight: inherit; }
.mention-link, .tag-link { color: var(--accent); }

/* ---------- @ and # suggestions */
.suggest { position: fixed; z-index: 90; width: 300px; max-height: 300px; overflow-y: auto; padding: 6px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-control); box-shadow: 0 14px 40px rgba(0,0,0,.35); animation: fade .12s var(--ease); }
.suggest-title { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.suggest-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-small); cursor: pointer; }
.suggest-row.on, .suggest-row:hover { background: var(--hover); }
.suggest-row.on { box-shadow: inset 3px 0 0 var(--accent); }
.suggest-text { min-width: 0; display: flex; flex-direction: column; }
.suggest-text b { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.suggest-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-mark { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; color: var(--accent); }

/* ---------- Activity panel, beside the sidebar */
.activity-panel { position: fixed; z-index: 40; top: 0; bottom: 0; left: var(--side); width: 400px; max-width: calc(100vw - var(--side));
  display: flex; flex-direction: column; background: var(--ground); border-right: 1px solid var(--line); border-radius: 0 var(--r-panel) var(--r-panel) 0;
  box-shadow: 18px 0 50px rgba(0,0,0,.28); animation: slide-in .24s var(--ease); }
.activity-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 22px 18px 12px 22px; }
.activity-panel h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.activity-panel .panel-body { flex: 1; overflow-y: auto; padding: 0 14px 24px; display: flex; flex-direction: column; gap: 14px; }
@keyframes slide-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Messages dock */
#dock { position: fixed; z-index: 30; right: 24px; bottom: 0; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
#dock > * { pointer-events: auto; }
.dock-list { width: 320px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0;
  box-shadow: 0 -6px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.dock-list.open { height: min(520px, calc(100dvh - 80px)); }
.dock-bar { display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 12px; }
.dock-title { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 36px; text-align: left; }
.dock-title b { font-size: 15px; }
.dock-title .count, .dock-bar .count { position: static; }
.dock-search { margin: 0 12px 8px; width: auto; }
.dock-chats { flex: 1; overflow-y: auto; padding: 0 6px; }
.dock-chat-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-control); text-align: left; }
.dock-chat-row:hover { background: var(--hover); }
.dock-chat-row .chat-text { min-width: 0; display: flex; flex-direction: column; }
.dock-chat-row small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-chat-row.unread b, .dock-chat-row.unread small { color: var(--text); font-weight: 700; }
.dock-chat-row .dot { position: static; flex: none; margin-left: auto; }
.dock-requests, .dock-find { display: flex; align-items: center; gap: 8px; padding: 8px; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.dock-foot { padding: 8px 12px 12px; border-top: 1px solid var(--line); text-align: center; }
.dock-window { width: 336px; height: min(460px, calc(100dvh - 80px)); display: flex; flex-direction: column; background: var(--ground);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.28); overflow: hidden; }
.dock-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dock-pane > .spinner { margin: auto; }
.dock-pane .chat-head.dock-head { position: static; display: flex; align-items: center; gap: 2px; padding: 6px; margin: 0; border-bottom: 1px solid var(--line); background: var(--panel); }
.dock-head .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.dock-head .who b { font-size: 14px; } .dock-head .who small { display: none; }
.dock-pane .bubbles { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.dock-pane .chat-bottom { position: static; padding: 0 8px; }
.dock-pane .chat-bottom .chat-form { margin: 6px 0 8px; }
.dock-collapsed-label { display: none; }
.dock-window.collapsed { height: auto; }
.dock-window.collapsed .dock-pane { display: none; }
.dock-window.collapsed .dock-collapsed-label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; width: 100%; text-align: left; }
.dock-collapsed-label b { flex: 1; }
@media (max-width: 1099px) { #dock { display: none; } }
@media (prefers-reduced-motion: reduce) { .create-backdrop, .create-modal, .activity-panel, .confirm-backdrop, .suggest { animation: none !important; } }
.dock-pane .bubble-media, .dock-pane .chat-media, .dock-pane .shared-post { max-width: 210px; }
.dock-pane .chat-media { width: 200px; max-height: 260px; }
.dock-pane .shared-post img { max-height: 220px; }
.dock-pane .msg-line { max-width: 86%; }

/* ---------- a notice from Splatter, and priority items on the dashboard */
#notice { position: fixed; z-index: 70; top: 10px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: var(--r-control);
  background: var(--panel); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; }
#notice > .icon { color: var(--accent); flex: none; }
#notice span:not(.icon) { flex: 1; }
#notice button { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; }
#notice button:hover { background: var(--hover); }
@media (max-width: 820px) { #notice { top: calc(60px + env(safe-area-inset-top)); } }
.admin-row.priority { border-left: 3px solid var(--danger); padding-left: 10px; }
.admin-row.done { opacity: .6; }
.pill.priority { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); font-weight: 700; }
.charts.single { grid-template-columns: 1fr; }

/* Voice comments and voice reactions */
.voice-comment { margin: 4px 0; max-width: 360px; }
.voice-speed { flex: none; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--text); font-weight: 700; font-size: 12px; cursor: pointer; }
.voice-bar { align-items: center; }
.voice-bar .rec { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--panel); color: var(--muted); min-width: 0; }
.voice-bar .rec > i { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); flex: none; animation: rec-blink 1s infinite; }
.voice-bar .rec b { color: var(--text); font-variant-numeric: tabular-nums; flex: none; }
.voice-bar .rec .wave { color: var(--coral); height: 22px; flex: 1; justify-content: flex-end; }
.voice-bar .rec.preview .wave { color: var(--text); justify-content: flex-start; }
.voice-bar .error { flex-basis: 100%; }
@media (prefers-reduced-motion: reduce) { .voice-bar .rec > i { animation: none; } }
@keyframes rec-blink { 50% { opacity: 0.25; } }
.comment .link.like { display: inline-flex; align-items: center; gap: 2px; }
.comment .link.like.on { color: var(--coral); }
.voice-counts { padding: 0 16px; }
.voice-counts-button { display: flex; gap: 12px; min-height: 32px; align-items: center; background: none; border: 0; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; }
.voice-counts-button .mine { color: var(--accent); }
.actions button.on .icon, .actions button.on svg { color: var(--accent); }
.reaction-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.reaction-kind { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 8px 4px; border-radius: 14px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.reaction-kind span { font-size: 28px; line-height: 1.1; }
.reaction-kind small { font-weight: 600; font-size: 11px; }
.reaction-kind.on { background: var(--accent); color: var(--on-accent); }
.reaction-options { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reaction-options .chip { min-width: 52px; min-height: 40px; }
.voice-counts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voice-counts:empty { display: none; }
.voice-react { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.voice-react.mine { color: var(--accent); border-color: var(--accent); }
/* A voice comment is a rounded pill in the comment's own place */
.voice-comment { min-width: 0; width: 100%; max-width: 260px; height: 38px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--panel); gap: 8px; }
.voice-comment .voice-play { width: 28px; height: 28px; }
.voice-comment .wave { height: 18px; }
.voice-comment .voice-time { font-size: 12px; }
.voice-comment .voice-speed { height: 24px; min-width: 32px; padding: 0 6px; font-size: 11px; display: none; }
.voice-comment.playing .voice-speed { display: inline-block; }
.voice-bar .round { position: static; flex: none; width: 44px; padding: 0; background: var(--panel); color: var(--text); backdrop-filter: none; }
.voice-bar .round.danger { color: var(--coral); }
.voice-bar .round:not(.danger) { background: var(--accent); color: var(--on-accent); }
.voice-bar .rec .link { white-space: nowrap; margin-left: auto; }
.stop-square { display: block; width: 14px; height: 14px; border-radius: 3px; background: currentColor; }
.voice-bar .rec .link { font-size: 20px; line-height: 1; padding: 0 4px; }
/* Activity: the picture and the words are separate links; a notification's comment lights up when opened */
.activity .who a { color: inherit; text-decoration: none; }
.activity .who .activity-text { flex: 1; min-width: 0; }
.card header .who a { color: inherit; text-decoration: none; }
.collab-avatars a { display: inline-block; }
.comment { transition: background 0.4s; border-radius: 12px; }
.comment.lit { background: rgba(244, 166, 42, 0.16); }
.activity .who .activity-text > span { white-space: normal; display: flex; flex-direction: column; gap: 4px; }

/* Settings pages: a Back button and, on a wide screen, the list of settings on the left. */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; max-width: 980px; margin: 0 auto; padding: 8px 16px 32px; align-items: start; }
.settings-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; }
.settings-title { font-weight: 700; font-size: 20px; padding: 6px 12px 10px; margin: 0; }
.settings-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text); text-decoration: none; text-align: left; }
.settings-link:hover { background: var(--hover); }
.settings-link.on { background: var(--panel); font-weight: 700; }
.settings-main { min-width: 0; }
.settings-main > .back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 4px; }
.settings-main .column { margin: 0; max-width: none; }
@media (max-width: 820px) { .settings-layout { display: block; padding: 0 0 24px; } .settings-nav { display: none; } .settings-main > .back-link { margin-left: 12px; } }

/* ---------- signed-out landing: copy on the left, a fan of pictures with floating feature badges on the right */
.landing { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: center; padding: 28px 8px 12px; }
.landing-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.landing h1 { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 900; margin: 0; }
.landing h1 .tint { background: linear-gradient(100deg, var(--accent-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-sub { margin: 0; max-width: 460px; font-size: 18px; line-height: 1.45; color: var(--muted); }
.landing .welcome-actions { margin-top: 4px; }
.landing .welcome-actions .button { min-height: 48px; min-width: 160px; }
.free-note { margin: -4px 0 0; font-size: 14px; color: var(--faint); }
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); opacity: 0.55; cursor: default; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; color: var(--muted); }
.store b { font-size: 16px; font-weight: 800; }
.proof { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.proof-faces { display: inline-flex; }
.proof-face { margin-left: -8px; border-radius: 50%; border: 2px solid var(--ground); overflow: hidden; display: inline-flex; }
.proof-face:first-child { margin-left: 0; }
.pillars { list-style: none; margin: 8px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: 100%; }
.pillar { display: flex; flex-direction: column; gap: 8px; color: var(--accent); }
.pillar span { display: flex; flex-direction: column; gap: 3px; }
.pillar b { color: var(--text); font-size: 15px; font-weight: 800; }
.pillar small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.landing-art { position: relative; min-height: 480px; display: grid; place-items: center; container-type: inline-size; overflow: hidden; padding: 0 4%; }
.fan { position: relative; width: clamp(150px, 46cqw, 270px); aspect-ratio: 9 / 16; margin-left: 8%; }
.fan-card { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #222726, #181c1b); border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }
.fan-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fan-card.back2 { transform: translate(-40%, 4%) rotate(-15deg); opacity: 0.55; filter: saturate(0.6) brightness(0.7); }
.fan-card.back1 { transform: translate(-21%, 1%) rotate(-6deg); opacity: 0.75; filter: saturate(0.75) brightness(0.8); }
.fan-card.side { transform: translate(28%, 3%) rotate(8deg); opacity: 0.8; filter: saturate(0.8) brightness(0.8); }
.fan-card.front { transform: scale(1.04) rotate(2deg); }
.fan-shade { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); }
.fan-card.front .tile-step { left: 14px; top: auto; bottom: 14px; }
.fan-badge { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; }
.fan-badge svg { color: var(--accent); }
.fan-badge.b1 { left: 2%; top: 12%; }
.fan-badge.b2 { right: 0; top: 26%; }
.fan-badge.b3 { left: 0; bottom: 24%; }
.fan-badge.b4 { right: 4%; bottom: 12%; }
.fan-heart { position: absolute; color: var(--accent); }
.fan-heart.h1 { right: 18%; top: 6%; transform: rotate(12deg); }
.fan-heart.h2 { left: 14%; bottom: 8%; transform: rotate(-10deg); }
.fan-more { position: absolute; bottom: -4px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--faint); margin: 0; }
@media (max-width: 860px) {
  .landing { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; }
  .landing-copy { align-items: center; text-align: center; }
  .landing .welcome-actions, .stores { justify-content: center; }
  .pillars { grid-template-columns: 1fr; text-align: left; }
  .pillar { flex-direction: row; align-items: flex-start; gap: 12px; }
  .landing-art { min-height: 460px; }
  .fan-badge { font-size: 13px; padding: 6px 12px 6px 8px; }
}
