@font-face { font-family: Mplus; font-weight: 400; font-display: swap; src: url(/fonts/mplus-400.woff2) format('woff2'); }
@font-face { font-family: Mplus; font-weight: 700; font-display: swap; src: url(/fonts/mplus-700.woff2) format('woff2'); }
@font-face { font-family: Mplus; font-weight: 800; font-display: swap; src: url(/fonts/mplus-800.woff2) format('woff2'); }

/* Colours come from the guava: pulp is the main colour, leaf marks what is live. The default is the green of the skin.
   Themes override these (themes.css). They apply to any [data-theme] so the theme page can preview them. */
:root, [data-theme] {
  color-scheme: light dark;
  --font: Mplus, system-ui, sans-serif;
  --pulp: light-dark(#0c791a, #43b656);
  --pulp-text: light-dark(#0c791a, #74d585);
  --on-pulp: light-dark(#fff, #04200a);
  --leaf: var(--pulp);
  --sprout: var(--pulp);
  --ink: light-dark(#2b2532, #f1f1f1);
  --seed: light-dark(#6a6074, #aaaaaa);
  --paper: light-dark(#fff, #212121);
  --ground: light-dark(#f4f2f6, #181818);
  --thread: light-dark(#e3dee8, #3a3a3a);
  --blush: light-dark(#e6f2e7, #2c2c2c);
  --quote: light-dark(#587512, #a5bf74);
  --red: light-dark(#b3201a, #ff6161);
  --link: var(--pulp-text);
  --divider: color-mix(in oklab, var(--seed) 38%, transparent);
  --backdrop: none;
  --glow: none;
}
:root { --gutter: 18px; --face: 44px; }

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--thread) transparent; }
[hidden] { display: none !important; } /* browsers only do this for HTML, not for the icon sprite */
body { margin: 0; background: var(--backdrop) fixed var(--ground); color: var(--ink); font: 400 1rem/1.5 var(--font); }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
b, h1, h2 { font-weight: 800; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input, textarea { caret-color: var(--pulp); }
::placeholder { color: var(--seed); opacity: 1; }
:focus-visible { outline: 2px solid var(--pulp); outline-offset: 2px; }
::selection { background: var(--pulp); color: var(--on-pulp); }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.solid { fill: currentColor; stroke: none; }
.face { border-radius: 50%; object-fit: cover; background: var(--thread); }
.unseen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 9; top: -4rem; left: 1rem; padding: .5rem 1rem; background: var(--paper); border-radius: 99px; }
.skip:focus { top: 1rem; }
.error { color: var(--red); font-weight: 700; font-size: .9rem; }
.error:empty { display: none; }
.name { color: var(--pulp-text); text-shadow: var(--glow); }
.gt { color: var(--quote); }
.emoji { display: inline; width: auto; height: 1.5em; max-width: 6em; vertical-align: -.35em; object-fit: contain; }
.brand { white-space: nowrap; }
.brand .i { display: inline; width: 1em; height: 1em; margin-right: .1em; vertical-align: -.12em; color: var(--sprout); }
.rt { color: var(--red); }
.text code { padding: .1em .4em; border-radius: 6px; background: color-mix(in oklab, var(--ink) 10%, transparent); font: .9em ui-monospace, monospace; }
.text .block { display: block; margin: 6px 0; padding: 10px 14px; overflow-x: auto; border-radius: 12px; white-space: pre; }

.primary, .button { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1.15rem; border-radius: 99px; font-weight: 800; cursor: pointer; }
.primary { background: var(--pulp); color: var(--on-pulp); }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .5; cursor: default; filter: none; }
.button { border: 1.5px solid var(--thread); }
.button:hover { border-color: var(--pulp); color: var(--pulp-text); }
.ghost { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--seed); cursor: pointer; }
.ghost:hover { background: var(--blush); color: var(--pulp-text); }
label:has(input:focus-visible) { outline: 2px solid var(--pulp); outline-offset: 2px; }

/* Frame */
.shell { display: grid; grid-template-columns: minmax(256px, 1fr) minmax(0, 660px) minmax(0, 1fr); }
.side { position: sticky; top: 0; justify-self: end; display: flex; flex-direction: column; width: 256px; height: 100dvh; padding: 22px 16px 18px 0; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: .35rem; padding: 0 12px 18px; font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--pulp); text-shadow: var(--glow); }
.logo .i { width: 30px; height: 30px; color: var(--sprout); }
.boards h2 { margin: 14px 0 2px; padding: 0 12px; color: var(--seed); font-size: .78rem; font-weight: 700; }
.boards a { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 99px; color: var(--seed); white-space: nowrap; }
.boards a:hover { background: var(--blush); color: var(--ink); }
.boards [aria-current] { color: var(--ink); font-weight: 800; }
.boards [aria-current] .i { color: var(--pulp); }
.compose { justify-content: center; margin: 20px 12px 0 0; padding: .7rem 1rem; font-size: 1.05rem; visibility: hidden; opacity: 0; translate: 0 10px; transition: opacity .18s, translate .18s, visibility .18s; }
.compose.on { visibility: visible; opacity: 1; translate: 0; }
.modal { width: min(640px, 94vw); max-width: none; max-height: 86dvh; margin: 7dvh auto auto; padding: 0; overflow: auto; border: 1px solid var(--thread); border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 40px 90px -40px rgb(0 0 0 / .7); }
.modal::backdrop { background: rgb(12 8 16 / .6); backdrop-filter: blur(3px); }
.modal header { display: flex; align-items: center; gap: 8px; padding: 12px 18px 6px 12px; }
.modal h2 { font-size: 1.05rem; }
.modal .composer { grid-template-columns: var(--face) minmax(0, 1fr); padding: 8px 20px 0; }
.modal .composer > .face { display: block; }
.modal .sheet { border: 0; border-radius: 0; background: none; }
.modal .head { min-height: 0; padding: 8px 0 0; border: 0; }
.modal .sheet :where(.name, .subject, textarea) { padding-inline: 0; }
.modal .sheet .subject { padding-top: 6px; font-size: 1.4rem; }
.modal .sheet textarea { min-height: 150px; font-size: 1.15rem; }
.modal .shots, .modal .sheet > .error { padding-inline: 0; }
.modal .tools { margin: 6px -20px 0 calc(-1 * (var(--face) + 34px)); padding: 12px 16px; }
.me { display: flex; align-items: center; margin-top: auto; padding-top: 12px; }
.who { display: flex; margin-right: auto; align-items: center; gap: 10px; min-width: 0; padding: 4px 12px 4px 4px; border-radius: 99px; }
.who b { overflow: hidden; text-overflow: ellipsis; }
.who:hover { background: var(--blush); }
.column { min-height: 100dvh; }
.bar { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px; min-height: 56px; padding: 8px var(--gutter); background: linear-gradient(var(--ground) 78%, transparent); }
.bar h1 { overflow: hidden; max-width: 100%; font-size: 1.2rem; text-overflow: ellipsis; white-space: nowrap; }
.bar p { color: var(--seed); font-size: .9rem; }
.bar .ghost { margin-left: -10px; }
.bar .ghost + h1 { max-width: calc(100% - 48px); }

/* Posts */
.thread { padding-bottom: 18px; }
.feed .thread:not(:last-child) { position: relative; margin-bottom: 24px; padding-bottom: 28px; }
.feed .thread:not(:last-child)::before { content: ''; position: absolute; inset: auto var(--gutter) 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--divider) calc(50% - 24px), transparent 0 calc(50% + 24px), var(--divider) 0); }
.feed .thread:not(:last-child)::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 22px; height: 22px; translate: -50%; background: var(--sprout); mask: url(/img/caret.svg) center / contain no-repeat; }
.post { position: relative; display: grid; grid-template-columns: var(--face) minmax(0, 1fr); column-gap: 14px; padding: 14px var(--gutter) 8px; scroll-margin: 64px 0 150px; }
.post > * { grid-column: 2; }
.post > .face { grid-column: 1; grid-row: 1 / span 9; }
.post:not(.op) > .face { width: 36px; height: 36px; margin-left: 4px; }
.flash { animation: flash 1.2s ease-out; } /* the post a >>123 led to */
@keyframes flash { from { background: var(--blush); } }
.feed .post { border-radius: 20px; cursor: pointer; transition: background .12s; }
.feed .post:hover { background: var(--paper); }

/* The stem that joins a thread's faces. It turns green on its way to a post being typed. */
.post:not(:last-child)::before { content: ''; position: absolute; left: calc(var(--gutter) + var(--face) / 2 - 1px); top: calc(14px + var(--face) + 6px); bottom: -8px; width: 2px; border-radius: 2px; background: var(--thread); }
.post:not(.op):not(:last-child)::before { top: 56px; }
.post:has(+ .post[data-open])::before { background: linear-gradient(var(--thread), var(--leaf)); }

.post header { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; line-height: 1.35; }
.post .name, .subject { overflow-wrap: anywhere; }
.where, .number, .post time { color: var(--seed); font-size: .82rem; }
.where { color: var(--pulp-text); }
:is(.thread[data-thread], .peek) .where { display: none; } /* only Salvos and profiles mix boards */
.number { cursor: pointer; }
.where:hover, .number:hover, .name a:hover { text-decoration: underline; }
.typing { display: none; color: var(--leaf); font-size: .82rem; font-weight: 700; }
.text { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.text:empty { display: none; }
.text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.feed .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 10; overflow: hidden; }

.post[data-open] .face { outline: 2px solid var(--leaf); outline-offset: 2px; }
.post[data-open] .typing { display: inline; }
.post[data-open] time { display: none; }
.post[data-open] .text { display: block; min-height: 1.5em; }
.post[data-open] .text::after { content: ''; display: inline-block; width: .95em; height: .95em; margin-left: .1em; vertical-align: -.08em; background: var(--leaf); mask: url(/img/caret.svg) center / contain no-repeat; transform-origin: 50% 100%; animation: sway 1.1s ease-in-out infinite alternate; }
@keyframes sway { from { rotate: -11deg; } to { rotate: 11deg; } }

.album { display: grid; gap: 3px; overflow: hidden; width: fit-content; max-width: 100%; margin-top: 10px; border-radius: 16px; }
.album a { min-width: 0; min-height: 0; }
.album video { display: block; max-width: 100%; height: auto; background: #000; object-fit: contain; }
.album:not([data-n="1"]) video { width: 100%; height: 100%; min-height: 0; }
.album[data-n="2"] video, .album[data-n="3"] video:first-child { grid-row: span 2; }
.sound { width: min(100%, 460px); height: 44px; margin-top: 10px; }
.album img { max-width: 100%; height: auto; object-fit: cover; background: var(--thread); }
.album:not([data-n="1"]) { width: 100%; aspect-ratio: 16 / 9; grid-template: 1fr 1fr / 1fr 1fr; }
.album:not([data-n="1"]) img { width: 100%; height: 100%; }
.album[data-n="2"] a, .album[data-n="3"] a:first-child { grid-row: span 2; }

.post footer { display: grid; grid-template-columns: repeat(3, minmax(min-content, 80px)) auto auto 1fr; justify-items: start; margin: 6px -9px 0; }
.post footer > * { grid-row: 1; }
.post:not(.op) footer { position: absolute; top: 7px; right: calc(var(--gutter) - 9px); display: flex; margin: 0; }
.post:not(.op) header { padding-right: 84px; }
.mark { grid-column: 6; order: 1; justify-self: end; }
.trash { grid-column: 4; }
.act { display: inline-flex; align-items: center; gap: 5px; min-width: 38px; min-height: 36px; padding: 0 9px; border-radius: 99px; color: var(--seed); font-size: .88rem; font-variant-numeric: tabular-nums; }
.trash { display: none; }
.pin { display: none; grid-column: 5; }
:is(.mine, [data-admin]) .trash, [data-admin] .pin { display: inline-flex; }
.fixed { display: inline-flex; align-items: center; gap: 3px; align-self: center; color: var(--pulp-text); font-size: .82rem; font-weight: 700; }
.fixed .i { width: 14px; height: 14px; }
.trip { color: var(--seed); font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }
.staff { align-self: center; color: var(--leaf); }
.staff .i { display: block; width: 15px; height: 15px; }
.act:hover { background: var(--blush); color: var(--pulp-text); }
.stat:hover { background: none; color: var(--seed); }
.act[aria-pressed="true"] { color: var(--pulp-text); }
.act[aria-pressed="true"] .i { fill: currentColor; animation: pop .25s ease-out; }
@keyframes pop { 50% { scale: 1.25; translate: 0 -2px; } }

.more { display: block; padding: 18px; text-align: center; color: var(--pulp-text); font-weight: 800; }
.more:hover { background: var(--blush); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 56px var(--gutter); text-align: center; }
.empty h1, .empty h2 { font-size: 1.2rem; }
.empty p { color: var(--seed); }

/* Polls */
.poll { display: grid; gap: 8px; max-width: 520px; margin-top: 10px; }
.poll button { position: relative; display: flex; justify-content: space-between; gap: 12px; overflow: hidden; min-height: 42px; padding: 8px 16px; border: 1.5px solid var(--thread); border-radius: 14px; text-align: left; font-weight: 700; }
.poll button:enabled:hover { border-color: var(--pulp); color: var(--pulp-text); }
.poll button:disabled { cursor: default; color: inherit; }
.poll button > span, .poll button > b { position: relative; z-index: 1; overflow-wrap: anywhere; }
.poll progress { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: none; appearance: none; }
.poll progress::-webkit-progress-bar { background: none; }
.poll progress::-webkit-progress-value { background: color-mix(in srgb, var(--seed) 22%, transparent); transition: inline-size .3s; }
.poll progress::-moz-progress-bar { background: color-mix(in srgb, var(--seed) 22%, transparent); }
.poll [aria-pressed="true"] { border-color: var(--pulp); }
.poll [aria-pressed="true"] progress::-webkit-progress-value { background: color-mix(in srgb, var(--pulp) 32%, transparent); }
.poll [aria-pressed="true"] progress::-moz-progress-bar { background: color-mix(in srgb, var(--pulp) 32%, transparent); }
.poll:not(.shown) :is(b, progress) { display: none; }
.poll small { color: var(--seed); }
.poll-edit { display: grid; gap: 10px; margin: 0; padding: 4px 16px 14px; border: 0; }
.poll-edit .options { display: grid; gap: 8px; }
.poll-edit input { padding: 8px 14px; border: 1.5px solid var(--thread); border-radius: 12px; outline: 0; background: none; }
.poll-edit input:focus { border-color: var(--seed); }
.poll-edit .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.poll-edit .row .ghost { margin-left: auto; }
.poll-edit select { padding: 5px 10px; border: 1.5px solid var(--thread); border-radius: 10px; background: var(--paper); }
.modal .poll-edit { padding-inline: 0; }

/* Links to other sites */
.embed { position: relative; display: grid; overflow: hidden; width: 100%; max-width: 560px; margin-top: 10px; border: 1px solid var(--thread); border-radius: 16px; background: var(--paper); }
.embed img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.embed.wide img { aspect-ratio: 16 / 9; height: auto; }
.embed.tall { max-width: 340px; }
.embed.tall img { aspect-ratio: 4 / 5; height: auto; }
.embed .play { grid-area: 1 / 1; place-self: center; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgb(20 12 18 / .72); color: #fff; transition: background .15s; }
.embed .play .i { width: 28px; height: 28px; }
.embed:hover .play { background: var(--pulp); color: var(--on-pulp); }
.embed .caption { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 9px 14px 11px; }
.embed .caption b { grid-column: 1 / -1; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; overflow-wrap: anywhere; }
.embed .caption span, .embed .caption small { color: var(--seed); font-size: .84rem; }
.embed:not(:has(img)) { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.embed:not(:has(img)) .play { margin: 10px 0 10px 12px; width: 42px; height: 42px; }
.embed.bar:has(img) { grid-template-columns: 104px minmax(0, 1fr); align-items: center; }
.embed.bar img { aspect-ratio: 1; height: auto; }
iframe.embed { display: block; aspect-ratio: 16 / 9; height: auto; }
iframe.embed.bar { aspect-ratio: auto; height: 166px; }
iframe.embed.tall { max-width: 400px; aspect-ratio: auto; height: 620px; }

/* Thread page: the opening post leads, replies run compact beneath it. */
.reading .op .subject { order: 1; flex-basis: 100%; margin-top: 4px; font-size: 1.3rem; line-height: 1.3; }
.reading .post.op:not(:last-child) { margin-bottom: 22px; padding-bottom: 26px; }
.reading .post.op:not(:last-child)::before { content: ''; display: block; position: absolute; inset: auto var(--gutter) 0; width: auto; height: 2px; background: linear-gradient(90deg, var(--divider) calc(50% - 24px), transparent 0 calc(50% + 24px), var(--divider) 0); }
.reading .post.op:not(:last-child)::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 22px; height: 22px; translate: -50%; background: var(--sprout); mask: url(/img/caret.svg) center / contain no-repeat; }
.reading .post:not(.op) { padding-block: 8px; border-radius: 16px; }
.reading .post:not(.op):hover { background: color-mix(in oklab, var(--paper) 75%, transparent); }
.reading .post:not(.op) > .face { width: 32px; height: 32px; margin: 2px 0 0 calc((var(--face) - 32px) / 2); }
.reading .post:not(.op):not(:last-child)::before { top: 47px; bottom: -5px; }
.reading .post:not(.op) .text { margin-top: 0; font-size: .97rem; }
.reading .post:not(.op) .act { min-width: 30px; min-height: 28px; padding: 0 6px; font-size: .8rem; }
.reading .post:not(.op) .act .i { width: 16px; height: 16px; }
.reading .post:not(.op) footer { top: 4px; right: calc(var(--gutter) - 7px); }
.folds .reading .post:not([data-open]) .text:not(.full) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9; overflow: hidden; }
.folds .reading .post.op:not([data-open]) .text:not(.full) { -webkit-line-clamp: 12; }
.unfold { justify-self: start; margin-top: 2px; padding: 2px 0; color: var(--pulp-text); font-size: .9rem; font-weight: 800; }
.unfold:hover { text-decoration: underline; }
.peek.post { position: fixed; z-index: 7; width: min(440px, 92vw); max-height: 60dvh; overflow: hidden; padding: 12px 16px; border: 1px solid var(--thread); border-radius: 18px; background: var(--paper); box-shadow: 0 18px 50px -18px rgb(0 0 0 / .6); pointer-events: none; }
.peek.post::before { display: none; }
.peek .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; }
.peek .album { max-width: 220px; }

/* Composer: one sheet whose fields already look like the post they become. */
.composer { display: grid; grid-template-columns: var(--face) minmax(0, 1fr); column-gap: 14px; padding: 10px var(--gutter) 20px; }
.composer > .face { margin-top: 4px; }
.sheet { display: grid; grid-template-columns: minmax(0, 1fr); border: 1.5px solid var(--thread); border-radius: 18px; background: var(--paper); transition: border-color .15s; }
.sheet:focus { outline: 0; } /* focusable so that pressing a label inside keeps the focus within */
.sheet:focus-within { border-color: var(--seed); }
.dropping .sheet { border: 2px dashed var(--pulp); background: var(--blush); }
.sheet :where(.name, .subject, textarea) { display: block; width: 100%; min-width: 0; border: 0; outline: 0; background: none; padding: 0 16px; }
.sheet .name::placeholder { color: var(--pulp-text); opacity: .85; }
.head { display: flex; align-items: center; gap: 8px; min-height: 46px; padding-right: 8px; border-bottom: 1px solid var(--thread); }
.head .name { flex: 1; font-weight: 800; }
.sheet .subject { padding-top: 13px; font-size: 1.2rem; font-weight: 800; }
.head .subject { padding-top: 0; }
.sheet textarea { min-height: 96px; max-height: 40dvh; padding-block: 8px 14px; resize: none; font-size: 1.05rem; line-height: 1.5; }
.sheet > .error { padding: 0 16px 8px; }
.tools { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-top: 1px solid var(--thread); }
.tools .ghost { color: var(--pulp-text); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 99px; color: var(--seed); font-size: .88rem; font-weight: 700; cursor: pointer; }
.live input { position: absolute; opacity: 0; }
.live:has(:checked) { color: var(--leaf); background: color-mix(in srgb, var(--leaf) 13%, transparent); }
.left { margin-left: auto; padding-right: 6px; color: var(--seed); font-size: .85rem; font-variant-numeric: tabular-nums; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 16px 12px; }
.shots:empty { display: none; }
.shots li { position: relative; }
.shots img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; }
.shots video { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: #000; }
.shots audio { width: 230px; height: 44px; margin-right: 34px; }
.shots .busy :is(img, video, audio) { opacity: .45; }
.shots .busy:is(.video, .audio)::after { content: 'Convertendo…'; display: block; color: var(--seed); font-size: .78rem; }
.shots button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: rgb(28 24 32 / .78); color: #fff; line-height: 1; }
.composer.docked { position: sticky; z-index: 2; bottom: 0; padding-block: 26px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--ground) 30px); pointer-events: none; } /* its faded top must not swallow clicks */
.docked > * { pointer-events: auto; }
.docked textarea { min-height: 0; padding-block: 11px; }
.docked .sheet:not(:focus-within, :has(textarea:not(:placeholder-shown), .shots li)) :is(.head, .tools) { display: none; } /* a slim line until used */

#emoji-panel { inset: auto; width: min(360px, 94vw); max-height: 320px; margin: 0; padding: 4px 12px 12px; overflow-y: auto; border: 1px solid var(--thread); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px -24px rgb(0 0 0 / .6); }
#emoji-panel h3 { margin: 10px 0 4px; color: var(--seed); font-size: .8rem; }
#emoji-panel div { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
#emoji-panel button { display: grid; place-items: center; height: 38px; padding: 0; border-radius: 10px; font-size: 1.4rem; line-height: 1; }
#emoji-panel button:hover { background: var(--blush); }
#emoji-panel img { max-width: 30px; max-height: 30px; }
.emoji-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.emoji-form .error { flex-basis: 100%; }
.emoji-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.emoji-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--thread); border-radius: 14px; background: var(--paper); }
.emoji-list img { width: 34px; height: 34px; object-fit: contain; }
.emoji-list span { overflow: hidden; flex: 1; text-overflow: ellipsis; }

