/* Meme Encyclopedia: the retrac.space "liquid glass" look (same as Toptext), in the blue and
   cyan of the app icon. Deep navy lit by cyan glows, frosted glass panels with thin bright
   rims, and cyan glass for whatever is active. Set in Inter. */
:root {
  color-scheme: dark;
  --bg: #050d18;
  --fg: #eef8ff;
  --muted: #9fb6cc;
  --faint: #6d849b;
  --line: rgba(200, 232, 255, .1);
  --glass: rgba(220, 240, 255, .055);
  --glass-hi: rgba(220, 240, 255, .1);
  --well: rgba(0, 0, 0, .26);
  --ink: #04233d;
  --cyan: #5fd6ff;
  --sky: #8be4ff;
  --blue: #2f8fff;
  --deep: #1a5fd0;
  --danger: #ff6b6b;
  --tile: linear-gradient(160deg, #a3ecff 0%, #5fd0fb 45%, #2f8fff 100%);
  --accent: linear-gradient(180deg, #6fdcff 0%, #2d8ff5 100%);
  --accent-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 40, 110, .25), 0 8px 20px -6px rgba(47, 143, 255, .7), 0 1px 2px rgba(0, 30, 80, .4);
  --rim: linear-gradient(180deg, rgba(220, 245, 255, .38), rgba(220, 245, 255, .06) 45%, rgba(220, 245, 255, .16));
  --lift: 0 18px 40px -12px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--fg);
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
  line-height: 1.5;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--cyan); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.noscript { padding: 40px var(--gutter); text-align: center; color: var(--muted); }

