/* Poetry Prompt Workshop — poetry.demcdonagh.com */
:root {
  --green: #0f2a22;
  --green-deep: #0a1f19;
  --green-raised: #143529;
  --rule: #2c5446;
  --rule-soft: #1f4236;
  --porcelain: #f2f4ef;
  --sage: #a7bdb2;
  --rose: #f2a7b8;
  --rose-strong: #f7c3cf;
  --rose-deep: #9c3b55;
  --paper: #f3f5f2;
  --paper-line: #d3ddd7;
  --paper-ink: #12302a;
  --paper-muted: #5b726a;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Cabin", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--porcelain);
  background: var(--green);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }

a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 50;
  padding: 10px 14px; border-radius: 10px;
  background: var(--rose); color: var(--green-deep); font-weight: 700; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

.icon {
  width: 1.1em; height: 1.1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(10, 31, 25, 0.86);
  border-bottom: 1px solid var(--rule-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.mark {
  font-family: var(--display);
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.bar nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.bar nav a {
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--sage);
  transition: color .15s;
}
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--porcelain); }
.bar nav a.nav-write {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px;
  background: var(--rose); color: var(--green-deep);
}
.bar nav a.nav-write:hover { background: var(--rose-strong); color: var(--green-deep); }
.bar nav a.nav-write[aria-current="page"] { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1.5px var(--rose); }

.wrap { width: min(var(--max), 100%); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--rule); border-radius: 999px;
  background: transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--sage); background: rgba(242, 244, 239, 0.05); }
.btn-rose { background: var(--rose); border-color: var(--rose); color: var(--green-deep); }
.btn-rose:hover { background: var(--rose-strong); border-color: var(--rose-strong); }
.btn-small { min-height: 38px; padding: 0 15px; font-size: 14.5px; }

/* ---------- Home ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr);
  grid-template-areas: "tonight cal" "share cal";
  grid-template-rows: auto 1fr;
  gap: 30px clamp(28px, 4vw, 52px);
  align-items: start;
  padding-block: clamp(22px, 3.5vw, 40px) 36px;
}
.tonight { grid-area: tonight; }
.cal { grid-area: cal; }
.share { grid-area: share; }

.tonight h1 {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 5vw, 62px); line-height: 1;
}
.meta {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  margin: 14px 0 0; padding: 0; list-style: none;
  color: var(--sage); font-size: 16px;
}
.meta li { display: inline-flex; align-items: center; gap: 7px; }
.meta a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.meta a:hover { color: var(--porcelain); border-color: var(--sage); }

.prompt { margin-top: clamp(22px, 3vw, 32px); }
.prompt-label {
  display: flex; align-items: center;
  margin: 0; font-size: 15.5px; font-weight: 600; color: var(--rose);
}
.blank {
  position: relative;
  min-height: 1.16em;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(54px, 7.6vw, 104px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.blank::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.03em;
  height: 3px;
  background: var(--porcelain);
  transform-origin: left center;
  animation: draw 1.3s var(--ease) both .15s;
}
.blank .word { display: inline-block; padding-bottom: 0.04em; }
.blank .word.reveal { animation: ink 1.6s var(--ease) both; }
.blank .word.ghost {
  font-family: var(--display); font-style: normal;
  color: rgba(167, 189, 178, 0.34);
  letter-spacing: 0;
}
.blank .word.ghost .d { display: inline-block; width: 0.56em; text-align: center; }
.blank .word.ghost .c { display: inline-block; width: 0.26em; text-align: center; }
.blank .word.ghost .u { font-size: 0.5em; margin-left: 0.18em; }
.live {
  display: inline-block; width: 9px; height: 9px; margin-right: 9px; flex: none;
  border-radius: 50%; background: var(--rose);
  animation: pulse 2s infinite;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Evening timeline, proportional to minutes */
