@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750&display=swap");
:root {
  --app-safe-area-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --app-safe-area-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --app-safe-area-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --app-safe-area-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --bg: #f7f6f2;
  --paper: #fffefa;
  --ink: #292e29;
  --muted: #7c7f75;
  --line: #e7e6de;
  --accent: #8b4936;
  --accent-light: #f3e8df;
  --green: #536c53;
  --green-light: #eaf0e7;
  --sidebar: 246px;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b77a55;
  outline-offset: 4px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #b77a5580;
  border-color: var(--accent);
}
svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.7;
  flex: none;
  vertical-align: middle;
}
button {
  border: 0;
  background: none;
}
.serif,
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 12px;
}
.skip-link:focus {
  top: 8px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  border-right: 1px solid var(--line);
  background: #f1f1eb;
  display: flex;
  flex-direction: column;
  padding: calc(34px + var(--app-safe-area-top)) max(23px, var(--app-safe-area-right)) 34px
    max(23px, var(--app-safe-area-left));
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 30px;
  letter-spacing: -1.4px;
  padding-left: 9px;
}
.brand-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.brand-mark svg {
  width: 31px;
  height: 31px;
}
.brand-tag {
  font-size: 9px;
  letter-spacing: 2px;
  color: #85877c;
  padding: 13px 0 39px 12px;
  text-transform: uppercase;
}
.nav-caption {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: #94968b;
  padding: 0 13px 13px;
}
.nav-list {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  text-align: left;
  border-radius: 8px;
  font-size: 13px;
  color: #74786b;
}
.nav-item.active {
  background: #e6e8dc;
  color: #424e38;
  font-weight: 600;
}
.nav-item:hover {
  background: #e9eae2;
}
.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  min-width: 21px;
  text-align: center;
  background: #dadfce;
  padding: 3px 5px;
  border-radius: 4px;
}
.sidebar-note {
  margin-top: auto;
  border-top: 1px solid #dddfd3;
  padding: 25px 11px 18px;
}
.sidebar-note .flower {
  color: #8d977a;
  font-size: 29px;
}
.sidebar-note p {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
  margin: 10px 0;
  color: #59634b;
}
.sidebar-note small {
  font-size: 10px;
  color: #949789;
}
.sidebar-footer {
  font-size: 11px;
  color: #85897a;
  padding: 16px 11px 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sidebar-footer .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7d8e65;
}
.workspace {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
.topbar {
  height: calc(84px + var(--app-safe-area-top));
  padding: var(--app-safe-area-top) max(49px, var(--app-safe-area-right)) 0
    max(49px, var(--app-safe-area-left));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
}
.breadcrumb {
  font-size: 12px;
  color: #84877c;
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb span:last-child {
  color: #343c31;
}
.top-date {
  margin-left: auto;
  color: #84877c;
  font-size: 11px;
  text-transform: capitalize;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7e8df;
  display: grid;
  place-items: center;
  color: #647056;
}
.avatar svg {
  width: 16px;
}
.main {
  max-width: 1440px;
  margin: auto;
  padding: 41px 49px 32px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 29px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #909181;
  margin: 0 0 11px;
}
.page-heading h1 {
  font-size: 40px;
  letter-spacing: -1.4px;
  margin: 0 0 9px;
  line-height: 1.15;
}
.subtext {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 11px 17px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--accent);
  color: #fffaf1;
  box-shadow: 0 2px 3px #713c2510;
}
.btn-primary:hover {
  background: #773c2b;
}
.btn-outline {
  border: 1px solid #dedfd3;
  background: transparent;
}
.btn-outline:hover {
  background: #eeeee6;
}
.btn-soft {
  background: #eceee4;
  color: #566348;
}
.btn-soft:hover {
  background: #e0e5d5;
}
.btn-link {
  padding: 8px 0;
  min-height: 32px;
  color: var(--accent);
  font-weight: 500;
  font-size: 11px;
}
.btn-link:hover {
  text-decoration: underline;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #8a8d80;
}
.icon-btn:hover {
  background: #eeeee6;
}
.demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 11px;
  color: #84735f;
  padding: 10px 13px;
  border: 1px solid #e8dfcf;
  background: #f4eee2;
  border-radius: 6px;
}
.demo-banner svg {
  width: 15px;
  height: 15px;
}
.demo-banner button {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #805034;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 23px 0;
  margin-bottom: 30px;
}
.stat {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #7b8173;
}
.stat-top svg {
  width: 15px;
  height: 15px;
  color: #939b87;
}
.stat-value {
  font-family: Georgia, serif;
  font-size: 29px;
  line-height: 1.1;
  margin: 12px 0 7px;
}
.stat-foot {
  font-size: 10px;
  color: #929689;
}
.stat-foot .green {
  color: var(--green);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  min-height: 26px;
  gap: 10px;
}
.section-heading h2 {
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.5px;
}
.section-heading small {
  font-family: "DM Sans", sans-serif;
  color: #a1a396;
  font-size: 11px;
  margin-left: 8px;
  font-weight: 400;
}
.section-heading a,
.section-heading button {
  font-size: 11px;
}
.reading-list {
  display: grid;
  gap: 17px;
}
.reading-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 23px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 23px;
  position: relative;
}
.book-cover {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 2px 5px 5px 2px;
  overflow: hidden;
  box-shadow:
    3px 4px 8px #202b2114,
    inset 3px 0 4px #ffffff20;
  display: flex;
  flex-direction: column;
  padding: 15px 12px;
  background: var(--cover-bg, #3a4854);
  color: var(--cover-fg, #eee6ce);
  isolation: isolate;
  flex-shrink: 0;
}
.book-cover:before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid #00000013;
  box-shadow: inset -2px 0 #ffffff20;
  pointer-events: none;
  z-index: 3;
}
.book-cover .cover-author {
  font-size: 7px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  position: relative;
  z-index: 2;
}
.book-cover .cover-title {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.12;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}
.book-cover .cover-art {
  position: absolute;
  bottom: -22px;
  right: -24px;
  width: 130px;
  height: 110px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.18;
  box-shadow:
    0 0 0 10px currentColor,
    0 0 0 22px var(--cover-bg),
    0 0 0 23px currentColor;
  transform: rotate(-25deg);
}
.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 4;
}
.midnight {
  --cover-bg: #283c53;
  --cover-fg: #f1dcaa;
}
.sand {
  --cover-bg: #d6bda0;
  --cover-fg: #34342e;
}
.sand .cover-art {
  border-radius: 0;
  transform: rotate(-35deg);
  bottom: -20px;
  right: -60px;
  opacity: 0.16;
}
.forest {
  --cover-bg: #63755d;
  --cover-fg: #f2e9cb;
}
.terra {
  --cover-bg: #a55c44;
  --cover-fg: #fff1ce;
}
.sky {
  --cover-bg: #9caeac;
  --cover-fg: #263b3b;
}
.book-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.category {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #929484;
  margin-bottom: 8px;
}
.book-title {
  font-size: 23px;
  letter-spacing: -0.6px;
  margin: 0 0 6px;
  line-height: 1.15;
}
.title-button {
  padding: 0;
  text-align: left;
}
.title-button:hover .book-title {
  color: var(--accent);
}
.author {
  font-size: 11px;
  color: #8b8d80;
  margin: 0;
}
.reading-card .icon-btn {
  margin: -5px -8px 0 0;
}
.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #929689;
  margin-top: 22px;
  margin-bottom: 8px;
}
.progress-info strong {
  color: #5b6651;
  font-weight: 500;
}
.progress-track {
  height: 4px;
  background: #e9eade;
  border-radius: 10px;
  overflow: hidden;
}
.progress-track span {
  height: 100%;
  display: block;
  background: #879575;
  border-radius: 10px;
}
.book-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
}
.plan-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #7c806e;
}
.plan-badge svg {
  width: 13px;
  height: 13px;
}
.plan-badge.behind {
  color: #a56d48;
}
.plan-badge.ahead {
  color: #4f6b44;
  font-weight: 500;
}
.reading-card .btn {
  font-size: 10px;
  padding: 8px 11px;
  min-height: 33px;
}
.today-reading {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e2e5d9;
  border-radius: 10px;
  background: #f6f7f0;
}
.today-reading-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #647253;
}
.today-reading-heading svg {
  width: 15px;
  height: 15px;
}
.today-reading-heading > span {
  margin-left: auto;
}
.today-reading-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 10px;
}
.today-reading-stats > div + div {
  border-left: 1px solid #dde2d1;
  padding-left: 12px;
}
.today-reading-stats dt {
  font-size: 11px;
  color: #737a69;
}
.today-reading-stats dd {
  margin: 4px 0 0;
  font-size: 25px;
  font-weight: 500;
  color: #3e5037;
}
.today-reading-stats small {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 400;
}
.today-reading > p {
  margin: 0;
  color: #7a806f;
  font-size: 10px;
  line-height: 1.5;
}
.today-complete {
  background: #edf2e7;
  border-color: #d4dfc6;
}
.today-remaining dd {
  color: #955e3e;
}
.today-complete .today-remaining dd {
  color: #3e6545;
}
.progress-daily-summary {
  color: #67745e;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 9px;
  background: #f0f4e9;
}
.daily-panel {
  background: #e9ecdf;
  border: 1px solid #dfe4d1;
  border-radius: 10px;
  padding: 22px 21px;
  color: #4f5d43;
}
.daily-title {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}
.daily-title svg {
  width: 15px;
  height: 15px;
}
.daily-number {
  font-family: Georgia, serif;
  font-size: 52px;
  letter-spacing: -2px;
  margin: 23px 0 3px;
  line-height: 1;
}
.daily-number span {
  font-size: 16px;
  letter-spacing: 0;
  margin-left: 5px;
}
.daily-desc {
  font-size: 11px;
  color: #7e886f;
  line-height: 1.6;
}
.daily-rule {
  height: 1px;
  background: #d4dbc5;
  margin: 21px 0 17px;
}
.daily-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 10px;
}
.daily-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.daily-row strong {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 500;
}
.daily-row .color-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #697c5d;
  flex: none;
}
.daily-row:nth-child(2) .color-dot {
  background: #ac9275;
}
.daily-panel > .btn {
  width: 100%;
  margin-top: 9px;
  font-size: 11px;
  color: #58674b;
  background: #dbe2cc;
  border: 1px solid #d1d9c0;
}
.mini-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 17px 4px;
  font-size: 10px;
  line-height: 1.8;
  color: #929685;
}
.mini-note svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.activity-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefa;
  margin-top: 3px;
}
.activity-panel h3 {
  font-size: 17px;
  margin: 0 0 4px;
}
.activity-panel p {
  font-size: 10px;
  color: #97998b;
  margin: 0;
}
.week-chart {
  height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 13px;
  margin-top: 14px;
}
.chart-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 100%;
  font-size: 9px;
  color: #969a8b;
}
.chart-bar {
  min-height: 4px;
  width: 100%;
  max-width: 19px;
  background: #d5ddc6;
  border-radius: 3px 3px 0 0;
}
.chart-column.current .chart-bar {
  background: #879774;
}
.chart-column.current {
  color: #5b6b4d;
}
.recent-section {
  margin-top: 32px;
}
.recent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.recent-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffefa;
  display: flex;
  align-items: center;
  padding: 17px;
  gap: 16px;
  text-align: left;
  width: 100%;
}
.recent-card:hover {
  border-color: #c4cab5;
}
.recent-card .book-cover {
  width: 49px;
  padding: 8px 6px;
}
.recent-card .cover-author {
  font-size: 4px;
  letter-spacing: 0.4px;
}
.recent-card .cover-title {
  font-size: 10px;
  margin-top: 7px;
}
.recent-card .cover-art {
  width: 60px;
  height: 50px;
}
.recent-card h3 {
  font-size: 18px;
  margin: 0 0 5px;
  letter-spacing: -0.3px;
}
.recent-card p {
  font-size: 10px;
  color: #8a8e7e;
  margin: 0 0 8px;
}
.recent-card small {
  font-size: 9px;
  color: #969c89;
}
.recent-card .stars {
  margin-left: auto;
  align-self: flex-start;
  color: #a49162;
  font-size: 10px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.footer {
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #a3a597;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.footer-legal {
  flex-basis: 100%;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 12px;
  color: #686f62;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
}
.legal-owner {
  display: block;
  font-size: 11px;
  line-height: 1.7;
}
.legal-owner a { display: inline-block; padding: 8px 0; }
.auth-legal-note { font-size: 12px; color: #686f62; line-height: 1.7; }
.footer .leaf {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer svg {
  width: 13px;
  height: 13px;
}
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.searchbox {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 350px;
}
.searchbox svg {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  color: #999c8f;
}
.searchbox input {
  padding-left: 38px;
}
.tabs {
  display: flex;
  gap: 5px;
  background: #ebede4;
  padding: 4px;
  border-radius: 8px;
}
.tab {
  font-size: 11px;
  padding: 9px 14px;
  border-radius: 5px;
  color: #8a8f7e;
}
.tab.active {
  background: #fffefa;
  color: #4d5b41;
  box-shadow: 0 1px 3px #343c3010;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.library-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.library-card .cover-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 20px;
  background: #f1f0e9;
  border-radius: 5px;
}
.library-card .book-cover {
  width: 110px;
}
.library-card .book-title {
  font-size: 21px;
}
.library-card .author {
  margin-bottom: 10px;
}
.library-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8b907e;
}
.status-label {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--green-light);
  color: var(--green);
  font-size: 9px;
}
.status-label.finished {
  background: #efe9df;
  color: #9c805b;
}
.status-label.wishlist {
  background: #ecedf0;
  color: #7d8594;
}
.library-card .btn {
  width: 100%;
  margin-top: auto;
}
.empty {
  padding: 60px 25px;
  text-align: center;
  border: 1px dashed #d6dbcb;
  border-radius: 10px;
  color: #8d927f;
  background: #f4f4ed;
}
.empty svg {
  width: 37px;
  height: 37px;
  color: #9aa48a;
  margin-bottom: 10px;
}
.empty h2 {
  color: #4b5941;
  font-size: 28px;
  margin: 10px 0;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
  max-width: 340px;
  margin: 10px auto 20px;
}
.timeline {
  width: 100%;
  min-width: 0;
}
.timeline-month {
  margin-bottom: 30px;
}
.timeline-month > h2 {
  font-family: "DM Sans", sans-serif;
  text-transform: capitalize;
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 20px;
  color: #8a8f7f;
}
.timeline-entry {
  margin-left: 8px;
  padding: 0 0 23px 34px;
  border-left: 1px solid #dbe0d1;
  position: relative;
}
.timeline-entry:before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: #82936d;
  border: 4px solid var(--bg);
  border-radius: 50%;
  left: -9px;
  top: 26px;
}
.timeline-entry:last-child {
  padding-bottom: 0;
}
.timeline-entry .recent-card {
  padding: 23px;
  align-items: flex-start;
}
.timeline-entry .book-cover {
  width: 65px;
}
.timeline-entry h3 {
  font-size: 24px;
}
.timeline-entry .timeline-dates {
  font-size: 10px;
  color: #8e9580;
  margin: 10px 0;
}
.timeline-entry .note {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.6;
  color: #737d65;
  margin: 10px 0 0;
}
.settings-grid {
  display: grid;
  gap: 20px;
  width: 100%;
  min-width: 0;
}
.settings-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 26px;
}
.settings-card h2 {
  font-size: 24px;
  margin: 0 0 12px;
}
.settings-card p {
  font-size: 12px;
  line-height: 1.8;
  color: #858b78;
}
.settings-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.danger {
  color: #a45442;
}
.plan-list {
  display: grid;
  gap: 22px;
}
.plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
}
.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-card h2 {
  font-size: 26px;
  margin: 0 0 5px;
}
.plan-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 15px;
  margin: 24px 0;
}
.plan-metrics > div {
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.plan-metrics > div:last-child {
  border: 0;
}
.plan-metrics small {
  display: block;
  font-size: 10px;
  color: #939987;
  margin-bottom: 8px;
}
.plan-metrics strong {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}
.plan-forecast strong {
  color: var(--green);
}
.plan-forecast-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.plan-explanation {
  font-size: 11px;
  line-height: 1.8;
  padding: 12px 15px;
  background: #f2f3eb;
  border-radius: 5px;
  color: #7d866c;
  margin: 17px 0 0;
}
.goal-chart {
  margin-top: 25px;
}
.goal-chart svg {
  width: 100%;
  height: 160px;
  overflow: visible;
}
.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: #8a907f;
  margin-bottom: 10px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: #899978;
  margin-right: 5px;
}
.legend-dot.outline {
  border: 1px solid #b5bba7;
  background: none;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #9da38f;
  margin-top: 3px;
}
.chart-label {
  font-size: 9px;
  fill: #a0a58f;
  font-family: "DM Sans", sans-serif;
}
.wide-empty {
  grid-column: 1/-1;
}
.help-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px dashed #d9dece;
  border-radius: 9px;
  margin-top: 18px;
  color: #909880;
  font-size: 11px;
}
.help-callout button {
  margin-left: auto;
  white-space: nowrap;
}
.saved-tag {
  background: #e7ecdd;
  color: #78876a;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 9px;
}
.form-error {
  font-size: 11px;
  line-height: 1.7;
  color: #9c4c38;
  background: #f8eae3;
  border-radius: 5px;
  padding: 10px 12px;
  margin: 12px 0;
}
.form-error:empty {
  display: none;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}