/* Themes */
.themes { display: grid; gap: 30px; padding: 20px var(--gutter) 40px; }
.themes h2 { margin-bottom: 8px; font-size: 1.1rem; }
.themes p { margin-bottom: 10px; color: var(--seed); font-size: .92rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.swatch { display: grid; padding: 0; overflow: hidden; border: 2px solid var(--thread); border-radius: 18px; background: var(--backdrop), var(--ground); color: var(--ink); font-family: var(--font); text-align: left; }
.swatch[aria-pressed="true"] { border-color: var(--pulp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pulp) 35%, transparent); }
.sample { display: grid; gap: 2px; margin: 12px 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--thread); }
.mini { display: flex; gap: 6px; margin-top: 6px; }
.mini i { width: 16px; height: 16px; border-radius: 50%; background: var(--pulp); }
.mini i:nth-child(2) { background: var(--leaf); }
.mini i:nth-child(3) { background: var(--seed); }
.label { padding: 9px 14px 11px; font-weight: 800; }
.colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.colours label, .start { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.colours input { width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--thread); border-radius: 50%; overflow: hidden; background: none; cursor: pointer; }
.colours ::-moz-color-swatch { border: 0; }
.colours ::-webkit-color-swatch-wrapper { padding: 0; }
.colours ::-webkit-color-swatch { border: 0; }
.start { margin-top: 18px; }
.start select { padding: 6px 12px; border: 1.5px solid var(--thread); border-radius: 12px; background: var(--paper); }
.themes textarea { display: block; width: 100%; margin-bottom: 10px; padding: 12px 14px; border: 1.5px solid var(--thread); border-radius: 14px; outline: 0; background: var(--paper); font: .9rem/1.5 ui-monospace, monospace; resize: vertical; }
.themes textarea:focus { border-color: var(--seed); }

