@font-face { font-family: "Battambang"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/Battambang-Regular.ttf") format("truetype"); }
@font-face { font-family: "Battambang"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/Battambang-Bold.ttf") format("truetype"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/fonts/NunitoSans-Variable.ttf") format("truetype"); }
@font-face { font-family: "Nunito Sans"; font-style: italic; font-weight: 200 1000; font-display: swap; src: url("/fonts/NunitoSans-Italic-Variable.ttf") format("truetype"); }
:root {
  color-scheme: light;
  --white: #fff;
  --md-sys-color-primary: #006972;
  --md-sys-color-on-primary: var(--white);
  --md-sys-color-primary-container: #9df0fb;
  --md-sys-color-on-primary-container: #004f56;
  --md-sys-color-secondary-container: #cde7eb;
  --md-sys-color-on-secondary-container: #324b4e;
  --md-sys-color-surface: #f5fafb;
  --md-sys-color-surface-container-lowest: var(--white);
  --md-sys-color-surface-container-low: #eff5f5;
  --md-sys-color-surface-container: #e9eff0;
  --md-sys-color-surface-container-high: #e3e9ea;
  --md-sys-color-surface-container-highest: #dee4e4;
  --md-sys-color-on-surface: #171d1e;
  --md-sys-color-on-surface-variant: #3f484a;
  --md-sys-color-outline: #6f797a;
  --md-sys-color-outline-variant: #bec8ca;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #93000a;
  --md-sys-color-scrim: #000000;
  --color-success: #276343;
  --color-success-container: #c5eed0;
  --color-on-success-container: #102f1d;
  --color-warning-container: #ffe3a3;
  --color-on-warning-container: #241a00;
  --state-primary-hover: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
  --state-primary-pressed: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
  --state-on-primary-hover: color-mix(in srgb, var(--md-sys-color-on-primary) 8%, transparent);
  --state-on-primary-pressed: color-mix(in srgb, var(--md-sys-color-on-primary) 12%, transparent);
  --state-disabled-container: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
  --state-disabled-content: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;
  --md-sys-elevation-level1: 0 1px 2px #00000026, 0 1px 3px 1px #0000001a;
  --md-sys-elevation-level3: 0 4px 8px 3px #00000026, 0 1px 3px #0000004d;
  --md-sys-motion-duration-short: 150ms;
  --md-sys-motion-easing-standard: cubic-bezier(.2, 0, 0, 1);
  --font: "Nunito Sans", sans-serif;
  --heading-font: "Battambang", serif;
  --type-display: clamp(2rem, 4.5vw, 3rem);
  --type-headline: clamp(1.35rem, 2.5vw, 1.7rem);
  --type-title: 1.15rem;
  --type-body: 1rem;
  --type-label: 1rem;
  font-family: var(--font);
  font-size: 14pt;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); }
