/* Samdami — a food passport that opens into a readable travel notebook. */
:root {
  color-scheme: light;
  --navy: #17375e;
  --navy-deep: #102a49;
  --blue: #234d87;
  --blue-light: #edf2f8;
  --paper: #faf7ef;
  --paper-bright: #fffdf8;
  --paper-edge: #e7e0d1;
  --gold: #b79c60;
  --gold-light: #d9c694;
  --ink: #25364a;
  --muted: #687381;
  --line: #e2ddd2;
  --danger: #a3463f;
  --body-font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --title-font: "Noto Serif KR", "Nanum Myeongjo", "Batang", Georgia, serif;
  --radius: 12px;
  --shadow: 0 16px 48px rgba(28, 44, 63, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #efeee8;
  font: 16px/1.8 var(--body-font);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:disabled:hover { transform: none; }
a { color: var(--blue); text-underline-offset: 4px; }
button, input, select, textarea { border-radius: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #829ec2;
  outline-offset: 4px;
}
[hidden] { display: none !important; }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { color: var(--navy); overflow-wrap: break-word; }
h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.45; font-weight: 700; letter-spacing: -.045em; }
h2 { font-size: 23px; line-height: 1.5; letter-spacing: -.035em; }
h3 { font-size: 19px; line-height: 1.5; letter-spacing: -.025em; }
small { font-size: 13px; line-height: 1.65; }
strong { font-weight: 650; }
hr { height: 1px; border: 0; background: var(--line); margin: 28px 0; }
::selection { background: #dce6f0; color: var(--navy-deep); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 1000; padding: 12px 20px; background: var(--navy); color: white; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.eyebrow { font-size: 11px; font-weight: 650; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase; color: #58708c; }
.folio { font-size: 11px; color: #7a8390; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.chapter-number { font: 40px/1 var(--title-font); color: var(--gold); letter-spacing: -.06em; }

/* The web navigation is outside the book, never in a phone-shaped frame. */
.app-header { position: relative; z-index: 30; background: rgba(250, 249, 245, .96); border-bottom: 1px solid #dfdfd8; }
.header-inner { max-width: 1340px; min-height: 94px; padding: 16px 32px; margin: 0 auto; display: flex; gap: 28px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); flex-shrink: 0; }
button.brand { padding: 0; background: none; border: 0; text-align: left; }
.brand-emblem { display: grid; place-items: center; width: 45px; height: 45px; color: var(--navy); }
.brand-emblem svg { width: 45px; height: 39px; }
.brand-title { display: block; font-family: var(--title-font); font-size: 24px; font-weight: 700; letter-spacing: -.04em; line-height: 1.4; }
.brand-subtitle { display: block; font-size: 9px; letter-spacing: .16em; line-height: 1.7; color: #64768d; }
.desktop-nav { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.desktop-nav button { border: 0; background: transparent; padding: 12px 16px; font-size: 14px; font-weight: 550; color: #5b6a7b; position: relative; white-space: nowrap; }
.desktop-nav button::after { content: ""; height: 2px; background: var(--blue); position: absolute; bottom: 4px; left: 17px; right: 17px; transform: scaleX(0); transition: transform .18s ease; }
.desktop-nav button:hover { color: var(--navy); }
.desktop-nav button.is-active, .desktop-nav button.active, .desktop-nav button[aria-current="page"] { color: var(--navy); font-weight: 700; }
.desktop-nav button.is-active::after, .desktop-nav button.active::after, .desktop-nav button[aria-current="page"]::after { transform: scaleX(1); }
.utility-actions { display: flex; align-items: center; gap: 6px; }
.mobile-nav { display: none; }
#app { min-height: calc(100svh - 220px); }
.workspace { max-width: 1320px; margin: 38px auto 40px; padding: 0 28px; }
.page-tabs { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 3px; padding: 0 18px; }
.page-tabs button { border: 1px solid #d7d5ce; border-bottom: 0; border-radius: 7px 7px 0 0; background: #ece9e0; color: #576a81; padding: 8px 19px; font-size: 13px; }
.page-tabs button.is-active { background: var(--paper); color: var(--navy); }

/* Two pages on a wide display, one continuous notebook on narrower displays. */
.book-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 0;
  position: relative;
  isolation: isolate;
  padding: 7px 8px 8px;
  border: 1px solid #162e4e;
  border-radius: 6px 14px 14px 6px;
  background: var(--navy);
  box-shadow: 0 4px 0 #e3dfd5, 0 7px 0 #f6f1e6, 0 9px 0 #d1cec4, 0 24px 60px rgba(25, 43, 65, .12);
}
.book-spread::after { content: ""; position: absolute; z-index: 3; top: 7px; bottom: 8px; left: 47.15%; width: 32px; transform: translateX(-50%); pointer-events: none; background: linear-gradient(90deg, transparent, rgba(77, 63, 39, .045) 29%, rgba(59, 46, 24, .12) 48%, rgba(255, 255, 255, .36) 53%, rgba(77, 63, 39, .035) 72%, transparent); }
.book-page { min-width: 0; min-height: 650px; background: var(--paper); padding: 34px 42px 40px; position: relative; }
.book-page:first-child { border-radius: 2px 0 0 4px; }
.book-page:last-child { border-radius: 0 8px 8px 0; }
.book-page.page-left, .book-page:first-child { background: linear-gradient(90deg, var(--paper-bright), var(--paper) 85%); }
.book-page.page-right, .book-page:last-child { background: linear-gradient(90deg, #f7f3e9, var(--paper) 7%, var(--paper-bright)); }
.book-spread.single-page { grid-template-columns: 1fr; max-width: 920px; margin: auto; }
.book-spread.single-page::after { display: none; }
.book-spread.single-page .book-page { border-radius: 3px 9px 9px 3px; }
.page-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-subtitle, .lead { color: #647080; line-height: 1.85; margin-top: 13px; }
.lead { font-size: 17px; }
.page-bottomline { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 34px; font-size: 11px; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-heading h2 { font-size: 20px; }
.section-space { margin-top: 34px; }

/* Buttons and quiet, tactile controls. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: 15px; line-height: 1.5; font-weight: 600; letter-spacing: -.015em; background: transparent; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; text-align: center; }
.button svg { width: 18px; height: 18px; }
.button.primary { color: #fff; background: var(--navy); border-color: var(--navy); box-shadow: 0 2px 3px rgba(14, 40, 71, .06); }
.button.primary:hover:not(:disabled) { background: #234b7b; border-color: #234b7b; box-shadow: 0 4px 12px rgba(14, 40, 71, .1); }
.button.secondary { background: rgba(255, 255, 255, .35); color: var(--navy); border-color: #bdc8d5; }
.button.secondary:hover:not(:disabled) { background: #edf1f4; border-color: #8fabc6; }
.button.ghost { border-color: transparent; color: var(--blue); background: transparent; }
.button.ghost:hover:not(:disabled) { background: #e8edf3; }
.button.small { min-height: 39px; font-size: 13px; padding: 8px 13px; }
.button.danger { color: var(--danger); border-color: #d8b9b4; background: #fff9f7; }
.button.danger:hover:not(:disabled) { background: #f8eae6; }
.button.full-width { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.button-row.end { justify-content: flex-end; }
.text-link { display: inline-flex; gap: 6px; align-items: center; border: 0; padding: 4px 0; background: transparent; color: var(--blue); font-size: 14px; line-height: 1.5; text-decoration: underline; text-decoration-color: #a7b6c8; text-underline-offset: 5px; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 16px; height: 16px; }
.icon-button, .bookmark-button { border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--navy); flex-shrink: 0; padding: 8px; }
.icon-button svg, .bookmark-button svg { width: 20px; height: 20px; }
.icon-button:hover, .bookmark-button:hover { background: #e9eef3; }
.bookmark-button.is-saved { color: var(--blue); background: #eaf0f7; }
.bookmark-button.is-saved svg { fill: #d2dfed; }
.bookmark-button.is-saved svg path { stroke: currentColor; }
.callout, .notice { padding: 15px 17px; border-radius: 9px; background: #edf1f4; color: #52667b; font-size: 14px; line-height: 1.8; border-left: 2px solid #9eafc3; }
.callout strong, .notice strong { color: var(--navy); }
.callout p + p, .notice p + p { margin-top: 8px; }
.callout.warning, .notice.warning { background: #f5efdf; color: #796640; border-left-color: #bca16b; }
.callout.success, .notice.success { background: #ecf3ed; color: #45674e; border-left-color: #8aa88b; }
.callout + *, .notice + * { margin-top: 20px; }
.empty-state { text-align: center; padding: 36px 24px; background: rgba(255, 255, 255, .35); border: 1px solid var(--line); border-radius: 12px; }
.empty-state h2, .empty-state h3 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 16px; line-height: 1.85; }
.empty-state .button { margin-top: 20px; }
.empty-state svg { margin: 0 auto 16px; width: 36px; height: 36px; color: #8a9cb3; }

/* Home / a travel notebook's opening page. */
.home-heading { font-family: var(--title-font); font-size: clamp(30px, 3.1vw, 42px); font-weight: 700; line-height: 1.6; letter-spacing: -.055em; margin: 4px 0 18px; }
.home-heading em { color: var(--blue); font-style: normal; }
.home-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.resume-card { position: relative; padding: 23px 23px 21px; border: 1px solid #d9e0e8; border-radius: 11px; background: linear-gradient(110deg, #f1f4f7, #fbfcfb); margin: 26px 0 0; box-shadow: 0 3px 10px rgba(29, 49, 76, .04); }
.resume-card::before { content: ""; position: absolute; right: 23px; top: 0; width: 15px; height: 23px; background: var(--blue); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 77%, 0 100%); }
.resume-heading { font-size: 17px; font-weight: 650; color: var(--navy); padding-right: 24px; }
.resume-card p { color: #64758a; font-size: 14px; margin-top: 6px; }
.resume-card .button-row { margin-top: 14px; }
.home-feature { display: grid; grid-template-columns: 36px 1fr; gap: 15px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.home-feature:last-child { border-bottom: 0; }
.home-feature h3 { font-size: 17px; margin-bottom: 5px; }
.home-feature p { font-size: 16px; line-height: 1.8; color: var(--muted); }
.home-feature > svg { width: 24px; height: 24px; margin-top: 3px; color: var(--blue); }
.stats-row { display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; color: var(--muted); font-size: 12px; line-height: 1.65; }
.stat strong, .stat b { font-size: 25px; color: var(--navy); font-weight: 600; letter-spacing: -.04em; }

/* Photo slots intentionally contain no image or substitute illustration. */
.photo-placeholder { width: 100%; aspect-ratio: 4 / 3; display: block; border: 1px solid #ddd8cd; border-radius: 5px; background: #f4f1e8; flex-shrink: 0; }
.photo-placeholder.small { width: 72px; height: 82px; aspect-ratio: auto; border-color: #d1d8df; background: #f5f3ec; }
.photo-placeholder.wide { aspect-ratio: 16 / 9; }
.photo-placeholder.square { aspect-ratio: 1; }
.photo-caption { margin-top: 6px; font-size: 11px; color: #8a8f96; text-align: right; }
.food-grid, .atlas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.food-card { border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 253, 247, .8); overflow: hidden; min-width: 0; box-shadow: 0 4px 12px rgba(60, 51, 32, .035); }
.food-card > .photo-placeholder { width: calc(100% - 28px); margin: 14px 14px 0; }
.food-card-body { padding: 14px 16px 16px; }
.food-card h3 { font-size: 18px; }
.food-card-body p { font-size: 14px; line-height: 1.8; color: var(--muted); margin-top: 8px; }
.food-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #708197; font-size: 11px; }
.food-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; }
.food-card-actions .text-link { font-size: 13px; }
.card-number { font-size: 11px; letter-spacing: .06em; line-height: 1.5; color: #677a93; font-variant-numeric: tabular-nums; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d4dce6; color: #526b8a; background: rgba(247, 250, 253, .68); border-radius: 5px; padding: 2px 8px; font-size: 11px; line-height: 1.7; max-width: 100%; }
.tag.gold { border-color: #ddd0ad; color: #8c7744; background: #f7f1e2; }
.tag.subtle { border-color: var(--line); color: #7b817f; background: #f1efe8; }

/* The cover: original fictional food-passport design, no official emblem. */
.cover-scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 90px; align-items: center; max-width: 1080px; min-height: calc(100svh - 190px); margin: 0 auto; padding: 65px 38px 80px; transition: opacity .28s ease; }
.cover-intro .eyebrow { color: #667d97; margin-bottom: 22px; }
.cover-intro h1 { font-family: var(--title-font); font-size: clamp(34px, 4vw, 52px); font-weight: 700; line-height: 1.5; letter-spacing: -.055em; }
.cover-intro h1 em { font-style: normal; color: var(--blue); }
.intro-copy { color: #6c7887; max-width: 360px; font-size: 16px; line-height: 1.9; margin-top: 24px; }
.cover-hint { margin-top: 26px; color: #8b8270; font-size: 12px; line-height: 1.8; }
.cover-visual { text-align: center; perspective: 1800px; }
.passport-object { position: relative; width: min(100%, 344px); aspect-ratio: .704; margin: 0 auto; perspective: 1500px; transform-style: preserve-3d; text-align: center; }
.cover-back { position: absolute; inset: 5px -9px -3px 0; background: #173454; border-radius: 5px 16px 16px 5px; transform: rotate(1deg); box-shadow: 12px 20px 34px rgba(20, 43, 68, .17); }
.cover-pages { position: absolute; inset: 6px -4px 3px 6px; border-radius: 2px 12px 12px 2px; background: repeating-linear-gradient(90deg, #dcd7c9 0, #faf7ed 1px, #f7f2e6 3px); border: 1px solid #c6bb9f; box-shadow: 3px 1px 0 #e1d9c6; }
.cover-front { position: absolute; inset: 0; z-index: 3; background-color: var(--navy); background-image: radial-gradient(rgba(255, 255, 255, .04) .7px, transparent .9px), linear-gradient(103deg, rgba(4, 24, 45, .34), transparent 8%, rgba(255, 255, 255, .025) 44%, rgba(4, 24, 45, .12)); background-size: 4px 4px, 100% 100%; border: 1px solid #1b3b61; border-radius: 5px 12px 12px 5px; box-shadow: inset 3px 0 4px rgba(0, 0, 0, .17), inset -1px 0 rgba(255, 255, 255, .08), 4px 4px 8px rgba(9, 30, 52, .12); transform-origin: 0 50%; backface-visibility: hidden; transition: transform 750ms cubic-bezier(.35, .04, .28, 1); }
.cover-front::before { content: ""; position: absolute; inset: 17px; border: 1px solid rgba(208, 183, 125, .83); border-radius: 2px 6px 6px 2px; pointer-events: none; }
.cover-front::after { content: ""; position: absolute; inset: 23px; border: 1px solid rgba(208, 183, 125, .25); pointer-events: none; }
.cover-inner { height: 100%; padding: 47px 33px 35px; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; color: var(--gold-light); }
.cover-kicker { font-size: 10px; letter-spacing: .22em; line-height: 1.7; color: var(--gold-light); }
.cover-title { color: #e2cf98; font-family: var(--title-font); font-size: 33px; line-height: 1.65; font-weight: 600; letter-spacing: -.045em; margin-top: 39px; }
.cover-title small { display: block; font: 11px/2 var(--body-font); letter-spacing: .24em; margin-top: 13px; color: var(--gold-light); }
.cover-emblem { margin: 29px 0 22px; color: #d9be78; }
.cover-emblem svg { width: 118px; height: 78px; }
.cover-footer { margin-top: auto; color: var(--gold-light); font-size: 9px; line-height: 1.9; letter-spacing: .21em; }
.cover-footer::before { content: ""; display: block; width: 30px; height: 1px; background: rgba(212, 187, 130, .6); margin: 0 auto 17px; }
.passport-object.is-opening .cover-front { transform: rotateY(-153deg); }
.cover-scene.is-closing { opacity: 0; }
.cover-caption { text-align: center; font-size: 12px; color: #7f8995; margin-top: 28px; }
.cover-controls { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; margin: 27px auto 0; max-width: 344px; }
.cover-controls .button { width: 100%; }
.cover-controls .text-link { font-size: 13px; }

/* Survey inputs retain ordinary readable text rather than passport decoration. */
.survey-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #6f7c8c; font-size: 13px; margin-bottom: 10px; }
.survey-progress strong { color: var(--navy); }
.progress-track { width: 100%; height: 4px; border-radius: 3px; background: #e2e5e6; overflow: hidden; margin-bottom: 28px; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .25s ease; }
.question-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 25px; }
.question-options.single-column, .question-options.long { grid-template-columns: 1fr; }
.option { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #d6dce2; border-radius: 9px; background: #fffdf9; padding: 16px; cursor: pointer; transition: background .15s ease, border-color .15s ease; min-width: 0; }
.option:hover { border-color: #9fb2ca; background: #f8fafb; }
.option:has(input:checked) { border-color: var(--blue); background: #edf2f8; box-shadow: inset 0 0 0 1px var(--blue); }
.option:has(input:disabled) { opacity: .5; background: #eeede8; cursor: not-allowed; }
.option input { width: 17px; height: 17px; margin: 5px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.option-label { min-width: 0; display: block; font-size: 16px; line-height: 1.8; }
.option-hint { display: block; font-size: 12px; line-height: 1.7; color: #718091; margin-top: 3px; }
.detail-exclusions { margin-top: 19px; border: 1px solid var(--line); border-radius: 8px; }
.detail-exclusions summary { cursor: pointer; padding: 13px 15px; font-size: 14px; color: #62748a; }
.detail-exclusions > div { padding: 0 14px 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.detail-exclusions label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d7dce0; background: #fcfbf7; border-radius: 6px; padding: 5px 9px; font-size: 12px; cursor: pointer; }
.detail-exclusions label:has(input:checked) { border-color: #8ca4c1; background: #e8eff6; }
.detail-exclusions input { accent-color: var(--blue); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.question-hint { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.survey-note { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 22px; }

/* A food itinerary, deliberately without fabricated map or restaurant data. */
.answer-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 22px; }
.answer-summary .tag { padding: 4px 10px; font-size: 12px; }
.itinerary-list { display: flex; flex-direction: column; gap: 0; position: relative; }
.itinerary-item { display: grid; grid-template-columns: 26px 72px minmax(0, 1fr); gap: 14px; position: relative; padding: 0 0 24px; }
.itinerary-item:not(:last-child)::after { content: ""; position: absolute; width: 1px; border-left: 1px dashed #b9c5d2; left: 12px; top: 31px; bottom: -1px; }
.itinerary-item:last-child { padding-bottom: 0; }
.stop-index { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: white; background: var(--navy); font-size: 10px; letter-spacing: .02em; }
.stop-body { min-width: 0; padding-top: 0; }
.stop-body h3 { font-size: 19px; margin-top: -2px; }
.stop-body p { color: #738092; font-size: 13px; line-height: 1.75; margin-top: 5px; }
.stop-body .tags { margin-top: 7px; }
.stop-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 11px; }
.stop-actions .button { min-height: 33px; font-size: 12px; padding: 5px 10px; }
.stop-actions .text-link { font-size: 12px; }
.itinerary-item.is-empty { grid-template-columns: 26px minmax(0, 1fr); }
.itinerary-item.is-empty .stop-body { border: 1px dashed #c5cbd1; border-radius: 8px; padding: 15px; background: #f6f5ef; }
.itinerary-item.is-empty h3 { font-size: 16px; }
.time-settings { margin-top: 26px; border: 1px solid var(--line); border-radius: 9px; }
.time-settings summary { padding: 13px 15px; color: #5c7088; font-size: 14px; cursor: pointer; }
.time-settings > div, .time-settings > form { padding: 0 15px 17px; }
.time-settings .form-grid { gap: 10px; }
.time-settings .field { font-size: 12px; }
.time-settings select { font-size: 13px; padding: 9px; }
.time-settings .button { margin-top: 14px; }
.result-note { color: var(--muted); font-size: 13px; line-height: 1.85; margin-top: 20px; }
.alternative-list { display: flex; flex-direction: column; gap: 12px; }
.alternative-item { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
.alternative-item h3 { font-size: 17px; }
.alternative-item p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.alternative-item .button { flex-shrink: 0; }

/* My passport, saved journeys, and ordinary user-written records. */
.mini-passport, .passport-summary { background: linear-gradient(120deg, #1f426e, #132f52); color: #eff4fa; border: 1px solid #19375b; border-radius: 6px 14px 14px 6px; padding: 27px; position: relative; box-shadow: 2px 3px 0 #e0d8c8; }
.mini-passport::before, .passport-summary::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(206, 182, 126, .52); border-radius: 2px 6px 6px 2px; pointer-events: none; }
.mini-passport h2, .mini-passport h3, .passport-summary h2, .passport-summary h3 { color: #f5edda; font-family: var(--title-font); font-weight: 500; }
.mini-passport .eyebrow, .passport-summary .eyebrow { color: #d0bf92; }
.mini-passport p, .passport-summary p { color: #c3d0e1; font-size: 13px; line-height: 1.8; margin-top: 8px; }
.passport-summary > * { position: relative; z-index: 1; }
.passport-summary .button.secondary { color: #e6edf6; border-color: #7287a1; background: transparent; }
.passport-summary .button.secondary:hover { background: #284a74; }
.passport-summary .text-link { color: #e9d8a9; }
.passport-summary .summary-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.passport-summary .summary-top > svg { color: var(--gold-light); width: 58px; height: 43px; }
.stamp-slots { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 23px; }
.stamp-slot { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; width: 72px; height: 72px; border-radius: 50%; border: 1px dashed #94a6bf; color: #a9b8cb; font-size: 11px; line-height: 1.5; text-align: center; }
.stamp-slot strong, .stamp-slot b { font-size: 20px; font-weight: 500; }
.stamp-slot.is-recorded { background: #f7f4eb; color: var(--navy); border: 1px solid #e6d7b4; }
.stamp-slot.is-recorded svg { width: 20px; height: 20px; }
.stamp-caption { color: #a8b9cf; font-size: 11px; line-height: 1.8; margin-top: 15px; }
.trip-select { margin: 0 0 20px; }
.trip-select select { width: 100%; }
.journal-list, .record-list { display: flex; flex-direction: column; gap: 15px; }
.journal-card { padding: 19px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 254, 249, .75); min-width: 0; }
.journal-card h3 { font-size: 18px; }
.journal-card .photo-placeholder { margin-bottom: 16px; }
.journal-card .journal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.journal-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; color: #7b8590; margin-top: 5px; }
.journal-memo { color: #556577; font-size: 16px; line-height: 1.9; margin-top: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.journal-card .button-row { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e9e4d9; }
.journal-card .button-row .text-link { font-size: 12px; }
.history-list { display: flex; flex-direction: column; gap: 11px; }
.history-item { padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf8; }
.history-item h3 { font-size: 17px; }
.history-item p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 6px; }
.history-item .button-row { margin-top: 12px; }
.history-item.is-active { border-color: #9aaec6; background: #f2f5f8; }
.record-type-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.record-type-tabs button { border: 1px solid #ccd5df; background: #fbfcfd; color: #60758e; border-radius: 7px; padding: 8px 16px; font-size: 14px; }
.record-type-tabs button.is-active { background: var(--navy); color: white; border-color: var(--navy); }

/* Atlas: all entries stay open to discovery, with collection as an optional act. */
.atlas-toolbar { margin-bottom: 24px; }
.search-field { position: relative; display: flex; align-items: center; width: 100%; }
.search-field svg { position: absolute; left: 14px; width: 18px; height: 18px; color: #6c8099; pointer-events: none; }
.search-field input { width: 100%; min-height: 46px; border: 1px solid #cbd3dc; border-radius: 24px; background: #fffdf8; padding: 10px 15px 10px 41px; color: var(--ink); font-size: 14px; }
.search-field input::placeholder { color: #8993a0; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.category-tabs button { background: transparent; border: 1px solid #cbd4de; border-radius: 20px; padding: 7px 13px; min-height: 36px; font-size: 12px; line-height: 1.5; color: #5b7391; }
.category-tabs button:hover { background: #edf2f7; }
.category-tabs button.is-active { background: var(--navy); border-color: var(--navy); color: white; }
.atlas-card { border: 1px solid var(--line); border-radius: 10px; background: #fffcf6; padding: 13px; min-width: 0; box-shadow: 0 3px 9px rgba(60, 51, 32, .025); transition: border-color .15s ease, box-shadow .15s ease; text-align: left; }
button.atlas-card { display: block; width: 100%; }
.atlas-card:hover { border-color: #aab9cb; box-shadow: 0 4px 12px rgba(32, 53, 80, .07); }
.atlas-card.is-selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.atlas-card .card-number { margin-bottom: 7px; display: block; }
.atlas-card .photo-placeholder { aspect-ratio: 1.5; }
.atlas-card h3 { font-size: 16px; margin-top: 10px; }
.atlas-card p { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 5px; }
.atlas-card .tags { margin-top: 7px; }
.atlas-card .card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; }
.atlas-card .bookmark-button { width: 32px; height: 32px; padding: 5px; margin: 2px -4px -4px 0; }
.atlas-card .bookmark-button svg { width: 17px; height: 17px; }
.atlas-count { display: flex; align-items: center; gap: 8px; color: #6a7c93; font-size: 12px; margin: 13px 0 0; }
.atlas-count svg { width: 15px; height: 15px; }
.atlas-detail { min-width: 0; }
.atlas-detail > .photo-placeholder { margin: 19px 0 27px; }
.atlas-detail .detail-section { margin-top: 27px; }
.atlas-detail .detail-section h2, .atlas-detail .detail-section h3 { font-size: 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.atlas-detail .detail-section h2::after, .atlas-detail .detail-section h3::after { content: ""; flex: 1; height: 1px; background: #d7d8d5; }
.atlas-detail .detail-section p { font-size: 16px; line-height: 1.95; color: #4f6176; }
.atlas-detail .detail-section p + p { margin-top: 13px; }
.atlas-detail .detail-section .tags { margin-top: 13px; }
.atlas-detail .button-row { margin-top: 26px; }
.source-list { padding-left: 18px; margin: 9px 0 0; font-size: 13px; color: #6b7c90; line-height: 1.85; }
.source-list li + li { margin-top: 9px; }
.source-list a { overflow-wrap: anywhere; }
.source-list small { font-size: 11px; color: #8a939b; }
.source-details { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 13px; }
.source-details summary { color: #6e7e92; cursor: pointer; font-size: 13px; }

/* Form fields and dialogs. */
.form-stack { display: flex; flex-direction: column; gap: 19px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #435975; font-size: 14px; font-weight: 550; min-width: 0; }
.field input, .field textarea, .field select, .trip-select select { width: 100%; min-width: 0; min-height: 47px; padding: 10px 12px; color: var(--ink); background: #fffefa; border: 1px solid #ccd3da; border-radius: 7px; font-size: 16px; font-weight: 400; line-height: 1.6; }
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #98a0a7; }
.field small, .field .field-hint { color: #84909c; font-size: 12px; line-height: 1.7; font-weight: 400; }
.field select { padding-right: 26px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #6b89ae; }
.form-error { padding: 10px 13px; background: #f8eae7; color: #984e46; border-radius: 6px; font-size: 13px; margin-top: 12px; }
.form-hint { color: #7c8998; font-size: 13px; line-height: 1.8; margin-top: 12px; }
dialog#modal { border: 1px solid #d4d7da; border-radius: 13px; padding: 0; width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 60px); background: var(--paper-bright); color: var(--ink); box-shadow: 0 25px 100px rgba(7, 24, 45, .25); overflow-y: auto; }
dialog#modal::backdrop { background: rgba(16, 34, 56, .47); backdrop-filter: blur(3px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 28px 19px; border-bottom: 1px solid var(--line); background: var(--paper-bright); position: sticky; top: 0; z-index: 2; }
.modal-header h2 { font-size: 22px; }
.modal-header .eyebrow { margin-bottom: 4px; }
.modal-body { padding: 25px 28px 28px; }
.modal-body > p { font-size: 16px; color: #6d7a8b; line-height: 1.9; }
.modal-body > p + * { margin-top: 20px; }
.modal-footer { padding: 19px 28px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal-body .modal-footer { margin: 23px -28px -28px; }
.modal-body .form-stack + .button-row { justify-content: flex-end; }
.modal-body .atlas-detail .photo-placeholder { max-height: 240px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; max-width: calc(100% - 40px); width: max-content; padding: 13px 21px; border-radius: 10px; box-shadow: 0 10px 35px rgba(15, 34, 59, .16); background: var(--navy-deep); color: white; font-size: 14px; line-height: 1.7; text-align: center; }
.app-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; max-width: 1264px; margin: 0 auto; padding: 18px 0 27px; color: #7b8590; font-size: 11px; letter-spacing: .015em; }
.app-footer .text-link { font-size: 12px; }
.storage-note { color: #86909b; font-size: 12px; line-height: 1.8; }
.workspace > .storage-note { margin-top: 23px; text-align: center; }
.save-indicator { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #8190a2; }
.save-indicator svg { width: 13px; height: 13px; }

@media (min-width: 1500px) {
  .workspace { margin-top: 49px; }
  .book-page { padding: 39px 47px 45px; }
  .book-page { min-height: 700px; }
}

@media (max-width: 1100px) {
  .header-inner { padding: 14px 25px; gap: 20px; }
  .desktop-nav { gap: 0; }
  .desktop-nav button { padding: 12px 12px; font-size: 13px; }
  .brand-subtitle { font-size: 8px; }
  .workspace { padding: 0 20px; }
  .book-page { padding: 28px 27px 34px; }
  .cover-scene { gap: 55px; padding: 55px 40px 70px; }
  .itinerary-item { grid-template-columns: 24px 63px minmax(0, 1fr); gap: 11px; }
  .itinerary-item .photo-placeholder.small { width: 63px; height: 77px; }
  .stamp-slots { gap: 11px; }
  .stamp-slot { width: 65px; height: 65px; }
  .app-footer { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 900px) {
  .book-spread { grid-template-columns: minmax(0, 1fr); max-width: 740px; margin: 0 auto; padding: 5px 6px 6px; border-radius: 5px 11px 11px 5px; }
  .book-spread::after { display: none; }
  .book-page { min-height: 0; padding: 32px 38px 37px; }
  .book-page:first-child { border-radius: 2px 6px 0 0; }
  .book-page:last-child { border-radius: 0 0 7px 2px; }
  .book-page + .book-page { border-top: 1px solid #d9d3c6; }
  .book-page.page-left, .book-page:first-child, .book-page.page-right, .book-page:last-child { background: var(--paper); }
  .page-topline { margin-bottom: 24px; }
  .page-heading h1 { font-size: 31px; }
  .home-heading { font-size: 38px; max-width: 530px; }
  .cover-scene { gap: 36px; padding: 45px 35px 65px; }
  .cover-intro h1 { font-size: 36px; }
  .passport-object { width: 290px; }
  .cover-inner { padding: 38px 29px 30px; }
  .cover-title { font-size: 29px; margin-top: 27px; }
  .cover-emblem { margin: 23px 0 17px; }
  .cover-emblem svg { width: 99px; height: 65px; }
  .atlas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .atlas-card h3 { font-size: 16px; }
  .atlas-detail > .photo-placeholder { max-height: 310px; }
  .desktop-nav button { font-size: 12px; padding-left: 9px; padding-right: 9px; }
  .desktop-nav button::after { left: 10px; right: 10px; }
  .header-inner { gap: 15px; }
  .itinerary-item { grid-template-columns: 27px 85px minmax(0, 1fr); gap: 17px; }
  .itinerary-item .photo-placeholder.small { width: 85px; height: 91px; }
  .stop-actions { gap: 10px; }
  .stamp-slot { width: 75px; height: 75px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .app-header { position: sticky; top: 0; }
  .header-inner { min-height: 73px; padding: 12px 21px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-emblem { width: 35px; height: 34px; }
  .brand-emblem svg { width: 35px; height: 30px; }
  .brand-title { font-size: 22px; }
  .brand-subtitle { font-size: 7px; letter-spacing: .14em; }
  .desktop-nav { display: none; }
  .utility-actions { margin-left: auto; }
  .utility-actions .button.small { padding: 7px 9px; min-height: 36px; font-size: 12px; }
  .mobile-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 7px max(12px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); min-height: 70px; background: rgba(253, 251, 246, .98); border-top: 1px solid #deddd6; box-shadow: 0 -3px 16px rgba(33, 50, 72, .035); }
  .mobile-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 0; background: transparent; color: #7c8999; font-size: 10px; line-height: 1.5; min-height: 52px; position: relative; padding: 5px; }
  .mobile-nav button svg { width: 21px; height: 21px; }
  .mobile-nav button.is-active, .mobile-nav button.active, .mobile-nav button[aria-current="page"] { color: var(--navy); font-weight: 700; }
  .mobile-nav button.is-active::after, .mobile-nav button.active::after, .mobile-nav button[aria-current="page"]::after { content: ""; position: absolute; bottom: 1px; left: calc(50% - 17px); width: 34px; height: 2px; border-radius: 2px; background: var(--blue); }
  .workspace { margin: 22px auto 24px; padding: 0 15px; }
  .book-page { padding: 26px 26px 31px; }
  .book-spread { box-shadow: 0 3px 0 #e3dfd5, 0 5px 0 #f6f1e6, 0 6px 0 #d1cec4, 0 14px 32px rgba(25, 43, 65, .09); }
  .book-page + .book-page { padding-top: 30px; }
  .page-topline { padding-bottom: 13px; margin-bottom: 23px; }
  .page-heading { gap: 10px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading .button.small { font-size: 12px; padding: 7px 9px; }
  .home-heading { font-size: 34px; }
  .page-subtitle, .lead { font-size: 16px; }
  .cover-scene { grid-template-columns: 1fr; gap: 27px; padding: 30px 24px 48px; min-height: 0; }
  .cover-intro { text-align: center; }
  .cover-intro .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .cover-intro h1 { font-size: 28px; line-height: 1.5; }
  .intro-copy { font-size: 14px; margin: 13px auto 0; line-height: 1.85; max-width: 320px; }
  .cover-hint { margin-top: 12px; font-size: 11px; }
  .passport-object { width: min(280px, calc(100vw - 82px)); }
  .cover-inner { padding-top: 33px; }
  .cover-title { font-size: 28px; margin-top: 25px; }
  .cover-emblem { margin-top: 23px; }
  .cover-emblem svg { width: 100px; height: 62px; }
  .cover-footer { font-size: 8px; }
  .cover-controls { max-width: 300px; margin-top: 24px; }
  .cover-caption { margin-top: 23px; }
  .atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .food-grid { gap: 12px; }
  .food-card-body { padding: 13px; }
  .food-card h3 { font-size: 17px; }
  .food-card-body p { font-size: 13px; }
  .food-card-actions { flex-wrap: wrap; gap: 6px; }
  .food-card > .photo-placeholder { margin: 11px 11px 0; width: calc(100% - 22px); }
  .resume-card { margin-top: 23px; padding: 19px; }
  .resume-heading { font-size: 16px; }
  .stats-row { gap: 25px; }
  .stat strong, .stat b { font-size: 23px; }
  .itinerary-item { grid-template-columns: 25px 66px minmax(0, 1fr); gap: 12px; }
  .itinerary-item .photo-placeholder.small { width: 66px; height: 83px; }
  .stop-body h3 { font-size: 18px; }
  .stop-body p { font-size: 12px; }
  .stop-actions { gap: 8px; }
  .stop-actions .button { padding: 5px 8px; font-size: 11px; }
  .stop-actions .text-link { font-size: 11px; }
  .question-options { gap: 9px; }
  .option { padding: 14px 12px; gap: 9px; }
  .option-label { font-size: 16px; }
  .question-actions .button { font-size: 14px; padding: 11px 15px; }
  .passport-summary, .mini-passport { padding: 24px; }
  .passport-summary h2 { font-size: 22px; }
  .stamp-slot { width: 66px; height: 66px; }
  .journal-card { padding: 17px; }
  .atlas-detail .detail-section p { font-size: 16px; }
  .atlas-card { padding: 11px; }
  .category-tabs { gap: 6px; }
  .category-tabs button { padding: 7px 11px; }
  .app-footer { padding: 14px 23px 18px; justify-content: center; text-align: center; gap: 6px 15px; }
  .storage-note { font-size: 11px; }
  dialog#modal { width: calc(100% - 24px); max-height: calc(100dvh - 30px); border-radius: 12px; }
  .modal-header { padding: 19px 21px 16px; }
  .modal-header h2 { font-size: 20px; }
  .modal-body { padding: 22px 21px 24px; }
  .modal-footer { padding: 16px 21px 20px; }
  .modal-body .modal-footer { margin-left: -21px; margin-right: -21px; margin-bottom: -24px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); font-size: 13px; padding: 12px 17px; }
}

@media (max-width: 420px) {
  .header-inner { padding-left: 17px; padding-right: 17px; }
  .workspace { padding: 0 10px; margin-top: 16px; }
  .book-page { padding: 24px 18px 27px; }
  .home-heading { font-size: 31px; }
  .page-heading h1 { font-size: 27px; }
  .button { padding: 12px 16px; font-size: 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .food-grid, .atlas-grid { gap: 10px; }
  .food-card-body { padding: 11px; }
  .food-card h3 { font-size: 16px; }
  .food-card-body p { font-size: 12px; }
  .food-card-actions .text-link { font-size: 12px; }
  .atlas-card h3 { font-size: 15px; }
  .atlas-card { padding: 9px; }
  .atlas-card .tag { font-size: 10px; padding: 1px 5px; }
  .passport-summary, .mini-passport { padding: 22px 21px; }
  .stamp-slots { gap: 10px; }
  .stamp-slot { width: 61px; height: 61px; font-size: 10px; }
  .stamp-slot strong { font-size: 18px; }
  .itinerary-item { grid-template-columns: 24px 55px minmax(0, 1fr); gap: 10px; }
  .itinerary-item .photo-placeholder.small { width: 55px; height: 76px; }
  .stop-actions { gap: 5px; }
  .stop-body h3 { font-size: 17px; }
  .question-options { grid-template-columns: 1fr; }
  .option { padding: 13px 14px; }
  .question-actions { gap: 8px; }
  .question-actions .button { padding: 11px 12px; font-size: 13px; }
  .category-tabs button { font-size: 11px; padding: 7px 10px; }
  .resume-card { padding: 17px; }
  .button-row { gap: 8px; }
  .home-actions .button { flex: 1 1 auto; }
  .app-footer { font-size: 10px; }
}

@media (max-width: 350px) {
  .brand-subtitle { display: none; }
  .utility-actions .button.small { font-size: 11px; }
  .book-page { padding-left: 15px; padding-right: 15px; }
  .home-heading { font-size: 28px; }
  .cover-intro h1 { font-size: 25px; }
  .passport-object { width: 238px; }
  .cover-title { font-size: 25px; margin-top: 19px; }
  .cover-emblem { margin-top: 19px; }
  .cover-emblem svg { width: 88px; height: 55px; }
  .cover-inner { padding: 30px 26px 25px; }
  .cover-footer::before { margin-bottom: 11px; }
  .itinerary-item { grid-template-columns: 24px minmax(0, 1fr); }
  .itinerary-item > .photo-placeholder { display: none; }
  .stamp-slot { width: 56px; height: 56px; }
  .stats-row { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .passport-object.is-opening .cover-front { transform: none; opacity: 0; }
}

/* Integration with the actual application markup. */
button { -webkit-appearance: none; appearance: none; border: 0; padding: 0; background: transparent; }
body.on-cover { padding-bottom: 0; }
body.on-cover #app { min-height: 100svh; }
.workspace { margin-top: 30px; }
.desktop-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.desktop-nav button svg { width: 18px; height: 18px; opacity: .85; }
.page-heading { display: block; }
.page-heading > .eyebrow { display: block; margin-bottom: 15px; }
.page-heading h1 em { font-style: normal; color: var(--blue); }
.page-heading.home-heading { font-family: var(--body-font); }
.home-heading h1 { font-family: var(--title-font); font-size: 39px; line-height: 1.65; font-weight: 600; }
.home-heading .lead { font-family: var(--body-font); font-weight: 400; font-size: 17px; line-height: 1.9; letter-spacing: -.015em; }
.home-feature { display: block; }
.home-feature .chapter-number { display: block; font-family: var(--body-font); font-size: 13px; font-weight: 600; letter-spacing: .15em; color: #9f8754; margin-bottom: 12px; }
.home-feature p { font-size: 16px; line-height: 1.9; }
.home-footnote { margin-top: 24px; font-size: 13px; line-height: 1.85; }
.stats-row > .home-footnote { flex-basis: 100%; margin-top: 0; }
.section-heading { align-items: center; }
.section-heading p { font-size: 14px; line-height: 1.8; margin-top: 5px; }
.section-heading > .text-link { white-space: nowrap; font-size: 12px; }
.small-note { font-size: 13px; line-height: 1.85; margin-top: 17px; }
.survey-save-note { font-size: 14px; line-height: 1.9; margin-top: 28px; }
.text-link.subdued { color: #7a8798; text-decoration-color: #c5ccd4; }
.text-link.danger { color: var(--danger); }
.book-page > .callout { margin-top: 24px; }
.book-page > .time-settings + .text-link { margin-top: 17px; }
.book-page > .empty-state { margin-top: 25px; }
.book-page > h2 + p.muted { margin-top: 8px; }
.book-page > h2 + p.muted + .history-list { margin-top: 25px; }

/* Cover controls live in the introduction, while the book itself is a button. */
.cover-scene { min-height: 100svh; }
.cover-intro .cover-controls { margin: 30px 0 0; align-items: flex-start; max-width: 290px; }
.cover-intro .cover-controls .button { min-height: 52px; }
button.passport-object { display: block; border: 0; padding: 0; background: transparent; color: inherit; }
button.passport-object:hover .cover-front { box-shadow: inset 3px 0 4px rgba(0, 0, 0, .17), inset -1px 0 rgba(255, 255, 255, .08), 9px 8px 17px rgba(9, 30, 52, .17); }
button.passport-object:focus-visible { border-radius: 7px 13px 13px 7px; outline-offset: 15px; }
.cover-front { text-align: center; }
.cover-inner { width: 100%; }
.cover-title { display: block; }
.cover-footer small { display: inline-block; font-size: 9px; line-height: 2.4; }

/* Clickable cards have no browser-default button chrome. */
button.resume-card { display: block; width: 100%; text-align: left; font-family: var(--body-font); }
.resume-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.resume-heading svg { width: 16px; height: 16px; }
.resume-card > strong { display: block; color: var(--navy); font-size: 17px; padding-right: 25px; font-weight: 600; line-height: 1.65; }
.resume-card > span:not(.resume-heading):not(.resume-arrow) { display: block; font-size: 13px; line-height: 1.8; color: #738195; margin-top: 6px; padding-right: 25px; }
.resume-arrow { position: absolute; right: 22px; bottom: 22px; color: var(--blue); }
.resume-arrow svg { width: 19px; height: 19px; }
.resume-card:hover { border-color: #b6c6d7; background: #eef3f8; }
button.mini-passport { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 14px 18px; text-align: left; margin-top: 28px; }
.mini-passport > svg { width: 72px; height: 56px; color: #cbb57b; align-self: center; }
.mini-passport h3 { font-size: 18px; margin-top: 8px; line-height: 1.7; }
.mini-passport p { margin-top: 4px; }
.mini-passport-link { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; color: #ddc98e; font-size: 12px; line-height: 1.7; border-top: 1px solid rgba(202, 179, 120, .22); padding-top: 13px; }
.mini-passport:hover { background: linear-gradient(120deg, #28517f, #163558); }
.food-card > .food-card-meta { padding: 5px 12px 0; margin-bottom: 0; }
.food-card > .food-card-meta .bookmark-button { width: 30px; height: 32px; padding: 6px; }
.food-card > .food-card-meta .bookmark-button svg { width: 17px; height: 17px; }
.image-link { display: block; width: 100%; padding: 0 13px; border: 0; background: transparent; text-align: left; }
.image-link:hover .photo-placeholder { border-color: #a4b5c8; background: #f0eee7; }
.food-card-body h3 .text-link { font-size: 18px; color: var(--navy); line-height: 1.6; font-weight: 650; text-decoration: none; padding: 0; }
.food-card-body .eyebrow { font-size: 10px; letter-spacing: .04em; }
.food-card-body p { font-size: 14px; }
.atlas-select { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; }
.atlas-select .tag { margin-top: 8px; }
.atlas-card > .food-card-meta { margin-bottom: 5px; }
.atlas-card .food-card-meta .bookmark-button { margin: -6px -5px -3px 0; }
.atlas-grid { max-height: 610px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b7c1cd transparent; padding: 2px 6px 9px 1px; }
.atlas-grid > .empty-state { grid-column: 1 / -1; }
.atlas-count { margin: 0 0 15px; }
.atlas-detail { scroll-margin-top: 90px; }
.detail-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 13px; align-items: center; margin: 0 0 22px; }
.detail-heading > .eyebrow { grid-column: 1; }
.detail-heading > h2 { grid-column: 1; font-family: var(--title-font); font-size: 31px; line-height: 1.6; font-weight: 600; }
.detail-heading > .bookmark-button { grid-column: 2; grid-row: 1 / 3; }
.detail-copy { margin-top: 27px; }
.detail-copy h3 { display: flex; align-items: center; gap: 11px; font-size: 18px; line-height: 1.7; margin: 25px 0 11px; }
.detail-copy h3:first-child { margin-top: 0; }
.detail-copy h3::after { content: ""; flex: 1; min-width: 12px; height: 1px; background: #d9d8d0; }
.detail-copy > p { font-size: 16px; line-height: 1.95; color: #506276; }
.detail-copy > p + p { margin-top: 17px; }
.detail-copy > .tags { margin-top: 20px; }
.detail-copy > p.small-note { font-size: 13px; color: var(--muted); margin-top: 20px; }
.detail-copy > .callout { font-size: 14px; line-height: 1.85; margin-top: 23px; }
.sources-details { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 15px; }
.sources-details summary { font-size: 13px; color: #6b7f97; cursor: pointer; }
.sources-details .small-note { font-size: 12px; }
.source-list li > span { display: block; font-size: 12px; color: #8190a0; }

/* The survey uses a consistent check control across radio and checkbox options. */
.progress-fill { display: block; }
.option { position: relative; align-items: flex-start; }
.option > input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.option-label { flex: 1; min-width: 0; }
.option-check { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; border: 1px solid #bcc8d5; border-radius: 50%; color: transparent; margin-top: 4px; }
.option-check svg { width: 13px; height: 13px; opacity: 0; }
.option:has(input[type="checkbox"]) .option-check { border-radius: 4px; }
.option:has(input:checked) .option-check { color: white; background: var(--blue); border-color: var(--blue); }
.option:has(input:checked) .option-check svg { opacity: 1; }
.option:has(input:focus-visible) { outline: 3px solid #829ec2; outline-offset: 3px; }
.option.is-disabled { cursor: not-allowed; }
.exclusion-grid { gap: 8px; }
.exclusion-grid label { min-height: 35px; }
.exclusion-grid input { width: 14px; height: 14px; }
.survey-spread .question-options { margin-top: 0; grid-template-columns: 1fr; }
.stop-body h2 { font-size: 22px; line-height: 1.6; margin: 2px 0 3px; }
.stop-body > .eyebrow { display: block; font-size: 10px; letter-spacing: .05em; }
.results-spread .itinerary-item { padding-bottom: 29px; }
.results-spread .itinerary-item:last-child { padding-bottom: 4px; }
.results-spread .page-right > .button-row { padding-top: 23px; border-top: 1px solid var(--line); }
.time-settings .form-stack { gap: 13px; }
.time-settings .field { font-size: 13px; }
.time-settings .field select { font-size: 16px; }
.alternative-item { align-items: flex-start; }
.alternative-item > div:not(.photo-placeholder) { min-width: 0; flex: 1; }
.alternative-item .photo-placeholder.small { width: 54px; height: 63px; }
.alternative-item p { font-size: 14px; line-height: 1.8; }
.alternative-item .button { align-self: center; }

/* Entries, travel selection and backups are plain and easy to read. */
.passport-count { display: flex; align-items: baseline; gap: 8px; margin-top: 21px; color: #d6e0ed; }
.passport-count strong { font-size: 32px; line-height: 1.3; font-weight: 500; color: #f3e8c9; }
.passport-count span { font-size: 13px; }
.stamp-slot > span { font-size: 19px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stamp-slot > small { font-size: 10px; line-height: 1.6; }
.passport-foods { margin: 30px 0 23px; }
.passport-foods h3 { font-size: 16px; margin-bottom: 8px; }
.passport-food-row { display: flex; width: 100%; align-items: center; gap: 13px; padding: 13px 1px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; }
.passport-food-row > span { font-size: 11px; color: #8a99aa; letter-spacing: .05em; }
.passport-food-row > strong { font-size: 16px; font-weight: 550; color: #425c7c; }
.passport-food-row > svg { margin-left: auto; color: #7b8ba0; }
.passport-food-row:hover > strong { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.journal-card .journal-meta { margin: 0 0 17px; justify-content: space-between; align-items: center; }
.journal-card-content { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 17px; align-items: start; }
.journal-card-content > .photo-placeholder { width: 72px; height: 92px; margin: 0; }
.journal-card-content > div { min-width: 0; }
.journal-food { color: #607b9b; font-size: 14px; margin-top: 5px; }
.journal-card-content p.muted { font-size: 13px; line-height: 1.8; margin-top: 3px; }
.journal-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 18px; }
.journal-card-actions .text-link { font-size: 12px; }
.journal-empty { min-height: 330px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.empty-page-lines { width: 60px; height: 72px; border: 1px solid #cbd3dd; border-radius: 2px 7px 7px 2px; margin-bottom: 24px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 17px, #d8dfe6 17px, #d8dfe6 18px); background-size: 33px 51px; background-repeat: no-repeat; background-position: center; }
button.history-item { display: grid; grid-template-columns: minmax(0, 1fr) 22px; gap: 5px 12px; width: 100%; text-align: left; }
.history-item > span { font-size: 12px; line-height: 1.7; color: #7d8b9c; }
.history-item > strong { grid-column: 1; font-size: 16px; line-height: 1.8; font-weight: 550; color: var(--navy); }
.history-item > small { grid-column: 1; font-size: 12px; color: var(--muted); }
.history-item > svg { grid-column: 2; grid-row: 1 / 4; align-self: center; color: #7d8fa6; }
.history-item:hover { border-color: #aebdd0; background: #f2f5f8; }
.rule-list { margin-top: 23px; }
.rule-list > div { border-top: 1px solid var(--line); padding: 15px 0; }
.rule-list strong { color: #4b6484; font-size: 15px; }
.rule-list p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-top: 6px; }
.storage-dialog > .lead { margin-top: 0; }
.storage-dialog > .stats-row { margin-bottom: 25px; }
.storage-dialog > p { font-size: 16px; line-height: 1.9; margin-top: 16px; }
.storage-dialog > p.small-note { font-size: 13px; }
.storage-dialog > h3 + p { margin-top: 9px; }
.storage-dialog > p + .button { margin-top: 18px; }
.modal-footer { flex-wrap: wrap; }
.modal-header > .icon-button { font: 28px/1 var(--body-font); }
.form-stack > p.muted { font-size: 14px; line-height: 1.9; }
.form-stack > p.small-note { font-size: 13px; }

@media (max-width: 1100px) {
  .desktop-nav button { gap: 6px; }
  .desktop-nav button svg { width: 16px; height: 16px; }
  .home-heading h1 { font-size: 34px; }
  .section-heading { align-items: flex-start; }
  .mini-passport { grid-template-columns: minmax(0, 1fr) 54px; }
  .mini-passport > svg { width: 54px; height: 45px; }
}
@media (max-width: 900px) {
  .atlas-grid { max-height: 550px; }
  .home-heading h1 { font-size: 37px; }
  .section-heading { align-items: center; }
  .survey-spread .page-left { padding-bottom: 25px; }
  .survey-spread .page-right { padding-top: 25px; }
  .survey-spread .page-right .page-topline { display: none; }
  .survey-save-note { margin-top: 20px; }
  .survey-spread .page-heading { margin-bottom: 0; }
  .survey-spread .question-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-spread .page-right { padding-top: 32px; }
}
@media (max-width: 760px) {
  .workspace { margin-top: 20px; }
  .home-heading h1 { font-size: 33px; }
  .home-heading .lead { font-size: 16px; }
  .cover-scene { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 24px 35px; min-height: 100svh; }
  .cover-intro { display: contents; }
  .cover-intro > .eyebrow { order: 0; text-align: center; margin: 0; }
  .cover-intro > h1 { order: 1; text-align: center; margin: 0; font-size: 26px; line-height: 1.5; }
  .cover-intro > .lead { order: 2; text-align: center; margin: -6px 0 3px; font-size: 14px; line-height: 1.85; }
  .cover-scene > .passport-object { order: 3; flex-shrink: 0; width: min(260px, calc(100vw - 90px)); margin: 0 auto; }
  .cover-intro > .cover-controls { order: 4; display: flex; margin: 10px auto 0; align-items: center; width: min(100%, 300px); }
  .cover-intro > .cover-hint { order: 5; text-align: center; margin: -3px 0 0; font-size: 11px; }
  .cover-title { margin-top: 20px; font-size: 27px; }
  .cover-emblem { margin-top: 21px; margin-bottom: 10px; }
  .cover-emblem svg { width: 97px; height: 62px; }
  .cover-footer::before { margin-bottom: 10px; }
  .cover-inner { padding-top: 31px; padding-bottom: 26px; }
  .image-link { padding: 0 11px; }
  .food-card-body h3 .text-link { font-size: 17px; }
  .food-card-body p { font-size: 13px; }
  .atlas-grid { max-height: 480px; }
  .detail-heading > h2 { font-size: 28px; }
  .detail-copy h3 { font-size: 18px; }
  .stop-body h2 { font-size: 20px; }
  .passport-count strong { font-size: 29px; }
  .journal-card-content { grid-template-columns: 62px minmax(0, 1fr); gap: 13px; }
  .journal-card-content > .photo-placeholder { width: 62px; height: 82px; }
  .journal-card-content h3 { font-size: 17px; }
  .alternative-item { gap: 12px; padding: 13px; }
  .alternative-item .photo-placeholder.small { width: 43px; height: 55px; }
  .alternative-item p { font-size: 13px; }
  .alternative-item .button { padding: 7px 11px; }
  .modal-footer > .button { flex: 1 1 auto; min-height: 44px; }
  .modal-footer > .button.ghost { flex-basis: 100%; order: 2; }
}
@media (max-width: 420px) {
  .workspace { margin-top: 16px; }
  .home-heading h1 { font-size: 30px; }
  .home-feature .chapter-number { font-size: 12px; }
  .food-card-body h3 .text-link { font-size: 16px; }
  .section-heading { gap: 10px; }
  .section-heading p { font-size: 13px; }
  .section-heading > .text-link { font-size: 11px; }
  .survey-spread .question-options { grid-template-columns: 1fr; }
  .stamp-slot > span { font-size: 17px; }
  .stamp-slot > small { font-size: 9px; }
  .mini-passport h3 { font-size: 17px; }
  .atlas-grid { max-height: 440px; }
  .stop-body h2 { font-size: 19px; }
  .journal-card-content { grid-template-columns: 1fr; }
  .journal-card-content > .photo-placeholder { width: 100%; height: auto; aspect-ratio: 2.6; }
}
@media (max-width: 350px) {
  .home-heading h1 { font-size: 27px; }
  .cover-scene > .passport-object { width: 230px; }
  .cover-title { font-size: 24px; margin-top: 18px; }
  .cover-emblem svg { width: 80px; height: 54px; }
  .cover-emblem { margin-top: 17px; }
  .cover-kicker { font-size: 9px; }
  .cover-inner { padding-top: 28px; padding-bottom: 23px; }
  .cover-footer small { font-size: 8px; }
  .alternative-item .photo-placeholder { display: none; }
}

@media print {
  body { padding: 0; background: white; color: #111; }
  .app-header, .app-footer, .mobile-nav, .utility-actions, .toast, .icon-button, .bookmark-button { display: none !important; }
  .workspace { margin: 0; padding: 0; max-width: none; }
  .book-spread { display: block; border: 0; padding: 0; box-shadow: none; }
  .book-spread::after { display: none; }
  .book-page { min-height: 0; background: white !important; padding: 20px; border: 0; }
  .journal-card, .food-card, .atlas-card { break-inside: avoid; box-shadow: none; }
  .passport-summary, .mini-passport { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Programmatic page focus keeps the book border clean; controls retain visible focus. */
#app:focus, #atlas-detail:focus { outline: none; }
.passport-no-mission { color: #e1e8ef; font-size: 14px; line-height: 1.8; }
