:root {
  --paper: #f6f1e8;
  --paper-2: #efe6d6;
  --card: #fffdf8;
  --ink: #1c2430;
  --muted: #5c6570;
  --line: #e2d6c4;
  --accent: #c45c26;
  --accent-2: #9a3f16;
  --bold: #8b1e3f;
  --ok: #2d6a4f;
  --warn: #9a6b12;
  --learn: #2c5aa0;
  --danger: #9b2c2c;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.08);
  --radius: 18px;
  --nav-h: calc(64px + env(safe-area-inset-bottom));
  --font-ui: Arial, Helvetica, sans-serif;
  --font-vocab: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font-ui); }
body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }
#app { min-height: 100dvh; }

.screen {
  min-height: 100dvh;
  padding: 20px 20px calc(var(--nav-h) + 20px);
}
.screen.auth { padding-bottom: 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-foot {
  margin: 20px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}
.auth-foot a { color: var(--accent-2); }

.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
}
.brand img, .brand svg { width: 48px; height: 48px; border-radius: 12px; }
.brand h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.03em; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.35; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.field > span small { font-weight: 400; }
input:not([type]),
input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 48px;
}
input:not([type]),
input[type="text"], input[type="password"], input[type="number"], input[type="search"] {
  height: 48px;
  font-size: 1rem;
  line-height: 1.2;
}
select,
select option {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.3;
}
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c6570' d='M2.4 4.2L6 8.1l3.6-3.9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 36px;
}
textarea { min-height: 72px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.btn:disabled { opacity: 0.5; }
.btn.secondary { background: var(--paper-2); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--accent-2); }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--danger); }
.btn.row { width: auto; flex: 1; }

.row { display: flex; gap: 10px; }
.hint { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.error {
  background: #fde8e8;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 14px;
}
.okmsg {
  background: #e7f4ec;
  color: var(--ok);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-banner input {
  max-width: 8rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}
.continue-note {
  background: #e8eef8;
  color: var(--learn);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 14px;
  font-size: 0.92rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-2);
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

.book-search { margin: 0 0 12px; }
.book-hits {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -4px 0 12px;
}
.page-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: -4px 0 14px;
  padding: 4px 0 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 8px 14px;
  font-weight: 700;
}
.page-tab.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.two-col,
.filters .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.two-col > .card { min-width: 0; }
.two-col .field { margin-bottom: 14px; }
.filters .grid { margin: 0 0 4px; }
.filters .grid .field { margin-bottom: 10px; }
.filters > .field { margin-bottom: 12px; }
.filters .grid.check-row {
  align-items: start;
  margin: 0 0 8px;
}
.filters .grid.check-row .check {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
  align-items: flex-start;
}
.filters .grid.check-row .check input { margin-top: 2px; flex: 0 0 20px; }
.count-line {
  margin: 12px 0 0;
  font-weight: 700;
  color: var(--ink);
}
.learn-split {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0 14px;
}
.filters .learn-split {
  margin: 6px 0 14px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 4px 0 10px;
}
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  padding: 8px 4px env(safe-area-inset-bottom);
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  z-index: 20;
}
.nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.62rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  padding: 4px 2px;
  white-space: nowrap;
}
.nav button.active { color: var(--accent-2); font-weight: 700; }
.nav svg { width: 22px; height: 22px; }

.flash {
  margin-top: 12px;
  min-height: 42vh;
  display: flex;
  flex-direction: column;
}
.flash-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 20px;
  text-align: center;
  min-height: 240px;
}
.flash-card .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.flash-card .term {
  font-family: var(--font-vocab);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.flash-card .term.bold { font-weight: 700; }
.flash-card .back {
  font-family: var(--font-vocab);
  font-size: 1.6rem;
}
.flash-card.type-card { cursor: default; text-align: center; }
.drill-compare {
  margin-top: 12px;
}
.drill-compare .label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 2px;
}
.drill-compare .wrong-typed {
  font-family: var(--font-vocab);
  font-size: 1.25rem;
  color: var(--danger);
  text-decoration: line-through;
}
.drill-input {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 48px;
  font-size: 16px;
  text-align: center;
}
.progress-line { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }

