/* Liquid Glass design system ------------------------------------------------------------ */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #eef1f6;
  --ink: #1c1c1e; --ink-2: rgba(60, 60, 67, .78); --ink-3: rgba(60, 60, 67, .52); --ink-4: rgba(60, 60, 67, .3);
  --hairline: rgba(60, 60, 67, .14);
  --fill: rgba(120, 120, 128, .12); --fill-2: rgba(120, 120, 128, .2);
  --glass: rgba(255, 255, 255, .58); --glass-thick: rgba(255, 255, 255, .78); --glass-thin: rgba(255, 255, 255, .42);
  --glass-edge: rgba(255, 255, 255, .7); --glass-edge-2: rgba(255, 255, 255, .25);
  --spec: rgba(255, 255, 255, .55);
  --shadow: 0 18px 50px rgba(15, 25, 45, .16), 0 3px 10px rgba(15, 25, 45, .08);
  --shadow-sm: 0 6px 18px rgba(15, 25, 45, .12), 0 1px 3px rgba(15, 25, 45, .08);
  --blue: #007aff; --blue-2: #3395ff; --green: #34c759; --mint: #00c7be; --orange: #ff9500; --red: #ff3b30; --purple: #af52de; --indigo: #5856d6; --yellow: #ffcc00; --teal: #30b0c7;
  --tint-blue: rgba(0, 122, 255, .12); --tint-green: rgba(52, 199, 89, .14); --tint-orange: rgba(255, 149, 0, .14); --tint-red: rgba(255, 59, 48, .12); --tint-purple: rgba(175, 82, 222, .13);
  --r-xl: 30px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --spring: cubic-bezier(.32, .72, 0, 1);
  --blur: blur(20px) saturate(180%); /* re-rendered every map frame behind the panel: keep the radius modest */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0d;
  --ink: #f5f5f7; --ink-2: rgba(235, 235, 245, .78); --ink-3: rgba(235, 235, 245, .52); --ink-4: rgba(235, 235, 245, .28);
  --hairline: rgba(255, 255, 255, .1);
  --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .34);
  --glass: rgba(28, 28, 32, .56); --glass-thick: rgba(30, 30, 34, .82); --glass-thin: rgba(28, 28, 32, .38);
  --glass-edge: rgba(255, 255, 255, .16); --glass-edge-2: rgba(255, 255, 255, .04);
  --spec: rgba(255, 255, 255, .14);
  --shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, .45);
  --blue: #0a84ff; --blue-2: #409cff; --green: #30d158; --mint: #63e6e2; --orange: #ff9f0a; --red: #ff453a; --purple: #bf5af2; --indigo: #5e5ce6; --yellow: #ffd60a; --teal: #40c8e0;
  --tint-blue: rgba(10, 132, 255, .2); --tint-green: rgba(48, 209, 88, .2); --tint-orange: rgba(255, 159, 10, .2); --tint-red: rgba(255, 69, 58, .2); --tint-purple: rgba(191, 90, 242, .2);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 15px/1.4 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 60%, transparent); outline-offset: 2px; border-radius: 10px; }

/* Materials */
.glass, .glass-thick, .glass-thin {
  position: relative;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--spec), inset 0 -1px 0 var(--glass-edge-2), var(--shadow);
  isolation: isolate;
}
.glass { background: var(--glass); }
.glass-thick { background: var(--glass-thick); }
.glass-thin { background: var(--glass-thin); }
/* Specular sheen: light catching the top-left edge of the glass */
.glass::before, .glass-thick::before, .glass-thin::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(135deg, var(--spec) 0%, transparent 32%, transparent 70%, color-mix(in srgb, var(--spec) 40%, transparent) 100%);
  opacity: .35; /* plain alpha: a blend mode here forced an extra offscreen pass per frame */
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass-thick, .glass-thin { background: var(--glass-thick); -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root { --glass: #fff; --glass-thick: #fff; --glass-thin: #fff; }
  :root[data-theme="dark"] { --glass: #1c1c1e; --glass-thick: #1c1c1e; --glass-thin: #1c1c1e; }
}

/* Type */
.t-large { font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.t-title { font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.t-headline { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.t-body { font-size: 15px; }
.t-sub { font-size: 13px; color: var(--ink-2); }
.t-cap { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.t-num { font-variant-numeric: tabular-nums; }
.mute { color: var(--ink-3); }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap;
  background: var(--fill); color: var(--ink);
  transition: transform .35s var(--spring), background .2s, opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 82%, #fff) 0%, var(--blue) 55%, color-mix(in srgb, var(--blue) 88%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 8px 22px color-mix(in srgb, var(--blue) 38%, transparent);
}
.btn-green { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--green) 80%, #fff), var(--green) 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 22px color-mix(in srgb, var(--green) 35%, transparent); }
.btn-danger { color: var(--red); background: var(--tint-red); }
.btn-tint { color: var(--blue); background: var(--tint-blue); }
.btn-plain { background: transparent; color: var(--blue); padding: 0 8px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 17px; padding: 0 24px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

/* Controls */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); padding-left: 4px; }
.input {
  width: 100%; min-height: 48px; border: 1px solid transparent; border-radius: var(--r-md); padding: 0 14px;
  background: var(--fill); outline: none; transition: background .2s, border-color .2s, box-shadow .2s; font-size: 16px;
}
.input:focus { background: var(--glass-thick); border-color: color-mix(in srgb, var(--blue) 55%, transparent); box-shadow: 0 0 0 4px var(--tint-blue); }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 4px var(--tint-red); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.hint { font-size: 12px; color: var(--ink-3); padding-left: 4px; }
.err { font-size: 12px; color: var(--red); padding-left: 4px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 13px; background: var(--fill); position: relative; }
.segmented button { border: 0; background: transparent; min-height: 34px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; position: relative; z-index: 1; color: var(--ink-2); transition: color .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button svg { width: 16px; height: 16px; }
.segmented button.on { color: var(--ink); background: var(--glass-thick); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), inset 0 1px 0 var(--spec); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--fill); font-weight: 600; font-size: 13px; color: var(--ink); transition: transform .3s var(--spring), background .2s; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--blue); color: #fff; }
.chip svg { width: 14px; height: 14px; }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--fill-2); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .35s var(--spring); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }

input[type=range].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
input[type=range].slider::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--blue) var(--p), var(--fill-2) var(--p)); }
input[type=range].slider::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--blue) var(--p), var(--fill-2) var(--p)); }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .06); }
input[type=range].slider::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); }

/* Grouped lists (iOS inset style) */
.group { border-radius: var(--r-lg); background: var(--glass-thin); border: 1px solid var(--glass-edge-2); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 52px; position: relative; width: 100%; border: 0; background: transparent; text-align: left; cursor: default; }
button.row, a.row { cursor: pointer; color: inherit; transition: background .15s; }
button.row:active, a.row:active { background: var(--fill); }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--hairline); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { width: 14px; height: 14px; color: var(--ink-4); flex: none; }
.ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--ink-2); }
.ico svg { width: 19px; height: 19px; }
.ico.blue { background: var(--tint-blue); color: var(--blue); } .ico.green { background: var(--tint-green); color: var(--green); }
.ico.orange { background: var(--tint-orange); color: var(--orange); } .ico.red { background: var(--tint-red); color: var(--red); }
.ico.purple { background: var(--tint-purple); color: var(--purple); }

