:root {
  color-scheme: light;
  --bg: #eee4e4;
  --card: #fcf5ee;
  --ink: #402d38;
  --muted: #77616f;
  --line: #dac8cd;
  --accent: #775065;
  --accent-ink: #fcf5ee;
  --rose: #aa818b;
  --error: #8b343e;
  --serif: 'Lora',Georgia,serif;
  --sans: 'DM Sans',system-ui,sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none!important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
main {
  width: 100%;
  max-width: 440px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 max(22px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));
}
p,h1,h2 {
  margin: 0;
}
button,input {
  font: inherit;
}
button,a,input,summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button,summary {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: .65;
}
a {
  color: inherit;
}
button {
  color: inherit;
}
button,a,input,summary {
  outline-offset: 4px;
}
:focus-visible {
  outline: 3px solid var(--accent);
}
img {
  max-width: 100%;
  display: block;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  padding-top: env(safe-area-inset-top);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 600 26px/1 var(--serif);
  letter-spacing: -.9px;
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
}
.local-heart {
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-right: 4px;
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.intro {
  padding: 0 0 23px;
}
.reading-nook {
  width: 210px;
  height: 182px;
  object-fit: cover;
  object-position: 50% 60%;
  margin: -7px auto 9px;
}
.eyebrow,.label {
  font-size: 9px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: 1.4px;
  color: var(--accent);
}
h1 {
  font: 500 clamp(33px,9.3vw,41px)/1.16 var(--serif);
  letter-spacing: -1.6px;
  margin: 13px 0 15px;
}
h1 em {
  color: var(--accent);
  font-weight: 400;
}
h2 {
  font: 500 26px/1.25 var(--serif);
  letter-spacing: -.6px;
}
h1:focus,h2:focus {
  outline: none;
}
.intro-copy {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.primary,.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 13px 17px;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.5;
}
.primary {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover {
  background: #654154;
}
.primary svg {
  width: 23px;
  height: 23px;
}
.scan-button {
  gap: 13px;
  justify-content: flex-start;
  min-height: 57px;
  padding: 14px 20px;
}
.arrow {
  margin-left: auto;
  font-size: 23px;
  line-height: 1;
}
.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.secondary:hover {
  background: #e5d7dc;
}
.link {
  border: 0;
  background: none;
  min-height: 44px;
  padding: 10px 0 10px 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 12px;
}
.muted {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.center {
  text-align: center;
}
.error {
  font-size: 14px;
  color: var(--error);
  padding: 12px 14px;
  background: var(--card);
  border-radius: 10px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  padding: 18px;
}
.manual-entry {
  margin-top: -5px;
}
.manual-entry>summary {
  min-height: 44px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
}
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.manual-entry summary span {
  margin-left: 5px;
}
.manual {
  padding: 8px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manual label {
  font-size: 13px;
  color: var(--muted);
}
input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #c1a6b2;
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 16px;
}
.row {
  display: flex;
  gap: 8px;
}
.row .secondary {
  width: auto;
  min-height: 48px;
  padding: 10px 18px;
}
.store-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 19px;
  padding: 18px 0 19px;
}
.store-chosen>svg {
  width: 22px;
  height: 26px;
  color: var(--accent);
}
.store-chosen>div {
  min-width: 0;
  flex: 1;
}
.label {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
.store-name {
  font-size: 14px;
  font-weight: 650;
}
.store-place {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.how-it-works,.reader {
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.how-it-works summary,.reader summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 11px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.how-it-works summary span,.reader summary span {
  font-size: 19px;
  font-weight: 400;
}
details[open]>summary>span {
  transform: rotate(45deg);
}
.manual-entry[open]>summary>span {
  transform: none;
}
.how-it-works ol {
  padding-left: 22px;
  margin: 2px 0 19px;
}
.how-it-works li {
  padding-left: 6px;
  margin-bottom: 10px;
}
.how-it-works li::marker {
  font-family: var(--serif);
  color: var(--accent);
}
.how-it-works strong {
  color: var(--ink);
}
.reader-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 17px;
  padding-bottom: 12px;
}
.reader-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--accent);
  text-underline-offset: 3px;
}
.viewfinder {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #251e24;
  aspect-ratio: 3/4;
}
.viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide {
  position: absolute;
  inset: 35% 8%;
  border: 2px solid var(--card);
  border-radius: 10px;
  box-shadow: 0 0 0 100vmax #402d3844;
}
#camera h2 {
  margin-top: 9px;
}
#camera {
  padding-top: 15px;
}
.result {
  padding: 20px 0 0;
}
.result h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 9px 0 8px;
}
.book {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}
.book img {
  width: 88px;
  max-height: 150px;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 3px 5px 10px #402d3812;
}
.book-info {
  min-width: 0;
  flex: 1;
}
.book-title {
  font: 500 24px/1.2 var(--serif);
  letter-spacing: -.5px;
  overflow-wrap: anywhere;
}
.book #book-author {
  margin-top: 10px;
}
.isbn {
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.credit {
  background: #e5d7dc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 17px;
  font-size: 13px;
  color: var(--accent);
}
footer {
  text-align: center;
  padding: 23px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
}
dialog {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 440px;
  max-height: 85dvh;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 21px 22px calc(20px + env(safe-area-inset-bottom));
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 -10px 80px #402d3822;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #402d3866;
  backdrop-filter: blur(3px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.close-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  min-width: 44px;
  min-height: 44px;
  font-size: 25px;
  line-height: 1;
}
dialog>h2 {
  margin-bottom: 10px;
}
dialog>.secondary {
  margin: 20px 0 8px;
}
dialog>input {
  margin: 12px 0;
}
.store-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.store-list li+li {
  border-top: 1px solid var(--line);
}
.store-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 13px 3px;
}
.store-list button:hover {
  background: var(--bg);
}
.store-list .name {
  font-size: 14px;
  font-weight: 650;
  display: block;
}
.store-list .muted {
  font-size: 11px;
  display: block;
}
.store-list .dist {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.store-list>li.muted {
  padding: 20px 0;
}
@media(max-width:350px) {
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .brand {
    font-size: 24px;
  }
  .intro-copy {
    font-size: 14px;
  }
  .reading-nook {
    width: 190px;
    height: 165px;
  }
  .result h1 {
    font-size: 26px;
  }
  .book {
    gap: 12px;
    padding: 14px;
  }
  .book-title {
    font-size: 22px;
  }
  .book img {
    width: 73px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto!important;
  }
}
