@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@600;700;800&family=Noto+Sans+HK:wght@400;500;600;700;800;900&display=swap");

:root {
  --green: #e1262f;
  --green-deep: #b41420;
  --mint: #f9dcde;
  --yellow: #f4c84a;
  --cream: #fff0f1;
  --paper: #fffafa;
  --ink: #142b27;
  --muted: #72817d;
  --line: #dce2dc;
  --red: #d84940;
  --page-bg: #f1dadd;
}

html[data-theme="green"] { --green: #075d52; --green-deep: #064a43; --mint: #dcece7; --cream: #f4f1e9; --paper: #fffdf8; --page-bg: #e5e5df; }
html[data-theme="blue"] { --green: #245f9d; --green-deep: #174a7d; --mint: #dce8f4; --cream: #edf3f8; --paper: #fbfdff; --page-bg: #dfe8ef; }
html[data-theme="lightblue"] { --green: #52a9dc; --green-deep: #2d7faf; --mint: #dff1fb; --cream: #eef8fd; --paper: #fbfeff; --page-bg: #d8edf7; }
html[data-theme="purple"] { --green: #72539a; --green-deep: #554075; --mint: #e8e0f0; --cream: #f3eff7; --paper: #fdfbff; --page-bg: #e7e0ec; }
html[data-theme="red"] { --green: #e1262f; --green-deep: #b41420; --mint: #f9dcde; --cream: #fff0f1; --paper: #fffafa; --page-bg: #f1dadd; }
html[data-theme="orange"] { --green: #a75b24; --green-deep: #80441b; --mint: #f2e3d8; --cream: #f8f0e7; --paper: #fffaf5; --page-bg: #eadfd5; }
html[data-theme="pink"] { --green: #d85c9b; --green-deep: #a83c72; --mint: #f8deeb; --cream: #fff0f7; --paper: #fffafd; --page-bg: #f2dce7; }
html[data-theme="cyan"] { --green: #147a80; --green-deep: #0d5d63; --mint: #d9eeee; --cream: #edf6f5; --paper: #fbfefe; --page-bg: #dce9e8; }
html[data-theme="sand"] { --green: #866229; --green-deep: #65491d; --mint: #eee5d2; --cream: #f6f1e5; --paper: #fffdf7; --page-bg: #e7e0d2; }
html[data-theme="slate"] { --green: #425e6a; --green-deep: #304650; --mint: #dfe8eb; --cream: #eef2f3; --paper: #fbfdfe; --page-bg: #dce3e5; }
html[data-theme="black"] { --green: #242a2e; --green-deep: #090b0c; --mint: #e1e4e5; --cream: #f0f1f1; --paper: #fdfefe; --ink: #172024; --muted: #687479; --line: #d9ddde; --page-bg: #d5d8d9; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--page-bg);
  touch-action: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  min-width: 320px;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--mint) 72%, transparent), transparent 30rem), var(--page-bg);
  color: var(--ink);
  font-family: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: auto;
}
button { border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(244,200,74,.8); outline-offset: 2px; }

.launch-splash { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; overflow: hidden; background: #e1262f; opacity: 1; transition: opacity .3s ease, visibility .3s ease; }
.launch-splash::before, .launch-splash::after { position: absolute; width: 62vw; max-width: 390px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; animation: splash-ring 1.8s ease-out infinite; }
.launch-splash::after { animation-delay: .6s; }
.launch-splash.leaving { visibility: hidden; opacity: 0; pointer-events: none; }
.launch-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; color: #fff; text-align: center; }
.launch-logo { position: relative; z-index: 1; display: grid; width: 142px; height: 142px; place-items: center; }
.launch-logo > span { position: absolute; inset: 10px; border-radius: 34px; background: rgba(255,255,255,.15); filter: blur(10px); animation: splash-glow 1.3s ease-in-out infinite alternate; }
.launch-logo img { position: relative; width: 116px; height: 116px; border: 1px solid rgba(255,255,255,.38); border-radius: 29px; box-shadow: 0 18px 45px rgba(94,5,12,.28); animation: splash-logo 1.3s ease-in-out infinite alternate; }
.launch-name { margin-top: 15px; font-size: 2rem; font-weight: 900; letter-spacing: .16em; text-indent: .16em; text-shadow: 0 3px 14px rgba(94,5,12,.28); }
.launch-status { display: grid; gap: 5px; margin: 13px 0 0; color: #fff; text-align: center; }
.launch-status strong { font-size: 1rem; font-weight: 800; letter-spacing: .15em; text-indent: .15em; }
.launch-status span { color: rgba(255,255,255,.75); font: 700 .57rem "DM Sans", sans-serif; letter-spacing: .18em; }

.app-shell {
  position: relative;
  width: min(100%, 620px);
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  min-height: 0;
  margin: 0 auto;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(22,48,42,.12);
  touch-action: pan-y;
}

.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 20px 14px;
  background: var(--green-deep);
}
.threads-button, .instagram-button { position: absolute; z-index: 2; top: calc(50% + 12px); display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; background: rgba(255,255,255,.12); color: #fff; transform: translate(-50%, -50%); box-shadow: 0 5px 14px rgba(0,0,0,.12); touch-action: manipulation; }
.android-device .threads-button, .android-device .instagram-button { top: calc(50% + 6px); }
.threads-button { left: calc(50% - 36px); }
.instagram-button { left: calc(50% + 7px); }
.threads-button img, .instagram-button img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.threads-button span, .instagram-button span { position: absolute; right: -5px; bottom: -5px; display: grid; width: 17px; height: 17px; place-items: center; border: 2px solid var(--green-deep); border-radius: 50%; background: #fff; color: var(--green-deep); font: 900 12px/1 "DM Sans", sans-serif; }
.threads-button:active, .instagram-button:active { background: rgba(255,255,255,.22); transform: translate(-50%, -50%) scale(.95); }
.header-actions { display: flex; min-width: 0; flex: 0 1 auto; align-items: center; gap: 7px; }
.language-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 900; }
.language-panel { position: absolute; z-index: 18; top: calc(max(18px, env(safe-area-inset-top)) + 48px); right: 18px; width: 180px; padding: 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 14px; background: var(--paper); box-shadow: 0 15px 35px rgba(17,43,37,.22); }
.language-panel strong { display: block; margin-bottom: 8px; font-size: .66rem; }
.language-panel button { width: 100%; margin-top: 5px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: .58rem; font-weight: 800; }
.language-panel button.active { border-color: var(--red); background: var(--red); color: #fff; }
.theme-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 999px; background: rgba(255,255,255,.1); color: #d8ebe6; font-size: .61rem; font-weight: 800; }
.theme-button span { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--yellow); }
.share-button, .app-refresh-button { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: rgba(255,255,255,.1); color: #fff; }
.share-button span, .app-refresh-button span { font: 900 1rem/1 "DM Sans", sans-serif; transform: translateY(-1px); }
.share-button:active, .app-refresh-button:active { background: rgba(255,255,255,.2); transform: scale(.96); }
.app-refresh-button[aria-busy="true"] span { animation: spin .7s linear infinite; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; background: transparent; color: #fff; text-decoration: none; touch-action: manipulation; }
.brand > span:last-child { display: grid; }
.brand strong { font-size: .98rem; font-weight: 900; letter-spacing: .06em; line-height: 1.1; white-space: nowrap; }
.brand small { margin-top: 3px; color: #9fc5bc; font: 700 .5rem "DM Sans", sans-serif; letter-spacing: .16em; }
.bus-mark { position: relative; width: 35px; height: 35px; border: 2px solid #fff; border-radius: 10px; }
.bus-mark::before { content: ""; position: absolute; top: 6px; right: 5px; left: 5px; height: 10px; border: 2px solid #fff; border-radius: 3px; }
.bus-mark i, .bus-mark b { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.bus-mark i { left: 6px; } .bus-mark b { right: 6px; }
.live-badge { display: inline-flex; min-width: 142px; align-items: center; justify-content: center; gap: 5px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.1); color: #d8ebe6; font-size: .59rem; font-weight: 800; white-space: nowrap; }
.live-badge strong { min-width: 6ch; color: #fff; font: 900 .67rem "DM Sans", sans-serif; font-variant-numeric: tabular-nums; text-align: right; }
.live-badge small, .live-badge b { font-size: inherit; font-weight: 800; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #55d495; box-shadow: 0 0 0 4px rgba(85,212,149,.12); }

.stadium-banner { position: relative; z-index: 3; display: grid; height: 43px; grid-template-columns: 8px minmax(0,1fr) 8px; gap: 7px; align-items: center; margin: 10px 16px 0; padding: 5px 8px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--green) 58%, #fff); border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--green-deep) 88%, #06120f), color-mix(in srgb, var(--green-deep) 72%, #000)); box-shadow: 0 0 15px color-mix(in srgb, var(--green) 36%, transparent), inset 0 0 12px rgba(255,255,255,.08); }
.stadium-banner::after { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,.15) .7px, transparent .8px); background-size: 4px 4px; content: ""; opacity: .34; pointer-events: none; }
.stadium-light { position: relative; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: #f8df71; box-shadow: 0 0 5px #fff3a9, 0 0 12px #f4c84a; animation: stadium-light 1.2s ease-in-out infinite alternate; }
.stadium-screen { position: relative; z-index: 2; height: 31px; overflow: hidden; border-right: 1px solid rgba(255,255,255,.12); border-left: 1px solid rgba(255,255,255,.12); }
.stadium-message { position: absolute; top: 50%; left: 50%; width: max-content; color: #fffde2; font: 700 .88rem/1.1 "DM Sans", "Noto Sans HK", sans-serif; letter-spacing: .11em; text-shadow: 0 0 5px rgba(255,255,255,.82), 0 0 11px #f4c84a; white-space: nowrap; animation: stadium-vertical-swap 25s ease-in-out infinite both; }
.stadium-message-en { animation-delay: 5s; }
.stadium-message-ai { animation-delay: 10s; letter-spacing: .06em; }
.stadium-message-announcer { animation-delay: 15s; letter-spacing: .04em; }
.stadium-message-quiz { animation-delay: 20s; letter-spacing: .08em; }
.live-info-stack { display: grid; gap: 6px; margin: 8px 16px 0; }
.live-info-banner { position: relative; z-index: 4; display: grid; min-height: 58px; grid-template-columns: auto auto minmax(0,1fr); gap: 9px; align-items: center; margin: 0; padding: 8px 11px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--red) 28%,var(--line)); border-radius: 11px; background: var(--paper); box-shadow: 0 7px 18px rgba(27,45,40,.08); }
.live-info-pulse { width: 8px; height: 8px; border-radius: 50%; background: #e32835; box-shadow: 0 0 0 4px rgba(227,40,53,.12); animation: live-info-pulse 1.8s ease-in-out infinite; }
.live-info-banner > strong { padding: 6px 8px; border-radius: 7px; background: var(--red); color: #fff; font-size: .56rem; white-space: nowrap; }
.live-info-banner select { max-width: 100px; padding: 6px 21px 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--red); color: #fff; font: inherit; font-size: .55rem; font-weight: 850; }
.live-info-content { display: grid; min-width: 0; overflow: hidden; gap: 2px; color: var(--ink); cursor: default; user-select: none; -webkit-tap-highlight-color: transparent; }
.live-info-content span { display: block; width: max-content; min-width: 100%; overflow: visible; font: 850 .82rem/1.25 "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif; white-space: nowrap; will-change: transform; transition: opacity .28s ease,transform .28s ease; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#liveInfoText, #newsInfoText { font-size: .82rem !important; font-weight: 850 !important; line-height: 1.25 !important; }
.live-info-content small { overflow: hidden; color: var(--muted); font-size: .45rem; text-overflow: ellipsis; white-space: nowrap; }
.live-info-banner.changing .live-info-content span { opacity: 0; transform: translateY(5px); }
.live-info-banner.warning { border-color: #e32835; background: #fff0f1; box-shadow: 0 0 18px rgba(227,40,53,.18); }
@keyframes live-info-pulse { 50% { opacity: .35; transform: scale(.72); } }

.theme-panel { position: absolute; z-index: 15; top: calc(max(18px, env(safe-area-inset-top)) + 48px); right: 18px; width: 205px; padding: 13px; border: 1px solid rgba(255,255,255,.8); border-radius: 14px; background: var(--paper); box-shadow: 0 15px 35px rgba(17,43,37,.22); }
.theme-panel strong { display: block; font-size: .66rem; }
.theme-panel > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.theme-panel button { width: 22px; height: 22px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px #cad2ce; }
.theme-panel button.active { box-shadow: 0 0 0 2px var(--choice), 0 0 0 4px #fff; }


.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 22px 32px;
  background:
    radial-gradient(circle at 92% 78%, rgba(244,200,74,.16) 0 2px, transparent 3px) 0 0/18px 18px,
    linear-gradient(145deg, #087064, var(--green-deep));
  color: #fff;
}

.app-actions { display: grid; grid-template-columns: minmax(0,1.42fr) minmax(76px,.79fr) minmax(76px,.79fr); gap: 9px; padding: 14px 16px 0; }
.app-actions > button { min-height: 51px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); box-shadow: 0 6px 18px rgba(22,52,46,.07); }
.app-actions > button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
#stopPickerButton {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 14px 8px 12px;
  text-align: left;
}
.action-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--mint); color: var(--green); font: 900 1rem "DM Sans", sans-serif; }
.action-copy { display: grid; min-width: 0; overflow: hidden; }
.action-copy small { display: none; }
.action-copy strong {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink);
  font-size: .53rem;
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-copy em { display: none; }
#stopPickerButton > b { color: var(--green); font-size: .5rem; white-space: nowrap; }
.search-action { display: inline-flex; min-width: 92px; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; color: var(--green) !important; font-size: .64rem; font-weight: 900; }
.search-action > span { font: 800 1.08rem "DM Sans", sans-serif; }
.search-action.active { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); background: var(--mint); }
.favorite-board-action { min-width: 0; min-height: 44px; padding: 0 8px; touch-action: manipulation; flex-shrink: 0; }
.favorite-board-action.active { background: var(--green); color: #fff !important; }

.stop-picker-bar { padding: 14px 16px 0; }
.stop-picker-bar > button { display: grid; width: 100%; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px 15px 13px 13px; border: 1px solid #d7dfda; border-radius: 17px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 22px rgba(22,52,46,.08); text-align: left; }
.stop-pin { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--mint); }
.stop-pin i { position: relative; width: 14px; height: 18px; border: 3px solid var(--green); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.stop-pin i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 3px; height: 3px; border-radius: 50%; background: var(--green); }
.selected-stop-copy { display: grid; min-width: 0; font-style: normal; }
.selected-stop-copy small { color: #9b7922; font-size: .53rem; font-weight: 850; letter-spacing: .08em; }
.selected-stop-copy strong, .selected-stop-copy em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-stop-copy strong { margin-top: 2px; font-size: .77rem; }
.selected-stop-copy em { margin-top: 3px; color: var(--muted); font-size: .56rem; font-style: normal; }
.stop-picker-bar b { color: var(--green); font-size: .57rem; line-height: 1.5; text-align: right; }
.stop-picker-bar b i { font-style: normal; font-size: .65rem; }

.bus-search { margin: 10px 16px 0; padding: 11px; border: 1px solid var(--line); border-radius: 17px; background: color-mix(in srgb, var(--paper) 86%, transparent); }
.search-mode { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: #e7ece8; }
.search-mode button { min-height: 32px; border-radius: 8px; background: transparent; color: #6f807b; font-size: .62rem; font-weight: 850; }
.search-mode button.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(28,56,50,.09); }
.bus-search-box { display: flex; height: 45px; align-items: center; gap: 8px; margin-top: 9px; padding: 0 11px; border: 1px solid #d2dad5; border-radius: 11px; background: #fff; }
.bus-search-box > span { color: var(--green); font: 700 1.2rem "DM Sans", sans-serif; }
.bus-search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 650; }
.bus-search-box input::placeholder { color: #95a19e; font-size: .73rem; }
.bus-search-box button { width: 26px; height: 26px; flex: 0 0 auto; padding: 0; border-radius: 50%; background: #e8eeea; color: #6e7d79; font-size: 1rem; }
.bus-search > p { margin: 7px 2px 0; color: var(--muted); font-size: .55rem; }
.favorite-board-action { min-width: 0; min-height: 44px; padding: 0 8px; touch-action: manipulation; flex-shrink: 0; }
.favorite-board-action.active { background: var(--green); color: #fff; }
.hero::after { content: ""; position: absolute; right: -72px; bottom: -115px; width: 230px; height: 230px; border: 45px solid rgba(255,255,255,.04); border-radius: 50%; }
.eyebrow { margin: 0 0 8px; color: var(--yellow); font-size: .66rem; font-weight: 850; letter-spacing: .12em; }
.hero h1 { position: relative; z-index: 1; margin: 0; font-size: clamp(2.35rem, 10vw, 3.7rem); line-height: 1.04; letter-spacing: -.07em; }
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero > p:last-child { position: relative; z-index: 1; max-width: 310px; margin: 13px 0 0; color: #cae0db; font-size: .74rem; line-height: 1.65; }

.location-card {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  margin: -45px 16px 0;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(22,52,46,.14);
}
.pin { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--mint); }
.pin span { position: relative; width: 15px; height: 19px; border: 3px solid var(--green); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pin span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 3px; height: 3px; border-radius: 50%; background: var(--green); }
.location-copy { display: grid; min-width: 0; }
.location-copy small { color: #a28126; font-size: .55rem; font-weight: 850; letter-spacing: .1em; }
.location-copy strong, .location-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-copy strong { margin-top: 2px; font-size: .78rem; }
.location-copy span { margin-top: 3px; color: var(--muted); font-size: .57rem; }
.location-card button { min-height: 38px; padding: 0 11px; border-radius: 10px; background: var(--green); color: #fff; font-size: .65rem; font-weight: 850; white-space: nowrap; }
.location-card.loading button { cursor: wait; opacity: .65; }
.location-card.ready .pin { background: #dcf2e6; }

.result-section { padding: 28px 18px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-head p { margin: 0 0 3px; color: #ab8321; font: 800 .54rem "DM Sans", sans-serif; letter-spacing: .18em; }
.section-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.04em; }
.section-head button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 9px; background: #e2ece8; color: var(--green); font-size: .63rem; font-weight: 850; }
.section-head button:disabled { cursor: wait; opacity: .5; }
.section-head button.loading span { animation: spin .7s linear infinite; }

.state-card { display: grid; justify-items: center; margin-top: 16px; padding: 34px 20px; border: 1px dashed #cbd7d1; border-radius: 18px; background: rgba(255,253,248,.62); text-align: center; }
.state-card h3 { margin: 14px 0 0; font-size: .9rem; }
.state-card p { max-width: 280px; margin: 6px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.6; }
.retry-button { min-height: 38px; margin-top: 13px; padding: 0 14px; border-radius: 10px; background: var(--green); color: #fff; font-size: .64rem; font-weight: 850; }
.state-card.permission { border-style: solid; border-color: color-mix(in srgb, var(--green) 28%, var(--line)); background: color-mix(in srgb, var(--mint) 38%, var(--paper)); }
.state-card.permission .radar { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 9px color-mix(in srgb, var(--green) 10%, transparent), 0 0 0 18px color-mix(in srgb, var(--green) 5%, transparent); }
.state-card.permission .radar span { width: 18px; height: 18px; background: #fff; clip-path: polygon(50% 0, 65% 36%, 100% 50%, 65% 64%, 50% 100%, 35% 64%, 0 50%, 35% 36%); }
.state-card.permission .retry-button { width: min(100%, 290px); min-height: 48px; padding: 0 18px; font-size: .7rem; box-shadow: 0 7px 18px color-mix(in srgb, var(--green) 20%, transparent); }
.radar { display: grid; width: 56px; height: 56px; place-items: center; border: 1px solid #b8d4ca; border-radius: 50%; box-shadow: 0 0 0 9px rgba(12,119,104,.07), 0 0 0 18px rgba(12,119,104,.035); }
.radar span { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.state-card.loading .radar { animation: radar 1.25s ease-out infinite; }

.favorite-board { margin: 14px 12px 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--green) 16%, var(--line)); border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--mint) 64%, var(--paper)), var(--paper)); box-shadow: 0 8px 22px rgba(25,58,51,.05); }
.favorite-board.is-collapsed .favorite-board-list { display: none; }
.favorite-board.is-collapsed .favorite-board-head { align-items: center; }
.favorite-board.is-collapsed .favorite-board-head-actions { flex-wrap: nowrap; }
.favorite-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.favorite-board-eyebrow { margin: 0 0 3px; color: #ab8321; font: 800 .52rem "DM Sans", sans-serif; letter-spacing: .18em; animation: boardGlowSlow 4.8s ease-in-out infinite; text-shadow: 0 0 0 rgba(255,255,255,0); }
.favorite-board-head h2 { margin: 0; font-size: .92rem; line-height: 1.08; letter-spacing: -.04em; }
.favorite-board-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 46%; }
.favorite-board-head-actions small { color: var(--green); font-size: .62rem; font-weight: 850; }
.favorite-board-add-input { display: block; min-width: 0; }
.favorite-board-add-input input { width: 120px; min-height: 32px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--green) 16%, var(--line)); border-radius: 9px; background: #fff; color: var(--ink); font-size: .62rem; font-weight: 700; }
.favorite-board-add-input input::placeholder { color: #99a7a1; font-weight: 600; }
.favorite-board-head-actions button { min-height: 32px; padding: 4px 10px; border-radius: 9px; background: #e2ece8; color: var(--green); font-size: .6rem; font-weight: 850; line-height: 1.02; white-space: normal; }
.favorite-board-head-actions button span, .favorite-board-head-actions button small { display: block; }
.favorite-board-head-actions button small { font-size: .48rem; font-weight: 800; letter-spacing: .01em; }
.favorite-board-head-actions button:active, .favorite-board-head-actions button:hover { filter: brightness(.98); }
.favorite-board-list { display: grid; gap: 8px; margin-top: 14px; }
.favorite-board-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #eff6fa; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 12px rgba(25,58,51,.04); }
.favorite-board-card.is-favourite { border-color: color-mix(in srgb, var(--operator) 25%, #c8d7ff); background: linear-gradient(180deg, #f4f9ff, #eaf1fb); }
.favorite-board-row { display: grid; grid-template-columns: minmax(0,1fr) 112px; gap: 6px; align-items: stretch; padding: 10px 8px 8px 10px; border-left: 4px solid var(--operator, var(--red)); }
.favorite-board-open { display: grid; width: 100%; gap: 6px; align-items: start; padding: 0; background: transparent; color: var(--ink); text-align: left; }
.favorite-board-topline { display: grid; grid-template-columns: auto 64px; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.favorite-board-route { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-board-route { display: inline-flex; width: fit-content; min-width: 54px; min-height: 46px; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.68); color: #0f1114; font: 900 1.12rem "DM Sans", "Noto Sans HK", sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.favorite-board-copy { display: grid; min-width: 0; margin-left: 2px; padding-left: 2px; }
.favorite-board-copy strong, .favorite-board-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-board-copy strong { margin-top: 1px; font-size: .82rem; font-weight: 900; line-height: 1.15; }
.favorite-board-copy small { color: #59707f; font-size: .5rem; font-style: normal; font-weight: 800; line-height: 1.1; }
.favorite-board-eta {
  width: 64px;
  min-width: 64px;
  text-align: right;
  color: #0b1d2c;
  font: 900 1.04rem/1 "DM Sans", sans-serif;
  letter-spacing: -.05em;
}
.favorite-board-eta b {
  display: grid;
  width: 64px;
  grid-template-columns: 2.2ch 1fr;
  align-items: center;
  justify-content: end;
  column-gap: 3px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.favorite-board-eta-num {
  display: block;
  min-width: 2.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.favorite-board-eta-num.is-now { min-width: 2.2ch; }
.favorite-board-eta-unit {
  display: block;
  color: #8fc2e8;
  font-size: .53rem;
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1;
  text-align: left;
  margin-left: 0;
  white-space: nowrap;
}
.favorite-board-actions {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 112px;
  gap: 6px;
  padding-top: 12px;
  align-self: end;
}
.favorite-board-move, .favorite-board-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.7);
  color: #576a76;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  touch-action: manipulation;
  cursor: pointer;
}
.favorite-board-remove { color: #9f2e37; background: #f7e0e2; }
.favorite-board-foot { display: grid; gap: 8px; padding: 0 10px 10px; }
.favorite-board-meta { color: color-mix(in srgb, var(--operator, var(--red)) 75%, #31475f); font-size: .48rem; font-weight: 900; letter-spacing: .02em; }
.favorite-board-foot .favourite-button { width: 34px; height: 34px; }
.favorite-board-chips { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.favorite-board-loading { margin: 0; padding: 10px 12px 12px; color: var(--muted); font-size: .56rem; }
.favorite-board-empty { margin: 0; padding: 12px 2px 2px; color: var(--muted); font-size: .6rem; line-height: 1.6; }

.route-list { display: grid; gap: 11px; margin-top: 16px; }
.load-more-nearby { display: grid; width: 100%; min-height: 58px; grid-template-columns: 34px minmax(0,1fr); margin-top: 13px; align-items: center; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--green) 25%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--mint) 55%, var(--paper)); color: var(--green); text-align: left; }
.load-more-nearby > span { grid-row: 1/3; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--green); color: #fff; font-size: .9rem; }
.load-more-nearby strong { font-size: .67rem; }
.load-more-nearby small { margin-top: 2px; color: var(--muted); font-size: .51rem; }
.load-more-nearby:disabled { cursor: wait; opacity: .62; }
.global-route-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 15px rgba(25,58,51,.045); }
.global-route-card.is-favourite { border-color: #e5ce7a; background: linear-gradient(135deg, #fffdf8, #fffaf0); }
.global-route-open { display: grid; width: 100%; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; padding: 14px 54px 14px 14px; background: transparent; color: var(--ink); text-align: left; }
.global-route-no { display: grid; min-width: 58px; min-height: 50px; place-items: center; padding: 6px 8px; border-radius: 12px; background: var(--route-soft); color: var(--operator); font: 900 1.05rem "DM Sans", "Noto Sans HK", sans-serif; }
.global-route-copy { display: grid; min-width: 0; }
.global-route-copy small { color: var(--operator); font-size: .53rem; font-weight: 850; }
.global-route-copy strong { overflow: hidden; margin-top: 3px; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.global-route-copy strong i { color: var(--green); font-style: normal; }
.global-route-copy em { margin-top: 4px; color: var(--muted); font-size: .52rem; font-style: normal; }
.global-favourite-button { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border-radius: 10px; background: #edf1ee; color: #83918d; font-size: 1.05rem; line-height: 1; }
.global-favourite-button.active { background: #fff0b8; color: #9b7300; }
.global-boarding { margin: 0 14px 13px 82px; overflow: hidden; border-radius: 11px; background: color-mix(in srgb, var(--mint) 55%, var(--paper)); }
.global-boarding-note { margin: 0; padding: 10px; color: var(--muted); font-size: .54rem; }
.global-boarding-note.loading::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--green); animation: pulse .9s ease-in-out infinite; }
.global-boarding-ready { display: grid; gap: 7px; padding: 10px; }
.global-boarding-ready > p { display: grid; min-width: 0; margin: 0; }
.global-boarding-ready > p small { color: var(--green); font-size: .49rem; font-weight: 850; }
.global-boarding-ready > p strong { overflow: hidden; margin-top: 2px; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.global-boarding-ready > p em { margin-top: 3px; color: var(--muted); font-size: .5rem; font-style: normal; }
.global-boarding .station-etas { grid-column: auto; }
.route-card { position: relative; overflow: hidden; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 15px rgba(25,58,51,.045); cursor: pointer; }
.route-card:focus-visible { outline: 3px solid color-mix(in srgb,var(--green) 40%,transparent); outline-offset: 2px; }
.route-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--operator, var(--red)); }
.route-main { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 9px; align-items: center; }
.route-no { display: grid; min-width: 55px; min-height: 49px; place-items: center; padding: 6px 8px; border-radius: 12px; background: var(--route-soft, #f6e2df); color: var(--operator, var(--red)); font: 900 1.08rem "DM Sans", "Noto Sans HK", sans-serif; }
.route-destination { min-width: 0; }
.route-destination small, .route-destination strong, .route-destination span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-destination small { color: var(--operator, var(--red)); font-size: .55rem; font-weight: 850; }
.route-destination strong { margin-top: 2px; font-size: .82rem; }
.route-destination span { margin-top: 4px; color: var(--muted); font-size: .58rem; }
.route-boarding-line i, .route-boarding-line b { font: inherit; font-style: normal; }
.eta { min-width: 63px; text-align: right; }
.eta strong { color: var(--green); font: 900 1.45rem/1 "DM Sans", sans-serif; letter-spacing: -.06em; }
.eta strong small { margin-left: 2px; font-size: .5rem; letter-spacing: 0; }
.eta > span { display: block; margin-top: 6px; color: var(--ink); font-size: .82rem; font-weight: 900; line-height: 1.05; white-space: nowrap; }
.eta .arriving { font-size: 1rem; letter-spacing: -.02em; }
.favourite-button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border-radius: 10px; background: #edf1ee; color: #83918d; font-size: 1.05rem; line-height: 1; }
.favourite-button.active { background: #fff0b8; color: #9b7300; }
.route-card.is-favourite { border-color: #e5ce7a; background: linear-gradient(135deg, #fffdf8, #fffaf0); }
.stop-journey { margin: 12px 0 0 66px; overflow: hidden; border: 1px solid #dde7e2; border-radius: 12px; background: #f8faf8; }
.stop-arrival { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 8px; align-items: start; padding: 9px 10px; border-top: 1px solid #e2e9e5; }
.stop-arrival:first-child { border-top: 0; }
.stop-arrival.current { background: color-mix(in srgb, var(--mint) 56%, #fff); }
.stop-order { min-width: 45px; padding: 4px 5px; border-radius: 6px; background: #e7eeea; color: #60736d; font-size: .49rem; font-weight: 850; text-align: center; }
.stop-arrival.current .stop-order { background: var(--green); color: #fff; }
.stop-arrival p { min-width: 0; margin: 0; }
.stop-arrival p strong, .stop-arrival p small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-arrival p strong { font-size: .67rem; }
.stop-arrival p small { margin-top: 3px; color: var(--muted); font-size: .51rem; }
.stop-location-line { display: flex; min-width: 0; align-items: center; gap: 6px; margin-top: 3px; }
.stop-location-line > small { min-width: 0; flex: 1 1 auto; margin: 0 !important; overflow: hidden; color: var(--muted); font-size: .51rem; text-overflow: ellipsis; white-space: nowrap; }
.map-preview-link { display: inline-flex; min-height: 24px; flex: 0 0 auto; align-items: center; gap: 3px; margin: 0; padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--green) 20%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--green) 10%, #fff); color: var(--green); font-size: .49rem; font-weight: 850; line-height: 1; white-space: nowrap; }
.map-preview-link > span { font: 900 .62rem/1 "DM Sans", sans-serif; }
.map-preview-link:active { opacity: .65; transform: scale(.97); }
.station-etas { grid-column: 1/-1; display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.eta-chip { display: inline-grid; width: 100%; min-width: 0; min-height: 42px; align-content: center; justify-items: center; gap: 3px; padding: 5px 3px; border-radius: 8px; background: #e7efeb; color: var(--green); }
.eta-chip strong { font: 900 .7rem/1 "DM Sans", "Noto Sans HK", sans-serif; white-space: nowrap; }
.eta-chip strong small { margin-left: 2px; font-size: .43rem; }
.eta-chip strong.arriving { font-size: .65rem; }
.eta-chip .eta-clock { color: var(--ink); font: 900 .68rem/1 "DM Sans", "Noto Sans HK", sans-serif; white-space: nowrap; }
.eta-chip em { padding: 3px 4px; border-radius: 4px; background: #9b6a0b; color: #fff; font-size: .43rem; font-style: normal; font-weight: 900; white-space: nowrap; }
.eta-chip.last-bus { background: #fff0cf; color: #875b08; }
.no-arrival { color: var(--muted); font-size: .52rem; }
.next-stop-note { margin: 0; padding: 9px 11px; border-top: 1px solid #e2e9e5; color: var(--muted); font-size: .54rem; }
.next-stop-note.loading::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--green); animation: pulse .9s ease-in-out infinite; }
.service-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #e5e9e5; }
.service-row p { display: grid; grid-template-columns: auto 1fr; gap: 0 7px; margin: 0; }
.service-row p > span { grid-row: 1/3; align-self: center; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #f3f0e7; font-size: .78rem; }
.service-row small { color: var(--muted); font-size: .53rem; }
.service-row strong { font: 800 .72rem "DM Sans", sans-serif; }
.service-row .fare strong { color: var(--green); }
.no-time { color: #9a8a63 !important; font: 700 .6rem "Noto Sans HK", sans-serif !important; }

footer { padding: 25px 22px 22px; color: var(--muted); text-align: center; }
footer p { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0; color: #48675f; font-size: .62rem; font-weight: 800; }
footer p span { width: 6px; height: 6px; border-radius: 50%; background: #28a372; }
footer small { display: block; max-width: 470px; margin: 7px auto 0; font-size: .52rem; line-height: 1.65; }
.bottom-nav { position: fixed !important; z-index: 100; top: auto !important; right: auto !important; bottom: 0 !important; left: 50% !important; isolation: isolate; display: flex; width: min(100%,620px); min-height: 66px; margin: 0; align-items: flex-start; padding: 7px 10px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 -8px 26px rgba(20,47,41,.11); transform: translateX(-50%); -webkit-transform: translateX(-50%); }
.bottom-nav .nav-bus, .bottom-nav .nav-voice, .bottom-nav .nav-announcer, .bottom-nav .nav-quiz, .bottom-nav .nav-feedback, .bottom-nav .nav-board, .bottom-nav .nav-version, .bottom-nav .nav-install { position: relative; display: grid; width: 12.5%; min-width: 0; justify-items: center; gap: 3px; padding: 3px 0; background: transparent; color: var(--muted); text-decoration: none; }
.bottom-nav .nav-bus.active { color: var(--green); }
.bottom-nav .nav-bus.active::before { content: ""; position: absolute; top: -7px; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--green); }
.bottom-nav .nav-bus[aria-busy="true"] .nav-bus-icon { animation: pulse .8s ease-in-out infinite; }
.bottom-nav strong { font-size: .55rem; font-weight: 900; }
.bottom-nav .nav-voice strong, .bottom-nav .nav-announcer strong, .bottom-nav .nav-quiz strong, .bottom-nav .nav-feedback strong, .bottom-nav .nav-board strong, .bottom-nav .nav-version strong, .bottom-nav .nav-install strong { line-height: 1; }
.bottom-nav .nav-voice small, .bottom-nav .nav-announcer small, .bottom-nav .nav-quiz small, .bottom-nav .nav-feedback small, .bottom-nav .nav-board small, .bottom-nav .nav-version small, .bottom-nav .nav-install small { color: var(--muted); font-size: .3rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.bottom-nav .nav-voice { color: var(--red); }
.nav-voice-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 2px solid currentColor; border-radius: 9px; font-size: .72rem; }
.nav-voice > em { position: absolute; z-index: 2; top: -5px; right: 5px; padding: 2px 4px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.65); font: 900 .34rem/1 "DM Sans",sans-serif; animation: pulse 1.1s ease-in-out infinite; }
.bottom-nav .nav-announcer { color: var(--red); }
.bottom-nav .nav-announcer.active { color: #e1262f; text-shadow: 0 0 8px color-mix(in srgb,var(--red) 45%,transparent); }
.nav-announcer-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 2px solid currentColor; border-radius: 7px; font-size: .75rem; }
.nav-announcer > em { position: absolute; z-index: 2; top: -5px; right: 1px; padding: 2px 4px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.65); font: 900 .31rem/1 "DM Sans",sans-serif; }
.bottom-nav .nav-quiz { color: var(--green); }
.nav-quiz-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 2px solid currentColor; border-radius: 50%; font: 900 .78rem "DM Sans",sans-serif; }
.nav-quiz > em { position: absolute; z-index: 2; top: -5px; right: 0; padding: 2px 4px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.65); font: 900 .3rem/1 "DM Sans",sans-serif; }
.bottom-nav .nav-version { color: var(--green); }
.bottom-nav .nav-install { color: var(--green); }
.bottom-nav .nav-install.installing .nav-install-icon { animation: pulse .8s ease-in-out infinite; }
.bottom-nav .nav-install.installed { cursor: default; color: var(--muted); opacity: .66; }
.nav-bus-icon { position: relative; width: 25px; height: 22px; border: 2px solid currentColor; border-radius: 6px; }
.nav-bus-icon::before { content: ""; position: absolute; top: 3px; right: 3px; left: 3px; height: 6px; border: 1.5px solid currentColor; border-radius: 2px; }
.nav-bus-icon::after { content: ""; position: absolute; right: 3px; bottom: -4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: -13px 0 currentColor; }
.nav-bus-icon i { position: absolute; right: 4px; bottom: 3px; left: 4px; height: 2px; border-radius: 2px; background: currentColor; }
.nav-feedback-icon { position: relative; width: 26px; height: 21px; border: 2px solid currentColor; border-radius: 7px; }
.nav-feedback-icon::after { position: absolute; bottom: -5px; left: 5px; width: 7px; height: 7px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; background: var(--paper); content: ""; transform: skewY(-35deg); }
.nav-feedback-icon i { position: absolute; top: 8px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 5px 0 currentColor, 10px 0 currentColor; }
.nav-version-icon { position: relative; width: 23px; height: 24px; border: 2px solid currentColor; border-radius: 5px; }
.nav-version-icon::before, .nav-version-icon::after, .nav-version-icon i { position: absolute; left: 5px; width: 10px; height: 2px; border-radius: 2px; background: currentColor; content: ""; }
.nav-version-icon::before { top: 5px; }
.nav-version-icon i { top: 10px; }
.nav-version-icon::after { top: 15px; }
.nav-install-icon { position: relative; width: 26px; height: 22px; border: 2px solid currentColor; border-radius: 7px; }
.nav-install-icon i { position: absolute; top: 3px; left: 10px; width: 2px; height: 10px; border-radius: 2px; background: currentColor; }
.nav-install-icon i::before { position: absolute; right: -3px; bottom: -1px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: rotate(45deg); }
.nav-install-icon::after { position: absolute; right: 5px; bottom: 3px; left: 5px; height: 2px; border-radius: 2px; background: currentColor; content: ""; }
.nav-feedback-icon i { left: 5px; }
.bottom-nav .nav-feedback { color: var(--red); }
.nav-video-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 2px solid currentColor; border-radius: 8px; font: 900 .68rem/1 sans-serif; }
.bottom-nav .nav-board { color: var(--green); }
.nav-board > em { position: absolute; z-index: 2; top: -5px; right: 0; padding: 2px 4px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.65); font: 900 .3rem/1 "DM Sans",sans-serif; }
.nav-feedback > em { position: absolute; z-index: 2; top: -5px; right: 1px; padding: 2px 4px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.65); font: 900 .31rem/1 "DM Sans",sans-serif; }
.bottom-nav .nav-voice > em, .bottom-nav .nav-announcer > em, .bottom-nav .nav-quiz > em, .bottom-nav .nav-feedback > em, .bottom-nav .nav-board > em { animation: pulse 1.1s ease-in-out infinite; transform-origin: center; }
.toast { position: fixed; z-index: 50; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); left: 18px; width: max-content; max-width: calc(100% - 36px); margin: auto; padding: 10px 14px; border-radius: 10px; background: #173d35; color: #fff; box-shadow: 0 10px 28px rgba(5,35,29,.22); font-size: .65rem; font-weight: 800; }
.back-to-top { position: fixed; z-index: 44; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); display: grid; width: 46px; height: 46px; place-items: center; padding: 4px; border: 1px solid color-mix(in srgb,var(--green) 34%,#fff); border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(10,42,35,.24); }
.back-to-top[hidden] { display: none; }
.back-to-top span { font: 900 1rem/1 "DM Sans", sans-serif; }
.back-to-top strong { font-size: .42rem; line-height: 1; }
.back-to-top:active { transform: scale(.94); }

.station-backdrop { position: fixed; z-index: 60; inset: 0; background: rgba(7,32,28,.45); backdrop-filter: blur(2px); }
#routeBackdrop { z-index: 75; }
#mapBackdrop { z-index: 125; }
#voiceMapBackdrop { z-index: 165; }
#feedbackBackdrop { z-index: 105; }
#statsBackdrop { z-index: 135; }
#versionBackdrop { z-index: 145; }
#installBackdrop { z-index: 115; }
.station-sheet { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 88vh; margin: auto; overflow: hidden; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 99px; background: #cbd4cf; }
.station-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.station-sheet header small { color: #9e7b20; font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.station-sheet header h2 { margin: 2px 0 0; font-size: 1.15rem; letter-spacing: -.04em; }
.station-sheet header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.station-search { display: flex; height: 43px; align-items: center; gap: 8px; margin-top: 13px; padding: 0 11px; border: 1px solid #d4dcd7; border-radius: 11px; background: #f8faf7; }
.station-search span { color: var(--green); font-size: 1.2rem; }
.station-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.station-count { margin: 9px 2px 6px; color: var(--muted); font-size: .57rem; }
.station-list { max-height: calc(88vh - 165px); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #e5e9e6; }
.station-option { display: grid; width: 100%; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 3px; border-bottom: 1px solid #e8ece9; background: transparent; color: var(--ink); text-align: left; }
.station-operator { display: grid; min-width: 40px; height: 28px; place-items: center; padding: 0 6px; border-radius: 7px; background: #f3e0df; color: #bc3e3b; font: 900 .55rem "DM Sans", sans-serif; }
.station-operator.ctb { background: #f4dfe2; color: #be3340; }
.station-operator.all { background: var(--mint); color: var(--green); }
.station-operator.manual { background: var(--mint); color: var(--green); }
.station-all { background: linear-gradient(90deg, color-mix(in srgb, var(--mint) 45%, transparent), transparent); }
.station-option > span:nth-child(2) { min-width: 0; }
.station-option strong, .station-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-option strong { font-size: .72rem; }
.station-option small { margin-top: 3px; color: var(--muted); font-size: .55rem; }
.station-distance { color: var(--green); font-size: .59rem; font-weight: 850; white-space: nowrap; }
.station-empty { padding: 24px 12px; color: var(--muted); font-size: .66rem; text-align: center; }

.route-sheet { position: fixed; z-index: 80; right: 0; bottom: 0; left: 0; width: min(100%,620px); height: calc(100dvh - max(8px,env(safe-area-inset-top))); max-height: none; margin: auto; overflow-x: hidden; overflow-y: scroll; overscroll-behavior-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 10px 18px calc(28px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.route-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.route-sheet header small { color: var(--green); font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.route-sheet header h2 { margin: 2px 0 0; font-size: 1.1rem; letter-spacing: -.04em; }
.route-sheet header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.route-sheet-summary { margin: 9px 0 10px; padding: 9px 11px; border-radius: 10px; background: var(--mint); color: var(--green); font-size: .59rem; font-weight: 850; }
.route-sheet-summary > p { margin: 0; }
.route-quick-info { margin: 10px 0; padding: 13px; border-radius: 15px; background: linear-gradient(145deg,#8f0e1a,#c31728); color: #fff; box-shadow: 0 10px 24px rgba(133,12,26,.22); }
.route-quick-head { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 11px; align-items: center; }
.route-quick-head > span { display: grid; min-width: 64px; min-height: 48px; place-items: center; padding: 5px 9px; border: 2px solid rgba(255,255,255,.82); border-radius: 9px; background: #fff; color: #ad1220; font: 900 1.18rem "DM Sans","Noto Sans HK",sans-serif; }
.route-quick-head p { display: grid; gap: 2px; min-width: 0; margin: 0; }
.route-quick-head small { color: rgba(255,255,255,.7); font-size: .45rem; font-weight: 800; }
.route-quick-head strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.route-boarding-stop { display: grid; gap: 3px; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); }
.route-boarding-stop small { color: #ffd0d4; font-size: .46rem; font-weight: 850; }
.route-boarding-stop strong { font-size: .75rem; }
.route-boarding-stop span { color: rgba(255,255,255,.78); font-size: .49rem; }
.route-three-arrivals { margin-top: 10px; }
.route-three-arrivals > small { display: block; margin-bottom: 6px; color: #ffd0d4; font-size: .46rem; font-weight: 850; }
.route-three-arrivals .station-etas { gap: 7px; }
.route-three-arrivals .eta-chip { min-height: 53px; background: #fff; color: #a61120; }
.route-three-arrivals .eta-chip strong { font-size: .83rem; }
.route-three-arrivals .eta-chip .eta-clock { color: #343434; }
.route-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.route-quick-actions button, .route-quick-actions a { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgba(255,255,255,.32); border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; font-size: .51rem; font-weight: 900; text-decoration: none; }
.route-overview { margin: 11px 0; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb,var(--mint) 26%,var(--paper)); }
.route-overview > header { margin-bottom: 8px; }
.route-overview > header small { color: var(--red); font: 850 .43rem "DM Sans",sans-serif; letter-spacing: .14em; }
.route-overview > header h3 { margin: 2px 0 0; font-size: .78rem; }
.route-overview-map { position: relative; height: min(34dvh,280px); min-height: 220px; overflow: hidden; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 11px; background: #e8ece9; touch-action: none !important; -webkit-user-select: none; user-select: none; }
.route-overview-map, .route-overview-map .leaflet-container, .route-overview-map .leaflet-pane { touch-action: none !important; }
.route-map-credit { position: absolute; z-index: 800; right: 5px; bottom: 4px; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.84); color: #46504c; font: 700 .34rem/1.25 "DM Sans",sans-serif; pointer-events: none; }
.route-map-unavailable { display: grid; height: 100%; place-items: center; margin: 0; color: var(--muted); font-size: .57rem; }
.route-notices { margin: 11px 0; padding: 11px; border: 1px solid color-mix(in srgb,var(--red) 26%,var(--line)); border-radius: 14px; background: var(--paper); }
.route-notices > header { align-items: center; }
.route-notices > header small { color: var(--red); font: 850 .42rem "DM Sans",sans-serif; letter-spacing: .12em; }
.route-notices > header h3 { margin: 2px 0 0; font-size: .76rem; }
.route-notices > header time { color: var(--muted); font: 750 .43rem "DM Sans",sans-serif; }
.route-notice-message { display: grid; gap: 6px; margin-top: 9px; }
.route-notice-message p { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 7px; align-items: center; margin: 0; padding: 8px; border-radius: 9px; background: #fff1db; color: #80520c; font-size: .51rem; line-height: 1.45; }
.route-notice-message p span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #d88b18; color: #fff; font-weight: 900; }
.route-notice-message p.is-clear { background: #e7f3ec; color: #2e6b4c; }
.route-notice-message p.is-clear span { background: #329666; }
.route-notices dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 9px 0 0; }
.route-notices dl div { min-width: 0; padding: 7px 8px; border-radius: 8px; background: color-mix(in srgb,var(--mint) 32%,var(--paper)); }
.route-notices dt { color: var(--muted); font-size: .4rem; font-weight: 800; }
.route-notices dd { overflow: hidden; margin: 2px 0 0; font-size: .5rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.route-live-update { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb,var(--paper) 72%,transparent); color: var(--green); font-size: .44rem; }
.route-live-update i { width: 6px; height: 6px; border-radius: 50%; background: #28b879; box-shadow: 0 0 7px #28b879; animation: route-live-pulse 2.6s ease-in-out infinite; }
.route-service-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-top: 9px; }
.route-service-facts p { display: grid; gap: 2px; min-width: 0; margin: 0; padding: 7px; border-radius: 8px; background: color-mix(in srgb,var(--paper) 78%,transparent); text-align: center; }
.route-service-facts small { color: var(--muted); font-size: .4rem; font-weight: 750; }
.route-service-facts strong { color: var(--ink); font-size: .57rem; }
.route-service-label { display: block; margin-top: 8px; color: var(--red); font-size: .46rem; }
.transfer-all-services { margin: 0 0 11px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.transfer-all-services summary { color: var(--red); font-size: .51rem; font-weight: 900; }
.transfer-all-services > section { padding-top: 8px; }
.transfer-all-services > section + section { margin-top: 8px; border-top: 1px solid var(--line); }
.transfer-all-services > section > b { font-size: .5rem; }
.route-stop-list { border-top: 1px solid var(--line); }
.route-stop-row { position: relative; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 10px; padding: 11px 3px; }
.route-stop-row::before { content: ""; position: absolute; top: 0; bottom: 0; left: 17px; width: 2px; background: var(--line); }
.route-stop-row:first-child::before { top: 50%; }
.route-stop-row:last-child::before { bottom: 50%; }
.route-stop-row > span { position: relative; z-index: 1; display: grid; width: 31px; height: 31px; place-items: center; border: 3px solid var(--paper); border-radius: 50%; background: #dfe7e3; color: #60736d; font: 800 .52rem "DM Sans", sans-serif; box-shadow: 0 0 0 1px var(--line); }
.route-stop-row.first > span, .route-stop-row.last > span { background: var(--green); color: #fff; box-shadow: 0 0 0 1px var(--green); }
.route-stop-row p { display: grid; min-width: 0; margin: 0; }
.route-stop-row small { color: var(--green); font-size: .48rem; font-weight: 850; }
.route-stop-row strong { margin-top: 1px; font-size: .7rem; }
.route-stop-row em { margin-top: 3px; color: var(--muted); font-size: .5rem; font-style: normal; }
.route-stop-row .route-stop-journey { color: var(--green); font-weight: 800; }
.route-stop-row.route-current-stop { margin: 3px 0; padding-right: 7px; padding-left: 3px; border: 1px solid color-mix(in srgb,var(--red) 48%,transparent); border-radius: 12px; background: color-mix(in srgb,var(--red) 11%,var(--paper)); box-shadow: 0 0 8px color-mix(in srgb,var(--red) 22%,transparent); animation: current-stop-glow 2.8s ease-in-out infinite; }
.route-stop-row.route-current-stop > span { background: var(--red); color: #fff; box-shadow: 0 0 0 1px var(--red), 0 0 10px color-mix(in srgb,var(--red) 55%,transparent); }
.route-current-stop-label { width: max-content; margin-top: 5px; padding: 4px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: .48rem; font-weight: 900; }
.route-journey-note { margin: 8px 3px 4px; padding: 9px 10px; border-radius: 9px; background: color-mix(in srgb,var(--mint) 38%,var(--paper)); color: var(--muted); font-size: .49rem; line-height: 1.5; text-align: center; }
.route-sheet-loading { padding: 28px 12px; color: var(--muted); font-size: .64rem; text-align: center; }
.route-sheet-loading.error { color: #a35454; }
.voice-sheet { position: fixed; z-index: 130; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: calc(100dvh - max(12px,env(safe-area-inset-top))); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(88px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.announcer-sheet { position: fixed; z-index: 135; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: calc(100dvh - max(12px,env(safe-area-inset-top))); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(88px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.announcer-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.announcer-sheet header small { color: var(--red); font-size: .52rem; font-weight: 900; }
.announcer-sheet header h2 { margin: 2px 0 0; font-size: 1.05rem; }
.announcer-sheet header > button { width: 36px; height: 36px; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.announcer-display { margin-top: 12px; overflow: hidden; border: 7px solid #4a4e4d; border-radius: 12px; background: #e9e8ff; color: #1d2869; box-shadow: inset 0 0 0 2px #111, 0 8px 22px rgba(0,0,0,.2); }
.announcer-display > p { margin: 0; padding: 34px 16px; font-size: .67rem; font-weight: 850; text-align: center; }
.announcer-route-head { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid #8286aa; background: #d9dbff; }
.announcer-route-head strong { padding: 4px 8px; border-radius: 5px; background: #e1262f; color: #fff; font: 900 .83rem "DM Sans",sans-serif; }
.announcer-route-head span { font-size: .6rem; font-weight: 850; }
.announcer-display section { display: grid; grid-template-columns: 21px minmax(0,1fr); min-height: 54px; border-bottom: 1px solid #9699b4; }
.announcer-display section > i { position: relative; background: #e1262f; }
.announcer-display section > i::after { position: absolute; top: 19px; left: 6px; width: 9px; height: 9px; border-radius: 50%; background: #bfc8ff; content: ""; }
.announcer-display section p { display: grid; gap: 1px; margin: 0; padding: 6px 10px; }
.announcer-display section small { color: #58608a; font-size: .43rem; font-weight: 850; }
.announcer-display section strong { font-size: .84rem; line-height: 1.2; }
.announcer-display section em { font-size: .43rem; font-style: normal; }
.announcer-display .announcer-now > i::after { background: #ffdf31; box-shadow: 0 0 9px #ffb000; animation: route-live-pulse 2.6s ease-in-out infinite; }
.announcer-display .announcer-now strong { text-shadow: 0 0 9px rgba(65,71,180,.42); animation: announcer-current 2.8s ease-in-out infinite; }
.announcer-target { margin: 0; padding: 8px 11px; background: #222b5e; color: #fff; font-size: .56rem; font-weight: 900; text-align: center; }
.announcer-target.urgent { background: #e1262f; animation: current-stop-glow 2.8s ease-in-out infinite; }
.announcer-landscape-button { display: grid; width: 100%; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; margin-top: 9px; padding: 9px 11px; border: 1px solid color-mix(in srgb,var(--red) 38%,var(--line)); border-radius: 9px; background: color-mix(in srgb,var(--red) 9%,var(--paper)); color: var(--red); text-align: left; }
.announcer-landscape-button > span { grid-row: 1/3; font-size: 1.1rem; transform: rotate(90deg); }
.announcer-landscape-button strong { font-size: .58rem; }
.announcer-landscape-button small { color: var(--muted); font-size: .42rem; }
.announcer-preferences { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.speech-language-control { display: grid; gap: 7px; padding: 11px; margin: 10px 0; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb,var(--red) 6%,var(--paper)); }
.speech-language-control > strong { color: var(--ink); font-size: .72rem; }
.speech-language-control > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.speech-language-control button { min-height: 38px; padding: 7px 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: .62rem; font-weight: 800; }
.speech-language-control button.active { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 5px 15px color-mix(in srgb,var(--red) 24%,transparent); }
.speech-language-control > small { color: var(--muted); font-size: .46rem; line-height: 1.4; }
.announcer-preferences > .speech-language-control { grid-column: 1 / -1; margin: 0; }
.announcer-preferences label { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.announcer-preferences input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); }
.announcer-preferences span { display: grid; min-width: 0; gap: 2px; }
.announcer-preferences strong { font-size: .51rem; }
.announcer-preferences small { color: var(--muted); font-size: .38rem; line-height: 1.25; }
.announcer-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 12px; }
.announcer-search label { display: grid; gap: 3px; }
.announcer-search span { color: var(--muted); font-size: .47rem; font-weight: 850; }
.announcer-search input { min-width: 0; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font: 800 .67rem "DM Sans",sans-serif; }
.announcer-search button { align-self: end; height: 43px; padding: 0 13px; border-radius: 9px; background: var(--red); color: #fff; font-size: .59rem; font-weight: 900; }
.announcer-results, .announcer-stops { display: grid; gap: 7px; margin-top: 10px; }
.announcer-results > button, .announcer-stops > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); text-align: left; }
.announcer-results > button strong { color: var(--red); font-size: .7rem; }
.announcer-results > button span, .announcer-stops > button strong { min-width: 0; font-size: .58rem; }
.announcer-results small, .announcer-stops small { color: var(--muted); font-size: .42rem; }
.announcer-stops h3 { margin: 4px 0 0; color: var(--red); font-size: .67rem; }
.announcer-stops > button > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--red); font-size: .47rem; font-weight: 900; }
.announcer-stops > button.selected { border-color: var(--red); background: color-mix(in srgb,var(--red) 10%,var(--paper)); box-shadow: 0 0 12px color-mix(in srgb,var(--red) 28%,transparent); }
.announcer-stop-mode { width: 100%; margin-top: 12px; padding: 11px; border-radius: 9px; background: #343c39; color: #fff; font-size: .58rem; font-weight: 900; }
.announcer-note { color: var(--muted); font-size: .44rem; line-height: 1.55; text-align: center; }
.announcer-sheet.landscape-mode { z-index: 300; inset: 0; width: 100vw; max-height: none; height: 100dvh; padding: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); border-radius: 0; background: #171b1a; }
.announcer-sheet.landscape-mode > .sheet-handle, .announcer-sheet.landscape-mode .announcer-preferences, .announcer-sheet.landscape-mode .announcer-search, .announcer-sheet.landscape-mode .announcer-results, .announcer-sheet.landscape-mode .announcer-stops, .announcer-sheet.landscape-mode .announcer-stop-mode, .announcer-sheet.landscape-mode .announcer-note { display: none !important; }
.announcer-sheet.landscape-mode > header { height: 40px; align-items: center; padding: 0 4px; color: #fff; }
.announcer-sheet.landscape-mode > header small { color: #ffb8bc; }
.announcer-sheet.landscape-mode > header h2 { margin: 0; font-size: .8rem; }
.announcer-sheet.landscape-mode .announcer-display { display: grid; height: calc(100dvh - 55px); grid-template-rows: auto repeat(3,minmax(0,1fr)) auto; margin: 5px 0 0; border-width: 6px; border-radius: 7px; }
.announcer-sheet.landscape-mode .announcer-route-head { padding: 5px 12px; }
.announcer-sheet.landscape-mode .announcer-route-head strong { font-size: clamp(.9rem,4vw,1.5rem); }
.announcer-sheet.landscape-mode .announcer-route-head span { font-size: clamp(.65rem,2.4vw,1rem); }
.announcer-sheet.landscape-mode .announcer-display section { min-height: 0; grid-template-columns: 34px minmax(0,1fr); }
.announcer-sheet.landscape-mode .announcer-display section > i::after { top: 50%; left: 10px; width: 14px; height: 14px; transform: translateY(-50%); }
.announcer-sheet.landscape-mode .announcer-display section p { align-content: center; padding: 4px 15px; }
.announcer-sheet.landscape-mode .announcer-display section small { font-size: clamp(.45rem,1.6vw,.68rem); }
.announcer-sheet.landscape-mode .announcer-display section strong { font-size: clamp(1rem,4.5vw,2rem); }
.announcer-sheet.landscape-mode .announcer-display section em { font-size: clamp(.43rem,1.5vw,.65rem); }
.announcer-sheet.landscape-mode .announcer-target { padding: 5px 12px; font-size: clamp(.56rem,2vw,.83rem); }
.announcer-sheet.landscape-mode .announcer-landscape-button { position: fixed; z-index: 2; top: max(8px,env(safe-area-inset-top)); right: calc(52px + env(safe-area-inset-right)); width: auto; margin: 0; padding: 5px 8px; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; }
.announcer-sheet.landscape-mode .announcer-landscape-button > span { font-size: .75rem; transform: none; }
.announcer-sheet.landscape-mode .announcer-landscape-button strong { font-size: .45rem; }
.announcer-sheet.landscape-mode .announcer-landscape-button small { display: none; }
.route-start-announcer { display: block; margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: var(--red); color: #fff; font-size: .49rem; font-weight: 900; }
.quiz-sheet { position: fixed; z-index: 138; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: calc(100dvh - max(12px,env(safe-area-inset-top))); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(88px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.quiz-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; }
.quiz-sheet > header small { color: var(--green); font-size: .52rem; font-weight: 900; }
.quiz-sheet > header h2 { margin: 2px 0 0; font-size: 1.05rem; }
.quiz-sheet > header button { width: 36px; height: 36px; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.bus-game-hub{display:grid;gap:13px;margin-top:14px}.bus-game-hub-intro{padding:5px 2px 2px}.bus-game-hub-intro em,.quiz-main-heading em{color:var(--green);font-size:.48rem;font-style:normal;font-weight:950;letter-spacing:.09em}.bus-game-hub-intro h3{margin:3px 0;font-size:1rem}.bus-game-hub-intro p{margin:0;color:var(--muted);font-size:.52rem;font-weight:700}.bus-game-card{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr);gap:11px;overflow:hidden;padding:16px;border:1px solid color-mix(in srgb,var(--green) 24%,var(--line));border-radius:20px;background:linear-gradient(145deg,color-mix(in srgb,var(--green) 11%,var(--paper)),var(--paper));box-shadow:0 10px 24px rgba(22,48,42,.09)}.bus-game-card::after{position:absolute;right:-35px;bottom:-55px;width:140px;height:140px;border:24px solid color-mix(in srgb,var(--green) 8%,transparent);border-radius:50%;content:"";pointer-events:none}.bus-game-card-icon{z-index:1;display:grid;width:58px;height:58px;place-items:center;border-radius:17px;background:var(--green);color:#fff;box-shadow:0 8px 18px color-mix(in srgb,var(--green) 28%,transparent);font:950 1.3rem "DM Sans",sans-serif}.bus-game-card>div{z-index:1;display:grid;align-content:start;gap:3px}.bus-game-card>div em{color:var(--green);font-size:.44rem;font-style:normal;font-weight:900}.bus-game-card>div strong{font-size:.82rem;line-height:1.25}.bus-game-card>div p{margin:2px 0;color:var(--ink);font-size:.52rem;font-weight:700;line-height:1.55}.bus-game-card>div small{color:var(--muted);font-size:.43rem;font-weight:800}.bus-game-card>button{z-index:1;grid-column:1/-1;display:flex;min-height:46px;align-items:center;justify-content:center;gap:8px;margin-top:3px;border-radius:13px;background:var(--green);color:#fff;font-size:.62rem;font-weight:950}.bus-game-card>button b{font-size:1rem;line-height:1}.bus-game-card-drive .bus-game-card-icon{background:linear-gradient(145deg,#ffd45a,#e49400);color:#4c3100}.game-hub-back,.drive-hub-back{width:max-content!important;height:auto!important;padding:6px 10px!important;border-radius:999px!important;background:color-mix(in srgb,var(--green) 10%,var(--paper))!important;color:var(--green)!important;font-size:.48rem!important;font-weight:900}.quiz-main-heading{display:grid;gap:3px;padding:2px}.quiz-main-heading strong{font-size:.82rem}.drive-sheet>header>div{display:grid;justify-items:start;gap:2px}.drive-hub-back{margin-bottom:3px}
.quiz-home { display: grid; gap: 10px; margin-top: 12px; padding: 13px; border-radius: 13px; background: color-mix(in srgb,var(--green) 9%,var(--paper)); }
.quiz-home > p { margin: 0; color: var(--ink); font-size: .62rem; font-weight: 750; line-height: 1.65; }
.quiz-home > label { display: grid; gap: 4px; color: var(--green); font-size: .5rem; font-weight: 900; }
.quiz-home input { height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .63rem; }
.quiz-home label small { color: var(--muted); font-size: .39rem; }
.quiz-count { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.quiz-count button { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); font-size: .53rem; font-weight: 900; }
.quiz-count button.active { border-color: var(--green); background: var(--green); color: #fff; }
.quiz-count button.locked { border-style: dashed; background: color-mix(in srgb,var(--muted) 8%,var(--paper)); color: var(--muted); opacity: .72; }
.quiz-50-requirement { display: grid; gap: 3px; padding: 9px 10px; border: 1px dashed color-mix(in srgb,var(--green) 45%,var(--line)); border-radius: 9px; background: color-mix(in srgb,var(--green) 5%,var(--paper)); }
.quiz-50-requirement strong { color: var(--green); font-size: .56rem; }
.quiz-50-requirement span { color: var(--ink); font-size: .47rem; font-weight: 800; }
.quiz-50-requirement small { color: var(--muted); font-size: .43rem; font-weight: 800; line-height: 1.55; }
.quiz-50-requirement.unlocked { border-style: solid; background: color-mix(in srgb,#30a46c 10%,var(--paper)); }
.quiz-50-requirement.unlocked strong { color: #16734b; }
.quiz-start { padding: 11px; border-radius: 9px; background: var(--green); color: #fff; font-size: .62rem; font-weight: 900; }
.quiz-start:disabled { cursor: wait; opacity: .72; }
.quiz-prepare { display: grid; gap: 6px; padding: 9px; border-radius: 9px; background: color-mix(in srgb,var(--green) 8%,var(--paper)); }
.quiz-prepare[hidden] { display: none; }
.quiz-prepare > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: .58rem; font-weight: 850; }
.quiz-prepare > div strong { color: var(--green); font: 950 .72rem "DM Sans",sans-serif; }
.quiz-prepare progress { width: 100%; height: 12px; overflow: hidden; border: 0; border-radius: 999px; background: color-mix(in srgb,var(--green) 12%,var(--paper)); accent-color: var(--green); }
.quiz-prepare progress::-webkit-progress-bar { border-radius: 999px; background: color-mix(in srgb,var(--green) 12%,var(--paper)); }
.quiz-prepare progress::-webkit-progress-value { border-radius: 999px; background: var(--green); transition: width .2s ease; }
.quiz-prepare small { color: var(--muted); font-size: .43rem; font-weight: 700; line-height: 1.45; }
.quiz-game { margin-top: 12px; }
.quiz-countdown { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 12px; color: var(--green); text-align: center; }
.quiz-countdown strong { font: 950 7rem/1 "DM Sans",sans-serif; text-shadow: 0 0 30px color-mix(in srgb,var(--green) 48%,transparent); animation: quiz-countdown-pop .8s ease both; }
.quiz-countdown span { color: var(--ink); font-size: .75rem; font-weight: 900; }
@keyframes quiz-countdown-pop { 0% { opacity: 0; transform: scale(.45); } 42% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
.quiz-status { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--ink); font-size: .57rem; font-weight: 900; }
.quiz-status time { padding: 5px 8px; border-radius: 999px; background: var(--green); color: #fff; font: 800 .6rem "DM Sans",sans-serif; }
.quiz-status > button { min-height: 42px; padding: 8px 14px; border: 2px solid #d84940; border-radius: 9px; background: #fff4f4; color: #b92c35; font-size: 16px; font-weight: 950; line-height: 1; }
.quiz-question { display: grid; justify-items: center; margin-top: 10px; padding: 18px 12px; border-radius: 13px; background: linear-gradient(145deg,var(--green),var(--green-deep)); color: #fff; text-align: center; box-shadow: 0 10px 24px color-mix(in srgb,var(--green) 28%,transparent); }
.quiz-question small { color: #f1e9ff; font-size: .59rem; font-weight: 850; opacity: 1; }
.quiz-question > strong { margin-top: 4px; color: #ffe56b; text-shadow: 0 0 8px rgba(255,229,107,.55); font: 900 1.82rem "DM Sans",sans-serif; animation: quiz-main-glow 2.8s ease-in-out infinite; }
.quiz-question > strong.quiz-place-name { max-width: 100%; color: #7ff4ff; text-shadow: 0 0 9px rgba(127,244,255,.55); font: 900 clamp(1.05rem,5.5vw,1.5rem) "Noto Sans HK",sans-serif; line-height: 1.3; }
.quiz-question h3 { margin: 9px 0 0; color: #fff; font-size: .8rem; font-weight: 900; line-height: 1.45; }
.quiz-options { display: grid; gap: 8px; margin-top: 10px; }
.quiz-options button { min-height: 64px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 18px; font-weight: 900; line-height: 1.45; text-align: left; }
.quiz-options button.correct { border-color: #239d6c; background: #dff5ea; color: #126a47; }
.quiz-options button.wrong { border-color: #d84940; background: #f9dcde; color: #a1222a; }
.quiz-result { display: grid; justify-items: center; gap: 6px; margin-top: 12px; padding: 18px; border-radius: 13px; background: color-mix(in srgb,var(--green) 10%,var(--paper)); text-align: center; }
.quiz-result small { color: var(--green); font-weight: 900; }
.quiz-result h3 { margin: 0; font-size: 1rem; }
.quiz-result > strong { color: var(--green); font: 900 1.25rem "DM Sans",sans-serif; }
.quiz-result p { margin: 0; color: var(--muted); font-size: .5rem; }
.quiz-result button { margin-top: 5px; padding: 9px 14px; border-radius: 8px; background: var(--green); color: #fff; font-size: .55rem; font-weight: 900; }
.quiz-share-result { display: grid; width: 100%; gap: 4px; margin-top: 9px; padding-top: 10px; border-top: 1px solid color-mix(in srgb,var(--green) 24%,var(--line)); }
.quiz-share-result > b { color: var(--green); font-size: .65rem; }
.quiz-share-result > span { color: var(--muted); font-size: .44rem; }
.quiz-share-result > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.quiz-share-result > div button:first-child { background: linear-gradient(100deg,#874ec7,#d33f85,#ef7b35); }
.quiz-share-result > div button:last-child { background: #111; }
.quiz-leaderboard { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.quiz-leaderboard > header { display: flex; align-items: center; justify-content: space-between; }
.quiz-leaderboard > header strong { color: var(--green); font-size: .74rem; }
.quiz-leaderboard > header button { padding: 5px 8px; border-radius: 7px; background: var(--mint); color: var(--green); font-size: .44rem; font-weight: 900; }
.quiz-month-picker { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; gap: 6px; align-items: center; margin-top: 8px; }
.quiz-month-picker button, .quiz-month-picker select { min-height: 34px; border: 1px solid color-mix(in srgb,var(--green) 30%,var(--line)); border-radius: 8px; background: var(--paper); color: var(--green); font-size: .55rem; font-weight: 900; }
.quiz-month-picker button { font-size: 1rem; line-height: 1; }
.quiz-month-picker button:disabled { opacity: .3; }
.quiz-month-picker select { width: 100%; padding: 0 28px 0 10px; text-align: center; text-align-last: center; }
.quiz-leaderboard-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-top: 8px; }
.quiz-leaderboard-tabs button { padding: 7px 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--muted); font-size: .45rem; font-weight: 900; }
.quiz-leaderboard-tabs button.active { border-color: var(--green); background: var(--green); color: #fff; }
#quizLeaderboard { display: grid; gap: 5px; margin-top: 8px; }
#quizLeaderboard > p { color: var(--muted); font-size: .49rem; text-align: center; }
#quizLeaderboard article { display: grid; grid-template-columns: 25px minmax(62px,1fr) auto auto minmax(72px,auto) auto; gap: 6px; align-items: center; padding: 10px 8px; border-radius: 9px; background: color-mix(in srgb,var(--green) 7%,var(--paper)); }
#quizLeaderboard article > b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: .5rem; }
#quizLeaderboard .quiz-player { min-width: 0; overflow: hidden; color: var(--ink); font-size: .76rem; font-weight: 950; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
#quizLeaderboard .quiz-score-time, #quizLeaderboard .quiz-score-correct { display: grid; gap: 1px; color: var(--ink); font-size: .51rem; font-weight: 900; text-align: center; white-space: nowrap; }
#quizLeaderboard .quiz-score-time small, #quizLeaderboard .quiz-score-correct small { color: var(--muted); font-size: .4rem; font-weight: 800; }
#quizLeaderboard .quiz-score-date { color: var(--ink); font-size: .46rem; font-weight: 800; line-height: 1.3; text-align: center; }
#quizLeaderboard .quiz-rank-days { justify-self: end; padding: 4px 6px; border-radius: 999px; background: color-mix(in srgb,var(--green) 15%,var(--paper)); color: var(--green); font-size: .44rem; font-style: normal; font-weight: 950; line-height: 1.2; text-align: center; white-space: nowrap; }
.quiz-unlimited-note { display: block; margin-top: 8px; color: var(--ink); font-size: .45rem; font-weight: 750; line-height: 1.5; text-align: center; }
.voice-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.voice-sheet > header small { color: var(--green); font-size: .5rem; font-weight: 850; }
.voice-sheet > header small b { display: inline-block; padding: 3px 6px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 10px rgba(255,176,0,.5); }
.voice-sheet > header h2 { margin: 4px 0 0; font-size: 1.1rem; }
.voice-sheet > header > button { width: 34px; height: 34px; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.voice-intro { margin: 10px 0; color: var(--muted); font-size: .56rem; line-height: 1.55; }
.voice-mic { position: relative; display: grid; width: 100%; min-height: 128px; place-items: center; align-content: center; gap: 5px; overflow: hidden; border-radius: 18px; background: linear-gradient(145deg,var(--green-deep),var(--green)); color: #fff; box-shadow: 0 12px 28px color-mix(in srgb,var(--green) 25%,transparent); }
.voice-mic > em { position: absolute; top: 9px; right: 10px; padding: 4px 7px; border-radius: 999px; background: #ffb000; color: #3d2500; font: 900 .42rem "DM Sans",sans-serif; }
.voice-mic > span { font-size: 2rem; }
.voice-mic > strong { font-size: .75rem; }
.voice-mic > small { color: rgba(255,255,255,.78); font-size: .48rem; }
.voice-mic.listening { animation: voice-listening 1s ease-in-out infinite alternate; }
.voice-mic.listening > span { animation: pulse .65s ease-in-out infinite; }
@keyframes voice-listening { to { box-shadow: 0 0 0 9px color-mix(in srgb,var(--green) 18%,transparent),0 16px 34px color-mix(in srgb,var(--green) 34%,transparent); } }
.voice-form { margin-top: 12px; }
.voice-form > label { color: var(--muted); font-size: .48rem; font-weight: 800; }
.voice-form > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 5px; }
.voice-form input { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); font-size: .62rem; }
.voice-form button { padding: 9px 13px; border-radius: 10px; background: var(--red); color: #fff; font-size: .58rem; font-weight: 900; }
.voice-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.voice-examples button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--green); font-size: .48rem; font-weight: 800; }
.voice-result { margin-top: 12px; }
.voice-result > p { padding: 12px; border-radius: 10px; background: var(--mint); color: var(--muted); font-size: .55rem; line-height: 1.5; text-align: center; }
.voice-thinking small { display: block; margin-top: 5px; color: var(--green); font-size: .45rem; font-weight: 850; }
.voice-thinking { color: var(--green)!important; font-weight: 850; }
.voice-answer { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); }
.voice-answer small { color: var(--green); font-size: .48rem; font-weight: 900; }
.voice-answer h3 { margin: 0; font-size: 1.3rem; }
.voice-answer > strong { color: var(--red); font-size: 1rem; }
.voice-answer p { margin: 0; color: var(--muted); font-size: .5rem; line-height: 1.5; }
.voice-answer button { justify-self: start; margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: var(--green); color: #fff; font-size: .53rem; font-weight: 850; }
.voice-clarification { padding: 12px; border: 1px solid color-mix(in srgb,var(--red) 25%,var(--line)); border-radius: 14px; background: var(--cream); }
.voice-clarification > header { display: grid; gap: 3px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.voice-clarification > header small { color: var(--red); font-size: .45rem; font-weight: 900; }
.voice-clarification > header strong { font-size: .64rem; }
.voice-clarification > div { margin-top: 10px; }
.voice-clarification h3 { margin: 0 0 6px; color: var(--green); font-size: .53rem; }
.voice-choice-list { display: grid; gap: 6px; }
.voice-choice-list button { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); text-align: left; }
.voice-choice-list button strong { min-width: 0; overflow: hidden; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.voice-choice-list button span { flex: 0 0 auto; color: var(--muted); font-size: .43rem; }
.voice-choice-list button.selected { border-color: var(--green); background: color-mix(in srgb,var(--green) 10%,var(--paper)); box-shadow: inset 3px 0 0 var(--green); }
.voice-choice-list button.selected span { color: var(--green); font-weight: 900; }
.voice-choice-empty { margin: 0; color: var(--muted); font-size: .48rem; }
.voice-clarification > p { margin: 10px 0 0; color: var(--muted); font-size: .45rem; line-height: 1.5; text-align: center; }
.voice-selected-points { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; }
.voice-selected-points > span { color: var(--muted); font-weight: 900; }
.voice-selected-points p { display: grid; gap: 2px; min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.voice-selected-points p.confirmed { border-color: var(--green); background: color-mix(in srgb,var(--green) 9%,var(--paper)); }
.voice-selected-points small { color: var(--muted); font-size: .39rem; font-weight: 800; }
.voice-selected-points p.confirmed small { color: var(--green); }
.voice-selected-points strong { overflow: hidden; font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }
.voice-run-plan { width: 100%; margin-top: 12px; padding: 12px; border: 0; border-radius: 11px; background: var(--red); color: #fff; font-size: .58rem; font-weight: 900; box-shadow: 0 7px 18px color-mix(in srgb,var(--red) 24%,transparent); }
.voice-run-plan:disabled { background: var(--line); color: var(--muted); box-shadow: none; }
.voice-map-pick { width: 100%; margin: 0 0 7px; padding: 9px; border: 1px solid color-mix(in srgb,var(--red) 38%,var(--line)); border-radius: 9px; background: color-mix(in srgb,var(--red) 7%,var(--paper)); color: var(--red); font-size: .49rem; font-weight: 900; }
.voice-map-sheet { position: fixed; z-index: 170; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 92vh; margin: auto; overflow-y: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.25); animation: sheet-in .2s ease-out; }
.voice-map-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.voice-map-sheet header small { color: var(--red); font-size: .5rem; font-weight: 900; }
.voice-map-sheet header h2 { margin: 2px 0 0; font-size: 1.05rem; }
.voice-map-sheet header button { width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--muted); font-size: 1.3rem; }
.voice-map-sheet > p { margin: 9px 0; color: var(--muted); font-size: .55rem; line-height: 1.5; }
.voice-picker-map { height: min(52vh,430px); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--mint); }
.voice-map-selection { display: grid; gap: 2px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); }
.voice-map-selection small { color: var(--red); font-size: .43rem; font-weight: 900; }
.voice-map-selection strong { font-size: .65rem; }
.voice-map-selection span { color: var(--muted); font-size: .48rem; }
.voice-map-confirm { width: 100%; margin-top: 10px; padding: 12px; border-radius: 11px; background: var(--red); color: #fff; font-size: .58rem; font-weight: 900; }
.voice-map-confirm:disabled { background: var(--line); color: var(--muted); }
.transfer-options { display: grid; gap: 14px; }
.transfer-options-head { display: grid; gap: 2px; margin-bottom: 9px; padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb,var(--red) 8%,var(--paper)); }
.transfer-options-head strong { color: var(--red); font-size: .58rem; }
.transfer-options-head span { color: var(--muted); font-size: .45rem; }
.ai-plan-group { display: grid; gap: 8px; margin-top: 14px; padding: 10px; border: 1px solid color-mix(in srgb,var(--red) 18%,var(--line)); border-radius: 13px; background: color-mix(in srgb,var(--paper) 92%,var(--mint)); }
.ai-plan-group > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-plan-group > header div { display: grid; gap: 2px; }
.ai-plan-group > header strong { color: var(--red); font-size: .67rem; }
.ai-plan-group > header span { color: var(--muted); font-size: .44rem; }
.ai-plan-group > header > b { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--mint); color: var(--red); font-size: .43rem; }
.ai-plan-group.empty { opacity: .72; }
.ai-plan-group .transfer-result { margin-top: 0; }
.transfer-option-routes { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; }
.transfer-option-routes strong, .transfer-option-routes button { min-width: 48px; padding: 5px 8px; border: 0; border-radius: 8px; background: var(--red); color: #fff; font: inherit; font-weight: 900; text-align: center; }
.transfer-option-routes span { color: var(--muted); font-weight: 900; }
.transfer-walk.direct-access { border-color: color-mix(in srgb,var(--green) 24%,var(--line)); background: color-mix(in srgb,var(--green) 7%,var(--paper)); }
.transfer-place-link { display: block; max-width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 900; text-align: left; text-decoration: underline; text-decoration-color: color-mix(in srgb,var(--red) 40%,transparent); text-underline-offset: 3px; text-overflow: ellipsis; white-space: nowrap; }
.transfer-full-route { width: 100%; margin: 8px 0; padding: 10px; border: 1px solid color-mix(in srgb,var(--red) 34%,var(--line)); border-radius: 9px; background: color-mix(in srgb,var(--red) 7%,var(--paper)); color: var(--red); font-size: .5rem; font-weight: 900; }
.transfer-leg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0; }
.transfer-leg-actions button { padding: 9px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--red); font-size: .45rem; font-weight: 900; }
.voice-privacy { margin: 12px 0 0; color: var(--muted); font-size: .43rem; line-height: 1.5; text-align: center; }
.journey-planner { margin: 0 0 10px; }
.journey-instruction { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid color-mix(in srgb,var(--green) 20%,var(--line)); border-radius: 12px; background: color-mix(in srgb,var(--mint) 60%,var(--paper)); }
.journey-instruction strong { color: var(--green); font-size: .68rem; }
.journey-instruction span { color: var(--muted); font-size: .53rem; line-height: 1.45; }
.journey-instruction button, .journey-result-title button { justify-self: start; margin-top: 5px; padding: 6px 9px; border-radius: 8px; background: var(--green); color: #fff; font-size: .52rem; font-weight: 850; }
.route-stop-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; }
.journey-map-button, .journey-stop-action { display: inline-flex; min-height: 29px; align-items: center; justify-content: center; gap: 3px; padding: 5px 9px; border: 1px solid color-mix(in srgb,var(--green) 28%,var(--line)); border-radius: 8px; background: color-mix(in srgb,var(--mint) 55%,var(--paper)); color: var(--green); font-size: .5rem; font-weight: 850; }
.journey-stop-action.start { margin-left: auto; background: var(--green); color: #fff; }
.journey-stop-action.end { margin-left: auto; border-color: color-mix(in srgb,var(--red) 40%,var(--line)); background: color-mix(in srgb,var(--red) 10%,var(--paper)); color: var(--red); }
.journey-stop-action.selected { background: var(--green); color: #fff; }
.journey-stop-action.end.selected { background: var(--red); color: #fff; }
.journey-stop-action:disabled { margin-left: auto; opacity: .45; }
.route-stop-row.journey-start, .route-stop-row.journey-end { margin: 0 -7px; padding-right: 10px; padding-left: 10px; border-radius: 12px; background: color-mix(in srgb,var(--mint) 56%,var(--paper)); }
.route-stop-row.journey-end { background: color-mix(in srgb,var(--red) 8%,var(--paper)); }
.journey-result { padding: 11px; border: 1px solid color-mix(in srgb,var(--green) 24%,var(--line)); border-radius: 13px; background: color-mix(in srgb,var(--mint) 45%,var(--paper)); }
.journey-result.loading { color: var(--green); font-size: .59rem; text-align: center; }
.journey-result-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.journey-result-title span { color: var(--green); font-size: .55rem; font-weight: 900; }
.journey-result-title button { margin: 0; }
.journey-points { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; }
.journey-points > i { height: 20px; color: var(--red); font-size: 0; font-style: normal; font-weight: 900; text-align: center; }
.journey-points > i::after { content: "↓"; font-size: .85rem; }
.journey-point { display: grid; gap: 4px; margin: 0; padding: 10px; border: 1px solid color-mix(in srgb,var(--red) 16%,var(--line)); border-radius: 11px; background: color-mix(in srgb,var(--paper) 82%,transparent); }
.journey-points small, .journey-totals small, .transfer-fares small { color: var(--muted); font-size: .47rem; }
.journey-points strong { font-size: .62rem; }
.journey-points .journey-map-button { justify-self: start; margin-top: 4px; }
.journey-points .station-etas { display: flex; width: auto; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.journey-points .eta-chip { width: 76px; min-height: 46px; flex: 0 0 76px; }
.journey-arrival-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.journey-arrival-times span { display: grid; width: 76px; min-height: 46px; flex: 0 0 76px; align-content: center; gap: 2px; padding: 6px 4px; border-radius: 8px; background: var(--mint); text-align: center; }
.journey-arrival-times small { color: var(--muted); font-size: .4rem; }
.journey-arrival-times strong { color: var(--green); font-size: .54rem; }
.journey-arrival-empty { margin: 5px 0 0; color: var(--muted); font-size: .44rem; }
.journey-result > .route-service-facts { display: none; }
.journey-totals, .transfer-fares { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 10px; }
.journey-totals p, .transfer-fares p { display: grid; gap: 2px; margin: 0; padding: 8px 5px; border-radius: 9px; background: var(--paper); text-align: center; }
.journey-totals strong, .transfer-fares strong { color: var(--green); font-size: .61rem; }
.transfer-planner { margin-top: 10px; border-top: 1px solid var(--line); }
.transfer-planner summary { padding: 10px 2px 5px; color: var(--red); cursor: pointer; font-size: .57rem; font-weight: 900; }
.transfer-planner form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 5px; }
.transfer-planner label { display: grid; gap: 3px; }
.transfer-planner label span { color: var(--muted); font-size: .46rem; }
.transfer-planner input { min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .58rem; }
.transfer-planner form > button { grid-column: 1/-1; align-self: end; padding: 8px 10px; border-radius: 8px; background: var(--red); color: #fff; font-size: .54rem; font-weight: 850; }
.transfer-loading, .transfer-empty { margin: 9px 0 0; padding: 10px; border-radius: 9px; background: var(--paper); color: var(--muted); font-size: .52rem; line-height: 1.5; text-align: center; }
.transfer-loading { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb,var(--red) 48%,transparent); background: color-mix(in srgb,var(--red) 12%,var(--paper)); color: var(--red); font-size: .59rem; font-weight: 900; letter-spacing: .02em; box-shadow: 0 0 0 0 color-mix(in srgb,var(--red) 0%,transparent); animation: analysis-glow 1.8s ease-in-out infinite; }
.transfer-loading::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); content: ""; vertical-align: 1px; animation: analysis-dot 1.8s ease-in-out infinite; }
.transfer-result { margin-top: 9px; padding: 10px; border-radius: 11px; background: var(--paper); }
.transfer-result > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.transfer-result > header span { color: var(--red); font-size: .54rem; font-weight: 900; }
.transfer-result > header strong { font-size: .67rem; }
.transfer-leg { display: grid; grid-template-columns: 21px minmax(0,1fr) 12px minmax(0,1fr); gap: 5px; align-items: start; padding: 10px 0; }
.transfer-leg > b { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: .5rem; }
.transfer-leg > em { padding-top: 17px; color: var(--green); font-style: normal; text-align: center; }
.transfer-leg p { display: grid; gap: 2px; margin: 0; }
.transfer-leg small { color: var(--green); font-size: .47rem; font-weight: 850; }
.transfer-leg p > strong { font-size: .56rem; }
.transfer-leg p > span { min-height: 25px; color: var(--muted); font-size: .48rem; }
.transfer-leg .journey-map-button { justify-self: start; margin-top: 3px; padding: 4px 6px; }
.transfer-walk { display: grid; gap: 2px; margin-left: 26px; padding: 8px; border-left: 3px dotted var(--red); background: color-mix(in srgb,var(--red) 7%,var(--paper)); }
.transfer-walk strong { color: var(--red); font-size: .53rem; }
.transfer-walk > span { color: var(--muted); font-size: .47rem; }
.transfer-walk .journey-map-button { justify-self: start; margin-top: 3px; }
.transfer-note { margin: 8px 0 0; color: var(--muted); font-size: .44rem; line-height: 1.5; text-align: center; }

.map-sheet { position: fixed; z-index: 130; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: calc(100dvh - max(12px, env(safe-area-inset-top))); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.map-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.map-sheet header small { color: var(--green); font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.map-sheet header h2 { margin: 2px 0 0; font-size: 1.1rem; letter-spacing: -.04em; }
.map-sheet header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.map-sheet-meta { margin: 8px 0 10px; color: var(--muted); font-size: .59rem; font-weight: 700; }
.map-frame { height: min(42dvh, 340px); min-height: 210px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--mint); }
.map-frame #mapFrame { position: relative; display: block; width: 100%; height: 100%; border: 0; overscroll-behavior: contain; touch-action: none !important; -webkit-user-select: none; user-select: none; }
.map-frame #mapFrame .leaflet-container, .map-frame #mapFrame .leaflet-pane { touch-action: none !important; }
.map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.walking-directions, .street-view-link { display: flex; min-height: 47px; align-items: center; justify-content: center; gap: 6px; border-radius: 13px; font-size: .65rem; font-weight: 900; text-decoration: none; }
.walking-directions { background: var(--green); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--green) 25%, transparent); }
.street-view-link { border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line)); background: color-mix(in srgb, var(--mint) 65%, var(--paper)); color: var(--green); }
.street-view-link > span { font-size: .82rem; }
.walking-directions:active, .street-view-link:active { transform: scale(.985); }
.walking-note { margin: 8px 2px 0; color: var(--muted); font-size: .49rem; line-height: 1.5; text-align: center; }

.feedback-sheet { position: fixed; z-index: 110; right: 0; bottom: 0; left: 0; display: flex; width: min(100%,620px); max-height: 94vh; margin: auto; flex-direction: column; overflow: hidden; padding: 10px 18px calc(15px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.feedback-sheet > header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feedback-sheet > header small { color: var(--green); font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.feedback-sheet > header h2 { max-width: 460px; margin: 3px 0 0; font-size: 1rem; line-height: 1.38; letter-spacing: -.035em; }
.feedback-sheet > header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.feedback-form { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0,.42fr) minmax(0,1fr) auto; gap: 8px; margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--mint) 44%, var(--paper)); }
.feedback-form label { position: relative; display: grid; min-width: 0; gap: 4px; }
.feedback-form label > span { color: var(--green); font-size: .5rem; font-weight: 850; }
.feedback-form input, .feedback-form textarea { width: 100%; min-width: 0; border: 1px solid #d2dcd6; outline: 0; border-radius: 9px; background: #fff; color: var(--ink); font: 650 16px/1.35 "Noto Sans HK", sans-serif; }
.feedback-form input { height: 42px; padding: 0 10px; }
.feedback-form textarea { height: 42px; padding: 9px 39px 7px 10px; resize: none; }
.feedback-form input:focus, .feedback-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 15%, transparent); }
.feedback-form label > small { position: absolute; right: 7px; bottom: 6px; color: var(--muted); font-size: .43rem; }
.feedback-form > button { align-self: end; height: 42px; padding: 0 12px; border-radius: 9px; background: var(--green); color: #fff; font-size: .59rem; font-weight: 900; white-space: nowrap; }
.feedback-form > button:disabled { cursor: wait; opacity: .55; }
.feedback-form > p { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: .47rem; }
.feedback-list-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; margin: 12px 2px 6px; }
.feedback-list-head strong { font-size: .66rem; }
.feedback-list-head button { padding: 5px 8px; border-radius: 7px; background: var(--mint); color: var(--green); font-size: .5rem; font-weight: 850; }
.feedback-list-head button:disabled { opacity: .45; }
.feedback-list { min-height: 100px; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.feedback-item { padding: 12px 3px; border-bottom: 1px solid var(--line); user-select: none; -webkit-user-select: none; transition: opacity .18s, transform .18s; }
.feedback-item.deleting { opacity: .35; transform: translateX(10px); pointer-events: none; }
.feedback-item > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-item > header strong { overflow: hidden; color: var(--green); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.feedback-item > header time { flex: 0 0 auto; color: var(--muted); font: 650 .47rem "DM Sans", "Noto Sans HK", sans-serif; }
.feedback-item > p { margin: 6px 0 8px; font-size: .75rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.feedback-item > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; color: var(--muted); text-align: initial; }
.feedback-item > footer small { margin: 0; font-size: .44rem; }
.feedback-like { display: inline-flex; min-height: 29px; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: #edf1ee; color: #75847f; }
.feedback-like span { font-size: .72rem; }
.feedback-like b { font: 900 .62rem "DM Sans", sans-serif; }
.feedback-like em { font-size: .48rem; font-style: normal; font-weight: 800; }
.feedback-like.active { background: color-mix(in srgb, var(--green) 13%, #fff); color: var(--green); }
.feedback-like:disabled { opacity: .45; }
.feedback-loading, .feedback-empty { margin: 0; padding: 30px 15px; color: var(--muted); font-size: .62rem; line-height: 1.6; text-align: center; }
.feedback-loading::after { display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--green); content: ""; animation: pulse .9s ease-in-out infinite; }

.stats-sheet { position: fixed; z-index: 140; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 94dvh; margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.version-sheet { z-index: 150; }
.version-sheet .release-notes { margin-top: 14px; padding-top: 0; border-top: 0; }
.stats-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stats-sheet > header small { color: var(--green); font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.stats-sheet > header h2 { margin: 2px 0 0; font-size: 1.15rem; letter-spacing: -.04em; }
.stats-sheet > header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.admin-menu { display: grid; gap: 11px; margin-top: 18px; }
.admin-menu > div { padding: 16px; border-radius: 17px; background: linear-gradient(135deg,color-mix(in srgb,var(--red) 13%,var(--paper)),var(--paper)); }
.admin-menu > div em { color: var(--red); font-size: .62rem; font-style: normal; font-weight: 950; letter-spacing: .12em; }
.admin-menu > div h3 { margin: 4px 0; font-size: 1.25rem; }
.admin-menu > div p { margin: 0; color: var(--muted); font-size: .78rem; }
.admin-menu > button { display: grid; grid-template-columns: 48px minmax(0,1fr) 18px; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; min-height: 76px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); text-align: left; box-shadow: 0 6px 18px rgba(23,44,41,.06); }
.admin-menu > button span { grid-row: 1/3; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: var(--soft); color: var(--red); font-size: 1.35rem; font-weight: 950; }
.admin-menu > button strong { font-size: .95rem; }
.admin-menu > button small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.admin-menu > button b { grid-column: 3; grid-row: 1/3; color: var(--red); font-size: 1.5rem; }
.admin-tab-panel { margin-top: 14px; }
.admin-menu-back { margin-bottom: 12px; padding: 9px 12px; border-radius: 10px; background: var(--soft); color: var(--red); font-weight: 900; }
.moderation-filter { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 12px 0; padding: 5px; border-radius: 12px; background: var(--soft); }
.moderation-filter button { min-width: 0; padding: 8px 4px; border-radius: 9px; color: var(--muted); font-size: .7rem; font-weight: 900; }
.moderation-filter button.active { background: var(--red); color: #fff; }
.board-admin-item footer button:disabled { opacity: .42; }
.stats-period-tools { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; margin-top: 14px; }
.stats-view-toggle { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: #e8eeea; }
.stats-view-toggle button { min-width: 52px; padding: 7px 9px; border-radius: 8px; background: transparent; color: var(--muted); font-size: .56rem; font-weight: 850; }
.stats-view-toggle button.active { background: var(--paper); color: var(--green); box-shadow: 0 2px 7px rgba(18,48,41,.09); }
.stats-period-nav { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.stats-period-nav button { height: 34px; background: transparent; color: var(--green); font-size: 1.05rem; font-weight: 900; }
.stats-period-nav button:disabled { color: #bbc5c1; cursor: default; }
.stats-period-nav strong { overflow: hidden; font-size: .61rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.stats-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.stats-summary article { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--mint) 45%, var(--paper)); }
.stats-summary small { display: block; color: var(--muted); font-size: .49rem; font-weight: 750; }
.stats-summary p { display: flex; align-items: baseline; gap: 3px; margin: 4px 0 0; }
.stats-summary strong { overflow: hidden; color: var(--green); font: 900 1.05rem "DM Sans",sans-serif; text-overflow: ellipsis; }
.stats-summary span { color: var(--muted); font-size: .48rem; }
.stats-lifetime { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 11px 13px; border: 1px solid color-mix(in srgb,var(--green) 22%,var(--line)); border-radius: 13px; background: color-mix(in srgb,var(--mint) 48%,var(--paper)); }
.stats-lifetime > span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stats-lifetime i { width: 8px; height: 8px; border-radius: 50%; background: #55d495; box-shadow: 0 0 0 4px rgba(85,212,149,.13); }
.stats-lifetime small { font-size: .58rem; font-weight: 800; }
.stats-lifetime p { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.stats-lifetime strong { color: var(--green); font: 900 1.1rem "DM Sans",sans-serif; font-variant-numeric: tabular-nums; }
.stats-lifetime b { color: var(--muted); font-size: .5rem; }
.stats-chart-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 16px 2px 8px; }
.stats-chart-head > div { display: grid; gap: 2px; }
.stats-chart-head strong { font-size: .68rem; }
.stats-chart-head small { color: var(--muted); font-size: .49rem; }
.stats-chart-head button { padding: 6px 10px; border-radius: 8px; background: var(--mint); color: var(--green); font-size: .52rem; font-weight: 850; }
.traffic-chart-scroll { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg,color-mix(in srgb,var(--mint) 30%,var(--paper)),var(--paper)); }
.traffic-chart { display: grid; width: 100%; min-width: 0; min-height: 220px; grid-template-columns: repeat(var(--columns,30),minmax(0,1fr)); gap: 2px; align-items: end; padding: 12px 5px 8px; }
.traffic-chart.year-view { min-width: 0; gap: 5px; padding-right: 10px; padding-left: 10px; }
.traffic-day { display: grid; min-width: 0; grid-template-rows: 20px 160px 20px; align-items: end; justify-items: center; }
.traffic-day > strong { overflow: visible; color: var(--muted); font: 800 .38rem "DM Sans",sans-serif; white-space: nowrap; }
.traffic-bar-track { display: flex; width: 70%; min-width: 4px; max-width: 14px; height: 154px; align-items: flex-end; overflow: hidden; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb,var(--mint) 58%,transparent); }
.traffic-bar { width: 100%; min-height: 3px; height: calc(var(--height) * 1%); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg,var(--yellow),var(--green)); box-shadow: 0 0 10px color-mix(in srgb,var(--green) 18%,transparent); }
.traffic-day > small { align-self: center; color: var(--muted); font: 700 .37rem "DM Sans",sans-serif; white-space: nowrap; }
.traffic-day.today > strong,.traffic-day.today > small { color: var(--green); font-weight: 900; }
.traffic-day.today .traffic-bar { background: linear-gradient(180deg,#ffe473,var(--green-deep)); }
.stats-loading { grid-column: 1/-1; align-self: center; margin: 0; color: var(--muted); font-size: .62rem; text-align: center; }
.stats-note { margin: 9px 2px 0; color: var(--muted); font-size: .49rem; line-height: 1.55; text-align: center; }
.release-notes { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.release-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.release-heading > div small { color: var(--green); font-size: .5rem; font-weight: 850; letter-spacing: .1em; }
.release-heading h3 { margin: 2px 0 0; font-size: .82rem; }
.release-heading > span { display: grid; justify-items: end; gap: 2px; text-align: right; }
.release-heading > span strong { color: var(--green); font: 900 .7rem "DM Sans",sans-serif; }
.release-heading > span small { color: var(--muted); font-size: .42rem; }
.release-notes details { overflow: hidden; margin-top: 7px; border: 1px solid var(--line); border-radius: 11px; background: color-mix(in srgb,var(--mint) 24%,var(--paper)); }
.release-notes summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; align-items: center; padding: 9px 10px; cursor: pointer; list-style: none; }
.release-notes summary::-webkit-details-marker { display: none; }
.release-notes summary span { padding: 4px 6px; border-radius: 6px; background: var(--green); color: #fff; font: 850 .47rem "DM Sans",sans-serif; }
.release-notes summary strong { font-size: .59rem; }
.release-notes details[open] summary { border-bottom: 1px solid var(--line); }
.release-notes ul { display: grid; gap: 5px; margin: 0; padding: 10px 12px 11px 27px; color: var(--muted); font-size: .52rem; line-height: 1.55; }
.feedback-empty.error { color: #a35454; }
.video-intro { margin: 8px 0 0; color: var(--muted); font-size: .55rem; font-weight: 650; line-height: 1.55; }
.video-submit-form { grid-template-columns: minmax(0,.42fr) minmax(0,1fr) auto; }
.video-feed { display: grid; grid-auto-rows: max-content; align-content: start; gap: 12px; height: min(72vh,720px); min-height: 420px; padding: 8px 0 12px; overflow-y: auto; overscroll-behavior-y: contain; scroll-behavior: smooth; scroll-snap-type: y mandatory; scrollbar-width: none; }
.video-feed::-webkit-scrollbar { display: none; }
.video-head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.video-head-actions button { padding: 7px 9px; border-radius: 8px; background: color-mix(in srgb,var(--red) 12%,var(--paper)); color: var(--red); font-size: .47rem; font-weight: 900; }
.video-head-actions #videoSoundAll.sound-on { background: var(--red); color: #fff; }
.video-item { height: auto; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #101010; box-shadow: 0 8px 24px rgba(0,0,0,.12); scroll-snap-align: start; scroll-snap-stop: always; }
.video-player { position: relative; width: 100%; height: auto; min-height: 0; padding: 0; overflow: hidden; background: #000; }
.video-player::before { display: block; width: 100%; padding-top: 177.7778%; content: ""; }
.video-player.landscape::before { padding-top: 56.25%; }
.video-player iframe, .video-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
.video-player::after { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; padding: 25px; background: #090909; color: #fff; content: "影片載入中…"; font-size: .58rem; font-weight: 850; letter-spacing: .04em; text-align: center; transition: opacity .25s ease; }
.video-player.video-ready::after { opacity: 0; pointer-events: none; }
.video-actions { display: flex; justify-content: flex-end; padding: 10px; background: #101010; }
.video-landscape-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 116px; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.28); backdrop-filter: blur(8px); }
.video-landscape-button span { font-size: 1rem; line-height: 1; }
.video-landscape-button strong { font-size: .62rem; white-space: nowrap; }
.android-device .video-landscape-button { min-width: 126px; min-height: 44px; border-width: 2px; background: rgba(255,255,255,.1); }
.android-device .video-landscape-button strong { font-size: .7rem; }
.video-player.video-landscape-mode, .video-player:fullscreen, .video-player:-webkit-full-screen { width: 100vw; height: 100dvh; max-width: none; background: #000; }
.video-player.video-landscape-mode { position: fixed; z-index: 400; inset: 0; }
.video-landscape-open { overflow: hidden !important; }
.video-landscape-button[aria-busy="true"] { opacity: .72; }
.video-item.video-item-landscape .video-actions { position: fixed; z-index: 430; top: max(10px,env(safe-area-inset-top)); right: max(10px,env(safe-area-inset-right)); padding: 0; background: transparent; }
.video-player.video-landscape-mode::before, .video-player:fullscreen::before, .video-player:-webkit-full-screen::before { display: none; }
.video-player.video-landscape-mode iframe, .video-player.video-landscape-mode video, .video-player:fullscreen iframe, .video-player:fullscreen video, .video-player:-webkit-full-screen iframe, .video-player:-webkit-full-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-item:fullscreen, .video-item:-webkit-full-screen { background: #000; }
.video-item > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--paper); color: var(--ink); text-align: initial; }
.video-item > footer div { display: grid; min-width: 0; gap: 3px; }
.video-item > footer strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.video-item > footer small { margin: 0; font-size: .45rem; }

.install-sheet { position: fixed; z-index: 120; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 90vh; margin: auto; overflow-y: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.install-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.install-sheet > header small { color: var(--green); font-size: .54rem; font-weight: 850; letter-spacing: .1em; }
.install-sheet > header h2 { margin: 2px 0 0; font-size: 1.1rem; letter-spacing: -.04em; }
.install-sheet > header button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.35rem; }
.install-app-card { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: center; margin-top: 13px; padding: 13px; border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--mint) 48%, var(--paper)); }
.install-app-card img { width: 58px; height: 58px; border-radius: 15px; box-shadow: 0 6px 16px rgba(15,52,44,.16); }
.install-app-card p { display: grid; min-width: 0; gap: 4px; margin: 0; }
.install-app-card strong { color: var(--green); font-size: .77rem; }
.install-app-card span { color: var(--muted); font-size: .57rem; line-height: 1.55; }
.install-sheet > h3 { margin: 16px 2px 8px; font-size: .73rem; }
.install-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf8; }
.install-steps li > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font: 900 .6rem "DM Sans", sans-serif; }
.install-steps p { margin: 0; font-size: .62rem; line-height: 1.55; }
.install-steps b { color: var(--green); }
.install-steps .install-copy-step { display: block; overflow: hidden; padding: 0; border-color: color-mix(in srgb, var(--green) 34%, var(--line)); background: color-mix(in srgb, var(--mint) 62%, var(--paper)); }
.install-copy-step button { display: grid; width: 100%; grid-template-columns: 29px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 10px; background: transparent; color: var(--ink); text-align: left; }
.install-copy-step button > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font: 900 .6rem "DM Sans", sans-serif; }
.install-copy-step button p { display: grid; gap: 2px; }
.install-copy-step button small { color: var(--muted); font-size: .51rem; line-height: 1.4; }
.install-copy-step button em { color: var(--green); font-size: .52rem; font-style: normal; font-weight: 900; white-space: nowrap; }
.install-copy-step button.copied { background: var(--green); color: #fff; }
.install-copy-step button.copied > span { background: #fff; color: var(--green); }
.install-copy-step button.copied b, .install-copy-step button.copied small, .install-copy-step button.copied em { color: #fff; }
.install-steps .install-safari-step { grid-template-columns: 29px 54px minmax(0,1fr); border-color: color-mix(in srgb, #1682dc 28%, var(--line)); background: linear-gradient(135deg, #f4fbff, #eef7ff); }
.install-safari-step .safari-app-icon { display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid #c8e5f8; border-radius: 13px; background: #fff; box-shadow: 0 5px 13px rgba(20,111,173,.16); font-size: 1.55rem; line-height: 1; }
.install-safari-step p { display: grid; gap: 2px; }
.install-safari-step b { color: #126da9; font-size: .66rem; }
.install-safari-step small { color: #3f657b; font-size: .54rem; }
.install-safari-step em { margin-top: 3px; color: #126da9; font-size: .5rem; font-style: normal; font-weight: 800; }
.install-sheet-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; margin-top: 12px; }
.install-copy-button, .install-done-button { width: 100%; min-height: 46px; border-radius: 12px; font-size: .64rem; font-weight: 900; }
.install-copy-button { border: 1px solid color-mix(in srgb, var(--green) 22%, var(--line)); background: color-mix(in srgb, var(--green) 8%, #fff); color: var(--green); }
.install-copy-button span { margin-right: 4px; font-size: .78rem; }
.install-copy-button.copied { background: var(--green); color: #fff; }
.install-done-button { background: var(--green); color: #fff; }
.install-note { margin: 8px 2px 0; color: var(--muted); font-size: .49rem; line-height: 1.5; text-align: center; }

@keyframes sheet-in { from { transform: translateY(35px); opacity: 0; } }
@keyframes splash-ring { from { opacity: .45; transform: scale(.42); } to { opacity: 0; transform: scale(1.18); } }
@keyframes splash-glow { to { opacity: .55; transform: scale(1.08); } }
@keyframes splash-logo { to { transform: translateY(-4px) scale(1.025); } }

@keyframes radar { 50% { box-shadow: 0 0 0 14px rgba(12,119,104,.09), 0 0 0 27px rgba(12,119,104,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
@keyframes analysis-glow {
  0%, 100% { background: color-mix(in srgb,var(--red) 10%,var(--paper)); box-shadow: 0 0 5px color-mix(in srgb,var(--red) 18%,transparent), inset 0 0 0 color-mix(in srgb,var(--red) 0%,transparent); filter: brightness(.96); }
  50% { background: color-mix(in srgb,var(--red) 22%,var(--paper)); box-shadow: 0 0 18px color-mix(in srgb,var(--red) 55%,transparent), inset 0 0 12px color-mix(in srgb,var(--red) 15%,transparent); filter: brightness(1.12); }
}
@keyframes analysis-dot { 0%, 100% { opacity: .45; transform: scale(.72); } 50% { opacity: 1; transform: scale(1.18); } }
@keyframes current-stop-glow { 0%, 100% { box-shadow: 0 0 6px color-mix(in srgb,var(--red) 18%,transparent); filter: brightness(.98); } 50% { box-shadow: 0 0 18px color-mix(in srgb,var(--red) 52%,transparent); filter: brightness(1.08); } }
@keyframes route-live-pulse { 0%, 100% { opacity: .45; transform: scale(.78); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes announcer-current { 0%, 100% { opacity: .82; filter: brightness(.96); } 50% { opacity: 1; filter: brightness(1.2); } }
@keyframes quiz-main-glow { 0%, 100% { opacity: .84; filter: brightness(.95); transform: scale(.98); } 50% { opacity: 1; filter: brightness(1.2); transform: scale(1.025); } }
@keyframes stadium-vertical-swap {
  0% { opacity: 0; transform: translate(-50%, 80%); }
  2%, 18% { opacity: 1; transform: translate(-50%, -50%); }
  20% { opacity: 0; transform: translate(-50%, -180%); }
  20.001%, 100% { opacity: 0; transform: translate(-50%, 80%); }
}
@keyframes stadium-light { to { opacity: .55; transform: scale(.78); } }
@media (prefers-reduced-motion: reduce) {
  .launch-splash::before, .launch-splash::after, .launch-logo > span, .launch-logo img { animation: none; }
  .stadium-light { animation: none; }
  .stadium-message { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .stadium-message-en, .stadium-message-ai, .stadium-message-announcer, .stadium-message-quiz { display: none; }
}
@media (min-width: 560px) {
  .stadium-banner { margin-right: 30px; margin-left: 30px; }
  .live-info-stack { margin-right: 30px; margin-left: 30px; }
  .location-card { margin-right: 30px; margin-left: 30px; }
  .app-actions { padding-right: 30px; padding-left: 30px; }
  .bus-search { margin-right: 30px; margin-left: 30px; }
  .result-section { padding-right: 30px; padding-left: 30px; }
}
@media (max-width: 480px) {
  .topbar { gap: 8px; padding-right: 12px; padding-left: 12px; }
  .brand { flex: 0 0 auto; gap: 7px; }
  .brand strong { font-size: .86rem; }
  .brand small { display: none; }
  .header-actions { gap: 5px; }
  .language-button, .share-button, .app-refresh-button { width: 32px; height: 32px; flex-basis: 32px; }
  .threads-button, .instagram-button { width: 34px; height: 34px; }
  .threads-button { left: calc(50% - 38px); }
  .instagram-button { left: calc(50% + 3px); }
  .theme-button { width: 34px; flex: 0 0 34px; justify-content: center; padding-right: 7px; padding-left: 7px; font-size: 0; }
  .theme-button span { margin: 0; }
  .live-badge { min-width: 116px; padding-right: 6px; padding-left: 6px; }
  .live-badge strong { min-width: 5ch; }
}
@media (max-width: 440px) {
  .feedback-form { grid-template-columns: minmax(0,.45fr) minmax(0,1fr); }
  .feedback-form > button { grid-column: 1/-1; width: 100%; }
}
@media (max-width: 370px) {
  .header-actions { gap: 3px; }
  .theme-button, .share-button, .app-refresh-button { width: 31px; height: 31px; flex-basis: 31px; }
  .topbar { padding-right: 12px; padding-left: 12px; }
  .brand { gap: 7px; }
  .brand strong { font-size: .86rem; }
  .bus-mark { width: 31px; height: 31px; }
  .brand small { display: none; }
  .theme-button { width: 34px; justify-content: center; padding-right: 7px; padding-left: 7px; font-size: 0; }
  .theme-button span { margin: 0; }
  .live-badge { min-width: 118px; padding-right: 6px; padding-left: 6px; }
  .live-badge strong { min-width: 5ch; }
  .stadium-banner { margin-right: 12px; margin-left: 12px; }
  .app-actions { padding-right: 12px; padding-left: 12px; }
  .search-action { min-width: 82px; }
  .location-card { grid-template-columns: auto minmax(0,1fr); }
  .location-card button { grid-column: 1/3; }
  .route-card { padding: 13px; }
  .global-route-open { padding: 12px 50px 12px 12px; }
  .global-favourite-button { top: 10px; right: 10px; width: 31px; height: 31px; }
  .global-route-no { min-width: 51px; }
  .global-boarding { margin-right: 12px; margin-left: 73px; }
  .route-no { min-width: 49px; }
  .stop-journey { margin-left: 60px; }
  .route-main { grid-template-columns: auto minmax(0,1fr) auto; }
  .favourite-button { position: absolute; top: 9px; right: 9px; width: 29px; height: 29px; }
  .eta { padding-right: 29px; }
  .service-row p { grid-template-columns: 1fr; gap: 2px; text-align: center; }
  .service-row p > span { display: none; }
  .feedback-sheet { padding-right: 13px; padding-left: 13px; }
  .feedback-sheet > header h2 { font-size: .88rem; }
}
@media (max-width: 330px) {
  .brand > span:last-child { display: none; }
  .live-badge { min-width: 112px; }
}
/* Community message board */
.board-sheet { position: fixed; z-index: 116; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 92dvh; margin: auto; overflow: auto; overscroll-behavior: contain; padding: 18px 22px calc(92px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--paper); box-shadow: 0 -12px 40px rgba(15,32,29,.22); }
.board-sheet[hidden] { display: none; }
.board-sheet > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.board-sheet > header small { color: var(--red); font-weight: 850; }
.board-sheet > header h2 { margin: 4px 0 0; font-size: 1.65rem; }
.board-sheet > header > button { width: 48px; height: 48px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 1.8rem; }
.board-rules { margin-bottom: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb,var(--red) 28%,var(--line)); border-radius: 16px; background: color-mix(in srgb,var(--red) 6%,var(--paper)); }
.board-rules summary { color: var(--red); font-weight: 900; cursor: pointer; }
.board-rules p { margin: 10px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.board-form { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: color-mix(in srgb,var(--red) 7%,var(--paper)); }
.board-form > label { display: grid; gap: 7px; }
.board-form > label > span { display: flex; justify-content: space-between; color: var(--red); font-weight: 900; }
.board-form > label small { color: var(--muted); font-weight: 700; }
.board-form input[type="text"], .board-form input:not([type]), .board-form textarea { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; resize: vertical; }
.board-format-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-bold { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 900; }
.board-bold.active { border-color: var(--red); background: var(--red); color: #fff; }
.board-colors { display: flex; gap: 8px; }
.board-colors button { width: 30px; height: 30px; border: 3px solid var(--paper); border-radius: 50%; background: var(--board-choice); box-shadow: 0 0 0 1px var(--line); }
.board-colors button.active { box-shadow: 0 0 0 3px color-mix(in srgb,var(--board-choice) 55%,transparent); transform: scale(1.08); }
.board-drawing { position: relative; overflow: hidden; padding: 12px; border: 2px solid color-mix(in srgb,var(--red) 62%,var(--line)); border-radius: 18px; background: linear-gradient(145deg,color-mix(in srgb,var(--red) 11%,var(--paper)),var(--paper) 52%); box-shadow: 0 0 0 4px color-mix(in srgb,var(--red) 7%,transparent),0 10px 25px color-mix(in srgb,var(--red) 14%,transparent); }
.board-drawing::before { position: absolute; top: -45px; right: -30px; width: 130px; height: 130px; border-radius: 50%; background: color-mix(in srgb,var(--red) 12%,transparent); content: ""; filter: blur(4px); pointer-events: none; }
.board-drawing summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--red); font-weight: 900; cursor: pointer; list-style: none; }
.board-drawing summary::-webkit-details-marker { display: none; }
.board-drawing summary > span { display: grid; grid-template-columns: auto 1fr; gap: 1px 7px; align-items: center; }
.board-drawing summary em { grid-row: 1/3; padding: 5px 7px; border-radius: 999px; background: #ffb000; color: #3d2500; box-shadow: 0 0 12px rgba(255,176,0,.7); font: 900 .55rem/1 "DM Sans",sans-serif; animation: pulse 1.15s ease-in-out infinite; }
.board-drawing summary strong { font-size: 1.05rem; }
.board-drawing summary small { color: var(--muted); font-size: .7rem; font-weight: 750; }
.board-drawing summary > b { flex: 0 0 auto; padding: 6px 8px; border-radius: 9px; background: var(--red); color: #fff; font-size: .62rem; }
.board-drawing[open] summary { margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid color-mix(in srgb,var(--red) 25%,var(--line)); }
.board-canvas-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.board-canvas-tools label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.board-canvas-tools button { padding: 8px 11px; border-radius: 10px; background: var(--soft); color: var(--ink); font-weight: 850; }
.board-canvas-tools button:disabled { cursor: default; opacity: .38; }
.board-canvas-tools button.active { background: var(--red); color: #fff; box-shadow: 0 0 12px color-mix(in srgb,var(--red) 35%,transparent); }
.board-background-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.board-background-tools > span { margin-right: 2px; color: var(--muted); font-size: .72rem; font-weight: 850; }
.board-background-tools button { width: 28px; height: 28px; border: 2px solid var(--paper); border-radius: 8px; background: var(--paper-choice); box-shadow: 0 0 0 1px var(--line); }
.board-background-tools button.active { box-shadow: 0 0 0 3px color-mix(in srgb,var(--red) 45%,transparent); transform: scale(1.08); }
#boardCanvas { display: block; width: 100%; height: auto; aspect-ratio: 10 / 7; border: 1px solid var(--line); border-radius: 13px; background: #fff; touch-action: none; }
.board-canvas-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.board-canvas-actions.single { grid-template-columns: 1fr; }
.board-canvas-actions button { min-height: 42px; border-radius: 11px; background: color-mix(in srgb,var(--red) 10%,var(--paper)); color: var(--red); font-weight: 900; }
.board-canvas-actions button:last-child { background: var(--red); color: #fff; }
.board-drawing > small { display: block; margin-top: 7px; color: var(--muted); }
.board-submit { min-height: 50px; border-radius: 14px; background: var(--red); color: #fff; font-size: 1rem; font-weight: 900; }
.board-list-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.board-list-head strong { font-size: 1.12rem; }
.board-list-head button { padding: 9px 12px; border-radius: 11px; background: var(--soft); color: var(--red); font-weight: 900; }
.board-list { display: grid; gap: 12px; }
.board-loading, .board-empty { padding: 30px 12px; color: var(--muted); text-align: center; }
.board-comment { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 7px 20px rgba(22,46,40,.06); }
.board-comment-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.board-comment-head strong { color: var(--ink); font-size: 1.06rem; }
.board-comment-head time { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.board-comment-text { margin: 10px 0; color: var(--comment-color,#172c29); font-size: 1rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-comment-text.bold { font-weight: 900; }
.board-comment img { display: block; width: 100%; margin: 10px 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.board-comment-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.board-comment-actions button { padding: 8px 12px; border-radius: 11px; background: var(--soft); color: var(--muted); font-weight: 850; }
.board-comment-actions button.active { background: color-mix(in srgb,var(--red) 12%,var(--paper)); color: var(--red); }
.board-admin-panel { margin-top: 24px; padding: 15px; border: 2px solid color-mix(in srgb,var(--red) 35%,var(--line)); border-radius: 18px; background: color-mix(in srgb,var(--red) 5%,var(--paper)); }
.board-admin-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-admin-panel h3 { margin: 2px 0; font-size: 1.2rem; }
.board-admin-panel > header small { color: var(--red); font-weight: 850; }
.board-admin-panel > header button { padding: 10px 12px; border-radius: 11px; background: var(--red); color: #fff; font-weight: 900; }
.board-admin-panel > p { color: var(--muted); font-size: .78rem; line-height: 1.5; }

.favorite-direction-sheet { position: fixed; z-index: 125; right: 0; bottom: 0; left: 0; width: min(100%,620px); max-height: 88dvh; margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(7,34,29,.22); animation: sheet-in .2s ease-out; }
.favorite-direction-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.favorite-direction-head-actions { display: inline-flex; align-items: center; gap: 8px; }
.favorite-direction-sheet > header small { color: var(--red); font-size: .52rem; font-weight: 900; }
.favorite-direction-sheet > header h2 { margin: 2px 0 0; font-size: .98rem; line-height: 1.12; }
.favorite-direction-sheet > header button { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #edf1ee; color: #657570; font-size: 1.2rem; }
.favorite-direction-hint { margin: 8px 0 10px; color: var(--muted); font-size: .58rem; line-height: 1.5; }
.favorite-direction-list { display: grid; gap: 8px; }
.favorite-direction-item { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: center; width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 13px; background: #f6f8fb; color: var(--ink); text-align: left; }
.favorite-direction-item:active { transform: scale(.995); }
.favorite-direction-route { display: inline-flex; min-width: 54px; min-height: 42px; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.72); color: #0f1114; font: 900 1rem "DM Sans", "Noto Sans HK", sans-serif; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.favorite-direction-copy { display: grid; min-width: 0; }
.favorite-direction-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 900; line-height: 1.15; }
.favorite-direction-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #59707f; font-size: .48rem; font-weight: 800; line-height: 1.15; }
.board-admin-list { display: grid; gap: 9px; }
.board-admin-item { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.board-admin-item header { display: flex; justify-content: space-between; gap: 8px; }
.board-admin-item header strong { font-size: 1rem; }
.board-admin-item header small { color: var(--muted); font-size: .68rem; }
.board-admin-item p { margin: 7px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-admin-item footer { display: flex; gap: 8px; }
.board-admin-item footer button { padding: 8px 10px; border-radius: 9px; font-weight: 900; }
.board-admin-item [data-admin-action="delete"] { background: var(--soft); color: var(--red); }
.board-admin-item [data-admin-action="block"] { background: #2c2626; color: #fff; }
@keyframes boardGlowSlow {
  0%, 100% { color: #b57f18; text-shadow: 0 0 0 rgba(255, 223, 146, 0); opacity: .92; }
  50% { color: #efbf4b; text-shadow: 0 0 10px rgba(255, 231, 175, .58), 0 0 18px rgba(255, 206, 104, .24); opacity: 1; }
}
@media (max-width:420px) { .board-sheet { padding-right: 16px; padding-left: 16px; } .bottom-nav { padding-right: 4px; padding-left: 4px; } .bottom-nav strong { font-size: .49rem; } .bottom-nav .nav-voice small, .bottom-nav .nav-announcer small, .bottom-nav .nav-quiz small, .bottom-nav .nav-feedback small, .bottom-nav .nav-board small, .bottom-nav .nav-version small, .bottom-nav .nav-install small { font-size: .27rem; } }

/* The full home page keeps every feature while nearby routes use the compact display. */
html[data-compact-home="true"] .route-card .stop-journey,
html[data-compact-home="true"] .route-card .service-row { display: none !important; }
html[data-compact-home="true"] .route-list { gap: 8px; margin-top: 12px; }
html[data-compact-home="true"] .route-card { padding: 13px 12px 13px 15px; border-color: var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 3px 9px rgba(31,31,31,.06); cursor: pointer; }
html[data-compact-home="true"] .route-card::before { width: 5px; background: var(--green-deep); }
html[data-compact-home="true"] .route-main { grid-template-columns: minmax(58px,auto) minmax(0,1fr) minmax(66px,auto) auto; gap: 10px; }
html[data-compact-home="true"] .route-no { min-width: 58px; min-height: 45px; border-radius: 8px; background: var(--green-deep); color: #fff; box-shadow: none; }
html[data-compact-home="true"] .route-destination small { color: #777; }
html[data-compact-home="true"] .route-destination strong { font-size: .86rem; }
html[data-compact-home="true"] .route-destination span { margin-top: 5px; color: #303837; font-size: .7rem; font-weight: 850; }
html[data-compact-home="true"] .route-boarding-line i { display: none; }
html[data-compact-home="true"] .route-boarding-line b { font-weight: 850; }
html[data-compact-home="true"] .eta { min-width: 72px; padding-right: 0; }
html[data-compact-home="true"] .eta strong { color: var(--green-deep); font-size: 1.55rem; }
html[data-compact-home="true"] .eta > span { color: var(--ink); font-size: .9rem; font-weight: 900; line-height: 1.05; white-space: nowrap; }
html[data-compact-home="true"] .route-card .favourite-button { position: static; width: 32px; height: 32px; margin-left: 3px; flex: 0 0 32px; }
@media (max-width:600px) {
  html[data-compact-home="true"] .route-main { grid-template-columns: minmax(52px,auto) minmax(0,1fr) minmax(72px,auto) 32px; gap: 8px; }
}

/* Simple Version keeps the live location and ETA engine, but strips the home screen to essentials. */
html[data-simple-mode="true"] .app-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--cream); }
html[data-simple-mode="true"] .topbar { position: sticky; justify-content: space-between; padding-bottom: 11px; background: var(--green-deep); }
html[data-simple-mode="true"] .topbar .brand { color: #fff; }
html[data-simple-mode="true"] .topbar .brand small { color: rgba(255,255,255,.7); }
html[data-simple-mode="true"] .topbar .header-actions button { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.13); color: #fff; }
html[data-simple-mode="true"] .topbar .threads-button,
html[data-simple-mode="true"] .topbar .instagram-button { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.14); color: #fff; }
html[data-simple-mode="true"] .topbar .threads-button img,
html[data-simple-mode="true"] .topbar .instagram-button img { display: block; width: 21px; height: 21px; opacity: 1; filter: brightness(0) invert(1); }
html[data-simple-mode="true"] .topbar .threads-button span,
html[data-simple-mode="true"] .topbar .instagram-button span { border-color: var(--green-deep); background: #fff; color: var(--green-deep); }
html[data-simple-mode="true"] .stadium-banner,
html[data-simple-mode="true"] .live-info-stack,
html[data-simple-mode="true"] .app-actions,
html[data-simple-mode="true"] .bus-search,
html[data-simple-mode="true"] .favorite-board,
html[data-simple-mode="true"] .load-more-nearby,
html[data-simple-mode="true"] .section-head button,
html[data-simple-mode="true"] .route-card .favourite-button,
html[data-simple-mode="true"] .route-card .stop-journey,
html[data-simple-mode="true"] .route-card .service-row,
html[data-simple-mode="true"] .app-shell > footer,
html[data-simple-mode="true"] .back-to-top { display: none !important; }
html[data-simple-mode="true"] .result-section { padding: 18px 14px 0; }
html[data-simple-mode="true"] .section-head { align-items: center; padding: 0 3px; }
html[data-simple-mode="true"] .section-head p { color: var(--green-deep); }
html[data-simple-mode="true"] .section-head h2 { font-size: 1.32rem; }
html[data-simple-mode="true"] .route-list { gap: 8px; margin-top: 12px; }
html[data-simple-mode="true"] .route-card { padding: 13px 12px 13px 15px; border-color: var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 3px 9px rgba(31,31,31,.06); cursor: pointer; }
html[data-simple-mode="true"] .route-card::before { width: 5px; background: var(--green-deep); }
html[data-simple-mode="true"] .route-card.is-favourite { border-color: var(--line); background: var(--paper); }
html[data-simple-mode="true"] .route-main { grid-template-columns: minmax(58px,auto) minmax(0,1fr) minmax(66px,auto); gap: 10px; }
html[data-simple-mode="true"] .route-no { min-width: 58px; min-height: 45px; border-radius: 8px; background: var(--green-deep); color: #fff; box-shadow: none; }
html[data-simple-mode="true"] .route-destination small { color: #777; }
html[data-simple-mode="true"] .route-destination strong { font-size: .86rem; }
html[data-simple-mode="true"] .route-destination span { margin-top: 5px; color: #303837; font-size: .7rem; font-weight: 850; }
html[data-simple-mode="true"] .route-boarding-line i { display: none; }
html[data-simple-mode="true"] .route-boarding-line b { font-weight: 850; }
html[data-simple-mode="true"] .eta { min-width: 66px; padding-right: 0; }
html[data-simple-mode="true"] .eta strong { color: var(--green-deep); font-size: 1.55rem; }
html[data-simple-mode="true"] .eta > span { color: #666; font-size: .52rem; }
html[data-simple-mode="true"] .state-card { border-radius: 12px; background: var(--paper); }
.stats-online { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; align-items: center; margin-top: 8px; padding: 11px 13px; border: 1px solid color-mix(in srgb,#35b879 32%,var(--line)); border-radius: 13px; background: color-mix(in srgb,#dff8eb 58%,var(--paper)); }
.stats-online > span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stats-online i { width: 8px; height: 8px; border-radius: 50%; background: #22b66e; box-shadow: 0 0 0 4px rgba(34,182,110,.13); animation: pulse 1.8s ease-in-out infinite; }
.stats-online span small { font-size: .58rem; font-weight: 800; }
.stats-online p { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.stats-online strong { color: #148653; font: 900 1.1rem "DM Sans",sans-serif; font-variant-numeric: tabular-nums; }
.stats-online b { color: var(--muted); font-size: .5rem; }
.stats-online > small { grid-column: 1/-1; color: var(--muted); font-size: .45rem; }

.drive-game-promo { display: grid; width: 100%; grid-template-columns: 72px minmax(0,1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; padding: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: linear-gradient(135deg,#172c29,#0d5b50 62%,#0b7867); color: #fff; box-shadow: 0 14px 28px rgba(14,61,53,.2); text-align: left; }
.drive-game-promo > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.drive-game-promo em { color: #ffd75c; font: 900 .46rem "DM Sans",sans-serif; letter-spacing: .07em; }
.drive-game-promo strong { font-size: .75rem; }
.drive-game-promo small { color: #cbe5df; font-size: .48rem; line-height: 1.45; }
.drive-game-promo > b { color: #fff; font-size: .52rem; white-space: nowrap; }
.drive-game-promo-road { position: relative; display: block; width: 72px; height: 62px; overflow: hidden; border-radius: 13px; background: linear-gradient(#b9e4e0 0 42%,#5c6765 42% 100%); }
.drive-game-promo-road::after { position: absolute; right: 7px; bottom: 8px; width: 43px; height: 23px; border-radius: 5px 5px 3px 3px; background: #e1262f; box-shadow: inset 0 7px #fff; content: ""; }
.drive-game-promo-road i,.drive-game-promo-road b { position: absolute; z-index: 2; bottom: 5px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #172c29; }
.drive-game-promo-road i { right: 12px; }.drive-game-promo-road b { right: 35px; }
.drive-sheet { position: fixed; z-index: 190; right: 0; bottom: 0; left: 0; width: min(100%,620px); height: min(96dvh,900px); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: #f4f7f5; color: #172c29; box-shadow: 0 -22px 55px rgba(5,25,22,.32); animation: sheet-in .22s ease-out; }
.drive-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; }
.drive-sheet > header small { color: #0b7867; font: 900 .48rem "DM Sans",sans-serif; letter-spacing: .1em; }
.drive-sheet > header h2 { margin: 2px 0 0; font-size: 1.1rem; letter-spacing: -.035em; }
.drive-sheet > header button { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #e2ebe7; color: #536761; font-size: 1.3rem; }
.drive-setup { display: grid; gap: 12px; }
.drive-hero { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 14px; align-items: center; padding: 18px; border-radius: 20px; background: radial-gradient(circle at 88% 5%,rgba(80,220,190,.22),transparent 38%),linear-gradient(145deg,#0e2925,#0b5d52); color:#fff; box-shadow: 0 16px 32px rgba(10,62,53,.2); }
.drive-hero > div { display:grid; gap:5px; }.drive-hero em { color:#ffd75c;font:900 .48rem "DM Sans",sans-serif;letter-spacing:.08em }.drive-hero h3 { margin:0;font-size:.9rem }.drive-hero p { margin:0;color:#cbe2dd;font-size:.5rem;line-height:1.55 }
.drive-hero-bus { position:relative; display:block; width:100px;height:68px;border-radius:10px 12px 7px 7px;background:#e1262f;box-shadow:inset 0 22px #f8fbfa,0 10px 16px rgba(0,0,0,.24) }
.drive-hero-bus::before { position:absolute;top:7px;right:8px;left:8px;height:12px;border-radius:3px;background:linear-gradient(90deg,#9ed3dd 0 31%,#172c29 31% 35%,#9ed3dd 35% 66%,#172c29 66% 70%,#9ed3dd 70%);content:"" }
.drive-hero-bus i,.drive-hero-bus b { position:absolute;bottom:-6px;width:19px;height:19px;border:4px solid #e8eee9;border-radius:50%;background:#172c29 }.drive-hero-bus i{left:13px}.drive-hero-bus b{right:13px}
.drive-nickname { display:grid;gap:6px;color:#536761;font-size:.55rem;font-weight:850 }.drive-nickname input { height:48px;padding:0 13px;border:1px solid #cdd9d4;outline:0;border-radius:13px;background:#fff;color:#172c29;font:750 16px "Noto Sans HK",sans-serif }.drive-nickname input:focus{border-color:#0b7867;box-shadow:0 0 0 3px rgba(11,120,103,.12)}
.drive-rules { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px }.drive-rules span{display:grid;gap:3px;padding:12px 8px;border:1px solid #d7e1dd;border-radius:14px;background:#fff;text-align:center}.drive-rules b{color:#0b7867;font:900 .88rem "DM Sans",sans-serif}.drive-rules small{color:#667871;font-size:.43rem}
.drive-start { min-height:52px;border-radius:15px;background:linear-gradient(135deg,#e1262f,#b41420);color:#fff;box-shadow:0 12px 24px rgba(225,38,47,.24);font-size:.72rem;font-weight:900 }
.drive-timing-target,.drive-timing-clock{display:grid;grid-template-columns:1fr auto;gap:4px 8px;align-items:end;padding:18px;border-radius:18px;background:#102724;color:#fff;text-align:center}.drive-timing-target small,.drive-timing-clock small{grid-column:1/-1;color:#9fc3bb;font:900 .48rem "DM Sans",sans-serif;letter-spacing:.12em}.drive-timing-target strong,.drive-timing-clock strong{justify-self:end;font:900 clamp(2rem,12vw,4rem)/1 "DM Sans",sans-serif;font-variant-numeric:tabular-nums}.drive-timing-target span,.drive-timing-clock span{align-self:end;color:#9fc3bb;font-size:.58rem}.drive-timing-target{background:linear-gradient(145deg,#0b7867,#074c42)}.drive-timing-clock{box-shadow:inset 0 0 0 2px rgba(255,215,92,.45),0 12px 28px rgba(16,39,36,.2)}.drive-stop{min-height:78px;border-radius:18px;background:linear-gradient(145deg,#ef313c,#b41420);color:#fff;box-shadow:0 14px 28px rgba(225,38,47,.28);font-size:1rem;font-weight:950;letter-spacing:.05em}.drive-stop:active{transform:scale(.975)}
.drive-game { display:grid;gap:10px }.drive-hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.drive-hud article{display:grid;grid-template-columns:1fr auto;gap:1px 4px;padding:10px;border-radius:13px;background:#102724;color:#fff}.drive-hud small{grid-column:1/-1;color:#8fb8af;font-size:.43rem}.drive-hud strong{font:900 1rem "DM Sans",sans-serif}.drive-hud span{align-self:end;color:#9fc3bb;font-size:.4rem}.drive-scoreline{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-radius:10px;background:#e6eeeb;color:#526862;font-size:.48rem}.drive-scoreline strong{color:#0b7867;font:900 .75rem "DM Sans",sans-serif}.drive-scoreline em{overflow:hidden;color:#b41420;font-style:normal;font-weight:850;text-overflow:ellipsis;white-space:nowrap}
.drive-world{--road-shift:0px;--bus-lean:0deg;--speed-opacity:0;position:relative;height:270px;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 25%,#e8fbff 0 5%,transparent 6%),linear-gradient(#66b7d1 0 43%,#a5d6cf 43% 46%,#4d6d65 46% 100%);box-shadow:inset 0 0 0 1px rgba(23,44,41,.16),inset 0 -45px 65px rgba(0,0,0,.22);perspective:480px;isolation:isolate}
.drive-skyline{position:absolute;z-index:0;right:-3%;top:21%;left:-3%;height:27%;opacity:.62;background:linear-gradient(90deg,#294c49 0 7%,transparent 7% 9%,#365e59 9% 18%,transparent 18% 21%,#294c49 21% 34%,transparent 34% 37%,#3d6660 37% 51%,transparent 51% 54%,#294c49 54% 67%,transparent 67% 71%,#365e59 71% 82%,transparent 82% 85%,#294c49 85%);filter:drop-shadow(0 5px 0 #78958a)}
.drive-road{position:absolute;z-index:1;top:42%;bottom:-24%;left:50%;width:112%;background:linear-gradient(90deg,#d7d4c3 0 2%,#484f50 2% 48%,#f3d740 48% 49%,#484f50 49% 98%,#d7d4c3 98%);clip-path:polygon(43% 0,57% 0,100% 100%,0 100%);transform:translateX(-50%);transform-origin:50% 0}
.drive-road i,.drive-road b,.drive-road span{position:absolute;top:-10%;bottom:-10%;width:4px;background:repeating-linear-gradient(180deg,rgba(255,255,255,0) 0 18px,#fff 18px 42px,rgba(255,255,255,0) 42px 68px);background-position-y:var(--road-shift);transform-origin:50% 0}.drive-road i{left:38%;transform:rotate(-12deg)}.drive-road b{right:38%;transform:rotate(12deg)}.drive-road span{left:calc(50% - 2px);background:repeating-linear-gradient(180deg,transparent 0 20px,#f3d740 20px 44px,transparent 44px 72px)}
.drive-roadside{position:absolute;z-index:2;top:42%;bottom:0;width:45%;pointer-events:none}.drive-roadside.left{left:0}.drive-roadside.right{right:0}.drive-roadside i,.drive-roadside b,.drive-roadside span{position:absolute;width:4px;height:34px;border-radius:2px;background:#e9f1ed;box-shadow:0 0 0 2px #39544e}.drive-roadside.left i{left:37%;top:7%;transform:scale(.2)}.drive-roadside.left b{left:22%;top:36%;transform:scale(.55)}.drive-roadside.left span{left:4%;top:76%;transform:scale(1.15)}.drive-roadside.right i{right:37%;top:7%;transform:scale(.2)}.drive-roadside.right b{right:22%;top:36%;transform:scale(.55)}.drive-roadside.right span{right:4%;top:76%;transform:scale(1.15)}
.drive-speed-lines{position:absolute;z-index:5;inset:43% 0 0;opacity:var(--speed-opacity);pointer-events:none}.drive-speed-lines i,.drive-speed-lines b,.drive-speed-lines span,.drive-speed-lines em{position:absolute;top:10%;width:2px;height:45%;background:linear-gradient(transparent,rgba(255,255,255,.72));transform-origin:top}.drive-speed-lines i{left:12%;transform:rotate(22deg)}.drive-speed-lines b{left:31%;transform:rotate(10deg)}.drive-speed-lines span{right:31%;transform:rotate(-10deg)}.drive-speed-lines em{right:12%;transform:rotate(-22deg)}
.drive-stop-zone{position:absolute;z-index:3;top:44%;left:50%;width:92px;height:35px;border:3px solid #f5dc2f;border-radius:4px;background:rgba(245,220,47,.17);color:#fff;text-align:center;font:900 .42rem/27px "DM Sans",sans-serif;letter-spacing:.08em;opacity:0;transform:translate(-50%,-50%) scale(.08);transform-origin:50% 50%;will-change:transform,opacity}.drive-stop-zone::before{position:absolute;right:4px;bottom:100%;width:4px;height:52px;background:#354340;content:""}.drive-stop-zone::after{position:absolute;right:-12px;bottom:calc(100% + 43px);padding:4px 5px;border:2px solid #fff;border-radius:4px;background:#d81f2b;color:#fff;content:"BUS STOP";font:900 .35rem "DM Sans",sans-serif;white-space:nowrap}
.drive-bus{position:absolute;z-index:7;bottom:9px;left:50%;width:104px;height:83px;border-radius:16px 16px 8px 8px;background:linear-gradient(90deg,#a91420,#e1262f 16% 84%,#a91420);box-shadow:inset 0 5px rgba(255,255,255,.25),inset 0 34px #f8fbfa,0 13px 18px rgba(0,0,0,.42);transform:translateX(-50%) rotate(var(--bus-lean));transform-origin:50% 100%;will-change:transform}.drive-bus::before{position:absolute;top:8px;right:11px;left:11px;height:24px;border-radius:7px 7px 2px 2px;background:linear-gradient(90deg,#7bb7c7 0 47%,#172c29 47% 53%,#7bb7c7 53%);box-shadow:inset 0 -5px rgba(11,57,67,.2);content:""}.drive-bus::after{position:absolute;right:14px;bottom:16px;left:14px;height:6px;border-radius:3px;background:linear-gradient(90deg,#ffcf42 0 12%,#82101a 12% 88%,#ffcf42 88%);content:""}.drive-bus span{position:absolute;z-index:2;top:38px;left:50%;width:44px;height:9px;border-radius:3px;background:#172c29;color:#ffd75c;transform:translateX(-50%)}.drive-bus span::after{display:block;content:"BUS  JAI";font:900 .28rem/9px "DM Sans",sans-serif;text-align:center;letter-spacing:.08em}.drive-bus i,.drive-bus b{position:absolute;bottom:-5px;width:18px;height:27px;border:3px solid #dce5e1;border-radius:6px;background:#172c29}.drive-bus i{left:11px}.drive-bus b{right:11px}.drive-bus em{position:absolute;right:22px;bottom:26px;left:22px;height:4px;border-radius:999px;background:#fff;box-shadow:0 0 9px rgba(255,255,255,.9)}
.drive-gauges{display:grid;grid-template-columns:1fr 1fr;gap:8px}.drive-gauges>div{position:relative;height:22px;overflow:hidden;border-radius:7px;background:#dbe5e1}.drive-gauges span{position:absolute;inset:0 auto 0 0;width:0;transition:width .08s linear}.drive-gauges>div:first-child span{background:#24a96d}.drive-gauges>div:last-child span{background:#e1262f}.drive-gauges small{position:absolute;inset:0;display:grid;place-items:center;color:#17322d;font-size:.4rem;font-weight:900}
.drive-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;touch-action:none;user-select:none}.drive-controls button{display:grid;min-height:88px;align-content:center;justify-items:center;gap:1px;border:2px solid transparent;border-radius:18px;color:#fff;box-shadow:0 9px 18px rgba(20,38,34,.15);touch-action:none}.drive-controls button.pressed{transform:translateY(3px);box-shadow:0 3px 8px rgba(20,38,34,.16)}.drive-controls small{font-size:.4rem;opacity:.8}.drive-controls strong{font-size:.92rem}.drive-controls span{font:800 .4rem "DM Sans",sans-serif;letter-spacing:.09em;opacity:.8}.drive-brake{background:linear-gradient(145deg,#ce2f38,#97141d)}.drive-throttle{background:linear-gradient(145deg,#1aa36d,#087052)}
.drive-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;border-radius:12px;background:#dfe8e4}.drive-mode-tabs button{min-height:38px;border-radius:9px;background:transparent;color:#52645f;font-size:.58rem;font-weight:900}.drive-mode-tabs button.active{background:#fff;color:#0b7867;box-shadow:0 4px 12px rgba(17,50,44,.12)}.drive-50-requirement{display:grid;gap:3px;padding:10px 12px;border:1px solid #f3d36b;border-radius:12px;background:#fff8df;color:#493800}.drive-50-requirement strong{font-size:.58rem}.drive-50-requirement span{font-size:.48rem;line-height:1.45}.drive-50-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.drive-50-progress span{display:grid;gap:2px;min-height:50px;align-content:center;padding:5px;border:1px solid #d8e3df;border-radius:10px;background:#f3f7f5;text-align:center}.drive-50-progress span.current{border-color:#e1262f;background:#fff0f1}.drive-50-progress span.done{border-color:#0b7867;background:#e7f4ef}.drive-50-progress b{font:900 .56rem "DM Sans",sans-serif}.drive-50-progress small{color:#667873;font-size:.36rem;font-weight:800;white-space:nowrap}.drive-abandon{width:100%;min-height:52px;justify-self:stretch;border:1px solid #d4ddd9;border-radius:14px;background:#fff;color:#b41420;font-size:.66rem;font-weight:950;text-decoration:none;box-shadow:0 6px 16px rgba(20,48,42,.08)}.drive-result{display:grid;gap:10px;padding:14px;border-radius:18px;background:#fff;box-shadow:0 10px 25px rgba(20,48,42,.1)}.drive-result-grade{display:grid;grid-template-columns:78px 1fr;gap:12px;align-items:center}.drive-result-grade>b{display:grid;width:78px;height:78px;place-items:center;border-radius:50%;background:linear-gradient(145deg,#0b7867,#074c42);color:#fff;font:900 2rem "DM Sans",sans-serif;box-shadow:0 10px 24px rgba(11,120,103,.24)}.drive-result-grade h3{margin:0;font-size:.88rem}.drive-result-grade strong{display:block;margin-top:4px;color:#0b7867;font:900 1.35rem "DM Sans",sans-serif}.drive-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.drive-result-grid span{display:grid;gap:2px;padding:10px;border-radius:11px;background:#edf3f0}.drive-result-grid small{color:#6a7c76;font-size:.42rem}.drive-result-grid b{font:900 .7rem "DM Sans",sans-serif}.drive-result-checkpoints{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.drive-result-checkpoints span{display:grid;gap:2px;padding:7px 5px;border-radius:10px;background:#f3f7f5;text-align:center}.drive-result-checkpoints small{color:#6a7c76;font-size:.36rem}.drive-result-checkpoints b{font:900 .48rem "DM Sans",sans-serif}.drive-result-checkpoints em{color:#b41420;font-style:normal;font-size:.38rem;font-weight:900}.drive-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.drive-result-actions button{min-height:44px;border-radius:12px;background:#0b7867;color:#fff;font-size:.56rem;font-weight:900}.drive-result-actions button:last-child{grid-column:1/-1;background:#172c29}
.drive-leaderboard{margin-top:14px;padding:12px;border-radius:17px;background:#fff}.drive-leaderboard>header{display:flex;align-items:center;justify-content:space-between}.drive-leaderboard>header div{display:grid}.drive-leaderboard>header strong{font-size:.65rem}.drive-leaderboard>header small{color:#72817d;font-size:.42rem}.drive-leaderboard>header button{padding:6px 9px;border-radius:8px;background:#e5efeb;color:#0b7867;font-size:.48rem;font-weight:900}.drive-leaderboard>div{display:grid;gap:5px;margin-top:9px}.drive-rank{display:grid;grid-template-columns:24px minmax(0,1fr) auto auto;gap:7px;align-items:center;padding:8px;border-radius:10px;background:#f0f4f2}.drive-rank>i{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#dce7e3;color:#0b7867;font:900 .5rem "DM Sans",sans-serif}.drive-rank-top>i{background:#ffd75c;color:#493800}.drive-rank>strong{overflow:hidden;font-size:.54rem;text-overflow:ellipsis;white-space:nowrap}.drive-rank span,.drive-rank time{display:grid;color:#657570;font-size:.4rem;text-align:right}.drive-rank b{color:#0b7867;font:900 .58rem "DM Sans",sans-serif}.drive-leaderboard>small{display:block;margin-top:8px;color:#72817d;font-size:.41rem;line-height:1.45;text-align:center}
.drive-leaderboard select{width:100%;height:40px;margin-top:9px;padding:0 10px;border:1px solid #d7e1dd;border-radius:10px;background:#f4f7f5;color:#172c29;font-size:.55rem;font-weight:850}.drive-rank span b{white-space:nowrap}.drive-rank time{min-width:74px;color:#b41420;font-weight:900;white-space:nowrap}.drive-latest-scores{display:grid;gap:6px;margin-bottom:5px}.drive-latest-score{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto;gap:7px;align-items:center;padding:8px;border:1px solid #f1cf58;border-radius:10px;background:#fff8df}.drive-latest-score>i{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#f1cf58;color:#493800;font:900 .46rem "DM Sans",sans-serif;font-style:normal}.drive-latest-score>strong{overflow:hidden;font-size:.54rem;text-overflow:ellipsis;white-space:nowrap}.drive-latest-score span,.drive-latest-score time{display:grid;color:#657570;font-size:.4rem;text-align:right}.drive-latest-score b{color:#0b7867;font:900 .58rem "DM Sans",sans-serif;white-space:nowrap}.drive-latest-score time{min-width:74px;color:#b41420;font-weight:900;white-space:nowrap}
.beta-environment-badge{position:fixed;z-index:10020;top:calc(env(safe-area-inset-top,0px) + 7px);left:50%;display:flex;gap:7px;align-items:center;padding:6px 11px;border:1px solid rgba(255,255,255,.55);border-radius:999px;background:rgba(26,35,33,.94);color:#fff;box-shadow:0 5px 18px rgba(0,0,0,.22);transform:translateX(-50%);pointer-events:none;white-space:nowrap}.beta-environment-badge strong{color:#ffd75c;font-size:.46rem;letter-spacing:.05em}.beta-environment-badge span{font-size:.4rem;opacity:.9}@media(max-width:430px){.beta-environment-badge{top:calc(env(safe-area-inset-top,0px) + 4px);padding:4px 8px}.beta-environment-badge span{display:none}}
