:root {
  color-scheme: light;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI Variable Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-head:-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --head-weight:700;
  --head-tracking:-.03em;
  --head-transform:none;
  --page-bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f6f7f9;
  --img-bg:#f3f4f6;
  --ink:#0b0d12;
  --muted:#5f6673;
  --line:#e7e8ec;
  --line-strong:#d5d8de;
  --accent:#4f46e5;
  --accent-soft:#eef0ff;
  --accent-line:#c7cbfb;
  --btn-bg:#4f46e5;
  --btn-ink:#ffffff;
  --btn-hover:#4338ca;
  --btn-border:#4f46e5;
  --btn-shadow:0 1px 2px rgba(79,70,229,.25);
  --quiet-bg:#ffffff;
  --quiet-ink:#0b0d12;
  --quiet-hover:#f4f5f7;
  --quiet-border:#dfe1e6;
  --danger:#c0362c;
  --danger-soft:#fdf1f0;
  --radius:12px;
  --radius-sm:8px;
  --radius-btn:8px;
  --border-w:1px;
  --shadow:0 1px 2px rgba(16,24,40,.04);
  --shadow-lg:0 24px 48px -20px rgba(16,24,40,.22),0 2px 6px rgba(16,24,40,.05);
  --shadow-hover:0 10px 24px -10px rgba(16,24,40,.2);
  --nav-bg:rgba(255,255,255,.8);
  --nav-line:#ececf0;
  --maxw:1120px;
  --pad-x:clamp(1rem,4vw,2rem);
  --section-gap:clamp(3.5rem,8vw,6rem);
  --eyebrow-color:var(--accent);
  --eyebrow-transform:none;
  --eyebrow-tracking:0;
  --eyebrow-size:.85rem;
  font-family: var(--font);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main {
  flex: 1;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-tracking);
  text-transform: var(--head-transform);
  line-height: 1.15;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: var(--accent);
  text-underline-offset: .18em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: -999px;
  top: .5rem;
}
.skip:focus {
  left: .5rem;
  z-index: 60;
  background: var(--surface);
  color: var(--ink);
  padding: .5rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: var(--border-w) solid var(--btn-border);
  border-radius: var(--radius-btn);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  padding: .6rem 1rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
  transition:
    background .15s,
    border-color .15s,
    box-shadow .15s,
    transform .15s,
    color .15s;
}
button:not(.quiet):not(.danger):hover,
.button:not(.quiet):hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
}
button.quiet,
.button.quiet {
  background: var(--quiet-bg);
  color: var(--quiet-ink);
  border-color: var(--quiet-border);
  box-shadow: none;
}
button.quiet:hover,
.button.quiet:hover {
  background: var(--quiet-hover);
}
button.danger {
  background: var(--quiet-bg);
  color: var(--danger);
  border-color: var(--quiet-border);
  box-shadow: none;
}
button.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}
button:disabled {
  opacity: .55;
  cursor: default;
}
button:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.danger {
  color: var(--danger);
}
label {
  display: grid;
  gap: .35rem;
  font-weight: 600;
  font-size: .92rem;
}
input,
textarea,
select {
  width: 100%;
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: .6rem .7rem;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
textarea {
  min-height: 6rem;
  resize: vertical;
}
.check {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 500;
}
.check input {
  width: auto;
}
fieldset {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  min-width: 0;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-line);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  flex: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  font-family: var(--font);
  letter-spacing: 0;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.nav-links a:hover,
.nav-links a[aria-current=page] {
  color: var(--ink);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
  min-width: 0;
}
.nav-actions button,
.nav-actions .button {
  padding: .45rem .85rem;
  font-size: .9rem;
}
.account {
  color: var(--muted);
  font-weight: 500;
  font-size: .9rem;
}
.account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 26ch;
}
.dev-badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
  margin-top: var(--section-gap);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.75rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}
