/* Poetio — direction "Quiet". Tokens from design_handoff_poetio/README.md */
:root {
  --bg: #f4f4f2;
  --surface: #fbfbf9;
  --card: #fff;
  --ink: #17181a;
  --text-2: #5b5e63;
  --text-3: #8b8e94;
  --fill: #f1f2f3;
  --fill-hover: #e6e7e9;
  --nav-active: #ecece9;
  --tile: #f3f3f1;
  --hairline: rgba(0,0,0,.06);
  --outline: rgba(0,0,0,.08);
  --outline-strong: rgba(0,0,0,.14);
  --accent: oklch(0.55 0.13 20);
  --accent-text: oklch(0.5 0.13 20);
  --accent-tint: oklch(0.95 0.03 20);
  --dark: #17181a;
  --dark-text: #fbfbf9;
  --dark-muted: #9a9ea5;
  --toggle-off: #d6d8db;
  --sans: "Work Sans", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --r-card: 18px;
  --r-input: 10px;
}
@supports not (color: oklch(0 0 0)) {
  :root { --accent: #a8433f; --accent-text: #9a3c38; --accent-tint: #f7e9e8; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.surface { background: var(--surface); }
a { color: inherit; text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.hidden { display: none !important; }
.mobile-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons & chips ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-input); font-size: 14px; font-weight: 500;
  border: 1px solid transparent; white-space: nowrap; transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  min-height: 36px;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-outline { background: transparent; border-color: rgba(0,0,0,.12); color: var(--ink); font-weight: 400; }
.btn-outline:hover { background: var(--fill); color: var(--ink); }
.btn-text { color: var(--text-2); font-weight: 400; }
.btn-text:hover { color: var(--accent); }
.btn-light { background: var(--dark-text); color: var(--ink); border-radius: 8px; padding: 7px 12px; }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: 999px; padding: 8px 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; line-height: 1.2;
  background: var(--fill); color: var(--text-2); border: 1px solid transparent;
  white-space: nowrap; transition: background 150ms ease, color 150ms ease;
}
a.chip:hover, button.chip:hover { background: var(--fill-hover); color: var(--text-2); }
.chip-outline { background: #fff; border-color: var(--outline); color: var(--ink); }
a.chip-outline:hover, button.chip-outline:hover { background: var(--fill); color: var(--ink); }
.chip-active { background: var(--ink) !important; color: #fff !important; border-color: var(--ink); }
.chip-liked { background: var(--accent-tint) !important; color: var(--accent-text) !important; font-weight: 500; }
.chip-follow { padding: 5px 11px; border: 1px solid var(--outline-strong); background: transparent; font-size: 12px; font-weight: 500; color: var(--ink); }
.chip-follow:hover { background: var(--fill); }
.chip-tag { padding: 4px 10px; font-size: 12px; border: 1px solid var(--outline); background: transparent; color: var(--text-3); }
.chip-tag:hover { color: var(--accent); }
.chip-big { padding: 10px 16px; font-size: 14px; }
.chip-mini { padding: 3px 8px; font-size: 12px; font-weight: 500; }
.chip-icon { padding: 6px 10px; background: transparent; color: var(--text-3); margin-left: auto; }
.chip-icon:hover { background: var(--fill); }
.chip-icon.chip-liked { background: transparent !important; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-row-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chip-row-scroll::-webkit-scrollbar { display: none; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--fill);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-size: 15px;
  transition: background 150ms ease;
}
.icon-btn:hover { background: var(--fill-hover); color: var(--ink); }

.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.avatar-ph { color: rgba(0,0,0,.45); font-weight: 600; letter-spacing: .02em; }

.input, .textarea {
  width: 100%; padding: 11px 14px; background: #fff; border: 1px solid var(--hairline);
  border-radius: 12px; font-size: 14px; outline: none; transition: border-color 150ms ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus { border-color: rgba(0,0,0,.2); }
.textarea { resize: vertical; min-height: 90px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: var(--accent-tint); color: var(--accent-text); }
.alert-ok { background: var(--fill); color: var(--text-2); }

.toggle { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--toggle-off); flex: none; transition: background 150ms ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 150ms ease; }
.toggle.on { background: var(--ink); }
.toggle.on::after { transform: translateX(16px); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.app-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 48px; background: var(--surface); border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 20;
}
.header-left { display: flex; align-items: center; gap: 36px; min-width: 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.logo:hover { color: var(--ink); }
.logo-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); flex: none; }
.nav { display: flex; gap: 6px; font-size: 14px; color: var(--text-2); }
.nav a { padding: 7px 12px; border-radius: 8px; position: relative; }
.nav a.active { background: var(--nav-active); color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--accent); }
.nav a.active:hover { color: var(--ink); }
.nav-dot { position: absolute; top: 7px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.header-right { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.search-form { margin: 0; }
.search-input {
  width: 220px; padding: 8px 14px; border-radius: var(--r-input); background: var(--nav-active);
  border: 1px solid transparent; font-size: 14px; outline: none; color: var(--ink);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { background: #fff; border-color: var(--outline); }
.header-avatar { position: relative; display: inline-flex; }
.header-avatar .badge { position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.account { position: relative; }
.account > summary { list-style: none; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 50%; }
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; min-width: 172px;
  display: flex; flex-direction: column; padding: 6px; gap: 1px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
}
.account-menu a { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.account-menu a:hover { background: var(--nav-active); color: var(--ink); }

.landing-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 48px; }
.landing-header .logo { font-size: 17px; letter-spacing: -.01em; }
.landing-header .logo-dot { width: 26px; height: 26px; }
.landing-nav { display: flex; gap: 28px; font-size: 14px; color: var(--text-2); }
.landing-actions { display: flex; gap: 8px; font-size: 14px; }
.landing-actions .btn { padding: 9px 16px; }

/* ── Page layout ────────────────────────────────────────────────────────── */
.page { padding: 32px 48px 64px; max-width: 1400px; margin: 0 auto; width: 100%; }
.page-narrow { max-width: 760px; }
.page-title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.section-label { font-weight: 600; font-size: 15px; }
.section-row { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.empty { padding: 40px 24px; text-align: center; color: var(--text-3); font-size: 14px; border: 1px dashed var(--outline); border-radius: var(--r-card); }
.empty .serif { font-size: 20px; color: var(--text-2); margin-bottom: 8px; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--r-card); padding: 24px;
  border: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 16px;
}
.card-tight { gap: 14px; }
.author-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.author-row .who { flex: 1; min-width: 0; }
.author-row .who .name { color: var(--ink); font-weight: 500; }
.author-row .who .name:hover { color: var(--accent); }
.author-row .when { font-size: 12px; }
.card-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.poem-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; display: block; }
.poem-title:hover { color: var(--accent); }
.poem-body { font-family: var(--serif); font-size: 19px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.poem-body.compact { font-size: 17px; }
.card-footer { display: flex; gap: 8px; font-size: 13px; align-items: center; }
.poem-link { display: block; color: inherit; }
.poem-link:hover { color: inherit; }
.poem-link:hover .poem-title { color: var(--accent); }

.prompt-card { background: var(--dark); color: var(--dark-text); border-radius: var(--r-card); padding: 24px; border: 0; gap: 0; }
.prompt-card .label { font-size: 12px; color: var(--dark-muted); margin-bottom: 10px; }
.prompt-card .quote { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.35; }
.prompt-card .quote a:hover { color: #fff; }
.prompt-card .foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.prompt-card .foot .n { color: var(--dark-muted); }
.prompt-card.compact { padding: 18px; border-radius: 16px; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.prompt-card.compact .label { font-size: 11px; margin-bottom: 6px; }
.prompt-card.compact .quote { font-size: 17px; line-height: 1.3; }
.prompt-card.compact .btn-light { padding: 8px 12px; font-size: 12px; white-space: nowrap; }

.poets-card .section-label { font-size: 14px; margin-bottom: 16px; }
.poet-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.poet-row .who { flex: 1; min-width: 0; }
.poet-row .who .name { font-weight: 500; display: block; }
.poet-row .who .sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poet-row .follow-text { font-size: 13px; font-weight: 500; }
.poet-list { display: flex; flex-direction: column; gap: 14px; }

/* ── Feed ───────────────────────────────────────────────────────────────── */
.feed-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.load-more { display: flex; justify-content: center; padding: 24px 0; }

/* ── Landing ────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; padding: 72px 48px 80px; align-items: center; max-width: 1400px; margin: 0 auto; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 72px; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { font-size: 18px; line-height: 1.5; color: var(--text-2); max-width: 460px; text-wrap: pretty; }
.hero-cta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-cta .link { padding: 14px 18px; font-size: 15px; color: var(--ink); }
.hero-trust { display: flex; gap: 24px; font-size: 13px; color: var(--text-3); margin-top: 12px; flex-wrap: wrap; }
.hero-cards { display: flex; flex-direction: column; gap: 16px; }
.hero-card { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; padding: 28px; box-shadow: 0 12px 40px rgba(0,0,0,.06); }
.hero-card:nth-child(1) { transform: rotate(-1.2deg); }
.hero-card:nth-child(2) { transform: rotate(1deg) translateX(24px); }
.hero-card .poem-body { font-size: 22px; line-height: 1.45; margin-top: 18px; }
.hero-card .card-footer { margin-top: 20px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 48px 64px; max-width: 1400px; margin: 0 auto; }
.feature { padding: 26px; border-radius: 16px; background: var(--tile); }
.feature .t { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.feature .d { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.landing-footer { padding: 24px 48px 40px; font-size: 13px; color: var(--text-3); display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }

/* ── Single poem ────────────────────────────────────────────────────────── */
.poem-page { display: grid; grid-template-columns: 1fr 380px; min-height: calc(100vh - 69px); }
.poem-main { padding: 64px 80px; display: flex; flex-direction: column; max-width: 800px; }
.poem-main .author-row { gap: 12px; }
.poem-main .author-row .name { font-weight: 600; font-size: 15px; color: var(--ink); }
.poem-main .author-row .meta { font-size: 12px; color: var(--text-3); }
.poem-head-title { font-weight: 600; font-size: 40px; letter-spacing: -.02em; margin-top: 44px; line-height: 1.1; }
.poem-head-body { font-family: var(--serif); font-size: 24px; line-height: 1.5; white-space: pre-line; margin-top: 24px; max-width: 560px; overflow-wrap: anywhere; }
.poem-actions { display: flex; gap: 8px; margin-top: 40px; font-size: 14px; flex-wrap: wrap; }
.poem-tags { display: flex; gap: 6px; margin-top: 20px; font-size: 12px; flex-wrap: wrap; }
.poem-prompt-ref { margin-top: 28px; font-size: 13px; color: var(--text-3); }
.poem-prompt-ref em { font-family: var(--serif); font-size: 15px; color: var(--text-2); }
.owner-tools { display: flex; gap: 10px; margin-top: 20px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.owner-tools a, .owner-tools button { color: var(--text-3); }
.owner-tools a:hover, .owner-tools button:hover { color: var(--accent); }
.quote-pop { position: absolute; z-index: 30; background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

.comments { border-left: 1px solid var(--hairline); background: var(--bg); padding: 32px 28px; display: flex; flex-direction: column; gap: 20px; }
.comments-head { display: flex; justify-content: space-between; align-items: baseline; }
.comments-head .sort { font-size: 13px; color: var(--text-3); }
.comments-head .sort a.active { color: var(--ink); }
.reply-form { display: flex; flex-direction: column; gap: 8px; }
.reply-form .quote-preview { display: none; font-family: var(--serif); font-style: italic; color: var(--text-2); border-left: 2px solid rgba(0,0,0,.12); padding-left: 10px; font-size: 14px; }
.reply-form .quote-preview.show { display: flex; justify-content: space-between; gap: 8px; }
.reply-form .quote-preview button { font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--text-3); }
.reply-form .replying { display: none; font-size: 12px; color: var(--text-3); }
.reply-form .replying.show { display: flex; justify-content: space-between; }
.reply-form textarea { min-height: 44px; height: 44px; }
.reply-form .row { display: flex; gap: 8px; align-items: flex-end; }
.reply-form .send { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; align-items: center; justify-content: center; flex: none; font-size: 16px; }
.reply-form .send:hover { background: #000; color: #fff; }
.comment-list { display: flex; flex-direction: column; gap: 18px; font-size: 14px; line-height: 1.45; }
.comment { background: #fff; border-radius: 14px; padding: 16px; border: 1px solid var(--hairline); }
.comment.reply { margin-left: 24px; }
.comment .head { display: flex; gap: 8px; color: var(--text-3); font-size: 12px; margin-bottom: 6px; align-items: center; }
.comment .head .name { color: var(--ink); font-weight: 500; }
.comment .head .author-tag { padding: 1px 6px; border-radius: 4px; background: var(--fill); }
.comment .quote { font-family: var(--serif); font-style: italic; color: var(--text-2); border-left: 2px solid rgba(0,0,0,.12); padding-left: 10px; margin-bottom: 8px; white-space: pre-line; }
.comment .body { white-space: pre-line; overflow-wrap: anywhere; }
.comment .foot { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.comment .foot button { color: var(--text-3); }
.comment .foot button:hover { color: var(--accent); }
.comment .foot button.liked { color: var(--accent-text); font-weight: 500; }
.comments-off { font-size: 13px; color: var(--text-3); }
.comment-thread { display: flex; flex-direction: column; gap: 18px; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.profile-band { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 40px 48px 0; }
.profile-band-inner { max-width: 1400px; margin: 0 auto; }
.profile-top { display: flex; gap: 28px; align-items: flex-start; }
.profile-info { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.profile-name-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-name { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.profile-handle { font-size: 14px; color: var(--text-3); }
.profile-bio { font-family: var(--serif); font-size: 18px; line-height: 1.45; color: var(--text-2); max-width: 560px; text-wrap: pretty; }
.profile-stats { display: flex; gap: 24px; font-size: 14px; color: var(--text-2); margin-top: 4px; flex-wrap: wrap; }
.profile-stats strong { color: var(--ink); font-weight: 600; }
.profile-actions { display: flex; gap: 8px; }
.profile-actions .btn-primary { padding: 10px 20px; }
.profile-actions .btn-outline { padding: 10px 14px; }
.tabs { display: flex; gap: 28px; margin-top: 32px; font-size: 14px; color: var(--text-2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding-bottom: 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.about-card { max-width: 560px; }
.about-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.about-card dt { color: var(--text-3); }
.about-card dd { margin: 0; }
.comment-ref { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.comment-ref a { color: var(--text-2); font-weight: 500; }

/* ── Write ──────────────────────────────────────────────────────────────── */
.write-page { display: grid; grid-template-columns: 1fr 320px; min-height: calc(100vh - 69px); }
.write-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 48px; border-bottom: 1px solid var(--hairline); background: var(--surface); position: sticky; top: 0; z-index: 20; gap: 12px; }
.write-bar .left { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-2); }
.write-bar .icon-btn { width: 34px; height: 34px; }
.write-bar .right { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.write-bar .btn-primary { padding: 8px 16px; }
.editor-wrap { padding: 72px 24px 80px; display: flex; justify-content: center; }
.editor { width: 560px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; }
.editor .title { font-size: 34px; font-weight: 600; letter-spacing: -.02em; border: 0; background: transparent; outline: none; width: 100%; padding: 0; line-height: 1.15; }
.editor .title::placeholder { color: var(--text-3); font-weight: 500; }
.editor .body { font-family: var(--serif); font-size: 22px; line-height: 1.55; border: 0; background: transparent; outline: none; width: 100%; resize: none; padding: 0; min-height: 320px; white-space: pre-wrap; overflow: hidden; }
.editor .body::placeholder { color: var(--text-3); }
.editor .body.prose { white-space: pre-wrap; }
.format-strip { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.format-strip .fmt { padding: 5px 10px; border-radius: 8px; background: var(--fill); color: var(--text-2); }
.format-strip .fmt:hover { background: var(--fill-hover); color: var(--text-2); }
.format-strip .counter { margin-left: auto; }
.write-side { border-left: 1px solid var(--hairline); background: var(--bg); padding: 32px 28px; display: flex; flex-direction: column; gap: 28px; font-size: 14px; }
.write-side .block > .section-label { font-size: 14px; margin-bottom: 12px; display: block; }
.write-side .note { margin-top: auto; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.theme-input { border: 0; background: transparent; outline: none; font-size: 13px; color: var(--ink); width: 90px; padding: 6px 4px; }
.theme-input::placeholder { color: var(--text-3); }
.attach-card { background: #fff; border-radius: 12px; padding: 14px; border: 1px solid var(--outline); font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; color: var(--text-2); cursor: pointer; transition: border-color 150ms ease; }
.attach-card:hover { border-color: rgba(0,0,0,.2); }
.attach-card.attached { border-color: var(--ink); color: var(--ink); }
.attach-card .sub { font-family: var(--sans); font-style: normal; font-size: 12px; margin-top: 8px; color: var(--text-3); }
.toggles { display: flex; flex-direction: column; gap: 12px; }
.preview-overlay { position: fixed; inset: 0; background: rgba(23,24,26,.35); z-index: 40; display: none; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow: auto; }
.preview-overlay.show { display: flex; }
.preview-overlay .card { width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.preview-overlay .close { position: absolute; top: 16px; right: 16px; background: #fff; }
.drafts-list { display: flex; flex-direction: column; gap: 12px; }
.draft-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--hairline); }
.draft-main { display: block; flex: 1; min-width: 0; color: inherit; }
.draft-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.draft-row .t { font-weight: 500; }
.draft-row .s { font-size: 12px; color: var(--text-3); }

/* ── Explore ────────────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { border-radius: 16px; padding: 18px; height: 110px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--ink); }
.tile:hover { color: var(--ink); filter: brightness(.97); }
.tile .t { font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.tile .n { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.prompt-list { display: flex; flex-direction: column; gap: 12px; }
.prompt-row { background: #fff; border-radius: 16px; padding: 18px 20px; border: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.prompt-row .q { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; }
.prompt-row .m { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ── Activity ───────────────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hairline); font-size: 14px; line-height: 1.4; }
.activity-row:first-child { border-top: 0; }
.activity-row .txt { flex: 1; min-width: 0; }
.activity-row .txt b { font-weight: 500; }
.activity-row .txt .q { font-family: var(--serif); font-style: italic; color: var(--text-2); margin-top: 6px; border-left: 2px solid rgba(0,0,0,.12); padding-left: 10px; white-space: pre-line; }
.activity-row .txt .when { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.activity-row.read { color: var(--text-2); }
.activity-row.read .txt b { color: var(--ink); }
.activity-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.activity-row .sys { width: 36px; height: 36px; border-radius: 12px; background: var(--ink); flex: none; }
.activity-row .chip-follow { align-self: flex-start; }

/* ── Onboarding ─────────────────────────────────────────────────────────── */
.onboard { max-width: 480px; margin: 0 auto; padding: 48px 24px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.onboard .steps-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-3); }
.onboard .progress { display: flex; gap: 6px; margin-top: 14px; }
.onboard .progress span { flex: 1; height: 3px; border-radius: 2px; background: #e3e4e6; }
.onboard .progress span.done { background: var(--ink); }
.onboard h1 { font-weight: 600; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; margin-top: 40px; text-wrap: balance; }
.onboard .sub { font-size: 15px; line-height: 1.45; color: var(--text-2); margin-top: 10px; }
.onboard .picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-size: 14px; }
.onboard .picks .chip { padding: 10px 16px; font-size: 14px; background: #fff; border: 1px solid rgba(0,0,0,.12); color: var(--ink); }
.onboard .picks .chip.chip-active { border-color: var(--ink); }
.onboard .taste { margin-top: 36px; background: var(--bg); border-radius: 16px; padding: 18px; }
.onboard .taste .l { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.onboard .taste .poem-body { font-size: 17px; }
.onboard .taste .by { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.onboard .foot { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.onboard .foot .btn { padding: 16px; border-radius: 14px; font-size: 15px; }
.onboard .poet-list { margin-top: 24px; gap: 0; }
.onboard .poet-row { padding: 14px 0; border-top: 1px solid var(--hairline); }

/* ── Auth ───────────────────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 36px 32px; border: 1px solid var(--hairline); }
.auth-card .logo { justify-content: center; margin-bottom: 24px; }
.auth-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; text-align: center; }
.auth-card .tagline { text-align: center; color: var(--text-2); margin: 8px 0 24px; font-size: 14px; }
.auth-card .switch { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 20px; }
.auth-card .switch a { color: var(--ink); font-weight: 500; }

/* ── Settings ───────────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 640px; }
.settings-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.avatar-pick { display: flex; align-items: center; gap: 16px; }
.danger { color: var(--accent-text); }

/* ── Static pages ───────────────────────────────────────────────────────── */
.prose { max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.prose h1 { font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-bottom: 20px; }
.prose h2 { font-size: 18px; font-weight: 600; color: var(--ink); margin: 28px 0 8px; }
.prose p { margin-bottom: 12px; }

/* ── Bottom tab bar (mobile) ────────────────────────────────────────────── */
.bottom-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 50; opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
.toast.show { opacity: 1; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .poem-main { padding: 48px 40px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .app-header, .page, .profile-band, .write-bar, .landing-header { padding-left: 24px; padding-right: 24px; }
  .hero { grid-template-columns: 1fr; padding: 48px 24px 56px; gap: 48px; }
  .hero h1 { font-size: 56px; }
  .hero-card:nth-child(2) { transform: rotate(1deg); }
  .features { grid-template-columns: 1fr; padding: 0 24px 48px; }
  .poem-page { grid-template-columns: 1fr; }
  .comments { border-left: 0; border-top: 1px solid var(--hairline); }
  .write-page { grid-template-columns: 1fr; }
  .write-side { border-left: 0; border-top: 1px solid var(--hairline); }
  .editor-wrap { padding: 40px 24px 48px; }
  .header-left { gap: 20px; }
  .search-input { width: 160px; }
}
@media (max-width: 639px) {
  body { padding-bottom: 72px; }
  .mobile-only { display: block; }
  .feed-col .prompt-card { display: none; }
  .reply-form .send { display: inline-flex; }
  .reply-form textarea { border-radius: 999px; background: var(--fill); border-color: transparent; }
  .poem-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -20px; margin-right: -20px; padding: 0 20px; }
  .poem-actions::-webkit-scrollbar { display: none; }
  .profile-top { display: grid; grid-template-columns: 72px 1fr; gap: 14px 16px; align-items: center; }
  .profile-info { display: contents; }
  .profile-name-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .profile-bio, .profile-stats, .profile-actions { grid-column: 1 / -1; margin-top: 0; }
  .profile-stats .joined { display: none; }
  body.no-tabbar { padding-bottom: 0; }
  .app-header { padding: 12px 16px; }
  .nav { display: none; }
  .search-form { display: none; }
  .header-right .btn-primary { padding: 8px 14px; border-radius: 999px; font-size: 13px; }
  .page { padding: 20px 16px 40px; }
  .page-title { font-size: 20px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .stack, .feed-col { gap: 12px; }
  .card { border-radius: 16px; padding: 20px; gap: 14px; }
  .poem-body { font-size: 18px; }
  .poem-title { font-size: 15px; margin-bottom: 6px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .hero h1 { font-size: 44px; }
  .hero { padding: 32px 20px 40px; }
  .landing-header { padding: 16px 20px; }
  .landing-nav { display: none; }
  .hero-card { padding: 22px; }
  .hero-card .poem-body { font-size: 19px; }
  .poem-main { padding: 24px 20px 32px; }
  .poem-head-title { font-size: 26px; margin-top: 36px; letter-spacing: -.01em; }
  .poem-head-body { font-size: 20px; margin-top: 18px; }
  .poem-actions { margin-top: 28px; }
  .poem-actions .chip { padding: 10px 16px; font-size: 14px; }
  .comments { padding: 20px; background: var(--surface); }
  .comment-list { background: var(--bg); border-radius: 16px; padding: 18px; gap: 16px; }
  .comment { background: transparent; border: 0; padding: 0; border-radius: 0; }
  .comment.reply { margin-left: 16px; }
  .profile-band { padding: 20px 20px 0; }
  .profile-top { flex-wrap: wrap; gap: 16px; }
  .profile-top .avatar { width: 72px !important; height: 72px !important; }
  .profile-name { font-size: 22px; letter-spacing: -.01em; }
  .profile-bio { font-size: 16px; }
  .profile-stats { font-size: 13px; gap: 20px; }
  .profile-actions { width: 100%; }
  .profile-actions .btn-primary { flex: 1; padding: 12px; border-radius: 12px; }
  .profile-actions .btn-outline { padding: 12px 16px; border-radius: 12px; }
  .tabs { gap: 22px; margin-top: 24px; }
  .tabs a { padding-bottom: 10px; }
  .write-bar { padding: 12px 16px; }
  .write-bar .left span.status { display: none; }
  .editor .title { font-size: 26px; }
  .editor .body { font-size: 20px; min-height: 220px; }
  .write-side { padding: 24px 20px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .onboard { padding: 40px 24px 32px; }
  .auth-card { padding: 28px 22px; }
  .about-card dl { grid-template-columns: 100px 1fr; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    justify-content: space-around; padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--hairline); font-size: 11px; color: var(--text-3);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 56px; min-height: 44px; justify-content: center; position: relative; }
  .bottom-nav a.active { color: var(--ink); font-weight: 500; }
  .bottom-nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav .avatar { width: 22px !important; height: 22px !important; font-size: 9px !important; }
  .bottom-nav .badge { position: absolute; top: 4px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
}
