/* Shared style for all tour notes: screen (phone / PC) and print (A4 PDF) */
:root { --ink:#1d1d1f; --muted:#5f6368; --line:#d9dce0; --accent:#c8281e; --day:#0b3fc4; --soft:#f5f6f8; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body { margin:0; color:var(--ink); background:#fff; font:16px/1.65 Verdana, "Segoe UI", Arial, sans-serif; }
main, .masthead { max-width:820px; margin:0 auto; padding:0 20px; }
img { max-width:100%; height:auto; display:block; }
figure { margin:0; }
figcaption { color:var(--muted); font-size:.8rem; margin-top:4px; }
a { color:var(--day); }

.masthead { text-align:center; padding-top:20px; padding-bottom:14px; }
.logo { width:110px; margin:0 auto 8px; }
h1 { font-size:1.5rem; margin:0 0 12px; }
.print-btn { display:inline-block; text-decoration:none; font:inherit; font-size:.85rem; padding:7px 16px; border:1px solid var(--line); border-radius:20px; background:#fff; color:var(--ink); cursor:pointer; }

.toc { position:sticky; top:0; z-index:10; display:flex; gap:6px; overflow-x:auto; justify-content:safe center; padding:8px 12px; background:#fff; border-block:1px solid var(--line); scrollbar-width:none; }
.toc a { flex:none; padding:5px 12px; border-radius:16px; background:var(--soft); color:var(--ink); text-decoration:none; font-size:.85rem; }
.toc a.back { background:#fff; border:1px solid var(--ink); font-weight:bold; }

section, .day { scroll-margin-top:56px; }
h2 { font-size:1.2rem; margin:36px 0 12px; padding-bottom:6px; border-bottom:2px solid var(--ink); }
h3 { font-size:1.08rem; color:var(--day); margin:0 0 8px; line-height:1.4; }
p { margin:0 0 .8em; }
ul { padding-left:1.3em; }
li { margin-bottom:.35em; }

table { width:100%; border-collapse:collapse; }
caption { font-weight:bold; padding:6px; }
th, td { border:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top; font-size:.9rem; }
.itinerary th { white-space:nowrap; }
.legend { font-size:.85rem; margin-top:8px; }

.price-card { border:1px solid var(--line); border-radius:10px; padding:14px 18px; background:var(--soft); }
.price { font-size:1.7rem; font-weight:bold; color:var(--accent); margin:0; }

.gear { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:8px 0; align-items:start; }
.gear img { height:90px; width:100%; object-fit:contain; }
.gear.bikes { grid-template-columns:repeat(3,1fr); }
.gear figcaption { text-align:center; }
.van { max-width:380px; margin-top:8px; }

.climate { table-layout:fixed; }
.climate th, .climate td { text-align:center; padding:4px 1px; font-size:.8rem; }
.climate th:first-child { width:5.2em; }
.climate abbr { text-decoration:none; }
.climate .on { background:#fff27a; }

.day { margin-bottom:36px; }
.day-no { display:inline-block; background:var(--day); color:#fff; border-radius:4px; padding:0 8px; margin-right:4px; font-size:.9rem; }
.facts { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.facts div { background:var(--soft); border-radius:8px; padding:8px 12px; }
.facts .wide { grid-column:1/-1; }
.facts dt { font-size:.75rem; color:var(--muted); }
.facts dd { margin:0; font-weight:bold; font-size:.95rem; }

/* photos: one justified row on PC and print */
.photos { display:flex; gap:8px; margin:10px 0; align-items:flex-start; }
.photos figure { flex:var(--r) 1 0; min-width:0; max-width:calc(var(--r) * 220px); }
.photos img { width:100%; }
.profile { margin-top:10px; }
.profile img { width:100%; }

@media screen and (max-width:600px) {
  main, .masthead { padding-inline:14px; }
  h1 { font-size:1.3rem; }
  .toc { justify-content:flex-start; }
  /* itinerary table becomes one card per day */
  .itinerary, .itinerary tbody, .itinerary caption { display:block; }
  .itinerary tr { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; border:1px solid var(--line); border-radius:8px; padding:9px 12px; margin-bottom:8px; }
  .itinerary th, .itinerary td { border:0; padding:0; }
  .itinerary th { width:100%; }
  .itinerary .plan { width:100%; }
  .itinerary .stay, .itinerary .room, .itinerary .meal { background:var(--soft); border-radius:4px; padding:1px 8px; font-size:.78rem; }
  .itinerary td:empty { display:none; }
  .itinerary .meal::before { content:"Meals: "; }
  .gear, .gear.bikes { grid-template-columns:1fr 1fr; }
  .climate th, .climate td { font-size:.68rem; letter-spacing:-.02em; }
  .climate tr:first-child th { font-size:.6rem; }
  .climate th:first-child { width:4.8em; }
  .photos { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  .photos figure { max-width:none; }
  .photos img { aspect-ratio:4/3; object-fit:cover; }
  .photos figure:only-child, .photos figure:last-child:nth-child(odd) { grid-column:1/-1; }
  .profile { margin-inline:-8px; }
  .profile figcaption { padding-inline:8px; }
}

@page { size:A4; margin:16mm 15mm; }
@media print {
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  body { font-size:10.5pt; line-height:1.55; }
  main, .masthead { max-width:none; padding:0; }
  .toc, .print-btn, .screen-only { display:none; }
  a { color:inherit; text-decoration:none; }
  h1 { border-block:2px solid var(--ink); padding:10px; }
  h2 { margin-top:20px; }
  h2, h3 { break-after:avoid; }
  figure, tr, li, .facts, .price-card, .gear, .photos, table { break-inside:avoid; }
  li:has(.gear) { break-inside:auto; }
  .map img { max-height:120mm; width:auto; margin:0 auto; }
  .page-break { break-before:page; }
  .day { margin-bottom:18px; }
  h2 { margin-top:16px; }
  .van { max-width:62mm; }
  .profile img { width:92%; margin:0 auto; }
  .photos figure { max-width:calc(var(--r) * 150px); }
}