.footer-brand .brand-mark {
  width: 22px;
  height: 22px;
  font-size: .7rem;
  border-radius: 6px;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex: 1;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
}
.legal-links {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.legal-links a {
  color: var(--muted);
  text-decoration: none;
}
.legal-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.legal-links span {
  opacity: .5;
}
.page-front .site-footer {
  font-size: .8rem;
}
.page-front .footer-inner {
  justify-content: center;
  padding-block: 1rem;
}
.page {
  padding-top: clamp(1.5rem, 4vw, 2.75rem);
}
.section {
  padding-top: var(--section-gap);
}
.eyebrow,
.kicker {
  margin: 0 0 .4rem;
  font-weight: 600;
  font-size: var(--eyebrow-size);
  color: var(--eyebrow-color);
  text-transform: var(--eyebrow-transform);
  letter-spacing: var(--eyebrow-tracking);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}
.section-heading.centered {
  justify-content: center;
  text-align: center;
  margin-bottom: 2rem;
}
.section-heading.centered h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}
.section-sub,
.page-sub {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: .6rem auto 0;
  max-width: 620px;
}
.panel {
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hint {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.dev-note {
  margin: .25rem 0 0;
  font-style: italic;
}
.empty-copy {
  color: var(--muted);
}
.state {
  min-height: 1.5rem;
  margin: .75rem 0;
  font-weight: 500;
}
.state:empty {
  min-height: 0;
  margin: 0;
}
.state.error {
  color: var(--danger);
}
.empty {
  padding: clamp(2.5rem, 7vw, 4.5rem) 2rem;
  text-align: center;
}
.empty h2,
.signin h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  margin: .4rem 0 1rem;
}
.warning {
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  background: var(--accent-soft);
  line-height: 1.5;
  color: var(--ink);
  font-size: .92rem;
}
.notice {
  border-left: 3px solid var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  background: var(--surface-2);
  line-height: 1.5;
  color: var(--ink);
  font-size: .92rem;
  margin: 0;
}
.usage {
  font-weight: 500;
  color: var(--muted);
  font-size: .9rem;
}
.tag {
  display: inline-block;
  padding: .18rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
}
.tag.pin {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.badges {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  left: 50%;
  top: 5rem;
  transform: translate(-50%, -.5rem);
  max-width: min(440px, 90vw);
  background: var(--ink);
  color: var(--page-solid,#fff);
  padding: .7rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  opacity: 0;
  transition: .2s;
  pointer-events: none;
  text-align: center;
  z-index: 50;
  font-weight: 500;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.meme-card {
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .6rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.meme-card img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  display: block;
  background: var(--img-bg);
  border-radius: calc(var(--radius) - 5px);
}
.feature {
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.captions {
  font-weight: 600;
  margin: .7rem .2rem .2rem;
  line-height: 1.4;
}
.meme-meta {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin: .6rem .2rem .2rem;
}
.actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.actions button,
.download-link {
  padding: .4rem .65rem;
  font-size: .84rem;
  white-space: nowrap;
}
.download-link {
  display: inline-flex;
  align-items: center;
  border: var(--border-w) solid var(--quiet-border);
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 600;
  color: var(--quiet-ink);
  background: var(--quiet-bg);
}
.download-link:hover {
  background: var(--quiet-hover);
}
.meme-vote-bar {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
.meme-vote-bar button {
  padding: .45rem .7rem;
  font-size: .9rem;
  line-height: 1;
}
.meme-vote-bar button[aria-pressed=true] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  align-items: start;
}
.history-grid .meme-card {
  transition: box-shadow .15s, transform .15s;
}
.history-grid .meme-card:hover {
  box-shadow: var(--shadow-hover);
}
.history-grid .meme-card img {
  aspect-ratio: 4/3;
}
.history-grid .captions {
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
}
.history-grid .meme-meta {
  flex-direction: column;
  align-items: stretch;
}
.history-grid .meme-vote-bar button,
.history-grid .actions button,
.history-grid .download-link {
  padding: .35rem .5rem;
  font-size: .78rem;
}
img.enlargeable {
  cursor: zoom-in;
}
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 8vw, 6rem) 0 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(
      90deg,
      var(--line) 1px,
      transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image:
    radial-gradient(
      ellipse 70% 60% at 50% 0%,
      #000 20%,
      transparent 75%);
  mask-image:
    radial-gradient(
      ellipse 70% 60% at 50% 0%,
      #000 20%,
      transparent 75%);
  opacity: .7;
}
.front-top {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  padding: 1rem var(--pad-x);
}
.signin-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .92rem;
}
.signin-link:hover {
  color: var(--ink);
  text-decoration: underline;
}
.hero-inner {
  text-align: center;
}
.hero-copy {
  max-width: 780px;
  margin: 0 auto;
}
.hero-headline {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.02;
}
.hero-headline {
  text-wrap: balance;
}
.hero-headline .hl {
  color: var(--accent);
  white-space: nowrap;
}
.hero-cta {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.hero-cta .button {
  padding: .75rem 1.3rem;
  font-size: 1rem;
}
.hero-sub {
  margin: 1.1rem auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  line-height: 1.45;
  text-wrap: balance;
}
.hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.tag svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.hero-visual {
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  max-width: 720px;
}
.hero .meme-card {
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.hero .meme-card:hover {
  transform: translateY(-2px);
}
.hero-topic-name {
  margin: .75rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}
.hero-topic-name::before {
  content: "From ";
}
.hero-topic-name a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.hero-topic-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.topic-tile {
  display: flex;
  flex-direction: column;
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition:
    transform .18s,
    box-shadow .18s,
    border-color .18s;
}
.topic-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}
.topic-tile img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--img-bg);
  display: block;
  border-bottom: 1px solid var(--line);
}
.topic-tile-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--img-bg);
}
.topic-tile-name {
  margin: 0;
  padding: .85rem 1rem;
  font-weight: 600;
  font-size: .98rem;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
}
.topic-tile-name::after {
  content: "→";
  color: var(--muted);
  transition: transform .18s, color .18s;
  flex: none;
  white-space: nowrap;
}
.topic-tile:hover .topic-tile-name::after {
  transform: translateX(3px);
  color: var(--accent);
}
.grid-section .empty-copy {
  text-align: center;
}
.invite-box {
  max-width: 600px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}
