/* Books app. A bookshelf at night under a reading lamp:
   night-blue room, cloth bindings, paper-coloured text, gilt stamping.
   Each colour means one thing, and every state also has its word:
     gilt  = press this to play / where you are (the ribbon bookmark)
     sage  = on this phone, ready
     rose  = a problem
   Book titles and read-aloud text use the serif already on the phone; controls use its sans. */

:root {
  --ground: #1b2029;
  --shelf: #232a35;
  --shelf-high: #2c3441;
  --cloth: #2f3a4d;
  --rule: #3b4453;
  --ink: #ebe4d5;
  --ink-soft: #b9b2a4;
  --gilt: #d6b56b;
  --gilt-light: #e3c784;
  --on-gilt: #1b2029;
  --sage: #a9c6a2;
  --rose: #eba59b;
  --reading: rgba(214, 181, 107, 0.13);

  --font-ui: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;

  --tabs-h: 60px;
  --mini-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

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

html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.5 var(--font-ui);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
  overflow-wrap: break-word;
}
body.has-mini { padding-bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 28px); }
body.full { padding-bottom: 0; }
body.sheet-open { overflow: hidden; }

#view { display: block; padding: 16px 16px 8px; max-width: 760px; margin: 0 auto; outline: none; }

h1, h2, h3 { margin: 0; }
h1 { font-family: var(--font-book); font-weight: 600; font-size: 30px; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 650; line-height: 1.3; }
h3 { font-size: 15.5px; font-weight: 650; margin-top: 14px; }
.book-face { font-family: var(--font-book); font-weight: 600; }
a { color: var(--ink); }
p { margin: 0.5em 0; }

:focus-visible { outline: 3px solid var(--gilt); outline-offset: 2px; }

.sub { color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: 14.5px; }
.problem { color: var(--rose); }
.fine { font-size: 13px; color: var(--ink-soft); }

/* ── banner and toast ── */
.banner {
  margin: 0;
  padding: 10px 16px;
  background: var(--shelf-high);
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
}
.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabs-h) + var(--mini-h) + var(--safe-b) + 22px);
  z-index: 60;
  margin: 0;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--ground);
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 600;
}
body.full .toast { bottom: calc(var(--safe-b) + 230px); }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--shelf);
  color: var(--ink);
  font: 600 16px/1.25 var(--font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--shelf-high); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn.primary { background: var(--gilt); border-color: var(--gilt); color: var(--on-gilt); }
.btn.primary:hover { background: var(--gilt-light); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-soft); padding: 0 10px; }
.btn.quiet:hover { color: var(--ink); background: transparent; }
.btn.wide { width: 100%; padding: 10px 16px; }

/* ── tabs and mini player ── */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--shelf);
  border-top: 1px solid var(--rule);
}
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 16px;
}
.tabs a[aria-current] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current]::after {
  content: "";
  position: absolute;
  left: 32%;
  right: 32%;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--gilt);
}

.mini {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 8px);
  z-index: 21;
  display: flex;
  height: var(--mini-h);
  background: var(--shelf-high);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.mini-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-title, .mini-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-title { font-family: var(--font-book); font-size: 16.5px; }
.mini-sub { font-size: 13.5px; color: var(--ink-soft); }
.mini-play {
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: none;
  border: 0;
  border-left: 1px solid var(--rule);
  color: var(--gilt);
  font: 600 12.5px var(--font-ui);
  cursor: pointer;
}
.mini-play span { color: var(--ink); }
.mini-play svg { width: 30px; height: 30px; fill: currentColor; }

/* ── covers, and the cloth tile when there is none ── */
.cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 2px 5px 5px 2px;
  overflow: hidden;
  background: var(--cloth);
  box-shadow: inset 5px 0 0 rgba(0, 0, 0, 0.2);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover img.square { object-fit: contain; object-position: center bottom; }
