/* =========================================================
   365 — A Year in Verse
   ========================================================= */
:root {
  --ink: #2b2420;
  --ink-soft: #6b5d52;
  --paper: #f7f0e1;
  --paper-edge: #e9dcc3;
  --gold: #c9a45c;
  --gold-soft: #e6cf9a;
  --leather: #5b1f2b;
  --leather-dark: #34101a;
  --night: #15131c;
  --night-2: #221d2c;
  --accent: #8a2f3f;
  --radius: 14px;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--body);
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 50% 40%, #2c2538 0%, transparent 70%),
    radial-gradient(800px 500px at 85% 110%, #3a1b25 0%, transparent 70%),
    var(--night);
  min-height: 100%;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* floating dust */
.dust { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.dust span {
  position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--gold-soft); opacity: 0; animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: .5; }
  100% { transform: translateY(-105vh) translateX(30px); opacity: 0; }
}

/* =========================== LOGIN =========================== */
.auth-wrap {
  position: relative; z-index: 1; min-height: 100vh;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  gap: 48px; max-width: 1100px; margin: 0 auto; padding: 40px 24px;
}
.auth-hero h1 {
  font-family: var(--serif); font-weight: 300; line-height: .85;
  font-size: clamp(96px, 16vw, 200px); color: var(--gold);
  letter-spacing: -.02em; text-shadow: 0 6px 40px rgba(201,164,92,.25);
}
.auth-hero h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.2vw, 38px); margin-top: 8px; }
.auth-hero p { color: #cfc4b4; max-width: 420px; margin-top: 18px; font-size: 19px; line-height: 1.55; }
.auth-hero .quote { margin-top: 32px; padding-left: 18px; border-left: 2px solid var(--gold); font-style: italic; color: var(--gold-soft); }

.auth-card {
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius); padding: 36px 34px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 60px rgba(160,120,60,.12);
  position: relative;
}
.auth-card::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(138,47,63,.18);
  border-radius: 8px; pointer-events: none;
}
.tabs { display: flex; gap: 6px; margin-bottom: 24px; background: #ece2cd; border-radius: 999px; padding: 4px; }
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 10px 0; border-radius: 999px;
  font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink-soft); transition: .25s;
}
.tabs button.active { background: var(--leather); color: var(--paper); box-shadow: 0 4px 14px rgba(91,31,43,.35); }

