@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap');

:root {
  --ink: #132d2a;
  --ink-2: #0e2423;
  --ink-3: #234540;
  --navy: #12273b;
  --paper: #f3ead8;
  --paper-2: #fffaf0;
  --paper-3: #e7d8bf;
  --clay: #c55a31;
  --clay-dark: #9f4328;
  --sun: #e8a936;
  --sun-soft: #f7dca3;
  --sage: #6f896d;
  --purple: #8a6b9d;
  --sky: #6f9cad;
  --line: rgba(19, 45, 42, .15);
  --line-light: rgba(255, 250, 240, .18);
  --shadow: 0 22px 60px rgba(12, 30, 29, .24);
  --shadow-soft: 0 8px 26px rgba(12, 30, 29, .13);
  --serif: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --top-h: 88px;
  --dock-h: 132px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--ink); background: var(--ink-2); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; }

.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; color: var(--ink); background: var(--sun); font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: none; }

.app-shell { display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr) var(--dock-h); width: 100%; height: 100dvh; min-height: 560px; overflow: hidden; background: var(--ink-2); }

/* Header */
.topbar { position: relative; z-index: 30; display: grid; grid-template-columns: minmax(360px, auto) 1fr auto; align-items: center; gap: 26px; min-width: 0; padding: 11px 20px 10px 22px; color: var(--paper-2); border-bottom: 1px solid rgba(255,255,255,.1); background: linear-gradient(105deg, #102925 0%, #14312d 62%, #0e2423 100%); box-shadow: 0 7px 22px rgba(0,0,0,.16); }
.topbar::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background: radial-gradient(circle at 30% -20%, #e7aa43 0, transparent 31%), repeating-linear-gradient(115deg, transparent 0 26px, rgba(255,255,255,.025) 26px 27px); }
.brand-lockup, .trip-stats, .top-actions { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; min-width: 0; gap: 15px; }
.crest { display: grid; place-items: center; width: 54px; height: 62px; flex: 0 0 54px; border: 1px solid rgba(232,169,54,.75); border-radius: 15px 15px 20px 20px; color: var(--sun); background: #183a34; box-shadow: inset 0 0 0 4px #102925, 0 4px 14px rgba(0,0,0,.25); }
.crest svg { width: 41px; height: 41px; }
.crest path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.crest circle { fill: var(--clay); stroke: none; }
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 0; white-space: nowrap; font-family: var(--serif); font-size: clamp(1.65rem, 2.15vw, 2.55rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.brand-copy h1 span { color: var(--sun-soft); }
.brand-copy p { margin: 6px 0 0; color: rgba(255,250,240,.62); font-size: .66rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }

.trip-stats { justify-self: center; display: flex; align-items: center; min-width: 0; height: 46px; }
.trip-stats > div { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 7px; min-width: 94px; padding: 0 17px; border-left: 1px solid rgba(255,255,255,.16); }
.trip-stats > div:first-child { border-left: 0; }
.trip-stats span { grid-row: 1 / 3; color: var(--sun-soft); font-size: .95rem; }
.trip-stats strong { color: var(--paper-2); font-size: .94rem; font-weight: 600; line-height: 1; }
.trip-stats small { margin-top: 4px; color: rgba(255,250,240,.48); font-size: .52rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.top-action { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 13px; color: rgba(255,250,240,.8); border: 1px solid rgba(255,250,240,.25); border-radius: 8px; background: rgba(255,255,255,.025); cursor: pointer; font-size: .68rem; font-weight: 700; transition: .2s ease; }
.top-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.top-action:hover, .top-action:focus-visible { color: var(--paper-2); border-color: var(--sun); background: rgba(232,169,54,.12); }
.accent-action { color: var(--ink); border-color: var(--sun); background: var(--sun); }
.accent-action:hover, .accent-action:focus-visible { color: var(--ink); background: var(--sun-soft); }

/* Main workspace */
.workspace { position: relative; z-index: 2; display: grid; grid-template-columns: 174px minmax(440px, 1fr) minmax(360px, 415px); min-height: 0; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.11); }

/* Day rail */
.day-rail { display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 12px; color: var(--paper-2); border-right: 1px solid rgba(255,255,255,.11); background: linear-gradient(180deg, #13342f, #0f2b28); }
.rail-label { display: flex; justify-content: space-between; align-items: baseline; padding: 0 7px 9px; color: rgba(255,250,240,.45); font-size: .54rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.rail-label b { color: var(--sun-soft); font-size: .55rem; }
.day-buttons { display: grid; grid-template-rows: repeat(7, minmax(48px, 1fr)); gap: 7px; min-height: 0; flex: 1; }
.day-button { position: relative; display: grid; grid-template-columns: 1fr 15px; grid-template-rows: 1fr 1fr; align-items: center; min-height: 0; padding: 8px 11px 8px 13px; overflow: hidden; color: rgba(255,250,240,.75); border: 1px solid rgba(255,255,255,.11); border-radius: 8px; background: rgba(255,255,255,.025); cursor: pointer; text-align: left; transition: transform .2s, border-color .2s, background .2s, color .2s; }
.day-button::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--day-color, var(--clay)); opacity: .72; }
.day-button strong { align-self: end; font-family: var(--serif); font-size: clamp(.89rem, 1vw, 1.05rem); font-weight: 400; line-height: 1; }
.day-button small { align-self: start; display: flex; align-items: center; gap: 6px; margin-top: 4px; color: rgba(255,250,240,.48); font-size: .57rem; white-space: nowrap; }
.day-button small::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--day-color, var(--clay)); }
.day-button i { grid-column: 2; grid-row: 1 / 3; justify-self: end; font-style: normal; font-size: 1.25rem; opacity: .6; }
.day-button:hover { transform: translateX(2px); color: white; border-color: rgba(255,255,255,.25); }
.day-button.is-active { color: white; border-color: #df793f; background: linear-gradient(120deg, var(--clay-dark), #c96535); box-shadow: 0 5px 17px rgba(0,0,0,.27), inset 0 0 0 1px rgba(255,255,255,.12); }
.day-button.is-active::before { background: var(--sun-soft); opacity: 1; }
.day-button.is-active small { color: rgba(255,255,255,.76); }
.family-mode { display: grid; grid-template-columns: 31px 1fr 10px; align-items: center; gap: 8px; min-height: 47px; margin-top: 8px; padding: 8px 10px; color: var(--paper-2); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.04); cursor: pointer; text-align: left; }
.family-faces { color: var(--sun-soft); font-size: 1.25rem; letter-spacing: -7px; transform: translateX(-4px); }
.family-mode strong, .family-mode small { display: block; }
.family-mode strong { font-size: .66rem; }
.family-mode small { margin-top: 2px; color: rgba(255,250,240,.5); font-size: .52rem; }
.family-mode i { justify-self: end; font-style: normal; font-size: 1.2rem; }

/* Map */
.map-stage { position: relative; display: grid; grid-template-rows: 54px minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; color: var(--ink); background: var(--paper); }
.map-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25; background-image: linear-gradient(rgba(117,91,58,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(117,91,58,.08) 1px, transparent 1px); background-size: 48px 48px; }
.map-head { position: relative; z-index: 6; display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 8px 16px 7px 19px; border-bottom: 1px solid rgba(19,45,42,.1); background: rgba(255,250,240,.72); backdrop-filter: blur(12px); }
.map-kicker { display: block; color: var(--clay); font-size: .52rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.map-head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.map-guide-button { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,250,240,.65); cursor: pointer; color: var(--ink-3); font-size: .6rem; font-weight: 700; }
.map-guide-button:hover { border-color: var(--clay); color: var(--clay-dark); }
.view-switch { display: none; }
.map-canvas { position: relative; min-height: 0; overflow: hidden; }
.map-canvas::after { content: ""; position: absolute; inset: auto 0 0; height: 18%; pointer-events: none; background: linear-gradient(transparent, rgba(122,89,48,.08)); }
.atlas-map { position: absolute; inset: -3% -2% -2% -1%; width: 103%; height: 105%; color: #785e3f; }
.az-shape { fill: #eadcc2; stroke: rgba(83,67,46,.5); stroke-width: 2; }
.map-texture { fill: url(#paper-noise); color: #765936; }
.contours path { fill: none; stroke: rgba(82,107,82,.23); stroke-width: 1.4; }
.terrain-labels text { fill: rgba(19,45,42,.39); font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 5px; }
.terrain-labels .arizona-label { fill: rgba(142,67,38,.74); font-family: var(--serif); font-size: 37px; letter-spacing: 8px; }
.map-trees path { fill: rgba(70,102,71,.35); }
.route-shadow, .route-main, .route-return { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-shadow { stroke: rgba(255,250,240,.8); stroke-width: 9; }
.route-main { stroke: #182f2b; stroke-width: 4; }
.route-return { stroke: #5d775a; stroke-width: 4; stroke-dasharray: 8 10; animation: route-drift 18s linear infinite; }
.route-hit { --route-glow: rgba(255,248,229,.28); fill: none; stroke: transparent; stroke-width: 28; stroke-linecap: round; stroke-linejoin: round; pointer-events: stroke; cursor: pointer; transition: stroke .18s ease; }
.route-hit[data-route-leg="1"] { --route-glow: rgba(190,79,45,.34); }
.route-hit[data-route-leg="2"] { --route-glow: rgba(194,137,38,.34); }
.route-hit[data-route-leg="3"] { --route-glow: rgba(123,89,148,.34); }
.route-hit[data-route-leg="4"] { --route-glow: rgba(60,103,81,.36); }
.route-hit:hover, .route-hit.is-active, .route-hit:focus-visible { stroke: var(--route-glow); }
.route-hit:focus { outline: none; }
.leg-labels { pointer-events: none; }
.leg-label { opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s linear .18s; }
.leg-label.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }
.leg-label rect { stroke: rgba(255,248,229,.94); stroke-width: 1.5; }
.leg-label text { fill: #fff8e8; font-family: var(--sans); text-anchor: start; }
.leg-label--clay rect { fill: rgba(174,79,49,.94); }
.leg-label--gold rect { fill: rgba(166,116,32,.95); }
.leg-label--purple rect { fill: rgba(111,82,135,.95); }
.leg-label--sage rect { fill: rgba(55,92,75,.95); }
.leg-destination { font-size: 9px; font-weight: 900; letter-spacing: 1.1px; }
.leg-road { font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.leg-metric { font-family: var(--serif) !important; font-size: 14px; font-weight: 600; letter-spacing: .35px; }
.compass { position: absolute; top: 22px; left: 20px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(19,45,42,.22); border-radius: 50%; color: rgba(19,45,42,.63); background: rgba(255,250,240,.62); }
.compass span { position: absolute; top: -16px; font-family: var(--serif); font-size: .7rem; }
.compass i, .compass i::after { position: absolute; width: 1px; height: 32px; background: currentColor; }
.compass i::after { content: ""; transform: rotate(90deg); }

.map-pin { --pin: var(--clay); position: absolute; z-index: 4; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; gap: 0 7px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; transform: translate(-18px, -18px); }
.map-pin span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; color: white; border: 3px solid #fff8e8; border-radius: 50%; background: var(--pin); box-shadow: 0 5px 12px rgba(26,44,40,.28); font-family: var(--serif); font-size: 1.25rem; filter: url(#pin-shadow); transition: transform .2s; }
.map-pin b { align-self: end; font-family: var(--serif); font-size: clamp(.9rem, 1.25vw, 1.4rem); font-weight: 400; line-height: 1; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,250,240,.85); }
.map-pin small { align-self: start; margin-top: 3px; color: rgba(19,45,42,.56); font-size: .5rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.map-pin:hover span, .map-pin.is-active span { transform: scale(1.13); }
.map-pin.is-active span { box-shadow: 0 0 0 5px rgba(232,169,54,.3), 0 7px 15px rgba(26,44,40,.3); }
.phx-pin { left: 16.6667%; top: 83.0882%; }
.sedona-pin { left: 50%; top: 52.9412%; }
.williams-pin { --pin: #d39220; left: 57.7778%; top: 30.8824%; }
.canyon-pin { --pin: var(--purple); left: 76.6667%; top: 13.2353%; }

.mini-route-key { position: absolute; z-index: 3; right: 16px; top: 16px; display: none; gap: 7px; min-width: 124px; padding: 12px 13px; border: 1px solid rgba(19,45,42,.16); border-radius: 9px; background: rgba(255,250,240,.82); box-shadow: 0 5px 18px rgba(40,54,48,.1); backdrop-filter: blur(7px); }
.mini-route-key strong { margin-bottom: 2px; font-family: var(--serif); font-size: .8rem; font-weight: 400; }
.mini-route-key span { display: flex; align-items: center; gap: 7px; color: rgba(19,45,42,.65); font-size: .5rem; font-weight: 700; text-transform: uppercase; }
.mini-route-key i { width: 22px; height: 2px; background: var(--ink); }
.mini-route-key .dash-line { background: repeating-linear-gradient(90deg, var(--sage) 0 5px, transparent 5px 8px); }
/* Detail panel */
.detail-panel { position: relative; z-index: 8; display: grid; grid-template-rows: minmax(132px, 31%) 44px minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid rgba(19,45,42,.22); background: var(--paper-2); box-shadow: -8px 0 28px rgba(19,45,42,.08); }
.detail-hero { position: relative; min-height: 0; overflow: hidden; color: white; background: var(--ink); }
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 48%; filter: saturate(.88) contrast(.95); transform: scale(1.06); }
.detail-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,26,25,.88) 0%, rgba(10,26,25,.58) 53%, rgba(10,26,25,.2)), linear-gradient(0deg, rgba(10,26,25,.58), transparent 58%); }
.detail-topline { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0 16px; }
.detail-topline > span { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: var(--sun-soft); background: rgba(12,35,33,.62); font-size: .52rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.detail-topline > div { display: flex; overflow: hidden; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(10,28,27,.4); }
.detail-topline button { display: grid; place-items: center; width: 34px; height: 26px; padding: 0; color: white; border: 0; border-right: 1px solid rgba(255,255,255,.18); background: transparent; cursor: pointer; font-size: 1.25rem; }
.detail-topline button:last-child { border-right: 0; }
.detail-title { position: absolute; z-index: 2; right: 18px; bottom: 14px; left: 18px; }
.detail-title p { margin: 0 0 4px; color: var(--sun-soft); font-size: .56rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-title h2 { max-width: 350px; margin: 0; font-family: var(--serif); font-size: clamp(1.55rem, 2.35vw, 2.65rem); font-weight: 400; line-height: .96; letter-spacing: -.025em; text-wrap: balance; }
.detail-title span { display: block; margin-top: 6px; color: rgba(255,255,255,.68); font-size: .58rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-map-back { display: none; }
.detail-tabs { display: grid; grid-template-columns: repeat(4,1fr); padding: 6px 8px; border-bottom: 1px solid var(--line); background: #f5ecdc; }
.detail-tabs button { border: 0; border-right: 1px solid var(--line); border-radius: 5px; background: transparent; cursor: pointer; color: rgba(19,45,42,.6); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-tabs button:last-child { border-right: 0; }
.detail-tabs button.is-active { color: white; background: var(--clay); box-shadow: 0 3px 10px rgba(159,67,40,.22); }
.detail-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 13px 16px; scrollbar-width: thin; scrollbar-color: rgba(19,45,42,.25) transparent; }
.day-summary { margin: 0 0 10px; padding: 9px 11px; color: rgba(19,45,42,.7); border-left: 3px solid var(--sun); background: rgba(232,169,54,.09); font-size: .66rem; line-height: 1.45; }
.plan-list { display: grid; gap: 8px; }
.plan-step { position: relative; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.58); box-shadow: 0 2px 8px rgba(19,45,42,.04); }
.step-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--clay-dark); border-radius: 50%; background: #f6dfb6; font-family: var(--serif); font-size: 1.15rem; }
.plan-step h3 { margin: 0; font-family: var(--serif); font-size: .98rem; font-weight: 400; line-height: 1.15; }
.plan-step small { display: block; margin-bottom: 3px; color: var(--clay); font-size: .5rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.plan-step p { margin: 5px 0 0; color: rgba(19,45,42,.67); font-size: .61rem; line-height: 1.42; }
.plan-step a, .text-link { align-self: start; color: var(--clay-dark); font-size: .54rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.plan-step a:hover, .text-link:hover { text-decoration: underline; }
.heat-callout { display: flex; gap: 9px; margin-top: 9px; padding: 10px; color: #684119; border: 1px solid rgba(197,90,49,.2); border-radius: 8px; background: #fff0d5; font-size: .61rem; line-height: 1.4; }
.heat-callout span { color: var(--clay); font-size: 1rem; }
.info-stack { display: grid; gap: 9px; }
.feature-card { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.feature-card.is-warm { color: white; border-color: transparent; background: linear-gradient(130deg, var(--clay-dark), #bd5b34); }
.feature-card.is-night { color: white; border-color: transparent; background: linear-gradient(130deg, var(--navy), #213f58); }
.feature-card .card-kicker { display: block; color: var(--clay); font-size: .5rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.feature-card.is-warm .card-kicker, .feature-card.is-night .card-kicker { color: var(--sun-soft); }
.feature-card h3 { margin: 4px 0 6px; font-family: var(--serif); font-size: 1.13rem; font-weight: 400; }
.feature-card p { margin: 0; color: rgba(19,45,42,.67); font-size: .64rem; line-height: 1.5; }
.feature-card.is-warm p, .feature-card.is-night p { color: rgba(255,250,240,.72); }
.feature-card a { display: inline-block; margin-top: 9px; color: var(--clay-dark); font-size: .57rem; font-weight: 800; text-decoration: none; }
.feature-card.is-warm a, .feature-card.is-night a { color: var(--sun-soft); }
.safe-order { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.feature-card.is-warm .safe-order, .feature-card.is-night .safe-order { border-color: rgba(255,255,255,.18); }
.safe-order span { display: block; margin-bottom: 4px; color: var(--sage); font-size: .49rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.safe-order strong { font-size: .65rem; line-height: 1.42; }
.mini-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-card { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.55); }
.mini-card span { display: block; color: var(--clay); font-size: .47rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mini-card strong { display: block; margin-top: 4px; font-family: var(--serif); font-size: .85rem; font-weight: 400; }
.mini-card p { margin: 4px 0 0; color: rgba(19,45,42,.62); font-size: .56rem; line-height: 1.42; }
.link-list { display: grid; gap: 6px; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-3); background: rgba(255,255,255,.55); font-size: .58rem; font-weight: 700; text-decoration: none; }
.link-list a:hover { color: var(--clay-dark); border-color: var(--clay); }

/* Tool dock */
.tool-dock { position: relative; z-index: 35; display: grid; grid-template-columns: 165px minmax(0, 1fr); gap: 12px; min-width: 0; padding: 10px 14px 12px; color: var(--paper-2); border-top: 1px solid rgba(255,255,255,.12); background: linear-gradient(110deg, #102a3d, #0f2b2a 55%, #152f42); box-shadow: 0 -8px 28px rgba(0,0,0,.2); }
.dock-home { display: grid; grid-template-columns: 35px 1fr; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 10px; padding: 10px 10px; color: var(--paper-2); border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(255,255,255,.035); cursor: pointer; text-align: left; }
.dock-home > span { grid-row: 1 / 3; display: grid; place-items: center; width: 35px; height: 35px; color: var(--sun-soft); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 1rem; }
.dock-home strong { align-self: end; font-family: var(--serif); font-size: .86rem; font-weight: 400; }
.dock-home small { align-self: start; margin-top: 2px; color: rgba(255,250,240,.45); font-size: .49rem; }
.dock-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 8px; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.dock-scroll::-webkit-scrollbar { display: none; }
.tool-card { position: relative; display: grid; grid-template-columns: 43px 1fr 10px; align-items: center; gap: 10px; min-width: 0; overflow: hidden; padding: 10px; color: var(--paper-2); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: rgba(255,255,255,.055); cursor: pointer; text-align: left; transition: transform .2s, border-color .2s, background .2s; }
.tool-card::before { content: ""; position: absolute; inset: 0; opacity: .15; background: radial-gradient(circle at 5% 0%, var(--tool-color, var(--sun)) 0 20%, transparent 54%); }
.tool-card:hover, .tool-card.is-active { transform: translateY(-2px); border-color: rgba(232,169,54,.65); background: rgba(255,255,255,.09); }
.tool-art { position: relative; z-index: 1; display: grid; place-items: center; width: 43px; height: 43px; color: var(--sun-soft); border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: rgba(5,20,25,.28); font-family: var(--serif); font-size: 1.25rem; }
.tool-card > span:nth-child(2) { position: relative; z-index: 1; min-width: 0; }
.tool-card strong, .tool-card small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tool-card strong { font-family: var(--serif); font-size: .82rem; font-weight: 400; }
.tool-card small { margin-top: 5px; color: rgba(255,250,240,.5); font-size: .48rem; }
.tool-card small b { color: var(--sun-soft); font-weight: 700; }
.tool-card > i { position: relative; z-index: 1; justify-self: end; color: rgba(255,255,255,.45); font-style: normal; font-size: 1.2rem; }
.stars-tool { --tool-color: #7797c2; }
.car-tool { --tool-color: #c78254; }
.stay-tool { --tool-color: #8a6b9d; }
.food-tool { --tool-color: #bd7b49; }
.packing-tool { --tool-color: #71956e; }
.flight-tool { --tool-color: #d0a44d; }
.essentials-tool { --tool-color: #c55a31; }

/* Drawers */
.drawer-scrim { position: fixed; z-index: 60; inset: var(--top-h) 0 var(--dock-h); background: rgba(6,18,18,.38); backdrop-filter: blur(2px); }
.info-drawer { position: fixed; z-index: 70; top: calc(var(--top-h) + 12px); right: 18px; bottom: calc(var(--dock-h) + 12px); left: 190px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; color: var(--ink); border: 1px solid rgba(19,45,42,.25); border-radius: 15px; background: var(--paper-2); box-shadow: 0 30px 90px rgba(3,18,17,.42); animation: drawer-in .25s ease both; }
.info-drawer[hidden], .drawer-scrim[hidden] { display: none; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; min-height: 88px; padding: 18px 22px 15px 24px; color: var(--paper-2); background: linear-gradient(120deg, var(--ink), #1e413b); }
.drawer-kicker { display: block; color: var(--sun-soft); font-size: .54rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.drawer-header h2 { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(1.45rem, 2.3vw, 2.2rem); font-weight: 400; line-height: 1; }
.drawer-header p { max-width: 740px; margin: 7px 0 0; color: rgba(255,250,240,.62); font-size: .61rem; line-height: 1.4; }
.drawer-close { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; color: white; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.04); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.drawer-filter { display: flex; gap: 7px; padding: 9px 22px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #f2e8d7; }
.filter-chip { flex: 0 0 auto; padding: 7px 11px; color: rgba(19,45,42,.62); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.52); cursor: pointer; font-size: .55rem; font-weight: 800; }
.filter-chip.is-active { color: white; border-color: var(--clay); background: var(--clay); }
.drawer-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 22px 24px; scrollbar-width: thin; scrollbar-color: rgba(19,45,42,.3) transparent; }
.drawer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.drawer-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer-card { display: flex; flex-direction: column; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.65); box-shadow: 0 3px 14px rgba(19,45,42,.055); }
.drawer-card.featured { color: white; border-color: transparent; background: linear-gradient(135deg, var(--navy), #264967); }
.drawer-card.warm { color: white; border-color: transparent; background: linear-gradient(135deg, var(--clay-dark), #c46538); }
.drawer-card.sage { color: white; border-color: transparent; background: linear-gradient(135deg, #486849, #6e896d); }
.drawer-card .meta { display: flex; justify-content: space-between; gap: 12px; color: var(--clay); font-size: .5rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.drawer-card.featured .meta, .drawer-card.warm .meta, .drawer-card.sage .meta { color: var(--sun-soft); }
.drawer-card h3 { margin: 9px 0 7px; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; line-height: 1.05; }
.drawer-card p { margin: 0; color: rgba(19,45,42,.67); font-size: .62rem; line-height: 1.5; }
.drawer-card.featured p, .drawer-card.warm p, .drawer-card.sage p { color: rgba(255,250,240,.72); }
.drawer-card .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.drawer-card .chips span { padding: 4px 6px; border-radius: 4px; color: rgba(19,45,42,.62); background: rgba(19,45,42,.06); font-size: .47rem; }
.drawer-card.featured .chips span, .drawer-card.warm .chips span, .drawer-card.sage .chips span { color: rgba(255,250,240,.7); background: rgba(255,255,255,.1); }
.drawer-card a { width: max-content; margin-top: auto; padding-top: 12px; color: var(--clay-dark); font-size: .55rem; font-weight: 800; text-decoration: none; }
.drawer-card.featured a, .drawer-card.warm a, .drawer-card.sage a { color: var(--sun-soft); }
.drawer-note { margin: 14px 0 0; padding: 10px 12px; color: rgba(19,45,42,.6); border-left: 3px solid var(--clay); background: rgba(197,90,49,.08); font-size: .57rem; line-height: 1.45; }

.flow-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.flow-card { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.64); }
.flow-card > header { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.flow-card > header span { display: grid; place-items: center; width: 38px; height: 38px; color: var(--clay); border-radius: 50%; background: #f6e1bd; font-size: 1rem; }
.flow-card > header small { display: block; color: var(--clay); font-size: .49rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.flow-card > header h3 { margin: 2px 0 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.flow-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.flow-steps li { counter-increment: flow; display: grid; grid-template-columns: 25px 1fr; gap: 9px; }
.flow-steps li::before { content: counter(flow, decimal-leading-zero); display: grid; place-items: center; width: 23px; height: 23px; color: white; border-radius: 50%; background: var(--ink); font-size: .44rem; font-weight: 800; }
.flow-steps strong { display: block; font-size: .64rem; }
.flow-steps p { margin: 2px 0 0; color: rgba(19,45,42,.64); font-size: .56rem; line-height: 1.43; }
.flow-steps a { color: var(--clay-dark); font-weight: 700; }
.note-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 13px; }
.note-grid > div { padding: 11px; border-radius: 8px; background: #eee1cc; }
.note-grid strong { display: block; color: var(--clay-dark); font-size: .57rem; }
.note-grid span { display: block; margin-top: 4px; color: rgba(19,45,42,.63); font-size: .53rem; line-height: 1.42; }

.base-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.base-card { position: relative; min-height: 260px; overflow: hidden; padding: 23px; color: white; border-radius: 13px; background: var(--ink); }
.base-card::before { content: ""; position: absolute; inset: 0; opacity: .52; background-image: url("assets/arizona-panorama.png"); background-size: cover; background-position: left center; }
.base-card:nth-child(2)::before { background-position: right center; }
.base-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,30,29,.94), rgba(10,30,29,.56)); }
.base-card > * { position: relative; z-index: 1; }
.base-card .pill { display: inline-flex; padding: 5px 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: var(--sun-soft); background: rgba(0,0,0,.18); font-size: .49rem; font-weight: 800; text-transform: uppercase; }
.base-card h3 { margin: 26px 0 8px; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; }
.base-card p { max-width: 520px; margin: 0; color: rgba(255,250,240,.73); font-size: .63rem; line-height: 1.55; }
.base-card ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 17px 0 0; padding: 0; list-style: none; }
.base-card li { padding: 5px 7px; border-radius: 5px; background: rgba(255,255,255,.1); font-size: .5rem; }

.food-directory { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; }
.food-directory .drawer-card { min-height: 188px; }
.food-directory .safe-order { margin-top: auto; padding-top: 10px; }
.food-directory .safe-order strong { font-size: .58rem; }

.checklist-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; align-items: start; }
.checklist-groups { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; }
.checklist-groups fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.62); }
.checklist-groups legend { padding: 0 5px; color: var(--clay); font-size: .54rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.checklist-groups label { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; margin: 9px 0; color: rgba(19,45,42,.72); cursor: pointer; font-size: .58rem; line-height: 1.35; }
.checklist-groups input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1px solid rgba(19,45,42,.28); border-radius: 4px; background: white; cursor: pointer; }
.checklist-groups input:checked { border-color: var(--clay); background: var(--clay); }
.checklist-groups input:checked::after { content: "✓"; display: grid; place-items: center; height: 100%; color: white; font-size: .65rem; font-weight: 900; }
.checklist-groups input:checked + span { opacity: .48; text-decoration: line-through; }
.progress-card { position: sticky; top: 0; display: grid; place-items: center; min-height: 190px; padding: 18px; color: white; border-radius: 12px; background: var(--ink); text-align: center; }
.progress-ring { --progress: 0deg; position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--sun) var(--progress), rgba(255,255,255,.12) 0); }
.progress-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink); }
.progress-ring strong { position: relative; font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.progress-card > strong { margin-top: 9px; font-family: var(--serif); font-size: 1rem; font-weight: 400; }
.progress-card small { margin-top: 3px; color: rgba(255,250,240,.5); font-size: .5rem; }
.progress-card button { margin-top: 11px; padding: 6px 9px; color: var(--sun-soft); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: transparent; cursor: pointer; font-size: .5rem; }

.flight-layout { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(360px,1.3fr); gap: 14px; }
.flight-picker, .flight-answer-large { padding: 22px; border-radius: 12px; }
.flight-picker { color: white; background: var(--ink); }
.flight-picker h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.flight-picker p { margin: 0; color: rgba(255,250,240,.6); font-size: .6rem; line-height: 1.45; }
.flight-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 18px; }
.flight-toggle label { cursor: pointer; }
.flight-toggle input { position: absolute; opacity: 0; }
.flight-toggle span { display: block; padding: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,250,240,.72); font-size: .57rem; font-weight: 800; text-align: center; }
.flight-toggle input:checked + span { color: var(--ink); border-color: var(--sun); background: var(--sun); }
.flight-answer-large { display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); background: #f1e5d1; }
.flight-answer-large .meta { color: var(--clay); font-size: .52rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.flight-answer-large h3 { margin: 7px 0 9px; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; }
.flight-answer-large p { margin: 0; color: rgba(19,45,42,.65); font-size: .63rem; line-height: 1.55; }
.flight-route { display: flex; align-items: center; gap: 12px; margin-top: 19px; color: var(--clay-dark); font-size: .55rem; font-weight: 800; text-transform: uppercase; }
.flight-route i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg,var(--clay) 0 7px,transparent 7px 11px); }

.essentials-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.essential-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.62); }
.essential-card > span { display: grid; place-items: center; width: 32px; height: 32px; color: white; border-radius: 50%; background: var(--clay); }
.essential-card h3 { margin: 12px 0 5px; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.essential-card p { margin: 0; color: rgba(19,45,42,.64); font-size: .58rem; line-height: 1.48; }
.live-link-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.live-link-grid a { display: flex; justify-content: space-between; gap: 10px; padding: 11px; color: white; border-radius: 8px; background: var(--ink); font-size: .55rem; font-weight: 700; text-decoration: none; }
.live-link-grid a b { color: var(--sun-soft); }
.source-groups { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 15px; }
.source-group { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.55); }
.source-group h3 { margin: 0 0 7px; color: var(--clay); font-size: .53rem; letter-spacing: .08em; text-transform: uppercase; }
.source-group a { display: block; margin: 6px 0; color: rgba(19,45,42,.66); font-size: .54rem; text-decoration: none; }
.source-group a:hover { color: var(--clay-dark); text-decoration: underline; }

.route-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.route-leg { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.62); }
.route-leg span { display: block; color: var(--clay); font-family: var(--serif); font-size: 1.35rem; }
.route-leg h3 { margin: 9px 0 4px; font-family: var(--serif); font-size: 1rem; font-weight: 400; }
.route-leg p { margin: 0; color: rgba(19,45,42,.6); font-size: .56rem; }
.route-leg a { display: inline-block; margin-top: 11px; color: var(--clay-dark); font-size: .54rem; font-weight: 800; text-decoration: none; }

.toast { position: fixed; z-index: 120; top: calc(var(--top-h) + 12px); left: 50%; max-width: 360px; padding: 10px 14px; color: white; border-radius: 999px; background: var(--ink); box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none; transform: translate(-50%, -10px); transition: .25s; font-size: .62rem; font-weight: 700; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; z-index: 300; inset: auto 12px 12px; padding: 12px; color: white; border-radius: 8px; background: var(--clay-dark); text-align: center; }
.print-report { display: none; }

@keyframes route-drift { to { stroke-dashoffset: -180; } }
@keyframes drawer-in { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }

@media (max-width: 1320px) {
  .workspace { grid-template-columns: 158px minmax(390px,1fr) 380px; }
  .trip-stats > div { min-width: 82px; padding: 0 12px; }
  .info-drawer { left: 174px; }
  .dock-scroll { grid-auto-columns: minmax(163px, 1fr); }
  .food-directory { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 1140px) {
  .topbar { grid-template-columns: minmax(330px,1fr) auto; }
  .trip-stats { display: none; }
  .workspace { grid-template-columns: 145px minmax(360px,1fr) 360px; }
  .day-button { padding-left: 11px; }
  .day-button strong { font-size: .9rem; }
  .detail-title h2 { font-size: 1.85rem; }
  .tool-dock { grid-template-columns: 135px minmax(0,1fr); }
  .dock-home { grid-template-columns: 31px 1fr; padding: 8px; }
  .dock-home > span { width: 31px; height: 31px; }
  .info-drawer { left: 160px; }
  .drawer-grid { grid-template-columns: repeat(2,1fr); }
  .checklist-layout { grid-template-columns: 1fr 180px; }
}

@media (max-width: 900px) {
  :root { --top-h: 72px; --dock-h: 82px; }
  .app-shell { min-height: 500px; }
  .topbar { grid-template-columns: 1fr auto; gap: 12px; padding: 8px 10px 8px 12px; }
  .crest { width: 43px; height: 50px; flex-basis: 43px; border-radius: 11px 11px 15px 15px; }
  .crest svg { width: 33px; height: 33px; }
  .brand-lockup { gap: 10px; }
  .brand-copy h1 { font-size: clamp(1.15rem, 3.2vw, 1.6rem); }
  .brand-copy p { font-size: .49rem; }
  .top-action { width: 39px; padding: 0; justify-content: center; }
  .top-action span { display: none; }
  .workspace { display: block; position: relative; }
  .day-rail { position: absolute; z-index: 20; top: 7px; right: 7px; left: 7px; display: block; height: 55px; min-height: 0; padding: 0; border: 0; background: transparent; }
  .rail-label, .family-mode { display: none; }
  .day-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(66px, 1fr); grid-template-rows: 55px; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .day-buttons::-webkit-scrollbar { display: none; }
  .day-button { grid-template-columns: 1fr 10px; padding: 7px 7px 7px 10px; border-color: rgba(19,45,42,.12); color: var(--ink); background: rgba(255,250,240,.9); box-shadow: 0 3px 10px rgba(19,45,42,.08); }
  .day-button strong { font-size: .74rem; }
  .day-button small { color: rgba(19,45,42,.55); font-size: .45rem; }
  .day-button i { font-size: .9rem; }
  .day-button.is-active { color: white; }
  .day-button.is-active small { color: rgba(255,255,255,.72); }
  .map-stage { position: absolute; inset: 0; grid-template-rows: 50px 1fr; padding-top: 66px; }
  .map-head { padding-inline: 13px; }
  .map-head > div:first-child { display: none; }
  .view-switch { display: flex; padding: 3px; border-radius: 999px; background: rgba(19,45,42,.08); }
  .view-switch button { padding: 6px 11px; border: 0; border-radius: 999px; color: rgba(19,45,42,.6); background: transparent; cursor: pointer; font-size: .55rem; font-weight: 800; }
  .view-switch button.is-active { color: white; background: var(--ink); }
  .map-guide-button { margin-left: auto; }
  .detail-panel { position: absolute; z-index: 28; inset: 0; grid-template-rows: minmax(142px,32%) 44px 1fr; border: 0; transform: translateX(102%); transition: transform .28s ease; }
  .app-shell.show-plan .detail-panel { transform: translateX(0); }
  .app-shell.show-plan .day-rail { visibility: hidden; }
  .mobile-map-back { position: absolute; z-index: 3; top: 12px; left: 12px; display: block; padding: 6px 9px; color: white; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(8,25,24,.55); cursor: pointer; font-size: .56rem; font-weight: 700; }
  .detail-topline { padding-left: 78px; }
  .tool-dock { display: block; padding: 7px; }
  .dock-home { display: none; }
  .dock-scroll { grid-auto-columns: minmax(96px, 1fr); gap: 6px; height: 100%; }
  .tool-card { grid-template-columns: 30px 1fr; gap: 6px; padding: 7px; border-radius: 8px; }
  .tool-art { width: 30px; height: 30px; border-radius: 7px; font-size: .9rem; }
  .tool-card strong { font-family: var(--sans); font-size: .52rem; font-weight: 700; }
  .tool-card small { margin-top: 2px; font-size: .41rem; }
  .tool-card > i { display: none; }
  .drawer-scrim { inset: var(--top-h) 0 var(--dock-h); }
  .info-drawer { top: calc(var(--top-h) + 6px); right: 7px; bottom: calc(var(--dock-h) + 6px); left: 7px; border-radius: 12px; }
  .drawer-header { min-height: 76px; padding: 14px 15px; }
  .drawer-header p { font-size: .54rem; }
  .drawer-body { padding: 14px; }
  .drawer-grid { grid-template-columns: repeat(2,1fr); }
  .flow-columns, .base-grid, .flight-layout { grid-template-columns: 1fr 1fr; }
  .food-directory { grid-template-columns: repeat(3,1fr); }
  .checklist-layout { grid-template-columns: 1fr; }
  .progress-card { position: static; min-height: 120px; grid-template-columns: 78px 1fr; text-align: left; }
  .progress-ring { grid-row: 1 / 4; width: 72px; height: 72px; }
  .checklist-groups { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 620px) {
  .mobile-hide { display: none; }
  .brand-copy h1 span { display: none; }
  .top-actions { gap: 5px; }
  .top-action { width: 36px; height: 38px; }
  .map-guide-button { padding: 7px 8px; }
  .map-guide-button span { display: none; }
  .atlas-map { inset: 0 -40% 0 -22%; width: 162%; height: 100%; }
  .terrain-labels .arizona-label { font-size: 30px; }
  .phx-pin { left: 16.6667%; top: 83.0882%; }
  .sedona-pin { left: 50%; top: 52.9412%; }
  .williams-pin { left: 57.7778%; top: 30.8824%; }
  .canyon-pin { left: 76.6667%; top: 13.2353%; }
  .map-pin b { font-size: .86rem; }
  .map-pin small { display: none; }
  .mini-route-key { display: none; }
  .drawer-header h2 { font-size: 1.35rem; }
  .drawer-grid, .drawer-grid.two, .flow-columns, .base-grid, .food-directory, .flight-layout, .essentials-grid, .live-link-grid, .source-groups, .route-grid { grid-template-columns: 1fr; }
  .checklist-groups { grid-template-columns: 1fr; }
  .note-grid { grid-template-columns: 1fr; }
  .drawer-card { padding: 13px; }
  .drawer-card h3 { font-size: 1.05rem; }
  .base-card { min-height: 230px; }
  .flight-toggle { grid-template-columns: 1fr; }
}

@media (max-height: 700px) and (min-width: 901px) {
  :root { --top-h: 74px; --dock-h: 108px; }
  .topbar { padding-block: 7px; }
  .crest { width: 45px; height: 52px; flex-basis: 45px; }
  .crest svg { width: 34px; height: 34px; }
  .brand-copy h1 { font-size: 1.7rem; }
  .day-rail { padding-block: 9px; }
  .day-buttons { gap: 5px; }
  .family-mode { min-height: 40px; }
  .tool-dock { padding-block: 8px; }
  .tool-art { width: 37px; height: 37px; }
  .tool-card { grid-template-columns: 37px 1fr 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: letter; margin: .45in; }
  body { height: auto; overflow: visible; color: #111; background: white; font-family: Arial, sans-serif; }
  .app-shell, .drawer-scrim, .info-drawer, .toast, .noscript { display: none !important; }
  .print-report { display: block; }
  .print-report h1, .print-report h2, .print-report h3 { font-family: Georgia, serif; font-weight: 400; }
  .print-report h1 { margin: 0; font-size: 25pt; }
  .print-report .print-meta { margin: 6px 0 22px; color: #555; }
  .print-day { break-inside: avoid; margin: 0 0 18px; padding-top: 12px; border-top: 1px solid #bbb; }
  .print-day h2 { margin: 0 0 4px; font-size: 16pt; }
  .print-day > p { margin: 3px 0 8px; font-size: 9pt; }
  .print-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
  .print-steps section { padding: 8px; border: 1px solid #ccc; font-size: 8pt; }
  .print-steps h3 { margin: 0 0 4px; font-size: 10pt; }
  .print-steps p { margin: 0; }
  .print-tools { break-before: page; }
}

/* Visual refinement v2 — larger type and a richer editorial atlas */
@media screen {
  html { font-size: 18px; }

  .topbar {
    background:
      radial-gradient(circle at 34% -60%, rgba(221, 151, 55, .18), transparent 37%),
      linear-gradient(108deg, #0d2824 0%, #14342e 62%, #0c2220 100%);
  }
  .crest {
    overflow: hidden;
    border-color: rgba(240, 182, 73, .92);
    background: linear-gradient(rgba(12,36,32,.12), rgba(12,36,32,.4)), url("assets/arizona-panorama.png") center / cover;
    box-shadow: inset 0 0 0 4px #102925, 0 7px 22px rgba(0,0,0,.3);
  }
  .crest svg { opacity: 0; }
  .brand-copy h1 { font-size: clamp(2.1rem, 2.9vw, 3.2rem); letter-spacing: -.035em; }
  .brand-copy p { margin-top: 8px; font-size: .68rem; letter-spacing: .13em; }
  .trip-stats > div { min-width: 100px; }
  .trip-stats span { font-size: 1.08rem; }
  .trip-stats strong { font-size: 1.08rem; }
  .trip-stats small { font-size: .59rem; }
  .top-action { height: 46px; padding-inline: 15px; border-color: rgba(255,250,240,.34); font-size: .76rem; }
  .top-action svg { width: 19px; height: 19px; }

  .rail-label { padding-bottom: 11px; font-size: .63rem; }
  .rail-label b { font-size: .63rem; }
  .day-buttons { gap: 8px; }
  .day-button {
    padding: 9px 12px 9px 15px;
    border-color: rgba(255,255,255,.16);
    border-radius: 9px;
    box-shadow: inset 0 1px rgba(255,255,255,.025), 0 2px 8px rgba(0,0,0,.08);
  }
  .day-button strong { font-size: 1.08rem; }
  .day-button small { margin-top: 6px; font-size: .66rem; }
  .day-button small::before { width: 8px; height: 8px; flex-basis: 8px; }
  .day-button i { font-size: 1.5rem; }
  .family-mode { min-height: 53px; padding: 9px 11px; }
  .family-mode strong { font-size: .74rem; }
  .family-mode small { font-size: .61rem; }

  .map-head { padding: 10px 18px 9px 22px; background: rgba(255,249,237,.88); }
  .map-kicker { font-size: .62rem; }
  .map-head h2 { margin-top: 3px; font-size: 1.38rem; }
  .map-guide-button { padding: 9px 12px; font-size: .68rem; }
  .map-canvas { isolation: isolate; background: #e6d2b1; }
  .map-canvas::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255,247,228,.08), transparent 34%, transparent 72%, rgba(82,52,25,.07)),
      radial-gradient(circle at 50% 42%, transparent 42%, rgba(79,52,28,.09) 100%);
    mix-blend-mode: multiply;
  }
  .map-canvas::after { z-index: 1; height: 23%; background: linear-gradient(transparent, rgba(80,50,24,.13)); }
  .relief-map-bg {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    filter: saturate(.88) contrast(.98) brightness(1.04);
  }
  .atlas-map { z-index: 2; inset: 0; width: 100%; height: 100%; color: #74583a; }
  .az-shape, .map-texture, .contours, .map-trees { display: none; }
  .terrain-labels { display: block; }
  .terrain-labels text {
    fill: rgba(28,64,52,.64);
    stroke: rgba(255,245,223,.72);
    stroke-width: 2px;
    paint-order: stroke fill;
    font-size: 18px;
    letter-spacing: 5px;
  }
  .terrain-labels .arizona-label {
    fill: rgba(130,58,34,.78);
    stroke: rgba(255,238,211,.68);
    stroke-width: 3px;
    font-size: 40px;
    letter-spacing: 9px;
  }
  .route-shadow { stroke: rgba(255,249,232,.95); stroke-width: 11; filter: drop-shadow(0 3px 3px rgba(45,33,19,.28)); }
  .route-main { stroke: #172b27; stroke-width: 5.5; }
  .route-return { stroke: #4e6e4e; stroke-width: 5; stroke-dasharray: 10 11; filter: drop-shadow(0 2px 1px rgba(255,255,255,.45)); }
  .leg-label rect { stroke-width: 1.8; filter: drop-shadow(0 4px 5px rgba(42,31,18,.24)); }
  .leg-destination { font-size: 10px; }
  .leg-road { font-size: 11.5px; }
  .leg-metric { font-size: 15.5px; }
  .compass { z-index: 5; top: 28px; left: 26px; width: 59px; height: 59px; border-color: rgba(34,47,38,.4); background: rgba(255,248,231,.73); box-shadow: 0 4px 13px rgba(58,43,24,.14); }
  .compass span { top: -21px; font-size: .86rem; }
  .compass i, .compass i::after { height: 42px; }
  .map-pin { z-index: 6; gap: 0 9px; transform: translate(-23px, -23px); }
  .map-pin span { width: 48px; height: 48px; border-width: 4px; font-size: 1.5rem; box-shadow: 0 7px 18px rgba(30,39,27,.34); }
  .map-pin b { font-size: clamp(1.25rem, 1.55vw, 1.78rem); color: #172a25; text-shadow: 0 1px 1px #fff7e5, 0 0 7px #fff6e0; }
  .map-pin small { margin-top: 5px; color: rgba(18,40,34,.74); font-size: .61rem; text-shadow: 0 1px #fff4dc; }
  .phx-pin { left: 16.6667%; top: 83.0882%; }
  .sedona-pin { left: 50%; top: 52.9412%; }
  .williams-pin { left: 57.7778%; top: 30.8824%; }
  .canyon-pin { left: 76.6667%; top: 13.2353%; }
  .mini-route-key { z-index: 5; right: 19px; top: auto; bottom: 126px; min-width: 158px; gap: 9px; padding: 15px 16px; border-color: rgba(39,48,36,.24); background: rgba(255,249,236,.9); box-shadow: 0 8px 25px rgba(43,34,22,.16); }
  .mini-route-key strong { font-size: .95rem; }
  .mini-route-key span { font-size: .59rem; }
  .mini-route-key i { width: 29px; height: 3px; }

  .detail-panel { grid-template-rows: minmax(158px, 32%) 52px minmax(0, 1fr); box-shadow: -12px 0 35px rgba(19,45,42,.12); }
  .detail-hero img { filter: saturate(1.06) contrast(1.02); }
  .detail-hero-shade { background: linear-gradient(90deg, rgba(8,27,25,.92), rgba(8,27,25,.54) 64%, rgba(8,27,25,.2)), linear-gradient(0deg, rgba(7,24,23,.7), transparent 62%); }
  .detail-topline { padding: 15px 17px 0 19px; }
  .detail-topline > span { padding: 6px 10px; font-size: .63rem; }
  .detail-topline button { width: 39px; height: 31px; font-size: 1.45rem; }
  .detail-title { right: 21px; bottom: 17px; left: 21px; }
  .detail-title p { margin-bottom: 6px; font-size: .67rem; }
  .detail-title h2 { max-width: 405px; font-size: clamp(2.25rem, 3vw, 3.35rem); line-height: .98; }
  .detail-title span { margin-top: 8px; font-size: .69rem; }
  .detail-tabs { padding: 7px 9px; }
  .detail-tabs button { font-size: .69rem; }
  .detail-scroll { padding: 15px 16px 20px; }
  .day-summary { margin-bottom: 13px; padding: 12px 14px; font-size: .9rem; line-height: 1.55; }
  .plan-list { gap: 11px; }
  .plan-step { grid-template-columns: 46px 1fr auto; gap: 13px; padding: 14px; border-radius: 11px; box-shadow: 0 4px 14px rgba(19,45,42,.06); }
  .step-icon { width: 46px; height: 46px; font-size: 1.35rem; }
  .plan-step small { margin-bottom: 5px; font-size: .61rem; }
  .plan-step h3 { font-size: 1.25rem; }
  .plan-step p { margin-top: 7px; font-size: .84rem; line-height: 1.52; }
  .plan-step a, .text-link { font-size: .64rem; }
  .heat-callout { padding: 13px; font-size: .72rem; }
  .feature-card { padding: 17px; border-radius: 12px; }
  .feature-card .card-kicker { font-size: .61rem; }
  .feature-card h3 { margin: 6px 0 8px; font-size: 1.36rem; }
  .feature-card p { font-size: .85rem; line-height: 1.55; }
  .feature-card a { margin-top: 12px; font-size: .67rem; }
  .safe-order span { font-size: .59rem; }
  .safe-order strong { font-size: .76rem; }
  .mini-card { padding: 14px; }
  .mini-card span { font-size: .57rem; }
  .mini-card strong { margin-top: 6px; font-size: 1rem; }
  .mini-card p { margin-top: 6px; font-size: .78rem; }
  .link-list a { padding: 12px; font-size: .68rem; }

  .dock-home strong { font-size: 1rem; }
  .dock-home small { font-size: .59rem; }
  .dock-home > span { font-size: 1.15rem; }
  .dock-scroll { grid-auto-columns: minmax(194px, 1fr); gap: 10px; }
  .tool-card { gap: 12px; padding: 12px; border-radius: 12px; }
  .tool-art { width: 49px; height: 49px; border-radius: 11px; font-size: 1.45rem; }
  .tool-card strong { font-size: 1.05rem; }
  .tool-card small { margin-top: 6px; font-size: .59rem; }
  .tool-card > i { font-size: 1.45rem; }

  .drawer-kicker { font-size: .64rem; }
  .drawer-header h2 { font-size: clamp(1.8rem, 2.6vw, 2.6rem); }
  .drawer-header p { font-size: .72rem; }
  .filter-chip { padding: 9px 14px; font-size: .67rem; }
  .drawer-body { padding: 22px 25px 28px; }
  .drawer-card { padding: 19px; border-radius: 13px; }
  .drawer-card .meta { font-size: .61rem; }
  .drawer-card h3 { margin: 11px 0 9px; font-size: 1.45rem; }
  .drawer-card p { font-size: .85rem; line-height: 1.58; }
  .drawer-card .chips span { padding: 5px 8px; font-size: .58rem; }
  .drawer-card a { padding-top: 15px; font-size: .66rem; }
  .drawer-note { padding: 13px 15px; font-size: .69rem; }
  .flow-card > header small { font-size: .6rem; }
  .flow-card > header h3 { font-size: 1.5rem; }
  .flow-steps strong { font-size: .76rem; }
  .flow-steps p { font-size: .68rem; line-height: 1.5; }
  .note-grid strong { font-size: .68rem; }
  .note-grid span { font-size: .64rem; }
  .base-card .pill { font-size: .61rem; }
  .base-card h3 { font-size: 2.05rem; }
  .base-card p { font-size: .75rem; }
  .base-card li { font-size: .61rem; }
  .food-directory .safe-order strong { font-size: .7rem; }
  .checklist-groups legend { font-size: .65rem; }
  .checklist-groups label { font-size: .7rem; }
  .flight-picker h3 { font-size: 1.9rem; }
  .flight-picker p, .flight-answer-large p { font-size: .73rem; }
  .flight-toggle span { font-size: .68rem; }
  .flight-answer-large .meta { font-size: .63rem; }
  .flight-answer-large h3 { font-size: 1.85rem; }
  .essential-card h3 { font-size: 1.26rem; }
  .essential-card p { font-size: .7rem; }
  .live-link-grid a { font-size: .66rem; }
  .source-group h3 { font-size: .64rem; }
  .source-group a { font-size: .66rem; }
  .route-leg h3 { font-size: 1.2rem; }
  .route-leg p, .route-leg a { font-size: .67rem; }
}

@media screen and (min-width: 1321px) {
  :root { --top-h: 98px; --dock-h: 148px; }
  .workspace { grid-template-columns: 188px minmax(500px, 1fr) minmax(420px, 455px); }
  .day-rail { padding: 16px 12px 14px; }
  .tool-dock { grid-template-columns: 178px minmax(0,1fr); padding: 12px 16px 14px; }
  .info-drawer { left: 204px; }
}

@media screen and (min-width: 1141px) and (max-width: 1320px) {
  :root { --top-h: 92px; --dock-h: 138px; }
  .workspace { grid-template-columns: 176px minmax(410px, 1fr) 418px; }
  .trip-stats > div { min-width: 84px; padding-inline: 11px; }
  .tool-dock { grid-template-columns: 158px minmax(0,1fr); }
  .info-drawer { left: 192px; }
}

@media screen and (min-width: 901px) and (max-width: 1140px) {
  :root { --top-h: 86px; --dock-h: 132px; }
  html { font-size: 17px; }
  .workspace { grid-template-columns: 158px minmax(350px, 1fr) 382px; }
  .day-button strong { font-size: 1rem; }
  .map-pin b { font-size: 1.18rem; }
  .map-pin small { display: none; }
  .mini-route-key { min-width: 139px; }
  .info-drawer { left: 174px; }
}

@media screen and (max-width: 900px) {
  html { font-size: 17px; }
  .brand-copy h1 { font-size: clamp(1.4rem, 4.2vw, 1.85rem); }
  .brand-copy p { font-size: .58rem; }
  .top-action { flex: 0 0 39px; }
  .top-action svg { flex: 0 0 19px; }
  .day-rail { height: 64px; }
  .day-buttons { grid-template-rows: 64px; }
  .map-stage { padding-top: 75px; }
  .day-button strong { font-size: .95rem; }
  .day-button small { font-size: .62rem; }
  .map-head { padding-inline: 14px; }
  .view-switch button, .map-guide-button { font-size: .66rem; }
  .compass { top: 26px; left: 19px; width: 52px; height: 52px; }
  .atlas-map, .relief-map-bg { inset: 0; width: 100%; height: 100%; }
  .map-pin span { width: 43px; height: 43px; font-size: 1.3rem; }
  .map-pin { transform: translate(-21px,-21px); }
  .map-pin b { font-size: 1.1rem; }
  .phx-pin { left: 16.6667%; top: 83.0882%; }
  .sedona-pin { left: 50%; top: 52.9412%; }
  .williams-pin { left: 57.7778%; top: 30.8824%; }
  .canyon-pin { display: block; width: 43px; height: 43px; left: 76.6667%; top: 13.2353%; }
  .canyon-pin span { position: absolute; inset: 0; grid-column: auto; grid-row: auto; }
  .canyon-pin b { position: absolute; top: 2px; right: calc(100% + 9px); grid-column: auto; grid-row: auto; width: max-content; }
  .canyon-pin small { position: absolute; top: 24px; right: calc(100% + 9px); grid-column: auto; grid-row: auto; width: max-content; }
  .leg-label--gold { transform: translate(620px, 266px); }
  .leg-label--purple { transform: translate(673px, 120px); }
  .leg-label--sage { transform: translate(6px, 610px); }
  .leg-destination { font-size: 12px; }
  .leg-road { font-size: 13px; }
  .leg-metric { font-size: 16.5px; }
  .tool-card { grid-template-columns: 34px 1fr; padding: 8px; }
  .tool-art { width: 34px; height: 34px; font-size: 1rem; }
  .tool-card strong { font-size: .75rem; }
  .tool-card small { font-size: .6rem; }
  .detail-title h2 { font-size: clamp(2rem, 8.5vw, 2.8rem); }
  .detail-topline { padding-left: 80px; }
  .detail-title p { font-size: .65rem; }
  .detail-title span { font-size: .68rem; }
  .detail-tabs button { font-size: .7rem; }
  .day-summary { font-size: .9rem; }
  .plan-step p, .feature-card p { font-size: .86rem; }
  .plan-step h3 { font-size: 1.2rem; }
  .drawer-card p { font-size: .86rem; }
}

@media screen and (max-width: 620px) {
  html { font-size: 16px; }
  .brand-copy h1 { font-size: 1.45rem; }
  .map-pin b { font-size: 1rem; }
  .mini-route-key { display: none; }
  .detail-title h2 { font-size: 2.25rem; }
  .drawer-header p { font-size: .68rem; }
  .drawer-card h3 { font-size: 1.35rem; }
}

@media screen {
  .base-card.phx-base {
    grid-column: 1 / -1;
    min-height: 220px;
  }
  .base-card.phx-base::before { background-position: 50% 72%; }
  .checklist-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .flight-itinerary { display: grid; gap: 14px; }
  .flight-tickets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .flight-ticket { overflow: hidden; color: var(--paper-2); border-radius: 14px; background: linear-gradient(135deg, #17354c, #224e69); box-shadow: var(--shadow-soft); }
  .flight-ticket.return { background: linear-gradient(135deg, #24473f, #4f705b); }
  .flight-ticket header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.16); }
  .flight-ticket header span { color: var(--sun-soft); font-size: .67rem; font-weight: 800; letter-spacing: .1em; }
  .flight-ticket header strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
  .flight-path { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 20px 22px; }
  .flight-path > div:last-child { text-align: right; }
  .flight-path b, .flight-path strong, .flight-path small { display: block; }
  .flight-path b { color: var(--sun-soft); font-family: var(--serif); font-size: 2rem; font-weight: 400; letter-spacing: .03em; }
  .flight-path strong { margin-top: 3px; font-size: 1rem; }
  .flight-path small { margin-top: 4px; color: rgba(255,250,240,.57); font-size: .65rem; }
  .flight-path i { color: var(--sun-soft); font-style: normal; font-size: 1.6rem; }
  .flight-ticket footer { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 17px; }
  .flight-ticket footer span { padding: 6px 8px; border-radius: 6px; color: rgba(255,250,240,.72); background: rgba(255,255,255,.1); font-size: .62rem; }
  .fixed-flight-plan { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(430px, 1.2fr); gap: 16px 24px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 13px; background: #f0e3cc; }
  .fixed-flight-plan h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; }
  .fixed-flight-plan p { margin: 0; color: rgba(19,45,42,.7); font-size: .8rem; line-height: 1.55; }
  .fixed-flight-plan ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 0; padding: 0; list-style: none; }
  .fixed-flight-plan li { position: relative; padding: 11px 8px; border-left: 2px solid var(--clay); background: rgba(255,255,255,.55); }
  .fixed-flight-plan li b, .fixed-flight-plan li span { display: block; }
  .fixed-flight-plan li b { color: var(--clay-dark); font-family: var(--serif); font-size: 1rem; font-weight: 400; }
  .fixed-flight-plan li span { margin-top: 3px; color: rgba(19,45,42,.62); font-size: .58rem; }
  .fixed-flight-plan > a { grid-column: 1 / -1; width: max-content; color: var(--clay-dark); font-size: .67rem; font-weight: 800; text-decoration: none; }
}

@media screen and (max-width: 900px) {
  .checklist-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flight-tickets { grid-template-columns: 1fr; }
  .fixed-flight-plan { grid-template-columns: 1fr; }
  .fixed-flight-plan ol { grid-template-columns: repeat(5, minmax(78px, 1fr)); overflow-x: auto; }
}

@media screen and (max-width: 620px) {
  .checklist-groups { grid-template-columns: 1fr; }
  .flight-path { gap: 10px; padding-inline: 17px; }
  .flight-path b { font-size: 1.7rem; }
  .fixed-flight-plan { padding: 16px; }
  .fixed-flight-plan h3 { font-size: 1.45rem; }
  .fixed-flight-plan p { font-size: .84rem; }
}
