:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --ink: #233f36;
  --muted: #637267;
  --green: #2b6253;
  --line: #dedfd3;
  --rust: #a65135;
  --book-page: oklch(99.4% 0.008 91);
  --cloth-wash: color-mix(in oklch, var(--green) 7%, var(--book-page));
  --cloth-edge: color-mix(in oklch, var(--green) 27%, var(--paper));
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--rust); outline-offset: 6px; }
a:hover { color: var(--rust); }
p, h1, h2, h3, figure { margin: 0; }
.page-shell { max-width: 1440px; margin: auto; padding: 0 6.25%; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: white; z-index: 5; }
.skip-link:focus { top: 16px; }
.site-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 32px Georgia, serif; letter-spacing: -1.5px; }
.brand-icon { flex-shrink: 0; object-fit: contain; }
.site-header nav { display: flex; align-items: center; gap: 36px; font-size: 13px; }
.site-header nav a { padding: 12px 0; }
.site-header nav span { margin-left: 8px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 92px 0 100px; }
.eyebrow { font-size: 10px; line-height: 1.6; font-weight: 650; letter-spacing: 1.9px; }
.hero-copy > .eyebrow { display: flex; align-items: center; gap: 12px; }
.little-line { width: 25px; height: 1px; background: var(--green); }
h1 { margin-top: 27px; font: 400 clamp(46px, 5.3vw, 76px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -3.7px; }
h1 em { color: var(--green); font-weight: 400; }
.intro { margin-top: 26px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 42px; margin-top: 32px; padding: 17px 23px; background: var(--green); color: #fffdf5; font-size: 13px; border-radius: 5px; transition: background .15s ease; }
.button:hover { color: #fffdf5; background: #214c40; }
.button span { font-size: 20px; line-height: 1; }
.coming-soon { display: flex; gap: 8px; align-items: center; margin-top: 19px; font-size: 11px; color: var(--muted); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #628769; }
.hero-art { position: relative; padding: 38px 0 24px; isolation: isolate; }
.art-sun { position: absolute; width: 89%; aspect-ratio: 1; border-radius: 50%; background: #ececdf; top: -11px; left: 8%; z-index: -1; }
.spark { position: absolute; color: var(--rust); }
.spark-one { top: 7px; left: 10px; font-size: 39px; transform: rotate(13deg); }
.spark-two { right: -13px; top: 84px; font-size: 26px; color: #8d9c7d; }
.bookshelf { padding: 27px 27px 0; background: #fffdf7; border: 1px solid #e0e2d5; border-radius: 9px; box-shadow: 0 22px 44px -24px #34453340; transform: rotate(-2deg); }
.shelf-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.shelf-top .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
.shelf-top .brand-icon { width: 19px; height: 19px; }
.bookshelf h2 { font: 27px Georgia, serif; letter-spacing: -.5px; margin-top: 13px; }
.shelf-description { font-size: 10px; line-height: 1.7; color: var(--muted); margin-top: 9px; }
.book-row { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 15px; margin: 29px 0 0; padding: 0 3px; }
.book { position: relative; aspect-ratio: .66; overflow: hidden; border-radius: 2px 5px 4px 2px; box-shadow: -3px 5px 9px #283b3029; isolation: isolate; }
.book::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: #19392f15; border-right: 1px solid #ffffff30; }
.book-fox { color: #f6e6c6; background: #294453; transform: rotate(-5deg) translateY(-4px); }
.book-garden { color: #294c3b; background: #d6dfba; transform: translateY(-9px); }
.book-house { color: #603f30; background: #e7bd91; transform: rotate(5deg) translateY(-4px); }
.cover-frame { position: absolute; inset: 5px 5px 5px 8px; border: 1px solid #ffffff40; z-index: 1; }
.book h3 { position: relative; z-index: 1; padding: 16% 5% 0; text-align: center; font: 400 clamp(12px, 1.4vw, 20px)/1.08 Georgia, serif; }
.cover-art { position: absolute; width: 100%; height: 72%; bottom: 8%; z-index: -1; }
.book > p { position: absolute; bottom: 5%; width: 100%; padding: 0 7%; text-align: center; font-size: clamp(4px, .42vw, 6px); letter-spacing: .6px; text-transform: uppercase; }
.shelf-ledge { position: relative; height: 10px; background: #d5bea0; border-top: 3px solid #e5d1b6; box-shadow: 0 5px 6px #7d6b4520; margin: 0 -9px; border-radius: 1px; }
.bookshelf figcaption { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 58px; padding: 10px 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.heart { color: var(--rust); font-size: 20px; }
.art-note { text-align: right; padding: 18px 24px 0 0; font: italic 15px Georgia, serif; color: #64745c; transform: rotate(-4deg); }
.art-note span { display: inline-block; font-size: 32px; margin-right: 9px; transform: rotate(22deg); }
.idea { border-top: 1px solid var(--line); padding: 55px 0 62px; display: grid; grid-template-columns: .85fr 1.55fr; gap: 65px; }
.idea-heading h2 { margin-top: 17px; font: 400 35px/1.16 Georgia, serif; letter-spacing: -1px; }
.idea-heading h2 em { font-weight: 400; }
.idea-heading > p:last-child { max-width: 270px; font-size: 13px; line-height: 1.85; color: var(--muted); margin-top: 19px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 6px; }
.feature-number { font-size: 9px; font-weight: 600; letter-spacing: 1.3px; color: var(--rust); }
.feature h3 { font: 400 21px/1.25 Georgia, serif; letter-spacing: -.4px; margin-top: 30px; }
.feature p { color: var(--muted); font-size: 12px; line-height: 1.9; margin-top: 14px; }
.closing { display: flex; align-items: center; justify-content: center; gap: 55px; padding: 43px 24px; background: #eceee3; border-radius: 3px; }
.closing p { text-align: center; font: 26px/1.4 Georgia, serif; letter-spacing: -.5px; }
.closing p em { color: #66765e; }
.closing > span { color: #8a9c77; font-size: 27px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 35px 0; }
.site-footer .brand { font-size: 23px; gap: 7px; letter-spacing: -1px; }
.site-footer .brand-icon { width: 21px; height: 21px; }
.site-footer p { text-transform: uppercase; color: var(--muted); letter-spacing: 1.7px; font-size: 8px; }
.footer-status { font: italic 12px Georgia, serif; color: var(--muted); }
@media (min-width: 1440px) { .page-shell { padding-inline: 90px; } }
@media (max-width: 1050px) {
  .page-shell { padding-inline: 5%; }
  .hero { gap: 30px; padding-block: 70px; }
  h1 { letter-spacing: -2.5px; }
  .bookshelf { padding: 22px 20px 0; }
  .bookshelf h2 { font-size: 23px; }
  .book-row { gap: 10px; }
  .idea { grid-template-columns: 1fr; gap: 32px; }
  .idea-heading > p:last-child { max-width: 420px; }
  .feature h3 { margin-top: 18px; }
}
@media (max-width: 700px) {
  .page-shell { padding-inline: 24px; }
  .site-header { min-height: 87px; flex-wrap: wrap; column-gap: 24px; row-gap: 8px; padding-block: 18px; }
  .brand { font-size: 28px; }
  .site-header nav { gap: 20px; font-size: 11px; }
  .site-header nav a { white-space: nowrap; }
  .hero { grid-template-columns: 1fr; gap: 37px; padding: 49px 0 45px; }
  .hero-copy > .eyebrow { font-size: 8px; letter-spacing: 1.5px; gap: 9px; }
  h1 { font-size: clamp(43px, 8.6vw, 60px); letter-spacing: -2.5px; margin-top: 23px; }
  .intro { font-size: 14px; margin-top: 21px; }
  .button { margin-top: 25px; }
  .hero-art { width: 100%; max-width: 480px; margin: 0 auto; padding: 27px 7px 12px; }
  .art-sun { top: -2px; width: 81%; left: 13%; }
  .spark-one { font-size: 30px; top: 0; left: 6px; }
  .spark-two { right: -3px; top: 58px; }
  .bookshelf { padding: 24px 24px 0; }
  .bookshelf h2 { font-size: 26px; }
  .shelf-description { font-size: 10px; }
  .book-row { gap: 15px; margin-top: 27px; }
  .book h3 { font-size: clamp(14px, 3.3vw, 20px); }
  .book > p { font-size: clamp(4px, .9vw, 6px); }
  .bookshelf figcaption { font-size: 8px; min-height: 54px; }
  .art-note { font-size: 14px; padding-right: 7px; }
  .idea { padding: 38px 0; gap: 29px; }
  .idea-heading h2 { font-size: 34px; }
  .features { grid-template-columns: 1fr; gap: 27px; }
  .feature { border-top: 1px solid var(--line); padding-top: 21px; }
  .feature h3 { margin-top: 12px; font-size: 23px; }
  .feature p { font-size: 13px; margin-top: 9px; max-width: 400px; }
  .closing { padding: 30px 12px; gap: 20px; }
  .closing p { font-size: 22px; }
  .closing > span { font-size: 19px; }
  .site-footer { flex-wrap: wrap; padding-block: 28px; row-gap: 16px; }
  .site-footer p { letter-spacing: 1px; }
  .footer-status { width: 100%; }
}
@media (max-width: 370px) {
  .page-shell { padding-inline: 18px; }
  .site-header nav { gap: 12px; font-size: 10px; }
  .site-header nav span { margin-left: 2px; }
  .brand { font-size: 25px; gap: 5px; }
  .site-header .brand-icon { width: 24px; height: 24px; }
  .bookshelf { padding: 19px 17px 0; }
  .bookshelf h2 { font-size: 23px; }
  .book-row { gap: 10px; }
  .closing { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

.account-main { display: grid; place-items: start center; padding: 80px 0; }
.account-card { width: 100%; max-width: 460px; padding: 40px; background: #fffdf7; border: 1px solid var(--line); border-radius: 9px; }
.account-card h1 { margin-top: 20px; font-size: 48px; letter-spacing: -2px; overflow-wrap: anywhere; }
.account-intro { margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-form { display: flex; flex-direction: column; margin-top: 32px; }
.login-form label { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.login-form input { width: 100%; min-height: 48px; padding: 12px 14px; margin-bottom: 22px; border: 1px solid #bac4b7; border-radius: 5px; background: var(--paper); color: var(--ink); font: inherit; }
.login-form input:focus-visible, button:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
button.button { font-family: inherit; border: 0; cursor: pointer; }
.login-form .button { margin-top: 4px; }
.form-error { margin-top: 24px; padding: 12px 14px; background: #f8eee7; color: #873d29; border-radius: 5px; font-size: 13px; line-height: 1.6; }
@media (max-width: 700px) {
  .account-main { padding-block: 40px; }
  .account-card { padding: 30px 24px; }
  .account-card h1 { font-size: 42px; }
}

.scan-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--green); font-size: 13px; font-weight: 650; }

.page-shell:has(.scan-page) { max-width: 1048px; padding-inline: clamp(16px, 4vw, 44px); }
.page-shell:has(.scan-page) .site-header { min-height: 72px; padding-block: 8px; }
.account-main:has(.scan-page) { padding-top: 26px; }
.scan-page { width: 100%; max-width: 960px; }
.scan-intro { margin: 6px 0 25px; }
.scan-intro h1 { margin: 0; font-size: clamp(44px, 6vw, 68px); }
.scan-intro .account-intro { margin-top: 10px; }
.scan-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.scan-station { min-width: 0; }
.scan-shelf { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf7; }
.scan-camera {
  position: relative;
  display: grid;
  place-items: center;
  container-type: size;
  height: clamp(260px, 31vw, 330px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  background: radial-gradient(ellipse at 45% 42%, #42665a, #203b32 85%);
}
.scan-camera video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@supports (width: 1cqh) {
  .scan-camera video {
    width: max(100cqw, calc(100cqh * var(--track-ratio, 1.7778)));
    height: max(100cqh, calc(100cqw / var(--track-ratio, 1.7778)));
  }
}
.scan-reticle { position: absolute; width: min(76%, 320px); height: 38%; pointer-events: none; filter: drop-shadow(0 1px 2px #152e29b0); }
.scan-camera:not([data-state="live"]) .scan-reticle { opacity: .4; }
.scan-reticle i { position: absolute; width: 21px; height: 21px; border: 2px solid #efffdb; }
.scan-reticle i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; border-top-left-radius: 7px; }
.scan-reticle i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; border-top-right-radius: 7px; }
.scan-reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-bottom-left-radius: 7px; }
.scan-reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-bottom-right-radius: 7px; }
.scan-camera-badge, .scan-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 99px; line-height: 1.3;
}
.scan-camera-badge { position: absolute; top: 12px; left: 12px; padding: 7px 11px; color: white; background: #142f29e8; font-size: 12px; font-weight: 600; }
.scan-camera-badge:empty { display: none; }
.scan-camera[data-state="live"] .scan-camera-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ade39c; }
.scan-trigger { position: relative; min-height: 44px; padding: 0 18px; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 650; background: var(--paper); color: var(--ink); }
.scan-camera[data-state="live"] .scan-trigger { position: absolute; top: 6px; right: 8px; min-height: 44px; padding-inline: 14px; color: white; background: #142f29e8; }
.scan-camera[data-state="live"] .scan-trigger svg { display: none; }
.scan-camera[data-state="live"] .scan-trigger::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.scan-trigger:focus-visible { outline-color: white; outline-offset: 2px; }
.scan-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scan-secondary, .scan-text-action {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #c8d6c8;
  border-radius: 7px;
  background: #fffdf7;
  color: var(--green);
  cursor: pointer;
  line-height: 1.4;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
}
.scan-text-action { border: 0; padding-inline: 4px; background: transparent; }
.scan-secondary:hover, .scan-text-action:hover { background: #e9efe3; }
.scan-secondary:disabled { opacity: .6; cursor: default; }
.scan-entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.scan-entry-actions button { display: flex; justify-content: center; align-items: center; gap: 7px; }
.scan-entry-actions svg { width: 17px; height: 17px; }
.scan-entry-actions span { font-size: 18px; line-height: 1; }
#scan-status:not(:empty) { display: flex; gap: 9px; align-items: baseline; margin-top: 8px; padding: 9px 12px; border-radius: 8px; background: #eaf0e7; overflow-wrap: anywhere; }
#scan-status:empty { padding: 0; }
#scan-status.is-saved { color: #255843; font-weight: 650; }
#scan-status.is-saved::before { content: "✓"; }
#isbn-form { margin-top: 14px; }
.scan-feedback { margin-top: 8px; border-radius: 8px; background: #f3f3ea; }
.scan-status { padding: 10px 12px; color: #405d50; font-size: 13px; line-height: 1.45; }
.scan-shelf { padding: 20px; }
.scan-batch { padding: 18px 0; border-block: 1px solid var(--line); }
.scan-batch .scan-totals { margin: 0; }
.scan-batch h2, .scan-shelf h2 { font: 400 26px/1.2 Georgia, serif; letter-spacing: -.35px; }
.scan-totals { margin-top: 9px; line-height: 1.6; font-size: 13px; color: var(--green); font-weight: 650; }
.scan-note { margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.scan-note:empty { margin: 0; }
.scan-family-layout { margin-top: 16px; }
.scan-books { list-style: none; margin: 0; padding: 0; }
.scan-book-row { display: flex; align-items: center; gap: 12px; padding-block: 12px; }
.scan-book-row + .scan-book-row { border-top: 1px solid var(--line); }
.scan-book-details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.scan-book-details h3 { font: 400 19px/1.2 Georgia, serif; }
.scan-author { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.scan-confirm.button { min-height: 44px; margin: 0; padding: 10px 16px; font-weight: 650; }
.scan-owner-actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
#scan-title-dialog { box-sizing: border-box; width: min(92vw, 390px); max-height: 85dvh; margin: auto; padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: #fffdf7; color: var(--ink); }
#scan-title-dialog::backdrop { background: #18342b80; }
#scan-title-dialog h2 { font: 400 26px/1.2 Georgia, serif; }
#scan-title-dialog label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 650; }
#scan-title-input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #bac4b7; border-radius: 5px; color: var(--ink); background: var(--paper); font: inherit; font-size: 16px; }
#scan-title-input:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }
#scan-title-save { max-width: 100%; margin-block: 8px; white-space: normal; overflow-wrap: anywhere; }
#scan-title-save[hidden] { display: none; }
#scan-title-results button { flex-shrink: 0; padding-inline: 12px; border-radius: 7px; background: var(--green); color: #fffdf5; }
@media (max-width: 700px) {
  .page-shell:has(.scan-page) .site-header { min-height: 52px; padding-block: 4px; }
  .page-shell:has(.scan-page) .brand { font-size: 25px; }
  .page-shell:has(.scan-page) .brand-icon { width: 24px; height: 24px; }
  .account-main:has(.scan-page) { padding-top: 14px; }
  .scan-page { max-width: 500px; }
  .scan-intro { margin: 4px 0 14px; }
  .scan-intro h1 { font-size: clamp(30px, 9vw, 42px); letter-spacing: -1.6px; }
  .scan-intro .scan-topline { gap: 8px; }
  .scan-intro .account-intro { margin-top: 5px; font-size: 13px; line-height: 1.5; }
  .scan-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .scan-batch { padding: 14px 0; }
  .scan-shelf { padding: 16px; }
  .scan-camera { height: clamp(205px, 35svh, 310px); }

}

.scan-page a.scan-secondary { display: inline-flex; align-items: center; gap: 6px; }
.scan-page [hidden] { display: none !important; }
.scan-input-row { display: flex; align-items: center; gap: 8px; }
.scan-input-row input { flex: 1; min-width: 0; }
#isbn-form label { display: block; margin-bottom: 6px; }
#isbn-input, #share-url { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; font: inherit; font-size: 16px; }
#share-url { box-sizing: border-box; }
.scan-cover-image { width: 38px; height: 54px; object-fit: contain; }
#recovery { padding: 8px; margin-bottom: 12px; background: #f7ede2; }
#shelf-status { margin-bottom: 12px; }