/* Slow, soft glows drifting behind everything. */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .26;
  animation: aurora 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { left: -14vmax; top: -18vmax; background: #2f8fff; }
.aurora span:nth-child(2) { right: -16vmax; top: -6vmax; background: #5fd6ff; opacity: .16; animation-delay: -9s; animation-duration: 31s; }
.aurora span:nth-child(3) { left: 24%; bottom: -30vmax; background: #1a5fd0; opacity: .24; animation-delay: -17s; }
@keyframes aurora { to { transform: translate(6vmax, 4vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }

/* ---------- Glass ---------- */
.glass, .topbar, .searchbar, .card, .info, .notice, .soon__card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--lift);
}
:is(.glass, .topbar, .searchbar, .card, .info, .notice, .soon__card)::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Loading screen (same as Simple Soundboard) ---------- */
html.is-splashing { overflow: hidden; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 34px;
  background: #000;
  transition: opacity .55s var(--ease) .1s, visibility 0s linear .65s;
}
.splash__icon {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 10px 34px rgba(95, 214, 255, 0.35));
  animation: splash-pop .6s cubic-bezier(.2, 1.4, .4, 1) .08s backwards;
  transition: transform .55s cubic-bezier(.5, 0, .2, 1), opacity .45s ease-in;
}
.splash__track {
  width: min(200px, 56vw);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  animation: splash-fade .4s ease-out .3s backwards;
  transition: opacity .25s ease-in;
}
.splash__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8fff, #8be4ff);
  box-shadow: 0 0 12px rgba(95, 214, 255, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.splash__fill.is-running { transition: none; }

.splash.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.splash.is-leaving .splash__icon { animation: none; transform: scale(1.6); opacity: 0; }
.splash.is-leaving .splash__track { animation: none; opacity: 0; }

@keyframes splash-pop {
  from { opacity: 0; transform: scale(.3); }
  60% { opacity: 1; }
  to { transform: scale(1); }
}
@keyframes splash-fade { from { opacity: 0; } }

/* The site rises in as the loading screen fades. */
html.is-revealing .topbar,
html.is-revealing .masthead,
html.is-revealing .view,
html.is-revealing .footer,
html.is-revealing .soon__logo,
html.is-revealing .soon__card,
html.is-revealing .soon__foot {
  animation: site-in .8s cubic-bezier(.2, .9, .3, 1) .1s backwards;
}
html.is-revealing .masthead, html.is-revealing .soon__card { animation-delay: .16s; }
html.is-revealing .view, html.is-revealing .soon__foot { animation-delay: .24s; }
@keyframes site-in {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
}

@media (prefers-reduced-motion: reduce) {
  .splash { transition: opacity .2s linear, visibility 0s linear .2s; }
  .splash__icon, .splash__track { animation: splash-fade .2s linear backwards; }
  .splash.is-leaving .splash__icon { transform: none; }
  html.is-revealing :is(.topbar, .masthead, .view, .footer, .soon__logo, .soon__card, .soon__foot) { animation: none; }
}

/* ---------- Coming soon ---------- */
.soon {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 40px var(--gutter);
  text-align: center;
}
.soon__logo img { display: block; height: 22px; width: auto; }
.soon__card { width: min(100%, 520px); padding: 40px clamp(20px, 6vw, 44px) 36px; border-radius: 32px; }
.soon__icon { width: 104px; height: 104px; filter: drop-shadow(0 14px 26px rgba(47, 143, 255, .45)); }
.soon__title { margin-top: 20px; font-size: clamp(30px, 7vw, 42px); font-weight: 900; letter-spacing: -.035em; line-height: 1.05; }
.soon__badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 6px 14px;
  border-radius: 99px;
  color: var(--ink); font-weight: 800; font-size: 14px;
  background: var(--accent); box-shadow: var(--accent-shadow);
}
.soon__badge .ico { width: 16px; height: 16px; }
.soon__text { margin: 18px auto 0; max-width: 38ch; color: var(--muted); font-size: 16px; }
.soon__signin { display: inline-block; margin-top: 22px; color: var(--sky); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.soon__foot { color: var(--faint); font-size: 13px; }
.soon__foot a { color: var(--muted); }

/* ---------- Site ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--max);
  margin: 16px auto 0;
  margin-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  padding: 12px 18px;
  border-radius: 20px;
}
.topbar__logo img { display: block; height: 20px; width: auto; }
.topbar__count { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }

.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 9vw, 88px) var(--gutter) 28px;
  display: grid; justify-items: center; gap: 28px;
  text-align: center;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand__icon { width: 76px; height: 76px; filter: drop-shadow(0 12px 22px rgba(47, 143, 255, .45)); }
.brand__text { display: grid; text-align: left; }
.brand__name { font-size: clamp(30px, 6vw, 52px); font-weight: 900; letter-spacing: -.04em; line-height: 1.02; }
.brand__tag { color: var(--muted); font-size: clamp(15px, 2.2vw, 18px); font-weight: 500; }

.masthead--compact { padding-top: 22px; padding-bottom: 8px; grid-template-columns: auto 1fr; justify-items: stretch; align-items: center; gap: 20px; text-align: left; }
.masthead--compact .brand__icon { width: 46px; height: 46px; }
.masthead--compact .brand__name { font-size: 20px; letter-spacing: -.025em; }
.masthead--compact .brand__tag { display: none; }
@media (max-width: 640px) {
  .masthead--compact { grid-template-columns: 1fr; }
}

.searchbar {
  display: flex; align-items: center;
  width: min(100%, 680px);
  padding: 6px 6px 6px 18px;
  border-radius: 99px;
}
.masthead--compact .searchbar { width: 100%; justify-self: end; max-width: 620px; }
.searchbar:focus-within { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 3px rgba(95, 214, 255, .35), var(--lift); }
.searchbar__icon { color: var(--muted); }
.searchbar__input {
  flex: 1; min-width: 0;
  padding: 12px 12px;
  border: 0; outline: 0; background: transparent;
  font-size: 17px; font-weight: 500;
}
.searchbar__input::placeholder { color: var(--faint); }
.searchbar__input::-webkit-search-cancel-button { filter: invert(.7); }
.searchbar__go {
  flex: none;
  padding: 11px 20px;
  border: 0; border-radius: 99px;
  color: var(--ink); font-weight: 800; font-size: 15px;
  background: var(--accent); box-shadow: var(--accent-shadow);
  transition: transform .15s var(--ease), filter .15s;
}
.searchbar__go:hover { filter: brightness(1.08); }
.searchbar__go:active { transform: translateY(1px) scale(.98); }
@media (max-width: 420px) { .searchbar__go { padding-inline: 14px; } }

.view { display: block; max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 64px; outline: 0; }

.footer { padding: 28px var(--gutter) 40px; text-align: center; color: var(--faint); font-size: 13px; }
.footer a { color: var(--muted); }

/* ---------- Home ---------- */
.suggest { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-bottom: 44px; }
.suggest__label { color: var(--faint); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.chip {
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  background: var(--glass-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px var(--line);
  transition: background .15s, transform .15s var(--ease);
}
.chip:hover { background: rgba(95, 214, 255, .16); transform: translateY(-1px); }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.section-title .ico { color: var(--cyan); }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.card {
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s;
}
a.card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 24px 48px -14px rgba(0, 0, 0, .6), 0 0 0 1px rgba(95, 214, 255, .25); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--well); overflow: hidden; }
.card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 16px 18px 18px; }
.card__title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.card__meta { color: var(--cyan); font-size: 13px; font-weight: 600; }
.card__alias { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.card__alias .ico { width: 14px; height: 14px; color: var(--cyan); }
.card__alias b { color: var(--fg); font-weight: 600; }
.card__summary { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.results { display: grid; gap: 14px; }
.results .card { flex-direction: row; }
.results .card__media { flex: none; width: clamp(120px, 28%, 260px); aspect-ratio: auto; min-height: 150px; }
.results .card__summary { -webkit-line-clamp: 2; }
@media (max-width: 560px) {
  .results .card { flex-direction: column; }
  .results .card__media { width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
}
.results__title { font-size: clamp(20px, 3vw, 26px); font-weight: 800; letter-spacing: -.025em; margin: 18px 0 16px; overflow-wrap: anywhere; }
.results__title b { color: var(--sky); }
.results__status { display: grid; gap: 14px; margin-bottom: 14px; }
.results__status:empty { display: none; }

.tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; list-style: none; }
.tag {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  color: var(--sky);
  background: rgba(95, 214, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(95, 214, 255, .18);
}

/* No picture: the first letter on a tile, like the app icon. */
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--tile); }
.ph span {
  display: grid; place-items: center;
  width: 46%; aspect-ratio: 1; max-width: 120px;
  border-radius: 18%;
  background: rgba(255, 255, 255, .9);
  color: var(--deep);
  font-size: clamp(28px, 5vw, 56px); font-weight: 900;
  box-shadow: 0 10px 24px -8px rgba(0, 40, 110, .5);
}
.ph--hero { min-height: 260px; }

/* Loading */
.shimmer, .line {
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(160, 225, 255, .12) 50%, rgba(255, 255, 255, .04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.shimmer { position: absolute; inset: 0; }
.line { height: 12px; border-radius: 6px; }
.line--wide { width: 90%; }
.line--short { width: 45%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.card--ghost { min-height: 260px; }
.card--pending .card__body { align-content: start; }
.card__pending { color: var(--muted); font-size: 14.5px; margin-bottom: 4px; }
.card__pending b { color: var(--fg); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
.loading--page { justify-content: center; padding: 80px 0; }
.dots { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: bounce 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .shimmer, .line, .dots i, .caret { animation: none; } }

/* Notices */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 20px; }
.notice__icon { width: 24px; height: 24px; color: var(--cyan); margin-top: 1px; }
.notice--declined .notice__icon { color: var(--danger); }
.notice--error .notice__icon { color: #ffc35a; }
.notice__title { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.notice__text { color: var(--muted); font-size: 14.5px; margin-top: 2px; }

/* ---------- Article ---------- */
.article { padding-top: 8px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 12px 0 18px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
}
.back:hover { color: var(--fg); }
.back .ico { width: 16px; height: 16px; }

.hero { margin-bottom: 28px; }
.hero__frame {
  position: relative;
  display: grid; place-items: center;
  max-height: min(62vh, 560px);
  min-height: 220px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--well);
  box-shadow: var(--lift), inset 0 0 0 1px var(--line);
}
.hero__backdrop { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(36px) saturate(140%) brightness(.55); }
.hero__img { position: relative; display: block; max-width: 100%; max-height: min(62vh, 560px); object-fit: contain; }
.hero__frame .ph { position: relative; }
.hero figcaption { margin-top: 10px; color: var(--faint); font-size: 13px; text-align: center; }

.article__head { display: grid; gap: 12px; margin-bottom: 32px; }
.article__title { font-size: clamp(32px, 6vw, 56px); font-weight: 900; letter-spacing: -.04em; line-height: 1.04; overflow-wrap: anywhere; }
.article__aka { color: var(--muted); font-size: 16px; }
.article__aka b { color: var(--fg); font-weight: 600; }

.article__layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .article__layout { grid-template-columns: 1fr; } }

.info { position: sticky; top: 20px; padding: 20px; border-radius: 22px; display: grid; gap: 18px; }
@media (max-width: 860px) { .info { position: relative; top: 0; } }
.info__title { color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.info dl { display: grid; gap: 12px; }
.info__row dt { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.info__row dt .ico { width: 15px; height: 15px; color: var(--cyan); }
.info__row dd { font-weight: 600; font-size: 15px; margin-top: 2px; padding-left: 22px; overflow-wrap: anywhere; }
.toc ol { list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none;
}
.toc a::before { content: counter(toc); color: var(--cyan); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--fg); background: var(--glass-hi); }

.article__body { display: grid; gap: 34px; font-size: 17px; line-height: 1.7; }
.sec { scroll-margin-top: 20px; }
.sec h2 {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  font-size: 24px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2;
}
.sec h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--accent); flex: none; }
.sec p { color: #d4e4f2; }
.sec p + p { margin-top: 14px; }
.sec--summary p { color: var(--fg); font-size: 18.5px; }
.examples { display: grid; gap: 10px; list-style: none; }
.examples li {
  position: relative;
  padding: 12px 16px 12px 40px;
  border-radius: 14px;
  color: #d4e4f2;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
}
.examples li::before {
  content: ""; position: absolute; left: 17px; top: 22px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px rgba(95, 214, 255, .7);
}

/* ---------- Account welcome pill (same as Toptext and Simple Soundboard) ---------- */
.welcome-pill {
  position: fixed;
  top: max(22px, env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 13px 19px 13px 13px;
  border-radius: 24px;
  background: rgba(29, 25, 43, 0.97);
  border: 1px solid rgba(205, 185, 245, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.4;
  color: #f8f5ff;
  opacity: 0;
  transform: translate(-50%, -90px) scale(0.88);
  filter: blur(5px);
  transition: transform 0.6s cubic-bezier(0.18, 1.35, 0.32, 1), opacity 0.4s ease, filter 0.4s ease;
  pointer-events: none;
}
.welcome-pill.visible { opacity: 1; transform: translate(-50%, 0) scale(1); filter: blur(0); }
.welcome-pill.leaving {
  opacity: 0;
  transform: translate(-50%, -35px) scale(0.95);
  filter: blur(3px);
  transition: transform 0.4s ease-in, opacity 0.4s ease-in, filter 0.4s ease-in;
}
.welcome-pill .brand-icon { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; margin-top: 2px; }
.welcome-pill .pill-content { min-width: 0; }
.welcome-pill .brand-name { color: #bcaed7; font-size: 11px; letter-spacing: -0.2px; font-weight: 700; }
.welcome-pill .message { font-size: 14px; font-weight: 650; letter-spacing: -0.3px; margin-top: 3px; overflow-wrap: anywhere; }
.welcome-pill .login-confirmation {
  display: flex; align-items: center; gap: 6px;
  margin-top: 9px;
  color: #b9b0cb; font-size: 11px; font-weight: 450; line-height: 1.4;
}
.welcome-pill .login-confirmation svg { width: 13px; height: 13px; flex-shrink: 0; color: #cdbaf1; }
.welcome-pill .check { color: #d1bafa; font-size: 17px; margin-left: 4px; margin-top: 7px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .welcome-pill, .welcome-pill.visible, .welcome-pill.leaving { transition: none; filter: none; transform: translate(-50%, 0); }
}

/* ---------- A page still being written ---------- */
/* The text cursor at the end of whatever is being written right now. */
.caret {
  display: inline-block;
  width: .55em; height: 1.05em;
  margin-left: 2px;
  vertical-align: -.16em;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(95, 214, 255, .6);
  animation: caret 1s ease-in-out infinite;
}
@keyframes caret { 50% { opacity: .25; } }

/* Sections that haven't started yet: soft shimmering lines where the text will go. */
.sec__wait { display: grid; gap: 12px; padding-top: 4px; }
.sec__wait .line { height: 14px; border-radius: 7px; }
.sec__wait .line:nth-child(1) { width: 96%; }
.sec__wait .line:nth-child(2) { width: 88%; }
.sec__wait .line:nth-child(3) { width: 62%; }
.sec--waiting h2 { color: var(--faint); }
.sec--waiting h2::before { opacity: .4; }

.writing {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--sky); font-size: 13px; font-weight: 600;
}
.writing .dots { margin-right: 0; }
.card__summary:empty { display: none; }

/* What went wrong, shown to the owner under an error. */
.notice__details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
}
.notice__details dt { color: var(--faint); font-weight: 600; }
.notice__details dd { color: var(--fg); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.notice > div { min-width: 0; flex: 1; }

/* The owner's "Override and look it up anyway" button under a declined search. */
.notice__action {
  margin-top: 12px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: var(--accent-shadow);
  color: #04203f;
  font-size: 14px;
  font-weight: 700;
  transition: transform .15s ease, opacity .15s ease;
}
.notice__action:hover { transform: translateY(-1px); }
.notice__action:active { transform: translateY(0); }
.notice__action:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- Edited text (public/js/content.js) ---------- */
.sec__body > * + * { margin-top: 14px; }
.sec__body strong { color: var(--fg); font-weight: 700; }
.rt-h1 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--fg); }
.rt-h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--fg); }
.sec__body > * + :is(.rt-h1, .rt-h2) { margin-top: 24px; }
.rt-quote { padding: 4px 0 4px 18px; border-left: 3px solid var(--cyan); color: var(--muted); font-style: italic; }
.rt-list:not(.examples) { padding-left: 1.4em; color: #d4e4f2; display: grid; gap: 6px; }
.rt-list:not(.examples) li::marker { color: var(--cyan); }

/* Redacted by an administrator. */
.removed {
  color: var(--danger);
  font-weight: 600;
  font-style: normal;
  white-space: normal;
  /* Wraps with the text, and breaks long words with a hyphen when a line has to cut. */
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 1px 7px;
  border-radius: 7px;
  background: rgba(255, 107, 107, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .25);
}
.removed__icon { width: 1em; height: 1em; margin-right: .35em; vertical-align: -.14em; color: var(--danger); }
.removed__start { white-space: nowrap; }

/* ---------- The owner's edit button and editor (public/js/editor.js) ---------- */
.article__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.edit-button, .chip-button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border: 0; border-radius: 999px;
  background: var(--glass-hi);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg); font-size: 14px; font-weight: 600;
  transition: background .15s ease;
}
.edit-button:hover, .chip-button:hover { background: rgba(220, 240, 255, .16); }
.edit-button .ico, .chip-button .ico { width: 16px; height: 16px; color: var(--cyan); }
.chip-button:disabled { opacity: .45; cursor: default; }
.save-button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border: 0; border-radius: 999px;
  background: var(--accent);
  box-shadow: var(--accent-shadow);
  color: #04203f; font-size: 14px; font-weight: 700;
}
.save-button .ico { width: 16px; height: 16px; }
.save-button:disabled { opacity: .5; cursor: default; box-shadow: none; }

.editor__bar {
  position: sticky; top: 10px; z-index: 30;
  display: grid; gap: 10px;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(8, 22, 40, .92);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--lift), inset 0 0 0 1px var(--line);
}
.editor__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor__badge { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.editor__badge .ico { width: 16px; height: 16px; }
.editor__actions { display: flex; gap: 8px; }
.editor__tools { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.editor__sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line); flex: none; }
.editor__hint { min-height: 0; color: var(--muted); font-size: 13px; }
.editor__hint:empty { display: none; }
.editor__status:empty { display: none; }
.editor__status { margin-bottom: 20px; }

.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; height: 36px; padding: 0 9px;
  border: 0; border-radius: 10px;
  background: transparent;
  color: var(--muted); font-size: 15px; font-weight: 700;
  flex: none;
  transition: background .15s ease, color .15s ease;
}
.tool:hover { background: var(--glass-hi); color: var(--fg); }
.tool.is-on { background: rgba(95, 214, 255, .18); color: var(--sky); box-shadow: inset 0 0 0 1px rgba(95, 214, 255, .35); }
.tool--italic span { font-style: italic; font-family: Georgia, serif; }
.tool--underline span { text-decoration: underline; }
.tool--strike span { text-decoration: line-through; }
.tool--danger { color: var(--danger); background: rgba(255, 107, 107, .08); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .25); padding: 0 12px; }
.tool--danger:hover { color: #ff8f8f; background: rgba(255, 107, 107, .16); }
.tool .ico { width: 17px; height: 17px; }

.edit-line { outline: none; border-radius: 8px; }
.edit-line:focus-visible, .rt:focus-visible { outline: none; }
.article--editing .article__title { padding: 4px 8px; margin: -4px -8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.article--editing .article__title:focus { box-shadow: inset 0 0 0 2px var(--cyan); }
.sec--edit h2 .edit-line { flex: 1; padding: 2px 6px; box-shadow: inset 0 0 0 1px transparent; }
.sec--edit h2 .edit-line:hover { box-shadow: inset 0 0 0 1px var(--line); }
.sec--edit h2 .edit-line:focus { box-shadow: inset 0 0 0 2px var(--cyan); }
.article__body--edit { max-width: 820px; }

.rt {
  min-height: 90px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
  color: #d4e4f2;
  outline: none;
  overflow-wrap: anywhere;
}
.rt:focus { box-shadow: inset 0 0 0 2px var(--cyan); }
.rt > * + * { margin-top: 12px; }
.rt > * + :is(h3, h4) { margin-top: 20px; }
.rt h3 { font-size: 21px; font-weight: 800; color: var(--fg); }
.rt h4 { font-size: 18px; font-weight: 700; color: var(--fg); }
.rt blockquote { padding-left: 16px; border-left: 3px solid var(--cyan); color: var(--muted); font-style: italic; }
.rt ul, .rt ol { padding-left: 1.4em; }
.rt li + li { margin-top: 4px; }
.rt strong, .rt b { color: var(--fg); }
.rt .removed { cursor: default; user-select: all; -webkit-user-select: all; }

/* Pictures */
.pics { display: grid; gap: 14px; margin-bottom: 28px; }
.pics__slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.pic { display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); align-content: start; }
.pic__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 700; }
.pic__hint { color: var(--faint); font-size: 13px; font-weight: 500; }
.pic__preview { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--well); }
.pic__preview .ph { width: 100%; height: 100%; }
.pic__img { width: 100%; height: 100%; object-fit: contain; }
.pic__broken { padding: 16px; color: var(--danger); font-size: 14px; text-align: center; }
.pic__fields { display: grid; gap: 8px; }
.pic__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.field {
  width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: 12px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14.5px;
  outline: none;
}
.field::placeholder { color: var(--faint); }
.field:focus { box-shadow: inset 0 0 0 2px var(--cyan); }

.picker { display: grid; gap: 12px; padding: 14px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.picker__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.picker__title { font-weight: 700; }
.picker__search { display: flex; gap: 8px; }
.picker__search .field { flex: 1; min-width: 0; }
.picker__results { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.picker__note { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.picker__item {
  display: grid; gap: 4px;
  padding: 6px;
  border: 0; border-radius: 14px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--faint); font-size: 12px; text-align: left;
}
.picker__item:hover { box-shadow: inset 0 0 0 2px var(--cyan); }
.picker__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: rgba(0, 0, 0, .3); }

@media (max-width: 560px) {
  .editor__bar { top: 6px; padding: 10px; border-radius: 16px; }
  .editor__actions .chip-button { padding-inline: 12px; }
  .article__foot { justify-content: stretch; }
  .article__foot > * { flex: 1; justify-content: center; }
}

/* "At a glance" in the editor */
.glance { margin-bottom: 28px; padding: 16px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.glance__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.glance__field { display: grid; gap: 6px; }
.glance__label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