.evening {
  position: relative;
  display: flex;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.evening li {
  flex: var(--w) 1 0;
  min-width: 0;
  padding-top: 9px;
  border-top: 3px solid var(--rule);
  color: var(--sage);
  font-size: 14.5px;
  line-height: 1.25;
}
.evening li + li { margin-left: 3px; }
.evening li b { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; color: var(--porcelain); }
.evening li.on { border-color: var(--rose); color: var(--porcelain); }
.evening li.on b { color: var(--rose); }
.evening li.done { border-color: var(--sage); }
.evening .end { position: absolute; right: 0; top: 12px; padding: 0; margin: 0; border: 0; text-align: right; }
.now-mark {
  position: absolute; top: -8px;
  width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 50%;
  background: var(--rose);
  border: 3px solid var(--green);
}

h2 {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: 30px; line-height: 1.1;
}

/* Calendar */
.cal {
  padding: 18px 20px 12px;
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
  background: var(--green-deep);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-year {
  margin: 14px 0 2px;
  font-family: var(--display); font-weight: 400;
  font-size: 17px; color: var(--sage);
}
.rows { margin: 0; padding: 0; list-style: none; }
.row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto 30px;
  align-items: center; gap: 10px;
  min-height: 39px;
  padding: 0 8px;
  margin: 0 -8px;
  border-top: 1px solid var(--rule-soft);
}
.row:first-child { border-top: 0; }
.row .date { font-weight: 600; font-size: 15px; white-space: nowrap; }
.row .p {
  min-width: 0;
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .line { display: inline-block; width: min(140px, 70%); height: 0.9em; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.row .host { margin-left: 8px; font-family: var(--sans); font-style: normal; font-size: 13.5px; color: var(--sage); }
.tag {
  padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: var(--rose); color: var(--green-deep);
}
.tag.next { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1.5px var(--rose); }
.tag.off { background: transparent; color: var(--sage); box-shadow: inset 0 0 0 1px var(--rule); }
.add {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--rule); color: var(--sage); text-decoration: none;
  transition: color .15s, border-color .15s;
}
.add .icon { width: 15px; height: 15px; }
.add:hover { color: var(--porcelain); border-color: var(--sage); }
.row.is-past .date, .row.is-past .p { color: var(--sage); }
.row.is-tonight { border-radius: 10px; border-top-color: transparent; background: rgba(242, 167, 184, 0.09); }
.row.is-tonight + .row { border-top-color: transparent; }
.row.is-cancelled .date, .row.is-cancelled .p { color: var(--sage); text-decoration: line-through; }

.subscribe { position: relative; }
.subscribe summary { list-style: none; }
.subscribe summary::-webkit-details-marker { display: none; }
.subscribe .menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5;
  display: grid; min-width: 220px; padding: 6px;
  border: 1px solid var(--rule); border-radius: 14px;
  background: var(--green-raised);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.subscribe .menu a { padding: 11px 12px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 15px; }
.subscribe .menu a:hover { background: var(--green); }

/* Share (latest poems) */
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feed { margin: 10px 0 0; padding: 0; list-style: none; }
.feed li { border-top: 1px solid var(--rule-soft); }
.feed a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 14px;
  padding: 9px 0; text-decoration: none;
}
.feed .f-title { font-family: var(--serif); font-size: 19px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .f-by { grid-column: 1; font-size: 14.5px; color: var(--sage); }
.feed .f-n { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--sage); }
.feed a:hover .f-title { color: var(--rose); }
.feed .empty { padding: 12px 0; color: var(--sage); }
.feed .empty a { display: inline; padding: 0; color: var(--rose); }

/* Footer */
.foot {
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-soft);
  color: var(--sage); font-size: 14.5px;
}
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.foot strong { color: var(--porcelain); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--porcelain); }

