:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #646a76;
  --line: #e3e6ee;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f2;
  --warn: #9a5b00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --text: #e8eaf0;
    --muted: #9aa1ae;
    --line: #2a2f3a;
    --accent: #2dd4bf;
    --accent-ink: #062b27;
    --accent-soft: #11302d;
    --warn: #f0b35a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }

.top {
  max-width: 1100px; margin: 0 auto; padding: 20px 16px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand small { display: block; color: var(--muted); }
.logo {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-size: 20px;
}
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.tabs { max-width: 1100px; margin: 8px auto 16px; padding: 0 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-weight: 600; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
h2 { margin: 0 0 12px; font-size: 20px; }
h3 { margin: 0; font-size: 17px; }
h4 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.muted { color: var(--muted); }

.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.grid .wide { grid-column: span 2; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

fieldset.chips { border: 0; padding: 0; margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.chips legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
fieldset.chips label {
  flex-direction: row; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--text); font-weight: 500;
}
fieldset.chips input { width: auto; accent-color: var(--accent); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
button, .button {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 9px 16px; border-radius: 10px;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button:disabled { opacity: .6; cursor: progress; }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-align: left; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.result-head p { margin: 0; font-weight: 600; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.suggestion header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.facts { display: grid; gap: 6px; margin: 12px 0; }
.facts div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; }
.highlights { margin: 0; padding-left: 18px; }
.costs { width: 100%; border-collapse: collapse; margin-top: 6px; }
.costs td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.costs td:last-child { text-align: right; }
.caveat { font-size: 13px; color: var(--warn); }

.plan .day { border-top: 1px solid var(--line); padding: 16px 0; }
.day header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.day .num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.slots { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.slots li { display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
.slots span { color: var(--muted); font-size: 13px; font-weight: 600; padding-top: 1px; }
.slots p, .extra { margin: 0; }
.extra { margin-top: 4px; }
.packing { list-style: none; padding: 0; columns: 2; }
.packing li { padding: 3px 0; }
.packing input { width: auto; accent-color: var(--accent); }

.trips { list-style: none; padding: 0; margin: 0; }
.trips li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.trips li .link { flex: 1; min-width: 200px; }

#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px);
}

@media (max-width: 560px) {
  .grid .wide { grid-column: auto; }
  .slots li, .facts div { grid-template-columns: 1fr; gap: 0; }
  .packing { columns: 1; }
}
@media print {
  .top, .tabs, form, .actions, #toast, #tab-trips .card, .legal-footer, .notice-bar { display: none !important; }
  .panel[hidden] { display: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 0; }
  .day { break-inside: avoid; }
  .plan-table { font-size: 10px; }
  .plan-table th { background: #eee !important; }
  @page { margin: 14mm; }
}

.hint { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.help { margin: 0 0 12px; padding: 8px 12px; background: var(--accent-soft); border-radius: 10px; font-size: 14px; }
.help summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.help ol { margin: 8px 0 4px; padding-left: 20px; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
button.idea { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
button.idea:hover { border-color: var(--accent); color: var(--accent); }

.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; z-index: 5; margin-top: 4px; min-width: 260px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.menu-body .google { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.table-box { overflow-x: auto; margin-top: 12px; }
.plan-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.plan-table th, .plan-table td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; }
.plan-table th { background: var(--accent-soft); white-space: nowrap; }
@media (max-width: 640px) {
  .plan-table thead { display: none; }
  .plan-table tr { display: block; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; }
  .plan-table td { display: block; border: 0; border-bottom: 1px solid var(--line); }
  .plan-table td::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); }
}

.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.who .muted { color: var(--muted); font-size: 13px; }

/* M-bM-^TM-^@M-bM-^TM-^@ Language switch M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@ */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button { border: 0; border-radius: 0; padding: 6px 12px; font-size: 13px; font-weight: 700; background: transparent; color: var(--muted); min-height: 32px; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.top .lang-switch { margin-left: auto; }

/* M-bM-^TM-^@M-bM-^TM-^@ Phones and tablets M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@ */
html { -webkit-text-size-adjust: 100%; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
img, svg { max-width: 100%; }

/* 16px inputs: iOS zooms the page on focus for anything smaller. */
input, select, textarea { font-size: 16px; }

/* Fingers, not mice: comfortable targets. */
@media (pointer: coarse) {
  button, .button, .tabs button, .menu > summary, input, select { min-height: 44px; }
  button.link, button.idea { min-height: 40px; }
  fieldset.chips label { min-height: 40px; padding: 8px 14px; }
  .packing li { padding: 8px 0; }
  .trips li { padding: 12px 0; }
}

/* Tablet */
@media (max-width: 1024px) {
  main, .top, .tabs { max-width: 100%; }
  .suggestions { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* Large phone and small tablet portrait */
@media (max-width: 760px) {
  .top { flex-wrap: wrap; padding-top: calc(12px + env(safe-area-inset-top)); }
  .who { width: 100%; justify-content: space-between; }
  .brand small { display: none; }
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    position: sticky; top: 0; z-index: 4; background: var(--bg); padding-top: 8px; padding-bottom: 8px; margin-top: 0;
  }
  .tabs button { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
  .card { padding: 16px; border-radius: 12px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .wide { grid-column: 1 / -1; }
  .actions > button, .actions > .button, .actions > .menu { flex: 1 1 auto; }
  .actions .menu > summary { text-align: center; }
  .menu-body { position: static; box-shadow: none; margin-top: 8px; min-width: 0; width: 100%; }
  .menu { display: block; width: 100%; }
  .packing { columns: 1; }
  .result-head { align-items: flex-start; }
  #toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .notice-bar { padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
}

/* Small phones */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .slots li, .facts div { grid-template-columns: 1fr; gap: 0; }
  .signin { padding: 16px; }
  h2 { font-size: 18px; }
  .suggestion header { flex-direction: column; gap: 2px; }
  .trips li .link { min-width: 100%; }
  .legal { padding-left: 16px; padding-right: 16px; }
}

/* Wide tablets in landscape keep two columns for the forms */
@media (min-width: 761px) and (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid .wide { grid-column: span 3; }
}

.top { flex-wrap: wrap; }
.top .who { flex: 1 1 auto; }
.top .lang-switch { flex: 0 0 auto; }

.progress { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.progress::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .progress::before { animation: none; } }