h2 { font-size: var(--type-headline); line-height: 1.4; font-weight: 400; margin: 0; }
h3 { font-size: var(--type-title); line-height: 1.5; font-weight: 700; margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
a { color: var(--md-sys-color-primary); text-underline-offset: .15em; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .review-message:focus-visible, .form-error:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
#app { display: flex; min-height: 100vh; }
main.wishlist-main { width: 100%; min-width: 0; margin: 0; }
.page { max-width: 1180px; padding: 24px 24px 0; margin: auto; }
.wizard-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 192px; padding: 32px; color: var(--md-sys-color-on-primary-container); }
.wizard-hero h1 { font-size: var(--type-display); font-weight: 700; line-height: 1.25; margin: 0; }
.wizard-hero p { font-size: 14px; font-style: italic; font-weight: 300; line-height: 1.5; margin: 0; }
.hero-help { flex-shrink: 0; white-space: nowrap; }
.eyebrow { font-size: var(--type-label); letter-spacing: .06em; font-weight: 700; color: var(--md-sys-color-primary); }
.primary, .secondary, .text-button, .close-button {
  --state-hover: var(--state-primary-hover);
  --state-pressed: var(--state-primary-pressed);
  --state-layer: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 48px; min-height: 48px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--md-sys-shape-corner-full);
  background-color: transparent; background-image: linear-gradient(var(--state-layer), var(--state-layer));
  color: var(--md-sys-color-primary); font-size: var(--type-label); line-height: 1.25; font-weight: 700; text-decoration: none;
}
.primary { --state-hover: var(--state-on-primary-hover); --state-pressed: var(--state-on-primary-pressed); background-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.secondary { border-color: var(--md-sys-color-outline); }
.hero-help { color: var(--md-sys-color-on-primary-container); }
.text-button { padding-inline: 12px; }
@media (hover: hover) {
  .primary:hover:enabled, .secondary:hover:enabled, .text-button:hover:enabled, .close-button:hover:enabled { --state-layer: var(--state-hover); }
  .primary:hover:enabled { box-shadow: var(--md-sys-elevation-level1); }
}
.primary:focus-visible, .secondary:focus-visible, .text-button:focus-visible, .close-button:focus-visible,
.primary:active:enabled, .secondary:active:enabled, .text-button:active:enabled, .close-button:active:enabled { --state-layer: var(--state-pressed); }
.primary:active:enabled { box-shadow: none; }
.primary:disabled, .secondary:disabled, .text-button:disabled, .close-button:disabled { color: var(--state-disabled-content); background-image: none; box-shadow: none; }
.primary:disabled { background-color: var(--state-disabled-container); }
.secondary:disabled { border-color: var(--state-disabled-container); }
input, select, textarea { border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-extra-small); padding: 14px 16px; min-height: 56px; width: 100%; min-width: 0; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); font-size: var(--type-body); line-height: 1.5; accent-color: var(--md-sys-color-primary); }
input::placeholder, textarea::placeholder { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
input:hover:enabled, select:hover:enabled, textarea:hover:enabled { border-color: var(--md-sys-color-on-surface); }
input:focus, select:focus, textarea:focus { border-color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--md-sys-color-error); }
input:disabled, select:disabled, textarea:disabled { border-color: var(--state-disabled-container); color: var(--md-sys-color-on-surface-variant); background-color: var(--md-sys-color-surface-container); }
textarea { resize: vertical; }
select { padding-right: 32px; }
label { display: block; font-size: var(--type-label); font-weight: 600; color: var(--md-sys-color-on-surface-variant); line-height: 1.5; }
label input, label select, label textarea { display: block; margin-top: 8px; }
.help, .optional { font-size: var(--type-body); color: var(--md-sys-color-on-surface-variant); font-weight: 400; }
.help { line-height: 1.7; }
.optional { margin-left: 4px; }
.button-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
footer { display: flex; color: var(--md-sys-color-on-surface-variant); font-size: var(--type-body); padding: 24px 0 32px; line-height: 1.7; }
.wizard-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 8px; margin: 24px 0 0; border-radius: var(--md-sys-shape-corner-extra-large); background: var(--md-sys-color-surface-container-low); }
.wizard-progress li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 16px; border-radius: var(--md-sys-shape-corner-full); color: var(--md-sys-color-on-surface-variant); font-size: var(--type-label); }
.wizard-step-number { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); }
.wizard-progress [aria-current] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font-weight: 700; }
.wizard-progress [aria-current] .wizard-step-number { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); }
.wizard-progress .completed { color: var(--color-success); }
.completed .wizard-step-number { color: var(--color-on-success-container); background: var(--md-sys-color-secondary-container); border-color: var(--color-success); }
.mobile-step-label { display: none; }
.wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 24px; align-items: start; }
.wizard-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; padding: 32px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-extra-large); background: var(--md-sys-color-surface-container-lowest); overflow-wrap: anywhere; }
.wizard-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.wizard-heading h2 { margin-top: 8px; color: var(--md-sys-color-on-surface); }
.wizard-heading .text-button { white-space: nowrap; }
.wizard-card .help { margin: 0; }
.wishlist-section { display: grid; gap: 16px; min-width: 0; }
.wishlist-section .book-section-heading { margin: 0; }
.import-form { display: flex; align-items: end; gap: 16px; }
.import-form label { flex: 1; min-width: 0; }
.import-form button { min-height: 56px; white-space: nowrap; background-color: var(--md-sys-color-secondary-container); border-color: transparent; color: var(--md-sys-color-on-secondary-container); }
.import-form button:disabled { color: var(--md-sys-color-on-secondary-container); }
.import-form button:disabled::before { content: ""; flex-shrink: 0; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: var(--md-sys-shape-corner-full); }
.import-result { padding: 16px; background: var(--md-sys-color-surface-container-low); border-radius: var(--md-sys-shape-corner-medium); font-size: var(--type-body); color: var(--md-sys-color-on-surface-variant); line-height: 1.7; }
.import-result p { margin: 0; }
.import-result ul { padding-left: 24px; overflow-wrap: anywhere; }
.import-result .verification-note { color: var(--color-on-warning-container); background: var(--color-warning-container); border-radius: var(--md-sys-shape-corner-small); font-size: var(--type-body); line-height: 1.7; padding: 12px; margin-top: 12px; }
details { border-top: 1px solid var(--md-sys-color-outline-variant); padding-top: 8px; margin-top: 12px; }
summary { min-height: 48px; padding-block: 10px; font-size: var(--type-label); color: var(--md-sys-color-on-surface-variant); cursor: pointer; }
.book-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.book-section-heading h3, .review-message-heading { font-size: var(--type-title); color: var(--md-sys-color-on-surface); }
.book-section-heading .secondary { margin-top: 12px; }
.book-table-wrap { position: relative; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-large); overflow-x: auto; }
.book-table { width: 100%; min-width: 32rem; border-collapse: collapse; table-layout: fixed; }
.book-table th, .book-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--md-sys-color-outline-variant); vertical-align: middle; }
.book-table th { font-size: var(--type-label); font-weight: 700; color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-low); }
.book-table th:first-child { width: 64px; }
.book-table th:nth-child(3) { width: 192px; }
.book-table th:last-child { width: 112px; }
.book-table tr:last-child td { border-bottom: 0; }
.book-table .is-selected { background: var(--md-sys-color-surface-container-low); }
.book-selection-target { display: grid; place-items: center; min-width: 48px; min-height: 48px; border-radius: var(--md-sys-shape-corner-full); }
.book-table input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 0; box-shadow: none; }
.book-field-label { display: none; }
.book-title { font-size: var(--type-body); line-height: 1.6; overflow-wrap: anywhere; }
.book-title a { display: inline-flex; align-items: center; min-width: 48px; min-height: 48px; }
.book-title > span { font-weight: 700; }
.book-title small, .book-note { display: block; color: var(--md-sys-color-on-surface-variant); font-size: var(--type-body); }
.book-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.book-row-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.book-row-actions .text-button { padding-inline: 8px; }
.book-table select, .book-table input[type="number"] { padding-inline: 12px; }
.details-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.full-width { grid-column: 1 / -1; }
.wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--md-sys-color-outline-variant); }
#details-form .wizard-actions, #manual-book-form .wizard-actions { margin-top: 24px; }
.form-error { color: var(--md-sys-color-on-error-container); background: var(--md-sys-color-error-container); border-left: 4px solid var(--md-sys-color-error); border-radius: var(--md-sys-shape-corner-small); padding: 16px; margin: 0; font-size: var(--type-body); line-height: 1.7; }
#book-form-error { margin-top: 16px; }
.email-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 12px 24px; font-size: var(--type-body); color: var(--md-sys-color-on-surface); line-height: 1.7; margin: 0; }
.email-meta dt { font-family: var(--heading-font); font-size: var(--type-title); font-weight: 700; color: var(--md-sys-color-on-surface); white-space: nowrap; }
.email-meta dd { margin: 0; overflow-wrap: anywhere; }
.review-message { font-size: var(--type-body); line-height: 1.8; background: var(--md-sys-color-surface-container-low); border-radius: var(--md-sys-shape-corner-large); padding: 24px; max-height: 32rem; overflow: auto; overflow-wrap: anywhere; }
.copy-message-actions { display: grid; gap: 12px; }
#notice { display: none; }
#notice.visible { display: block; position: fixed; bottom: 24px; left: 24px; right: 24px; z-index: 20; background: var(--color-success-container); color: var(--color-on-success-container); border-radius: var(--md-sys-shape-corner-medium); padding: 16px; min-height: 48px; font-size: var(--type-body); line-height: 1.5; cursor: pointer; }
#notice.error { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.copy-message-actions #notice.visible { position: static; flex: 1 1 16rem; min-width: 0; z-index: auto; }
dialog { padding: 24px; border: 0; border-radius: var(--md-sys-shape-corner-extra-large); width: min(660px, calc(100% - 32px)); max-height: 90vh; max-height: calc(100dvh - 32px); overscroll-behavior: contain; scroll-padding-block: 96px 24px; color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container-high); box-shadow: var(--md-sys-elevation-level3); }
html:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: color-mix(in srgb, var(--md-sys-color-scrim) 38%, transparent); }
.dialog-heading { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 16px; align-items: start; padding-bottom: 16px; background: var(--md-sys-color-surface-container-high); }
.dialog-heading h2 { font-size: var(--type-headline); line-height: 1.4; margin: 4px 0 0; }
.close-button { width: 48px; height: 48px; padding: 0; flex-shrink: 0; font-size: 1.5rem; font-weight: 400; color: var(--md-sys-color-on-surface-variant); }
dialog input, dialog select, dialog textarea { scroll-margin-block: 96px 24px; }
.how-steps { list-style: none; padding: 0; margin: 0; }
.how-step { display: flex; align-items: baseline; gap: 16px; margin: 24px 0; }
.how-step > span { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--md-sys-shape-corner-full); color: var(--md-sys-color-on-primary-container); background: var(--md-sys-color-primary-container); font-weight: 700; }
.how-step > div { min-width: 0; }
.how-step h3 { margin-bottom: 8px; }
.how-step p { color: var(--md-sys-color-on-surface-variant); font-size: var(--type-body); line-height: 1.7; margin: 0; }
#how-dialog { overflow-wrap: anywhere; }
.how-dialog-footer { border-top: 1px solid var(--md-sys-color-outline-variant); padding: 16px 0 0; }
.loading { margin: 80px auto; padding: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: no-preference) {
  button, a, input, select, textarea { transition: background-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard), border-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard), box-shadow var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard); }
  .import-form button:disabled::before { animation: loading-spin 1s linear infinite; }
  @keyframes loading-spin { to { transform: rotate(360deg); } }
}
@media (max-width: 700px) {
  .page { padding: 12px 12px 0; }
  .wizard-hero { min-height: 0; flex-direction: column; align-items: start; padding: 24px; gap: 16px; }
  .wizard-progress { gap: 8px; margin-top: 16px; padding: 4px; }
  .wizard-progress li { justify-content: center; padding: 8px; }
  .wizard-step-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .mobile-step-label { display: block; color: var(--md-sys-color-primary); font-weight: 700; margin: 8px 0 0; }
  .wizard-layout { margin-top: 16px; }
  .wizard-card { padding: 16px; border-radius: var(--md-sys-shape-corner-large); }
  .wizard-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .wizard-heading > div { display: contents; }
  .wizard-heading .eyebrow { grid-column: 1; grid-row: 1; letter-spacing: 0; }
  .wizard-heading .text-button { grid-column: 2; grid-row: 1; padding-inline: 8px; }
  .wizard-heading h2 { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .import-form { align-items: stretch; flex-direction: column; }
  .import-form button { align-self: stretch; }
  .book-section-heading { align-items: start; }
  .details-fields { grid-template-columns: minmax(0, 1fr); }
  .wizard-actions { align-items: stretch; flex-direction: column; }
  .wizard-actions > .help { text-align: center; }
  .wizard-actions .primary { order: -1; }
  .book-table-wrap { border: 0; overflow: visible; }
  .book-table { display: block; min-width: 0; }
  .book-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .book-table tbody { display: grid; gap: 16px; }
  .book-table tbody tr { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); }
  .book-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .book-table .book-selection { grid-column: 1; }
  .book-table .book-title { grid-column: 2; }
  .book-table .book-format, .book-table .book-copies { grid-column: 1 / -1; }
  .book-field-label { display: block; margin-bottom: 8px; }
  .email-meta { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .email-meta dd { margin-bottom: 8px; }
  .review-message { padding: 16px; max-height: none; overflow: visible; }
  .copy-message-actions .button-row { flex-direction: column; align-items: stretch; }
  .copy-message-actions #notice.visible { flex: initial; }
  dialog { width: calc(100% - 24px); padding: 16px; }
  .dialog-heading { gap: 8px; }
}