/* ---------- Write page ---------- */
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding-block: clamp(20px, 3vw, 36px) 48px;
}
.paper {
  min-height: calc(100vh - 140px);
  padding: clamp(26px, 4.5vw, 64px) clamp(22px, 5vw, 72px) 28px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 2px 0 rgba(255, 255, 255, .5) inset;
  display: flex; flex-direction: column;
}
.paper input, .paper textarea {
  width: 100%; border: 0; background-color: transparent; color: var(--paper-ink); outline: none;
}
.paper input::placeholder, .paper textarea::placeholder { color: #9aaba4; opacity: 1; }
.paper input:focus-visible, .paper textarea:focus-visible { outline: none; }
.f-title {
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.1;
  padding: 0;
}
.f-name { margin-top: 6px; font-size: 17px; color: var(--paper-muted) !important; padding: 0; }
.f-poem {
  --lh: 34px;
  flex: 1 0 auto;
  min-height: 440px;
  margin-top: 28px;
  padding: 0;
  resize: none;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 20px;
  line-height: var(--lh);
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--paper-line) calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-attachment: local;
}
.paper-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px;
  margin-top: 22px; padding-top: 14px;
  border-top: 1px solid var(--paper-line);
  font-size: 14.5px; color: var(--paper-muted);
  font-variant-numeric: tabular-nums;
}
.paper-foot .warn { color: var(--rose-deep); font-weight: 600; }

.side { position: sticky; top: 88px; display: grid; gap: 14px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.timer { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule-soft); }
.panel {
  padding: 22px;
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
  background: var(--green-raised);
}
.panel .prompt-label { font-size: 15px; }
.blank.small { font-size: clamp(40px, 4vw, 54px); }
.blank.small::after { height: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips[hidden] { display: none; }
.chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent;
  font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--porcelain);
}
.chip:hover { border-color: var(--sage); }
.chip[aria-pressed="true"] { background: var(--porcelain); color: var(--green-deep); border-color: var(--porcelain); }
.chips-label { width: 100%; margin: 0; font-size: 14px; color: var(--sage); }

.timer .time {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 6vw, 84px); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}
.timer .time .d { display: inline-block; width: 0.6em; text-align: center; }
.timer .time .c { display: inline-block; width: 0.28em; text-align: center; }
.timer.running .time { color: var(--porcelain); }
.timer.done .time { color: var(--rose); animation: flash 1s 3; }
.timer-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.timer-btns .btn { flex: 1 1 auto; min-height: 44px; }
.timer-note { margin: 10px 0 0; font-size: 14.5px; color: var(--sage); }
.timer-note:empty { display: none; }

.pref { margin: 0; padding: 0; border: 0; }
.pref legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--rose); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label {
  position: relative; display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 14.5px; font-weight: 500; cursor: pointer;
}
.pills input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pills label:has(input:checked) { background: var(--porcelain); border-color: var(--porcelain); color: var(--green-deep); }
.pills label:has(input:focus-visible) { outline: 2px solid var(--rose); outline-offset: 2px; }
.pref + .tools { margin-top: 18px; }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools .btn { min-height: 44px; padding: 0 12px; font-size: 15px; }
.tools .wide { grid-column: 1 / -1; }
.toast { margin: 8px 0 0; min-height: 1.3em; font-size: 14px; color: var(--rose); text-align: center; }

/* Mobile writing bar (timer stays in view while writing) */
.pocket { display: none; }

/* ---------- Shared controls ---------- */
.select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-height: 44px; margin-top: 12px; padding: 0 40px 0 14px;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7bdb2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
  color: var(--porcelain); font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  cursor: pointer;
}
.select:hover { border-color: var(--sage); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-ink { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--paper); }
.btn-ink:hover { background: #1d4239; border-color: #1d4239; }
.btn:disabled { opacity: .55; cursor: wait; }
.link { padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link.danger { color: var(--rose-deep); }
.toast a { color: var(--porcelain); font-weight: 700; }
.m-prompt { display: none; }

/* ---------- Collections ---------- */
.coll {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 44px); align-items: start;
  padding-block: clamp(22px, 3vw, 36px) 40px;
}
.shelf { position: sticky; top: 84px; }
.shelf h1 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; }
.shelf-list { margin: 0; padding: 0; list-style: none; }
.shelf-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 10px;
  padding: 8px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none;
}
.shelf-item:hover { background: var(--green-raised); }
.shelf-item.is-on { background: var(--green-raised); box-shadow: inset 3px 0 0 var(--rose); }
.s-label { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-label.plain { font-family: var(--sans); font-style: normal; font-size: 15.5px; font-weight: 600; }
.s-when { grid-column: 1; font-size: 13px; color: var(--sage); }
.s-count { grid-column: 2; grid-row: 1; font-size: 13.5px; font-weight: 700; color: var(--sage); font-variant-numeric: tabular-nums; }
.admin-tag { margin: 14px 0 0; font-size: 13.5px; color: var(--rose); }
.admin-tag button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--porcelain); font: inherit; text-decoration: underline; cursor: pointer; }

