/* ============ Theme ============ */
:root {
  --bg: #f6f1e8;
  --surface: #fffcf6;
  --ink: #2a2420;
  --ink-soft: #3f3731;
  --muted: #85796b;
  --line: #e5dacb;
  --accent: #9c4f35;
  --accent-ink: #fff8f0;
  --accent-soft: rgba(156, 79, 53, 0.09);
  --glow: rgba(214, 150, 96, 0.22);
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.05), 0 10px 30px rgba(60, 40, 20, 0.07);

  --display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif: "Lora", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --poem-scale: 1;
  --maxw: 44rem;
  --radius: 18px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111319;
  --surface: #181b24;
  --ink: #ece5d8;
  --ink-soft: #d6cdbf;
  --muted: #968e83;
  --line: #2a2e3a;
  --accent: #e4a57e;
  --accent-ink: #1a1410;
  --accent-soft: rgba(228, 165, 126, 0.1);
  --glow: rgba(120, 110, 200, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* soft light glows + paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(48rem 34rem at 92% -8%, var(--glow), transparent 62%),
    radial-gradient(40rem 32rem at -12% 105%, var(--accent-soft), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

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

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

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.5s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.6rem;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  min-width: 0;
}
.brand-mark { width: 1.35rem; height: 1.35rem; color: var(--accent); flex: none; }
.brand-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav { display: flex; align-items: center; gap: 0.15rem; flex: none; }
.nav a {
  font-family: var(--sans);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}
.icon-btn:hover { color: var(--ink); background: var(--accent-soft); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* reading progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.progress.on { opacity: 1; }
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ============ Main ============ */
main { flex: 1; padding-bottom: 3rem; }

.page-enter { animation: pageIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; margin: 0; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn svg { width: 1.05rem; height: 1.05rem; }

/* ============ Home ============ */
.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.hero h1 {
  font-size: clamp(3rem, 13vw, 5rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero .tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0.75rem 0 1.75rem;
}
.hero-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background-color 0.5s, border-color 0.5s;
}

.daily {
  position: relative;
  padding: 1.9rem 1.6rem 1.6rem;
  margin: 0.5rem 0 3rem;
  overflow: hidden;
}
.daily::before {
  content: "\201C";
  position: absolute;
  right: 1rem;
  top: -1.6rem;
  font-family: var(--display);
  font-size: 9rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  pointer-events: none;
}
.daily h2 { font-size: 2rem; }
.daily h2 a { text-decoration: none; }
.daily .byline { margin: 0.35rem 0 1.1rem; }
.excerpt {
  margin: 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.8;
}
.excerpt span { display: block; }
.more-link {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.more-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.byline { font-family: var(--sans); font-size: 0.88rem; color: var(--muted); }
.byline strong { color: var(--ink-soft); font-weight: 500; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.9rem; }
.count { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }

.search {
  position: relative;
  margin-bottom: 0.9rem;
}
.search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem 0 2.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px; /* prevents iOS zoom */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, background-color 0.5s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }

.chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.9rem;
  margin: 0 -1.25rem 0.6rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 1.05rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.poem-list { list-style: none; margin: 0; padding: 0; }
.poem-list li { border-top: 1px solid var(--line); }
.poem-list li:last-child { border-bottom: 1px solid var(--line); }
.poem-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  padding: 1.1rem 0.25rem;
  text-decoration: none;
  transition: padding 0.25s ease, background-color 0.25s;
}
.poem-item:hover { padding-left: 0.75rem; }
.pi-title { font-family: var(--display); font-size: 1.45rem; font-weight: 500; line-height: 1.2; }
.pi-first {
  grid-column: 1;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-meta { grid-column: 1; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.pi-side { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.pi-side svg { width: 1.1rem; height: 1.1rem; }
.pi-side .saved-dot { color: var(--accent); }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-style: italic;
}
.empty .btn { margin-top: 1rem; font-style: normal; }

/* ============ Poem page ============ */
.poem { padding-top: 1.5rem; }
.back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0;
}
.back:hover { color: var(--ink); }
.back svg { width: 1rem; height: 1rem; }

.poem-head { text-align: center; padding: 2rem 0 2.25rem; }
.poem-head h1 {
  font-size: clamp(2.3rem, 9vw, 3.4rem);
  font-weight: 500;
  text-wrap: balance;
}
.poem-head .byline { margin-top: 0.9rem; font-size: 0.95rem; }
.poem-tags { display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.poem-tags a {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

.poem-body {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: calc(clamp(0.97rem, 4.05vw, 1.12rem) * var(--poem-scale));
  line-height: 1.9;
  color: var(--ink-soft);
  transition: font-size 0.25s ease;
}
.stanza { margin: 0 0 1.7em; }
.stanza:last-child { margin-bottom: 0; }
.line {
  display: block;
  white-space: pre-wrap;
  padding-left: 1.5em;
  text-indent: -1.5em;
  animation: lineIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}
@keyframes lineIn {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

.ornament {
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.7;
  margin: 2.5rem 0 1.75rem;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1 1 0;
  min-width: 0;
  max-width: 5.2rem;
  padding: 0.7rem 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background-color 0.5s;
}
.action:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-1px); }
.action svg { width: 1.3rem; height: 1.3rem; }
.action.is-saved { color: var(--accent); border-color: var(--accent); }
.action.is-saved svg path { fill: currentColor; }
.action.pop svg { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.pager a:hover { border-color: var(--muted); transform: translateY(-1px); }
.pager .next { text-align: right; }
.pager small { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pager span { font-family: var(--display); font-size: 1.15rem; line-height: 1.25; }
.swipe-hint { text-align: center; font-family: var(--sans); font-size: 0.75rem; color: var(--muted); margin-top: 1rem; }
@media (hover: hover) { .swipe-hint { display: none; } }

/* ============ About ============ */
.about { max-width: 34rem; margin: 0 auto; padding-top: 3rem; text-align: center; }
.about h1 { font-size: clamp(2.6rem, 10vw, 3.6rem); font-style: italic; margin-bottom: 1.5rem; }
.about p { font-size: 1.08rem; line-height: 1.85; color: var(--ink-soft); }
.about .btn { margin-top: 1.25rem; }
.stats { display: flex; justify-content: center; gap: 2.5rem; margin: 2.5rem 0 0.5rem; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-size: 2.4rem; font-weight: 500; line-height: 1; }
.stats span { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 0.4rem; }

/* ============ Footer ============ */
.site-footer { padding: 2rem 0 calc(2.5rem + env(safe-area-inset-bottom)); text-align: center; }
.footer-inner p { margin: 0.25rem 0; }
.footer-ornament { color: var(--accent); opacity: 0.6; font-size: 1.2rem; }
.insta { font-family: var(--sans); font-size: 0.9rem; font-weight: 500; text-decoration: none; color: var(--ink-soft); }
.insta:hover { color: var(--accent); }
.fine { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  z-index: 60;
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Story-card modal ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(10, 8, 6, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: min(22rem, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  color: #f3ece0;
  text-align: center;
}
.modal-box img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  -webkit-touch-callout: default;
}
.modal-box p { margin: 0; font-family: var(--sans); font-size: 0.82rem; opacity: 0.85; }
.modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.modal .btn { color: var(--ink); }
.modal .btn.primary { color: var(--accent-ink); }
.modal-close { color: #f3ece0; }

.noscript { text-align: center; padding: 4rem 1rem; font-style: italic; }

/* ============ Small screens ============ */
@media (max-width: 460px) {
  .nav a[data-nav="home"] { display: none; }
}
@media (max-width: 380px) {
  .nav a { padding: 0 0.5rem; font-size: 0.8rem; }
  .brand-name { font-size: 1.25rem; }
}

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

/* ============ Phone polish ============ */
a, button, input, textarea, label, .chip { touch-action: manipulation; }

/* no sticky hover effects on touch screens */
@media (hover: none) {
  .btn:hover, .action:hover, .pager a:hover { transform: none; }
  .poem-item:hover { padding-left: 0.25rem; }
  .nav a:hover, .chip:hover, .icon-btn:hover { color: inherit; }
  .chip:hover { color: var(--muted); border-color: var(--line); }
  .chip[aria-pressed="true"]:hover { color: var(--bg); border-color: var(--ink); }
}
.poem-item:active, .pager a:active { background: var(--accent-soft); }

.modal-box img { max-height: 62dvh; }

/* ============ Reader notes ============ */
.note { padding: 1.5rem 1.25rem 1.35rem; margin: 2.5rem 0 0; }
.note h2 { font-size: 1.65rem; font-style: italic; }
.note-sub { color: var(--muted); font-size: 0.95rem; margin: 0.4rem 0 1rem; }
.note textarea {
  display: block;
  width: 100%;
  min-height: 6.5rem;
  resize: vertical;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px; /* 16px stops iPhone from zooming in */
  line-height: 1.55;
  -webkit-appearance: none;
  appearance: none;
}
.note textarea:focus, .handle-field:focus-within { outline: none; border-color: var(--accent); }
.note-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.handle-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  height: 2.9rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-family: var(--sans);
  color: var(--muted);
}
.handle-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
}
.handle-field input::placeholder, .note textarea::placeholder { color: var(--muted); opacity: 0.8; }
.note .btn[disabled] { opacity: 0.6; }
.note-hint { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); margin: 0.7rem 0 0; }
.note-hint a, .fine a { color: inherit; text-underline-offset: 2px; }
.note-done p { margin: 0.25rem 0 0; font-style: italic; color: var(--accent); font-size: 1.05rem; }
.about-note { max-width: 34rem; margin: 1rem auto 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ Privacy ============ */
.privacy { max-width: 34rem; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.privacy h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.privacy p { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin: 0.5rem 0; }

/* ============ Phone reading bar ============ */
.readbar { display: none; }
@media (max-width: 700px) {
  .readbar:not([hidden]) {
    position: fixed;
    left: 50%;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: var(--shadow);
    transform: translate(-50%, 0);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.35s;
  }
  .readbar.tucked { transform: translate(-50%, calc(100% + 1.5rem)); opacity: 0; pointer-events: none; }
  .rb-btn {
    display: grid;
    place-items: center;
    width: 50px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
  }
  .rb-btn:active { background: var(--accent-soft); }
  .rb-btn svg { width: 22px; height: 22px; }
  .rb-btn.is-saved { color: var(--accent); }
  .rb-btn.is-saved svg path { fill: currentColor; }
  body.on-poem .site-footer { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  body.on-poem .toast { bottom: calc(5.4rem + env(safe-area-inset-bottom)); }
  .swipe-hint { margin-bottom: 0; }
}

/* ============ "Who's reading?" card ============ */
.hello {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 26rem;
  margin: 0 auto;
  padding: 1.15rem 1.1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transform: translateY(calc(100% + 2rem));
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hello.show { transform: none; }
.hello-title { font-family: var(--display); font-size: 1.4rem; font-weight: 500; margin: 0 2rem 0.2rem 0; line-height: 1.2; }
.hello-sub { font-size: 0.92rem; color: var(--muted); margin: 0 0 0.8rem; line-height: 1.5; }
.hello-form { display: flex; gap: 0.5rem; }
.hello-x { position: absolute; top: 0.4rem; right: 0.4rem; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.hello-skip { display: block; margin: 0.2rem auto 0; min-height: 40px; padding: 0 1rem; border: 0; background: none; color: var(--muted); font-family: var(--sans); font-size: 0.8rem; cursor: pointer; }

/* ============ Owner page ============ */
.owner { max-width: 34rem; margin: 0 auto; padding-top: 2.5rem; }
.owner h1 { font-size: 2.6rem; font-style: italic; margin-bottom: 1.25rem; }
.owner-card { padding: 1.25rem; margin-bottom: 1rem; }
.owner-card h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.owner-card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.9rem; }
.owner-card a { color: var(--accent); }
.owner-form { display: flex; gap: 0.5rem; }
.owner-out { margin: 0.9rem 0 0 !important; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--accent-soft); color: var(--ink) !important; font-family: var(--sans); font-size: 0.85rem !important; word-break: break-all; user-select: all; }
