:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #203e34;
  background: #f8f7f2;
  font-size: 18px;
  --green: #234f40;
  --muted: #53665c;
  --line: #d8dfd6;
  --cream: #eef0e5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  font-weight: 650;
  padding: 12px 22px;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ab481c;
  outline-offset: 4px;
}
header {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 36px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand-icon {
  background: var(--green);
  color: white;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: Georgia, serif;
}
.brand-dot {
  color: #b64b29;
}
nav {
  display: flex;
  gap: 8px;
}
nav .account-link {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 650;
}
nav button {
  background: transparent;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 12px 16px;
}
.nav-current {
  background: #e9eee7;
  color: var(--green);
}
main {
  max-width: 1208px;
  margin: auto;
  padding: 24px 36px 64px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #536157;
  font-size: 0.78rem;
  margin-bottom: 40px;
}
.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: #758267;
  border-radius: 50%;
}
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 12px 0 55px;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 750;
  color: #617565;
  margin: 0 0 18px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 4.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -1.4px;
  margin: 0 0 24px;
}
h2 {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  margin: 0;
}
h3 {
  margin: 0 0 8px;
}
.intro {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.03rem;
  margin-bottom: 28px;
}
.primary {
  background: var(--green);
  color: white;
  box-shadow: 0 3px 0 #163b2e;
  font-size: 1rem;
}
.primary:hover {
  background: #143c2d;
}
.secondary {
  border: 1px solid #bac9be;
  background: #fff;
  color: var(--green);
}
.text-button {
  background: none;
  color: var(--green);
  padding-left: 0;
}
.subtle {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
.shelf-art {
  position: relative;
  min-height: 350px;
  background: #ebeede;
  border-radius: 45% 45% 22px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 78px;
  gap: 8px;
}
.book {
  position: relative;
  box-shadow: 6px 4px 0 #0002;
  padding: 24px 12px;
  font-family: Georgia, serif;
  border-radius: 4px 10px 10px 4px;
}
.book-one {
  width: 142px;
  height: 196px;
  background: #a54329;
  color: #fff6db;
  transform: rotate(-12deg);
  font-size: 0.95rem;
  line-height: 1.4;
  z-index: 2;
}
.book-one small {
  font-style: italic;
  font-size: 0.8rem;
}
.book-two {
  height: 236px;
  width: 57px;
  writing-mode: vertical-rl;
  background: #254b3e;
  color: #fff0cb;
  font-size: 0.8rem;
  letter-spacing: 1px;
  transform: rotate(5deg);
}
.book-three {
  height: 175px;
  width: 66px;
  writing-mode: vertical-rl;
  background: #dcba6d;
  color: #433a25;
  font-size: 0.95rem;
  transform: rotate(11deg);
}
.shelf {
  height: 12px;
  position: absolute;
  bottom: 72px;
  width: 84%;
  background: #c9b991;
  border-radius: 5px;
}
.spark {
  position: absolute;
  top: 10px;
  right: 38px;
  color: #9e522d;
  font-size: 3rem;
}
.art-note {
  position: absolute;
  bottom: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  color: #596650;
}
.steps-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 26px 0;
  border-block: 1px solid var(--line);
  gap: 28px;
}
.steps-overview > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.steps-overview b {
  background: #e9eee1;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.82rem;
}
.steps-overview span {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.6;
}
.steps-overview strong {
  display: block;
  color: #294a3b;
  font-size: 0.86rem;
}
.library {
  padding-top: 45px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.section-title .eyebrow {
  margin-bottom: 10px;
}
#count {
  font-size: 0.8rem;
  background: #e4eade;
  border-radius: 30px;
  padding: 5px 12px;
  vertical-align: middle;
  margin-left: 10px;
}
.filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.filter-row > label:first-child {
  flex: 1;
}
label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #344c40;
}
input,
select,
textarea {
  display: block;
  margin: 8px 0 14px;
  width: 100%;
  padding: 14px 16px;
  min-height: 52px;
  border: 1px solid #aebcb0;
  border-radius: 10px;
  background: white;
  color: #203e34;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.empty {
  border: 1px dashed #b8c6b9;
  border-radius: 16px;
  background: #f1f3eb;
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
  line-height: 1.6;
}
.empty strong {
  display: block;
  color: var(--green);
  font-size: 1.05rem;
}
.book-card {
  display: flex;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 16px;
  background: white;
  margin-bottom: 16px;
}
.book-card img {
  width: 70px;
  height: 95px;
  object-fit: contain;
  background: var(--cream);
}
.book-card .details {
  flex: 1;
}
.book-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.badge {
  display: inline-block;
  background: #edf0e6;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.73rem;
}
.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}
#wizard {
  max-width: 720px;
  margin: 0 auto;
}
#wizard > .eyebrow {
  margin-top: 26px;
}
#wizard h1 {
  font-size: 2.6rem;
}
#step-description {
  line-height: 1.7;
  color: var(--muted);
}
progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-bottom: 32px;
  accent-color: var(--green);
}
#step-content,
.help-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.help-card h2 {
  margin-top: 24px;
}
.help-card p {
  line-height: 1.8;
}
#message {
  color: #85401f;
  line-height: 1.6;
  min-height: 1.6em;
}
.photo-preview {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 18px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.6;
  margin: 14px 0;
}
.check input {
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.review {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}
.review dt {
  color: var(--muted);
}
.review dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  padding: 16px;
  background: white;
  z-index: 9;
}
.skip:focus {
  top: 5px;
}
footer {
  max-width: 1208px;
  margin: auto;
  padding: 28px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.72rem;
}
.small {
  font-size: 1.15rem;
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.large-text {
  font-size: 22px;
}
.sync-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  overflow-wrap: anywhere;
}
.sync-panel button { margin: 4px 8px 4px 0; }
.sync-conflict { flex-basis: 100%; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  header {
    flex-wrap: wrap;
    padding: 20px;
  }
  nav {
    flex-wrap: wrap;
  }
  nav button {
    padding: 10px;
    font-size: 0.8rem;
  }
  main {
    padding: 22px 20px 44px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .shelf-art {
    min-height: 290px;
    max-width: 440px;
    width: 100%;
    margin: auto;
  }
  .steps-overview {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .filter-row {
    flex-direction: column;
    gap: 0;
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .book-card {
    flex-wrap: wrap;
  }
  footer {
    flex-wrap: wrap;
    padding: 24px 20px;
  }
  #wizard h1 {
    font-size: 2.1rem;
  }
  .wizard-actions {
    flex-wrap: wrap;
  }
  .wizard-actions button {
    flex: 1;
  }
  #step-content {
    padding: 20px;
  }
  .review {
    grid-template-columns: 1fr;
  }
  .review dt {
    margin-top: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