.invite-box h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}
.invite-line {
  color: var(--muted);
  line-height: 1.5;
  margin: .6rem auto 1.4rem;
  max-width: 30rem;
}
.invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.invite-form input {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
}
.invite-form button {
  flex: none;
}
.turnstile {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  min-height: 65px;
}
.turnstile:empty {
  display: none;
}
.invite-box .notice {
  margin-top: .9rem;
  text-align: left;
}
.agree {
  margin: .6rem 0 0;
  font-size: clamp(.68rem, 2.9vw, .78rem);
  line-height: 1.4;
  color: var(--muted);
}
@media (max-width: 520px) {
  .invite-box {
    padding-inline: 1rem;
  }
}
.agree a {
  color: inherit;
  text-decoration: underline;
}
.agree a:hover {
  color: var(--ink);
}
.signin .agree {
  margin: -.75rem 0 1rem;
}
.invite-signin {
  margin: 1.75rem 0 .6rem;
  color: var(--muted);
  font-size: .9rem;
}
.google-button {
  min-height: 44px;
  margin: 1rem 0 0;
}
.invite-box .google-button {
  display: flex;
  justify-content: center;
  margin: 0;
}
.page-header {
  text-align: center;
  padding: clamp(1rem, 4vw, 2.5rem) 0 clamp(1.5rem, 4vw, 2.25rem);
}
.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
}
.stage {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(.75rem, 2.5vw, 1.25rem);
}
.stage .feature {
  box-shadow: none;
  border: 0;
  padding: 0;
  max-width: none;
}
.stage .captions {
  text-align: center;
}
.stage-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.stage-controls #public-next {
  margin-left: auto;
  padding: .65rem 1.4rem;
}
.stage-note {
  max-width: 760px;
  margin: 1rem auto 0;
  text-align: center;
  font-size: .84rem;
}
.page-stream .history {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}
.page-stream .page {
  padding-top: .5rem;
}
.page-stream .page-header {
  padding: .5rem 0 1.25rem;
}
.page-stream .history-grid .meme-card {
  cursor: zoom-in;
}
.meme-peek {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  max-width: min(480px, 45vw);
  background: var(--surface,#fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .5rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .25);
}
.meme-peek img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.signin {
  max-width: 560px;
  margin: clamp(2rem, 8vh, 5rem) auto;
  padding: clamp(1.75rem, 5vw, 3rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.signin .google-button {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}
.email-signin {
  margin: 1.5rem 0 1.75rem;
  text-align: left;
}
.email-signin label {
  display: block;
  font-weight: 600;
  margin: 0 0 .4rem;
}
.email-signin-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.email-signin-row input {
  flex: 1 1 14rem;
  min-width: 0;
}
.email-signin-sent {
  margin: 1.5rem 0 1rem;
}
.email-signin-sent h3 {
  margin: 0 0 .5rem;
}
.invite-box #front-signin {
  margin: 0 0 .6rem;
}
body.in-app .site-footer {
  display: none;
}
.app-nav {
  padding-inline: 1.25rem;
  max-width: none;
}
.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  background:
    linear-gradient(
      to right,
      var(--surface-2) 247px,
      var(--line) 247px,
      var(--line) 248px,
      transparent 248px);
}
.side-menu {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.1rem .75rem 1rem;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 0 .35rem .5rem;
}
.side-head h2 {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
button.small,
.small {
  padding: .35rem .65rem;
  font-size: .82rem;
}
.side-topics {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#topic-list .topic-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: 0;
  font-weight: 500;
  font-size: .92rem;
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: .5rem .6rem;
}
#topic-list .topic-link:hover {
  background: #eceef2;
}
#topic-list .topic-link[aria-current=true] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 0 0 1px var(--line);
}
.topic-link-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-public {
  flex: none;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .08rem .4rem;
  border-radius: 999px;
  background: #e7f6ec;
  color: #17693a;
}
.side-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.side-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 0;
  box-shadow: none;
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem .6rem;
  border-radius: var(--radius-sm);
}
button.side-link:not(.quiet):not(.danger):hover {
  background: #eceef2;
}
button.side-link[aria-current=true] {
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 0 0 1px var(--line);
}
.side-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.side-foot {
  margin: auto 0 0;
  padding: 1rem .6rem 0;
  font-size: .8rem;
  color: var(--muted);
}
.side-foot a {
  color: var(--muted);
  text-decoration: none;
}
.side-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  flex: none;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle span::before {
  top: -6px;
}
.menu-toggle span::after {
  top: 6px;
}
.menu-scrim {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(10, 12, 16, .35);
  z-index: 14;
}
.app-main {
  min-width: 0;
  width: 100%;
  max-width: 1120px;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3.5vw, 2.5rem) 3rem;
}
.card {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 1.25rem;
}
.card-head {
  margin-bottom: 1.1rem;
}
.card-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
.card-head h3,
.list-title {
  margin: 0;
  font-size: 1.05rem;
}
.card-head .hint {
  margin: .35rem 0 0;
  max-width: 62ch;
}
.card-head.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.card-head.row > button {
  flex: none;
}
.list-title {
  margin-top: 1.5rem;
}
.form-card {
  display: grid;
  gap: 1.1rem;
}
.form-card label {
  max-width: 680px;
}
.form-card label.narrow {
  max-width: 320px;
}
.field {
  display: grid;
  gap: .35rem;
  max-width: 680px;
}
.field-label {
  font-weight: 600;
  font-size: .92rem;
}
.form-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}
.subject-list {
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.subject-list li {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.subject-list input {
  flex: 1;
  min-width: 0;
  font-size: .92rem;
}
.suspects-suggestion {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  justify-content: space-between;
  margin: -.35rem 0 .25rem;
  max-width: 680px;
}
.suspects-suggestion .field-hint {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.suspects-suggestion-list {
  margin: .2rem 0 0;
  padding-left: 1.1rem;
}
.subject-list:empty {
  display: none;
}
.add-subject {
  justify-self: start;
}
.fold {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .7rem .9rem;
  max-width: 680px;
}
.fold summary {
  font-weight: 600;
  cursor: pointer;
}
.fold[open] summary {
  margin-bottom: .6rem;
}
.fold-note {
  font-weight: 500;
  color: var(--muted);
  font-size: .88rem;
}
.danger-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-color: #f1d4d1;
}
.danger-zone h3 {
  margin: 0;
  font-size: 1.05rem;
}
.danger-zone .hint {
  margin: .3rem 0 0;
}
.danger-zone button {
  flex: none;
}
.inline-form {
  display: grid;
  gap: .9rem;
  max-width: 560px;
  margin-bottom: 1rem;
}
.row-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: 560px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.switch-row h3 {
  margin: 0;
  font-size: 1.05rem;
}
.switch-row .hint {
  margin: .3rem 0 0;
  max-width: 56ch;
}
.admin-view > .card:last-child {
  margin-bottom: 0;
}
.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}
.topic-title-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.topic-title-row h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  min-width: 0;
  overflow-wrap: anywhere;
}
.status-pill {
  flex: none;
  padding: .15rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
button.status-pill:not(.quiet):not(.danger):hover {
  background: var(--quiet-hover);
  border-color: var(--line-strong);
}
button.status-pill.is-public {
  background: #e7f6ec;
  color: #17693a;
  border-color: #b7e2c5;
}
button.status-pill.is-public:not(.quiet):not(.danger):hover {
  background: #dcf2e3;
  border-color: #9fd6b1;
}
.tabs,
.agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  padding: .6rem .85rem;
  margin-bottom: -1px;
  font-weight: 600;
}
button.tab:not(.quiet):not(.danger):hover {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  border-bottom-color: var(--line-strong);
}
button.tab[aria-selected=true],
button.tab[aria-selected=true]:not(.quiet):not(.danger):hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
#public-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .7rem .3rem .4rem;
  border-radius: 999px;
  background: var(--quiet-bg);
  color: var(--muted);
  border: 1px solid var(--quiet-border);
  box-shadow: none;
  font-size: .85rem;
  font-weight: 600;
}
#public-switch:hover {
  background: var(--quiet-hover);
  border-color: var(--line-strong);
}
.switch-track {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .15s;
}
.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s;
}
#public-switch[aria-checked=true] {
  color: #17693a;
  border-color: #b7e2c5;
  background: #f1faf4;
}
#public-switch[aria-checked=true]:hover {
  background: #e7f6ec;
  border-color: #9fd6b1;
}
#public-switch[aria-checked=true] .switch-track {
  background: #22a05a;
}
#public-switch[aria-checked=true] .switch-knob {
  transform: translateX(12px);
}
.page-owner .generator .feature {
  margin-top: 1.25rem;
}
#generate-form {
  display: grid;
  gap: .6rem;
}
#generate-form .hint {
  margin: 0;
}
#empty-topic {
  margin-bottom: 1.25rem;
}
.setting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: .9rem;
  margin: 1rem 0;
}
.secret {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem;
  margin: 1rem 0;
}
.secret p {
  margin: 0 0 .5rem;
}
.secret-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .4rem;
  align-items: center;
}
.secret-row a {
  font-weight: 600;
  padding: 0 .4rem;
}
.key-list {
  padding: 0;
  list-style: none;
}
.key-list li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: .55rem 0;
}
.template-preview {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: .5rem 0;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}
.template-preview img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.template-box {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(79, 70, 229, .15);
  box-sizing: border-box;
}
.template-box span {
  position: absolute;
  top: -1.3rem;
  left: 0;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  padding: 0 .2rem;
  border-radius: 3px;
}
#template-boxes li {
  align-items: center;
}
#template-boxes input[type=text] {
  width: auto;
  flex: 1;
  min-width: 0;
}
#template-boxes button {
  flex: none;
}
.field-hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: .78rem;
  margin-top: .15rem;
}
#template-search {
  margin: .6rem 0;
}
.template-check {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .35rem 0;
}
.template-thumb {
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--img-bg);
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 2rem;
}
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.lightbox button {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}
.confirm-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  max-width: min(420px, 90vw);
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.confirm-dialog p {
  margin: 0 0 1rem;
  font-weight: 500;
  line-height: 1.4;
}
.confirm-dialog .actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    background: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .side-menu {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: min(280px, 84vw);
    height: auto;
    z-index: 15;
    transform: translateX(-102%);
    transition: transform .2s;
    box-shadow: none;
  }
  .app.menu-open .side-menu {
    transform: none;
    box-shadow: 0 20px 40px rgba(16, 24, 40, .25);
  }
  .setting-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-inner {
    gap: .75rem;
    min-height: 58px;
  }
  .account-email {
    display: none;
  }
  .history-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .footer-links {
    flex: none;
  }
}
@media (max-width: 520px) {
  .setting-grid,
  .history-grid {
    grid-template-columns: 1fr;
  }
  .page-stream .history-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-stream .history-grid .captions {
    display: none;
  }
  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .topic-tile-name {
    padding: .6rem .7rem;
    font-size: .88rem;
  }
  .topic-tile-name::after {
    display: none;
  }
  .secret-row {
    grid-template-columns: 1fr 1fr;
  }
  .secret-row input {
    grid-column: 1/-1;
  }
  .actions button {
    flex: 1;
  }
  .meme-card {
    padding: .45rem;
  }
  .stage-controls {
    justify-content: center;
  }
  .stage-controls #public-next {
    margin-left: 0;
    width: 100%;
  }
  .meme-vote-bar {
    justify-content: center;
    width: 100%;
  }
  .hero-cta {
    flex-direction: column;
    max-width: 320px;
    margin-inline: auto;
  }
  .hero-cta .button {
    white-space: nowrap;
  }
  .brand-name {
    font-size: .98rem;
  }
  .nav-actions {
    gap: .45rem;
  }
  .nav-actions button {
    white-space: nowrap;
  }
  .dev-badge {
    font-size: .6rem;
    padding: .15rem .4rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    max-width: 9rem;
  }
  .footer-inner {
    justify-content: center;
    text-align: center;
  }
  .danger-zone,
  .card-head.row {
    flex-direction: column;
    align-items: stretch;
  }
  .card-head.row > button,
  .danger-zone button {
    align-self: flex-start;
  }
  .row-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .row-form button {
    justify-self: start;
  }
  .app-nav {
    padding-inline: .75rem;
  }
  .tab {
    padding: .6rem .7rem;
  }
}
.page-owner .nav-inner {
  min-height: 64px;
}
.meme-frame {
  position: relative;
  width: min(100%, calc(560px * var(--meme-ratio,10)));
  margin-inline: auto;
}
.meme-controls {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 2;
  display: flex;
  gap: .35rem;
  opacity: 0;
  transition: opacity .15s;
}
.meme-frame:hover .meme-controls,
.meme-controls:focus-within {
  opacity: 1;
}
.meme-frame button.meme-control {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  backdrop-filter: blur(4px);
}
.meme-frame button.meme-control:hover {
  background: #fff;
  border-color: var(--accent-line);
  color: var(--accent);
}
.meme-frame button.meme-control[aria-pressed=true] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.meme-frame button.meme-control:disabled {
  opacity: .6;
}
.meme-control svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meme-controls.meme-controls-bottom {
  top: auto;
  bottom: .6rem;
}
.meme-controls[hidden],
.meme-improve[hidden],
.meme-confirm[hidden] {
  display: none;
}
.meme-frame button.meme-control-create {
  background: #f6c343;
  border-color: #d9a21b;
  color: #3d2c00;
}
.meme-frame button.meme-control-create:hover {
  background: #ffd35c;
  border-color: #b98700;
  color: #2a1e00;
}
.meme-frame button.meme-control-delete {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.meme-frame button.meme-control-delete:hover {
  background: #ef4444;
  border-color: #991b1b;
  color: #fff;
}
.meme-confirm {
  display: grid;
  gap: .5rem;
  margin-top: .6rem;
  padding: .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  text-align: left;
}
.meme-confirm p {
  margin: 0;
}
.meme-improve {
  display: grid;
  gap: .5rem;
  margin-top: .6rem;
  padding: .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
}
.meme-improve-fields {
  display: grid;
  gap: .45rem;
}
.meme-improve-line {
  display: grid;
  gap: .2rem;
  font-size: .85rem;
  color: var(--muted);
}
.meme-improve-line input {
  width: 100%;
  box-sizing: border-box;
  font-size: .95rem;
  color: var(--ink);
}
.meme-improve-error {
  margin: 0;
  padding: .45rem .6rem;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  font-size: .88rem;
  color: var(--ink);
}
.meme-improve-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}
.meme-frame.is-editing img {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}
.improvement-list {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.improvement-group h4 {
  margin: 0 0 .4rem;
  font-size: .95rem;
  text-transform: capitalize;
}
.improvement-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.improvement {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .75rem;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
}
.improvement p {
  margin: 0;
  grid-column: 1;
}
.improvement button {
  grid-column: 2;
  grid-row: 1/span 2;
}
.improvement-was {
  font-size: .85rem;
  color: var(--muted);
}
.version-list {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.version {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .75rem;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
}
.version p {
  margin: 0;
  grid-column: 1;
}
.version button {
  grid-column: 2;
  grid-row: 1/span 2;
}
.version-what {
  font-weight: 600;
}
@media (hover: none) {
  .meme-controls {
    position: static;
    opacity: 1;
    justify-content: flex-end;
    gap: .4rem;
    margin-top: .5rem;
  }
  .meme-frame button.meme-control {
    width: 34px;
    height: 34px;
    box-shadow: none;
  }
  .meme-control svg {
    width: 15px;
    height: 15px;
  }
  .meme-controls:not(.meme-controls-bottom) + .meme-controls-bottom {
    justify-content: flex-start;
    width: fit-content;
    margin-top: -34px;
  }
}
body.page-embed {
  margin: 0;
  background: var(--page-bg);
}
.embed {
  box-sizing: border-box;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .5rem;
}
.embed-meme {
  flex: 0 1 auto;
  min-height: 0;
  margin: auto 0;
}
.page-embed .meme-frame {
  width: min(calc(100vw - 1rem), calc((100vh - 4.75rem) * var(--meme-ratio,1)));
}
.page-embed .meme-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: var(--img-bg);
}
.embed-status {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
}
.embed-status[hidden] {
  display: none;
}
.embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  max-width: 560px;
}
.embed-credit {
  font-size: .75rem;
  color: var(--muted);
}
.embed-card textarea {
  width: 100%;
  box-sizing: border-box;
  font-family:
    ui-monospace,
    Consolas,
    monospace;
  font-size: .8rem;
}
.embed-card .embed-key {
  border-top: 1px solid var(--line);
  padding-top: .75rem;
  margin-top: .75rem;
}
.embed-card .embed-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: .5rem 0;
}
.embed-card .embed-checks label {
  display: flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.embed-card .embed-checks input[type=checkbox] {
  width: auto;
  margin: 0;
}
.embed-card .embed-cap {
  width: 6rem;
}
.embed-card .embed-note {
  font-size: .85rem;
  color: var(--muted);
}
.blocked-memes {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
}
.blocked-memes h3 {
  margin-top: 0;
  color: var(--danger);
}
.blocked-list {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: grid;
  gap: .6rem;
}
.blocked-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
}
.blocked-list p {
  margin: .15rem 0;
}
.blocked-list .why {
  font-weight: 600;
  color: var(--danger);
}
.refusal {
  margin: .25rem 0;
  padding: .6rem .8rem;
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--danger-soft);
  color: var(--ink);
  font-size: .92rem;
}
.refusal[hidden] {
  display: none;
}
.safety-admin h3 {
  margin: 1.25rem 0 .4rem;
  font-size: 1rem;
}
.safety-admin .safety-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.safety-admin .violation-list li span {
  font-size: .9rem;
}
.safety-history {
  max-height: 22rem;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .75rem;
  font-size: .78rem;
}
.subscribe-open {
  margin-top: 1rem;
}
.sub-dialog {
  border: var(--border-w) solid var(--line);
  width: min(440px, 92vw);
  padding: 1.4rem;
  color: var(--ink);
}
.sub-dialog::backdrop {
  background: rgba(16, 24, 40, .45);
}
.sub-dialog h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}
.sub-dialog form {
  display: grid;
  gap: .9rem;
}
.sub-dialog .hint {
  margin: 0;
}
.sub-dialog fieldset {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: .55rem .8rem;
}
.sub-dialog legend {
  font-weight: 600;
  font-size: .92rem;
  padding: 0 .25rem;
}
.sub-dialog label.radio {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 500;
}
.sub-dialog label.radio input {
  width: auto;
  margin: 0;
}
.sub-dialog .state {
  margin: 0;
}
.sub-dialog .actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
}
.sub-card {
  max-width: 560px;
  margin: clamp(1rem, 5vw, 3rem) auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}
.sub-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.sub-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.sub-actions:not(:has(:not([hidden]))) {
  display: none;
}
.agent-panel h3 {
  margin: 1.1rem 0 .4rem;
  font-size: 1rem;
}
.agent-panel p {
  margin: .4rem 0;
}
.agent-code {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem 4.5rem .8rem .8rem;
  margin: .5rem 0 .9rem;
  font-family:
    ui-monospace,
    Consolas,
    monospace;
  font-size: .8rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.agent-code button {
  position: absolute;
  top: .4rem;
  right: .4rem;
  padding: .25rem .6rem;
  font-size: .8rem;
}
.agent-note {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
}
.agent-next {
  font-weight: 600;
}