.stack-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.c-title { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(40px, 5vw, 60px); line-height: 1.05; }
.c-title.plain { font-family: var(--display); font-style: normal; }
.poems { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.poems .empty { grid-column: 1 / -1; margin: 0; padding: 26px 0; color: var(--sage); }
.poems .empty a { color: var(--rose); font-weight: 600; }

.poem {
  padding: 22px 24px 14px;
  border-radius: 6px;
  background: var(--paper); color: var(--paper-ink);
  scroll-margin-top: 90px;
}
.poem.is-hidden { opacity: .5; }
.poem h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.15; }
.poem .by { margin: 4px 0 0; font-size: 14.5px; color: var(--paper-muted); }
.poem .body { margin-top: 14px; font-family: var(--serif); font-size: 17.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.poem-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--paper-line);
  font-size: 13.5px; color: var(--paper-muted);
}
.poem-foot .meta { margin-right: auto; }
.poem-foot .pref { font-weight: 600; }
.c-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--paper-line); border-radius: 999px;
  background: transparent; color: var(--paper-ink); font: inherit; font-size: 13.5px; font-weight: 600;
}
.c-toggle:hover, .c-toggle[aria-expanded="true"] { border-color: var(--paper-ink); }
.c-toggle .icon { width: 15px; height: 15px; }
.comments { margin-top: 10px; }
.c-list { margin: 0; padding: 0; list-style: none; }
.c-list li { padding: 9px 0; border-top: 1px solid var(--paper-line); }
.c-list li.is-hidden { opacity: .5; }
.c-by { margin: 0; font-size: 13px; color: var(--paper-muted); }
.c-by b { color: var(--paper-ink); font-size: 14px; }
.c-body { margin: 3px 0 0; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-top: 10px; border-top: 1px solid var(--paper-line); }
.c-form input, .c-form textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--paper-line); border-radius: 10px;
  background: #fff; color: var(--paper-ink); font: inherit; font-size: 15px;
}
.c-form input:focus, .c-form textarea:focus { outline: 2px solid var(--paper-ink); outline-offset: 0; }
.c-form input[name="name"] { grid-column: 1 / -1; }
.c-form textarea { resize: vertical; min-height: 44px; }
.c-form .btn { align-self: end; min-height: 44px; }
.c-err { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--rose-deep); }
.c-as { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--paper-muted); }
.c-as b { color: var(--paper-ink); }
.by-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.by-link:hover { border-color: var(--paper-ink); }
.s-group { margin: 16px 0 4px; font-size: 13px; font-weight: 700; color: var(--sage); }
.assign { margin-top: 10px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 180px; min-height: 38px; padding: 0 12px; border: 1px solid var(--paper-line); border-radius: 10px; background: #fff; color: var(--paper-ink); font: inherit; font-size: 15px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 12px; border: 1px dashed var(--rule); border-radius: 14px; }
.admin-bar .inline-form input { border-color: var(--rule); background: var(--green); color: var(--porcelain); }
.link-out { flex-basis: 100%; margin: 8px 0 0; font-size: 13.5px; }
.link-out input { width: min(100%, 420px); min-height: 34px; padding: 0 10px; border: 1px solid var(--paper-line); border-radius: 8px; font: inherit; font-size: 13px; }
.admin-bar .link-out input { border-color: var(--rule); background: var(--green); color: var(--porcelain); }
.who { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; color: var(--sage); }
.who b { color: var(--porcelain); }
.who .link { margin-left: 8px; color: var(--rose); }
.f-name.locked { cursor: default; }

/* Coordinators: set a prompt */
.prompt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.set-prompt { min-height: 32px; padding: 0 12px; font-size: 13.5px; border-color: var(--rose); color: var(--rose); }
.row .set-p { min-width: 0; padding: 0; border: 0; background: none; color: var(--rose); font: inherit; font-family: var(--serif); font-style: italic; font-size: 19px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.row .set-p.empty { font-family: var(--sans); font-style: normal; font-size: 13.5px; font-weight: 700; }
.dlg {
  width: min(460px, calc(100vw - 32px)); padding: 22px 22px 18px;
  border: 1px solid var(--rule); border-radius: 18px;
  background: var(--green-raised); color: var(--porcelain);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.dlg::backdrop { background: rgba(5, 15, 12, .72); }
.dlg-input {
  width: 100%; margin: 6px 0 18px; padding: 4px 0 6px;
  border: 0; border-bottom: 3px solid var(--porcelain); border-radius: 0;
  background: transparent; color: var(--porcelain);
  font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1.15;
  outline: none;
}
.dlg-input::placeholder { color: rgba(167, 189, 178, .45); }
.dlg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg-btns .btn { flex: 1 1 auto; min-height: 46px; }
.dlg-note { margin: 10px 0 0; min-height: 1.2em; font-size: 14px; color: var(--rose); }

/* ---------- Motion ---------- */
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ink {
  0% { opacity: 0; filter: blur(14px); letter-spacing: 0.08em; }
  100% { opacity: 1; filter: blur(0); letter-spacing: -0.015em; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 167, 184, .55); }
  70% { box-shadow: 0 0 0 10px rgba(242, 167, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 167, 184, 0); }
}
@keyframes flash { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .home { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); }
  .desk { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "tonight" "cal" "share"; }

  .desk { grid-template-columns: 1fr; padding-top: 0; }
  .side { position: static; }
  .side .panel-top { display: none; }
  .pocket {
    position: sticky; top: 63px; z-index: 15;
    display: flex; align-items: center; gap: 14px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    background: rgba(10, 31, 25, 0.92);
    border-bottom: 1px solid var(--rule-soft);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .pocket .p-word {
    flex: 1; min-width: 0;
    font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pocket .p-word small { display: block; font-family: var(--sans); font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--rose); }
  .pocket .p-time { font-family: var(--display); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
  .pocket.done .p-time { color: var(--rose); }
  .pocket .p-btn {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none;
    border-radius: 50%; border: 0; background: var(--rose); color: var(--green-deep);
  }
  .pocket .p-btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }
  .paper { margin-top: 16px; min-height: 70vh; }
  .f-poem { min-height: 50vh; }
  .m-prompt { display: block; padding-top: 14px; }
  .m-prompt .select { margin-top: 6px; }
  .coll { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .shelf { position: static; }
  .shelf h1 { display: none; }
  .shelf-list { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .shelf-list::-webkit-scrollbar { display: none; }
  .shelf-item { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; white-space: nowrap; }
  .shelf-item.is-on { box-shadow: none; border-color: var(--rose); }
  .s-when { display: none; }
  .s-group { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar { padding-block: 12px; }
  .bar nav a.nav-cal { display: none; }
  .mark { font-size: 18px; }
  .actions .btn { flex: 1 1 auto; min-height: 44px; padding: 0 14px; }
  .evening li { font-size: 13.5px; }
  .evening li b { font-size: 19px; }
  .cal { padding: 14px 14px 8px; border-radius: 16px; }
  .row { grid-template-columns: 52px minmax(0, 1fr) auto 30px; gap: 8px; padding: 0 6px; margin: 0 -6px; }
  .foot nav { margin-left: 0; }
  .paper { padding: 22px 18px 20px; border-radius: 4px; }
  .f-poem { --lh: 32px; font-size: 18.5px; }
  .pocket { top: 59px; }
}
@media (max-width: 420px) {
  .mark { font-size: 15.5px; }
  .bar nav { gap: 12px; }
}