/* Rules */
.rules { display: grid; gap: 26px; max-width: 64ch; padding: 24px var(--gutter) 40px; }
.rules h2 { margin-bottom: 8px; font-size: 1.15rem; }
.rules ul { display: grid; gap: 8px; }
.rules p + ul { margin-top: 12px; }
.rules li { padding-left: 1.2em; text-indent: -1.2em; }
.rules li::before { content: ''; display: inline-block; width: .5em; height: .5em; margin-right: .7em; vertical-align: .1em; border-radius: 50%; background: var(--pulp); }
.canary { color: var(--seed); }

/* Account */
.account { display: grid; gap: 24px; padding: 24px var(--gutter); }
.greeting { display: flex; align-items: center; gap: 18px; }
.greeting .face { flex: none; }
.greeting p { max-width: 46ch; }
.handle { margin-bottom: 10px; font-size: 1.4rem; font-weight: 800; }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.forms form { display: grid; align-content: start; gap: 12px; }
.forms h2 { font-size: 1.1rem; }
.forms label { display: grid; gap: 4px; font-weight: 700; outline: 0; }
.forms input { width: 100%; padding: 9px 14px; border: 1.5px solid var(--thread); border-radius: 14px; outline: 0; background: var(--paper); font-weight: 400; }
.forms input:focus { border-color: var(--seed); }
.forms .primary { justify-self: start; }