.card { border-radius: var(--r-lg); background: var(--glass-thin); border: 1px solid var(--glass-edge-2); padding: 16px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.stack-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.stack > *, .stack-lg > *, .view > * { min-width: 0; }
.hstack > svg, .between > svg, .t-sub > svg, .station svg:not(.kw svg) { width: 18px; height: 18px; flex: none; }
.hstack { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.pill svg { width: 12px; height: 12px; }
.pill.blue { background: var(--tint-blue); color: var(--blue); } .pill.green { background: var(--tint-green); color: var(--green); }
.pill.orange { background: var(--tint-orange); color: var(--orange); } .pill.red { background: var(--tint-red); color: var(--red); }
.pill.purple { background: var(--tint-purple); color: var(--purple); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.green { background: var(--green); box-shadow: 0 0 0 4px var(--tint-green); } .dot.orange { background: var(--orange); } .dot.red { background: var(--red); }

.stat { padding: 12px 14px; border-radius: var(--r-md); background: var(--fill); }
.stat b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.bar { height: 8px; border-radius: 99px; background: var(--fill-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .8s var(--spring); }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.45; background: var(--tint-orange); color: color-mix(in srgb, var(--orange) 70%, var(--ink)); }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner.blue { background: var(--tint-blue); color: color-mix(in srgb, var(--blue) 75%, var(--ink)); }
.banner.green { background: var(--tint-green); color: color-mix(in srgb, var(--green) 60%, var(--ink)); }
.banner.red { background: var(--tint-red); color: color-mix(in srgb, var(--red) 75%, var(--ink)); }

.skeleton { border-radius: var(--r-md); background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 34px 16px; color: var(--ink-3); }
.empty .ico { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; }
.empty .ico svg { width: 26px; height: 26px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* App layout ------------------------------------------------------------------------------ */
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; background: var(--glass) !important; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 10px 0 0 0; }
.maplibregl-ctrl-attrib a { color: var(--ink-2) !important; }
.maplibregl-canvas:focus-visible { outline: none; }

.panel {
  position: fixed; z-index: 20; top: 14px; left: 14px; bottom: 14px; width: 420px;
  border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden;
  transition: transform .5s var(--spring);
}
.panel-head { padding: 14px 14px 10px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #34c759, #00a9ff 70%, #5856d6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px rgba(0, 122, 255, .3); flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.brand b { font-size: 17px; letter-spacing: -.02em; }
.brand .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line next to the Car/Bike switch */
.badge-dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--glass-thick); }
.nav { margin: 0 14px 10px; }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 14px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
.view { animation: viewIn .45s var(--spring); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 16px; cursor: pointer; padding: 6px 0; margin-bottom: 4px; }
.back svg { width: 20px; height: 20px; }
.grabber { display: none; }

.map-controls { position: fixed; z-index: 15; top: 14px; right: 14px; display: grid; gap: 10px; }
.ctrl-group { border-radius: 16px; display: grid; overflow: hidden; }
.ctrl-group button { width: 46px; height: 46px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background .15s, color .15s; }
.ctrl-group button + button { border-top: 1px solid var(--hairline); }
.ctrl-group button:active { background: var(--fill); }
.ctrl-group button.on { color: var(--blue); }
.ctrl-group svg { width: 21px; height: 21px; }
.legend { position: fixed; z-index: 15; right: 14px; bottom: 30px; border-radius: 16px; padding: 10px 12px; font-size: 12px; font-weight: 600; display: grid; gap: 6px; }
.legend .scale { display: flex; align-items: center; gap: 6px; }
.legend .scale i { width: 26px; height: 6px; border-radius: 99px; }
.live-pill { position: fixed; z-index: 25; top: 14px; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 8px 14px 8px 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; font-size: 14px; border: 0; color: var(--ink); }
.live-ring { width: 28px; height: 28px; }

/* Search */
.search { border-radius: var(--r-lg); background: var(--fill); padding: 4px; position: relative; }
.search .leg { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 46px; }
.search .leg + .leg { border-top: 1px solid var(--hairline); }
.search .leg input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; min-width: 0; height: 44px; }
.search .leg input::placeholder { color: var(--ink-3); }
.search .marker { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.search .marker.from { border: 3px solid var(--blue); }
.search .marker.to { background: var(--red); border-radius: 3px 50% 50% 50%; transform: rotate(45deg); }
.search .swap { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.suggest { margin-top: 8px; }
.suggest .row .ico { width: 32px; height: 32px; border-radius: 50%; }

.trip { padding: 16px; border-radius: var(--r-lg); background: var(--glass-thin); border: 1px solid var(--glass-edge-2); }
.trip .eta { font-size: 30px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.route-alts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.route-alt { border: 1.5px solid transparent; background: var(--fill); border-radius: 14px; padding: 9px 10px; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.route-alt.on { border-color: var(--blue); background: var(--tint-blue); }
.route-alt b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.route-alt span { font-size: 12px; color: var(--ink-3); }
.battery { display: grid; gap: 6px; }
.battery-track { position: relative; height: 10px; border-radius: 99px; background: var(--fill-2); overflow: hidden; }
.battery-track i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; }
.battery-track .reserve { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); border-radius: 2px; }

.station { border-radius: var(--r-lg); padding: 14px; background: var(--glass-thin); border: 1px solid var(--glass-edge-2); cursor: pointer; transition: transform .35s var(--spring), background .2s, border-color .2s; display: grid; gap: 10px; text-align: left; width: 100%; color: inherit; }
.station:hover { background: var(--glass); }
#list > .station { content-visibility: auto; contain-intrinsic-size: auto 132px; } /* skip off-screen cards */
.station:active { transform: scale(.985); }
.station.sel { border-color: color-mix(in srgb, var(--blue) 60%, transparent); box-shadow: 0 0 0 3px var(--tint-blue); }
.station.dim { opacity: .55; }
.station .name { font-weight: 650; font-size: 16px; letter-spacing: -.01em; line-height: 1.25; }
.kw { min-width: 54px; height: 54px; border-radius: 16px; display: grid; place-content: center; text-align: center; flex: none; color: #fff; font-weight: 750; font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.kw small { font-size: 10px; font-weight: 650; opacity: .85; margin-top: 3px; }
.kw.ultra { background: linear-gradient(160deg, #bf5af2, #5856d6); } .kw.fast { background: linear-gradient(160deg, #30d158, #00a6a0); }
.kw.dc { background: linear-gradient(160deg, #40a9ff, #007aff); } .kw.ac { background: linear-gradient(160deg, #a0a7b4, #6b7280); }
.recommend { border: 1.5px solid color-mix(in srgb, var(--green) 55%, transparent); background: linear-gradient(160deg, var(--tint-green), transparent 70%), var(--glass-thin); }

/* Station detail */
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plug { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.plug + .plug { border-top: 1px solid var(--hairline); }
.plug-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fill); }
.plug-ico svg { width: 22px; height: 22px; }

/* Sheets / modals */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .28); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 100; left: 50%; bottom: 50%; transform: translate(-50%, 50%); width: min(480px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; border-radius: var(--r-xl); padding: 20px; animation: sheetIn .55s var(--spring); }
@keyframes sheetIn { from { opacity: 0; transform: translate(-50%, calc(50% + 40px)) scale(.97); } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.toast { position: fixed; z-index: 200; left: 50%; top: 18px; transform: translateX(-50%); border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; max-width: min(440px, calc(100vw - 28px)); animation: toastIn .5s var(--spring); }
.toast.out { animation: toastOut .3s forwards; }
.toast svg { width: 20px; height: 20px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -24px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -16px); } }

/* Checkout */
.amount-hero { text-align: center; padding: 8px 0 4px; }
.amount-hero b { font-size: 40px; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.upi-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.upi-app { border: 1.5px solid transparent; border-radius: 14px; padding: 10px 4px; background: var(--fill); display: grid; justify-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 600; }
.upi-app.on { border-color: var(--blue); background: var(--tint-blue); }
.upi-app .mono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; }
.banks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bank { border: 1.5px solid transparent; border-radius: 14px; padding: 12px 6px; background: var(--fill); cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; min-height: 58px; }
.bank.on { border-color: var(--blue); background: var(--tint-blue); }
.card-preview { border-radius: 18px; padding: 18px; aspect-ratio: 1.6; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #1c1c1e, #3a3a3c 60%, #636366); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), var(--shadow-sm); font-family: var(--mono); }
.card-preview .num { font-size: 19px; letter-spacing: .08em; }
.waiting { display: grid; justify-items: center; gap: 12px; padding: 16px 0; text-align: center; }
.pulse-ring { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-blue); color: var(--blue); position: relative; }
.pulse-ring::before, .pulse-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); animation: ripple 2s infinite var(--spring); }
.pulse-ring::after { animation-delay: 1s; }
.pulse-ring svg { width: 36px; height: 36px; }
@keyframes ripple { from { transform: scale(1); opacity: .6; } to { transform: scale(1.8); opacity: 0; } }
.success-mark { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; animation: pop .6s var(--spring); box-shadow: 0 12px 30px color-mix(in srgb, var(--green) 40%, transparent); }
.success-mark svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* Live session */
.gauge { position: relative; width: 230px; height: 230px; margin: 4px auto 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge .center b { font-size: 56px; font-weight: 750; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .center span { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 4px; }
.gauge .arc-live { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(48, 209, 88, .4)); } 50% { filter: drop-shadow(0 0 12px rgba(48, 209, 88, .9)); } }
.timeline { display: grid; gap: 0; }
.timeline div { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; }
.timeline div i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-left: 3px; }
.timeline div span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
.chart .col { flex: 1; display: grid; align-content: end; justify-items: center; gap: 6px; height: 100%; }
.chart .col i { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--blue-2), var(--blue)); min-height: 4px; transition: height .8s var(--spring); }
.chart .col i.zero { background: var(--fill-2); }
.chart .col span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.chart .col b { font-size: 10px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Map markers (HTML) */
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .4); border: 2px solid #fff; }
.pin svg { transform: rotate(45deg); width: 16px; height: 16px; color: #fff; }
.pin.from { background: var(--blue); } .pin.to { background: var(--red); }
.puck { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); position: relative; }
.puck::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 25%, transparent); animation: ripple 2.4s infinite; z-index: -1; }
.range-flag { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: var(--orange); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); border: 2px solid #fff; white-space: nowrap; }
.range-flag.empty { background: var(--red); }
.incident { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--orange); color: #fff; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.25); cursor: pointer; }
.incident.sev3, .incident.sev4 { background: var(--red); }
.incident svg { width: 14px; height: 14px; }

