:root {
  --night: #102d30;
  --night-2: #173f42;
  --night-3: #23575a;
  --paper: #f3eee4;
  --paper-deep: #e8dfd0;
  --surface: #fffdf8;
  --ink: #1c2726;
  --muted: #66706c;
  --line: #d8d1c5;
  --orange: #e66f3d;
  --orange-dark: #b94b26;
  --amber: #dca53a;
  --green: #477760;
  --green-soft: #e7f0e9;
  --danger: #a33c2d;
  --danger-soft: #f6e5df;
  --shadow: 0 18px 50px rgba(26, 42, 39, .09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -8%, rgba(230, 111, 61, .13), transparent 32rem),
    radial-gradient(circle at 96% 12%, rgba(35, 87, 90, .11), transparent 34rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--night);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid rgba(230, 111, 61, .55);
  outline-offset: 3px;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--night);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50% 50% 50% 12px;
  background: var(--night);
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.save-state {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 253, 248, .72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(220, 165, 58, .14); }
.save-state.is-saved .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(71, 119, 96, .14); }
.save-state.is-error .status-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(163, 60, 45, .12); }

.icon-btn {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--night);
  cursor: pointer;
  font-size: 19px;
  transition: transform .18s ease, background .18s ease;
}

.icon-btn:hover { background: var(--paper-deep); transform: translateY(-1px); }
.icon-btn.subtle { width: 40px; height: 40px; background: transparent; }

.trip-hero {
  position: relative;
  min-height: 326px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  gap: 32px;
  border-radius: 34px;
  padding: 44px 48px;
  background:
    linear-gradient(130deg, rgba(255,255,255,.025), rgba(255,255,255,0) 46%),
    var(--night);
  color: var(--surface);
  box-shadow: 0 24px 60px rgba(12, 39, 41, .2);
  isolation: isolate;
}

.trip-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}

.trip-hero::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -178px;
  z-index: -1;
  width: 560px;
  height: 430px;
  border: 2px solid rgba(238, 183, 100, .34);
  border-radius: 55% 45% 48% 52%;
  transform: rotate(-18deg);
  box-shadow: inset 0 0 0 42px rgba(230,111,61,.035), inset 0 0 0 86px rgba(255,255,255,.025);
}

.hero-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  right: 70px;
  top: 25px;
  border-radius: 50%;
  background: rgba(230, 111, 61, .26);
  filter: blur(80px);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; }
.eyebrow, .kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--orange-dark); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { color: #efc696; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(230,111,61,.15); }

.hero-copy h1 {
  margin: 17px 0 13px;
  max-width: 720px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6.2vw, 84px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .91;
}

.hero-copy h1 em { color: #efb35f; font-weight: 500; }
.hero-copy p { margin: 0; color: rgba(255, 253, 248, .68); font-size: 14px; }

.hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 36px;
}

.countdown {
  display: flex;
  width: 126px;
  height: 126px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.countdown strong { font-family: Georgia, serif; font-size: 43px; line-height: .95; }
.countdown span { margin-top: 7px; color: rgba(255,255,255,.65); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.route-wordmark { display: flex; width: 100%; max-width: 370px; align-items: center; }
.route-wordmark span { color: rgba(255,255,255,.74); font-size: 9px; font-weight: 900; letter-spacing: .07em; }
.route-wordmark i { position: relative; flex: 1; height: 1px; margin: 0 5px; background: rgba(255,255,255,.25); }
.route-wordmark i::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }

.desktop-tabs {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: fit-content;
  display: flex;
  gap: 5px;
  margin: 18px auto 0;
  border: 1px solid rgba(216, 209, 197, .84);
  border-radius: 17px;
  padding: 5px;
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 30px rgba(28,39,38,.1);
  backdrop-filter: blur(18px);
}

.tab-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: color .18s ease, background .18s ease;
}

.tab-button span { margin-right: 5px; font-size: 16px; }
.tab-button:hover { color: var(--night); background: var(--paper); }
.tab-button.is-active { color: var(--surface); background: var(--night); box-shadow: 0 8px 16px rgba(16,45,48,.2); }

main { padding-top: 48px; }
.tab-panel { animation: panel-in .32s ease both; }
.tab-panel[hidden] { display: none; }

@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 25px;
}

