/* Ola Travel: teal for the brand and the picked option, amber for ratings, green for confirmed, red
   for cancellations. Bottom tab bar on phones, a side rail from 900px. No web fonts. */
:root {
  --bg: #f4f6f4; --card: #ffffff; --ink: #171a2b; --muted: #5d6178; --line: #e1e2ec; --soft: #eff0f6;
  --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #d3efe9;
  --amber: #f59e0b; --good: #15803d; --good-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #dc2626; --bad-soft: #fee2e2; --info: #0369a1; --info-soft: #e0f2fe;
  --radius: 14px; --shadow: 0 2px 8px rgb(23 26 43 / 7%), 0 10px 30px rgb(23 26 43 / 5%);
  --bar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1716; --card: #162321; --ink: #e6e7f2; --muted: #a0a3bd; --line: #2a2d47; --soft: #20223a;
    --accent: #5eead4; --accent-ink: #06302b; --accent-soft: #123a36;
    --good: #4ade80; --good-soft: #12301f; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3d1717; --info: #7dd3fc; --info-soft: #0f2c3d;
    --shadow: 0 2px 10px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; margin-top: 12px; }
p { margin: 6px 0; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; } .hidden { display: none !important; } [hidden] { display: none !important; }
.boot, .loading { padding: 48px; text-align: center; color: var(--muted); }
.error { color: var(--bad); margin: 8px 0 0; }
.pad { padding: 10px 14px; } .pad-x { padding: 0 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.12em; background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Layout: bottom bar on phones */
.layout { min-height: 100vh; }
.rail { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; height: calc(var(--bar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--card); border-top: 1px solid var(--line); }
.rail a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; }
.rail a.on { color: var(--accent); font-weight: 600; }
.rail .brand { display: none; }
#view { padding: 16px 16px calc(var(--bar) + 24px); max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) {
  .layout { display: flex; }
  .rail { position: sticky; top: 0; height: 100vh; width: 92px; flex-direction: column; justify-content: flex-start; border-top: 0; border-right: 1px solid var(--line); padding: 8px 0; }
  .rail a { flex: none; padding: 12px 4px; }
  .rail .brand { display: flex; padding: 10px 4px 16px; }
  .rail .brand strong { font-size: 13px; color: var(--ink); }
  main#view { flex: 1; min-width: 0; padding: 24px 28px; }
}

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.big { min-height: 52px; font-size: 17px; padding: 10px 20px; }
.btn.block { width: 100%; }
.link, .plain { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.plain { color: inherit; }
label { display: block; margin: 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
.small-input { width: 180px; margin: 0; padding: 6px 10px; }
.code-input { text-transform: uppercase; letter-spacing: 0.2em; font-family: ui-monospace, Consolas, monospace; font-size: 20px; text-align: center; }
.switch { display: flex; align-items: center; margin: 0; color: var(--ink); font-size: 14px; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Cards and lists */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.controls, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { margin: 12px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; display: block; }
.card.flat { box-shadow: none; border: 1px solid var(--line); padding: 12px; }
.card.link { color: inherit; text-decoration: none; }
.card.link:hover { outline: 2px solid var(--accent-soft); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.cards .card { margin: 0; }
.card.new { display: flex; gap: 12px; text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; }
.card.new small { display: block; margin-top: 2px; }
.row { display: flex; align-items: center; gap: 10px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows a.grow { color: inherit; text-decoration: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.narrow { max-width: 560px; margin: 0 auto; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; font-size: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 10px; }
.notice a { color: inherit; font-weight: 700; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); text-transform: capitalize; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.big { font-size: 26px; display: block; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.feed li small { margin-left: auto; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; background: var(--soft); padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* Modals and toasts */
.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.modal.wide { width: min(720px, calc(100vw - 24px)); }
.modal::backdrop { background: rgb(0 0 0 / 45%); }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.modal-body { padding: 4px 16px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 3000; left: 50%; bottom: calc(var(--bar) + 20px); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #1f2937; color: #fff; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); }


/* Rail extras */
.rail a { position: relative; }
.rail .dot-count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }

/* Browse */
.hero { background: linear-gradient(135deg, #0f766e, #0e7490); color: #fff; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 14px; }
.hero h1 { font-size: 24px; }
.hero p { opacity: 0.9; }
.hero form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero input, .hero select { margin: 0; flex: 1 1 200px; border: 0; }
.hero .btn { background: #fff; color: #0f766e; border-color: #fff; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.biz-card { padding: 0; overflow: hidden; }
.biz-card .cover { height: 96px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 34px; font-weight: 800; background-size: cover; background-position: center; }
.biz-card .body { padding: 12px 14px 14px; }
.biz-card h2 { margin-bottom: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }
.stars small { color: var(--muted); letter-spacing: 0; margin-left: 4px; }

/* Business page */
.biz-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.biz-head .logo { width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 28px; font-weight: 800; }
.service { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.service:last-child { border-bottom: 0; }
.price { font-weight: 700; white-space: nowrap; }
.price small { font-weight: 400; color: var(--muted); }
.hours { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.hours li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.hours li.today { font-weight: 700; }
.review { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .reply { margin: 6px 0 0 12px; padding: 6px 10px; border-left: 3px solid var(--accent-soft); font-size: 14px; }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; font-size: 12px; max-width: 280px; }
.bars .bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--amber); }
.two-col { display: grid; gap: 14px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 340px; align-items: start; } .two-col > aside { position: sticky; top: 24px; } }

/* Booking flow */
.dates { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.date { flex: none; width: 62px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer; }
.date small { display: block; font-size: 11px; color: var(--muted); }
.date strong { display: block; font-size: 18px; }
.date.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.date.on small { color: inherit; }
.date:disabled { opacity: 0.4; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 10px 0; }
.slot { padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.slot small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slot.on small { color: inherit; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; }
.cal .dow { color: var(--muted); font-size: 11px; padding: 4px 0; }
.cal button { aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; padding: 0; }
.cal button small { display: block; font-size: 10px; color: var(--muted); }
.cal button:disabled { background: none; color: var(--muted); opacity: 0.5; cursor: default; text-decoration: line-through; }
.cal button.in { background: var(--accent-soft); }
.cal button.edge { background: var(--accent); color: var(--accent-ink); }
.cal button.edge small { color: inherit; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.runs { list-style: none; padding: 0; margin: 0; }
.runs li { margin-bottom: 6px; }
.runs button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.runs button.on { border-color: var(--accent); background: var(--accent-soft); }
.runs button:disabled { opacity: 0.5; cursor: default; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; }
.summary .total { border-top: 1px solid var(--line); padding-top: 6px; font-weight: 700; font-size: 16px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty input { width: 70px; text-align: center; margin: 0; }

/* Bookings */
.booking-row { display: flex; gap: 12px; align-items: center; }
.when { flex: none; width: 54px; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); padding: 6px 0; }
.when small { display: block; font-size: 11px; text-transform: uppercase; }
.when strong { display: block; font-size: 20px; line-height: 1.1; }
.ticket { text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.ticket .code { font-size: 28px; display: inline-block; padding: 6px 14px; margin: 6px 0; }
/* Check-in QR (always dark on white so any scanner reads it), manual payment, proofs, fee and scanner. */
.ticket .qr { width: 200px; max-width: 70%; margin: 8px auto 0; background: #fff; padding: 6px; border-radius: 10px; }
.ticket .qr svg { display: block; width: 100%; height: auto; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.pay-to { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pay-to dl { flex: 1 1 220px; margin: 0; }
.pay-to figure { margin: 0; text-align: center; }
.pay-to img, .qr-upload img { background: #fff; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; }
.qr-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.qr-upload h3 { flex-basis: 100%; margin: 0; }
.proof-check { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.proof-check h3 { margin-top: 0; }
.fee-table { width: 100%; font-size: 14px; }
.fee-table th { text-align: left; font-weight: 600; padding-right: 10px; vertical-align: top; width: 40%; }
.check-in { flex-wrap: wrap; }
.qr-scan { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; }
.qr-scan video { width: 100%; height: 100%; object-fit: cover; }
.qr-scan .qr-frame { position: absolute; width: min(65vw, 280px); aspect-ratio: 1; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 45%); }
.qr-scan .qr-hint { position: absolute; top: 24px; left: 16px; right: 16px; color: #fff; text-align: center; font-weight: 600; }
.qr-scan .btn { position: absolute; bottom: 32px; }
@media print { .rail, .tabs, .back, .page-head .controls, [data-act="print"], [data-month] { display: none !important; } }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { position: relative; padding: 0 0 12px 20px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--muted); }
.rating-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.rating-input input { display: none; }
.rating-input label { margin: 0; font-size: 32px; line-height: 1; color: var(--line); cursor: pointer; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--amber); }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.stat small { color: var(--muted); display: block; }
.stat strong { font-size: 22px; }
.tabs.scroll { overflow-x: auto; }
.tabs.scroll button { flex: none; padding: 8px 12px; }
.day-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.day-bar input, .day-bar select { width: auto; margin: 0; }
.hours-edit .row { margin-bottom: 6px; flex-wrap: wrap; }
.hours-edit .row > strong { width: 90px; }
.hours-edit input[type=time] { width: 120px; margin: 0; }
.check-in { display: flex; gap: 8px; }
.check-in input { margin: 0; }

/* Demo checkout */
.checkout { max-width: 420px; margin: 40px auto; }
.checkout .amount { font-size: 34px; font-weight: 800; margin: 8px 0; }
.demo-tag { display: inline-block; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }

/* Packages and trips */
details.package { margin-top: 6px; font-size: 14px; }
details.package summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
details.package ol, details.package ul { margin: 6px 0; padding-left: 20px; }
.bad-text { color: var(--bad); }
.notice-card { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.notice-card ul { margin: 0; padding-left: 18px; }
.itinerary { list-style: none; margin: 0; padding: 0; }
.itinerary li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.itinerary li:last-child { border-bottom: 0; }
.itinerary .time { flex: none; width: 70px; color: var(--muted); font-size: 13px; padding-top: 1px; }
.itinerary li.idea { opacity: 0.7; }
.itinerary li.idea strong { font-style: italic; }
.stay { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.trip-public { max-width: 760px; margin: 0 auto; padding: 16px; }
.trip-public header { margin-bottom: 14px; }
@media print {
  .rail, .no-print, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  main#view, #view { padding: 0 !important; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .stats { display: none; }
}

/* Phrasebook */
.phrase-search { margin: 0 0 10px; }
.phrases { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 14px; }
.phrases .card { margin: 0; }
.phrase { display: flex; flex-direction: column; gap: 8px; }
.phrase .native { font-size: 24px; line-height: 1.35; margin-top: 6px; }
.phrase .say { color: var(--accent); font-style: italic; font-size: 14px; }
.phrase-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs.mini { display: inline-flex; margin: 0 0 0 8px; }
.tabs.mini button { padding: 4px 12px; }
.section-title { font-size: 16px; margin: 14px 0 8px; }
.trip-for { margin: 4px 0 6px; }
.fill-slots { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fill-slots select { width: auto; max-width: 100%; }
.replies { border-top: 1px solid var(--line, #ddd); margin-top: 14px; padding-top: 10px; }
.reply-ask { font-size: 20px; font-weight: 700; margin: 0; }
.reply-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 8px 0; }
.reply-grid .reply { font-size: 18px; min-height: 48px; }
.pad-wrap { display: grid; gap: 6px; max-width: 320px; }
.pad-label { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pad-out { flex: 1; min-height: 40px; font-size: 26px; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 2px 10px; text-align: left; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pad .btn { font-size: 20px; min-height: 46px; }
.heard { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft, rgba(0,0,0,.05)); }
.heard p { margin: 2px 0; }
.heard-native { font-size: 22px; }
.voice-row { flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.voice-row select { width: auto; max-width: 60vw; }
.btn.playing { outline: 2px solid var(--accent); }

/* The traveller's journey: home page stages, trip stage strip, journal and story */
.hero-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.section-title { margin: 18px 0 8px; }
.trip-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.trip-row h2 { margin: 0; }
.trip-row p { margin: 2px 0 0; }
.trip-row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: none; max-width: 45%; }
.stages { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 14px; }
.stage { margin: 0; }
.stage-no { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.stage-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 0; }
.stage-links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.stage-links .icon { width: 15px; height: 15px; }
.journey { display: flex; margin-bottom: 8px; list-style: none; padding: 0; gap: 4px; }
.journey li { flex: 1; padding: 7px 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 3px solid var(--line); }
.journey li.done { color: var(--accent); border-color: var(--accent-soft); }
.journey li.on { color: var(--accent); border-color: var(--accent); }
.journey-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trip-tabs { overflow-x: auto; }
.trip-tabs button { white-space: nowrap; }
.moments { display: grid; gap: 10px; margin-top: 10px; }
.moment { border-top: 1px solid var(--line); padding-top: 10px; }
.moment:first-child { border-top: 0; padding-top: 0; }
.moment img { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.moment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.moment-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.story-quote { font-size: 18px; line-height: 1.4; margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--accent); }
.story-stars { color: var(--amber); letter-spacing: 2px; }

/* Traveller modules */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.forecast { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.forecast > div { flex: none; display: flex; flex-direction: column; min-width: 86px; padding: 8px 10px; background: var(--soft); border-radius: 10px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.checks label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 0; margin: 0; font-weight: 400; }
.checks input { width: 20px; height: 20px; margin: 0; flex: none; }
.checks input:checked + span { text-decoration: line-through; color: var(--muted); }
.split { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 8px 12px; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.btn.block { display: flex; width: 100%; margin: 6px 0; }
.btn.sos { background: var(--bad); border-color: var(--bad); color: #fff; min-height: 56px; font-size: 18px; margin-bottom: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.translated { font-size: 22px; line-height: 1.35; margin: 6px 0; overflow-wrap: anywhere; }
.show-big { font-size: clamp(30px, 8vw, 54px); line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input { margin: 0; }
.guide-card img { display: block; width: 100%; height: 170px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.doc-img { max-width: 100%; border-radius: 10px; }
.book-page { background: var(--card); box-shadow: var(--shadow); border-radius: 8px; padding: 24px; margin: 0 auto 16px; max-width: 148mm; min-height: 200mm; }
.book-page img { display: block; width: 100%; max-height: 130mm; object-fit: contain; margin-bottom: 12px; }
.book-cover { display: flex; flex-direction: column; justify-content: center; text-align: center; }
.book-cover h1 { font-size: 30px; }
@media print {
  @page { size: A5; margin: 0; }
  .book-page { box-shadow: none; border-radius: 0; margin: 0; max-width: none; min-height: 100vh; break-after: page; background: #fff; color: #000; }
}

.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }

/* Phrasebook Show: full screen on a phone, made to be read at arm's length by someone else */
.modal.show-phrase { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg); }
.sp { display: flex; flex-direction: column; min-height: 100%; }
.sp-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0f766e; color: #fff; font-weight: 600; position: sticky; top: 0; z-index: 2; }
.sp-icon { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 16%); color: #fff; font-size: 20px; cursor: pointer; }
.sp-hero { flex: 1 0 44dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px 18px 24px; background: linear-gradient(180deg, #0f766e, #0e7490); color: #fff; text-align: center; transition: transform 0.25s; }
.sp-hero.flipped { transform: rotate(180deg); }
.sp-phrase { margin: 0; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.sp-phrase.xl { font-size: clamp(48px, 15vw, 96px); }
.sp-phrase.l { font-size: clamp(36px, 10vw, 68px); }
.sp-phrase.m { font-size: clamp(28px, 7.5vw, 50px); }
.sp-phrase.s { font-size: clamp(22px, 5.6vw, 36px); }
.sp-say { margin: 0; font-size: 19px; font-style: italic; opacity: 0.88; }
.sp-sound { display: flex; gap: 8px; margin-top: 4px; }
.sp-sound-btn { min-height: 44px; padding: 8px 16px; border: 1px solid rgb(255 255 255 / 45%); border-radius: 22px; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sp-meaning { margin: 0; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); text-align: center; }
.sp-meaning small { display: block; color: var(--muted); }
.show-phrase .replies { margin: 0; padding: 14px 16px 20px; border: 0; }
.show-phrase .reply-ask { text-align: center; }
.show-phrase .reply-ask + .small { text-align: center; }
.show-phrase .reply-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.show-phrase .pad-wrap { margin-top: 8px; }
.sp-heard { margin: 14px 16px 20px; padding: 16px; border-radius: var(--radius); background: var(--good-soft); text-align: center; }
.sp-heard small { color: var(--muted); }
.sp-heard .controls { justify-content: center; }
.sp-answer { margin: 4px 0; font-size: 30px; font-weight: 700; line-height: 1.2; }
@media (min-width: 760px) {
  .modal.show-phrase { width: min(720px, 92vw); height: min(860px, 94dvh); margin: auto; border-radius: var(--radius); overflow: auto; }
  .sp-hero { flex-basis: 340px; }
}
