@font-face {
  font-family: "Libre Caslon";
  src: url("/assets/LibreCaslonText-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon";
  src: url("/assets/LibreCaslonText-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/DMSans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --paper: #f2f5f1;
  --white: #fffdf8;
  --ink: #273c33;
  --muted: #64695e;
  --line: #dcded2;
  --accent: #97452f;
  --accent-hover: #783521;
  --green: #314f40;
  --sage: #e7ecdf;
  --red: #a1302d;
  --shadow: 0 18px 55px #2032271c;
  --serif: "Libre Caslon", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.5;
  scrollbar-color: #a9b2a3 var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
::selection {
  background: #d4ddc7;
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3,
.serif {
  font-family: var(--serif);
  font-weight: 400;
}
h1,
h2 {
  text-wrap: balance;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  line-height: 1.1;
}
h2 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.2;
}
h3 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
p {
  line-height: 1.65;
}
small,
.small {
  font-size: 13px;
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.hidden,
[hidden] {
  display: none !important;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 20px;
}
.text-preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 29px;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  color: var(--accent);
}
.brand-mark {
  display: inline-flex;
  gap: 3px;
  margin-right: 9px;
  transform: rotate(-7deg);
}
.brand-mark i {
  width: 5px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  display: block;
}
.brand-mark i:last-child {
  transform: rotate(-14deg);
  margin-left: 2px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #c7cbbd;
  background: transparent;
  border-radius: 6px;
  padding: 11px 18px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  transition:
    background 0.16s,
    color 0.16s;
}
.button:hover {
  background: #e9ecdf;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.dark {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.button.dark:hover {
  background: #243e31;
}
.button.ghost {
  border-color: transparent;
}
.button.small {
  padding: 9px 12px;
  font-size: 13px;
}
.button.danger {
  color: var(--red);
}
.text-button {
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 13px;
  min-height: 44px;
  padding: 6px 2px;
  color: var(--accent);
}
.text-button:hover {
  color: var(--accent-hover);
}
.close {
  background: none;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 5px;
}
.close:hover {
  background: var(--sage);
}
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.45;
  background: #e7ebdf;
  color: #465541;
}
.badge {
  background: var(--sage);
  color: var(--green);
}
.notice,
.error {
  padding: 16px 18px;
  border-radius: 6px;
  line-height: 1.6;
  font-size: 14px;
  background: var(--sage);
  color: var(--green);
}
.warning {
  background: #f3e8cf;
  color: #785117;
}
.error {
  color: var(--red);
  background: #faeae3;
}
.form-help,
.progress-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--white);
  padding: 15px;
}
.skip-link:focus {
  top: 10px;
}
.loading {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.loading p {
  margin-top: 25px;
  color: var(--muted);
}
.landing {
  max-width: 1320px;
  margin: auto;
  padding: 0 64px;
}
.landing-nav {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a {
  text-decoration: none;
}
.nav-links a:hover {
  text-decoration: underline;
}
.hero {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0 56px;
}
.hero h1 {
  margin: 0 0 26px;
  max-width: 540px;
}
.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}
.hero-copy > p {
  font-size: 17px;
  max-width: 420px;
  color: var(--muted);
}
.hero .row {
  margin-top: 30px;
  gap: 12px;
}
.hero-footnote {
  margin-top: 17px;
  font-size: 13px !important;
}
.hero-photograph {
  margin: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hero-photograph > img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  max-height: 520px;
  object-fit: cover;
  object-position: 50% 43%;
  border-radius: 2px;
}
.hero-photograph figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.hero-photograph figcaption a {
  font-size: 10px;
}
.promise-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
  font-size: 13px;
  color: var(--green);
}
.promise-strip span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section {
  padding: 90px 0;
}
.section-heading {
  max-width: 640px;
  margin-bottom: 36px;
}
.section-heading h2 {
  margin-bottom: 22px;
}
.section-heading p {
  color: var(--muted);
  max-width: 65ch;
}
.catalog-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 74px;
  align-items: center;
}
.catalog-section .section-heading {
  margin: 0;
}
.feature-notes {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
}
.feature-notes li {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.feature-notes strong {
  font-size: 15px;
  font-weight: 600;
}
.feature-notes span {
  font-size: 14px;
  color: var(--muted);
}
.catalog-preview {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
  scroll-margin-top: 24px;
}
.preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.preview-heading h3 {
  font: 600 14px var(--sans);
  letter-spacing: 0;
  margin: 0;
}
.preview-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.preview-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 22px 0;
  gap: 12px;
  overflow: auto;
}
.preview-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 0;
  font-size: 12px;
  min-height: 44px;
  white-space: nowrap;
  color: var(--muted);
}
.preview-tabs button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
.sample-title {
  padding: 4px 0 20px;
}
.sample-title h3 {
  font-size: 29px;
  margin: 0 0 8px;
}
.sample-title p {
  font-size: 14px;
  margin: 0 0 7px;
}
.sample-title > span {
  font-size: 12px;
  color: var(--muted);
}
.sample-metadata {
  margin: 0 0 20px;
}
.sample-metadata > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.sample-metadata dt {
  color: var(--muted);
}
.sample-metadata dd {
  margin: 0;
}
.catalog-preview > p {
  margin: 0;
}
.shelf-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  background: var(--sage);
  padding: 52px 44px;
  align-items: center;
  border-radius: 2px;
}
.shelf-section p {
  color: #52614c;
  font-size: 15px;
}
.shelf-section .small {
  font-size: 13px;
}
.shelf-section h2 {
  margin-bottom: 24px;
}
.workflow-step {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid #cbd3bf;
}
.workflow-step:last-child {
  border: 0;
}
.step-number {
  font-family: var(--serif);
  font-size: 24px;
  color: #5a6d4b;
}
.workflow-step strong {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
}
.workflow-step p {
  font-size: 14px;
  margin: 0;
}
.pricing {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  max-width: 1040px;
  margin: auto;
}
.price-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.price-card.full {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.price-card h3 {
  margin-bottom: 24px;
}
.price {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.price small {
  font: 14px var(--sans);
  letter-spacing: 0;
}
.price-card p {
  font-size: 14px;
}
.price-card ul {
  padding-left: 20px;
  margin: 24px 0 30px;
  font-size: 14px;
  line-height: 2;
}
.price-card li {
  padding-left: 4px;
}
.price-card .button {
  width: 100%;
}
.price-card.full .button {
  background: var(--paper);
  color: var(--green);
}
.price-card.full .small {
  color: #d5decf;
  font-size: 12px;
  margin: 20px 0 0;
}
.paid-label { font-size: 12px; font-weight: 600; margin-bottom: 24px; }
.billing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 20px; }
.billing-option { padding: 18px 14px; border: 1px solid var(--line); border-radius: 8px; }
.billing-option.annual { background: #edf0e7; color: #294436; border-color: #bdc9ad; }
.price-card.full .billing-option.monthly { border-color: #92a99a; }
.billing-option-heading { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.billing-value { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.billing-amount { font: 36px var(--serif); margin: 12px 0 6px; }
.billing-amount span { font: 12px var(--sans); }
.billing-option .billing-total, .billing-option .billing-saving { font-size: 12px; line-height: 1.5; margin: 6px 0; }
.billing-saving { font-weight: 600; }
.billing-option .button { margin-top: 14px; width: 100%; }
.price-card.full .button:disabled { opacity: 1; background: transparent; color: #e7ece3; border: 1px solid #92a99a; cursor: default; }
@media (max-width: 430px) {
  .billing-options { grid-template-columns: 1fr; }
}
.section.center .section-heading {
  margin: 0 auto 36px;
  text-align: center;
}
.faq {
  max-width: 850px;
  margin: auto;
}
.faq-topics { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.faq-topics a { font-size: 14px; text-underline-offset: 4px; }
.faq-group { margin-top: 40px; scroll-margin-top: 24px; }
.faq-group h3 { font-size: 24px; margin-bottom: 4px; }
.faq [hidden] { display: none !important; }
.faq-controls { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; text-align: left; margin-bottom: 16px; }
.faq-controls label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
.faq-controls input, .faq-controls select { width: 100%; min-width: 0; }
.faq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 26px; }
.faq-tools #faq-count { margin: 0 auto 0 0; font-size: 13px; }
.faq-tools .text-button { font-size: 13px; }
.faq-topics a { display: inline-flex; gap: 7px; align-items: baseline; }
.faq-topic-count { color: var(--muted); font-size: 11px; text-decoration: none; }
.faq-group .faq-group-description { margin: 6px 0 8px; font-size: 14px; }
.faq details { scroll-margin-top: 24px; }
.faq-status { display: inline-block; margin: 2px 0 2px 10px; padding: 1px 7px; border-radius: 3px; font: 11px/1.6 var(--sans); vertical-align: middle; white-space: nowrap; background: #e7ece3; color: #345043; }
.faq-status.setup { background: #ece9df; color: #625532; }
.faq-status.idea { background: #e7eaf1; color: #42536d; }
.faq-answer .faq-status { margin: 10px 0 0; }
.faq-answer .faq-answer-link { display: inline-block; margin-top: 14px; font-size: 12px; color: var(--green); text-underline-offset: 3px; }
.faq-empty { padding: 30px 0; }
.pilot-welcome { max-width: 720px; margin: auto; }
.pilot-welcome h1 { font-size: clamp(38px, 6vw, 60px); margin-top: 24px; }
.pilot-welcome .row { justify-content: center; margin: 28px 0; }
.operations-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; margin: 24px 0; }
.operations-stats dt { color: var(--muted); font-size: 13px; }
.operations-stats dd { margin: 6px 0 0; font-size: 20px; }
.operations-alerts { padding: 16px 16px 16px 32px; background: #fff1dc; border-left: 3px solid #8a5a24; }
@media (max-width: 600px) {
  .faq-controls { grid-template-columns: 1fr; }
  .faq-topics { gap: 12px 18px; }
  .faq-group h3 { font-size: 23px; }
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  font-size: 17px;
  cursor: pointer;
  line-height: 1.6;
  min-height: 32px;
}
.faq p {
  font-size: 15px;
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 70ch;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.footer .brand {
  font-size: 24px;
  color: var(--ink);
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  background: #eeefe7;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .brand {
  font-size: 27px;
}
.side-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 10px 12px;
}
.side-nav {
  display: grid;
  gap: 4px;
}
.side-nav button {
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 6px;
  font-size: 14px;
  min-height: 44px;
  min-width: 0;
}
.side-nav button.active {
  background: #dae3d1;
  color: var(--green);
  font-weight: 600;
}
.side-nav button:hover {
  background: #e1e6d8;
}
.side-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.side-collections {
  max-height: 26vh;
  overflow: auto;
}
.side-collections button {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.side-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.plan-label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.meter {
  height: 6px;
  width: 100%;
  margin: 0 0 16px;
  accent-color: var(--green);
}
.user-button {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
  padding: 0;
  text-align: left;
  min-height: 44px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d6dfcc;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  flex-shrink: 0;
}
.user-button strong {
  font-size: 13px;
  display: block;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-button small {
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  padding: 0 44px 52px;
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.desktop-breadcrumb > span {
  margin: 0 10px;
  color: #9ca491;
}
.topbar .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.mobile-brand {
  display: none;
}
.page-heading {
  padding: 40px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  font-size: 39px;
  margin: 0 0 10px;
  line-height: 1.2;
}
.page-heading p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}
.page-heading .row {
  flex-shrink: 0;
}
.library-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.library-summary span:first-child {
  color: var(--ink);
}
.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 210px;
}
.search-box .icon {
  position: absolute;
  left: 13px;
  top: 13px;
  color: var(--muted);
  width: 18px;
}
.search-box input {
  padding-left: 41px;
}
.toolbar select {
  width: auto;
  max-width: 175px;
}
.filter-panel {
  background: #e9ecdf;
  padding: 22px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}
.filter-panel label {
  font-size: 12px;
}
.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #c8d1bd;
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--sage);
  font-size: 12px;
  min-height: 36px;
}
.filter-chip .icon {
  width: 14px;
  height: 14px;
}
.results-label {
  font-size: 13px;
  color: var(--muted);
  margin: 22px 0 20px;
}
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--sage);
  border-radius: 8px;
  margin-bottom: 18px;
}
.selection-bar strong {
  font-size: 13px;
  font-weight: 500;
}
.selection-mark {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--green);
  background: var(--white);
  border-radius: 4px;
  display: grid;
  place-items: center;
  z-index: 1;
}
.selected .selection-mark {
  background: var(--green);
  color: var(--white);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 32px 26px;
}
.book-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  min-width: 0;
  position: relative;
  border-radius: 6px;
}
.cover-slot {
  height: 236px;
  background: #eeeee4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 18px 28px;
  margin-bottom: 16px;
  position: relative;
  border-radius: 6px;
  transition: background 0.18s;
}
.book-card:hover .cover-slot {
  background: #e0e5d6;
}
.book-card.selected .cover-slot {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  background: #e0e7d8;
}
.cover-slot img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 3px 6px 11px #20322728;
  border-radius: 1px;
}
.placeholder-cover {
  width: 135px;
  max-width: 100%;
  height: 190px;
  background: var(--green);
  color: #fcf5df;
  box-shadow: 3px 6px 11px #20322728;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
}
.placeholder-cover:before,
.placeholder-cover:after {
  content: "";
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  margin: 12px 0;
}
.placeholder-cover strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.placeholder-cover small {
  font-size: 10px;
  margin-top: 12px;
  line-height: 1.5;
}
.placeholder-cover[data-color="1"] {
  background: #86523e;
}
.placeholder-cover[data-color="2"] {
  background: #6d6346;
}
.placeholder-cover[data-color="3"] {
  background: #485c6a;
}
.placeholder-cover[data-color="4"] {
  background: #745254;
}
.no-cover-label {
  position: absolute;
  bottom: 7px;
  right: 10px;
  left: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.book-card h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.book-card p {
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}
.book-card .tag {
  font-size: 11px;
  padding: 3px 6px;
  background: transparent;
  border: 1px solid var(--line);
}
.book-card .row {
  gap: 5px;
}
.book-list {
  display: grid;
}
.list-book {
  display: grid;
  grid-template-columns: 46px minmax(100px, 2fr) minmax(80px, 1fr) minmax(
      80px,
      1fr
    );
  gap: 20px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 8px;
  background: transparent;
  width: 100%;
}
.list-book:hover,
.list-book.selected {
  background: var(--sage);
}
.list-book img,
.mini-cover {
  width: 36px;
  height: 50px;
  object-fit: cover;
}
.mini-cover {
  background: var(--green);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif);
}
.list-book strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  display: block;
  overflow-wrap: anywhere;
}
.list-book small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.empty-state {
  padding: 54px 25px;
  text-align: center;
  background: #eeefe5;
  border-radius: 12px;
}
.empty-state > .icon {
  width: 38px;
  height: 38px;
  color: var(--green);
  margin-bottom: 24px;
}
.empty-state h2 {
  font-size: 31px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 15px;
  max-width: 470px;
  margin: 0 auto 25px;
  color: var(--muted);
}
.empty-state .row {
  justify-content: center;
}
.empty-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 34px;
}
.empty-guide div {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.empty-guide strong {
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-guide p {
  font-size: 13px;
  color: var(--muted);
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.collection-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.collection-card > .icon {
  color: var(--accent);
  width: 28px;
  height: 28px;
}
.collection-card h3 {
  margin: 24px 0 12px;
  overflow-wrap: anywhere;
}
.collection-card p {
  font-size: 14px;
  color: var(--muted);
}
.collection-card .row {
  gap: 4px;
}
.membership-list {
  max-height: 50vh;
  overflow: auto;
}
.membership-book {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.membership-book strong {
  font-weight: 500;
}
.membership-book small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.panel {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  min-width: 0;
}
.panel h3 {
  font-size: 24px;
  margin-bottom: 17px;
}
.panel p {
  font-size: 14px;
  color: var(--muted);
}
.settings-grid .span-2 {
  grid-column: 1/-1;
}
.metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.metadata dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.metadata dd {
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.metadata .wide {
  grid-column: 1/-1;
}
.detail-cover {
  max-height: 270px;
  max-width: 170px;
  object-fit: contain;
  box-shadow: var(--shadow);
}
.detail-top {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 32px;
}
.detail-top > div:first-child {
  position: relative;
}
.detail-top h2 {
  font-size: 31px;
  margin: 8px 0 16px;
  overflow-wrap: anywhere;
}
.detail-top .placeholder-cover {
  width: 155px;
  height: 224px;
}
.photo-gallery {
  display: flex;
  gap: 16px;
  overflow: auto;
  margin-top: 20px;
  padding: 3px;
}
.photo-gallery figure {
  margin: 0;
  flex: 0 0 112px;
}
.photo-gallery img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 5px;
}
.photo-gallery figcaption {
  font-size: 12px;
  margin: 7px 0;
  color: var(--muted);
}
dialog {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  width: min(760px, calc(100% - 32px));
  max-height: 92dvh;
  padding: 0;
  box-shadow: 0 25px 90px #1c271d40;
}
dialog::backdrop {
  background: #1f292978;
}
.auth-dialog {
  width: min(500px, calc(100% - 32px));
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.modal-head h2 {
  font-size: 24px;
  margin: 0;
  letter-spacing: -0.025em;
}
.modal-body {
  padding: 28px;
}
.modal-foot {
  border-top: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  background: var(--paper);
  z-index: 2;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.essential-fields > label:first-child {
  grid-column: 1/-1;
}
.essential-fields input[name="title"] {
  font-family: var(--serif);
  font-size: 21px;
  padding: 13px;
}
.form-intro {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
}
.form-section {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 3px;
}
.form-section > summary {
  padding: 20px 0;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}
.form-section > summary span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 12px;
}
.form-section > summary::marker {
  color: var(--accent);
  font-size: 12px;
}
.form-section[open] > summary {
  padding-bottom: 24px;
}
.form-cover {
  height: 130px;
  max-width: 105px;
  object-fit: contain;
  display: block;
  margin-bottom: 15px;
  box-shadow: 2px 4px 8px #273c3318;
}
#cover-status {
  margin-bottom: 18px;
}
.unsaved-warning {
  position: sticky;
  top: 0;
  padding: 20px;
  background: #f3e8cf;
  color: #604621;
  border-radius: 8px;
  z-index: 3;
  margin-bottom: 22px;
}
.unsaved-warning p {
  margin: 8px 0 14px;
  font-size: 14px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #82917d;
  border-radius: 5px;
  background: var(--white);
  padding: 11px 12px;
  color: var(--ink);
  min-height: 44px;
  min-width: 0;
  font-size: 14px;
  caret-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: #6c7365;
  opacity: 1;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
  margin: 0;
}
input[type="file"] {
  font-size: 13px;
  padding: 8px;
  overflow: hidden;
}
input[type="file"]::file-selector-button {
  background: var(--sage);
  color: var(--green);
  border: 0;
  border-radius: 3px;
  padding: 8px 10px;
  font: inherit;
  margin-right: 10px;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-height: 32px;
  line-height: 1.6;
}
.section-label {
  font-weight: 600;
  font-size: 14px;
  margin: 28px 0 16px;
}
.lookup-area {
  padding: 20px;
  border-radius: 8px;
  background: #e9ecdf;
  margin-bottom: 26px;
}
.lookup-area > label {
  margin-bottom: 10px;
  font-weight: 600;
}
.lookup-area .row {
  flex-wrap: nowrap;
}
.lookup-area input {
  flex: 1;
}
.lookup-area p {
  font-size: 13px;
  color: #59634f;
  margin: 10px 0 0;
}
.lookup-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.lookup-results:empty {
  display: none;
}
.lookup-result {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 13px;
  background: var(--white);
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
}
.lookup-result:hover {
  background: var(--paper);
}
.lookup-result img {
  width: 32px;
  height: 46px;
  object-fit: cover;
}
.lookup-result strong {
  display: block;
  font-size: 14px;
}
.lookup-result small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.auth-wrap {
  max-width: 390px;
  margin: auto;
  padding: 8px 0;
}
.auth-wrap h2 {
  font-size: 33px;
  margin-bottom: 14px;
}
.auth-wrap > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 26px;
}
.auth-wrap .button {
  width: 100%;
}
.auth-wrap .row {
  justify-content: center;
}
.auth-switch {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 24px 0 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 28px;
  margin-bottom: 24px;
  overflow: auto;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 15px 1px;
  font-size: 14px;
  white-space: nowrap;
  min-height: 48px;
}
.tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.import-box {
  padding: 28px;
  border-radius: 12px;
  background: #e9ecdf;
  margin-bottom: 32px;
}
.import-box h3 {
  margin-bottom: 14px;
}
.import-box label {
  margin: 20px 0 14px;
}
.import-box > .button {
  margin-top: 18px;
}
.draft-row {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.draft-row h3 {
  font-size: 19px;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.draft-row p {
  font-size: 13px;
  margin: 0;
  color: var(--muted);
}
.review-row {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 18px;
}
.review-row .form-grid {
  gap: 16px;
}
.review-row > .row {
  margin-bottom: 12px;
}
.review-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.review-row details summary {
  min-height: 36px;
  cursor: pointer;
}
.review-actions {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 2;
}
.review-photo {
  max-height: 240px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 5px;
}
.selection-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.legal {
  max-width: 800px;
  margin: 64px auto;
  padding: 0 24px;
}
.legal h1 {
  font-size: 44px;
}
.legal h2 {
  font-size: 28px;
  margin-top: 36px;
}
.legal p {
  font-size: 16px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(580px, calc(100% - 32px));
  background: var(--green);
  color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px 22px;
  z-index: 50;
  font-size: 14px;
  line-height: 1.6;
  display: none;
}
#toast.visible {
  display: block;
}
@media (min-width: 1500px) {
  .workspace {
    max-width: 1420px;
    margin: 0 auto;
    width: 100%;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
@media (max-width: 1100px) {
  .landing {
    padding: 0 36px;
  }
  .hero {
    gap: 36px;
  }
  .hero h1 {
    font-size: clamp(46px, 6vw, 66px);
  }
  .hero-photograph > img {
    min-height: 360px;
    max-height: 470px;
  }
  .catalog-section {
    gap: 36px;
  }
  .shelf-section {
    gap: 36px;
    padding: 38px 30px;
  }
  .workspace {
    padding: 0 26px 44px;
  }
  .shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 16px;
  }
  .sidebar .brand {
    font-size: 25px;
  }
  .filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid .span-2 {
    grid-column: auto;
  }
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 26px 20px;
  }
  .cover-slot {
    height: 224px;
    padding: 14px 14px 28px;
  }
  .catalog-preview {
    padding: 24px;
  }
  .sample-metadata > div {
    grid-template-columns: 95px 1fr;
  }
}
@media (max-width: 760px) {
  .landing {
    padding: 0 24px;
  }
  .landing-nav {
    min-height: 80px;
    gap: 12px;
  }
  .nav-links {
    gap: 8px;
  }
  .nav-links > a {
    display: none;
  }
  .nav-links .button {
    padding: 10px 12px;
    font-size: 13px;
  }
  .brand {
    font-size: 25px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0 32px;
    gap: 24px;
  }
  .hero h1 {
    font-size: clamp(43px, 8.8vw, 62px);
    max-width: 560px;
    margin-bottom: 22px;
  }
  .hero-copy > p {
    font-size: 16px;
    max-width: 470px;
  }
  .hero .row {
    margin-top: 24px;
  }
  .hero-photograph {
    width: 100%;
  }
  .hero-photograph > img {
    min-height: 0;
    height: 350px;
    max-height: none;
    object-position: 50% 35%;
  }
  .hero-photograph figcaption {
    font-size: 11px;
  }
  .hero-photograph figcaption a {
    font-size: 10px;
  }
  .promise-strip {
    flex-wrap: wrap;
    font-size: 13px;
    gap: 14px 24px;
    justify-content: flex-start;
  }
  .section {
    padding: 56px 0;
  }
  .catalog-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .catalog-section .section-heading {
    max-width: 520px;
  }
  .feature-notes {
    margin-top: 24px;
  }
  .feature-notes li {
    padding: 14px 0;
  }
  .catalog-preview {
    padding: 24px;
  }
  .shelf-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 30px 24px;
  }
  .workflow-step {
    padding: 20px 0;
  }
  .pricing {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 28px;
  }
  .footer {
    flex-wrap: wrap;
    font-size: 12px;
    padding: 28px 0;
  }
  .footer .row {
    gap: 20px;
  }
  .shell {
    display: block;
    padding-bottom: 76px;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    display: block;
    border-right: 0;
    border-top: 1px solid var(--line);
    z-index: 5;
    background: var(--paper);
  }
  .sidebar > .brand,
  .sidebar .side-label,
  .side-collections,
  .side-footer {
    display: none;
  }
  .side-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .side-nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 7px 4px;
    font-size: 11px;
    min-height: 54px;
  }
  .side-nav .icon {
    width: 20px;
    height: 20px;
  }
  .side-count {
    display: none;
  }
  .workspace {
    padding: 0 20px 28px;
  }
  .topbar {
    height: 68px;
    font-size: 11px;
  }
  .mobile-brand {
    display: block;
    font-size: 25px;
  }
  .desktop-breadcrumb {
    display: none;
  }
  .page-heading {
    padding: 28px 0 20px;
    gap: 20px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading > .row {
    gap: 8px;
    width: 100%;
    flex-shrink: 1;
  }
  .page-heading > .row .button {
    flex: 1;
  }
  .library-summary {
    gap: 10px 20px;
    font-size: 12px;
    margin-bottom: 22px;
    padding-bottom: 20px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }
  .cover-slot {
    height: 230px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar .search-box {
    flex-basis: 100%;
  }
  .toolbar .button {
    padding: 10px 12px;
    font-size: 13px;
  }
  .toolbar select {
    flex: 1;
    max-width: none;
    font-size: 13px;
  }
  .filter-panel {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    gap: 16px;
  }
  .filter-chip {
    min-height: 40px;
  }
  .selection-bar {
    padding: 12px;
    gap: 8px;
  }
  .selection-bar .button {
    width: 100%;
  }
  .empty-state {
    padding: 38px 20px;
  }
  .empty-state h2 {
    font-size: 28px;
  }
  .empty-guide {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
  }
  .empty-guide p {
    margin-bottom: 8px;
  }
  .detail-top {
    grid-template-columns: 110px 1fr;
    gap: 22px;
  }
  .detail-cover {
    max-width: 110px;
    max-height: 166px;
  }
  .detail-top .placeholder-cover {
    width: 110px;
    height: 164px;
    padding: 10px;
  }
  .detail-top .placeholder-cover strong {
    font-size: 15px;
  }
  .detail-top h2 {
    font-size: 25px;
  }
  .modal-head {
    padding: 14px 20px;
  }
  .modal-head h2 {
    font-size: 23px;
  }
  .modal-body {
    padding: 24px 20px;
  }
  .modal-foot {
    padding: 14px 20px;
  }
  .book-dialog {
    width: calc(100% - 16px);
    max-height: 96dvh;
  }
  .form-grid {
    gap: 18px;
  }
  .form-section > summary span {
    display: block;
    margin: 4px 0 0 17px;
    font-size: 13px;
  }
  .lookup-area {
    padding: 16px;
  }
  .lookup-area .row {
    flex-wrap: wrap;
  }
  .lookup-area input {
    flex-basis: 100%;
  }
  .lookup-area .button {
    width: 100%;
  }
  .form-grid,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .collection-card {
    padding: 26px;
  }
  .collection-card h3 {
    margin: 16px 0 10px;
  }
  .list-book {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 15px;
  }
  .list-book > small {
    display: none;
  }
  .draft-row {
    align-items: flex-start;
    gap: 12px;
  }
  .draft-row .row {
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .tabs {
    gap: 22px;
  }
  .tabs button {
    font-size: 13px;
  }
  .import-box {
    padding: 22px;
  }
  .review-row {
    padding: 20px 16px;
  }
  .review-actions {
    bottom: 76px;
    padding: 16px 0;
  }
  .review-actions > .row {
    width: 100%;
  }
  .review-actions .button {
    flex: 1;
  }
  .review-actions > span {
    font-size: 12px;
  }
  .settings-grid {
    gap: 20px;
  }
  .panel {
    padding: 24px;
  }
  .metadata {
    gap: 22px 16px;
  }
  input,
  select,
  textarea,
  .toolbar input {
    font-size: 16px;
  }
  .check {
    min-height: 44px;
  }
  #toast {
    bottom: 92px;
  }
  .auth-wrap {
    padding: 0;
  }
  .auth-wrap h2 {
    font-size: 30px;
  }
}
@media (max-width: 420px) {
  .landing {
    padding: 0 20px;
  }
  .landing-nav .brand-mark {
    display: none;
  }
  .landing-nav {
    gap: 8px;
  }
  .nav-links {
    gap: 3px;
  }
  .nav-links .button {
    font-size: 12px;
    padding: 9px 10px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero .row {
    gap: 8px;
  }
  .hero .row .button {
    font-size: 13px;
    padding: 12px;
  }
  .hero-photograph > img {
    height: 300px;
  }
  .catalog-preview {
    padding: 20px;
  }
  .preview-tabs {
    gap: 16px;
  }
  .preview-tabs button {
    font-size: 11px;
  }
  .preview-heading > span {
    font-size: 11px;
  }
  .sample-metadata > div {
    grid-template-columns: 85px 1fr;
    font-size: 13px;
  }
  .workspace {
    padding: 0 16px 26px;
  }
  .cover-slot {
    height: 208px;
    padding: 12px 12px 27px;
  }
  .placeholder-cover {
    height: 169px;
    padding: 12px;
  }
  .placeholder-cover strong {
    font-size: 16px;
  }
  .book-card h3 {
    font-size: 17px;
  }
  .book-card p {
    font-size: 12px;
  }
  .book-card .tag {
    font-size: 10px;
  }
  .book-grid {
    gap: 26px 14px;
  }
  .toolbar .button {
    padding: 10px;
    font-size: 12px;
  }
  .toolbar select {
    max-width: 145px;
  }
  .form-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }
  .essential-fields > label:first-child,
  .form-grid .wide {
    grid-column: auto;
  }
  .detail-top {
    grid-template-columns: 1fr;
  }
  .detail-top > div:first-child {
    width: 110px;
  }
  .topbar > span:last-child {
    max-width: 150px;
    text-align: right;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  .tabs {
    gap: 19px;
  }
  .tabs button {
    font-size: 12px;
  }
  .review-row {
    padding: 18px 14px;
  }
  .modal-head,
  .modal-foot {
    padding: 12px 16px;
  }
  .modal-body {
    padding: 22px 16px;
  }
  .auth-wrap h2 {
    font-size: 28px;
  }
  .draft-row {
    flex-wrap: wrap;
  }
  .draft-row .row {
    justify-content: flex-start;
    flex-shrink: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* Copy-led cards. One shared palette keeps book and collection surfaces related. */
[data-tone="0"] {
  --tile-color: #254f45;
  --tile-paper: #e7eee5;
  --tile-ink: #213e32;
}
[data-tone="1"] {
  --tile-color: #884e37;
  --tile-paper: #f3e3d7;
  --tile-ink: #583a2a;
}
[data-tone="2"] {
  --tile-color: #394d64;
  --tile-paper: #e7edf3;
  --tile-ink: #2d4054;
}
[data-tone="3"] {
  --tile-color: #756334;
  --tile-paper: #f0ead4;
  --tile-ink: #534623;
}
.workspace {
  background: #f8f9f4;
}
.sidebar {
  background: #283f35;
  color: #f6f3e8;
  border: 0;
}
.sidebar .brand-dot {
  color: #d99c77;
}
.sidebar .side-label,
.sidebar .side-count,
.sidebar .user-button small {
  color: #c1cfb9;
}
.sidebar .side-nav button:hover {
  background: #385044;
}
.sidebar .side-nav button.active {
  background: #e0e9d7;
  color: #253f31;
}
.sidebar .side-nav button.active .side-count {
  color: #40533b;
}
.sidebar .side-footer {
  border-color: #607264;
}
.sidebar .side-footer > .button {
  border-color: #8a9b86;
  color: #f4f2e7;
}
.sidebar .side-footer > .button:hover {
  background: #385044;
}
.sidebar .avatar {
  background: #d4dfc9;
  color: #283f35;
}
.sidebar .brand:focus-visible,
.sidebar button:focus-visible {
  outline-color: #e9b98b;
}
.book-tile {
  border-radius: 12px;
  overflow: hidden;
  background: var(--tile-paper);
  color: var(--tile-ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.book-tile .book-card {
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}
.book-tile .book-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}
.book-tile .cover-slot {
  background: var(--tile-color);
  border-radius: 0;
  margin: 0;
  width: 100%;
  height: 264px;
  padding: 25px 24px 37px;
  transition: filter 0.18s;
}
.book-tile .book-card:hover .cover-slot {
  background: var(--tile-color);
  filter: brightness(1.08);
}
.book-tile .cover-slot img {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 4px 8px 16px #16211b40;
}
.book-tile .no-cover-label {
  color: #fbf5e6;
  bottom: 38px;
  font-size: 12px;
}
.book-tile .card-edition {
  position: absolute;
  bottom: 12px;
  left: 20px;
  right: 20px;
  color: #faf4e8;
  font-size: 11px;
  letter-spacing: 0.025em;
  text-align: center;
}
.missing-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 100%;
  width: 100%;
  color: #f4eede;
  border: 1px solid #ffffff55;
  padding: 15px;
}
.missing-cover .icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.2;
}
.missing-cover span {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  text-align: center;
}
.book-card-copy {
  padding: 22px 20px 16px;
  width: 100%;
}
.book-tile h3 {
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-tile .book-card p {
  font-size: 13px;
  color: var(--tile-ink);
  margin: 0 0 18px;
  line-height: 1.5;
}
.card-detail-line {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 11px;
  line-height: 1.6;
  color: var(--tile-ink);
}
.card-detail-line > span + span:before {
  content: "·";
  margin-right: 12px;
}
.copy-photo-area {
  padding: 0 20px 8px;
}
.copy-photo-rail {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 0 16px;
}
.copy-photo-rail a {
  display: block;
  width: 42px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
}
.copy-photo-rail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.copy-photo-rail > span {
  font-size: 11px;
  margin-left: 3px;
  line-height: 1.4;
}
.copy-photo-rail small {
  display: block;
  font-size: 10px;
}
.card-photo-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-top: 1px solid #526b5630;
  background: transparent;
  font-size: 12px;
  color: var(--tile-ink);
  text-align: left;
  padding: 10px 0;
}
.card-photo-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.card-photo-button .icon {
  width: 16px;
  height: 16px;
}
.card-photo-button .icon:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
}
.book-tile.selected {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.book-tile.selected .selection-mark {
  background: var(--white);
  color: var(--green);
}
.book-tile.selected .cover-slot {
  outline: 0;
}
.collection-card {
  padding: 0;
  border: 0;
  background: var(--tile-paper);
  color: var(--tile-ink);
  overflow: hidden;
}
.collection-visual {
  background: var(--tile-color);
  height: 156px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 22px 25px 30px;
  position: relative;
  overflow: hidden;
}
.collection-visual img {
  height: 100%;
  max-width: 28%;
  object-fit: contain;
  box-shadow: 3px 6px 12px #12231b30;
}
.collection-initial {
  font-family: var(--serif);
  font-size: 76px;
  color: #f5ecd9;
  line-height: 1;
}
.collection-visual-count {
  position: absolute;
  bottom: 12px;
  right: 18px;
  font-size: 12px;
  color: #faf3e4;
}
.collection-copy {
  padding: 24px;
}
.collection-copy h3 {
  margin: 0 0 12px;
  font-size: 26px;
}
.collection-copy > p {
  display: none;
}
.collection-card .button {
  color: var(--tile-ink);
  border-color: #526b5640;
}
.collection-card .button.ghost {
  border-color: transparent;
}
.collection-card .button:hover {
  background: #ffffff55;
}
@media (max-width: 760px) {
  .sidebar {
    background: #283f35;
  }
  .sidebar .side-nav button.active {
    background: #e0e9d7;
  }
  .book-tile .cover-slot {
    height: 240px;
    padding: 20px 18px 36px;
  }
  .book-card-copy {
    padding: 18px 16px 14px;
  }
  .book-tile h3 {
    font-size: 20px;
  }
  .book-tile .book-card p {
    font-size: 12px;
    margin-bottom: 13px;
  }
  .copy-photo-area {
    padding: 0 16px 6px;
  }
  .card-photo-button {
    font-size: 11px;
    gap: 6px;
    min-height: 48px;
  }
  .card-photo-button .icon:last-child {
    display: none;
  }
  .copy-photo-rail {
    gap: 6px;
    flex-wrap: wrap;
  }
  .copy-photo-rail a {
    width: 38px;
    height: 44px;
  }
  .copy-photo-rail > span {
    flex-basis: 100%;
    display: flex;
    gap: 4px;
  }
  .collection-grid {
    grid-template-columns: 1fr 1fr;
  }
  .collection-copy {
    padding: 20px;
  }
  .collection-copy h3 {
    font-size: 22px;
  }
  .collection-visual {
    height: 142px;
  }
  .collection-card .button {
    font-size: 12px;
    padding: 9px 8px;
  }
  .missing-cover span {
    font-size: 17px;
  }
  .card-detail-line {
    font-size: 11px;
    gap: 4px;
  }
  .card-detail-line > span + span:before {
    display: none;
  }
  .card-detail-line > span {
    display: block;
    width: 100%;
  }
}
@media (max-width: 420px) {
  .book-tile .cover-slot {
    height: 202px;
    padding: 17px 14px 33px;
  }
  .book-card-copy {
    padding: 16px 13px 13px;
  }
  .book-tile h3 {
    font-size: 18px;
  }
  .book-tile .book-card p {
    font-size: 12px;
  }
  .copy-photo-area {
    padding: 0 13px 5px;
  }
  .card-photo-button {
    font-size: 11px;
    gap: 5px;
    line-height: 1.4;
  }
  .card-photo-button .icon {
    width: 15px;
    height: 15px;
  }
  .book-tile .card-edition {
    font-size: 10px;
    left: 10px;
    right: 10px;
  }
  .missing-cover span {
    font-size: 15px;
  }
  .missing-cover {
    gap: 14px;
    padding: 8px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .collection-visual {
    height: 165px;
  }
  .collection-copy h3 {
    font-size: 25px;
  }
}
.form-section {
  scroll-margin-top: 90px;
}
.error {
  scroll-margin-top: 100px;
}
@media (max-width: 760px) {
  .library-summary > span:nth-child(2) {
    display: none;
  }
  .library-summary {
    gap: 10px;
    justify-content: space-between;
  }
  .page-heading p {
    display: none;
  }
  .page-heading {
    gap: 16px;
  }
  .toolbar select {
    min-width: 108px;
    max-width: none;
  }
  .toolbar #select-books {
    padding-inline: 10px;
  }
  .results-label {
    margin-top: 16px;
  }
  .book-grid {
    gap: 24px 14px;
  }
}