.section-heading h2 {
  margin: 6px 0 5px;
  color: var(--night);
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 45px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.section-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; }
.quiet-button { min-height: 44px; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; background: transparent; color: var(--night); cursor: pointer; font-size: 13px; font-weight: 800; white-space: nowrap; }
.quiet-button:hover { border-color: var(--orange); color: var(--orange-dark); }

.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.primary-button { border: 1px solid var(--night); background: var(--night); color: var(--surface); }
.primary-button:hover { background: var(--night-2); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--night); }
.secondary-button:hover { border-color: var(--night); transform: translateY(-1px); }

.day-strip-wrap { position: relative; margin: 0 -4px 18px; overflow: hidden; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }
.day-chip {
  min-width: 100px;
  min-height: 61px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 9px 12px;
  background: rgba(255,253,248,.64);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.day-chip strong { color: var(--night); font-size: 13px; }
.day-chip small { margin-top: 2px; font-size: 10px; font-weight: 700; }
.day-chip:hover { border-color: var(--night-3); }
.day-chip.is-active { border-color: var(--night); background: var(--night); color: rgba(255,255,255,.66); box-shadow: 0 9px 24px rgba(16,45,48,.16); }
.day-chip.is-active strong { color: #fff; }
.day-chip.is-slow::after { content: "yavaş"; position: absolute; }

.today-card {
  overflow: hidden;
  border: 1px solid rgba(216, 209, 197, .8);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.today-top {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 30px;
  padding: 32px 34px 28px;
  background: linear-gradient(135deg, #fffdf8, #f4ede1);
}

.day-number { display: inline-flex; align-items: center; gap: 8px; color: var(--orange-dark); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.day-number::before { content: ""; width: 24px; height: 2px; background: var(--orange); }
.today-top h2 { margin: 10px 0 9px; color: var(--night); font-family: Georgia, serif; font-size: clamp(31px, 4.4vw, 55px); font-weight: 500; letter-spacing: -.04em; line-height: 1.02; }
.today-top .lede { max-width: 650px; margin: 0; color: var(--muted); font-size: 14px; }

.drive-card {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(16,45,48,.16);
  border-radius: 20px;
  background: var(--night);
  color: #fff;
}

.drive-card > div { display: flex; justify-content: center; flex-direction: column; padding: 19px; }
.drive-card > div + div { border-left: 1px solid rgba(255,255,255,.12); }
.drive-card small { color: rgba(255,255,255,.58); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.drive-card strong { margin-top: 5px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.drive-card .risk { grid-column: 1 / -1; min-height: 45px; align-items: center; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.12); color: #f0c790; font-size: 11px; font-weight: 800; text-align: center; }

.today-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); border-top: 1px solid var(--line); }
.today-main { padding: 28px 34px 34px; }
.today-side { padding: 28px; border-left: 1px solid var(--line); background: #faf6ef; }
.block-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; color: var(--night); font-size: 13px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.block-title span { color: var(--muted); font-size: 10px; letter-spacing: 0; text-transform: none; }

.schedule { display: grid; gap: 2px; margin-bottom: 27px; }
.schedule-item { display: grid; grid-template-columns: 58px 12px 1fr; align-items: start; gap: 10px; min-height: 42px; color: var(--muted); font-size: 13px; }
.schedule-item time { color: var(--night); font-size: 12px; font-weight: 900; }
.schedule-dot { width: 9px; height: 9px; margin-top: 5px; border: 2px solid var(--orange); border-radius: 50%; box-shadow: 0 0 0 4px rgba(230,111,61,.09); }
.schedule-item strong { color: var(--ink); font-weight: 750; }

.task-list { display: grid; gap: 8px; }
.task-row { position: relative; display: flex; min-height: 49px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 9px 13px; background: #fff; cursor: pointer; }
.task-row:hover { border-color: #aaa397; }
.task-row input { position: absolute; opacity: 0; }
.fake-check { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border: 1.5px solid #a9aaa4; border-radius: 7px; color: transparent; font-size: 13px; }
.task-row input:focus-visible + .fake-check { outline: 3px solid rgba(230,111,61,.4); outline-offset: 2px; }
.task-row input:checked + .fake-check { border-color: var(--green); background: var(--green); color: #fff; }
.task-row input:checked ~ span:last-child { color: #818985; text-decoration: line-through; }
.task-row > span:last-child { font-size: 13px; font-weight: 650; }

.option-stack { display: grid; gap: 9px; }
.option-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--surface); }
.option-card strong { display: block; color: var(--night); font-size: 13px; }
.option-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.option-card.go { border-color: rgba(71,119,96,.3); background: var(--green-soft); }
.option-card.skip { background: #f0ede6; }

.stay-mini { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 17px; }
.stay-mini > span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.stay-mini strong { display: block; margin-top: 5px; color: var(--night); font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.stay-mini small { display: block; margin-top: 2px; color: var(--muted); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.quick-actions a, .quick-actions button { min-height: 45px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--night); cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 850; }
.quick-actions a:first-child { border-color: var(--night); background: var(--night); color: #fff; }

.utility-grid { display: grid; grid-template-columns: 1.1fr 1fr .8fr; gap: 16px; margin-top: 17px; }
.panel { border: 1px solid rgba(216,209,197,.88); border-radius: var(--radius-md); padding: 23px; background: rgba(255,253,248,.9); box-shadow: 0 10px 34px rgba(28,39,38,.05); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel-heading.compact { margin-bottom: 12px; }
.panel-heading h3 { margin: 3px 0 0; color: var(--night); font-family: Georgia, serif; font-size: 23px; font-weight: 500; letter-spacing: -.02em; }
.panel-heading > strong { color: var(--night); font-size: 13px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--amber)); transition: width .3s ease; }
.check-list { display: grid; gap: 3px; margin-top: 13px; }
.mini-check { position: relative; display: flex; min-height: 39px; align-items: center; gap: 9px; border-radius: 10px; padding: 6px 4px; cursor: pointer; }
.mini-check:hover { background: var(--paper); }
.mini-check input { position: absolute; opacity: 0; }
.mini-check .fake-check { width: 19px; height: 19px; flex-basis: 19px; border-radius: 6px; font-size: 11px; }
.mini-check span:last-child { color: var(--muted); font-size: 12px; font-weight: 650; }
.mini-check input:checked ~ span:last-child { color: #8a918e; text-decoration: line-through; }

.weather-panel { background: var(--night); color: #fff; }
.weather-panel .kicker { color: #efb35f; }
.weather-panel .panel-heading h3 { color: #fff; }
.weather-panel .icon-btn { border-color: rgba(255,255,255,.2); color: #fff; }
.weather-content { color: rgba(255,255,255,.72); font-size: 13px; }
.forecast-lock { display: grid; place-items: center; min-height: 120px; text-align: center; }
.forecast-lock strong { display: block; margin-bottom: 5px; color: #fff; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.forecast-list { display: grid; gap: 8px; }
.forecast-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.forecast-row:first-child { border-top: 0; padding-top: 0; }
.forecast-row strong { color: #fff; }
.forecast-row span { font-size: 11px; }

.quality-badge { border-radius: 99px; padding: 5px 9px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 900; white-space: nowrap; }
.metric-list { display: grid; gap: 3px; }
.metric-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.metric-list div:last-child { border-bottom: 0; }
.metric-list span { color: var(--muted); font-size: 11px; }
.metric-list strong { color: var(--night); font-family: Georgia, serif; font-size: 16px; font-weight: 600; }

.feasibility-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  border: 1px solid rgba(163,60,45,.25);
  border-radius: 17px;
  padding: 14px 16px;
  background: var(--danger-soft);
}
.feasibility-alert .alert-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 900; }
.feasibility-alert strong, .feasibility-alert small { display: block; }
.feasibility-alert strong { color: #69291f; font-size: 13px; }
.feasibility-alert small { margin-top: 2px; color: #87594f; font-size: 11px; }
.feasibility-alert a { min-height: 40px; display: inline-flex; align-items: center; border-bottom: 1px solid currentColor; color: #69291f; font-size: 12px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.feasibility-alert.is-clear { border-color: rgba(71,119,96,.28); background: var(--green-soft); }
.feasibility-alert.is-clear .alert-icon { background: var(--green); }
.feasibility-alert.is-clear strong, .feasibility-alert.is-clear a { color: #2e5c46; }
.feasibility-alert.is-clear small { color: #577264; }

.change-story { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; margin-bottom: 34px; border: 1px solid var(--line); border-radius: 20px; padding: 21px 24px; background: rgba(255,253,248,.75); }
.change-story p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.change-label { display: inline-flex; border-radius: 99px; padding: 4px 8px; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.change-label.old { background: #e9e5dd; color: #777b77; }
.change-label.new { background: var(--green-soft); color: var(--green); }
.change-arrow { color: var(--orange); font-family: Georgia, serif; font-size: 34px; }

.route-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.route-timeline { position: relative; display: grid; gap: 12px; }
.route-timeline::before { content: ""; position: absolute; top: 25px; bottom: 25px; left: 27px; width: 2px; background: linear-gradient(var(--orange), var(--amber), var(--night-3)); }
.route-day { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 13px; }
.route-index { position: relative; z-index: 1; display: grid; width: 56px; height: 56px; place-items: center; border: 5px solid var(--paper); border-radius: 50%; background: var(--night); color: #fff; font-family: Georgia, serif; font-size: 19px; }
.route-day.is-slow .route-index { background: var(--green); }
.route-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.route-toggle { width: 100%; min-height: 82px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 15px; border: 0; padding: 16px 19px; background: transparent; cursor: pointer; text-align: left; }
.route-toggle:hover { background: #faf6ef; }
.route-date { color: var(--orange-dark); font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.route-toggle h3 { margin: 4px 0 0; color: var(--night); font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.route-summary { display: flex; align-items: center; gap: 8px; }
.route-summary span { border: 1px solid var(--line); border-radius: 99px; padding: 5px 8px; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.route-chevron { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--paper); color: var(--night); transition: transform .2s ease; }
.route-toggle[aria-expanded="true"] .route-chevron { transform: rotate(180deg); }
.route-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.route-detail.is-open { grid-template-rows: 1fr; }
.route-detail > div { overflow: hidden; }
.route-detail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding: 19px; }
.route-detail h4 { margin: 0 0 8px; color: var(--night); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.route-detail ul { margin: 0; padding: 0; list-style: none; }
.route-detail li { position: relative; margin: 7px 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.route-detail li::before { content: ""; position: absolute; top: 7px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.route-detail .optional li::before { background: var(--amber); }
.route-decision { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 13px; padding: 12px 14px; background: var(--paper); color: var(--muted); font-size: 12px; }
.route-decision strong { color: var(--night); }
.route-decision a { min-height: 38px; display: inline-flex; align-items: center; color: var(--night); font-weight: 850; text-decoration: none; white-space: nowrap; }
.route-aside { display: grid; gap: 14px; }
.sticky-card { position: sticky; top: 90px; }
.route-aside h3 { margin: 7px 0 9px; color: var(--night); font-family: Georgia, serif; font-size: 26px; font-weight: 500; line-height: 1.08; }
.route-aside p { margin: 0; color: var(--muted); font-size: 12px; }
.rule-list { display: grid; gap: 10px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.rule-list span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.rule-list i { width: 8px; height: 8px; border-radius: 50%; }
.rule-list .green { background: var(--green); }.rule-list .amber { background: var(--amber); }.rule-list .gray { background: #9ea39f; }
.border-note { border-color: rgba(163,60,45,.25); background: var(--danger-soft); }
.border-note a { display: inline-flex; min-height: 40px; align-items: center; margin-top: 12px; color: var(--danger); font-size: 11px; font-weight: 850; }
.travel-links { display: grid; gap: 2px; margin-top: 13px; }
.travel-links a { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 750; text-decoration: none; }
.travel-links a:first-child { border-top: 0; }
.travel-links a:hover { color: var(--night); }
.travel-links b { color: var(--orange-dark); }

.vehicle-gate { border: 1px solid rgba(163,60,45,.24); border-radius: 20px; padding: 22px; background: var(--danger-soft); }
.vehicle-gate h3 { margin: 5px 0 8px; color: #69291f; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.vehicle-gate p { margin: 0; color: #87594f; font-size: 12px; }
.fallback-route { display: grid; gap: 4px; margin-top: 14px; border: 1px solid rgba(163,60,45,.18); border-radius: 12px; padding: 11px; background: rgba(255,255,255,.42); }
.fallback-route strong { color: #69291f; font-size: 11px; }
.fallback-route span { color: #87594f; font-size: 10px; line-height: 1.45; }
.fallback-route a { min-height: 36px; display: inline-flex; align-items: center; color: #69291f; font-size: 10px; font-weight: 850; }
.permission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
.permission-grid a { min-height: 42px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(163,60,45,.18); border-radius: 11px; padding: 8px 10px; background: rgba(255,255,255,.45); color: #69291f; font-size: 10px; font-weight: 800; text-decoration: none; }

.stay-progress { margin-bottom: 16px; }
.stay-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.stay-progress h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.stay-progress strong { color: var(--green); font-size: 13px; }
.stay-progress .progress-track { margin-top: 13px; }
.stay-progress small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.base-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 28px; }
.base-card { min-height: 124px; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: rgba(255,253,248,.65); }
.base-card span { color: var(--orange-dark); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.base-card h3 { margin: 5px 0 4px; color: var(--night); font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.base-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.stay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.stay-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 30px rgba(28,39,38,.05); }
.stay-card-head { position: relative; min-height: 116px; padding: 20px; background: var(--night); color: #fff; }
.stay-card-head::after { content: ""; position: absolute; right: -28px; bottom: -46px; width: 150px; height: 105px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.platform-pill { display: inline-flex; border-radius: 99px; padding: 4px 8px; background: rgba(255,255,255,.12); color: #efc696; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.stay-card-head h3 { position: relative; z-index: 1; margin: 11px 0 3px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.stay-card-head p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.64); font-size: 11px; }
.stay-card-body { padding: 17px; }
.stay-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stay-fact { border-radius: 11px; padding: 9px; background: var(--paper); }
.stay-fact small, .stay-fact strong { display: block; }
.stay-fact small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.stay-fact strong { margin-top: 2px; color: var(--night); font-size: 12px; }
.stay-notes { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.stay-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 12px 17px; }
.stay-card-actions a, .stay-card-actions button { min-height: 38px; display: inline-flex; align-items: center; border: 0; background: transparent; color: var(--night); cursor: pointer; font-size: 11px; font-weight: 850; text-decoration: none; }
.stay-card-actions button { color: var(--danger); }
.empty-state { grid-column: 1 / -1; display: grid; min-height: 190px; place-items: center; border: 1px dashed #b8b1a5; border-radius: 20px; padding: 25px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--night); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }

.total-chip { border-radius: 15px; padding: 12px 17px; background: var(--night); color: #fff; font-family: Georgia, serif; font-size: 24px; font-weight: 500; white-space: nowrap; }
.people-row { display: grid; grid-template-columns: 220px 1fr; gap: 25px; align-items: center; margin-bottom: 14px; }
.people-row .panel-heading { margin: 0; }
.people-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.people-inputs input { text-align: center; }
.balance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.balance-card { border: 1px solid var(--line); border-radius: 17px; padding: 16px; background: var(--surface); }
.balance-card.is-credit { border-color: rgba(71,119,96,.35); }.balance-card.is-debt { border-color: rgba(163,60,45,.3); }
.balance-card > span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.balance-card strong { display: block; margin-top: 5px; color: var(--night); font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.balance-card.is-credit strong { color: var(--green); }.balance-card.is-debt strong { color: var(--danger); }
.balance-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }

.budget-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 14px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.span-2 { grid-column: span 2; }.span-4 { grid-column: span 4; }
.field-group { min-width: 0; }
.field-group label, .beneficiary-field legend { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .03em; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  font-size: 13px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--night-3); box-shadow: 0 0 0 3px rgba(35,87,90,.11); }
.beneficiary-field { margin: 0; border: 0; padding: 0; }
.beneficiary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.beneficiary-grid label { position: relative; display: flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; }
.beneficiary-grid input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.beneficiary-grid label:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.settlement-list { display: grid; gap: 8px; }
.settlement-row { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: #fff; font-size: 11px; }
.settlement-row span { color: var(--muted); }.settlement-row b { color: var(--night); }.settlement-row > strong { color: var(--orange-dark); white-space: nowrap; }
.all-square { border-radius: 13px; padding: 16px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 800; text-align: center; }
.payment-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.payment-details summary { min-height: 42px; display: flex; align-items: center; color: var(--night); cursor: pointer; font-size: 11px; font-weight: 850; }
.payment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 9px; }
.payment-form .secondary-button { grid-column: 1 / -1; }
.payment-history { display: grid; gap: 6px; margin-top: 10px; }
.payment-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 9px; padding: 8px; background: var(--paper); color: var(--muted); font-size: 10px; }
.payment-row button { min-width: 38px; min-height: 38px; border: 0; background: transparent; color: var(--danger); cursor: pointer; font-weight: 800; }

.ledger-panel, .budget-estimate { margin-top: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { border-bottom: 1px solid var(--line); padding: 10px; color: var(--muted); font-size: 9px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { border-bottom: 1px solid #e7e1d8; padding: 12px 10px; color: var(--muted); }
td strong { color: var(--night); }
td button { min-width: 38px; min-height: 38px; border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 11px; font-weight: 850; }
.expense-cards { display: none; }
.estimate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.estimate-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 11px; padding: 10px; background: var(--paper); color: var(--muted); font-size: 10px; }
.estimate-item strong { color: var(--night); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(8,25,27,.68);
  backdrop-filter: blur(9px);
}
.modal-backdrop[hidden] { display: none; }
.modal { width: min(680px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid rgba(255,255,255,.2); border-radius: 25px; padding: 25px; background: var(--paper); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.modal-header h2 { margin: 4px 0; color: var(--night); font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.modal-header p { margin: 0; color: var(--muted); font-size: 11px; }
.modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding-top: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 15px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  max-width: 350px;
  transform: translateY(20px);
  opacity: 0;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 13px;
  padding: 12px 15px;
  background: var(--night);
  color: #fff;
  box-shadow: 0 16px 42px rgba(16,45,48,.25);
  pointer-events: none;
  font-size: 12px;
  font-weight: 750;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { transform: none; opacity: 1; }
.toast.is-error { background: var(--danger); }

.mobile-nav { display: none; }

@media (max-width: 980px) {
  .trip-hero { grid-template-columns: 1fr; align-items: start; padding: 38px; }
  .hero-side { align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .countdown { width: 100px; height: 100px; }
  .route-wordmark { align-self: flex-end; }
  .utility-grid { grid-template-columns: 1fr 1fr; }
  .pulse-panel { grid-column: 1 / -1; }
  .route-layout { grid-template-columns: 1fr; }
  .route-aside { grid-template-columns: 1fr 1fr; }
  .sticky-card { position: static; }
  .base-grid { grid-template-columns: repeat(3, 1fr); }
  .stay-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .budget-layout { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: repeat(2,1fr); }
  .estimate-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .app-shell { width: min(100% - 22px, 620px); padding-bottom: 16px; }
  .topbar { height: 64px; }
  .save-state { min-height: 34px; padding: 6px 9px; font-size: 10px; }
  #printButton { display: none; }
  .trip-hero { min-height: 330px; gap: 28px; border-radius: 25px; padding: 28px 24px; }
  .trip-hero::after { right: -210px; }
  .hero-copy h1 { font-size: clamp(42px, 14vw, 64px); }
  .hero-copy p { font-size: 12px; }
  .hero-side { align-items: flex-end; }
  .countdown { width: 88px; height: 88px; }
  .countdown strong { font-size: 32px; }
  .route-wordmark { max-width: 235px; }
  .route-wordmark span { font-size: 7px; }
  .desktop-tabs { display: none; }
  main { padding-top: 32px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 18px; }
  .section-heading h2 { font-size: 31px; }
  .section-heading .primary-button { width: 100%; }
  .quiet-button { align-self: flex-start; }
  .day-strip-wrap { margin-right: -11px; }
  .day-chip { min-width: 91px; }
  .feasibility-alert { grid-template-columns: auto 1fr; }
  .feasibility-alert a { grid-column: 2; justify-self: start; }
  .today-top { grid-template-columns: 1fr; padding: 24px 20px 20px; }
  .today-top h2 { font-size: 37px; }
  .drive-card { min-height: 112px; }
  .drive-card > div { padding: 14px; }
  .drive-card strong { font-size: 20px; }
  .today-body { grid-template-columns: 1fr; }
  .today-main, .today-side { padding: 22px 20px; }
  .today-side { border-top: 1px solid var(--line); border-left: 0; }
  .utility-grid { grid-template-columns: 1fr; }
  .pulse-panel { grid-column: auto; }
  .change-story { grid-template-columns: 1fr; gap: 13px; padding: 18px; }
  .change-arrow { transform: rotate(90deg); justify-self: center; line-height: .7; }
  .route-heading { align-items: stretch; }
  .route-day { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
  .route-timeline::before { left: 20px; }
  .route-index { width: 42px; height: 42px; border-width: 4px; font-size: 15px; }
  .route-toggle { min-height: 76px; padding: 13px; }
  .route-toggle h3 { font-size: 18px; }
  .route-summary span { display: none; }
  .route-summary span:first-child { display: inline-flex; }
  .route-detail-inner { grid-template-columns: 1fr; padding: 15px; }
  .route-decision { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .route-aside { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
  .base-grid { display: flex; overflow-x: auto; margin-right: -11px; padding-bottom: 9px; }
  .base-card { min-width: 180px; }
  .stay-grid { grid-template-columns: 1fr; }
  .people-row { grid-template-columns: 1fr; gap: 13px; }
  .people-inputs { grid-template-columns: repeat(2, 1fr); }
  .balance-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .balance-card { padding: 13px; }
  .balance-card strong { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2, .form-grid .span-4 { grid-column: 1 / -1; }
  .beneficiary-grid { grid-template-columns: repeat(2,1fr); }
  .table-wrap { display: none; }
  .expense-cards { display: grid; gap: 8px; }
  .expense-card { border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: #fff; }
  .expense-card-top, .expense-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .expense-card strong { color: var(--night); font-size: 12px; }
  .expense-card b { color: var(--night); }
  .expense-card p { margin: 6px 0; color: var(--muted); font-size: 10px; }
  .expense-card small { color: var(--muted); }
  .expense-card button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 11px; font-weight: 850; }
  .estimate-grid { grid-template-columns: 1fr; }
  .budget-estimate .panel-heading { align-items: flex-start; flex-direction: column; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: calc(94dvh - env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; padding: 21px 17px calc(18px + env(safe-area-inset-bottom)); }
  .modal-form { grid-template-columns: 1fr; }
  .modal-form .span-2 { grid-column: auto; }
  .modal-actions { grid-column: auto; }
  .toast { right: 11px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 11px; max-width: none; text-align: center; }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(216,209,197,.9);
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255,253,248,.94);
    box-shadow: 0 -12px 35px rgba(16,45,48,.11);
    backdrop-filter: blur(18px);
  }
  .mobile-nav-button { min-height: 51px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; }
  .mobile-nav-button span { font-size: 19px; line-height: 1; }
  .mobile-nav-button small { font-size: 9px; font-weight: 850; }
  .mobile-nav-button.is-active { background: var(--night); color: #fff; }
}

@media (max-width: 420px) {
  .route-wordmark { display: none; }
  .hero-side { justify-content: flex-start; }
  .balance-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}

@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 {
  body { background: #fff; }
  .app-shell { width: 100%; padding: 0; }
  .topbar, .desktop-tabs, .mobile-nav, .quiet-button, .primary-button, .secondary-button, .icon-btn, .toast { display: none !important; }
  .trip-hero { min-height: 220px; border-radius: 0; box-shadow: none; print-color-adjust: exact; }
  main { padding-top: 24px; }
  .tab-panel { display: block !important; margin-bottom: 35px; }
  .tab-panel[hidden] { display: block !important; }
  .today-card, .panel, .route-card { break-inside: avoid; box-shadow: none; }
  .route-detail { grid-template-rows: 1fr; }
}