.field label {
  font-size: 11px;
  font-weight: 500;
  color: #68725b;
}
.field small {
  font-size: 10px;
  color: #959c89;
  line-height: 1.6;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  width: 100%;
  border: 1px solid #dce1d2;
  border-radius: 6px;
  background: #fffefa;
  color: #394330;
  padding: 11px 12px;
  min-height: 41px;
  font-size: 12px;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field.full {
  grid-column: 1/-1;
}
.field-row {
  display: flex;
  gap: 9px;
  align-items: stretch;
}
.field-row .btn {
  white-space: nowrap;
}
.field-row input {
  min-width: 0;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin: 0 0 8px;
}
.modal-header p {
  font-size: 11px;
  line-height: 1.8;
  color: #929984;
  margin: 0;
}
.modal-body {
  padding: 30px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.modal-actions .spacer {
  margin-right: auto;
}
.modal-actions .btn {
  font-size: 11px;
}
.modal-meta {
  background: #f0f2e8;
  padding: 15px;
  border-radius: 6px;
  font-size: 11px;
  color: #7c886a;
  line-height: 1.8;
  margin: 16px 0;
}
.modal-meta strong {
  color: #536444;
}
dialog {
  padding: 0;
  border: 1px solid #e1e5d6;
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  width: min(580px, calc(100vw - 30px));
  max-height: 90dvh;
  box-shadow: 0 25px 100px #1b291733;
  overflow: auto;
}
@media (min-width: 761px) {
  dialog {
    top: var(--app-safe-area-top);
    right: var(--app-safe-area-right);
    bottom: var(--app-safe-area-bottom);
    left: var(--app-safe-area-left);
    max-height: min(
      90dvh,
      calc(100dvh - var(--app-safe-area-top) - var(--app-safe-area-bottom) - 24px)
    );
  }
}
.reader-profile-card {
  grid-column: 1 / -1;
}
.reader-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.reader-avatar {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #e5eddf;
  color: #5b7453;
  font:
    600 34px Manrope,
    sans-serif;
}
.reader-profile-header h2 {
  font-size: 31px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.reader-profile-header p:last-child {
  margin: 0;
}
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 15px;
}
.profile-chips span {
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 24px;
  background: #f0f2e9;
  color: #67785b;
}
.reader-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
  color: #7c846f;
  font-size: 12px;
}
.reader-mini-stats strong {
  font-size: 20px;
  color: #536c53;
  margin-right: 5px;
}
.profile-genres {
  border: 0;
  padding: 0;
  margin: 20px 0;
  min-width: 0;
}
.profile-genres legend {
  color: #69765e;
  font-size: 13px;
  margin-bottom: 14px;
}
.profile-genres > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-genres label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  min-height: 44px;
  background: #f5f6ef;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.profile-genres label:has(input:checked) {
  background: #e8efdf;
  border-color: #9aab8d;
}
.profile-genres input,
.profile-ai-choice input,
.discovery-profile-choice input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
  accent-color: #6b835c;
}
.profile-ai-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px;
  line-height: 1.7;
  border-radius: 12px;
  background: #edf2e6;
  font-size: 13px;
}
.profile-ai-choice input {
  margin-top: 3px;
}
.discovery-profile-choice {
  margin: 18px 0;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 12px;
}
.discovery-profile-choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.discovery-profile-choice small {
  display: block;
  font-size: 11px;
  line-height: 1.7;
  color: #7c846f;
  margin: 9px 0;
}
.discovery-profile-note {
  color: #7b846d;
  font-size: 12px;
  line-height: 1.8;
}
.timeline-filter {
  margin: 26px 0;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.timeline-genre-label {
  display: inline-block;
  color: #7c846f;
  background: #eef1e7;
  border-radius: 16px;
  padding: 4px 9px;
  margin: 7px 0;
  font-size: 11px;
}
.reward-teaser {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: #edf0e4;
  border: 1px solid #dde4d1;
  border-radius: 14px;
  margin: 24px 0;
}
.reward-teaser h2 {
  margin: 5px 0 10px;
  font-size: 27px;
}
.reward-teaser p:last-child {
  margin: 0;
  color: #79846b;
  font-size: 12px;
}
.reward-teaser .btn {
  flex-shrink: 0;
}
.path-stats.reward-balances {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 26px 0;
}
.reader-level {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px;
  border: 1px solid #dedecd;
  background: #f2f0e6;
  border-radius: 16px;
  margin: 25px 0;
}
.level-symbol {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  font-size: 40px;
  border: 1px solid #d8d8ba;
  background: #e9e8d6;
  border-radius: 50%;
  color: #8d8c54;
}
.reader-level h2 {
  font-size: 29px;
  margin: 0 0 10px;
}
.reader-level p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.8;
  color: #7c816c;
}
.reader-level > div:last-child {
  flex: 1;
  min-width: 0;
}
.reader-level progress {
  appearance: none;
  height: 8px;
  border: 0;
  width: 100%;
  background: #e0e1d3;
  border-radius: 8px;
  overflow: hidden;
}
.reader-level progress::-webkit-progress-bar {
  background: #e0e1d3;
}
.reader-level progress::-webkit-progress-value {
  background: #88976b;
}
.reader-level small {
  display: block;
  color: #8b8d78;
  font-size: 11px;
  line-height: 1.7;
  margin-top: 10px;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 25px 0;
}
.reward-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 15px;
  border: 1px solid var(--line);
  background: #faf9f4;
  border-radius: 14px;
  padding: 22px;
}
.reward-card.is-unlocked {
  background: #f0f5e9;
  border-color: #b9c8a8;
}
.reward-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.reward-cost {
  color: #657b52;
  font:
    600 12px Manrope,
    sans-serif;
  border-radius: 18px;
  padding: 7px 10px;
  background: #e4ebd9;
}
.reward-card h3 {
  font-size: 26px;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.reward-card > p {
  font-size: 13px;
  line-height: 1.8;
  color: #818773;
  margin: 0;
}
.reward-card > .btn {
  margin-top: auto;
  justify-content: center;
}
.reward-availability {
  color: #71835e;
  font-size: 12px;
  line-height: 1.7;
}
.reward-card button:disabled {
  cursor: not-allowed;
}
.reward-notice {
  background: #f4ece3;
  border: 1px solid #ddc9b9;
  border-radius: 10px;
  padding: 15px;
  font-size: 13px;
  line-height: 1.8;
  color: #8b6548;
}
.redemption-list {
  display: grid;
  gap: 12px;
}
.redemption-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaf4;
}
.redemption-card h3 {
  font-size: 23px;
  margin: 8px 0;
}
.redemption-card p {
  color: #858b77;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}
.redemption-status {
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 10px;
  color: #7a8b64;
}
.redemption-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.archived-rewards {
  font-size: 13px;
  color: #7d866f;
}
.archived-rewards summary {
  cursor: pointer;
}
.archived-rewards > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 1100px) {
  .reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .reader-profile-header {
    align-items: flex-start;
    gap: 14px;
  }
  .reader-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 16px;
    font-size: 26px;
  }
  .reader-profile-header h2 {
    font-size: 28px;
  }
  .reader-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    line-height: 1.8;
  }
  .reader-mini-stats span:last-child {
    grid-column: 1 / -1;
  }
  .profile-genres label {
    font-size: 13px;
    padding: 10px;
  }
  .profile-ai-choice,
  .discovery-profile-choice label,
  .discovery-profile-note {
    font-size: 14px;
  }
  .timeline-filter {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .timeline-filter select {
    min-width: 0;
    width: 100%;
  }
  .timeline-filter label {
    font-size: 14px;
  }
  .reward-teaser {
    padding: 20px;
    align-items: stretch;
    flex-direction: column;
  }
  .reward-teaser .btn {
    justify-content: center;
  }
  .reward-teaser h2 {
    font-size: 27px;
  }
  .reward-balances.path-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reward-balances .path-stat:last-child {
    grid-column: 1 / -1;
  }
  .reader-level {
    align-items: flex-start;
    padding: 19px;
    gap: 14px;
  }
  .level-symbol {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 27px;
  }
  .reader-level h2 {
    font-size: 25px;
  }
  .reward-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .reward-card {
    padding: 20px;
  }
  .reward-card p,
  .reader-level p:not(.eyebrow),
  .reward-teaser p:last-child,
  .redemption-card p {
    font-size: 14px;
  }
  .redemption-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .redemption-actions {
    align-items: flex-start;
  }
  .reward-availability,
  .reward-cost {
    font-size: 13px;
  }
}
dialog::backdrop {
  background: #2a33244d;
  backdrop-filter: blur(3px);
}
.path-panel,
.book-path-summary,
.book-annotations {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 22px 0;
  min-width: 0;
}
.path-panel h2,
.book-path-summary h3,
.book-annotations h3 {
  margin: 0 0 14px;
}
.path-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.path-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border-radius: 12px;
  background: #eff2e9;
}
.path-stat strong {
  font:
    600 28px Manrope,
    sans-serif;
  color: #4e654e;
  overflow-wrap: anywhere;
}
.path-stat span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.path-total {
  margin: 24px 0;
}
.path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
}
.path-layout > .path-panel {
  margin: 0;
}
.path-layout .section-heading {
  align-items: flex-start;
  gap: 16px;
}
.path-layout h2 {
  font-size: 24px;
}
.path-week-nav {
  display: flex;
  gap: 6px;
}
.path-week-nav .btn {
  min-width: 40px;
  padding: 8px;
}
.path-week-text,
.last-week-report p,
.path-rules p {
  color: #707a65;
  line-height: 1.8;
  font-size: 13px;
}
.path-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin: 23px 0;
}
.path-day {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 13px 3px;
  background: #f6f5f0;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.path-day > span {
  font-size: 10px;
  color: #7c846f;
}
.path-day > strong {
  font:
    600 22px Manrope,
    sans-serif;
}
.path-day > b {
  font-size: 12px;
  font-weight: 500;
}
.path-day small {
  font-size: 10px;
  font-weight: 400;
}
.path-day em {
  font-size: 11px;
  font-style: normal;
  color: #536c53;
}
.path-day.is-today {
  border-color: #879d7b;
  box-shadow: 0 0 0 2px #dfe8d8;
}
.path-day.is-complete {
  background: #eaf0e7;
}
.path-day.is-future {
  opacity: 0.55;
}
.path-table-wrap {
  overflow-x: auto;
}
.path-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.path-table th {
  color: #7b846c;
  font-weight: 500;
}
.path-table td,
.path-table th {
  padding: 13px 7px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.path-table td:first-child {
  width: 68%;
}
.path-table .text-link {
  text-align: left;
  line-height: 1.6;
}
.last-week-report {
  background: #f4f3eb;
  padding: 17px;
  border-radius: 10px;
  margin-top: 20px;
}
.last-week-report strong {
  font-size: 12px;
  color: #627255;
}
.last-week-report p {
  margin-bottom: 0;
}
.annual-panel form {
  margin: 18px 0 25px;
}
.annual-panel label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.annual-panel input {
  width: 100%;
  min-width: 0;
}
.annual-goal {
  margin: 25px 0;
}
.annual-goal > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}
.annual-goal > small {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-top: 8px;
}
.annual-goal progress {
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e7e9df;
}
.annual-goal progress::-webkit-progress-bar {
  background: #e7e9df;
}
.annual-goal progress::-webkit-progress-value {
  background: #889c7c;
}
.path-help {
  color: #7c846f;
  font-size: 12px;
  line-height: 1.8;
}
.path-rules summary,
.path-config > summary {
  cursor: pointer;
  color: #52664c;
  font-size: 13px;
  font-weight: 600;
}
.path-config {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 7px 0 24px;
  background: #f6f7f0;
}
.path-config > summary {
  padding: 17px;
}
.path-config-body {
  padding: 5px 17px 17px;
}
.path-enable {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.path-enable input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: #667f59;
}
.reading-days {
  border: 0;
  padding: 0;
  margin: 20px 0;
  min-width: 0;
}
.reading-days legend {
  font-size: 12px;
  color: #67745b;
  margin-bottom: 10px;
}
.reading-days > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.reading-days label {
  position: relative;
  cursor: pointer;
}
.reading-days input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.reading-days span {
  display: grid;
  place-items: center;
  min-width: 43px;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid #d9dfd0;
  background: var(--paper);
  font-size: 12px;
  color: #7d846e;
}
.reading-days input:checked + span {
  background: #e0e9d8;
  border-color: #839877;
  color: #405a3d;
}
.reading-days input:focus-visible + span {
  outline: 2px solid #8b4936;
  outline-offset: 2px;
}
.pause-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  align-items: end;
  gap: 9px;
  margin: 12px 0;
}
.pause-row label {
  font-size: 11px;
  color: #7c846f;
  min-width: 0;
}
.pause-row input {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
}
.pause-row .btn {
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  font-size: 18px;
}
.path-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  margin-top: 22px;
}
.path-breakdown dt {
  color: var(--muted);
  margin-bottom: 7px;
}
.path-breakdown dd {
  margin: 0;
  font-size: 18px;
  color: #536c53;
}
.book-path-summary .path-stats {
  gap: 8px;
}
.book-path-summary .path-stat {
  padding: 12px;
}
.book-path-summary .path-stat strong {
  font-size: 22px;
}
.book-path-summary .path-stat span {
  font-size: 10px;
}
.notebook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.annotation-card {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 11px;
  background: #fbfaf4;
  margin: 13px 0;
}
.notebook-grid .annotation-card {
  margin: 0;
}
.annotation-card h3 {
  margin: 8px 0;
  font-size: 22px;
}
.annotation-kind {
  color: #8b4936;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.annotation-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #59664f;
  line-height: 1.85;
  font-size: 13px;
}
.annotation-card .text-link {
  margin-right: 12px;
}
.priority-label {
  display: inline-block;
  font-size: 11px;
  color: #8b4936;
  margin: 6px 0;
}
@media (max-width: 1200px) {
  .path-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .page-heading.path-heading > .btn {
    width: auto;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
  }
  .page-heading.path-heading {
    flex-wrap: wrap;
  }
  .path-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .path-stat {
    padding: 16px;
  }
  .path-stat span {
    font-size: 12px;
  }
  .path-panel,
  .book-path-summary,
  .book-annotations {
    padding: 18px;
  }
  .path-layout .section-heading {
    flex-wrap: wrap;
  }
  .path-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .path-day {
    padding: 15px 9px;
    gap: 8px;
  }
  .path-day:last-child {
    grid-column: 1 / -1;
  }
  .path-day > span,
  .path-day em {
    font-size: 12px;
  }
  .path-week-text,
  .last-week-report p,
  .path-help,
  .path-rules p,
  .annotation-text {
    font-size: 14px;
  }
  .path-config > summary {
    font-size: 14px;
    line-height: 1.7;
  }
  .path-config-body {
    padding: 5px 12px 16px;
  }
  .pause-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }
  .pause-row .btn {
    justify-self: end;
    width: 44px;
  }
  .notebook-grid {
    grid-template-columns: 1fr;
  }
  .path-table {
    font-size: 13px;
  }
  .path-table td,
  .path-table th {
    padding: 12px 4px;
  }
  .book-path-summary .path-stat span {
    font-size: 12px;
  }
  .book-annotations .section-heading {
    flex-wrap: wrap;
    gap: 10px;
  }
}
.add-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}
.add-option {
  border: 1px solid var(--line);
  background: #f5f5ee;
  border-radius: 8px;
  padding: 19px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: #6d775e;
}
.add-option svg {
  width: 23px;
  height: 23px;
  color: #879675;
}
.add-option strong {
  display: block;
  font-size: 12px;
  color: #536348;
  margin-bottom: 5px;
}
.add-option:hover {
  border-color: #bbc7a7;
}
.lookup-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a0a58f;
  font-size: 10px;
  margin: 20px 0;
}
.lookup-divider:before,
.lookup-divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.book-preview {
  display: flex;
  gap: 20px;
  margin: 0 0 24px;
  padding: 18px;
  background: #f0f1e8;
  border-radius: 8px;
}
.book-preview .book-cover {
  width: 70px;
}
.book-preview .cover-title {
  font-size: 13px;
}
.book-preview .cover-author {
  font-size: 5px;
}
.book-preview h3 {
  font-size: 24px;
  margin: 4px 0 8px;
}
.book-preview p {
  font-size: 11px;
  color: #8a947b;
  margin: 0 0 7px;
}
.book-preview .btn-link {
  font-size: 10px;
}
.detail-cover {
  width: 100px;
  margin: auto;
}
.detail-title {
  text-align: center;
  margin: 22px 0;
}
.detail-title h3 {
  font-size: 32px;
  margin: 0 0 8px;
}
.detail-title p {
  font-size: 12px;
  color: #859174;
}
.detail-description {
  font-size: 12px;
  line-height: 1.9;
  color: #7d8871;
  max-height: 210px;
  overflow: auto;
  white-space: pre-line;
}
.metadata-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 22px 0;
}
.metadata-grid dt {
  font-size: 9px;
  color: #a0a68f;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.metadata-grid dd {
  font-size: 11px;
  margin: 6px 0 0;
  color: #6b795c;
  overflow-wrap: anywhere;
}
.rating-picker {
  display: flex;
  gap: 5px;
}
.rating-picker label {
  font-size: 22px;
  color: #a48a55;
  padding: 5px 6px;
}
.rating-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rating-picker label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
}
.rating-picker label:has(input:checked) {
  background: #f1eadb;
  border-radius: 5px;
}
.scanner {
  position: relative;
  background: #243021;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  margin: 20px 0;
}
.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner:after {
  content: "";
  position: absolute;
  inset: 30% 10%;
  border: 2px solid #ffffff90;
  border-radius: 8px;
  pointer-events: none;
}
.scanner-hint {
  font-size: 11px;
  color: #8d967e;
  line-height: 1.8;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 100px);
  transform: translate(-50%, 20px);
  background: #3e5136;
  color: #f8f8ee;
  border-radius: 8px;
  padding: 13px 21px;
  font-size: 12px;
  box-shadow: 0 5px 22px #20321821;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 20;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff50;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #7c876b;
  margin: 14px 0;
}
.mobile-brand {
  display: none;
}
.endnote {
  margin-top: 22px;
  font-size: 10px;
  color: #a1a58f;
  line-height: 1.8;
}
.log-list {
  font-size: 11px;
  color: #899479;
  padding: 0;
  list-style: none;
}
.log-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.plan-card .btn {
  white-space: nowrap;
}
.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.view-toggle select {
  width: auto;
  min-width: 130px;
  font-size: 11px;
}
.toolbar label {
  font-size: 10px;
  color: var(--muted);
}
@media (min-width: 1450px) {
  dialog:has(#book-form, #finish-form, .detail-title) {
    width: min(870px, calc(100vw - 60px));
  }
  .main {
    padding-top: 47px;
  }
  .reading-card {
    padding: 27px;
    grid-template-columns: 113px 1fr;
  }
  .book-title {
    font-size: 26px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 303px;
    gap: 30px;
  }
  .reading-card .book-bottom {
    margin-top: 22px;
  }
  .daily-panel {
    padding: 25px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 213px;
  }
  .sidebar {
    padding: calc(30px + var(--app-safe-area-top)) max(17px, var(--app-safe-area-right)) 30px
      max(17px, var(--app-safe-area-left));
  }
  .topbar {
    padding: var(--app-safe-area-top) max(30px, var(--app-safe-area-right)) 0
      max(30px, var(--app-safe-area-left));
  }
  .main {
    padding: 32px 30px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 20px;
  }
  .reading-card {
    padding: 18px;
    gap: 17px;
    grid-template-columns: 80px 1fr;
  }
  .book-cover .cover-title {
    font-size: 16px;
  }
  .book-title {
    font-size: 21px;
  }
  .book-cover {
    padding: 13px 10px;
  }
  .book-bottom {
    flex-wrap: wrap;
    gap: 12px;
  }
  .stat {
    padding: 0 18px;
  }
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .recent-grid {
    gap: 12px;
  }
  .recent-card .stars {
    display: none;
  }
  .recent-card {
    padding: 14px;
    gap: 12px;
  }
}
@media (max-width: 1000px) {
  :root {
    --sidebar: 190px;
  }
  .sidebar {
    padding: calc(28px + var(--app-safe-area-top)) max(13px, var(--app-safe-area-right)) 28px
      max(13px, var(--app-safe-area-left));
  }
  .brand {
    font-size: 27px;
  }
  .brand-tag {
    font-size: 8px;
    letter-spacing: 1.4px;
  }
  .nav-item {
    font-size: 11px;
    padding: 12px;
  }
  .topbar {
    height: calc(72px + var(--app-safe-area-top));
    padding: var(--app-safe-area-top) max(24px, var(--app-safe-area-right)) 0
      max(24px, var(--app-safe-area-left));
  }
  .main {
    padding: 30px 24px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
  .mini-note {
    grid-column: 1/-1;
    padding: 0;
  }
  .daily-panel {
    grid-row: span 2;
  }
  .daily-number {
    margin-top: 17px;
    font-size: 44px;
  }
  .daily-rule {
    margin-top: 14px;
  }
  .reading-card {
    grid-template-columns: 95px 1fr;
    gap: 24px;
    padding: 22px;
  }
  .book-title {
    font-size: 25px;
  }
  .book-cover .cover-title {
    font-size: 18px;
  }
  .book-bottom {
    flex-wrap: nowrap;
  }
  .stat {
    padding: 0 15px;
  }
  .stat-top {
    font-size: 9px;
    gap: 6px;
  }
  .stat-top svg {
    width: 13px;
  }
  .stat-value {
    font-size: 27px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .recent-grid {
    grid-template-columns: 1fr 1fr;
  }
  .recent-card h3 {
    font-size: 17px;
  }
  .plan-metrics {
    grid-template-columns: 1fr 1fr;
    row-gap: 22px;
  }
  .plan-metrics > div:nth-child(even) {
    border: 0;
  }
  .plan-metrics > .plan-forecast {
    grid-column: 1 / -1;
    padding: 14px;
    background: var(--green-light);
    border-radius: 10px;
  }
  .plan-card-top {
    align-items: flex-start;
  }
  .plan-card-top > .btn {
    padding: 8px;
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    inset: auto 0 0 0;
    height: 65px;
    width: 100%;
    padding: 0 8px;
    border-top: 1px solid #ddd;
    box-shadow: 0 -3px 20px #00000004;
    background: #f4f4ee;
  }
  .brand,
  .brand-tag,
  .nav-caption,
  .sidebar-note,
  .sidebar-footer {
    display: none;
  }
  .nav-list {
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0;
  }
  .nav-item {
    flex-direction: column;
    gap: 5px;
    font-size: 9px;
    padding: 9px 12px;
    min-width: 60px;
    border-radius: 6px;
    min-height: 54px;
  }
  .nav-item svg {
    width: 19px;
    height: 19px;
  }
  .nav-item .count {
    display: none;
  }
  .topbar {
    height: calc(64px + var(--app-safe-area-top));
    padding: var(--app-safe-area-top) max(22px, var(--app-safe-area-right)) 0
      max(22px, var(--app-safe-area-left));
    gap: 12px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    font-family: Georgia, serif;
    font-size: 25px;
    gap: 8px;
    letter-spacing: -1px;
  }
  .mobile-brand svg {
    width: 25px;
    height: 25px;
    color: var(--accent);
  }
  .breadcrumb {
    display: none;
  }
  .top-date {
    font-size: 10px;
  }
  .avatar {
    width: 28px;
    height: 28px;
  }
  .main {
    padding: 28px 22px 92px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 22px;
    gap: 14px;
  }
  .page-heading h1 {
    font-size: 33px;
  }
  .page-heading > .btn {
    min-height: 36px;
    padding: 10px;
    font-size: 0;
    gap: 0;
    margin-top: 14px;
  }
  .page-heading > .btn svg {
    width: 18px;
    height: 18px;
  }
  .subtext {
    font-size: 11px;
    max-width: 275px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
  }
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
    margin-bottom: 26px;
  }
  .stat {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-bottom: 0;
  }
  .stat-top {
    font-size: 10px;
  }
  .stat-value {
    font-size: 28px;
    margin: 10px 0 6px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .demo-banner {
    font-size: 10px;
    line-height: 1.5;
    align-items: center;
    padding: 9px 10px;
  }
  .demo-banner > span {
    max-width: 170px;
  }
  .demo-banner button {
    font-size: 10px;
    text-align: right;
    white-space: normal;
    max-width: 85px;
  }
  .reading-card {
    grid-template-columns: 78px 1fr;
    padding: 18px;
    gap: 18px;
  }
  .book-title {
    font-size: 22px;
  }
  .book-cover .cover-title {
    font-size: 15px;
  }
  .book-cover .cover-author {
    font-size: 6px;
  }
  .book-cover {
    padding: 12px 9px;
  }
  .book-bottom {
    flex-wrap: wrap;
    margin-top: 13px;
    gap: 8px;
  }
  .reading-card .btn {
    font-size: 10px;
    min-height: 33px;
  }
  .progress-info {
    margin-top: 17px;
    font-size: 9px;
  }
  .category {
    font-size: 8px;
    margin-bottom: 7px;
  }
  .author {
    font-size: 10px;
  }
  .dashboard-side {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .daily-panel {
    padding: 18px 16px;
  }
  .daily-title {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .daily-number {
    font-size: 40px;
  }
  .daily-number span {
    font-size: 13px;
  }
  .daily-desc {
    font-size: 10px;
  }
  .daily-row {
    font-size: 9px;
    gap: 6px;
  }
  .daily-panel > .btn {
    font-size: 10px;
    padding: 9px;
  }
  .activity-panel {
    padding: 17px 13px;
  }
  .activity-panel h3 {
    font-size: 17px;
  }
  .week-chart {
    gap: 7px;
  }
  .recent-grid {
    grid-template-columns: 1fr;
  }
  .recent-card {
    padding: 16px;
    gap: 18px;
  }
  .recent-card h3 {
    font-size: 21px;
  }
  .recent-card .stars {
    display: block;
  }
  .recent-card .book-cover {
    width: 51px;
  }
  .footer {
    font-size: 9px;
    gap: 15px;
    line-height: 1.6;
  }
  .library-grid {
    gap: 13px;
  }
  .library-card {
    padding: 15px;
    gap: 14px;
  }
  .library-card .book-cover {
    width: 86px;
  }
  .library-card .book-title {
    font-size: 21px;
  }
  .library-card .cover-wrap {
    padding: 10px 0 16px;
  }
  .library-card .card-meta {
    font-size: 9px;
    gap: 7px;
  }
  .library-card .btn {
    font-size: 10px;
    padding: 9px 7px;
  }
  .toolbar {
    gap: 12px;
  }
  .toolbar .searchbox {
    max-width: none;
    flex-basis: 100%;
    order: 2;
  }
  .tabs {
    max-width: 100%;
  }
  .tab {
    font-size: 10px;
    padding: 9px 11px;
  }
  .view-toggle {
    margin-left: auto;
  }
  .view-toggle label {
    display: none;
  }
  .view-toggle select {
    min-width: 0;
    width: 112px;
    min-height: 35px;
    padding: 7px;
    font-size: 10px;
  }
  .timeline-entry {
    padding-left: 22px;
  }
  .timeline-entry .recent-card {
    padding: 17px;
    gap: 14px;
  }
  .timeline-entry h3 {
    font-size: 22px;
  }
  .timeline-entry .book-cover {
    width: 50px;
  }
  .timeline-entry .stars {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .timeline-entry .note {
    font-size: 13px;
  }
  .modal-body {
    padding: 24px 21px;
  }
  .modal-header h2 {
    font-size: 27px;
  }
  .form-grid {
    gap: 0 12px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .modal-actions .btn {
    padding: 10px 12px;
  }
  .toast {
    left: 50%;
    bottom: 80px;
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: 90vw;
  }
  .settings-card {
    padding: 22px;
  }
  .plan-card {
    padding: 21px;
  }
  .plan-card h2 {
    font-size: 23px;
  }
  .plan-card-top {
    flex-wrap: wrap;
  }
  .plan-metrics {
    margin: 22px 0;
  }
  .plan-explanation {
    font-size: 10px;
  }
  .help-callout {
    font-size: 10px;
    padding: 15px;
    flex-wrap: wrap;
  }
  .book-preview {
    padding: 14px;
    gap: 15px;
  }
  .book-preview h3 {
    font-size: 22px;
  }
  .add-option {
    padding: 14px;
    gap: 9px;
  }
  .add-option strong {
    font-size: 11px;
  }
  .add-option {
    font-size: 10px;
  }
  .plan-card-top .author {
    font-size: 10px;
  }
}
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.rating-picker {
  flex-wrap: wrap;
  gap: 7px;
}
.rating-picker label {
  display: flex;
  align-items: center;
  gap: 5px;
  font:
    13px "DM Sans",
    sans-serif;
  padding: 8px 7px;
  cursor: pointer;
}
.rating-picker input {
  position: static;
  opacity: 1;
  pointer-events: auto;
  width: 13px;
  height: 13px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #8b4936;
}
.field {
  min-width: 0;
}
.book-title,
.note,
.detail-description,
.cover-title {
  overflow-wrap: anywhere;
}
.title-button {
  min-width: 0;
}

/* Account and cloud sync */
.account-card {
  grid-column: 1 / -1;
  border-top: 3px solid var(--sage, #526653);
}
.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.account-heading .eyebrow {
  margin-bottom: 10px;
}
.account-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: #e7ece3;
  border-radius: 50%;
  color: #465b46;
  font:
    30px Georgia,
    serif;
}
.account-email {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sync-detail {
  color: #465b46 !important;
  font-weight: 600;
}
.sync-status {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
}
.sync-status:hover,
.text-link:hover {
  text-decoration: underline;
}
.account-footnote {
  margin-top: 18px;
  font-size: 12px;
}
.local-migration,
.sync-conflict {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #d7d7c9;
  border-radius: 12px;
  background: #f8f7f0;
}
.sync-conflict {
  border-color: #c99577;
  background: #faf2eb;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.text-link {
  border: 0;
  background: none;
  padding: 0;
  color: #4c634c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
@media (max-width: 600px) {
  .sync-status {
    text-align: left;
  }
  .account-card {
    padding: 24px 20px;
  }
  .account-mark {
    width: 42px;
    height: 42px;
  }
  .account-card .settings-actions {
    flex-wrap: wrap;
  }
}

.catalogue-links {
  margin: 10px 0 18px;
  font-size: 13px;
}
.catalogue-links small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.catalogue-links a,
.modal-meta a {
  color: #4c634c;
  text-underline-offset: 3px;
}

.catalogue-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  margin: 18px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0f2e8;
}
.catalogue-preview .book-cover {
  width: 88px;
}
.catalogue-preview .book-cover img {
  object-fit: contain;
  background: var(--paper);
}
.catalogue-preview .cover-title {
  font-size: 15px;
}
.catalogue-preview .cover-author {
  font-size: 6px;
}
.catalogue-preview-copy {
  min-width: 0;
}
.catalogue-preview h3 {
  font-size: 24px;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
.catalogue-preview p {
  font-size: 12px;
  color: #6b795c;
  margin: 0 0 8px;
  line-height: 1.6;
}
.catalogue-preview .cover-status {
  font-size: 10px;
  color: #6b795c;
}
.catalogue-preview .catalogue-source {
  font-size: 10px;
  margin-bottom: 0;
}
.catalogue-source a {
  color: #4c634c;
  text-underline-offset: 3px;
}
.catalogue-hint {
  font-size: 11px;
  line-height: 1.6;
  color: #737d65;
  margin: 0 0 20px;
}
@media (max-width: 480px) {
  .catalogue-preview {
    padding: 14px;
    gap: 14px;
  }
  .catalogue-preview .book-cover {
    width: 70px;
  }
  .catalogue-preview h3 {
    font-size: 21px;
  }
}
.lookup-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin: 0 0 22px;
  border-radius: 8px;
  background: #edeee5;
}
.lookup-modes button {
  min-height: 39px;
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 12px;
  color: #657358;
}
.lookup-modes button[aria-pressed="true"] {
  color: #435336;
  background: var(--paper);
  box-shadow: 0 1px 4px #22301912;
  font-weight: 600;
}
.title-results-heading {
  margin: 25px 0 15px;
}
.title-results-heading h3 {
  font-size: 23px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.title-results-heading p,
.title-search-note {
  font-size: 12px;
  color: #657358;
  line-height: 1.7;
  margin: 8px 0 15px;
}
.title-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.title-result {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 17px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f6ef;
  text-align: left;
}
.title-result:not(:disabled):hover {
  border-color: #a9b793;
  background: #f0f2e8;
}
.title-result:disabled {
  cursor: default;
  opacity: 0.65;
}
.title-result .book-cover {
  width: 59px;
}
.title-result .book-cover img {
  object-fit: contain;
  background: var(--paper);
}
.title-result .cover-title {
  font-size: 12px;
}
.title-result .cover-author {
  font-size: 5px;
}
.title-result-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.title-result-title {
  font:
    21px/1.2 Georgia,
    serif;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.title-result-author {
  font-size: 12px;
  color: #606e54;
}
.title-result-edition,
.title-result-meta {
  font-size: 10px;
  color: #6d765f;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.title-result-use {
  font-size: 10px;
  color: #8b4936;
  margin-top: 5px;
  font-weight: 600;
}
@media (max-width: 480px) {
  #title-search-form .field-row {
    flex-wrap: wrap;
  }
  #title-search-form .field-row input {
    flex-basis: 100%;
  }
  #title-search-form .field-row .btn {
    width: 100%;
  }
  .title-result {
    padding: 13px;
    gap: 12px;
  }
  .title-result .book-cover {
    width: 50px;
  }
  .title-result-title {
    font-size: 19px;
  }
}
.title-results-heading h3:focus {
  outline: none;
}

/* Book feedback */
.nav-label-compact {
  display: none;
}
.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #936c31;
  font-size: 15px;
  letter-spacing: 1px;
  margin-top: 8px;
}
.rating-empty {
  color: #aa9e87;
}
.rating-number {
  font-size: 11px;
  letter-spacing: 0;
  color: #73664d;
}
.star-rating {
  border: 0;
  padding: 0;
  margin: 8px 0 20px;
  min-width: 0;
}
.star-rating legend {
  color: #536348;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 9px;
}
.star-rating legend > span {
  font-weight: 400;
  color: var(--muted);
}
.star-choices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}
.star-choice,
.rating-none {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 46px;
  cursor: pointer;
  border-radius: 9px;
}
.star-choices .star-choice {
  font-size: 32px;
  color: #d5d4c9;
}
.star-choices .star-choice.is-filled {
  color: #ac813c;
}
.star-choices .star-choice:hover {
  background: #f5efe2;
}
.star-choice input,
.rating-none input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.star-choice:has(input:focus-visible),
.rating-none:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.star-choices .rating-none {
  font-size: 12px;
  color: #6a705f;
  padding: 0 10px;
  margin-left: 7px;
}
.rating-none:has(input:checked) {
  background: #eef0e7;
}
.rating-caption {
  font-size: 12px;
  color: #6b745f;
  margin: 5px 0 0;
  min-height: 18px;
}
.detail-title .rating-summary {
  display: flex;
  justify-content: center;
}

/* Phone layout: comfortable type, full-width actions and safe-area navigation. */
@media (max-width: 760px) {
  body {
    -webkit-text-size-adjust: 100%;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    height: auto;
    min-height: calc(62px + var(--app-safe-area-top));
    padding: calc(10px + var(--app-safe-area-top)) max(18px, var(--app-safe-area-right)) 10px
      max(18px, var(--app-safe-area-left));
    background: #f7f6f2f5;
    border-bottom: 1px solid var(--line);
  }
  .mobile-brand {
    font-size: 27px;
    flex: 1;
  }
  .top-date {
    display: none;
  }
  .avatar,
  .icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .sidebar {
    height: calc(72px + var(--app-safe-area-bottom));
    padding: 4px max(8px, var(--app-safe-area-right)) var(--app-safe-area-bottom)
      max(8px, var(--app-safe-area-left));
    background: #fffefa;
    border-right: 0;
    border-top: 1px solid #dedfd3;
    box-shadow: 0 -5px 24px #27332708;
  }
  .nav-item {
    flex: 1;
    min-width: 0;
    min-height: 60px;
    padding: 7px 3px;
    font-size: 11px;
    gap: 5px;
    border-radius: 11px;
  }
  .nav-item svg {
    width: 22px;
    height: 22px;
  }
  .nav-label-wide {
    display: none;
  }
  .nav-label-compact {
    display: inline;
  }
  .main {
    padding: 20px max(18px, var(--app-safe-area-right)) calc(100px + var(--app-safe-area-bottom))
      max(18px, var(--app-safe-area-left));
  }
  .page-heading {
    gap: 12px;
    margin: 22px 0;
  }
  .page-heading h1 {
    font-size: clamp(29px, 8.2vw, 36px);
    line-height: 1.12;
    letter-spacing: -1px;
  }
  .page-heading > div {
    min-width: 0;
  }
  .page-heading > .btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    margin-top: 20px;
    box-shadow: 0 4px 10px #8b49361a;
  }
  .page-heading > .btn svg {
    width: 24px;
    height: 24px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.3px;
    line-height: 1.5;
  }
  .subtext {
    font-size: 14px;
    line-height: 1.65;
    max-width: 330px;
  }
  .demo-banner {
    padding: 12px;
    font-size: 12px;
    gap: 9px;
  }
  .demo-banner > span {
    max-width: none;
    flex: 1;
  }
  .demo-banner button {
    font-size: 11px;
    min-height: 44px;
  }
  .stats {
    border-radius: 16px;
    margin-bottom: 28px;
  }
  .stat {
    padding: 16px;
    min-width: 0;
  }
  .stat-top {
    font-size: 11px;
    line-height: 1.4;
    gap: 6px;
  }
  .stat-value {
    font-size: 30px;
    margin: 8px 0 0;
  }
  .stat-foot {
    display: none;
  }
  .section-heading {
    gap: 10px;
    align-items: center;
  }
  .section-heading h2 {
    font-size: 25px;
  }
  .section-heading h2 small {
    font-size: 12px;
    display: block;
    margin: 4px 0 0;
  }
  .section-heading .btn-link {
    font-size: 12px;
    min-height: 44px;
  }
  .btn {
    min-height: 46px;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 10px;
  }
  .reading-list {
    gap: 16px;
  }
  .reading-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 18px;
    column-gap: 16px;
    row-gap: 10px;
    border-radius: 16px;
  }
  .reading-card > div:not(.book-cover) {
    display: contents;
  }
  .reading-card > .book-cover {
    grid-column: 1;
    grid-row: 1;
    width: 72px;
    align-self: start;
  }
  .reading-card .book-heading {
    grid-column: 2;
    gap: 4px;
    min-width: 0;
  }
  .reading-card .book-heading > .icon-btn {
    width: 32px;
    height: 44px;
    min-width: 32px;
  }
  .reading-card .book-title {
    font-size: 23px;
    line-height: 1.15;
  }
  .reading-card .author {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 7px;
  }
  .category {
    font-size: 9px;
    letter-spacing: 1px;
    line-height: 1.5;
    margin-bottom: 7px;
  }
  .progress-info,
  .reading-card .progress-track,
  .reading-card .book-bottom {
    grid-column: 1 / -1;
  }
  .progress-info {
    font-size: 12px;
    margin-top: 5px;
  }
  .progress-track {
    height: 7px;
  }
  .reading-card .book-bottom {
    display: grid;
    gap: 12px;
    margin-top: 3px;
  }
  .plan-badge {
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
  }
  .reading-card .btn {
    width: 100%;
    font-size: 14px;
    min-height: 46px;
  }
  .dashboard-side {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .daily-panel,
  .activity-panel {
    padding: 22px;
    border-radius: 16px;
  }
  .daily-title {
    font-size: 11px;
  }
  .daily-number {
    font-size: 48px;
  }
  .daily-desc,
  .daily-row,
  .activity-panel p {
    font-size: 13px;
    line-height: 1.6;
  }
  .daily-panel > .btn {
    font-size: 14px;
    min-height: 46px;
  }
  .activity-panel h3 {
    font-size: 23px;
  }
  .week-chart {
    gap: 12px;
  }
  .mini-note {
    font-size: 12px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .toolbar .tabs {
    grid-column: 1 / -1;
    width: 100%;
  }
  .toolbar .tab {
    flex: 1;
    min-height: 44px;
    padding: 10px 7px;
    font-size: 12px;
  }
  .toolbar .searchbox {
    grid-column: 1;
    order: initial;
    min-width: 0;
  }
  .view-toggle {
    grid-column: 2;
    grid-row: 2;
  }
  .view-toggle select {
    width: 113px;
    min-height: 46px;
    font-size: 12px;
    padding: 8px;
  }
  .library-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .library-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 15px;
    padding: 18px;
    border-radius: 16px;
  }
  .library-card .cover-wrap {
    padding: 0;
    align-self: start;
  }
  .library-card .book-cover {
    width: 74px;
  }
  .library-card .book-title {
    font-size: 23px;
    line-height: 1.15;
  }
  .library-card .author {
    font-size: 13px;
    margin: 8px 0;
  }
  .library-card .card-meta {
    font-size: 11px;
    flex-wrap: wrap;
    line-height: 1.5;
    margin-top: 10px;
  }
  .library-card > .btn {
    grid-column: 1 / -1;
    min-height: 46px;
    font-size: 14px;
  }
  .status-label {
    font-size: 11px;
  }
  .recent-card {
    border-radius: 14px;
  }
  .recent-card h3 {
    font-size: 22px;
  }
  .recent-card p,
  .recent-card small {
    font-size: 12px;
    line-height: 1.5;
  }
  .recent-card .stars {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .timeline-entry .recent-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .timeline-entry .stars {
    grid-column: 2;
    margin-left: 0;
    font-size: 14px;
  }
  .timeline-dates {
    font-size: 11px;
    line-height: 1.6;
  }
  .timeline-entry .note {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .plan-card {
    padding: 20px;
    border-radius: 16px;
  }
  .plan-card-top .author,
  .plan-explanation {
    font-size: 13px;
    line-height: 1.65;
  }
  .plan-metrics {
    gap: 16px;
    flex-wrap: wrap;
  }
  .plan-metrics small {
    font-size: 11px;
  }
  .plan-metrics strong {
    font-size: 28px;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    font-size: 11px;
    gap: 10px;
  }
  .sync-status {
    min-height: 32px;
    text-align: left;
  }
  .settings-card {
    padding: 22px;
    border-radius: 16px;
  }
  .settings-card p {
    font-size: 14px;
    line-height: 1.75;
  }
  .settings-actions {
    flex-wrap: wrap;
  }
  .settings-actions .btn {
    flex: 1;
    min-width: 135px;
  }
  dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 8px - var(--app-safe-area-top));
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    overscroll-behavior: contain;
  }
  .modal-body {
    padding: 22px 20px calc(20px + var(--app-safe-area-bottom));
  }
  .modal-header {
    position: sticky;
    top: -22px;
    z-index: 2;
    margin: -22px -20px 22px;
    padding: 22px 20px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .modal-header h2 {
    font-size: 28px;
    line-height: 1.12;
  }
  .modal-header p {
    font-size: 13px;
    line-height: 1.6;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .field {
    margin-bottom: 20px;
  }
  .field label {
    font-size: 14px;
  }
  .field small {
    font-size: 12px;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  textarea,
  select {
    min-height: 48px;
    font-size: 16px;
    padding: 12px;
    border-radius: 9px;
  }
  textarea {
    min-height: 110px;
    line-height: 1.65;
  }
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 18px;
  }
  .modal-actions .btn {
    min-height: 48px;
    font-size: 14px;
    padding: 12px;
  }
  .modal-actions .btn-primary {
    grid-column: 1 / -1;
  }
  .modal-actions .spacer {
    margin-right: 0;
  }
  .modal-meta,
  .scanner-hint,
  .catalogue-hint {
    font-size: 13px;
    line-height: 1.7;
  }
  .lookup-modes button {
    min-height: 48px;
    font-size: 13px;
  }
  .add-intro {
    gap: 10px;
  }
  .add-option {
    padding: 16px 12px;
    min-height: 84px;
    font-size: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  .add-option strong {
    font-size: 14px;
  }
  .catalogue-preview {
    padding: 16px;
    gap: 14px;
    border-radius: 14px;
  }
  .catalogue-preview h3 {
    font-size: 23px;
  }
  .catalogue-preview p {
    font-size: 12px;
  }
  .catalogue-links {
    font-size: 14px;
    line-height: 1.7;
  }
  .title-result {
    border-radius: 12px;
    padding: 16px;
  }
  .title-result-title {
    font-size: 22px;
  }
  .title-result-author {
    font-size: 14px;
  }
  .title-result-edition,
  .title-result-meta,
  .title-result-use {
    font-size: 12px;
  }
  .star-rating legend {
    font-size: 14px;
  }
  .star-choices {
    gap: 2px;
  }
  .star-choices .rating-none {
    margin-left: 0;
    font-size: 12px;
  }
  .star-choices .star-choice {
    font-size: 34px;
  }
  .toast {
    bottom: calc(90px + var(--app-safe-area-bottom));
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .reading-card,
  .library-card {
    padding: 15px;
    gap: 12px;
  }
  .star-choices .star-choice {
    min-width: 40px;
  }
}
.review-editor .optional {
  color: var(--muted);
  font-weight: 400;
}

.discovery-panel {
  background: var(--paper);
  border: 1px solid #dce1d3;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 32px;
}
.discovery-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 5px;
  gap: 5px;
  border-radius: 12px;
  background: #ecefe5;
  margin-bottom: 25px;
}
.discovery-tabs button {
  border: 0;
  padding: 13px 10px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #68745e;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.discovery-tabs button.selected {
  background: var(--paper);
  color: #354d36;
  box-shadow: 0 2px 8px #263b1d0a;
  font-weight: 600;
}
.discovery-tabs svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.discovery-panel h2 {
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  margin: 0 0 12px;
}
.discovery-panel p {
  font-size: 14px;
  line-height: 1.75;
  color: #68715f;
}
.discovery-panel .field {
  margin-top: 18px;
}
.discovery-panel textarea {
  min-height: 132px;
}
.discovery-seeds {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.discovery-seeds li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f3ea;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12px;
  color: #4b6043;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.discovery-seeds svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.discovery-seeds small {
  margin-left: 8px;
  color: #8b4936;
  white-space: nowrap;
}
.discovery-panel .discovery-privacy {
  font-size: 12px;
  max-width: 75ch;
}
.discovery-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.discovery-panel .discovery-status {
  color: #536445;
  font-size: 13px;
  margin-bottom: 0;
}
.discovery-status:empty {
  display: none;
}
.discovery-panel .form-error {
  color: #973c30;
}
.discovery-results-heading {
  flex-wrap: wrap;
  gap: 12px;
}
.discovery-results-heading p {
  font-size: 13px;
  color: #7b806f;
  line-height: 1.6;
  max-width: 75ch;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
}
.discovery-ai-label {
  font-size: 11px;
  color: #687c5c;
  border: 1px solid #dce3d2;
  border-radius: 20px;
  padding: 6px 10px;
  white-space: nowrap;
}
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.discovery-card {
  border: 1px solid #e3e5da;
  border-radius: 16px;
  padding: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.discovery-book {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.discovery-book .book-cover {
  width: 72px;
  height: 108px;
}
.discovery-book h3 {
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 400;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.discovery-book .author {
  font-size: 14px;
}
.discovery-edition {
  font-size: 12px;
  color: #868976;
  line-height: 1.65;
  margin: 8px 0 0;
}
.discovery-reason {
  margin: 24px 0 12px;
}
.discovery-reason > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #69805b;
  font-weight: 600;
}
.discovery-reason p {
  font-size: 14px;
  line-height: 1.8;
  color: #5f6b55;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.discovery-verification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #7b8270;
  margin: auto 0 20px;
  padding-top: 12px;
}
.discovery-verification svg {
  width: 14px;
  height: 14px;
}
.discovery-verification span {
  flex-basis: 100%;
  padding-left: 19px;
}
.discovery-card-actions {
  display: grid;
  gap: 10px;
}
.discovery-card-actions .btn {
  min-height: 46px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
}
.discovery-source {
  text-align: center;
  padding: 4px;
  color: #6b775f;
  font-size: 12px;
}
.discovery-store-note {
  color: #818674;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 20px;
}
.discovery-welcome {
  display: grid;
  justify-items: center;
  padding: 40px 24px;
  border: 1px dashed #d8decc;
  border-radius: 16px;
  text-align: center;
  color: #7e8f71;
  gap: 12px;
}
.discovery-welcome svg {
  width: 30px;
  height: 30px;
}
.discovery-welcome p {
  font:
    25px Georgia,
    serif;
  margin: 0;
  color: #566c49;
}
.discovery-welcome span {
  font-size: 13px;
  line-height: 1.7;
  color: #808772;
}
@media (max-width: 980px) {
  .discovery-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .discovery-panel {
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 24px;
  }
  .discovery-tabs {
    margin-bottom: 22px;
  }
  .discovery-tabs button {
    font-size: 13px;
    padding: 10px 5px;
    gap: 5px;
  }
  .discovery-panel h2 {
    font-size: 27px;
  }
  .discovery-panel p {
    font-size: 15px;
  }
  .discovery-panel .discovery-privacy {
    font-size: 12px;
  }
  .discovery-form-actions {
    flex-direction: column;
  }
  .discovery-form-actions .btn {
    width: 100%;
    min-height: 48px;
  }
  .discovery-card {
    padding: 20px;
  }
  .discovery-book {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
  }
  .discovery-book .book-cover {
    width: 68px;
    height: 102px;
  }
  .discovery-book h3 {
    font-size: 24px;
  }
  .discovery-reason p {
    font-size: 15px;
  }
}
@media (max-width: 360px) {
  .nav-item {
    font-size: 10px;
  }
  .discovery-tabs button {
    font-size: 12px;
  }
  .discovery-tabs svg {
    display: none;
  }
  .discovery-card {
    padding: 16px;
  }
}
@media (max-width: 760px) {
  .toolbar .searchbox input[type="search"] {
    padding-left: 40px;
  }
  .toolbar .searchbox svg {
    top: 16px;
  }
}
.review-word-count {
  display: block;
  color: #737a69;
  font-size: 12px;
  text-align: right;
  margin-top: 5px;
}

.book-medium {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  margin: 7px 0;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  color: #6f7466;
  background: #eeeee7;
}
.book-medium svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.book-medium--physical {
  color: #4f6544;
  background: #edf2e4;
}
.book-medium--ebook {
  color: #505d87;
  background: #edf0fa;
}
.library-card .book-medium {
  display: flex;
}
.medium-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar .medium-filter label {
  display: inline;
  font-size: 12px;
  color: #858a78;
}
.medium-filter select {
  max-width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #5e6b51;
  font: inherit;
  font-size: 12px;
}
@media (max-width: 760px) {
  .book-medium {
    font-size: 12px;
  }
  .toolbar .medium-filter {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .toolbar .medium-filter label {
    font-size: 13px;
  }
  .medium-filter select {
    min-width: 0;
    flex: 1;
    min-height: 46px;
    font-size: 14px;
  }
}
.review-helper {
  margin-top: 12px;
  border: 1px solid #dce2d2;
  border-radius: 12px;
  background: #f4f6ef;
}
.review-helper summary {
  cursor: pointer;
  color: #4c634c;
  padding: 15px;
  font-size: 13px;
  font-weight: 600;
  min-height: 48px;
}
.review-helper summary svg {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}
.review-helper-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 10px;
}
.review-helper-body > p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.65;
  color: #66725b;
}
.review-helper-body > .review-privacy {
  font-size: 11px;
  color: #777c70;
}
.review-helper-body .btn {
  justify-self: start;
}
.review-helper-body .review-status {
  font-size: 12px;
  color: #6d654e;
}
.review-status:empty {
  display: none;
}
.review-draft {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #dce2d2;
}
.review-draft textarea {
  min-height: 260px;
  background: var(--paper);
}
.saved-review {
  padding: 20px;
  margin: 24px 0;
  border-radius: 12px;
  background: #f0f3e9;
}
.saved-review h3 {
  font-size: 23px;
  margin: 0 0 12px;
}
.saved-review p {
  font-size: 14px;
  line-height: 1.85;
  color: #526448;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
@media (max-width: 760px) {
  .review-helper summary {
    font-size: 14px;
  }
  .review-helper-body {
    padding: 0 14px 16px;
  }
  .review-helper-body .btn {
    width: 100%;
    font-size: 13px;
  }
  .review-helper-body > p {
    font-size: 14px;
  }
  .review-helper-body > .review-privacy {
    font-size: 12px;
  }
  .detail-description {
    font-size: 14px;
  }
  .metadata-grid dt {
    font-size: 11px;
  }
  .metadata-grid dd {
    font-size: 14px;
  }
}

/* On-demand tours stay separate from editors, preserving unsaved fields. */
.guide-launch,
.modal-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dce1d3;
  border-radius: 24px;
  color: #526149;
  background: #fafbf7;
  font-size: 12px;
  white-space: nowrap;
}
.guide-launch > span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
}
.modal-header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
/* Book sheets keep the tools outside their scrolling content. */
#modal.book-sheet-dialog {
  --sheet-height: min(90dvh, calc(100dvh - var(--app-safe-area-top) - var(--app-safe-area-bottom) - 24px));
  overflow: hidden;
}
.book-sheet-dialog .modal-body {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(var(--sheet-height) - 2px);
  padding: 0;
  overflow: hidden;
}
.book-sheet-dialog .modal-header {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  z-index: 2;
}
.book-sheet-dialog .modal-header > div:first-child { min-width: 0; }
.book-sheet-dialog .modal-header .icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
}
.book-sheet-dialog .sheet-edit {
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--accent-light);
}
.book-sheet-dialog .book-sheet-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 24px 26px calc(26px + var(--app-safe-area-bottom));
}
.book-sheet-dialog .book-sheet-editor {
  padding-bottom: calc(110px + var(--app-safe-area-bottom));
  scroll-padding-block: 18px calc(100px + var(--app-safe-area-bottom));
}
.book-sheet-dialog .sheet-save {
  position: absolute;
  z-index: 3;
  right: 26px;
  bottom: calc(20px + var(--app-safe-area-bottom));
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  color: white;
  box-shadow: 0 5px 22px #48251940;
}
.book-sheet-dialog .sheet-save:hover { background: #713b2b; }
.book-sheet-dialog .sheet-save svg { width: 26px; height: 26px; stroke-width: 1.7; }
@media (max-width: 760px) {
  #modal.book-sheet-dialog {
    --sheet-height: calc(100dvh - 8px - var(--app-safe-area-top));
  }
  .book-sheet-dialog .modal-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px calc(18px + var(--app-safe-area-right)) 16px calc(18px + var(--app-safe-area-left));
  }
  .book-sheet-dialog .modal-header > div:first-child { order: 2; flex-basis: 100%; }
  .book-sheet-dialog .modal-header-tools { margin-left: auto; }
  .book-sheet-dialog .modal-header h2 { font-size: 25px; margin-bottom: 4px; }
  .book-sheet-dialog .book-sheet-content {
    padding-left: calc(18px + var(--app-safe-area-left));
    padding-right: calc(18px + var(--app-safe-area-right));
  }
  .book-sheet-dialog .sheet-save { right: calc(18px + var(--app-safe-area-right)); }
}
#guide-dialog {
  position: fixed;
  inset: auto;
  left: calc((100% + var(--app-safe-area-left) - var(--app-safe-area-right)) / 2);
  bottom: max(12px, var(--app-safe-area-bottom));
  margin: 0;
  transform: translateX(-50%);
  width: min(490px, calc(100vw - 24px - var(--app-safe-area-left) - var(--app-safe-area-right)));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
#guide-dialog[style*="top"] {
  bottom: auto;
  transform: none;
}
#guide-dialog::backdrop {
  background: #26332128;
  backdrop-filter: none;
}
#guide-dialog.guide-center {
  inset: calc((100% + var(--app-safe-area-top) - var(--app-safe-area-bottom)) / 2) auto auto
    calc((100% + var(--app-safe-area-left) - var(--app-safe-area-right)) / 2);
  transform: translate(-50%, -50%);
  width: min(700px, calc(100vw - 24px - var(--app-safe-area-left) - var(--app-safe-area-right)));
}
.guide-coach {
  position: relative;
  z-index: 1;
  padding: 26px;
  border: 1px solid #d6ddcc;
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 16px 70px #24341c40;
  max-height: calc(100dvh - 32px - var(--app-safe-area-top) - var(--app-safe-area-bottom));
  overflow: auto;
}
.guide-coach h2 {
  margin: 8px 32px 10px 0;
  font-size: 29px;
  line-height: 1.15;
}
.guide-coach .eyebrow {
  padding-right: 28px;
  font-size: 10px;
}
.guide-intro,
.guide-copy {
  font-size: 14px;
  line-height: 1.65;
  color: #717968;
  margin: 12px 0 20px;
}
.guide-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 25px;
}
.guide-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.guide-topic {
  display: flex;
  align-items: start;
  gap: 10px;
  text-align: left;
  padding: 17px 14px;
  border: 1px solid #e2e5d9;
  border-radius: 11px;
  background: #f7f8f2;
  color: #3c4e35;
}
.guide-topic:hover {
  border-color: #9aaa88;
  background: #eef2e7;
}
.guide-topic-number {
  font-family: Georgia, serif;
  font-size: 20px;
  color: #a66a4d;
}
.guide-topic > span:nth-child(2) {
  flex: 1;
}
.guide-topic strong,
.guide-topic small,
.guide-topic em {
  display: block;
}
.guide-topic strong {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}
.guide-topic small {
  margin: 5px 0 8px;
  font-size: 11px;
  color: #737b68;
  line-height: 1.5;
}
.guide-topic em {
  font-size: 10px;
  font-style: normal;
  color: #937659;
}
.guide-progress {
  display: flex;
  gap: 5px;
  margin: 0 28px 18px 0;
}
.guide-progress > span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #e5e8dc;
}
.guide-progress .done {
  background: #85996f;
}
.guide-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.guide-actions .btn {
  min-height: 44px;
  font-size: 12px;
}
.guide-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}
.guide-spotlight {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border: 2px solid #b17b50;
  border-radius: 10px;
  box-shadow: 0 0 0 4px #fffdf3c7;
}
.guide-highlight {
  outline: 2px solid #b17b50;
  outline-offset: 5px;
}
@media (max-width: 760px) {
  .reading-card .today-reading {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding: 14px;
  }
  .today-reading-stats {
    gap: 8px;
  }
  .today-reading-stats > div + div {
    padding-left: 8px;
  }
  .today-reading-stats dt {
    font-size: 11px;
  }
  .today-reading > p {
    font-size: 11px;
  }
  .topbar {
    gap: 10px;
  }
  .guide-launch {
    padding: 0 10px;
  }
  .modal-header {
    gap: 10px;
    flex-wrap: wrap;
  }
  .modal-header > div:first-child {
    flex: 1;
    min-width: 150px;
  }
  .guide-topics {
    grid-template-columns: 1fr;
  }
  .guide-topic {
    padding: 13px;
  }
  .guide-topic small {
    margin-bottom: 4px;
  }
  .guide-coach {
    padding: 22px 20px;
  }
  .guide-coach h2 {
    font-size: 26px;
  }
  .guide-copy {
    font-size: 13px;
    margin-bottom: 17px;
  }
  .guide-center .guide-coach {
    max-height: calc(100dvh - 28px - var(--app-safe-area-top) - var(--app-safe-area-bottom));
  }
}
@media (max-width: 360px) {
  .today-reading-stats dd {
    font-size: 23px;
  }
  .today-reading-stats small {
    font-size: 9px;
  }
  .guide-actions {
    gap: 8px;
  }
  .guide-actions .btn {
    padding: 10px 12px;
  }
}
