:root {
  color-scheme: light;
  --ink: #19352f;
  --muted: #6d7974;
  --paper: #f5f1e8;
  --card: #fffdf8;
  --line: #dedbd1;
  --accent: #e9683a;
  --accent-dark: #c94f27;
  --green-soft: #dce9dc;
  --trip-surface: #e6efe8;
  --trip-surface-strong: #d4e4d8;
  --trip-accent: #446b59;
  --charge-surface: #f7e7dd;
  --charge-surface-strong: #f1d8ca;
  --shadow: 0 16px 42px rgba(38, 52, 47, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 0%, rgba(224, 107, 62, 0.11), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px max(42px, env(safe-area-inset-bottom));
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 24px;
}
.hero-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.hero-topline .eyebrow { margin-bottom: 0; }
.app-version { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.66rem; font-weight: 850; letter-spacing: 0.04em; }

.dashboard { display: grid; gap: 14px; margin-bottom: 16px; scroll-margin-top: 82px; }
.dashboard-heading { padding: 0 4px 2px; }
.numbered-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.numbered-heading .eyebrow { margin-bottom: 3px; }
.backup-reminder { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 16px 15px; border: 1px solid rgba(201, 79, 39, 0.22); border-radius: 18px; background: #fff4ef; box-shadow: 0 10px 26px rgba(201, 79, 39, 0.08); }
.backup-reminder strong { display: block; margin-bottom: 4px; font-size: 0.92rem; }
.backup-reminder p { margin: 0 0 9px; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.backup-reminder a { color: var(--accent-dark); font-size: 0.82rem; font-weight: 850; text-underline-offset: 3px; }
.backup-reminder button { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(201, 79, 39, 0.12); color: var(--accent-dark); font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer; }
.backup-reminder button:active { background: rgba(201, 79, 39, 0.22); transform: translateY(1px); }
.dashboard-card { padding: 20px 18px 18px; }
.dashboard-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dashboard-card-heading h2 a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 4px; }
.dashboard-card-heading h2 a:active { opacity: 0.68; }
.section-title-link { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 4px; }
.section-title-link:active { opacity: 0.68; }
.dashboard-status { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: var(--green-soft); color: var(--ink); font-size: 0.7rem; font-weight: 850; }
.dashboard-status-neutral { background: #f0eee7; color: var(--muted); }
.dashboard-primary-value { display: block; margin-bottom: 13px; font-size: 1.08rem; line-height: 1.3; }
.dashboard-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.dashboard-secondary-value { margin: -6px 0 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.dashboard-facts { display: grid; gap: 0; margin: 0; }
.dashboard-facts div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.dashboard-facts dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.dashboard-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: 0.86rem; font-weight: 800; line-height: 1.35; }
.dashboard-button { width: 100%; min-height: 50px; margin-top: 16px; border: 0; border-radius: 15px; background: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(201, 79, 39, 0.18); font-size: 0.95rem; font-weight: 850; cursor: pointer; }
.dashboard-button:active { transform: translateY(1px); background: var(--accent-dark); }
.trip-surface .dashboard-button { background: var(--trip-accent); box-shadow: 0 10px 20px rgba(68, 107, 89, 0.18); }
.trip-surface .dashboard-button:active { background: var(--ink); }
.dashboard-trip-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.dashboard-trip-actions .dashboard-button { margin-top: 0; }
.dashboard-action-status { margin: 10px 0 0; color: var(--trip-accent); font-size: 0.75rem; font-weight: 800; text-align: center; }

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(2.2rem, 9vw, 3.3rem); line-height: 1; letter-spacing: -0.045em; }
h2 { margin-bottom: 0; font-size: 1.28rem; letter-spacing: -0.025em; }
.copyright { margin: -1px 0 5px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.nav-shell { position: sticky; top: 0; z-index: 20; margin: 0 -18px 16px; }
.nav-toggle { display: none; }
.quick-nav { display: flex; gap: 7px; overflow-x: auto; padding: 9px 18px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-overflow-scrolling: touch; }
.quick-nav a { flex: 0 0 auto; min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px 0 7px; border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: 0 8px 18px rgba(38, 52, 47, 0.05); font-size: 0.74rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.nav-step { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.65rem; font-weight: 850; }
.quick-nav a:active { transform: translateY(1px); background: #e7eee6; }
#dashboard, #charge-form, #travel-title, #trip-browser, #summary-title, #settings-title { scroll-margin-top: 92px; }

.charge-mark {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: rotate(-8deg);
}
.charge-mark::before, .charge-mark::after { content: ""; position: absolute; background: var(--ink); border-radius: 9px; }
.charge-mark::before { width: 5px; height: 18px; left: 17px; top: -9px; box-shadow: 21px 0 var(--ink); }
.charge-mark::after { width: 24px; height: 10px; left: 17px; bottom: -3px; }
.charge-mark span { position: absolute; width: 17px; height: 23px; left: 22px; top: 18px; background: var(--accent); clip-path: polygon(48% 0, 100% 0, 63% 42%, 93% 42%, 29% 100%, 44% 55%, 12% 55%); }

.charge-form { display: grid; gap: 14px; }
.card { background: color-mix(in srgb, var(--card) 95%, transparent); border: 1px solid rgba(25, 53, 47, 0.09); border-radius: 24px; box-shadow: var(--shadow); }
.card.trip-surface { background: var(--trip-surface); }
.card.charge-surface { background: var(--charge-surface); }
.form-card { padding: 22px 18px; }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-heading-actions { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.step { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: white; font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.section-home-step { cursor: pointer; }
.section-home-step:active { transform: translateY(1px); background: var(--accent-dark); }
.edit-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px 0 15px; padding: 11px 12px; border-radius: 14px; background: #e7eee6; color: var(--ink); font-size: 0.78rem; font-weight: 750; }
.edit-banner button { border: 0; background: transparent; color: var(--accent-dark); font-size: 0.76rem; font-weight: 850; cursor: pointer; white-space: nowrap; }
.charge-help { margin: 2px 0 -2px; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

.field { display: grid; gap: 8px; margin-top: 16px; color: var(--ink); font-size: 0.86rem; font-weight: 750; }
.field-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-title-row label { cursor: pointer; }
.field-clear-button { border: 0; border-radius: 999px; padding: 6px 10px; background: #f6dfd4; color: var(--accent-dark); font-size: 0.68rem; font-weight: 850; cursor: pointer; }
.field-clear-button:active { transform: translateY(1px); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="date"], .input-unit, .custom-target {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
input[type="date"] { width: 100%; padding: 0 14px; color: var(--ink); }
.input-unit { display: flex; align-items: center; padding: 0 13px; }
.input-unit input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1.08rem; font-weight: 700; }
.input-unit b { color: var(--muted); font-size: 0.79rem; }
textarea { width: 100%; min-height: 92px; border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 650; line-height: 1.35; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a3aaa6; opacity: 1; }
.trip-consumption { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; padding: 13px; border-radius: 15px; background: #f0eee7; }
.trip-consumption span:last-child { text-align: right; }
.trip-consumption small, .trip-consumption strong { display: block; }
.trip-consumption small { margin-bottom: 3px; color: var(--muted); font-size: 0.65rem; font-weight: 700; }
.trip-consumption strong { font-size: 0.88rem; }
.trip-consumption.ready { background: #e7eee6; }
.trip-consumption.ready span:last-child strong { color: var(--accent-dark); }
.month-consumption { margin-top: 8px; }
.month-consumption .month-energy { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid rgba(25, 53, 47, 0.12); text-align: left; }
.month-consumption.ready .month-energy strong { color: var(--ink); }

fieldset { padding: 0; border: 0; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice-row label { position: relative; }
.choice-row input, .location-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row span { display: grid; place-items: center; min-height: 47px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.choice-row input:checked + span { border-color: var(--ink); background: var(--ink); color: white; }
.custom-target { display: flex; align-items: center; margin-top: 9px; padding: 0 14px; }
.custom-target input { width: 100%; border: 0; outline: 0; font-size: 1rem; }


.location-details summary, .trip-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--ink); font-weight: 850; cursor: pointer; list-style: none; }
.location-details summary::-webkit-details-marker, .trip-details summary::-webkit-details-marker { display: none; }
.location-details summary::after, .trip-details summary::after { content: "↓"; display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: rgba(233, 104, 58, 0.14); color: var(--accent-dark); font-size: 0.78rem; font-weight: 900; }
.location-details[open] summary, .trip-details[open] summary { margin-bottom: 12px; }
.location-details[open] summary::after, .trip-details[open] summary::after { content: "↑"; }
.location-details summary small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 0.66rem; font-weight: 750; }
.location-details summary strong { display: block; font-size: 1.05rem; }

.location-list { display: grid; gap: 9px; }
.location-option { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 70px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 17px; background: white; cursor: pointer; }
.location-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.location-dot { width: 38px; height: 38px; border-radius: 13px; background: var(--green-soft); }
.location-dot::after { content: "P"; display: grid; height: 100%; place-items: center; font-weight: 900; }
.location-dot.home { background: #f6dfd4; }
.location-dot.home::after { content: "K"; }
.location-dot.other { background: #e8e5dd; }
.location-dot.other::after { content: "+"; }
.location-option strong, .location-option small { display: block; }
.location-option strong { font-size: 0.98rem; }
.location-option small { margin-top: 3px; color: var(--muted); font-size: 0.73rem; font-weight: 500; }
.check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: white; opacity: 0; font-size: 0.8rem; }
.location-option:has(input:checked) .check { opacity: 1; }
.custom-location { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 10px; padding-top: 2px; }

.price-estimate { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 10px; margin-top: 13px; padding: 15px; border-radius: 17px; background: #e7eee6; }
.price-estimate span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.price-estimate strong { grid-row: span 2; font-size: 1.45rem; letter-spacing: -0.04em; }
.price-estimate small { color: var(--muted); font-size: 0.68rem; }
.price-estimate[hidden] { display: none; }
.geo-card { display: grid; gap: 7px; margin-top: 13px; padding: 13px; border-radius: 17px; background: #f0eee7; }
.trip-location-geo { margin-top: 9px; }
.geo-button { min-height: 45px; border: 0; border-radius: 13px; background: var(--ink); color: white; font-size: 0.86rem; font-weight: 850; cursor: pointer; }
.geo-button:disabled { opacity: 0.65; cursor: wait; }
.geo-button:active { transform: translateY(1px); }
.geo-status { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 700; line-height: 1.35; }
.geo-status.ready { color: var(--accent-dark); }


.settings-details > summary, .settings-subsection > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; color: var(--ink); font-size: 0.92rem; font-weight: 850; cursor: pointer; list-style: none; }
.settings-details > summary::-webkit-details-marker, .settings-subsection > summary::-webkit-details-marker { display: none; }
.settings-details > summary::after, .settings-subsection > summary::after { content: "↓"; display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: rgba(233, 104, 58, 0.14); color: var(--accent-dark); font-size: 0.78rem; font-weight: 900; }
.settings-details[open] > summary, .settings-subsection[open] > summary { margin-bottom: 10px; }
.settings-details[open] > summary::after, .settings-subsection[open] > summary::after { content: "↑"; }
.settings-summary-title { display: flex; align-items: center; gap: 10px; }
.settings-card { margin-top: 38px; }
.settings-subsection { margin: 4px 0 20px; padding: 6px 12px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--charge-surface); }
.settings-history { padding: 4px 0 0; }
.settings-history .history-heading { align-items: center; }
.settings-history h2 { font-size: 1rem; }
.saved-location-list { display: grid; gap: 8px; }
.saved-location-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 13px; background: #f6f5f0; }
.saved-location-item strong, .saved-location-item small { display: block; }
.saved-location-item small { color: var(--muted); font-size: 0.68rem; }
.saved-location-item button { border: 0; border-radius: 10px; padding: 7px 9px; background: #f6dfd4; color: var(--accent-dark); font-size: 0.7rem; font-weight: 850; cursor: pointer; }
.settings-form { display: grid; gap: 0; margin-top: 4px; }
.settings-save { justify-self: start; margin-top: 12px; min-height: 38px; padding: 0 12px; border-radius: 12px; background: #e7eee6; }
.backup-actions { display: grid; gap: 8px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
#backup-actions { scroll-margin-top: 90px; }
.backup-actions > span { color: var(--ink); font-size: 0.82rem; font-weight: 850; }
.backup-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.backup-actions .settings-save { margin-top: 0; }
.backup-status { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 650; line-height: 1.35; }
.danger-actions { display: grid; justify-items: start; gap: 8px; margin-top: 20px; padding: 15px; border: 1px solid #dfb4a3; border-radius: 15px; background: #fff4ef; }
.danger-actions > span { color: var(--accent-dark); font-size: 0.82rem; font-weight: 850; }
.danger-actions p { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 650; line-height: 1.4; }
.danger-button { min-height: 40px; padding: 0 13px; border: 0; border-radius: 12px; background: #b83f25; color: #fff; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.danger-button:active { transform: translateY(1px); background: #8f2f1c; }
.secondary-save { width: 100%; margin-top: 12px; background: var(--ink); box-shadow: none; }
.charge-trip-option { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 11px; min-height: 62px; padding: 12px 14px; border: 1px solid rgba(25, 53, 47, 0.12); border-radius: 17px; background: var(--trip-surface); color: var(--ink); cursor: pointer; }
.charge-trip-option input { width: 22px; height: 22px; margin: 0; accent-color: var(--trip-accent); }
.charge-trip-option span, .charge-trip-option strong, .charge-trip-option small { display: block; }
.charge-trip-option strong { font-size: 0.84rem; }
.charge-trip-option small { margin-top: 3px; color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.active-trip-status { margin: -4px 0 4px; padding: 10px 12px; border-radius: 14px; background: #f0eee7; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.active-trip-status.ready { background: #e7eee6; color: var(--accent-dark); }
.travel-card { margin-top: 28px; padding-top: 18px; padding-bottom: 16px; border-radius: 24px; }
.travel-card .section-heading { margin-bottom: 11px; }
.travel-card > .summary-note { margin: 0 0 10px; }
.trip-start-panel { display: grid; gap: 10px; }
.trip-start-panel .field { margin-top: 0; }
.trip-start-panel .secondary-save { margin-top: 0; }
.trip-form-actions { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 8px; }
.trip-form-actions .secondary-save { width: auto; margin-top: 0; }
.trip-cancel-button { min-height: 50px; border: 0; border-radius: 15px; background: #f0eee7; color: var(--ink); font-size: 0.86rem; font-weight: 850; cursor: pointer; }
.trip-cancel-button:active { transform: translateY(1px); background: var(--trip-surface-strong); }
.trip-entry-panel { display: grid; gap: 9px; }
.trip-current-title { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); }
.trip-current-title span { grid-column: 1; color: var(--muted); font-size: 0.64rem; font-weight: 750; }
.trip-current-title strong { grid-column: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.95rem; line-height: 1.25; }
.trip-current-title button { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; padding: 0 11px; border: 0; border-radius: 11px; background: var(--trip-surface-strong); color: var(--ink); font-size: 0.72rem; font-weight: 850; cursor: pointer; }
.trip-title-editor { display: grid; gap: 7px; padding: 11px; border: 1px solid rgba(25, 53, 47, 0.12); border-radius: 14px; background: var(--card); }
.trip-title-editor > label { font-size: 0.72rem; font-weight: 800; }
.trip-title-editor .input-unit { min-height: 44px; }
.trip-title-editor > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.trip-title-editor button { min-height: 36px; padding: 0 11px; border: 0; border-radius: 10px; background: var(--trip-accent); color: #fff; font-size: 0.7rem; font-weight: 850; cursor: pointer; }
.trip-title-editor #trip-title-cancel-button { background: #f0eee7; color: var(--muted); }
.trip-entry-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 2px; }
.trip-entry-heading h3 { margin: 0; font-size: 1.02rem; }
.trip-entry-heading small, .trip-entry-panel .field > span:first-child small { color: var(--muted); font-size: 0.64rem; font-weight: 700; }
.trip-entry-panel .field { gap: 5px; margin-top: 0; font-size: 0.78rem; }
.trip-entry-panel .input-unit { min-height: 45px; border-radius: 13px; }
.trip-entry-panel .input-unit input { font-size: 1rem; }
.trip-entry-panel textarea { min-height: 64px; padding: 10px 12px; border-radius: 13px; font-size: 0.92rem; resize: none; }
.trip-entry-panel .secondary-save { min-height: 50px; border-radius: 15px; font-size: 0.92rem; }
.trip-geo-status { margin: -1px 0 0; padding: 8px 10px; border-radius: 11px; background: rgba(255, 253, 248, 0.7); color: var(--muted); font-size: 0.68rem; font-weight: 750; line-height: 1.3; }
.trip-geo-status.ready { background: var(--trip-surface-strong); color: var(--trip-accent); }
.travel-card .form-message { margin: 7px 0 0; }
.trip-archive { position: relative; }
.trip-archive-intro { max-width: 720px; margin: 0 0 14px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.trip-archive-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; padding: 13px; border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 18px; background: var(--trip-surface); }
.trip-archive-search, .trip-title-picker { grid-column: 1 / -1; }
.trip-archive-toolbar label { display: grid; gap: 6px; min-width: 0; }
.trip-archive-toolbar label > span { color: var(--muted); font-size: 0.66rem; font-weight: 800; }
.trip-archive-toolbar input, .trip-archive-toolbar select { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid rgba(25, 53, 47, 0.13); border-radius: 13px; background: var(--card); color: var(--ink); font-size: 0.82rem; font-weight: 750; outline: none; }
.trip-archive-toolbar input:focus, .trip-archive-toolbar select:focus { border-color: var(--trip-accent); box-shadow: 0 0 0 3px rgba(68, 107, 89, 0.13); }
.trip-archive-clear { min-height: 44px; padding: 0 13px; border: 0; border-radius: 13px; background: var(--ink); color: #fff; font-size: 0.74rem; font-weight: 850; cursor: pointer; }
.trip-archive-clear:active { transform: translateY(1px); background: var(--trip-accent); }
.trip-archive-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 13px; }
.trip-archive-stats div { min-width: 0; padding: 12px 13px; border: 1px solid rgba(25, 53, 47, 0.08); border-radius: 15px; background: var(--card); }
.trip-archive-stats small, .trip-archive-stats strong { display: block; }
.trip-archive-stats small { margin-bottom: 3px; color: var(--muted); font-size: 0.62rem; font-weight: 750; }
.trip-archive-stats strong { overflow-wrap: anywhere; color: var(--trip-accent); font-size: 1rem; }
.trip-archive-layout { display: grid; gap: 13px; }
.trip-archive-index-panel, .trip-archive-summary, .trip-details { border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 18px; background: var(--card); }
.trip-archive-index-panel { padding: 12px; }
.trip-archive-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 2px 10px; }
.trip-archive-panel-heading h3 { margin: 0; font-size: 0.95rem; }
.trip-archive-panel-heading span { color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.trip-archive-index { display: grid; gap: 7px; }
.trip-archive-card { display: grid; width: 100%; padding: 11px 12px; border: 1px solid transparent; border-radius: 14px; background: #f3f2ec; color: var(--ink); text-align: left; cursor: pointer; }
.trip-archive-card:hover { border-color: rgba(68, 107, 89, 0.32); }
.trip-archive-card.is-selected { border-color: var(--trip-accent); background: var(--trip-surface-strong); box-shadow: inset 3px 0 var(--trip-accent); }
.trip-archive-card-title { overflow-wrap: anywhere; font-size: 0.85rem; font-weight: 900; line-height: 1.25; }
.trip-archive-card-date { margin-top: 3px; color: var(--muted); font-size: 0.66rem; font-weight: 750; }
.trip-archive-card-facts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.trip-archive-card-facts b { padding: 4px 6px; border-radius: 7px; background: rgba(255, 253, 248, 0.74); color: var(--muted); font-size: 0.58rem; font-weight: 800; }
.trip-archive-content { display: grid; min-width: 0; gap: 13px; align-content: start; }
.trip-archive-summary { padding: 16px; background: linear-gradient(135deg, var(--trip-surface), var(--card)); }
.trip-archive-summary-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.trip-archive-summary-heading small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.trip-archive-summary-heading h3 { margin: 0; color: var(--trip-accent); font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.03em; }
.trip-archive-state { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--trip-surface-strong); color: var(--trip-accent); font-size: 0.62rem; font-weight: 850; }
.trip-archive-state.is-active { background: #fff0da; color: #8b5616; }
.trip-archive-summary-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 14px 0 0; }
.trip-archive-summary-metrics div { min-width: 0; padding: 9px 8px; border-radius: 11px; background: rgba(255, 253, 248, 0.82); }
.trip-archive-summary-metrics dt { color: var(--muted); font-size: 0.58rem; font-weight: 750; }
.trip-archive-summary-metrics dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 0.78rem; font-weight: 900; }
.trip-archive-route-summary { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 0.72rem; }
.trip-archive-route-summary strong { color: var(--ink); }
.trip-archive-empty { display: grid; gap: 4px; margin: 0; padding: 18px 12px; color: var(--muted); font-size: 0.75rem; text-align: center; }
.trip-archive-empty strong { color: var(--ink); font-size: 0.9rem; }
.trip-details { padding: 0 13px 13px; }
.trip-details > summary { padding-top: 2px; }
.trip-table-details { margin-bottom: 13px; }
.trip-table-details .trip-list { padding-top: 2px; }
.map-details { overflow: hidden; }
.trip-map-workspace { display: grid; gap: 10px; }
.trip-route-panel { margin: 13px 0 0; padding: 13px; border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 18px; background: #e7eee6; }
.trip-route-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.trip-route-panel-heading strong { color: var(--ink); font-size: 0.9rem; }
.trip-route-panel-heading span { color: var(--muted); font-size: 0.66rem; font-weight: 750; text-align: right; }
.trip-route-actions { display: grid; gap: 9px; }
.trip-route-card { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 16px; background: var(--trip-surface); }
.trip-route-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.trip-route-heading strong { color: var(--trip-accent); font-size: 0.88rem; }
.trip-route-heading span { color: var(--muted); font-size: 0.68rem; font-weight: 750; white-space: nowrap; }
.google-route-link { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 13px; border-radius: 13px; background: var(--trip-accent); color: #fff; font-size: 0.8rem; font-weight: 850; text-align: center; text-decoration: none; }
.google-route-link:active { transform: translateY(1px); background: var(--ink); }
.google-route-link.is-disabled { background: #c7cfca; color: #68746f; box-shadow: none; cursor: not-allowed; }
.google-route-link.is-disabled:active { transform: none; background: #c7cfca; }
.show-trip-map-button { min-height: 44px; border: 0; border-radius: 13px; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 850; cursor: pointer; }
.show-trip-map-button:active { transform: translateY(1px); background: var(--trip-accent); }
.trip-route-warning, .trip-route-empty { margin: 0; color: var(--accent-dark); font-size: 0.72rem; font-weight: 700; line-height: 1.45; }
.trip-route-warning { padding: 10px 11px; border-radius: 12px; background: #fff4ef; }
.trip-route-warning strong { color: #9b321e; }
.trip-route-empty { padding: 11px 12px; border-radius: 13px; background: #f0eee7; color: var(--muted); }
.trip-map { height: min(68vh, 520px); min-height: 340px; overflow: hidden; border: 1px solid rgba(25, 53, 47, 0.12); border-radius: 20px; background: #e7eee6; }
.trip-map-navigation { display: grid; gap: 9px; margin-bottom: 10px; padding: 11px; scroll-margin-top: max(12px, env(safe-area-inset-top)); border: 1px solid rgba(25, 53, 47, 0.1); border-radius: 16px; background: var(--trip-surface); }
.trip-map-navigation-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 7px; }
.trip-map-navigation-buttons button { min-width: 0; min-height: 42px; padding: 0 4px; border: 0; border-radius: 12px; background: var(--trip-accent); color: #fff; font-size: 0.7rem; font-weight: 850; white-space: nowrap; cursor: pointer; }
.trip-map-navigation-buttons button:disabled { background: #c7cfca; color: #68746f; cursor: default; }
.trip-map-navigation-buttons span { grid-column: 1 / -1; color: var(--muted); font-size: 0.75rem; font-weight: 850; text-align: center; }
.trip-map-entry-info { display: grid; gap: 4px; min-height: 76px; padding: 11px 12px; border-radius: 13px; background: var(--card); color: var(--ink); }
.trip-map-entry-info strong { font-size: 0.9rem; }
.trip-map-entry-info p { margin: 0; font-size: 0.78rem; line-height: 1.4; }
.trip-map-entry-info small { display: block; color: var(--muted); font-size: 0.68rem; line-height: 1.4; }
.trip-map-location-actions { display: grid; grid-template-columns: 1fr 42px; gap: 7px; margin-top: 6px; }
.trip-map-location-actions a, .trip-map-location-actions button { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 10px; border: 0; border-radius: 11px; background: var(--trip-accent); color: #fff; font-size: 0.7rem; font-weight: 850; text-align: center; text-decoration: none; cursor: pointer; }
.trip-map-location-actions button { position: relative; padding: 0; background: var(--ink); }
.trip-map-share-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trip-map-share-button.is-copied svg { display: none; }
.trip-map-share-button.is-copied::after { content: "✓"; font-size: 1.05rem; font-weight: 900; }
.trip-map-location-actions a:active, .trip-map-location-actions button:active { transform: translateY(1px); }
.trip-map-entry-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 7px 0 0; }
.trip-map-entry-metrics div { min-width: 0; padding: 8px 6px; border-radius: 10px; background: var(--trip-surface); text-align: center; }
.trip-map-entry-metrics dt { color: var(--muted); font-size: 0.62rem; font-weight: 750; }
.trip-map-entry-metrics dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 0.75rem; font-weight: 850; line-height: 1.25; }
.trip-map-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.trip-map-edit-button, .trip-map-delete-button { min-width: 0; min-height: 38px; padding: 0 10px; border: 0; border-radius: 11px; font-size: 0.75rem; font-weight: 850; cursor: pointer; }
.trip-map-edit-button { background: var(--ink); color: #fff; }
.trip-map-delete-button { background: #f6dfd4; color: var(--accent-dark); }
.trip-map-edit-button:active, .trip-map-delete-button:active { transform: translateY(1px); }
.trip-map-edit-button:active { background: var(--trip-accent); }
.trip-map-delete-button:active { background: #efc8b7; }
.trip-map .leaflet-popup-content { margin: 12px 14px; color: var(--ink); font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.trip-map .leaflet-popup-content strong { font-size: 0.92rem; }
.trip-map .leaflet-popup-content p { margin: 0; font-size: 0.78rem; line-height: 1.35; }
.trip-map .leaflet-popup-content small { display: block; color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.trip-map-marker { display: grid; place-items: center; }
.trip-map-marker span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(25, 53, 47, 0.22); font-size: 0.82rem; font-weight: 900; }
.trip-map-marker.is-map-point span { width: 18px; height: 18px; border-width: 2px; background: var(--trip-accent); box-shadow: 0 5px 12px rgba(25, 53, 47, 0.2); font-size: 0.56rem; }
.trip-list { display: grid; gap: 12px; }
.trip-group { display: grid; gap: 9px; padding: 13px; border-radius: 18px; background: var(--trip-surface); border: 1px solid rgba(25, 53, 47, 0.09); box-shadow: 0 10px 28px rgba(38, 52, 47, 0.05); }
.trip-group h3 { margin: 0; color: var(--trip-accent); font-size: 1.02rem; letter-spacing: -0.02em; }
.trip-group h3 span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0; }
.trip-table-wrap { overflow-x: auto; border: 1px solid rgba(25, 53, 47, 0.09); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.trip-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 0.74rem; }
.trip-table th { padding: 10px 9px; background: var(--ink); color: #fff; text-align: left; font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.trip-table td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.trip-table tbody tr:last-child td { border-bottom: 0; }
.trip-table tbody tr:nth-child(even) { background: #f6f5f0; }
.trip-total-row { background: #e7eee6 !important; color: var(--accent-dark); }
.trip-sequence { color: var(--accent-dark); font-size: 0.9rem; font-weight: 900; text-align: center; }
.trip-gps-status { color: var(--trip-accent); font-size: 0.9rem; font-weight: 900; text-align: center; }
.trip-table td strong, .trip-table td small { display: block; }
.trip-table td small { margin-top: 2px; color: var(--muted); font-size: 0.61rem; line-height: 1.3; }
.trip-table button { border: 0; border-radius: 10px; padding: 7px 9px; font-size: 0.68rem; font-weight: 850; cursor: pointer; }
.trip-table .row-actions { flex-wrap: nowrap; }

.guide-link { display: flex; align-items: center; justify-content: space-between; min-height: 46px; margin: 0 0 14px; padding: 0 13px; border-radius: 14px; background: #e7eee6; color: var(--ink); font-size: 0.84rem; font-weight: 850; text-decoration: none; }
.guide-link::after { content: "→"; color: var(--accent-dark); }

.save-button { min-height: 59px; border: 0; border-radius: 18px; background: var(--accent); color: #fff; box-shadow: 0 12px 24px rgba(201, 79, 39, 0.22); font-size: 1.02rem; font-weight: 850; cursor: pointer; }
.save-button:active { transform: translateY(1px); background: var(--accent-dark); }
.form-message { min-height: 20px; margin: -4px 0 2px; text-align: center; color: var(--accent-dark); font-size: 0.85rem; font-weight: 700; }

.summary { margin-top: 38px; padding: 22px 14px 14px; border: 1px solid rgba(201, 79, 39, 0.13); border-radius: 24px; background: var(--charge-surface); box-shadow: 0 14px 34px rgba(89, 56, 42, 0.07); }
.summary-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.year-total { color: var(--accent-dark); font-size: 0.86rem; font-weight: 850; }
.summary-note { margin: 9px 0 15px; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.monthly-summary { display: grid; gap: 12px; }
.year-card { overflow: hidden; padding: 0; background: color-mix(in srgb, var(--charge-surface) 68%, white); }
.year-summary { display: grid; grid-template-columns: 0.65fr 0.95fr 0.95fr 1.15fr 1.1fr auto; gap: 10px; align-items: center; min-height: 78px; padding: 15px 16px; cursor: pointer; list-style: none; }
.year-summary::-webkit-details-marker { display: none; }
.year-summary::after { content: "↓"; display: grid; place-items: center; justify-self: end; width: 28px; height: 28px; border-radius: 50%; background: rgba(233, 104, 58, 0.14); color: var(--accent-dark); font-size: 0.78rem; font-weight: 900; }
.year-card[open] .year-summary::after { content: "↑"; }
.year-summary span { display: grid; gap: 2px; }
.year-summary small { color: var(--muted); font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.year-summary strong { color: var(--ink); font-size: 0.9rem; line-height: 1.15; }
.year-summary span:first-child strong { color: var(--accent-dark); font-size: 1.35rem; letter-spacing: -0.04em; }
.year-month-list { display: grid; gap: 12px; padding: 0 10px 12px; }
.month-card { overflow: hidden; padding: 18px; background: color-mix(in srgb, var(--charge-surface) 72%, white); box-shadow: 0 10px 28px rgba(38, 52, 47, 0.06); }
.month-topline { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.month-topline p { margin-bottom: 3px; font-size: 0.85rem; font-weight: 800; text-transform: capitalize; }
.month-topline > div > strong { font-size: 1.42rem; letter-spacing: -0.04em; }
.consumption { display: grid; justify-items: end; }
.consumption small, .consumption span { color: var(--muted); }
.consumption small { font-size: 0.66rem; font-weight: 750; }
.consumption strong { color: var(--accent-dark); font-size: 1.45rem; line-height: 1.05; letter-spacing: -0.05em; }
.consumption span { font-size: 0.62rem; font-weight: 700; }
.distance-line { display: flex; justify-content: space-between; padding: 11px 0; color: var(--muted); font-size: 0.73rem; }
.distance-line strong { color: var(--ink); }
.month-details { padding-top: 2px; }
.month-details summary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin-top: 2px; padding: 0 13px; border-radius: 12px; background: #e7eee6; color: var(--ink); font-size: 0.74rem; font-weight: 850; cursor: pointer; list-style: none; }
.summary .month-details summary { background: var(--charge-surface-strong); }
.month-details summary::-webkit-details-marker { display: none; }
.month-details summary::after { content: "↓"; display: grid; place-items: center; width: 24px; height: 24px; margin-left: 7px; border-radius: 50%; background: rgba(233, 104, 58, 0.14); color: var(--accent-dark); font-size: 0.72rem; font-weight: 900; }
.month-details[open] summary { margin-bottom: 11px; }
.month-details[open] summary::after { content: "↑"; }
.month-history { margin-top: 8px; }
.month-charge-table-wrap { margin-top: 2px; box-shadow: none; }
.location-breakdown { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.location-breakdown li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 11px; border-radius: 12px; background: #f6f5f0; }
.location-breakdown li > span { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 750; }
.location-breakdown li strong { font-size: 0.81rem; }
.location-breakdown li small { grid-column: 1 / -1; padding-left: 18px; color: var(--muted); font-size: 0.63rem; }
.location-key { width: 10px; height: 10px; border-radius: 4px; background: #c6cbc8; }
.location-key.penni { background: #6f9278; }
.location-key.home { background: var(--accent); }
.charge-cost-total { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding: 13px; border-radius: 14px; background: #e7eee6; }
.charge-cost-total span:last-child { text-align: right; }
.charge-cost-total small, .charge-cost-total strong { display: block; }
.charge-cost-total small { margin-bottom: 2px; color: var(--muted); font-size: 0.65rem; font-weight: 700; line-height: 1.35; }
.charge-cost-total strong { font-size: 0.9rem; }

.history { padding: 38px 3px 0; }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.history-actions { display: flex; align-items: center; gap: 8px; }
.history-actions > span { color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); font-size: 0.83rem; font-weight: 800; cursor: pointer; }
.empty-state { display: grid; gap: 4px; padding: 24px 18px; border: 1px dashed #b9bbb3; border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }
.empty-state span { font-size: 0.8rem; }
.charge-table-wrap { overflow-x: auto; border: 1px solid rgba(25, 53, 47, 0.09); border-radius: 17px; background: var(--charge-surface); box-shadow: 0 10px 28px rgba(38, 52, 47, 0.05); -webkit-overflow-scrolling: touch; }
.charge-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 0.75rem; }
.charge-table th { position: sticky; top: 0; z-index: 1; padding: 11px 10px; background: var(--ink); color: white; text-align: left; font-size: 0.64rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.charge-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.charge-table tbody tr:last-child td { border-bottom: 0; }
.charge-table tbody tr:nth-child(even) { background: #f6f5f0; }
.charge-table td strong, .charge-table td small { display: block; }
.charge-table td small { margin-top: 2px; color: var(--muted); font-size: 0.61rem; }
.charge-table .table-date { font-weight: 750; }
.row-actions { display: flex; gap: 6px; }
.edit-row-button, .delete-row-button { border: 0; border-radius: 11px; padding: 8px 10px; font-size: 0.72rem; font-weight: 850; cursor: pointer; }
.edit-row-button { background: #e7eee6; color: var(--ink); }
.delete-row-button { background: #f6dfd4; color: var(--accent-dark); }
.edit-row-button:active, .delete-row-button:active { transform: translateY(1px); }

@media (min-width: 900px) {
  .trip-archive { left: 50%; width: min(1280px, calc(100vw - 48px)); transform: translateX(-50%); padding-top: 48px; }
  .trip-archive .history-heading { align-items: center; }
  .trip-archive-intro { font-size: 0.84rem; }
  .trip-archive-toolbar { grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.5fr) minmax(220px, 1fr) auto; padding: 15px; }
  .trip-archive-search, .trip-title-picker { grid-column: auto; }
  .trip-archive-stats { margin: 12px 0 15px; }
  .trip-archive-layout { grid-template-columns: minmax(260px, 0.33fr) minmax(0, 1fr); align-items: start; }
  .trip-archive-index-panel { position: sticky; top: 62px; max-height: calc(100vh - 82px); overflow: hidden; }
  .trip-archive-index { max-height: calc(100vh - 135px); overflow-y: auto; padding-right: 3px; scrollbar-color: var(--trip-surface-strong) transparent; }
  .trip-map-workspace { grid-template-columns: minmax(290px, 0.38fr) minmax(0, 1fr); align-items: start; }
  .trip-map-navigation { margin: 0; }
  .trip-map { height: min(72vh, 650px); min-height: 520px; }
  .trip-map-navigation-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-map-navigation-buttons span { grid-column: 1 / -1; }
  .trip-table { min-width: 940px; }
}

@media (max-width: 390px) {
  .field-grid { grid-template-columns: 1fr; }
  .custom-location { grid-template-columns: 1fr; gap: 0; }
  .charge-mark { width: 54px; height: 54px; }
  .year-summary { grid-template-columns: 1fr 1fr auto; }
  .year-summary::after { grid-column: 3; grid-row: 1; }
}

@media (max-width: 760px) {
  .nav-shell { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 100; margin: 0; }
  .nav-toggle { display: grid; place-content: center; gap: 4px; width: 46px; height: 46px; margin-left: auto; padding: 0; border: 1px solid rgba(25, 53, 47, 0.14); border-radius: 14px; background: var(--card); box-shadow: 0 10px 28px rgba(38, 52, 47, 0.2); cursor: pointer; }
  .nav-toggle span { display: block; width: 21px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 160ms ease, opacity 160ms ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
  .quick-nav { position: absolute; top: 53px; right: 0; display: none; width: min(260px, calc(100vw - 28px)); max-height: calc(100vh - 90px); overflow-y: auto; padding: 9px; border: 1px solid rgba(25, 53, 47, 0.12); border-radius: 18px; background: var(--card); box-shadow: 0 18px 45px rgba(38, 52, 47, 0.24); backdrop-filter: none; }
  .quick-nav.is-open { display: grid; gap: 5px; }
  .quick-nav a { justify-content: flex-start; width: 100%; min-height: 43px; box-shadow: none; }
  #dashboard, #charge-form, #travel-title, #trip-browser, #summary-title, #settings-title { scroll-margin-top: 18px; }
  input:not([type="radio"]):not([type="file"]), textarea, select { font-size: 16px; }
  .trip-archive-toolbar { grid-template-columns: 1fr; }
  .trip-archive-toolbar > * { grid-column: 1; }
  .trip-archive-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-archive-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-archive-summary-metrics div:last-child { grid-column: 1 / -1; }
}

@media (display-mode: standalone) {
  .app-shell { padding-top: max(18px, env(safe-area-inset-top)); }
}

.guide-page { display: grid; gap: 14px; }
.guide-page .hero { margin-bottom: 2px; }
.guide-back { display: inline-flex; justify-self: start; align-items: center; min-height: 42px; padding: 0 13px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 0.82rem; font-weight: 850; text-decoration: none; }
.guide-back-bottom { margin: 4px 0 24px; }
.guide-intro, .guide-section { padding: 19px; }
.guide-intro h2, .guide-section h2 { margin: 0 0 10px; font-size: 1.15rem; }
.guide-section h3 { margin: 18px 0 7px; color: var(--trip-accent); font-size: 0.9rem; }
.guide-intro p, .guide-section p, .guide-section li { color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.guide-intro p, .guide-section p { margin: 0; }
.guide-section ol, .guide-section ul { display: grid; gap: 7px; margin: 0; padding-left: 21px; }
.guide-section strong { color: var(--ink); }
.guide-notice { margin-top: 14px !important; padding: 12px 13px; border-radius: 13px; background: #fff4ef; color: var(--accent-dark) !important; font-weight: 700; }