/* Google Maps engine: advanced markers anchor bottom-centre, so centred ones drop by half their height. */
.gm-host { width: 100%; height: 100%; }
.gm-centre { transform: translateY(50%); display: grid; place-items: center; }
.gm-station { appearance: none; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2.5px solid #fff; color: #fff; font: 700 10px/1 var(--font); font-variant-numeric: tabular-nums; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); cursor: pointer; transition: transform .25s var(--spring); }
.gm-station:hover { transform: scale(1.12); }
.gm-station.rec { width: 32px; height: 32px; border: 4px solid #34c759; font-size: 11px; }
.gm-station.dim { opacity: .45; }
.gm-cluster { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 99px; border: 3px solid rgba(255, 255, 255, .92); color: #fff; font: 700 13px/1 var(--font); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer; }
.gm-halo { width: 52px; height: 52px; border-radius: 50%; border: 2px solid; pointer-events: none; }
.gm-info { font: 13px/1.4 var(--font); color: #1c1c1e; max-width: 240px; }
.maplibregl-popup-content { background: var(--glass-thick) !important; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 16px !important; box-shadow: var(--shadow) !important; color: var(--ink); padding: 12px 14px !important; font: 13px/1.4 var(--font); border: 1px solid var(--glass-edge); }
.maplibregl-popup-tip { display: none; }

/* Mobile: bottom sheet with detents --------------------------------------------------------- */
@media (max-width: 760px) {
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 92vh; height: 92dvh; border-radius: 28px 28px 0 0; border-bottom: 0; transform: translateY(var(--sheet-y, 52vh)); touch-action: none; }
  .panel.dragging { transition: none; }
  .grabber { display: block; width: 38px; height: 5px; border-radius: 99px; background: var(--ink-4); margin: 8px auto 0; flex: none; }
  .panel-head { padding-top: 8px; }
  .panel-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); touch-action: pan-y; }
  .map-controls { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
  .legend { display: none; }
  .live-pill { top: calc(10px + env(safe-area-inset-top)); }
  .sheet { left: 0; right: 0; bottom: 0; top: auto; transform: none; width: auto; max-height: 94vh; border-radius: 28px 28px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .55s var(--spring); }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  .toast { top: calc(10px + env(safe-area-inset-top)); }
  .upi-apps { grid-template-columns: repeat(3, 1fr); }
  #nav button { flex-direction: column; gap: 1px; min-height: 46px; font-size: 11px; }
  #nav button svg { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Futuristic layer ------------------------------------------------------------------------ */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
:root { --neon-a: #00e5ff; --neon-b: #7a5cff; --neon-c: #ff4fd8; --neon-d: #ffb347; }
.glow-text { background: linear-gradient(92deg, var(--neon-a), var(--neon-b) 45%, var(--neon-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.aurora { position: absolute; inset: -40% -10% auto; height: 180px; pointer-events: none; z-index: -1; opacity: .55; filter: blur(30px);
  background: radial-gradient(40% 60% at 20% 50%, color-mix(in srgb, var(--neon-a) 45%, transparent), transparent 70%), radial-gradient(35% 55% at 70% 40%, color-mix(in srgb, var(--neon-b) 40%, transparent), transparent 70%), radial-gradient(30% 50% at 95% 60%, color-mix(in srgb, var(--neon-c) 30%, transparent), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(6%) translateY(8%) scale(1.08); } }
.panel-head { position: relative; isolation: isolate; }

/* Animated neon border for premium cards */
.neon { position: relative; border-radius: var(--r-lg); }
.neon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--angle), var(--neon-a), var(--neon-b), var(--neon-c), var(--neon-d), var(--neon-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAngle 6s linear infinite; }
.neon.gold::after { background: conic-gradient(from var(--angle), #ffd60a, #ff9f0a, #ffef9a, #ff9f0a, #ffd60a); }
@keyframes spinAngle { to { --angle: 360deg; } }

/* Holographic membership card */
.holo { position: relative; aspect-ratio: 1.586; border-radius: 24px; padding: 20px; color: #fff; overflow: hidden; isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--spring);
  background: radial-gradient(120% 120% at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.4), transparent 42%),
    conic-gradient(from 210deg at 70% 30%, #0ff0ff, #6c5cff, #ff4fd8, #ffb347, #0ff0ff);
  box-shadow: 0 28px 60px rgba(60, 20, 140, .35), inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.25);
  display: flex; flex-direction: column; justify-content: space-between; font-variant-numeric: tabular-nums; }
.holo.driver { background: radial-gradient(120% 120% at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.45), transparent 42%), conic-gradient(from 200deg at 70% 30%, #ffd60a, #ff9f0a, #ff6b00, #ffe066, #ffd60a); color: #1c1200; box-shadow: 0 28px 60px rgba(160, 90, 0, .35), inset 0 1px 0 rgba(255,255,255,.6); }
.holo.ghost { background: linear-gradient(135deg, rgba(120,120,128,.35), rgba(120,120,128,.15)); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.holo::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45;
  background: repeating-linear-gradient(115deg, transparent 0 12px, rgba(255,255,255,.18) 12px 13px), linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%);
  background-size: auto, 250% 100%; animation: sheen 5s ease-in-out infinite; }
@keyframes sheen { 0% { background-position: 0 0, 150% 0; } 60%, 100% { background-position: 0 0, -100% 0; } }
.holo .chip-ic { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f7e7a1, #c9a646); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.holo .plan { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.holo .name { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.holo .meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .9; font-weight: 600; }

.plan-card { border-radius: var(--r-lg); padding: 18px; background: var(--glass-thin); display: grid; gap: 12px; }
.plan-card .price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-card .price small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plan-card li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.plan-card li svg { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 1px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps i { height: 4px; border-radius: 99px; background: var(--fill-2); }
.steps i.on { background: linear-gradient(90deg, var(--neon-a), var(--neon-b)); box-shadow: 0 0 10px color-mix(in srgb, var(--neon-b) 60%, transparent); }
.drop { border: 1.5px dashed var(--fill-2); border-radius: var(--r-md); padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover { border-color: var(--blue); background: var(--tint-blue); }
.drop.done { border-style: solid; border-color: color-mix(in srgb, var(--green) 60%, transparent); }
.drop .thumb { width: 54px; height: 54px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; overflow: hidden; flex: none; }
.drop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stop-line { position: relative; padding-left: 26px; display: grid; gap: 14px; }
.stop-line::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--neon-a), var(--neon-b), var(--neon-c)); }
.stop-line > div { position: relative; }
.stop-line > div::before { content: ""; position: absolute; left: -24px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--glass-thick); border: 3px solid var(--neon-b); box-shadow: 0 0 10px color-mix(in srgb, var(--neon-b) 70%, transparent); }
.btn-neon { color: #fff; background: linear-gradient(110deg, #00b4ff, #7a5cff 55%, #ff4fd8); box-shadow: 0 10px 28px rgba(122, 92, 255, .4), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-gold { color: #1c1200; background: linear-gradient(110deg, #ffe066, #ffb000); box-shadow: 0 10px 26px rgba(255, 176, 0, .35), inset 0 1px 0 rgba(255,255,255,.6); }
.tabs-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.issue { padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--fill); display: grid; gap: 2px; }
.issue.high { background: var(--tint-red); } .issue.medium { background: var(--tint-orange); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--ink-3); } .kv span:nth-child(even) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .holo::before, .aurora, .neon::after { animation: none !important; } }

/* Glass dropdown (public/js/select.js) ---------------------------------------------------- */
.gsel-native { display: none !important; }
.gsel { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; color: var(--ink); font-weight: inherit; }
.gsel .gsel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsel.placeholder .gsel-label { color: var(--ink-3); }
.gsel .gsel-chev { width: 16px; height: 16px; flex: none; color: var(--ink-3); transition: transform .3s var(--spring); }
.gsel[aria-expanded="true"] { background: var(--glass-thick); border-color: color-mix(in srgb, var(--blue) 55%, transparent); box-shadow: 0 0 0 4px var(--tint-blue); }
.gsel[aria-expanded="true"] .gsel-chev { transform: rotate(180deg); color: var(--blue); }
.gsel:disabled { opacity: .5; cursor: not-allowed; }
.gsel-pop { position: fixed; z-index: 200; border-radius: 18px; padding: 6px; display: flex; flex-direction: column; overflow: hidden;
  transform-origin: top center; animation: gselIn .26s var(--spring); }
.gsel-pop.up { transform-origin: bottom center; }
.gsel-pop.out { animation: gselOut .14s ease-in forwards; }
@keyframes gselIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes gselOut { to { opacity: 0; transform: scale(.97); } }
.gsel-list { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; display: grid; gap: 1px; scrollbar-width: thin; }
.gsel-search { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 12px; min-height: 40px; border-radius: 12px; background: var(--fill); flex: none; }
.gsel-search svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.gsel-search input { border: 0; outline: 0; background: none; width: 100%; font-size: 15px; min-width: 0; }
.gsel-group { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 10px 4px; }
.gsel-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 8px; border-radius: 11px; cursor: pointer; font-size: 15px; user-select: none; }
.gsel-opt svg { width: 16px; height: 16px; flex: none; color: var(--blue); visibility: hidden; }
.gsel-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsel-opt.act { background: var(--fill); }
.gsel-opt.sel { color: var(--blue); font-weight: 650; }
.gsel-opt.sel svg { visibility: visible; }
.gsel-opt.dis { opacity: .4; cursor: default; }
.gsel-empty { padding: 14px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* Car / Bike mode ------------------------------------------------------------------------- */
:root[data-mode="bike"] { --blue: #00a99d; --blue-2: #20c4b6; --tint-blue: rgba(0, 169, 157, .13); }
:root[data-mode="bike"][data-theme="dark"] { --blue: #2fd8c8; --blue-2: #5ee6d9; --tint-blue: rgba(47, 216, 200, .2); }
:root[data-mode="bike"] .aurora { filter: blur(30px) hue-rotate(-70deg); }
.mode-switch { margin-left: auto; display: grid; grid-auto-flow: column; padding: 3px; border-radius: 999px; background: var(--fill); gap: 2px; flex: none; }
.mode-switch button { border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border-radius: 999px; font-weight: 650; font-size: 13px; color: var(--ink-2); transition: background .25s, color .2s, box-shadow .25s; }
.mode-switch button svg { width: 17px; height: 17px; }
.mode-switch button.on { color: #fff; background: var(--blue); box-shadow: 0 4px 12px color-mix(in srgb, var(--blue) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
@media (max-width: 400px) { .mode-switch button span { display: none; } .brand .t-sub { display: none; } }

.mode-pick { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; overflow: auto;
  background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); animation: fadeIn .4s ease; }
.mode-pick.out { animation: fadeOut .35s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.mode-pick-inner { width: min(560px, 100%); display: grid; gap: 18px; text-align: center; animation: pickIn .6s var(--spring); }
@keyframes pickIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.mode-pick .brand-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; }
.mode-pick .brand-mark svg { width: 34px; height: 34px; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.mode-card { appearance: none; cursor: pointer; text-align: left; border-radius: 26px; padding: 18px; display: grid; gap: 8px; align-content: start; color: var(--ink); font: inherit;
  transition: transform .4s var(--spring), box-shadow .3s; }
.mode-card:hover { transform: translateY(-3px); }
.mode-card:active { transform: scale(.97); }
.mode-card .mode-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; margin-bottom: 6px;
  background: linear-gradient(135deg, #3395ff, #0a64e0); box-shadow: 0 10px 24px rgba(10, 100, 224, .35), inset 0 1px 0 rgba(255,255,255,.45); }
.mode-card.bike .mode-ic { background: linear-gradient(135deg, #2fe0c8, #00998e); box-shadow: 0 10px 24px rgba(0, 153, 142, .35), inset 0 1px 0 rgba(255,255,255,.45); }
.mode-card .mode-ic svg { width: 32px; height: 32px; }
.mode-card b { font-size: 21px; letter-spacing: -.02em; }
.mode-card .t-sub { min-height: 36px; }
.mode-card .pill { justify-self: start; }
.mode-card.chosen { box-shadow: 0 0 0 3px var(--blue), var(--shadow); }
@media (max-width: 440px) { .mode-cards { grid-template-columns: 1fr; } .mode-card { grid-template-columns: auto 1fr; column-gap: 14px; } .mode-card .mode-ic { grid-row: span 3; margin: 0; } .mode-card .t-sub { min-height: 0; } }

.holo.bike { background: radial-gradient(120% 120% at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.42), transparent 42%), conic-gradient(from 210deg at 70% 30%, #2fffd0, #00b3a6, #0a84ff, #b6ff5c, #2fffd0); color: #00201c; box-shadow: 0 28px 60px rgba(0, 120, 110, .35), inset 0 1px 0 rgba(255,255,255,.6); }
.neon.aqua::after { background: conic-gradient(from var(--angle), #2fffd0, #00b3a6, #0a84ff, #b6ff5c, #2fffd0); }
.btn-aqua { color: #00201c; background: linear-gradient(110deg, #5effdd, #00c2b2 55%, #3aa0ff); box-shadow: 0 10px 26px rgba(0, 170, 160, .35), inset 0 1px 0 rgba(255,255,255,.55); }

/* Scan-to-charge ------------------------------------------------------------------------ */
.scan-box { position: relative; aspect-ratio: 1; width: min(100%, 360px); margin: 0 auto; border-radius: 28px; overflow: hidden; background: #0b0b0d; box-shadow: var(--shadow-sm); }
.scan-box video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.scan-box.live video { opacity: 1; }
.scan-frame { position: absolute; inset: 14%; pointer-events: none; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; filter: drop-shadow(0 0 6px rgba(0,0,0,.4)); }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scan-frame b { position: absolute; left: 6%; right: 6%; height: 2px; top: 10%; border-radius: 2px; background: var(--blue); box-shadow: 0 0 14px 2px var(--blue); animation: scanSweep 2.2s ease-in-out infinite alternate; }
@keyframes scanSweep { to { top: 90%; } }
.scan-off { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 8px; color: rgba(255,255,255,.7); font-weight: 600; }
.scan-off svg { width: 40px; height: 40px; }
.scan-box.off .scan-off { display: grid; }
.scan-box.off .scan-frame { display: none; }
@media (prefers-reduced-motion: reduce) { .scan-frame b { animation: none; top: 50%; } }

/* Vehicle illustrations (public/js/vehicle-art.js) ----------------------------------------- */
.vehicle-art { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 300 / 140; filter: drop-shadow(0 16px 18px rgba(15, 25, 45, .18)); }
:root[data-theme="dark"] .vehicle-art { filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .55)); }
.vehicle-art svg { width: 100%; height: 100%; overflow: visible; display: block; }
.va-body { fill: #e9edf4; }
:root[data-theme="dark"] .va-body { fill: #3a3d45; }
.va-charge { transform-box: view-box; transform-origin: 0 0; transform: scaleX(var(--va, 0)); transition: transform 1.1s var(--spring); }
.va-stop-a { stop-color: color-mix(in srgb, var(--blue) 55%, #fff); }
.va-stop-b { stop-color: var(--blue); }
.va-wave { opacity: 0; }
.vehicle-art.charging .va-wave { opacity: 1; animation: vaWave 2.2s ease-in-out infinite; }
.vehicle-art.charging .va-charge { animation: vaPulse 1.8s ease-in-out infinite; }
@keyframes vaWave { from { transform: translateX(0); } to { transform: translateX(380px); } }
@keyframes vaPulse { 50% { opacity: .82; } }
.va-glass { fill: rgba(18, 28, 48, .62); }
.va-roof { fill: rgba(255, 255, 255, .2); }
.va-wheel { fill: #1c1c1e; }
.va-trim { fill: #2c2c30; }
.va-light { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .95; }
.va-tail { fill: none; stroke: #ff453a; stroke-width: 3; stroke-linecap: round; }
.va-line { fill: none; stroke: rgba(255, 255, 255, .4); stroke-width: 1.5; }
.va-outline { fill: none; stroke: rgba(15, 25, 45, .14); stroke-width: 1.5; }
:root[data-theme="dark"] .va-outline { stroke: rgba(255, 255, 255, .14); }
.va-pct { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px 12px; border-radius: 999px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #fff; background: rgba(10, 20, 40, .42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.vehicle-art.bike .va-pct { font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .vehicle-art .va-wave, .vehicle-art .va-charge { animation: none !important; } }

/* Energy card (charge setup + Garage) */
.energy-card { border-radius: var(--r-lg); padding: 16px; background: var(--glass-thin); border: 1px solid var(--glass-edge-2); display: grid; gap: 12px; }
.energy-card .va-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.energy-card .va-stats b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.energy-card .va-stats b small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.energy-card .va-stats span { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* Live gauge: glowing halo while energy flows */
.gauge { isolation: isolate; }
.gauge::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; z-index: -1; opacity: 0; transition: opacity .6s;
  background: conic-gradient(from var(--angle), transparent 0deg, color-mix(in srgb, var(--blue) 55%, transparent) 70deg, transparent 140deg, color-mix(in srgb, var(--blue) 35%, transparent) 220deg, transparent 300deg);
  filter: blur(14px); animation: spinAngle 4s linear infinite; }
.gauge.live::before { opacity: 1; }
.gauge .rays { position: absolute; inset: 26px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(color-mix(in srgb, var(--blue) 14%, transparent) 0deg 1.2deg, transparent 1.2deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 70%, transparent 72%); mask: radial-gradient(circle, transparent 54%, #000 56%, #000 70%, transparent 72%); }
.gauge.live .rays { animation: spinRays 18s linear infinite; }
@keyframes spinRays { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gauge::before, .gauge .rays { animation: none !important; } }
.va-target { transform-box: view-box; transform-origin: 0 0; transform: scaleX(var(--vt, 0)); transition: transform .8s var(--spring); fill: color-mix(in srgb, var(--blue) 22%, transparent); }
.mode-toggle button svg { width: 15px; height: 15px; }
.sum-bar { position: relative; height: 12px; border-radius: 99px; background: var(--fill); overflow: hidden; margin: 8px 0 6px; }
.sum-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; transition: width 1.2s var(--spring); }
.sum-bar i.to { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 55%, #fff), var(--blue)); }
.sum-bar i.from { background: var(--ink-4); z-index: 1; transition-delay: .1s; }

/* Printed receipt (public/js/receipt.js) ------------------------------------------------------ */
.receipt-stage { position: fixed; inset: 0; z-index: 260; display: grid; grid-template-rows: auto auto 1fr auto auto; justify-items: center; gap: 0; padding: calc(28px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  color: #fff; background: radial-gradient(120% 80% at 50% 0%, #1b2a4a 0%, #0b1426 55%, #060a14 100%); animation: fadeIn .3s ease; overflow: hidden; }
.receipt-stage.out { animation: fadeOut .26s ease forwards; }
.rc-head { text-align: center; margin-bottom: 14px; }
.rc-status { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }
.rc-printer { width: min(360px, 92vw); height: 22px; border-radius: 12px; background: linear-gradient(#e8ecf3, #b9c1cf); box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 #fff; position: relative; z-index: 2; }
.rc-printer i { position: absolute; left: 6%; right: 6%; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: #1a2233; }
.rc-window { width: min(320px, 84vw); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; margin-top: -11px; padding-top: 11px; min-height: 0; }
.rc-paper { position: relative; background: #fbfbf8; color: #1d1d1f; font: 11.5px/1.45 var(--mono); padding: 18px 16px 26px; transform: translateY(-102%);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from 135deg at top, #000 90deg, transparent 0) bottom / 12px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from 135deg at top, #000 90deg, transparent 0) bottom / 12px 8px repeat-x;
  box-shadow: inset 0 18px 14px -14px rgba(0,0,0,.25); }
.rc-paper.printing { animation: rcPrint 2.4s cubic-bezier(.45,.05,.35,1) forwards; }
.rc-paper.printed { transform: none; }
@keyframes rcPrint { 0% { transform: translateY(-102%); } 12% { transform: translateY(-88%); } 18% { transform: translateY(-86%); } 40% { transform: translateY(-50%); } 46% { transform: translateY(-48%); } 75% { transform: translateY(-12%); } 100% { transform: translateY(0); } }
.rc-brand { text-align: center; font: 800 18px/1 var(--font); letter-spacing: .28em; text-transform: uppercase; }
.rc-sub { text-align: center; font-size: 9.5px; letter-spacing: .18em; color: #6e6e73; margin-top: 4px; }
.rc-sep { border-top: 1px dashed #c7c7cc; margin: 9px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; }
.rc-row span:first-child { color: #6e6e73; flex: none; }
.rc-row span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid #1d1d1f; margin-top: 9px; padding-top: 8px; margin-bottom: 4px; }
.rc-total span { font-weight: 800; letter-spacing: .1em; }
.rc-total b { font: 800 22px/1 var(--font); letter-spacing: -.02em; }
.rc-barcode { width: 100%; height: 40px; margin-top: 12px; fill: #1d1d1f; }
.rc-ref { text-align: center; font-size: 9.5px; letter-spacing: .18em; color: #6e6e73; margin-top: 3px; }
.rc-thanks { text-align: center; font-size: 10px; margin-top: 10px; }
.rc-stamp { position: absolute; left: 50%; top: 58%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; display: grid; place-items: center;
  border: 3px double #2f8f4e; color: #2f8f4e; font: 900 22px/1 var(--font); letter-spacing: .14em; transform: rotate(-14deg) scale(2.2); opacity: 0; pointer-events: none; mix-blend-mode: multiply; }
.rc-paper.printed .rc-stamp { animation: rcStamp .45s cubic-bezier(.2,1.6,.4,1) .15s forwards; }
@keyframes rcStamp { to { transform: rotate(-14deg) scale(1); opacity: .85; } }
.rc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(360px, 92vw); margin-top: 16px; }
.rc-actions .btn { background: rgba(255,255,255,.12); color: #fff; }
.rc-actions .btn-light { background: #fff; color: #0b1426; }
.rc-pdf { margin-top: 10px; color: rgba(255,255,255,.7); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.rc-pdf svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .rc-paper.printing { animation-duration: .01s; } .rc-paper.printed .rc-stamp { animation-duration: .01s; } }

/* Animated success tick */
.done-mark { width: 88px; height: 88px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.done-mark::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--dm) 35%, transparent), transparent 70%); animation: dmBurst .9s ease-out .35s both; }
.done-mark.green { --dm: var(--green); } .done-mark.blue { --dm: var(--blue); }
.done-mark svg { width: 88px; height: 88px; }
.dm-ring { fill: var(--dm); stroke: var(--dm); stroke-width: 4; stroke-dasharray: 240; stroke-dashoffset: 240; fill-opacity: 0; animation: dmRing .55s ease-out forwards, dmFill .3s ease-out .45s forwards; transform-box: fill-box; transform-origin: center; transform: rotate(-90deg); }
.dm-check { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: dmCheck .35s ease-out .6s forwards; }
@keyframes dmRing { to { stroke-dashoffset: 0; } }
@keyframes dmFill { to { fill-opacity: 1; } }
@keyframes dmCheck { to { stroke-dashoffset: 0; } }
@keyframes dmBurst { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dm-ring, .dm-check, .done-mark::before { animation-duration: .01s !important; animation-delay: 0s !important; } }
.confirm-pay { text-align: center; display: grid; gap: 10px; }
.confirm-pay .amount { font-size: 40px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

  background: radial-gradient(90% 60% at 50% 45%, #14264a 0%, #0a1428 55%, #050a16 100%); color: #fff; transition: opacity .5s ease, transform .6s var(--spring); }
  transform: translateX(-100%); animation: spBeam 1.2s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
  clip-path: inset(0 100% 0 0); animation: spReveal 1s cubic-bezier(.6, 0, .2, 1) .45s forwards; text-shadow: 0 0 24px rgba(120, 170, 255, .45); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sign-in: dark hero with the charging vehicle, white sheet rising from below */
.auth { margin: -4px -14px -18px; display: grid; }
.auth-hero { position: relative; padding: 16px 18px 48px; color: #fff; overflow: hidden; border-radius: 0 0 0 0;
  background: radial-gradient(110% 90% at 70% 10%, #1d3566 0%, #0c1830 55%, #070d1c 100%); }
.auth-hero::after { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 60%; background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 45%, transparent), transparent); filter: blur(10px); }
.auth-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; font-size: 12px; opacity: .9; animation: fadeUp .5s ease both; }
.auth-brand svg { width: 16px; height: 16px; color: #7fb4ff; }
.auth-art { position: relative; z-index: 1; margin: 14px auto 0; max-width: 250px; animation: authArt .9s var(--spring) .1s both; }
.auth-art .vehicle-art { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); }
@keyframes authArt { from { opacity: 0; transform: translateX(40px) scale(.96); } }
.auth-sheet { position: relative; z-index: 2; margin-top: -30px; padding: 22px 18px 22px; border-radius: 26px 26px 0 0; background: var(--glass-thick); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .18); animation: sheetRise .7s var(--spring) .2s both; }
@keyframes sheetRise { from { transform: translateY(60px); opacity: 0; } }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.pw-eye svg { width: 19px; height: 19px; }
@media (prefers-reduced-motion: reduce) { .auth-art, .auth-sheet, .auth-brand { animation: none; } }

/* Garage */
.garage > * { animation: fadeUp .5s var(--spring) both; }
.garage > *:nth-child(2) { animation-delay: .06s; } .garage > *:nth-child(3) { animation-delay: .12s; } .garage > *:nth-child(4) { animation-delay: .18s; } .garage > *:nth-child(5) { animation-delay: .24s; } .garage > *:nth-child(6) { animation-delay: .3s; }
.g-hero { display: grid; gap: 10px; }
.g-art { margin: 6px auto 2px; width: 100%; max-width: 340px; animation: authArt .9s var(--spring) .1s both; }
.g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-card { border-radius: var(--r-lg); padding: 14px; background: var(--glass-thin); border: 1px solid var(--glass-edge-2); min-height: 112px; display: grid; align-content: start; gap: 2px; }
.g-card .between svg { width: 18px; height: 18px; color: var(--blue); }
.g-big { font-size: 26px; font-weight: 750; letter-spacing: -.03em; margin-top: 6px; display: block; }
.g-battery { grid-row: span 1; }
.g-batt { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.g-batt b { font-size: 28px; font-weight: 750; letter-spacing: -.03em; }
.g-batt small { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-left: 3px; }
.g-cell { width: 28px; height: 50px; border-radius: 8px; border: 2px solid var(--ink-4); position: relative; overflow: hidden; flex: none; }
.g-cell::before { content: ""; position: absolute; top: -6px; left: 8px; width: 8px; height: 4px; border-radius: 2px; background: var(--ink-4); }
.g-cell i { position: absolute; left: 2px; right: 2px; bottom: 2px; border-radius: 5px; background: linear-gradient(0deg, var(--blue), color-mix(in srgb, var(--blue) 50%, #fff)); transition: height 1s var(--spring); max-height: calc(100% - 4px); }
.g-near { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; width: 100%; border: 1px solid var(--glass-edge-2); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.g-mini svg { width: 120px; height: 90px; border-radius: 14px; background: color-mix(in srgb, var(--fill) 60%, transparent); }
.g-road { fill: none; stroke: var(--fill-2); stroke-width: 9; stroke-linecap: round; }
.g-route { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: dmRing 1.4s ease-out .5s forwards; }
.g-dot-a { fill: var(--ink-2); } .g-dot-b { fill: var(--blue); stroke: #fff; stroke-width: 2.5; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 6px; }
.wk { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 4px; }
.wk b { font-size: 10px; color: var(--ink-3); font-weight: 600; min-height: 12px; }
.wk i { align-self: end; width: 100%; max-width: 24px; height: 0; border-radius: 7px 7px 4px 4px; background: color-mix(in srgb, var(--blue) 25%, transparent); transition: height .9s var(--spring); }
.wk.today i { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 60%, #fff), var(--blue)); box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 35%, transparent); }
.wk span { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.wk.today span { color: var(--blue); }
@media (prefers-reduced-motion: reduce) { .garage > *, .g-art, .g-route { animation: none !important; } .g-route { stroke-dashoffset: 0; } }

/* Alignment fixes ------------------------------------------------------------------------------ */
/* Segmented controls never overflow their container: columns shrink, labels truncate. */
.segmented { grid-auto-columns: minmax(0, 1fr); }
.segmented button { min-width: 0; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Main menu: icon over label at every width (5 tabs don't fit side by side in the 420px panel). */
#nav button { flex-direction: column; gap: 2px; min-height: 48px; font-size: 11.5px; }
#nav button svg { width: 19px; height: 19px; }

/* Per-model vehicle drawings (millimetre coordinates) */
.va-light, .va-tail, .va-line, .va-outline { vector-effect: non-scaling-stroke; }
.va-light { stroke-width: 2.6; }
.va-tail { stroke-width: 2.6; }
.va-line { stroke-width: 1.2; stroke: rgba(255, 255, 255, .45); }
.va-roof-black { fill: #1f2229; }
:root[data-theme="dark"] .va-roof-black { fill: #15171c; }
.va-roof-glass { fill: rgba(18, 28, 48, .5); }
.va-light-px { fill: #fff; }
.va-tail-px { fill: #ff453a; }
.va-lamp { fill: #fff; stroke: rgba(15, 25, 45, .25); stroke-width: 1; vector-effect: non-scaling-stroke; }
.va-wave { transform-box: view-box; }
@keyframes vaWave { from { transform: translateX(0); } to { transform: translateX(130%); } }
.vehicle-art { max-height: 200px; width: auto; max-width: 100%; }
.vehicle-art.bike { max-height: 150px; }
.va-light, .va-light-px { filter: drop-shadow(0 0 1.2px rgba(10, 20, 40, .75)); }
.va-tail, .va-tail-px { filter: drop-shadow(0 0 1px rgba(80, 0, 0, .5)); }
.vprev { padding: 6px 12px; border-radius: var(--r-md); background: var(--fill); min-height: 60px; display: grid; place-items: center; }
.vprev .vehicle-art { max-height: 110px; }
/* Grids shrink with their container instead of growing to fit long, unwrapped text. */
.station { grid-template-columns: minmax(0, 1fr); }
.station > *, .card > *, .energy-card > *, .g-card > * { min-width: 0; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3, .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-head { overflow: hidden; }
/* Header: brand text shrinks (ellipsis) beside the Car/Bike switch instead of running under it. */
.brand > span:last-child { min-width: 0; overflow: hidden; }
.brand b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-head .mode-switch { margin-left: 0; }
/* Vehicle rows show the vehicle's own drawing */
.veh-thumb { width: 64px; flex: none; display: grid; place-items: center; }
.veh-thumb .vehicle-art { filter: none; max-height: 34px; }
.panel-head .brand .t-sub { display: none; }
.panel-head .brand b { font-size: 18px; }

/* ---------- Transitions ------------------------------------------------------------------- */
/* Screen changes (View Transitions API): only the panel content moves; the map stays put. */
#view { view-transition-name: panel-view; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(panel-view) { animation-duration: .42s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); overflow: hidden; }
::view-transition-old(panel-view), ::view-transition-new(panel-view) { animation-duration: .42s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); mix-blend-mode: normal; }
html[data-nav="push"]::view-transition-old(panel-view) { animation-name: vtOutLeft; }
html[data-nav="push"]::view-transition-new(panel-view) { animation-name: vtInRight; }
html[data-nav="pop"]::view-transition-old(panel-view) { animation-name: vtOutRight; }
html[data-nav="pop"]::view-transition-new(panel-view) { animation-name: vtInLeft; }
html[data-nav="tab-fwd"]::view-transition-old(panel-view) { animation-name: vtOutLeftSoft; }
html[data-nav="tab-fwd"]::view-transition-new(panel-view) { animation-name: vtInRightSoft; }
html[data-nav="tab-back"]::view-transition-old(panel-view) { animation-name: vtOutRightSoft; }
html[data-nav="tab-back"]::view-transition-new(panel-view) { animation-name: vtInLeftSoft; }
html[data-nav="fade"]::view-transition-old(panel-view) { animation-name: vtFadeOut; }
html[data-nav="fade"]::view-transition-new(panel-view) { animation-name: vtFadeIn; }
@keyframes vtInRight { from { transform: translateX(100%); } }
@keyframes vtOutLeft { to { transform: translateX(-28%); opacity: .2; } }
@keyframes vtInLeft { from { transform: translateX(-28%); opacity: .2; } }
@keyframes vtOutRight { to { transform: translateX(100%); } }
@keyframes vtInRightSoft { from { transform: translateX(14%); opacity: 0; } }
@keyframes vtOutLeftSoft { to { transform: translateX(-14%); opacity: 0; } }
@keyframes vtInLeftSoft { from { transform: translateX(-14%); opacity: 0; } }
@keyframes vtOutRightSoft { to { transform: translateX(14%); opacity: 0; } }
@keyframes vtFadeIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes vtFadeOut { to { opacity: 0; } }
html[data-nav] .view { animation: none; }
/* Fallback when the browser has no View Transitions: animate the incoming view only. */
.view.enter-push { animation: vtInRight .42s var(--spring); }
.view.enter-pop { animation: vtInLeft .42s var(--spring); }
.view.enter-tab-fwd { animation: vtInRightSoft .4s var(--spring); }
.view.enter-tab-back { animation: vtInLeftSoft .4s var(--spring); }
.view.enter-fade { animation: vtFadeIn .35s var(--spring); }
.panel-body { overflow-x: hidden; }

/* Sliding tab highlight */
#nav { position: relative; }
#nav .nav-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 10px; background: var(--glass-thick); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), inset 0 1px 0 var(--spec);
  transition: transform .5s cubic-bezier(.3, 1.35, .45, 1), width .5s cubic-bezier(.3, 1.35, .45, 1), opacity .2s; z-index: 0; pointer-events: none; }
#nav button.on { background: transparent; box-shadow: none; }
#nav button svg { transition: transform .4s cubic-bezier(.3, 1.6, .45, 1); }
#nav button.on svg { transform: translateY(-1px) scale(1.08); color: var(--blue); }

/* Session card: rises over the page, which steps back and dims */
.panel > .panel-head, .panel > .nav, .panel > .panel-body { transition: transform .5s var(--spring), opacity .4s ease, filter .4s ease; transform-origin: 50% 0; }
.panel.has-card > .panel-head, .panel.has-card > .nav, .panel.has-card > .panel-body { transform: scale(.93) translateY(6px); opacity: .35; filter: saturate(.7); pointer-events: none; }
.card-sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 14px; z-index: 5; display: flex; flex-direction: column; border-radius: 26px 26px var(--r-xl) var(--r-xl);
  background: var(--glass-thick); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: 0 -12px 40px rgba(0, 0, 0, .22);
  transform: translateY(105%); transition: transform .55s cubic-bezier(.32, .72, 0, 1); }
.card-sheet.in { transform: translateY(0); }
.card-sheet.out { transform: translateY(105%); transition-duration: .4s; }
.card-sheet.dragging { transition: none; }
.cs-handle { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.cs-handle i { width: 40px; height: 5px; border-radius: 99px; background: var(--ink-4); }
.cs-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 14px 18px; overscroll-behavior: contain; }
@media (max-width: 760px) { .card-sheet { border-radius: 26px 26px 0 0; top: 10px; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(panel-view), ::view-transition-new(panel-view), ::view-transition-group(panel-view) { animation: none !important; }
  .card-sheet, .panel > .panel-body, #nav .nav-ind { transition: none !important; }
}

/* Button morph: shrinks into a round spinner */
.btn { transition: transform .35s var(--spring), background .2s, opacity .2s, box-shadow .2s, max-width .45s cubic-bezier(.32, .72, 0, 1), border-radius .3s; }
.btn.morph { display: flex; margin-inline: auto; padding: 0; overflow: hidden; }
.btn.morph:disabled { opacity: 1; }
.btn.morph .spinner { margin: 0; }

/* Receipt rises from the bottom; sign-in panel drops away after signing in */
.receipt-stage { animation: rcIn .55s cubic-bezier(.32, .72, 0, 1); }
.receipt-stage.out { animation: rcOut .38s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes rcIn { from { transform: translateY(100%); } }
@keyframes rcOut { to { transform: translateY(100%); } }
.auth.leaving .auth-sheet { transform: translateY(110%); opacity: 0; transition: transform .45s cubic-bezier(.4, 0, 1, 1), opacity .45s; }
.auth.leaving .auth-hero { opacity: 0; transform: scale(1.04); transition: opacity .45s ease .1s, transform .5s ease; }
@media (prefers-reduced-motion: reduce) { .receipt-stage, .receipt-stage.out { animation-duration: .01s; } }

/* Splash: the app icon on the same near-black as the Android launch screen; it settles, a glass
   sheen sweeps across it, the name rises, then icon and name fly into the header. */
.splash { position: fixed; inset: 0; z-index: 400; display: grid; place-content: center; justify-items: center; gap: 14px; overflow: hidden; color: #fff; isolation: isolate; }
.splash::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #0b0b0d; transition: opacity .55s ease; }
.sp-glow { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -300px 0 0 -260px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 169, 255, .28), rgba(88, 86, 214, .14) 55%, transparent 75%); filter: blur(10px); opacity: 0; animation: spGlow 1.6s ease .2s forwards; transition: opacity .4s; }
.sp-icon { position: relative; width: 112px; height: 112px; border-radius: 26px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 120, 255, .35); animation: spIcon .9s cubic-bezier(.3, 1.4, .45, 1) both; }
.sp-icon svg { width: 100%; height: 100%; display: block; }
.sp-bolt { transform-box: fill-box; transform-origin: center; animation: spBolt .5s cubic-bezier(.3, 1.6, .45, 1) .45s both; }
.sp-sheen { position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .7) 50%, transparent 62%); transform: translateX(-120%); animation: spSheen 1s ease-in-out .75s forwards; }
.sp-word { font: 800 30px/1 var(--font); letter-spacing: -.02em; opacity: 0; animation: fadeUp .6s var(--spring) .7s forwards; }
.sp-tag { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); opacity: 0; animation: fadeUp .6s var(--spring) .95s forwards; margin-top: -6px; }
@keyframes spIcon { from { transform: scale(.55); opacity: 0; filter: blur(6px); } }
@keyframes spBolt { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes spSheen { to { transform: translateX(120%); } }
@keyframes spGlow { to { opacity: 1; } }
.splash.quick .sp-icon, .splash.quick .sp-bolt, .splash.quick .sp-sheen, .splash.quick .sp-word, .splash.quick .sp-tag, .splash.quick .sp-glow { animation-duration: .01s; animation-delay: 0s; }
.splash.out { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.splash.flying { pointer-events: none; }
.splash.flying::before, .splash.flying .sp-glow { opacity: 0; }
.splash.flying .sp-tag { opacity: 0 !important; transition: opacity .2s; animation: none; }
@media (prefers-reduced-motion: reduce) { .sp-icon, .sp-bolt, .sp-sheen, .sp-word, .sp-tag, .sp-glow { animation: none !important; opacity: 1; } .sp-sheen { display: none; } }

/* Live charging ring (public/js/energy-ring.js): soft disc, bright rim, glow */
.ering { position: relative; width: min(240px, 70vw); aspect-ratio: 1; margin: 6px auto 0; border-radius: 50%;
  background: radial-gradient(circle, #f7f8fd 0%, #eef0fa 50%, color-mix(in srgb, var(--blue) 14%, #f4f5fb) 70%, color-mix(in srgb, var(--blue) 55%, #fff) 86%, var(--blue) 95%, color-mix(in srgb, var(--blue) 85%, #000) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 25%, transparent), 0 16px 44px color-mix(in srgb, var(--blue) 32%, transparent), inset 0 2px 10px rgba(255, 255, 255, .7);
  transition: box-shadow .8s ease; }
:root[data-theme="dark"] .ering { background: radial-gradient(circle, #1b1e29 0%, #181b25 50%, color-mix(in srgb, var(--blue) 18%, #161922) 70%, color-mix(in srgb, var(--blue) 60%, #10131b) 86%, var(--blue) 95%, color-mix(in srgb, var(--blue) 70%, #000) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 35%, transparent), 0 16px 50px color-mix(in srgb, var(--blue) 30%, transparent); }
.ering { isolation: isolate; }
.er-halo { position: absolute; inset: -16px; border-radius: 50%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, transparent 78%, color-mix(in srgb, var(--blue) 55%, transparent) 86%, transparent 100%); filter: blur(8px); opacity: 0; will-change: opacity; }
.ering canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.er-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.er-center b { font-size: 60px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--ink); }
.er-center em { font-style: normal; font-size: 24px; font-weight: 700; color: var(--blue); margin-left: 2px; letter-spacing: 0; }
.er-sub { font-size: 13px; font-weight: 600; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .ering[data-state="charging"] { animation: none; } }