/* Sign in and sign up */
.gate { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; padding: 24px clamp(16px, 4vw, 48px) 48px; }
.gate > .logo { justify-self: start; padding: 0; }
.gate main { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 340px); align-items: center; justify-content: center; gap: clamp(28px, 5vw, 76px); padding-top: 24px; }
.card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: clamp(24px, 4vw, 50px); border: 1px solid var(--thread); border-radius: 36px; background: var(--paper); box-shadow: 0 40px 70px -50px rgb(60 20 40 / .5); }
.card h1 { font-size: 1.8rem; line-height: 1.2; }
.lead { margin-top: -10px; color: var(--seed); font-size: 1.08rem; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.field > :is(label, b) { font-weight: 800; }
.field small { color: var(--seed); font-size: .88rem; }
.field small.good { color: var(--leaf); font-weight: 700; }
.field small.error { color: var(--red); }
.pill { display: flex; align-items: center; gap: 2px; min-width: 0; padding: 0 20px; border: 1.5px solid var(--thread); border-radius: 99px; background: color-mix(in oklab, var(--ground) 55%, var(--paper)); transition: border-color .15s; }
.pill:focus-within { border-color: var(--seed); }
.pill span { color: var(--pulp-text); font-weight: 800; }
.pill input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: none; font-size: 1.05rem; }
.photo { display: flex; align-items: center; gap: 18px; }
.photo small { display: block; margin-top: 8px; }
.phrase { display: flex; flex-wrap: wrap; gap: 10px; }
.phrase .pill { flex: 1 1 min(270px, 100%); }
.soft { padding: .6rem 1.2rem; border-radius: 99px; background: color-mix(in srgb, var(--pulp) 15%, transparent); color: var(--pulp-text); font-weight: 800; }
.soft:hover { background: color-mix(in srgb, var(--pulp) 25%, transparent); }
.big { justify-self: start; padding: .7rem 1.8rem; font-size: 1.05rem; }
.primary.wide { justify-content: center; padding: .85rem; font-size: 1.05rem; }
.card p a { color: var(--pulp-text); font-weight: 800; }
.card p a:hover { text-decoration: underline; }
.fine { color: var(--seed); text-align: center; }
.fine + .fine { margin-top: -14px; }
.ask { color: var(--seed); }
.ways { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.perks { display: grid; justify-items: start; gap: 14px; }
.perks > p { color: var(--seed); font-size: 1.08rem; }
.perks h2 { font-size: 1.25rem; }
.perks ul { display: grid; gap: 12px; }
.perks li { display: flex; gap: 10px; }
.perks li .i { margin-top: 2px; color: var(--leaf); }
@media (max-width: 920px) { .gate main { grid-template-columns: minmax(0, 560px); } }

/* Profile */
.profile { display: flex; align-items: center; gap: 18px; padding: 20px var(--gutter); }
.profile .handle { display: flex; align-items: center; gap: 8px; margin: 0; }
.profile p:last-child { color: var(--seed); }

/* Not found: the same in every theme */
.lost { display: grid; place-items: center; min-height: 100dvh; padding: 24px; background: radial-gradient(circle at 50% 35%, #131313, #000 72%); color: #fff; text-align: center; }
.lost main { display: grid; justify-items: center; gap: 26px; animation: rise .8s ease-out; }
.lost h1 { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; }
.lost h1 img { height: 54px; width: auto; }
.lost p { font-size: 1.15rem; }
.lost p a { color: #bbb; }
.lost p a:hover { color: #fff; text-decoration: underline; }
@keyframes rise { from { opacity: 0; translate: 0 28px; } }

/* Enlarged picture and messages */
.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(20 16 24 / .94); }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-width: 94vw; max-height: 92dvh; border-radius: 8px; cursor: zoom-in; }
.viewer.zoom { place-items: start center; overflow: auto; }
.viewer.zoom img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; }
.viewer.zoom .ghost { position: fixed; }
.viewer .ghost { position: absolute; width: 46px; height: 46px; background: rgb(255 255 255 / .12); color: #fff; }
.viewer .ghost:hover { background: var(--pulp); color: var(--on-pulp); }
.viewer .close { top: 16px; right: 16px; }
.viewer .prev { left: 16px; top: calc(50% - 23px); }
.viewer .next { right: 16px; top: calc(50% - 23px); }
.viewer.single .prev, .viewer.single .next { display: none; }
.toast { position: fixed; z-index: 9; left: 50%; bottom: 28px; max-width: 90vw; padding: 10px 20px; border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 700; translate: -50% 80px; opacity: 0; transition: translate .2s, opacity .2s; pointer-events: none; }
.toast.on { translate: -50% 0; opacity: 1; }

@media (max-width: 920px) {
  :root { --gutter: 14px; --face: 40px; }
  .shell { display: block; }
  .side { position: static; display: grid; grid-template-columns: 1fr auto; align-items: center; width: auto; height: auto; padding: 10px var(--gutter) 0; overflow: visible; }
  .logo { padding: 0; }
  .me { grid-row: 1; grid-column: 2; margin: 0; padding: 0; }
  .compose { position: fixed; z-index: 5; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); margin: 0; box-shadow: 0 12px 30px -10px rgb(0 0 0 / .6); }
  .who .face { width: 32px; height: 32px; }
  .boards { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 2px; overflow-x: auto; margin: 6px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .boards ul { display: flex; gap: 2px; }
  .boards h2 { align-self: center; margin: 0 2px 0 10px; padding: 0; white-space: nowrap; }
  .boards a { gap: 7px; }
  }
@media (max-width: 560px) {
  .post footer { margin-inline: -5px; }
  .act { min-width: 30px; padding: 0 5px; }
  .composer { grid-template-columns: minmax(0, 1fr); }
  .composer > .face { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