.cover.has-img .tile > *, .cover.has-img .tile::before { visibility: hidden; }
.cover.is-square.large, .cover.is-square.art-cover { aspect-ratio: 1; }
.cover.is-square.large img, .cover.is-square.art-cover img { object-fit: cover; }
.tile {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16% 13% 16% 16%;
  text-align: center;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 7% 7% 7% 10%;
  border: 1px solid rgba(214, 181, 107, 0.55);
}
.tile-title {
  font-family: var(--font-book);
  font-weight: 600;
  color: var(--gilt);
  font-size: 14px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-author { margin-top: 6px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.2; }
.cover.mini-cover { flex: 0 0 46px; width: 46px; aspect-ratio: 1; border-radius: 4px; box-shadow: none; }
.cover.mini-cover img.square { object-fit: cover; }
.cover.mini-cover .tile-title, .cover.mini-cover .tile-author { display: none; }
.cover.mini-cover .tile::before { inset: 10%; }
.cover.large { width: 132px; }
.cover.large .tile-title { font-size: 16px; }
.cover.art-cover { height: min(24vh, 280px); }
.cover.art-cover .tile-title { font-size: 19px; }

/* The ribbon bookmark: where you are. */
.ribbon-mark, .resume .cover::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 22px;
  background: var(--gilt);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
.resume .cover::after { position: absolute; top: 0; right: 12px; width: 14px; height: 30px; }

/* ── library ── */
.page-head { margin: 4px 0 14px; }
.page-head .sub { margin: 4px 0 0; font-size: 15px; }

.continue h2 { margin: 6px 0 10px; }
.shelf {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0 -16px 18px;
  padding: 2px 16px 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf li { flex: 0 0 120px; scroll-snap-align: start; }
.resume {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.resume-title { font-family: var(--font-book); font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-where { font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); }

input, select, textarea { font: 17px/1.4 var(--font-ui); color: var(--ink); }
input[type="search"], input[type="password"], input[type="text"], input:not([type]), select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--shelf);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip, .qbtn, .seg button {
  min-height: 48px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: 600 15.5px var(--font-ui);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.chip { flex: 0 0 auto; padding: 0 16px; border-radius: 24px; }
.chip:hover, .qbtn:hover, .seg button:hover { background: var(--shelf); }
.chip[aria-pressed="true"], .qbtn[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip[aria-pressed="true"]::before, .qbtn[aria-pressed="true"]::before, .seg button[aria-pressed="true"]::before { content: "✓ "; }

.grid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 22px 14px;
}
.book { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.book .cover { margin-bottom: 4px; }
.book:hover .book-title { text-decoration: underline; }
.book-title { font-family: var(--font-book); font-size: 15.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book-author { font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-tags { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.tag-phone { color: var(--sage); font-weight: 700; }
.tag-problem { color: var(--rose); font-weight: 700; }
.empty { grid-column: 1 / -1; color: var(--ink-soft); }
.more { text-align: center; color: var(--ink-soft); font-size: 14px; min-height: 1px; }

/* ── item page ── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  margin-left: -8px;
  padding-right: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 16px;
}
.back svg { width: 24px; height: 24px; }
.item-head { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: end; margin-top: 2px; }
.item-meta h1 { font-size: 25px; line-height: 1.2; }
.author { margin: 6px 0 0; color: var(--ink-soft); font-size: 16.5px; }
.facts { margin: 6px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.states { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; font-size: 15.5px; font-weight: 600; }
.state.ready { color: var(--sage); }
.state.problem { color: var(--rose); }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.chapters h2 { margin: 30px 0 6px; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-list li + li .ch { border-top: 1px solid var(--rule); }
.ch {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: baseline;
  min-height: 56px;
  padding: 13px 2px;
  background: none;
  border: 0;
  color: var(--ink);
  font: 16px/1.35 var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.ch:hover .ch-title { text-decoration: underline; }
.ch-n { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ch-len { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.ch[aria-current] .ch-title { font-weight: 700; }
.ch-now { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--gilt); font-size: 13.5px; font-weight: 700; }
.ch-now::before { content: ""; width: 9px; height: 15px; background: var(--gilt); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }

/* ── sheets ── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-back { position: absolute; inset: 0; background: rgba(9, 11, 15, 0.62); }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 20px 16px calc(12px + var(--safe-b));
  background: var(--shelf);
  border-top: 1px solid var(--rule);
  border-radius: 14px 14px 0 0;
  animation: rise 0.18s ease-out;
}
.sheet:focus { outline: none; }
@keyframes rise { from { transform: translateY(28px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.sheet-sub { margin: 2px 0 10px; color: var(--ink-soft); font-family: var(--font-book); }
.sheet-actions { position: sticky; bottom: calc(-12px - var(--safe-b)); display: grid; gap: 10px; margin-top: 14px; padding: 10px 0 12px; background: var(--shelf); }
.sheet .speed, .sheet .sleep { margin-top: 14px; }
.sheet input, .sheet select, .sheet textarea { background: var(--ground); }
.mk-list { max-height: 34dvh; overflow-y: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cb-list { list-style: none; margin: 10px 0 0; padding: 0; }
.cb-list li + li { border-top: 1px solid var(--rule); }
.cb-title { display: block; font-family: var(--font-book); font-size: 16.5px; line-height: 1.3; }
.cb-author { display: block; font-size: 13.5px; color: var(--ink-soft); }
.in-sheet { margin-top: 4px; }

/* ── forms ── */
.form > label, .form label:not(.pick) { display: block; margin: 16px 0 6px; font-size: 15.5px; font-weight: 600; }
.form label.pick, .pick { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 4px 0; font-weight: 400; font-size: 16px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--gilt); }
fieldset { margin: 16px 0 0; padding: 0; border: 0; }
legend { padding: 0; font-size: 15.5px; font-weight: 600; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--rule); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--ink); border: 4px solid var(--ground); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--ground); }

/* ── full-screen player and read now ── */
.top-row { display: flex; justify-content: space-between; margin: -8px -10px 0; }
.top-row .btn { gap: 4px; }
.player { display: flex; flex-direction: column; gap: 6px; min-height: calc(100dvh - 24px); }
.art { display: flex; justify-content: center; margin-top: 4px; }
.titles { text-align: center; }
.titles h1 { font-size: 21px; line-height: 1.25; }
.titles .author { margin-top: 2px; font-size: 15.5px; }
.where { margin: 6px 0 0; font-size: 15px; }
.pstatus { margin: 0; min-height: 1.45em; color: var(--ink-soft); font-size: 15px; text-align: center; }
.scrub { margin-top: auto; }
.times { display: flex; justify-content: space-between; margin-top: -6px; color: var(--ink-soft); font-size: 14px; font-variant-numeric: tabular-nums; }

.transport { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr; align-items: start; gap: 2px; }
.tbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 64px;
  padding: 6px 0;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font: 600 12.5px/1.2 var(--font-ui);
  text-align: center;
  cursor: pointer;
}
.tbtn svg { width: 36px; height: 36px; fill: currentColor; }
.tbtn svg text { fill: currentColor; font-family: var(--font-ui); }
.tbtn.big svg { width: 76px; height: 76px; padding: 17px; border-radius: 50%; background: var(--gilt); fill: var(--on-gilt); }
.tbtn.big:hover svg { background: var(--gilt-light); }
.tbtn:disabled { opacity: 0.38; cursor: default; }
.tbtn:active:not(:disabled) svg { transform: scale(0.96); }

.speed, .sleep { padding-top: 8px; border-top: 1px solid var(--rule); }
.player input[type="range"] { height: 40px; }
.line { display: flex; justify-content: space-between; align-items: baseline; font-size: 15.5px; font-weight: 600; }
.line output { color: var(--ink); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.quick.three { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
.qbtn { border-radius: 8px; padding: 0 4px; }

.read { padding-bottom: 250px; }
.read-book { margin: 6px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.read-chapter { margin: 2px 0 14px; font-size: 22px; line-height: 1.25; }
.read-text p[data-p] {
  margin: 0 -10px 6px;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--font-book);
  font-size: 19px;
  line-height: 1.62;
  cursor: pointer;
  transition: background-color 0.2s;
}
.read-text p.now { background: var(--reading); }
.read-text p.now-first::before {
  content: attr(data-mark);
  display: block;
  width: max-content;
  margin: -2px 0 4px;
  padding: 2px 14px 4px 8px;
  background: var(--gilt);
  color: var(--on-gilt);
  font: 700 13px/1.3 var(--font-ui);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 8px 12px calc(6px + var(--safe-b));
  background: var(--shelf);
  border-top: 1px solid var(--rule);
}
.dock .pstatus { font-size: 14px; }
.dock-row { display: flex; justify-content: space-between; }
.dock-row .btn { min-height: 44px; font-size: 15px; color: var(--ink); }
.empty-full { display: grid; justify-items: center; gap: 14px; margin-top: 28vh; text-align: center; }

/* ── ask ── */
.ask-books h2, .ask-past h2 { margin-bottom: 6px; }
.picked { list-style: none; margin: 0 0 8px; padding: 0; }
.picked li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--rule); font-family: var(--font-book); font-size: 16.5px; }
.picked li.sub { font-family: var(--font-ui); font-size: 15.5px; border: 0; }
.ask-form { margin-top: 8px; }
.ask-voice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
#ask-mic[aria-pressed="true"] { border-color: var(--gilt); color: var(--gilt); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 0 14px; }
.seg button + button { border-left: 1px solid var(--rule); }
.ground-words { margin: 0; font-size: 15px; }
#ask-go { margin-top: 18px; }
.speaking { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; background: var(--shelf); border-radius: 8px; font-size: 15px; }
.speaking span { flex: 1 1 100%; }
.ask-convo { margin-top: 14px; }
.turn { padding: 14px 0; border-top: 1px solid var(--rule); }
.who { display: block; margin: 0 0 2px; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }
.turn-q { margin: 0 0 12px; font-size: 17px; }
.turn-a p:not(.who):not(.fine) { font-family: var(--font-book); font-size: 18px; line-height: 1.55; }
.turn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
details.full summary { display: flex; align-items: center; min-height: 48px; color: var(--ink-soft); cursor: pointer; }
.cites { margin: 4px 0; padding-left: 20px; font-size: 15px; }
.cites li + li { margin-top: 6px; }
cite { font-style: normal; font-weight: 700; }
.ask-past { margin-top: 30px; }
.past-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.past { list-style: none; margin: 0; padding: 0; }
.past-row { display: block; min-height: 48px; padding: 11px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.past-row[aria-current] .past-q { font-weight: 700; }
.past-q { display: block; font-family: var(--font-book); font-size: 16.5px; line-height: 1.3; }
.past-meta { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 13.5px; }

/* ── settings ── */
.settings section, .block { margin-top: 28px; }
.settings section:first-child { margin-top: 8px; }
.settings h2, .block h2 { margin-bottom: 4px; }
.style { padding: 6px 0 10px; border-bottom: 1px solid var(--rule); }
.style label { font-weight: 600; }
.style input, .style textarea { margin-top: 4px; font-weight: 400; }
#style-add { margin-top: 10px; }
.save-row { margin-top: 26px; }
.save-row .pstatus { text-align: left; margin-top: 8px; }
.usage { width: 100%; border-collapse: collapse; font-size: 15px; }
.usage th { width: 42%; padding: 10px 10px 10px 0; text-align: left; font-weight: 600; vertical-align: top; }
.usage td { padding: 10px 0; }
.usage tr + tr { border-top: 1px solid var(--rule); }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.dl-list li.sub { border: 0; }
.dl-title { font-family: var(--font-book); font-size: 16.5px; }
.dl-size { display: block; color: var(--ink-soft); font: 13.5px/1.4 var(--font-ui); }

/* ── sign in ── */
.login { max-width: 360px; margin: 9vh auto 0; text-align: center; }
.login img { border-radius: 18px; }
.login h1 { margin: 10px 0 8px; }
.login form { text-align: left; }
.login .btn { margin-top: 22px; }

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .cover.large { width: 170px; }
  .item-head { grid-template-columns: 170px 1fr; }
  .mini { left: 50%; right: auto; width: min(744px, calc(100% - 16px)); transform: translateX(-50%); }
  .dock > * { max-width: 728px; margin-left: auto; margin-right: auto; }
}

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