*{box-sizing:border-box}
:root{--ink:#253c33;--muted:#5e7166;--line:#d6e1d1;--bg:#f3f6ef;--card:#fff;--brand:#28594a;--brand-2:#e7eee2;--accent:#b97528}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
a{color:var(--brand)}
.wrap{max-width:1140px;margin:0 auto;padding:0 20px}
.small{font-size:.86rem}.muted{color:var(--muted)}
code{background:var(--brand-2);padding:1px 5px;border-radius:5px;font-size:.9em}

.topbar{background:var(--brand);color:#fff}
.topbar-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px}
.brand{color:#fff;text-decoration:none;font-weight:800;letter-spacing:.3px}
.brand-mark{color:#f3c66b}
.topnav{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-size:.92rem}
.topnav a,.link-btn{color:#e7f1ea;text-decoration:none}
.topnav a:hover,.link-btn:hover{color:#fff;text-decoration:underline}
.link-btn{background:none;border:0;font:inherit;cursor:pointer;padding:0}
.who{opacity:.8;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.hero{background:linear-gradient(135deg,#1f4a3c,#3f7158);color:#fff;padding:28px 0 30px}
.hero h1{margin:4px 0 6px;font-size:clamp(1.7rem,4vw,2.6rem);line-height:1.15}
.hero .lead{margin:0;color:#d9eadf;max-width:760px}
.hero-row{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap}
.hero-actions{display:flex;gap:8px;flex-wrap:wrap}
.eyebrow{margin:0;font-size:.78rem;letter-spacing:2px;text-transform:uppercase;color:#bcd7c2;font-weight:700}
.crumbs{font-size:.85rem;display:flex;gap:8px;color:#bcd7c2;margin-bottom:6px}
.crumbs a{color:#e7f1ea}

main.wrap{padding-top:24px;padding-bottom:40px}
.section{margin-top:28px}
.section h2,.card h2{margin:0 0 14px;font-size:1.3rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;margin-top:18px}
.card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.card-head h2{margin:0}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.two-col .card{margin-top:18px}

.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.stat{background:var(--brand-2);border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.stat strong{display:block;font-size:1.25rem;line-height:1.25}
.stat span{font-size:.82rem;color:var(--muted)}

.btn{display:inline-block;background:var(--brand);color:#fff;border:1px solid var(--brand);text-decoration:none;padding:9px 15px;border-radius:9px;font:inherit;font-weight:700;font-size:.92rem;cursor:pointer}
.btn:hover{filter:brightness(1.08)}
.btn.secondary{background:#edf2e9;color:var(--brand);border-color:#c9d8c4}
.btn.ghost{background:transparent;color:var(--brand);border-color:transparent}
.hero .btn.secondary{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.35)}
.hero .btn{background:#f3c66b;color:#1f3a2f;border-color:#f3c66b}
.btn.small{padding:6px 11px;font-size:.84rem}

.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:.74rem;font-weight:800;background:#eef2f4;color:#33424e}
.pill-planned{background:#e4effb;color:#1f4f86}
.pill-ongoing{background:#fff0cf;color:#805000}
.pill-completed{background:#e4f5ed;color:#0a6945}

.tour-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:18px}
.tour-card{background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.tour-cover{display:block;aspect-ratio:1200/630;background:linear-gradient(135deg,#2c5a47,#4c8266)}
.tour-cover img{width:100%;height:100%;object-fit:cover;display:block}
.tour-cover-fallback{display:flex;height:100%;align-items:center;justify-content:center;color:#fff;font-size:1.4rem;font-weight:800}
.tour-body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:6px;flex:1}
.tour-body h3{margin:2px 0;font-size:1.1rem;line-height:1.3}
.tour-body h3 a{color:var(--ink);text-decoration:none}
.tour-body p{margin:0}
.tour-meta{display:flex;justify-content:space-between;align-items:center}
.month{font-weight:800;font-size:.8rem;color:var(--muted);letter-spacing:1px}
.route{color:var(--brand);font-weight:600}
.summary{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#45584d}
.tour-grid{grid-auto-rows:1fr}
.tour-card .tour-body h3,.tour-card .route,.tour-card .summary{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.tour-card .tour-body h3{-webkit-line-clamp:2;min-height:2.6em}
.tour-card .tour-when{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tour-card .route{-webkit-line-clamp:2;min-height:3.1em;line-height:1.55}
.tour-card .summary{-webkit-line-clamp:3;min-height:4.65em;line-height:1.55}
.tour-card .tour-people span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tour-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:10px}

table{border-collapse:collapse;width:100%;font-size:.92rem}
th{text-align:left;background:#e9efe4;color:#345442;font-size:.74rem;text-transform:uppercase;letter-spacing:.4px}
th,td{padding:9px 8px;border-bottom:1px solid #e4eadf;vertical-align:top}
.table-scroll{overflow-x:auto}
.vehicle{padding:10px 0;border-bottom:1px solid #e4eadf}
.vehicle:last-of-type{border-bottom:0}
.vehicle p{margin:4px 0 0}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}
.field{display:flex;flex-direction:column;gap:5px;font-size:.88rem;font-weight:700}
.field.wide{grid-column:1/-1}
.field small{font-weight:400;color:var(--muted)}
input,select,textarea{font:inherit;font-weight:400;padding:9px 10px;border:1px solid #c7d3c3;border-radius:9px;background:#fff;color:var(--ink);width:100%}
textarea{resize:vertical}
input:focus,select:focus,textarea:focus{outline:2px solid #8fb79b;border-color:#8fb79b}
table.rows td{padding:5px 4px;border-bottom:0}
table.rows input,table.rows textarea{padding:7px 8px;min-width:90px;font-size:.88rem}
table.rows textarea{min-width:160px}
.icon-btn{border:0;background:#f4e6e3;color:#962e26;border-radius:8px;width:32px;height:34px;font-size:1.2rem;cursor:pointer}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.alert{background:#ffe9e5;border:1px solid #f1bdb5;color:#80261d;padding:12px 16px;border-radius:12px}
.error{color:#a4281d}

.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:16px;background:rgba(10,22,31,.6)}
.modal-box{background:#fff;border-radius:18px;max-width:440px;width:100%;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.3)}
.modal-head{display:flex;justify-content:space-between;gap:12px;padding:18px 20px;background:var(--brand-2)}
.modal-head h2{margin:0;font-size:1.15rem}
.modal-head p{margin:4px 0 0;font-size:.86rem;color:var(--muted)}
.modal-close{border:0;background:#fff;border-radius:50%;width:34px;height:34px;font-size:1.3rem;cursor:pointer}
.modal-body{padding:20px;min-height:90px}
body.modal-open{overflow:hidden}

.footer{color:var(--muted);font-size:.82rem;padding-bottom:30px}

@media (max-width:760px){
  .stats{grid-template-columns:1fr 1fr}
  .two-col,.form-grid{grid-template-columns:1fr}
  .who{display:none}
  .card{padding:16px}
}

.master-map-card{display:grid;grid-template-columns:minmax(0,1fr) 300px;background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.master-map{height:520px;min-height:360px;background:#e8eee4;z-index:0}
.master-legend{padding:16px 16px 18px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.master-legend p{margin:0}
.master-legend ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.master-legend li{display:flex;align-items:center;gap:6px}
.mm-toggle{flex:1;display:flex;align-items:center;gap:10px;text-align:left;background:#f7faf4;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font:inherit;color:inherit;cursor:pointer}
.mm-toggle:hover,.mm-toggle:focus-visible{border-color:var(--c);outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--c) 25%,transparent)}
.mm-swatch{flex:none;width:26px;height:6px;border-radius:3px;background:var(--c);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--c)}
.mm-text{display:flex;flex-direction:column;line-height:1.3}
.mm-text strong{font-size:.92rem}
.mm-toggle[aria-pressed="false"]{opacity:.5;background:#fff}
.mm-toggle[aria-pressed="false"] .mm-swatch{background:#fff}
.mm-toggle{transition:opacity .3s,background-color .3s}
.mm-actions{display:grid;gap:8px}
.mm-open{white-space:nowrap;text-decoration:none;font-weight:700}
.mm-popup{font-size:.88rem;line-height:1.45}
@media (max-width:820px){
  .master-map-card{grid-template-columns:1fr}
  .master-map{height:400px}
  .master-legend{border-left:0;border-top:1px solid var(--line)}
}
.slow-note{border-left:6px solid #cf7a1d;background:#fff8ee}
.slow-note h2{color:#8a4b0f}
.slow-lead{font-weight:600;color:#6b3d12;margin-top:0}
.master-map-section{margin-top:0}
.tour-tags{display:flex;align-items:center;gap:8px}
.pill-mode{background:#f6ecdc;color:#7a4a12}