.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 8px;
}
.item-list .en,
.item-list .de {
  font-family: var(--font-vocab);
}
.item-list .en { color: inherit; }
.item-list .en.bold { font-weight: 700; }
.item-edit input[type="text"] {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-family: var(--font-vocab);
}
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
.status {
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--paper-2);
}
.status.new { background: #e8eef8; color: var(--learn); }
.status.learning { background: #f8efd6; color: var(--warn); }
.status.mastered { background: #e3f3ea; color: var(--ok); }

.review-chapter { margin: 0 0 8px; }
.review-chapter-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0;
  min-height: 40px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.review-chapter-input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.review-ex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
}
.review-ex input {
  width: 6.5rem;
  min-height: 36px;
  padding: 4px 8px;
  font-weight: 700;
  color: var(--accent-2);
}
.review-ex .ico {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}
.review-ex .ico:disabled,
.review-ex .ex-split:disabled {
  opacity: 0.35;
}
.review-ex .ex-split {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  background: var(--paper-2);
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.78rem;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 42px 42px;
  align-items: center;
  column-gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  margin: 0 0 6px;
}
.review-row.framed {
  border-style: dashed;
  background: #f3eef6;
}
.review-row.ignored {
  opacity: 0.42;
}
.review-row .en,
.review-row .de {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  font-family: var(--font-vocab);
}
.review-row .en.bold {
  font-weight: 700;
  color: var(--bold);
}
.review-row.ignored .en,
.review-row.ignored .de {
  text-decoration: line-through;
}
.review-row .dash {
  color: var(--line);
  font-size: 0.95rem;
}
.review-row .ico {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: var(--paper-2);
  color: var(--muted);
  font-weight: 800;
  font-size: 1rem;
}
.review-row .bold-btn.on {
  background: var(--bold);
  color: #fff;
}
.review-row .skip-btn.on {
  background: var(--danger);
  color: #fff;
}

@media (max-width: 520px) {
  .review-row {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    grid-template-areas:
      "en bold skip"
      "de de de";
  }
  .review-row .en { grid-area: en; }
  .review-row .de { grid-area: de; }
  .review-row .dash { display: none; }
  .review-row .bold-btn { grid-area: bold; }
  .review-row .skip-btn { grid-area: skip; }
}

.hidden-file { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.install {
  background: #fff4e8;
  border: 1px dashed var(--accent);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.install a { color: var(--accent-2); }

.busy { opacity: 0.7; pointer-events: none; }
.group-h {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  color: var(--accent-2);
}
.group-h small { color: var(--muted); font-weight: 400; }

.kv {
  display: grid;
  gap: 12px;
  margin: 0;
}
.kv > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 10px;
  align-items: baseline;
}
.kv dt {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.kv dd {
  margin: 0;
  font-weight: 700;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
}
.session-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-2);
  border-radius: 14px;
  padding: 8px 8px 8px 14px;
  min-height: 48px;
}
.session-main { flex: 1; min-width: 0; }
.session-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.session-title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-weight: 700;
  padding: 4px 6px 4px 0;
  min-height: 28px;
  cursor: text;
  border-radius: 8px;
}
.session-title::placeholder { color: var(--ink); opacity: 1; font-weight: 700; }
.session-title:hover { background: rgba(255,255,255,0.35); }
.session-title:focus {
  outline: none;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.session-edit {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.session-edit svg { width: 16px; height: 16px; }
.session-edit:hover,
.session-edit:focus {
  color: var(--accent);
  background: rgba(255,255,255,0.55);
  outline: none;
}
.session-lang {
  flex: 0 0 auto;
  margin: 0;
}
.session-date { font-weight: 700; }
.session-stat { color: var(--muted); font-size: 0.88rem; margin-top: 1px; line-height: 1.3; }
.session-row .btn {
  width: auto;
  min-height: 40px;
  padding: 8px 12px;
  flex: 0 0 auto;
}
.session-row.pending-del {
  outline: 2px solid var(--danger);
  background: #fde8e8;
}
.confirm-card {
  border-color: #f0c4c4;
  margin-bottom: 14px;
}
.confirm-card p { margin: 0 0 12px; }
@media (max-width: 480px) {
  .session-row { flex-wrap: wrap; }
  .session-main { flex: 1 1 100%; }
}

.pick {
  outline: 2px solid var(--accent);
}

.chart-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 10px 8px;
  margin: 0 0 10px;
  box-shadow: var(--shadow);
}
.chart-svg {
  width: 100%;
  height: var(--plot-h, 156px);
  display: block;
  color: var(--muted);
}
.chart-plot {
  position: relative;
}
.chart-end-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.chart-end-label {
  position: absolute;
  left: var(--label-left, 76%);
  width: var(--label-width, 22%);
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 4px var(--card), 0 0 8px var(--card);
}
.chart-end-label.on { font-weight: 800; }
.chart-end-label.dim { opacity: 0.32; }
.chart-xticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 8px 0 26px;
}
.compare-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.compare-picks .check {
  margin: 0;
  font-size: 0.9rem;
}

.leaderboard-wrap { margin: 18px 0 8px; }
.leaderboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.leaderboard th {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px 8px;
  background: var(--paper-2);
}
.leaderboard th:last-child { text-align: right; }
.lb-group + .lb-group td {
  border-top: 1px solid var(--line);
}
.lb-group td {
  padding: 7px 12px;
  vertical-align: middle;
}
.lb-group tr + tr td {
  border-top: 1px dashed var(--line);
}
.lb-badge {
  width: 7.2rem;
  vertical-align: top;
  text-align: center;
  padding-top: 10px;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
}
.lb-group tr + tr .lb-badge { border-top: 0; }
.lb-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.lb-level .badge-stack {
  width: 52px;
  height: 52px;
}
.lb-level-name {
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--ink);
}
.lb-name { min-width: 0; }
.lb-xp {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}
.lb-me .lb-name,
.lb-me .lb-xp { color: var(--ink); font-weight: 700; }

