/* ════ Readable layer: dates, travel, weather ═══════════════════════════════
   Anything you need to read sits on solid paper with dark ink, whatever the painting behind it. */
.paper { --ink: #2A160B; --ink-soft: #6B4A35; --rule: rgba(42, 22, 11, .16);
  background: #FBF3E1; color: var(--ink); text-align: left; text-shadow: none; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(40, 18, 6, .15), 0 20px 50px -24px rgba(40, 18, 6, .5); }
.card-k { margin: 0 0 .7rem; font: 600 .74rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.card-title { margin: 0 0 1.6rem; font: 800 clamp(1.7rem, 3vw, 2.4rem)/1.1 var(--serif); font-variation-settings: "SOFT" 100; }

/* ── First screen: start date + itinerary ── */
.opening .giant { font-size: clamp(2.4rem, 6.4vw, 5.4rem); }
.start-form { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .6rem 1rem; text-shadow: none; }
.sf-field { display: inline-flex; align-items: center; gap: .6rem; background: #FBF3E1; color: #2A160B; border-radius: 999px;
  padding: .45rem .55rem .45rem 1rem; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .5); cursor: pointer; }
.sf-field .ico { width: 20px; height: 20px; color: #B5452A; }
.sf-k { font: 600 .74rem var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.sf-field input { font: 700 1.05rem var(--sans); color: #2A160B; background: #F1E3C4; border: 0; border-radius: 999px;
  padding: .4rem .8rem; cursor: pointer; }
.sf-field input:focus-visible { outline: 2px solid #B5452A; outline-offset: 2px; }
.sf-end { font: 600 .82rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #FBEBC8;
  background: rgba(36, 17, 6, .55); padding: .5rem .9rem; border-radius: 999px; }

.itinerary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1120px, 100%); backdrop-filter: none; border: 0; }
.it-col { padding: 1.1rem 1.4rem 1rem; }
.it-col + .it-col { border-left: 1px solid var(--rule); }
.it-country { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem .5rem; margin: 0 0 .5rem; padding-bottom: .55rem;
  border-bottom: 3px solid var(--c); opacity: 1; }
.it-cname { font: 800 1.2rem var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: 0; text-transform: none; }
.it-cdates { font: 600 .72rem var(--sans); letter-spacing: .06em; color: var(--ink-soft); white-space: nowrap; }
.it-stops a { grid-template-columns: 1fr auto; grid-template-areas: "name days" "dates langs"; gap: .15rem .5rem; padding: .55rem 0;
  border-bottom: 1px solid var(--rule); }
.it-stops a:hover { opacity: 1; background: #F3E5C7; padding-left: 0; }
.it-name { grid-area: name; font-size: 1.15rem; }
.it-days { grid-area: days; font: 700 .74rem var(--sans); letter-spacing: .04em; color: var(--ink); opacity: 1; }
.it-dates { grid-area: dates; font: 500 .82rem var(--sans); color: var(--ink-soft); }

/* ── Travel overview ── */
#travel { padding-bottom: 4vh; }
.travel-card { width: min(1100px, 100%); margin: 0 auto; padding: clamp(1.4rem, 3vw, 2.6rem); }
.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.8rem; }
.ap-card { padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: 4px; background: #F6EBD3; }
.ap { margin: 0; font: 500 1.05rem/1.35 var(--serif); }
.ap strong { font: 800 1.6rem var(--sans); letter-spacing: .04em; }
.ap-city { margin: .2rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.ap-date { margin: .5rem 0 0; font: 700 1rem var(--sans); }
.flights { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.flights li { display: grid; grid-template-columns: 4.5rem 6.5rem 1fr auto; grid-template-areas: "day date route time" ". . how how";
  gap: .1rem 1rem; padding: .8rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.fl-day { grid-area: day; font: 700 .9rem var(--sans); }
.fl-date { grid-area: date; font: 500 .9rem var(--sans); color: var(--ink-soft); }
.fl-route { grid-area: route; font: 700 1.15rem var(--sans); letter-spacing: .02em; }
.flights .leg-how { grid-area: how; }
.flights .leg-time { grid-area: time; }
/* every icon is small unless a component sizes it */
.ico { display: inline-block; width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.trains { display: flex; gap: .7rem; align-items: center; margin: .4rem 0 0; padding: .75rem 1rem; background: #F6EBD3;
  border-left: 4px solid #8A6A4A; border-radius: 4px; font: italic 500 1rem/1.4 var(--serif); }
.trains .ico { width: 22px; height: 22px; color: #8A6A4A; }

/* ── Travel legs (shared) ── */
.legs { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.leg { display: grid; grid-template-columns: 6.6rem 1fr auto; gap: .8rem; align-items: start; padding: .55rem .7rem;
  background: #F4E7CB; border-radius: 4px; border-left: 4px solid #8A6A4A; }
.leg-flight { border-left-color: #24508A; }
.leg-boat { border-left-color: #2A8C95; }
.leg-tag { display: inline-flex; align-items: center; gap: .4rem; font: 700 .76rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.leg-tag .ico { width: 18px; height: 18px; }
.leg-what { display: flex; flex-direction: column; gap: .1rem; }
.leg-what strong { font: 700 1rem/1.3 var(--sans); }
.leg-how { font: 400 .95rem/1.4 var(--serif); color: var(--ink-soft); }
.leg-time { font: 700 .86rem var(--sans); white-space: nowrap; }

/* ── Day by day table ── */
.days-card { width: min(1100px, 100%); margin: 0 auto; padding: .5rem clamp(.8rem, 2vw, 1.8rem) 1rem; }
.days-table { width: 100%; border-collapse: collapse; }
.days-table th { text-align: left; font: 600 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft);
  padding: 1rem .8rem .7rem; border-bottom: 2px solid var(--ink); }
.days-table td { padding: 1rem .8rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
.days-table td:first-child { width: 8.5rem; }
.days-table td:nth-child(2) { width: 13rem; }
.d-n { display: block; font: 800 1.15rem var(--sans); }
.d-date { display: block; font: 500 .95rem var(--sans); color: var(--ink-soft); }
.d-country { display: inline-block; margin-bottom: .3rem; padding: .15rem .55rem; border-radius: 3px; background: var(--c);
  font: 700 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #2A160B; }
.d-stop { display: block; font: 700 1.1rem var(--serif); text-decoration: none; }
.d-stop:hover { text-decoration: underline; }
.d-plan { margin: 0; font: 500 1.1rem/1.4 var(--serif); }
.days-table tr.here { background: #F6EBD3; }

/* ── Country intro + weather ── */
.part { min-height: 0; padding: 16vh 16px 8vh; }
.part-dates { margin: 1rem 0 2.4rem; font-style: normal; font-weight: 600; }
.weather { width: min(1000px, 100%); margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.2rem); display: grid;
  grid-template-columns: 1.2fr 1fr; gap: 1.4rem 2.4rem; }
.w-months { display: grid; gap: .8rem; }
.w-month-card { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "m m" "hi rain" "word word"; gap: .4rem 1rem;
  padding: 1rem 1.1rem; background: #F6EBD3; border-radius: 4px; }
.w-month { grid-area: m; font: 800 1.2rem var(--serif); }
.w-stat { display: flex; flex-direction: column; }
.w-stat:nth-of-type(1) { grid-area: hi; }
.w-stat:nth-of-type(2) { grid-area: rain; }
.w-big { font: 800 1.9rem/1 var(--sans); }
.w-k { font: 500 .8rem var(--sans); color: var(--ink-soft); }
.w-word { grid-area: word; font: 600 .95rem var(--sans); }
.w-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 150px; align-items: end; }
.w-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.w-bar { width: 100%; background: #D9C7A6; border-radius: 2px 2px 0 0; }
.w-col.on .w-bar { background: #2A160B; }
.w-l { font: 600 .7rem var(--sans); color: var(--ink-soft); }
.w-col.on .w-l { color: var(--ink); }
.w-legend { margin: .6rem 0 0; font: 500 .8rem var(--sans); color: var(--ink-soft); }
.w-note { grid-column: 1 / -1; margin: 0; font: 400 1.08rem/1.5 var(--serif); }
.w-src { grid-column: 1 / -1; margin: 0; font: 500 .74rem var(--sans); color: var(--ink-soft); }

/* ── Under each postcard ── */
.stop .title .kicker { font-size: .86rem; letter-spacing: .2em; }
.next-card { width: min(760px, 92vw); margin: 2.4rem auto 0; padding: 1.1rem 1.3rem 1.2rem; }

/* ── Always-visible "you are here" bar ── */
#nowbar { position: fixed; z-index: 70; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center;
  gap: 0; max-width: calc(100vw - 20px); padding: 0; overflow: hidden; border-radius: 10px; background: #2A160B; color: #FBEBC8;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); font-family: var(--sans); white-space: nowrap; }
#nowbar > span:not(.nb-progress) { padding: .7rem 1rem; }
#nowbar > span + span:not(.nb-progress) { border-left: 1px solid rgba(251, 235, 200, .18); }
.nb-day { font: 800 1rem var(--sans); background: #FBEBC8; color: #2A160B; }
.nb-date { font: 600 .95rem var(--sans); }
.nb-country { font: 700 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #F2B66A; }
.nb-stop { font: 700 1rem var(--serif); overflow: hidden; text-overflow: ellipsis; }
.nb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(251, 235, 200, .15); }
.nb-fill { display: block; height: 100%; width: 0; background: #F2B66A; transition: width .4s ease; }
.foot { padding-bottom: 18vh; }

@media (max-width: 860px) {
  .itinerary { grid-template-columns: 1fr; }
  .it-col + .it-col { border-left: 0; border-top: 1px solid var(--rule); }
  .weather { grid-template-columns: 1fr; }
  .ap-row { grid-template-columns: 1fr; }
  .flights li { grid-template-columns: 4rem 1fr auto; grid-template-areas: "day route time" "date how how"; }
  .days-table thead { display: none; }
  .days-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  .days-table td { border: 0; padding: .2rem .4rem; width: auto !important; }
  .days-table td:nth-child(3) { grid-column: 1 / -1; padding-top: .5rem; }
  .leg { grid-template-columns: 1fr auto; }
  .leg-what { grid-column: 1 / -1; grid-row: 2; }
  #nowbar { bottom: 10px; }
  #nowbar { left: 10px; right: 10px; transform: none; max-width: none; }
  #nowbar > span:not(.nb-progress) { padding: .6rem .6rem; }
  .nb-stop { flex: 1; min-width: 0; }
  .nb-country { display: none; }
  .nb-date { font-size: .85rem; }
  .nb-day { font-size: .9rem; }
}

/* ════ Top bar click-throughs ════════════════════════════════════════════ */
.bar .r { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.bar-links { display: flex; gap: 1.2rem; margin-right: .6rem; }
.bar-link { font: 600 .72rem var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; opacity: .85; }
.bar-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.bar-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px; cursor: pointer;
  background: var(--fg); color: var(--bg); border: 0; font: 700 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.bar-btn:hover { filter: brightness(1.15); }
.bar-btn .ico { width: 16px; height: 16px; }
.burger, .burger::before, .burger::after { display: block; width: 14px; height: 2px; background: currentColor; border-radius: 1px; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }

/* ── Menu panel ── */
.menu { position: fixed; z-index: 90; top: 64px; left: 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 150px); overflow: auto; padding: 1.4rem 1.6rem 1.2rem; }
.menu[hidden] { display: none; }
.menu-grid { display: grid; grid-template-columns: .8fr 1fr 1fr 1fr; gap: 1.6rem; }
.menu a { color: inherit; text-decoration: none; }
.menu-sections, .menu-stops { list-style: none; padding: 0; margin: 0; }
.menu-sections a { display: block; padding: .45rem 0; border-bottom: 1px solid var(--rule); font: 700 1.02rem var(--serif); }
.menu-sections a:hover, .menu-stops a:hover { background: #F3E5C7; }
.menu-country { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-bottom: .5rem;
  margin-bottom: .2rem; border-bottom: 3px solid var(--c); }
.mc-name { font: 800 1.15rem var(--serif); }
.mc-dates { font: 600 .7rem var(--sans); color: var(--ink-soft); white-space: nowrap; }
.menu-stops a { display: flex; flex-direction: column; padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.ms-name { font: 700 1rem var(--serif); }
.ms-when { font: 500 .8rem var(--sans); color: var(--ink-soft); }
.menu-close { display: block; margin: 1rem 0 0 auto; padding: .5rem .9rem; border: 1.5px solid var(--ink); border-radius: 999px;
  background: none; color: var(--ink); font: 700 .72rem var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
#nowbar { cursor: pointer; }
#nowbar:hover { filter: brightness(1.2); }

/* ════ Map ═══════════════════════════════════════════════════════════════ */
#map { padding-top: 4vh; padding-bottom: 4vh; }
.map-card { width: min(1100px, 100%); margin: 0 auto; padding: clamp(1.2rem, 2.6vw, 2rem); }
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.map-head .card-title { margin-bottom: 1rem; }
.map-expand { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; padding: .55rem .9rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: none; color: var(--ink); font: 700 .72rem var(--sans); letter-spacing: .16em;
  text-transform: uppercase; cursor: pointer; }
.map-expand:hover { background: var(--ink); color: #FBF3E1; }
.map-expand .ico { width: 16px; height: 16px; }
.trip-map { width: 100%; height: min(62vh, 560px); border-radius: 4px; background: #E9DFC9; }
.map-slot .trip-map { height: 100%; border-radius: 6px; }
/* the map is printed in the site's inks (the #map-print filter in main.py) on cream paper */
.trip-map.leaflet-container { background: #F3E6C8; font-family: var(--sans); }
.trip-map .leaflet-tile-pane { filter: url(#map-print); }
.trip-map .leaflet-bar { border: 1.5px solid rgba(42, 22, 11, .35); box-shadow: none; }
.trip-map .leaflet-bar a { background: #FBF3E1; color: #2A160B; border-bottom-color: rgba(42, 22, 11, .25); }
.trip-map .leaflet-bar a:hover { background: #2A160B; color: #FBF3E1; }
.trip-map .leaflet-control-attribution { background: rgba(251, 243, 225, .8); color: rgba(42, 22, 11, .7); }
.trip-map .leaflet-control-attribution a { color: #A63C1D; }
.map-key { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: .9rem; font: 600 .78rem var(--sans); color: var(--ink-soft); }
.map-key > span { display: inline-flex; align-items: center; gap: .45rem; }
.key-line { width: 26px; height: 0; border-top: 3px solid #2A160B; }
.key-line.boat { border-top: 3px dotted #1F7F8C; }
.key-line.flight { border-top: 3px dashed #24508A; }
.key-dot { width: 10px; height: 10px; border-radius: 50%; background: #24508A; }

.stop-pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #2A160B;
  border: 3px solid #FBF3E1; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); font: 800 14px var(--sans); transition: transform .25s; }
.stop-pin.here { transform: scale(1.35); background: #2A160B; color: #FBF3E1; border-color: var(--c); }
.ap-pin { display: inline-block; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  background: #24508A; color: #fff; font: 700 11px var(--sans); letter-spacing: .06em; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.leaflet-popup-content-wrapper { background: #FBF3E1; color: #2A160B; border-radius: 6px; }
.leaflet-popup-tip { background: #FBF3E1; }
.pop p { margin: 0; }
.pop-k { font: 700 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #6B4A35; }
.pop-name { font: 800 1.2rem var(--serif); margin: .15rem 0 !important; }
.pop-dates { font: 500 .85rem var(--sans); }
.pop-go { display: inline-block; margin-top: .5rem; font: 700 .78rem var(--sans); color: #B5452A !important; }

/* ── Full-screen overlay ── */
#map-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(36, 17, 6, .72); padding: 70px 16px 16px;
  backdrop-filter: blur(3px); }
#map-overlay[hidden] { display: none; }
.map-overlay-inner { position: relative; height: 100%; max-width: 1400px; margin: 0 auto; }
.map-slot { height: 100%; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.map-close { position: absolute; z-index: 1000; top: 12px; right: 12px; padding: .6rem 1rem; border-radius: 999px; border: 0;
  background: #2A160B; color: #FBEBC8; font: 700 .76rem var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }

@media (max-width: 1100px) {
  .bar-links { display: none; }
}
@media (max-width: 860px) {
  .menu-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .bar .l a { font-size: .66rem; }
  .bar-btn span:not(.burger) { display: none; }
  .bar-btn { padding: .55rem .65rem; }
  .bar-btn .burger { display: block; }
  .trip-map { height: 60vh; }
}

/* ── Home airport ── */
.sf-home input { width: 9.5rem; text-transform: uppercase; letter-spacing: .06em; }
.sf-home input::placeholder { text-transform: none; letter-spacing: 0; color: #8A6A52; }
.sf-home .ico { color: #24508A; }
.sf-home-name { flex-basis: 100%; text-align: center; font: 600 .82rem var(--sans); color: #FBEBC8; text-shadow: none; }
.opening .sf-home-name { color: #2A160B; }
.sf-home-name.bad { color: #A63C1D; }
.ap-home { margin: .7rem 0 0; padding-top: .6rem; border-top: 1px dashed var(--rule); font: 500 .95rem var(--sans); }
.ap-home strong { font-weight: 800; }
a.ap-home-empty { display: block; color: #A63C1D; text-decoration: underline; text-underline-offset: 3px; }
.est-note { margin-top: .8rem; }
.home-pin { background: #A63C1D; }

/* ════ Trip sheet: costs + packing on one screenshot-sized card ════ */
#sheet { padding-top: 10vh; padding-bottom: 14vh; }
.trip-sheet { width: min(1120px, 100%); margin: 0 auto; padding: clamp(1.2rem, 2.4vw, 2rem); }
.ts-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--ink); }
.ts-head .card-title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.ts-meta { text-align: right; }
.ts-when { margin: 0; font: 800 1.1rem var(--sans); }
.ts-sub { display: block; margin: 0; font: 500 .78rem/1.35 var(--sans); color: var(--ink-soft); }
.ts-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ts-table th, .ts-table td { padding: .55rem .6rem; text-align: right; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ts-table th:first-child { text-align: left; }
.ts-table thead th { font: 700 .95rem var(--sans); border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.ts-table thead .ts-sub { font-weight: 500; }
.ts-table tbody th { font: 600 .95rem var(--sans); }
.ts-table tbody th .d-country { margin-bottom: .2rem; }
.ts-table td { font: 700 1.02rem var(--sans); }
.ts-rate { display: block; font: 500 .74rem var(--sans); color: var(--ink-soft); }
.ts-num { width: 3.5rem; }
.ts-total th, .ts-total td { font: 800 1.15rem var(--sans); border-top: 2px solid var(--ink); border-bottom: 0; padding-top: .7rem; }
.ts-perday th, .ts-perday td { font: 500 .88rem var(--sans); color: var(--ink-soft); border-bottom: 0; padding-top: 0; }
.ts-costs .w-src { margin-top: .8rem; }
.ts-pack-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2rem; margin-bottom: .8rem; }
.ts-pack { list-style: none; padding: 0; margin: 0; }
.ts-pack li { padding: .48rem 0; border-bottom: 1px solid var(--rule);
  font: 500 1rem var(--serif); }
.ts-pack label { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.ts-box { appearance: none; flex: none; width: 17px; height: 17px; margin: 0; padding: 0;
  border: 1.5px solid var(--ink); border-radius: 2px; background: transparent; cursor: pointer; }
.ts-box:checked { background: var(--ink); }
.ts-box:checked::after { content: "✓"; display: block; color: #FBF3E1; text-align: center; font: 700 14px/14px var(--sans); }
.ts-box:checked + span { text-decoration: line-through; opacity: .65; }
.ts-box:focus-visible { outline: 2px solid #A63C1D; outline-offset: 3px; }

@media (max-width: 860px) {
  .ts-pack-cols { grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
  .ts-meta { text-align: left; }
  .ts-table th, .ts-table td { padding: .45rem .3rem; }
  .ts-table thead .ts-sub, .ts-rate { display: none; }
  .ts-table td { font-size: .9rem; }
  .ts-table tbody .ts-sub, .ts-num { display: none; }
  .ts-table thead th { font-size: .78rem; }
  .ts-table tbody th { font-size: .82rem; }
  .ts-table .d-country { white-space: nowrap; font-size: .62rem; }
  .ts-total th, .ts-total td { font-size: .98rem; }
}

/* ── Trip sheet tabs ── */
.ts-head { margin-bottom: 0; }
.ts-tabs { display: flex; gap: 4px; margin: 1rem 0 1.2rem; border-bottom: 2px solid var(--ink); }
.ts-tab { position: relative; bottom: -2px; padding: .6rem 1.1rem; border: 2px solid transparent; border-bottom: 0;
  border-radius: 6px 6px 0 0; background: none; color: var(--ink-soft); cursor: pointer;
  font: 400 .95rem var(--dot); letter-spacing: .08em; text-transform: uppercase; }
.ts-tab:hover { color: var(--ink); background: #F3E5C7; }
.ts-tab[aria-selected="true"] { color: var(--ink); background: #FBF3E1; border-color: var(--ink); border-bottom: 2px solid #FBF3E1; }
.ts-tab:focus-visible { outline: 2px solid #A63C1D; outline-offset: 2px; }
/* The paper fits the active panel; its wrapper reserves the tallest tab's space. */
.trip-sheet-space { width: min(1120px, 100%); margin: 0 auto; }
.ts-panels { display: grid; }
.ts-panel { grid-area: 1 / 1; min-width: 0; align-self: start; outline: none; }
.ts-panel[hidden] { display: none; }
.ts-measuring .ts-panel[hidden] { display: block; visibility: hidden; pointer-events: none; }
.ts-head { border-bottom: 0; padding-bottom: 0; }

/* Cream paper controls and travel details, matching the postcards. */
.stop-codes { flex-wrap: wrap; }
.tripadvisor-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.tripadvisor-link { display: inline-flex; align-items: center; gap: .4rem; padding: 2px;
  border-radius: 50%; color: inherit; text-decoration: none; }
.tripadvisor-link img { display: block; width: 28px; height: 28px; object-fit: contain; }
.tripadvisor-link:hover { background: #ffffff33; }
.tripadvisor-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.ta-place { font: 600 .65rem var(--sans); }
.start-form { position: relative; }
.airport-list, .date-calendar, .travel-tooltip { background: #F6E3B4; color: #2A160B; border: 1px solid #9B7046; border-radius: 10px;
  box-shadow: 0 8px 24px #2a160b40; text-shadow: none; text-align: left; }
.airport-list { position: absolute; z-index: 30; width: min(340px, 100%); max-height: 300px; overflow-y: auto; padding: 6px; }
.airport-list button { display: grid; grid-template-columns: 3rem 1fr; gap: 3px 8px; width: 100%; padding: 10px; border: 0; border-bottom: 1px dashed #9b704655;
  background: transparent; color: inherit; text-align: left; cursor: pointer; font: 500 .85rem var(--sans); }
.airport-list strong { grid-row: span 2; font-family: var(--dot); }
.airport-list small { grid-column: 2; opacity: .75; }
.airport-list button:hover, .airport-list button:focus-visible { background: #D8A22E55; outline: 2px solid #A63C1D; outline-offset: -2px; }
.airport-empty { padding: 10px; font: .85rem var(--sans); }
.custom-date-input { display: none !important; }
.date-trigger { border: 0; border-radius: 20px; padding: 4px 12px; color: #2A160B; background: #d8a22e25; font: 600 1rem var(--sans); cursor: pointer; }
.date-calendar { position: fixed; z-index: 110; width: min(320px, calc(100vw - 16px)); padding: 14px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font: 700 1rem var(--serif); }
.date-calendar button { border: 0; border-radius: 5px; background: transparent; color: inherit; cursor: pointer; min-height: 34px; font: 500 .85rem var(--sans); }
.calendar-head button { width: 36px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.calendar-grid > span { font: .75rem var(--dot); opacity: .65; }
.date-calendar button:hover, .date-calendar button:focus-visible { background: #D8A22E70; outline: 2px solid #A63C1D; }
.date-calendar .selected { background: #A63C1D; color: #F6E3B4; }
.travel-tooltip { position: fixed; z-index: 120; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 12px 15px;
  font: 500 .9rem/1.45 var(--sans); pointer-events: none; }
.dt-leg:focus-visible { outline: 2px solid #A63C1D; outline-offset: 3px; border-radius: 3px; }