.auth-card h3 { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.auth-card .sub { color: var(--ink-soft); margin: 2px 0 22px; }
.field { margin-bottom: 16px; position: relative; }
.field label { display: block; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 18px; color: var(--ink);
  background: #fffaf0; border: 1px solid #d9caa9; border-radius: 10px; outline: none; transition: .2s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138,47,63,.15); }
.field .eye {
  position: absolute; right: 8px; bottom: 7px; border: 0; background: none; color: var(--ink-soft);
  font-size: 14px; padding: 6px 8px; border-radius: 6px;
}
.row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 18px; font-size: 16px; color: var(--ink-soft); }
.row label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.row input { accent-color: var(--leather); width: 16px; height: 16px; }
.btn-primary {
  width: 100%; border: 0; padding: 14px; border-radius: 10px;
  background: linear-gradient(180deg, #74293a, var(--leather)); color: var(--paper);
  font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .03em;
  box-shadow: 0 8px 22px rgba(91,31,43,.35); transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(91,31,43,.45); }
.btn-primary:disabled { opacity: .6; transform: none; }
.msg { min-height: 22px; margin-top: 12px; font-size: 16px; text-align: center; }
.msg.err { color: #a3273b; }
.msg.ok { color: #3f7a3a; }
.note { margin-top: 14px; font-size: 13px; color: #9a8b7a; text-align: center; }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; }
  .auth-hero { text-align: center; }
  .auth-hero p, .auth-hero .quote { margin-left: auto; margin-right: auto; }
  .auth-hero .quote { display: none; }
  .auth-card { padding: 28px 22px 24px; }
}

/* =========================== BOOK PAGE =========================== */
.topbar {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 12px;
}
.brand { font-family: var(--serif); font-size: 26px; display: flex; align-items: baseline; gap: 10px; }
.brand b { color: var(--gold); font-weight: 600; font-size: 32px; }
.brand i { color: #cfc4b4; font-size: 19px; }
.user { display: flex; align-items: center; gap: 12px; color: #cfc4b4; font-size: 17px; }
.ghost {
  border: 1px solid rgba(230,207,154,.35); background: rgba(255,255,255,.03); color: var(--gold-soft);
  padding: 7px 14px; border-radius: 999px; font-size: 16px; transition: .2s;
}
.ghost:hover { background: rgba(230,207,154,.12); }

.stage {
  position: relative; z-index: 1; display: flex; justify-content: center; align-items: center;
  padding: 6px 16px 0; min-height: calc(100vh - 190px);
}
.book {
  --w: min(1040px, 94vw, calc((100vh - 220px) * 1.45));
  position: relative; width: var(--w); aspect-ratio: 1.45;
  perspective: 2600px; transition: transform .7s cubic-bezier(.645,.045,.355,1);
}
.book.closed-front { transform: translateX(-25%); }
.book.closed-back { transform: translateX(25%); }
.book::after { /* soft shadow under the book */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -26px; height: 40px;
  background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); z-index: -1; transition: .7s;
}
.book.closed-front::after { left: 52%; }
.book.closed-back::after { right: 52%; }

.half { position: absolute; top: 0; width: 50%; height: 100%; }
.half.left { left: 0; }
.half.right { left: 50%; }

.book.single { --w: min(94vw, calc((100vh - 210px) * .72)); aspect-ratio: .72; }
.book.single .half.left { display: none; }
.book.single .half.right { left: 0; width: 100%; }
.book.single.closed-front, .book.single.closed-back { transform: none; }

/* ---------- Page ---------- */
/* The page's outer box is the sizing container, so every cqw below = 1% of the full page width */
.half, .face, .preview-page { container-type: inline-size; }
.page {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(196,165,110,.18), transparent 60%),
    var(--paper);
  color: var(--ink);
  display: flex; flex-direction: column;
  padding: 7cqw 9cqw 6cqw;
}
.page.side-r { border-radius: 2px 10px 10px 2px; box-shadow: inset 18px 0 30px -18px rgba(80,55,20,.45), 2px 0 0 var(--paper-edge), 4px 0 0 #ddcdb0, 6px 2px 14px rgba(0,0,0,.35); }
.page.side-l { border-radius: 10px 2px 2px 10px; box-shadow: inset -18px 0 30px -18px rgba(80,55,20,.45), -2px 0 0 var(--paper-edge), -4px 0 0 #ddcdb0, -6px 2px 14px rgba(0,0,0,.35); }
.book.single .page.side-r { border-radius: 4px 10px 10px 4px; }

.pg-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 3.1cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 1px solid rgba(107,93,82,.25); padding-bottom: 1.6cqw; }
.pg-day { color: var(--accent); font-weight: 600; }
.pg-title { font-family: var(--serif); font-weight: 600; font-size: 7.4cqw; line-height: 1.05; margin-top: 6cqw; text-align: center; }
.pg-orn { text-align: center; color: var(--gold); font-size: 4.4cqw; margin: 1.6cqw 0 3.4cqw; }
.poem { font-size: 4.1cqw; line-height: 1.6; text-align: center; font-style: italic; flex: 1; }
.poem p + p { margin-top: 3.4cqw; }
/* longer poems shrink a little so they still fit on one page */
.poem.long { font-size: 3.5cqw; line-height: 1.5; }
.poem.xlong { font-size: 2.95cqw; line-height: 1.45; }
.poem.long p + p, .poem.xlong p + p { margin-top: 2.4cqw; }
.pg-foot { display: flex; justify-content: space-between; align-items: center; font-size: 3cqw; color: var(--ink-soft); }
.pg-foot .tag { font-style: italic; opacity: .7; }
.pg-num { font-family: var(--serif); font-size: 3.6cqw; }
.side-l .pg-foot { flex-direction: row-reverse; }

.bm-btn {
  position: absolute; top: 0; right: 7cqw; width: 6cqw; height: 11cqw; border: 0;
  background: rgba(138,47,63,.14); clip-path: polygon(0 0,100% 0,100% 100%,50% 78%,0 100%);
  transition: height .25s, background .25s;
}
.bm-btn:hover { height: 13cqw; background: rgba(138,47,63,.4); }
.bm-btn.on { background: var(--accent); height: 15cqw; }
.side-l .bm-btn { right: auto; left: 7cqw; }

/* drop cap for the first letter of each poem */
.poem p:first-child::first-letter { font-family: var(--serif); font-style: normal; font-size: 160%; color: var(--accent); font-weight: 600; }

/* ---------- Cover & special pages ---------- */
.page.cover {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,255,255,.08), transparent 55%),
    repeating-linear-gradient(45deg, rgba(0,0,0,.04) 0 2px, transparent 2px 5px),
    linear-gradient(135deg, var(--leather), var(--leather-dark));
  color: var(--gold); align-items: center; justify-content: center; text-align: center;
  cursor: pointer;
}
.page.cover::before { content: ""; position: absolute; inset: 4.5cqw; border: 1px solid rgba(201,164,92,.55); border-radius: 4px; }
.page.cover::after { content: ""; position: absolute; inset: 6cqw; border: 1px solid rgba(201,164,92,.25); border-radius: 2px; }
.page.cover.side-r { box-shadow: inset 10px 0 20px -8px rgba(0,0,0,.6), 6px 6px 22px rgba(0,0,0,.5); }
.page.cover.side-l { box-shadow: inset -10px 0 20px -8px rgba(0,0,0,.6), -6px 6px 22px rgba(0,0,0,.5); }
.cover .c-orn { font-size: 6cqw; letter-spacing: .5em; opacity: .8; }
.cover .c-num { font-family: var(--serif); font-weight: 300; font-size: 34cqw; line-height: .9; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 30px rgba(201,164,92,.3); }
.cover .c-title { font-family: var(--serif); font-style: italic; font-size: 8cqw; color: var(--gold-soft); }
.cover .c-sub { margin-top: 5cqw; font-size: 3.3cqw; letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.cover .c-hint { position: absolute; bottom: 9cqw; left: 0; right: 0; font-size: 3.2cqw; font-style: italic; opacity: .7; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.page.title-page { justify-content: center; text-align: center; }
.title-page .t-num { font-family: var(--serif); font-size: 18cqw; color: var(--accent); font-weight: 300; line-height: 1; }
.title-page .t-name { font-family: var(--serif); font-style: italic; font-size: 7cqw; }
.title-page .t-line { width: 30%; height: 1px; background: var(--gold); margin: 5cqw auto; }
.title-page .t-epi { font-style: italic; font-size: 4cqw; line-height: 1.6; color: var(--ink-soft); }
.title-page .t-for { margin-top: 8cqw; font-size: 3.4cqw; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.title-page .t-for b { display: block; margin-top: 1.5cqw; font-family: var(--serif); font-size: 6cqw; letter-spacing: 0; text-transform: none; color: var(--ink); }
.title-page .t-begun { margin-top: 3cqw; font-style: italic; font-size: 3.4cqw; color: var(--accent); }
.title-page .t-help { margin-top: 8cqw; font-size: 3cqw; color: #9a8b7a; }

/* ---------- Flipping leaf ---------- */
.flipper {
  position: absolute; top: 0; width: 50%; height: 100%; z-index: 10;
  transform-style: preserve-3d; transition: transform var(--flip-ms, 900ms) cubic-bezier(.645,.045,.355,1);
}
.flipper.fwd { left: 50%; transform-origin: left center; }
.flipper.bwd { left: 0; transform-origin: right center; }
.book.single .flipper { left: 0; width: 100%; transform-origin: left center; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.b { transform: rotateY(180deg); }
.face .shade { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity var(--flip-ms, 900ms); border-radius: inherit; }
.face.f .shade { background: linear-gradient(to left, rgba(0,0,0,.35), rgba(0,0,0,.05)); }
.face.b .shade { background: linear-gradient(to right, rgba(0,0,0,.35), rgba(0,0,0,.05)); opacity: 1; }
.flipper.go .face.f .shade { opacity: 1; }
.flipper.go .face.b .shade { opacity: 0; }
.face.blank { background: var(--paper); border-radius: 10px 2px 2px 10px; }

/* ---------- Controls ---------- */
.controls {
  position: relative; z-index: 3; max-width: 900px; margin: 34px auto 0; padding: 0 16px 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.nav-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(230,207,154,.35);
  background: rgba(255,255,255,.04); color: var(--gold-soft); font-size: 22px; display: grid; place-items: center; transition: .2s;
}
.nav-btn:hover:not(:disabled) { background: rgba(230,207,154,.15); transform: scale(1.05); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.scrub { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.scrub-label { text-align: center; font-family: var(--serif); font-size: 18px; color: var(--gold-soft); }
input[type=range] { width: 100%; accent-color: var(--gold); cursor: pointer; }
.goto { display: flex; gap: 6px; align-items: center; }
.goto input {
  width: 78px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(230,207,154,.35);
  background: rgba(0,0,0,.25); color: var(--paper); text-align: center; outline: none;
}
.goto input:focus { border-color: var(--gold); }

/* Bookmarks panel */
.panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(340px, 88vw); z-index: 20;
  background: var(--night-2); border-left: 1px solid rgba(230,207,154,.2); padding: 22px 20px;
  transform: translateX(100%); transition: transform .35s ease; box-shadow: -20px 0 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
}
.panel.open { transform: none; }
.panel h3 { font-family: var(--serif); font-size: 26px; color: var(--gold); display: flex; justify-content: space-between; align-items: center; }
.panel ul { list-style: none; margin-top: 16px; overflow-y: auto; flex: 1; }
.panel li button {
  width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.03); padding: 12px 14px; margin-bottom: 8px;
  border-radius: 10px; color: var(--paper); transition: .2s; font-size: 17px;
}
.panel li button:hover { background: rgba(230,207,154,.12); }
.panel li small { display: block; color: #a99c8b; font-size: 14px; }
.panel .empty { color: #a99c8b; font-style: italic; margin-top: 18px; }

.hint { position: relative; z-index: 2; text-align: center; color: #8d8296; font-size: 14px; padding-bottom: 18px; }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .brand i { display: none; }
  .user span { display: none; }
  .controls { margin-top: 22px; gap: 10px; }
  .scrub { order: -1; flex-basis: 100%; }
  .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .flipper, .book, .face .shade { transition: none !important; }
  .dust { display: none; }
}

/* =========================== LINKS ON PAGES =========================== */
a.ghost, label.ghost { text-decoration: none; display: inline-block; cursor: pointer; }
.ghost.danger { color: #e7a0a8; border-color: rgba(231,160,168,.35); }
.ghost.danger:hover { background: rgba(231,160,168,.12); }
.edit-link {
  color: var(--accent); text-decoration: none; font-style: italic; font-size: 3cqw;
  opacity: .55; transition: opacity .2s; position: relative; z-index: 2;
}
.edit-link:hover { opacity: 1; text-decoration: underline; }

/* =========================== WRITING DESK =========================== */
.writer {
  position: relative; z-index: 1; display: grid; gap: 22px;
  grid-template-columns: 270px minmax(0, 1fr) minmax(0, 420px);
  max-width: 1400px; margin: 0 auto; padding: 8px 24px 28px;
  height: calc(100vh - 76px);
}

/* day list */
.days {
  display: flex; flex-direction: column; min-height: 0;
  background: rgba(255,255,255,.03); border: 1px solid rgba(230,207,154,.15); border-radius: var(--radius); padding: 16px;
}
.days-count { font-size: 16px; color: #cfc4b4; }
.days-count b { color: var(--gold); font-family: var(--serif); font-size: 26px; }
.bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); margin: 8px 0 14px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .4s; }
.days-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.days-tools input, .days-tools select {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(230,207,154,.25);
  background: rgba(0,0,0,.25); color: var(--paper); outline: none; font-size: 16px;
}
.days-tools select option { background: var(--night-2); }
.days-tools input:focus, .days-tools select:focus { border-color: var(--gold); }
.day-list { list-style: none; overflow-y: auto; flex: 1; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.day-list::-webkit-scrollbar { width: 8px; }
.day-list::-webkit-scrollbar-thumb { background: rgba(230,207,154,.2); border-radius: 8px; }
.day-list .month {
  position: sticky; top: 0; z-index: 1; background: #1d1a25; padding: 10px 6px 6px;
  font-family: var(--serif); color: var(--gold); font-size: 18px; letter-spacing: .05em;
}
.day-list .empty { color: #a99c8b; font-style: italic; padding: 12px 6px; }
.day-list button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; color: #cfc4b4; font-size: 16px; transition: background .15s;
}
.day-list button:hover { background: rgba(230,207,154,.08); }
.day-list button.active { background: rgba(201,164,92,.2); color: var(--paper); }
.dl-num { width: 32px; flex: none; text-align: right; font-family: var(--serif); color: #8d8296; }
.day-list button.written .dl-num { color: var(--gold); }
.dl-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-text em { opacity: .55; }
.dl-dot { color: var(--gold); font-size: 10px; }
.days-io { display: flex; gap: 8px; margin-top: 12px; }
.days-io > * { flex: 1; text-align: center; font-size: 15px; }

/* editor */
.editor { display: flex; flex-direction: column; min-height: 0; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ed-day { text-align: center; }
.ed-daynum { font-family: var(--serif); font-size: 38px; color: var(--gold); line-height: 1; }
.ed-date { color: #cfc4b4; font-style: italic; font-size: 18px; }
.ed-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #a99c8b; margin: 8px 0 6px; }
.ed-label span { text-transform: none; letter-spacing: 0; font-style: italic; opacity: .8; }
.ed-title, .ed-body {
  width: 100%; border-radius: 12px; border: 1px solid rgba(230,207,154,.2); outline: none;
  background: var(--paper); color: var(--ink); transition: box-shadow .2s, border-color .2s;
}
.ed-title:focus, .ed-body:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,92,.25); }
.ed-title { font-family: var(--serif); font-weight: 600; font-size: 26px; padding: 10px 16px; }
.ed-body {
  flex: 1; min-height: 240px; resize: none; padding: 18px 20px;
  font-family: var(--body); font-size: 20px; line-height: 1.65;
  background-image: repeating-linear-gradient(transparent 0 32px, rgba(138,47,63,.08) 32px 33px);
  background-attachment: local; background-position: 0 17px;
}
.ed-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; font-size: 15px; color: #a99c8b; margin: 10px 2px; }
.fit { color: #e6c27a; }
.status.ok { color: #9fd49a; }
.status.warn { color: #e6c27a; }
.status.err { color: #f29aa6; }
.ed-actions { display: flex; gap: 10px; align-items: center; }
.ed-actions .btn-primary { width: auto; flex: 1; padding: 12px 18px; font-size: 19px; }
.ed-actions .btn-primary small { font-size: 13px; opacity: .7; font-family: var(--body); }
.ed-actions .ghost { padding: 12px 16px; }

/* preview */
.preview { display: flex; flex-direction: column; align-items: center; min-height: 0; }
.preview-label { align-self: flex-start; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #a99c8b; margin-bottom: 10px; }
.preview-page {
  position: relative; width: min(100%, calc((100vh - 150px) * .72)); aspect-ratio: .72;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}
.preview-page .page.side-r { border-radius: 4px 10px 10px 4px; }
.page.ghost .poem, .page.ghost .pg-title { opacity: .38; }

@media (max-width: 1150px) {
  .writer { grid-template-columns: 240px minmax(0, 1fr); height: auto; }
  .preview { grid-column: 1 / -1; }
  .preview-page { width: min(100%, 440px); }
  .days { max-height: calc(100vh - 100px); }
}
@media (max-width: 760px) {
  .writer { grid-template-columns: 1fr; padding: 8px 16px 24px; }
  .days { max-height: 300px; }
  .ed-body { min-height: 300px; }
  .ed-actions { flex-wrap: wrap; }
  .ed-actions .btn-primary { flex-basis: 100%; }
  .ed-actions .ghost { flex: 1; text-align: center; }
  .user .ghost { padding: 6px 10px; font-size: 14px; }
}

/* text-style buttons on the login card */
.link-btn { border: 0; background: none; color: var(--accent); font-size: 16px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--leather); }
.link-btn.center { display: block; margin: 10px auto 0; }

/* book start date (Writing Desk) */
.start-setting { margin-bottom: 12px; }
.start-setting label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #a99c8b; margin-bottom: 5px; }
.start-setting input {
  width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(230,207,154,.25);
  background: rgba(0,0,0,.25); color: var(--paper); outline: none; font-size: 16px; color-scheme: dark;
}
.start-setting input:focus { border-color: var(--gold); }