.reward-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.page-head-tools {
  margin-left: auto;
  align-self: flex-start;
  flex: 0 0 auto;
}
@media (max-width: 520px) {
  .page-head-tools { width: 100%; margin-left: 0; }
}
.reward-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.reward-copy strong {
  font-size: 0.98rem;
}
.reward-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}
.reward-streak { font-weight: 700; color: var(--ink) !important; }
.badge-stack {
  --star: #c45c4a;
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: block;
}
.badge-stack.has-ring {
  width: 88px;
  height: 88px;
}
.badge-ring {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}
.badge-buddy {
  position: relative;
  z-index: 1;
  width: 68%;
  height: 68%;
  margin: 16%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}
.badge-stack:not(.has-ring) .badge-buddy {
  width: 100%;
  height: 100%;
  margin: 0;
}
.badge-gem {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 30%;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}
.badge-stack.up-ring::after,
.badge-stack.up-glow::after,
.badge-stack.up-gold::after,
.badge-stack.up-sparkle::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
}
.badge-stack.up-ring::after {
  border: 1.5px solid var(--star);
  opacity: 0.45;
}
.badge-stack.up-glow::after {
  border: 2px solid var(--star);
  box-shadow: 0 0 8px var(--star);
  opacity: 0.7;
}
.badge-stack.up-gold::after {
  border: 2px solid #e0b422;
  box-shadow: 0 0 8px rgba(224, 180, 34, 0.55);
}
.badge-stack.up-sparkle::after {
  border: 2px solid #7ec8ff;
  box-shadow: 0 0 0 3px rgba(224, 180, 34, 0.35), 0 0 10px rgba(126, 200, 255, 0.7);
}

.import-book { margin-bottom: 16px; }
.import-book .book-cover,
.import-book .book-pick-ph.book-cover {
  width: 88px;
  height: 118px;
}
.book-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}
.book-cover {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #ddd;
  flex: 0 0 auto;
}
.cover-pick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cover-pick-preview {
  flex: 0 0 auto;
}
.cover-pick-preview .book-cover,
.cover-pick-preview .book-pick-ph.book-cover {
  width: 72px;
  height: 96px;
  margin: 0;
}
.cover-pick-actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cover-pick-actions .hint { margin: 0; }
.book-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-hero-copy strong { font-size: 1.05rem; }
.book-hero-copy span { color: var(--muted); font-size: 0.86rem; }
.book-picker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0 0 8px;
  -webkit-overflow-scrolling: touch;
}
.book-pick {
  flex: 0 0 auto;
  width: 76px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  text-align: center;
  min-height: 0;
}
.book-pick img,
.book-pick-ph {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 6px;
  background: var(--paper-2);
}
.book-pick span {
  display: block;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--muted);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-pick.on {
  border-color: var(--accent);
  border-radius: 10px;
}
.book-pick.on span { color: var(--ink); font-weight: 700; }

.fav-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin: 0 0 12px;
}
.fav-card.is-default { border-color: var(--accent); }
.fav-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.fav-copy strong { font-size: 1.02rem; }
.fav-copy span { color: var(--muted); font-size: 0.86rem; }
.fav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.fav-actions .btn { width: auto; min-height: 40px; padding: 8px 12px; font-size: 0.86rem; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}
