/* Nameless Verse
   Layout: one centered column. Poems are cards in a feed, like posts with no profiles.
   Motif: the byline. Where an author's name would go, a blurred one. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #15161a;
  --muted: #636977;
  --line: #e1e4ea;
  --accent: #2f55ff;          /* cobalt: actions, links, focus */
  --on-accent: #ffffff;
  --accent-soft: rgba(47, 85, 255, 0.1);
  --alert: #cf2539;
  --heart: #f2295b;
  --heart-soft: rgba(242, 41, 91, 0.1);
  --glass: rgba(244, 245, 247, 0.8);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --verse: "Newsreader", Georgia, "Times New Roman", serif;
  --measure: 40rem;
  color-scheme: light;
}

/* Dark: follows the device, unless a page sets data-theme to choose. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1015;
    --surface: #171a21;
    --ink: #eef0f5;
    --muted: #959bab;
    --line: #272b36;
    --accent: #8098ff;
    --on-accent: #0e1015;
    --accent-soft: rgba(128, 152, 255, 0.14);
    --alert: #ff7d8c;
    --heart: #ff5c85;
    --heart-soft: rgba(255, 92, 133, 0.14);
    --glass: rgba(14, 16, 21, 0.78);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1015;
  --surface: #171a21;
  --ink: #eef0f5;
  --muted: #959bab;
  --line: #272b36;
  --accent: #8098ff;
  --on-accent: #0e1015;
  --accent-soft: rgba(128, 152, 255, 0.14);
  --alert: #ff7d8c;
  --heart: #ff5c85;
  --heart-soft: rgba(255, 92, 133, 0.14);
  --glass: rgba(14, 16, 21, 0.78);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
}
.skip:focus { top: 1rem; }

.mode-banner {
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--accent-soft);
  font-size: 0.85rem;
  text-align: center;
}

/* ── Header ──────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: calc(var(--measure) + 2rem);
  margin-inline: auto;
  padding: 0.75rem 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }

.mark {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #b8c6ff, #2f55ff 58%, #6b3dff);
  filter: blur(1.2px);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-header nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
}
.site-header nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}
.site-header nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.site-header nav a.nav-cta {
  margin-left: 0.25rem;
  background: var(--accent);
  color: var(--on-accent);
}
.site-header nav a.nav-cta:hover { filter: brightness(1.08); }

main {
  max-width: calc(var(--measure) + 2rem);
  margin-inline: auto;
  padding: 0 1rem 5rem;
}

.site-footer {
  max-width: calc(var(--measure) + 2rem);
  margin-inline: auto;
  padding: 0 1rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 1rem;
  font-weight: 600;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* ── The blurred byline ──────────────────────────────── */

.avatar {
  --h: 228;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%,
    hsl(var(--h) 95% 84%),
    hsl(calc(var(--h) + 22) 85% 62%) 60%,
    hsl(calc(var(--h) + 44) 80% 54%));
  filter: blur(0.6px);
}

.hidden-name {
  display: inline-block;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: 0.04em;
  filter: blur(5px);
  user-select: none;
}

/* ── Home ────────────────────────────────────────────── */

.hero { padding: clamp(3rem, 10vw, 6rem) 0 clamp(2.5rem, 7vw, 4rem); }

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 4.75rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-byline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero-byline .avatar { width: 2.25rem; height: 2.25rem; }
.hero-byline .hidden-name {
  font-size: 1.2rem;
  animation: dissolve 1.8s cubic-bezier(0.5, 0, 0.2, 1) 0.5s both;
}
@keyframes dissolve {
  from { filter: blur(0); }
  to { filter: blur(6px); }
}

.lede {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.section-title {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}

.status {
  margin: 0;
  color: var(--muted);
}
.status:empty { display: none; }

/* ── Poems ───────────────────────────────────────────── */

.feed {
  display: grid;
  gap: 1rem;
}

.poem {
  min-width: 0;
  padding: clamp(1.25rem, 4.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.poem-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
}
.poem-byline {
  min-width: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.poem-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.poem-title {
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.poem-title a { color: inherit; }
.poem-title a:hover {
  color: var(--accent);
  text-decoration: none;
}
.poem-title.untitled {
  color: var(--muted);
  font-weight: 600;
}

.poem-body {
  font-family: var(--verse);
  font-size: 1.15rem;
  line-height: 1.7;
}
.poem-body .line {
  min-height: 1.7em;            /* keeps blank lines as stanza breaks */
  padding-left: 1.5em;          /* long lines wrap with a hanging indent */
  text-indent: -1.5em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.poem-body.clamped {
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}

.poem-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.chip-link:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

/* Reactions: ♥ I love this, ✎ write back */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.react {
  --tone: var(--muted);
  --tone-soft: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.75rem 0.35rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.react-love { --tone: var(--heart); --tone-soft: var(--heart-soft); }
.react-write { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.react svg {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.react-count:empty { display: none; }
.react:hover {
  background: var(--tone-soft);
  color: var(--tone);
  text-decoration: none;
}
.react[aria-pressed="true"] {
  background: var(--tone-soft);
  color: var(--tone);
}
.react[aria-pressed="true"] svg { fill: currentColor; }
.react.pop svg { animation: react-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes react-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Read-only counts, for My poems and the mod queue */
.react-stats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
}
.react-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--tone, var(--muted));
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.react-stat.react-love { --tone: var(--heart); }
.react-stat.react-write { --tone: var(--accent); }
.react-stat svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.react-stat.react-write svg { fill: none; stroke-width: 2; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  max-width: calc(100% - 2rem);
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* A poem's own page: no card, larger type. */
.poem-page { padding-top: clamp(2.5rem, 7vw, 4rem); }
.poem-page-status { padding-top: clamp(2.5rem, 7vw, 4rem); }
.poem-page .poem {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.poem-page .poem-title {
  order: -1;
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 7vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.poem-page .poem-head { margin-bottom: 1.75rem; }
.poem-page .poem-body { font-size: 1.25rem; }
.poem-page .poem-foot { margin-top: 1.75rem; }
.poem-page .react { font-size: 0.95rem; min-height: 2.5rem; padding-inline: 0.8rem 1rem; border: 1px solid var(--line); background: var(--surface); }
.poem-page .react:hover,
.poem-page .react[aria-pressed="true"] { border-color: transparent; background: var(--tone-soft); }
.poem-page .react svg { width: 1.3rem; height: 1.3rem; }

/* ── Forms and buttons ───────────────────────────────── */

.page-head { padding: clamp(2.5rem, 7vw, 4rem) 0 1.75rem; }
.page-head h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.page-head p {
  max-width: 32rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.panel {
  padding: clamp(1.25rem, 4.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.field { margin: 0 0 1.5rem; }

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}
.field > .hint { margin: -0.2rem 0 0.6rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder,
textarea::placeholder { color: var(--muted); opacity: 0.8; }

.poem-input {
  min-height: 18rem;
  resize: vertical;
  font-family: var(--verse);
  font-size: 1.15rem;
  line-height: 1.7;
}

.counter {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.counter.near { color: var(--alert); }

.byline-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}
.byline-preview .avatar { width: 1.6rem; height: 1.6rem; }
.byline-preview .poem-byline { font-weight: 650; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rules {
  margin: 2rem 0 1.75rem;
  padding: 1.1rem 1.25rem 1rem;
  border-radius: 16px;
  background: var(--bg);
}
.rules h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}
.rules ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}
.rules li + li { margin-top: 0.2rem; }
.rules .hint { margin: 0; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 1rem;
  font-weight: 500;
}
.check input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

.send-note { margin: 0 0 0.75rem; }

/* Cloudflare's spam check. Usually invisible; it only takes space when it asks for a click. */
.captcha {
  max-width: 100%;
  margin: 0.25rem 0 1rem;
}
.captcha:empty { display: none; }
.send-note + .button,
.send-note + .send-note + .button { margin-top: 0.75rem; }

.form-error {
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--alert) 12%, transparent);
  color: var(--alert);
  font-weight: 650;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover {
  filter: brightness(1.08);
  text-decoration: none;
}
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.55; cursor: progress; }
.button.quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.button.quiet:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}
.button.danger {
  border-color: var(--line);
  background: var(--surface);
  color: var(--alert);
}
.button.danger:hover { border-color: var(--alert); filter: none; }
.button.danger[data-armed="true"] {
  border-color: var(--alert);
  background: var(--alert);
  color: var(--surface);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.sent h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.sent h2:focus { outline: none; }
.sent p { max-width: 30rem; color: var(--muted); }
.sent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ── Share ───────────────────────────────────────────── */

.share { margin-top: 3rem; }
.share h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.share h3 {
  margin: 1.75rem 0 0.3rem;
  font-size: 1rem;
  font-weight: 650;
}
.share .hint { margin: 0 0 1rem; }

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}
.share-status {
  color: var(--muted);
  font-size: 0.95rem;
}
.link-field {
  margin-top: 0.9rem;
  font-size: 0.9rem;
}

.cards-status { margin-top: 1.1rem; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
  gap: 1.25rem 1rem;
  margin-top: 1.25rem;
}
.cards[data-format="story"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); }
.cards-share {
  grid-column: 1 / -1;
  margin: 0;
}
.card { margin: 0; }
.card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card figcaption { margin-top: 0.6rem; }
.card .button {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.back { margin: 2rem 0 0; }

/* ── Write-backs ─────────────────────────────────────── */

.writebacks { margin-top: 3rem; }
.writebacks h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.wb-count {
  min-width: 1.6em;
  padding: 0.05em 0.5em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}
.wb-count:empty { display: none; }

.wb-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.wb {
  min-width: 0;
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.wb-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}
.wb-head .avatar { width: 1.5rem; height: 1.5rem; }
.wb-body {
  font-family: var(--verse);
  font-size: 1.06rem;
  line-height: 1.6;
}
.wb-body .line {
  min-height: 1.6em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wb-form h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.wb-input {
  min-height: 8rem;
  resize: vertical;
  font-family: var(--verse);
  font-size: 1.06rem;
  line-height: 1.6;
}
.wb-note { margin: 0 0 1rem; }
.wb-prompt p,
.wb-sent p { margin: 0; }
.wb-sent .link-button { margin-top: 0.6rem; }

/* ── Leaderboard ─────────────────────────────────────── */

.period-note {
  margin: -0.4rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.board {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-row {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.9rem;
  padding: 1rem 1.1rem 1rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.rank {
  color: var(--muted);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.podium .rank { color: var(--ink); font-size: 2rem; }
.board-row[data-rank="1"] .rank { color: var(--accent); }

.board-main { min-width: 0; }

.board-reacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.board-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-title:hover { color: var(--accent); text-decoration: none; }
.board-title.untitled { color: var(--muted); font-weight: 600; }

.board-line {
  margin: 0.2rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--verse);
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-by {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
}
.board-by .avatar { width: 1.3rem; height: 1.3rem; }
.board-by .poem-byline { font-weight: 650; }
.board-when {
  margin-left: 0.35rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Account ─────────────────────────────────────────── */

.site-header nav a.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nav-account-dot {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}
.nav-account.signed-in .nav-account-dot {
  --h: 228;
  border: 0;
  opacity: 1;
  background: radial-gradient(circle at 30% 28%,
    hsl(var(--h) 95% 84%),
    hsl(calc(var(--h) + 22) 85% 62%) 60%,
    hsl(calc(var(--h) + 44) 80% 54%));
}

.page-status { padding-top: clamp(2.5rem, 7vw, 4rem); }

.auth-alt { margin: 1.1rem 0 0; }
.auth-note {
  max-width: 26rem;
  margin: 1.25rem 0 0;
}
.signed-in-note { margin: 0 0 1.25rem; }

.notice {
  max-width: 30rem;
  margin-top: clamp(2.5rem, 7vw, 4rem);
}
.notice h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.notice h1:focus { outline: none; }
.notice p { color: var(--muted); }

.mine-section {
  margin: 3rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.mine-summary {
  margin: -0.5rem 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.mine-summary:empty { display: none; }
.mine-note { margin: 2rem 0 0; }
.mine-why { margin: 0.9rem 0 0; }

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
}
.status-pill.approved {
  background: var(--accent-soft);
  color: var(--accent);
}

.empty {
  display: grid;
  justify-items: start;
  gap: 1rem;
}
.empty p { margin: 0; color: var(--muted); }

/* ── Mod queue ───────────────────────────────────────── */

.narrow-form { max-width: 26rem; }

.mod-who {
  color: var(--muted);
  font-size: 0.95rem;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.tabs button {
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.count {
  display: inline-block;
  min-width: 1.45em;
  margin-left: 0.35rem;
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.queue {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.mod-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.wb-on a { font-weight: 650; }

/* The auto mod's verdict on a poem, for mods. */
.mod-auto {
  margin: -0.35rem 0 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.45;
}
.mod-auto strong { font-weight: 650; }
.mod-auto.held { background: var(--heart-soft); }
.kind-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0.75rem;
}
.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* ── Small screens and motion ────────────────────────── */

@media (max-width: 30rem) {
  .site-header nav a { padding: 0.4rem 0.6rem; }
  .site-header nav a.nav-read { display: none; }   /* the logo already goes home */
  .site-header nav a.nav-prompt { display: none; } /* on phones: the home page card and footer link */
  .site-header nav a.nav-top { display: none; }    /* on phones: in the footer, so Play fits */
  .cta-extra { display: none; }                    /* "Submit" fits on one line */
  .nav-account-label { display: none; }            /* just the dot on phones */
  .site-header nav a.nav-account { padding-inline: 0.55rem; }
  .site-header nav { gap: 0.15rem; }
  .wordmark { font-size: 1.02rem; }
  .board-row {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.25rem 0.7rem;
    padding: 0.85rem 0.85rem 0.85rem 0.7rem;
  }
  .rank { font-size: 1.35rem; }
  .board-reacts {
    flex-direction: column;
    align-items: stretch;
  }
  .board-reacts .react { justify-content: center; }
  .podium .rank { font-size: 1.6rem; }
  .poem-body,
  .poem-input { font-size: 1.08rem; }
  .poem-page .poem-body { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-byline .hidden-name { animation: none; filter: blur(6px); }
  .react.pop svg { animation: none; }
  .toast { transition: none; }
  .button { transition: none; }
}


/* ── Weekly prompt ───────────────────────────────────── */

.eyebrow {
  display: block;
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* On a poem: the prompt it answers */
.poem-prompt {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  max-width: 100%;
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.poem-prompt:hover { color: var(--accent); text-decoration: none; }
.poem-prompt-label {
  flex: none;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.poem-prompt-text { overflow-wrap: anywhere; }

/* Home page card */
.home-prompt {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
}
.home-prompt:hover { border-color: var(--accent); text-decoration: none; }
.home-prompt-wording {
  font-family: var(--verse);
  font-size: clamp(1.35rem, 4.5vw, 1.7rem);
  font-style: italic;
  line-height: 1.25;
}
.home-prompt-cta { color: var(--accent); font-size: 0.92rem; font-weight: 650; }

/* Prompt page */
.prompt-hero { padding: clamp(2.75rem, 8vw, 4.5rem) 0 clamp(2rem, 6vw, 3rem); }
.prompt-wording {
  margin: 0.6rem 0 0;
  font-family: var(--verse);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.prompt-dates { margin: 0.9rem 0 0; color: var(--muted); }
#past-prompts { margin-top: 3rem; }
.past-prompts {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.past-prompts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.past-prompt {
  color: var(--ink);
  font-family: var(--verse);
  font-size: 1.15rem;
  font-style: italic;
}
.past-prompt:hover { color: var(--accent); }
.past-date { color: var(--muted); font-size: 0.85rem; }

/* Submit page: answering the prompt */
.prompt-choice {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--accent-soft);
}
.prompt-choice .hint { margin: 0.5rem 0 0 1.85rem; }

/* ── Reports ─────────────────────────────────────────── */

.poem-foot .poem-report { margin-left: auto; }
.poem-report {
  min-height: 2.15rem;
  border: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}
.poem-report svg {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.poem-report:not(:has(.poem-report-label:not([hidden]))) { padding-inline: 0.55rem; }
.poem-report:hover { background: var(--heart-soft); color: var(--alert); }
.poem-report.reported { color: var(--alert); }
.poem-report.reported svg { fill: currentColor; }

.report-dialog {
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(1.25rem, 5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.report-dialog::backdrop { background: rgba(10, 12, 18, 0.55); }
.report-dialog h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.report-dialog h2:focus { outline: none; }
.report-dialog .hint { margin: 0 0 1rem; }
.report-reasons {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}
.report-reasons legend { margin-bottom: 0.45rem; font-weight: 650; }
.report-reason {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
}
.report-reason:hover { background: var(--bg); }
.report-reason input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.report-danger {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--heart-soft);
  font-size: 0.95rem;
}
.report-note { min-height: 5rem; resize: vertical; }
.report-dialog .field { margin-bottom: 1rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.report-done p { margin: 0 0 1rem; color: var(--muted); }
.report-done .report-danger { color: var(--ink); }

/* Mod queue: open reports on a poem */
.mod-reports {
  margin: -0.35rem 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--heart-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}
.mod-reports p { margin: 0; }
.mod-reports strong { font-weight: 700; }
.mod-report-notes { margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.mod-danger { margin-top: 0.35rem !important; color: var(--alert); font-weight: 700; }
.mod-reports + .mod-auto { margin-top: 0; }

/* Mod page: weekly prompts */
.prompts-admin { margin-top: 0.5rem; }
.prompt-form h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.prompt-form > .hint { margin: 0 0 1.25rem; }
.prompts-admin > .status { margin: 1.25rem 0 0.75rem; }
.prompt-admin-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prompt-admin-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.prompt-admin-meta { margin: 0; color: var(--muted); font-size: 0.85rem; }
.prompt-admin-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
}
.prompt-admin-badge.this-week { background: var(--accent-soft); color: var(--accent); }
.prompt-admin-wording {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--verse);
  font-size: 1.2rem;
  font-style: italic;
}
.button.small { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

/* ── About, Privacy, Terms ───────────────────────────── */

.doc section { margin: 0 0 2.25rem; }
.doc h2 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.doc p,
.doc li { max-width: 38rem; line-height: 1.6; }
.doc p { margin: 0 0 0.85rem; }
.doc ul { margin: 0 0 0.85rem; padding-left: 1.2rem; }
.doc li { margin-bottom: 0.45rem; }
.doc-date { font-size: 0.9rem !important; }

/* Submit page: while the auto mod checks a new poem */
.sent.checking #sent-heading::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.5rem;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: 0.05em;
  animation: nv-spin 0.8s linear infinite;
}
@keyframes nv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sent.checking #sent-heading::after { animation-duration: 2.4s; }
}

/* Submit page: a guest's private delete link */
.delete-link {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.delete-link h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.delete-link .hint { margin: 0 0 0.8rem; }
.delete-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.delete-link-row input {
  flex: 1 1 14rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

/* Delete page (remove.html) */
.remove-panel .remove-label { margin: 0 0 0.6rem; font-weight: 650; }
.remove-preview {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}
.remove-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.remove-title.untitled { color: var(--muted); font-weight: 600; }
.remove-line {
  margin: 0.3rem 0 0;
  font-family: var(--verse);
  font-size: 1.1rem;
  font-style: italic;
}
.remove-line:empty { display: none; }
.remove-message { min-height: 1.4em; margin: 0.5rem 0 0; color: var(--alert); font-weight: 600; }
.remove-message:empty { min-height: 0; margin: 0; }

/* ── Little moments ──────────────────────────────────── */

/* Heart burst: a ring and a few small hearts when a poem gets a love */
.react-love { position: relative; }
.heart-burst {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}
.heart-burst::before {
  content: "";
  position: absolute;
  left: -0.95rem;
  top: -0.95rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 2px solid var(--heart);
  border-radius: 50%;
  opacity: 0;
  animation: heart-ring 0.55s ease-out;
}
.heart-bit {
  position: absolute;
  left: -0.3rem;
  top: -0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--heart);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5c-.3 0-.6-.1-.8-.3C7.4 16.9 3 13.3 3 8.9 3 6.1 5.1 4 7.7 4c1.7 0 3.2.9 4.3 2.3C13.1 4.9 14.6 4 16.3 4 18.9 4 21 6.1 21 8.9c0 4.4-4.4 8-8.2 11.3-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5c-.3 0-.6-.1-.8-.3C7.4 16.9 3 13.3 3 8.9 3 6.1 5.1 4 7.7 4c1.7 0 3.2.9 4.3 2.3C13.1 4.9 14.6 4 16.3 4 18.9 4 21 6.1 21 8.9c0 4.4-4.4 8-8.2 11.3-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  animation: heart-fly 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes heart-ring {
  0% { transform: scale(0.3); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes heart-fly {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) rotate(calc(var(--a) * -1)) scale(0.3); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(calc(var(--a) * -1)) scale(var(--s)); }
}

/* Gentle reveal: a poem's lines come into focus one by one, the first time it's opened */
.poem-body.reveal .line { animation: line-in 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
@keyframes line-in {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .heart-burst { display: none; }
  .poem-body.reveal .line { animation: none; }
}

/* ── Swipe mode (swipe.html): one poem per screen ────── */

.swipe-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.swipe-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 1rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
}
.swipe-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.75rem;
  padding: 0 0.85rem 0 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
}
.swipe-back:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.swipe-back svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.swipe-count {
  min-width: 4.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
main.swipe-deck {
  position: relative;
  flex: 1 1 auto;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  touch-action: manipulation;        /* no double-tap zoom: double-tap means love */
  outline: none;
}
.swipe-status { max-width: var(--measure); margin: 0 auto; padding: 3rem 1rem; color: var(--muted); }
.swipe-card {
  position: relative;
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.25rem 1.25rem 4.25rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: radial-gradient(120% 60% at 50% 0%, hsl(var(--h, 228) 90% 62% / 0.09), transparent 72%);
  overflow: hidden;
}
.swipe-card + .swipe-card { border-top: 1px solid var(--line); }
.swipe-card > .poem {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.swipe-card .poem-title {
  font-size: clamp(1.9rem, 6.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.swipe-card .poem-body { font-size: 1.3rem; }
.swipe-card .poem-foot { margin-top: 1.75rem; }
.swipe-card .react {
  min-height: 2.75rem;
  padding-inline: 0.85rem 1.05rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.95rem;
}
.swipe-card .react:hover,
.swipe-card .react[aria-pressed="true"] { border-color: transparent; background: var(--tone-soft); }
.swipe-card .react svg { width: 1.3rem; height: 1.3rem; }
.poem-body.pre-reveal .line { opacity: 0; }

.swipe-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s;
}
.swipe-hint.gone { opacity: 0; }
.swipe-chevron {
  width: 0.7rem;
  height: 0.7rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  animation: swipe-nudge 1.6s ease-in-out infinite;
}
@keyframes swipe-nudge {
  0%, 100% { transform: translateY(4px) rotate(45deg); }
  50% { transform: translateY(-3px) rotate(45deg); }
}

.big-heart {
  position: absolute;
  z-index: 5;
  width: 6rem;
  height: 6rem;
  margin: -3rem 0 0 -3rem;
  background: var(--heart);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5c-.3 0-.6-.1-.8-.3C7.4 16.9 3 13.3 3 8.9 3 6.1 5.1 4 7.7 4c1.7 0 3.2.9 4.3 2.3C13.1 4.9 14.6 4 16.3 4 18.9 4 21 6.1 21 8.9c0 4.4-4.4 8-8.2 11.3-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5c-.3 0-.6-.1-.8-.3C7.4 16.9 3 13.3 3 8.9 3 6.1 5.1 4 7.7 4c1.7 0 3.2.9 4.3 2.3C13.1 4.9 14.6 4 16.3 4 18.9 4 21 6.1 21 8.9c0 4.4-4.4 8-8.2 11.3-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  animation: big-heart 0.95s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes big-heart {
  0% { opacity: 0; transform: scale(0.2) rotate(-10deg); }
  15% { opacity: 0.95; transform: scale(1.18) rotate(-8deg); }
  30% { transform: scale(0.96) rotate(-8deg); }
  65% { opacity: 0.9; transform: translateY(-8px) scale(1) rotate(-8deg); }
  100% { opacity: 0; transform: translateY(-44px) scale(0.9) rotate(-8deg); }
}

.swipe-end { text-align: center; }
.swipe-end-inner { max-width: 26rem; margin-inline: auto; }
.swipe-end h2 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.swipe-end p { color: var(--muted); }
.swipe-end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 30rem) {
  .swipe-wordmark-text { display: none; }
  .swipe-card .poem-body { font-size: 1.18rem; }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-chevron { animation: none; }
  .big-heart { animation: big-heart-calm 0.8s ease-out forwards; }
}
@keyframes big-heart-calm {
  0% { opacity: 0; }
  25% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ── Magnet poems (magnets.html) ─────────────────────── */

.fridge {
  position: relative;
  height: clamp(14rem, 40vh, 26rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, var(--bg)), var(--surface) 30%),
    var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 60%, transparent), inset 0 -12px 24px -18px rgba(20, 22, 26, 0.18);
  overflow: hidden;
  touch-action: pan-y;
}
.fridge-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}
.fridge-dock {
  position: sticky;
  top: var(--header-h, 3.5rem);
  z-index: 5;
  margin: 0 -1rem;
  padding: 0.5rem 1rem 0.75rem;
  background: var(--bg);
}
.magnets-page .page-head { padding: clamp(1.5rem, 5vw, 3rem) 0 1rem; }

.magnet-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}
.tray-note { margin: 0.6rem 0 0; font-size: 0.875rem; }
.tray .tile { scroll-margin-top: calc(var(--header-h, 3.5rem) + var(--dock-h, 20rem) + 0.5rem); }
@media (min-width: 48rem) {
  .tray { max-height: 16rem; overflow-y: auto; }   /* big screens: words and fridge side by side in view */
}

.tile {
  padding: 0.38rem 0.55rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--verse);
  font-size: 1.08rem;
  line-height: 1.05;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(20, 22, 26, 0.05), 0 2px 5px rgba(20, 22, 26, 0.08);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.12s, box-shadow 0.12s;
}
.tile:hover { border-color: var(--accent); }
.tile.prompt-word { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent); }
.tile-punct,
.tile-suffix { padding-inline: 0.45rem; color: var(--muted); }
.tile.on-board {
  position: absolute;
  left: 0;
  top: 0;
  cursor: grab;
  touch-action: none;
  transform: rotate(var(--r, 0deg));
}
.tile.on-board.dragging {
  cursor: grabbing;
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 6px 18px rgba(20, 22, 26, 0.18);
  transition: none;
}
.tile.on-board.landed { animation: tile-land 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes tile-land {
  0% { transform: rotate(var(--r, 0deg)) scale(0.6); opacity: 0; }
  100% { transform: rotate(var(--r, 0deg)) scale(1); opacity: 1; }
}

.reads-as { margin-top: 1.75rem; }
.reads-as h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.reads-as-text:empty { display: none; }
.reads-as .sent-actions { margin-top: 1.25rem; }

@media (pointer: coarse) {
  .tile { padding: 0.55rem 0.7rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tile.on-board.landed { animation: none; }
  .tile { transition: none; }
}

.magnet-nudge { margin: 0.35rem 0 0; font-size: 0.875rem; }

/* ── School tags ─────────────────────────────────────── */

.poem-head { flex-wrap: wrap; row-gap: 0.4rem; }
.poem-school {
  display: inline-block;
  max-width: 14rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poem-school:hover { text-decoration: none; filter: brightness(0.95); }
.school-head h1 { overflow-wrap: anywhere; }
.school-head .eyebrow { margin-bottom: 0.5rem; }

/* ── Weekly games (play.html, missing.html, sort.html, fridge.html) ── */

:root {
  /* Stanza Sort stanzas, easiest to trickiest: apricot, rose, cobalt, ink.
     Warm and light for the easy ones, the site's own cobalt and ink for the hard ones. */
  --lvl-1: #ffc9a0;
  --lvl-2: #ffaec3;
  --lvl-3: var(--accent);
  --lvl-4: var(--ink);
  --lvl-ink: #15161a;
  --lvl-3-ink: var(--on-accent);
  --lvl-4-ink: var(--bg);
  --right: #1d8a4e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --right: #6fd69a; }
}
:root[data-theme="dark"] { --right: #6fd69a; }

.eyebrow a { color: inherit; }

/* Play page */
.game-cards {
  display: grid;
  gap: 0.9rem;
}
.game-card {
  position: relative;
  display: grid;
  gap: 0.3rem;
  padding: 1.25rem 5.5rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.game-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.game-card-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.game-card-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.game-card-text { color: var(--muted); font-size: 0.95rem; }
.game-card-status {
  justify-self: start;
  margin-top: 0.45rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}
.game-card-status:empty { display: none; }
.game-card.done .game-card-status { background: var(--accent-soft); color: var(--accent); }
.game-card.done .game-card-status::before { content: "✓ "; }
/* A little picture of each game, top right. */
.game-card::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 12px;
}
.game-card[data-game="missing"]::after {
  content: "_ _";
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--verse);
  font-size: 1.4rem;
  font-weight: 600;
}
.game-card[data-game="sort"]::after {
  background:
    linear-gradient(90deg, var(--lvl-1) 0 47%, transparent 47% 53%, var(--lvl-2) 53%) top / 100% 47% no-repeat,
    linear-gradient(90deg, var(--lvl-3) 0 47%, transparent 47% 53%, var(--lvl-4) 53%) bottom / 100% 47% no-repeat;
  border-radius: 8px;
}
.game-card[data-game="fridge"]::after {
  content: "moon";
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  font-family: var(--verse);
  font-size: 1.05rem;
  box-shadow: 0 2px 5px rgba(20, 22, 26, 0.1);
  transform: rotate(-4deg);
}
.play-note { margin: 1.25rem 0 0; }

/* Shared game page parts */
.game-head { padding: clamp(1.5rem, 5vw, 3rem) 0 1.25rem; }
.game-head h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.game-how { max-width: 34rem; margin: 0.75rem 0 0; color: var(--muted); }
.game-message { min-height: 1.55em; margin: 0.9rem 0 0; font-weight: 650; text-align: center; }
.game-done {
  margin-top: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.game-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0.25rem 0 0.9rem; }
.game-stats { margin: 0; font-weight: 650; text-wrap: balance; }
.game-done .hint { margin: 0.3rem 0 0; }
.game-cta { margin: 1.25rem 0 0; text-align: center; }

/* The Missing Word */
.mw-line {
  margin: 0.25rem 0 1rem;
  font-family: var(--verse);
  font-size: clamp(1.15rem, 4.4vw, 1.6rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.mw-row { display: block; }
.mw-blank {
  display: inline-block;
  min-width: 4.5rem;
  margin: 0 0.1em;
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.mw-word { padding: 0 0.15em; border-radius: 6px; font-weight: 600; }
.mw-word.won { background: color-mix(in srgb, var(--right) 16%, transparent); color: var(--right); }
.mw-word.lost { background: color-mix(in srgb, var(--alert) 12%, transparent); color: var(--alert); }
.mw-hints {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.mw-hints:empty, .mw-guesses:empty { display: none; }
.mw-hints li {
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 0.95rem;
}
.mw-hints li::before { content: "Hint: "; color: var(--accent); font-weight: 700; }
.mw-guesses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.mw-guess {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}
.mw-guess.wrong { color: var(--muted); }
.mw-guess.wrong span:last-child { text-decoration: line-through; }
.mw-guess.right { border-color: var(--right); color: var(--right); }
.mw-form { display: flex; gap: 0.5rem; }
.mw-form input { flex: 1; min-width: 0; }
.mw-form .button { flex: none; }
.mw-source { margin: 0 0 0.9rem; color: var(--muted); font-family: var(--verse); font-style: italic; }

/* Stanza Sort */
.ss-solved { display: grid; gap: 0.45rem; }
.ss-solved:not(:empty) { margin-bottom: 0.45rem; }
.ss-group {
  display: grid;
  place-items: center;
  gap: 0.1rem;
  min-height: 4.4rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  color: var(--lvl-ink);
  text-align: center;
  animation: ss-in 0.3s ease-out;
}
.ss-group.lvl-1 { background: var(--lvl-1); }
.ss-group.lvl-2 { background: var(--lvl-2); }
.ss-group.lvl-3 { background: var(--lvl-3); color: var(--lvl-3-ink); }
.ss-group.lvl-4 { background: var(--lvl-4); color: var(--lvl-4-ink); }
.ss-group-name { font-size: 0.95rem; font-weight: 750; }
/* Words read like a quoted line of verse: moon / star / comet / planet */
.ss-group-words { font-family: var(--verse); font-size: 1.05rem; font-style: italic; word-spacing: 0.05em; }
@keyframes ss-in { from { transform: scale(0.96); opacity: 0.4; } }
.ss-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
.ss-tile {
  min-height: 4.4rem;
  padding: 0.4rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--verse);
  font-size: clamp(0.84rem, 3.7vw, 1.1rem);
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s, background-color 0.12s, border-color 0.12s;
}
.ss-tile:hover { border-color: var(--accent); }
.ss-tile[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.ss-tile:active { transform: scale(0.96); }
.ss-tile.ss-right { animation: ss-hop 0.35s ease-out; }
.ss-tile.ss-wrong { animation: ss-shake 0.4s ease-in-out; }
@keyframes ss-hop { 40% { transform: translateY(-6px); } }
@keyframes ss-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.ss-left {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.ss-dots { display: inline-flex; gap: 0.45rem; padding-top: 0.15rem; }
/* Each mistake left is a drop of ink; a used one dries to the line color. */
.ss-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 0 50% 50% 50%;
  background: var(--ink);
  transform: rotate(45deg);
  transition: background-color 0.3s;
}
.ss-dot.used { background: var(--line); }
.ss-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0.9rem 0 0; }
.ss-actions .button:disabled { cursor: not-allowed; }

/* Weekly Fridge */
.magnets-page .page-head .eyebrow { margin: 0 0 0.35rem; color: var(--accent); font-size: 0.8rem; }
.page-head .df-mine { margin: 0.6rem 0 0; color: var(--accent); font-size: 0.95rem; font-weight: 650; }
.df-feed { margin-top: 2.5rem; }
.fridge-note { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--accent); }

@media (max-width: 30rem) {
  .game-board { padding: 1rem 0.85rem; }
  .game-card { padding-right: 4.75rem; }
  .game-card::after { right: 1rem; width: 2.8rem; height: 2.8rem; }
  .ss-grid { gap: 0.35rem; }
  .ss-tile { min-height: 4rem; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .ss-tile { transition: none; }
  .ss-group, .ss-tile.ss-right, .ss-tile.ss-wrong { animation: none; }
}

/* ── A guest's private poem page (yours.html) ── */
.yours-status { margin: 0.9rem 0 0; color: var(--muted); }
.yours-counts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0.9rem 0 0; color: var(--muted); }
.yours-count strong { color: var(--ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.yours-keep { margin-top: 1.75rem; }
.yours-keep .hint { margin: 0 0 0.5rem; }
.wb.wb-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.wb-new-tag {
  margin-left: 0.5rem;
  padding: 0.08em 0.55em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

/* ── Response emails setting (account page) ── */
.email-prefs { margin: 0 0 1.75rem; }
.email-prefs h2 { margin: 0 0 0.75rem; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.email-prefs .hint { margin: 0.6rem 0 0; }
.email-status { font-weight: 650; color: var(--ink); }
.email-status:empty { display: none; }
