:root {
  --sky: #87ceeb;
  --sky-l: #d9f1fb;
  --sky-xl: #eef9fe;
  --sky-d: #2b7fa8;
  --ink: #0d3347;
  --muted: #55707f;
  --line: #cfe6f1;
  --white: #ffffff;
  --pink: #ffd9e4;
  --peach: #ffe2c7;
  --lemon: #fff3b8;
  --mint: #cdf5df;
  --lav: #e4dcff;
  --aqua: #c6f1f2;
  --danger: #c0392b;
  --radius: 18px;
  --shadow: 0 3px 10px rgba(13, 51, 71, .14);
  --shadow-s: 0 1px 4px rgba(13, 51, 71, .16);
  --header-h: 62px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--sky-xl) 0%, #ffffff 60%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
}

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--sky-d); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }

/* ---------- fluffy buttons: soft, squish in a little when pressed ---------- */
.btn, .chip-btn, .tab, .tile, .menu a, .link {
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 52px; padding: .75rem 1.5rem;
  border: 0; border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 1.05rem;
  box-shadow: var(--shadow); cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--sky); box-shadow: 0 4px 0 var(--sky-d), var(--shadow); }
.btn:hover { transform: scale(.97); }
.btn:active { transform: scale(.92); box-shadow: 0 1px 0 var(--sky-d); }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; font: inherit; color: var(--sky-d); text-decoration: underline; padding: .5rem; cursor: pointer; }
.link:active { transform: scale(.95); }
.chip-btn {
  border: 0; border-radius: 999px; padding: .35rem .9rem; font: inherit; font-size: .9rem; font-weight: 600;
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-s); cursor: pointer;
}
.chip-btn:hover { transform: scale(.96); }
.chip-btn:active { transform: scale(.9); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1.25rem 1rem; }
.login-card {
  width: min(100%, 26rem);
  background: var(--white); border-radius: 28px; box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.5rem; text-align: center;
  border: 2px solid var(--sky-l);
}
.hero-bus { position: relative; width: 240px; max-width: 80%; margin: 0 auto .25rem; animation: bob 3.2s ease-in-out infinite; }
.hero-bus img { width: 100%; height: auto; display: block; }
.sparkle { position: absolute; font-size: 1.2rem; animation: twinkle 2.4s ease-in-out infinite; }
.s1 { left: -6px; top: 4px; } .s2 { right: -4px; top: -6px; animation-delay: .8s; } .s3 { right: 10px; bottom: 6px; animation-delay: 1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.login h1 { font-size: 2rem; }
.tagline { color: var(--muted); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; background: var(--sky-l); border-radius: 999px; padding: .3rem; margin: 1rem 0; }
.tab { border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; padding: .65rem; cursor: pointer; }
.tab.is-active { background: var(--white); box-shadow: var(--shadow-s); }
.tab:active { transform: scale(.94); }

.form { display: grid; gap: .85rem; text-align: left; }
.f { display: grid; gap: .3rem; }
.f span { font-weight: 700; font-size: .95rem; }
.f input, .f select {
  width: 100%; min-height: 52px; padding: .65rem .9rem; font: inherit; color: var(--ink);
  background: var(--sky-xl); border: 2px solid var(--line); border-radius: 14px;
}
.f input:focus, .f select:focus { border-color: var(--sky-d); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(135, 206, 235, .6); }
.form .btn { width: 100%; }
.form .link { justify-self: center; }
.hint { color: var(--muted); font-size: .9rem; text-align: center; margin: 0; }
.msg { margin: 0; text-align: center; font-weight: 700; padding: .65rem .9rem; border-radius: 14px; background: var(--lemon); }
.msg:empty { display: none; }
.demo-note { margin: 1rem 0 0; font-size: .85rem; color: var(--muted); background: var(--lemon); border-radius: 12px; padding: .5rem .75rem; }

/* ---------- app shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--header-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: .6rem; padding-inline: .75rem;
  background: var(--sky); box-shadow: 0 2px 6px rgba(13, 51, 71, .25);
}
.menu-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .45); color: var(--ink); cursor: pointer;
  transition: transform .14s ease, background-color .14s ease;
}
.menu-btn:hover { transform: scale(.95); background: rgba(255, 255, 255, .7); }
.menu-btn:active { transform: scale(.88); }
.topbar-title { flex: 1; margin: 0; font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-chip { background: var(--white); border-radius: 999px; padding: .25rem .75rem; font-size: .8rem; font-weight: 700; box-shadow: var(--shadow-s); }

.menu {
  position: fixed; z-index: 30; top: calc(var(--header-h) + env(safe-area-inset-top) - 6px); left: .5rem;
  width: min(23rem, calc(100% - 1rem)); max-height: calc(100dvh - var(--header-h) - 1rem);
  overflow-y: auto; background: var(--white); border-radius: 20px; padding: .5rem 0;
  box-shadow: 0 8px 28px rgba(13, 51, 71, .35);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu .sec { padding: .55rem 1.25rem .2rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sky-d); }
.menu a { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.menu a .ico { width: 1.6rem; text-align: center; }
.menu a:hover, .menu a:focus-visible, .menu a[aria-current="page"] { background: var(--sky-l); }
.menu a:active { transform: scale(.97); }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(13, 51, 71, .25); }

.preview-bar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .4rem .75rem; background: var(--lemon); font-size: .85rem;
}
.preview-bar select { font: inherit; padding: .25rem .5rem; border-radius: 10px; border: 1px solid #d8c872; background: #fff; }
.preview-bar .chip-btn { margin-left: auto; }

main { width: min(100% - 1.5rem, 60rem); margin: 1rem auto 2.5rem; outline: none; }
.page-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head .big { font-size: 2.2rem; }
.page-head h1 { margin: 0; font-size: 1.7rem; }
.soon { display: inline-block; margin-bottom: 1rem; padding: .35rem .8rem; border-radius: 999px; background: var(--lemon); font-size: .85rem; font-weight: 700; }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; border: 2px solid var(--sky-l); margin-bottom: 1rem; }
.card h3 { font-size: 1.1rem; }
.card.alert { background: #fff0ee; border-color: #f3b5ad; }
.card.dashed { border-style: dashed; background: var(--sky-xl); box-shadow: none; }
.muted { color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center;
  min-height: 7.5rem; padding: .8rem; border-radius: 22px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 1.05rem;
}
.tile .em { font-size: 2.2rem; }
.tile:hover { transform: scale(.97); }
.tile:active { transform: scale(.91); box-shadow: var(--shadow-s); }
.c-sky { background: var(--sky-l); } .c-pink { background: var(--pink); } .c-peach { background: var(--peach); }
.c-lemon { background: var(--lemon); } .c-mint { background: var(--mint); } .c-lav { background: var(--lav); } .c-aqua { background: var(--aqua); }

.search { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem; margin-bottom: 1rem; }
.search select, .search input { min-height: 52px; font: inherit; padding: .6rem .8rem; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); }
.search input { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { padding: .45rem .9rem; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow-s); }
.map-ph { height: 15rem; border-radius: var(--radius); display: grid; place-items: center; text-align: center; color: var(--muted);
  background: repeating-linear-gradient(45deg, #e6f5fc, #e6f5fc 14px, #d9f1fb 14px, #d9f1fb 28px); border: 2px dashed var(--sky); }

.segment { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.pad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .5rem; }
.pad { text-align: center; padding: .6rem .3rem; border-radius: 14px; background: var(--sky-xl); border: 2px solid var(--line); font-weight: 800; }
.pad small { display: block; font-weight: 600; color: var(--muted); }

.chat { display: grid; gap: .6rem; margin-bottom: 1rem; }
.bubble { max-width: 85%; padding: .55rem .9rem; border-radius: 18px; background: var(--sky-l); box-shadow: var(--shadow-s); }
.bubble.me { justify-self: end; background: var(--mint); }
.bubble b { font-size: .8rem; display: block; color: var(--sky-d); }
.bubble.me b { color: #2c7a52; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.composer input { min-height: 52px; border-radius: 999px; border: 2px solid var(--line); padding: 0 1rem; font: inherit; background: #fff; }

.topics { list-style: none; margin: 0 0 1rem; padding: 0; }
.topics .letter { font-weight: 900; color: var(--sky-d); margin: .8rem 0 .3rem; }
.topics li.item { padding: .6rem .9rem; margin: .3rem 0; background: var(--sky-xl); border-radius: 14px; border: 2px solid var(--line); }

.roadmap { padding-left: 1.2rem; margin: 0; }
.roadmap li { margin: .3rem 0; }

@media (max-width: 480px) { .search { grid-template-columns: 1fr; } body { font-size: 16.5px; } }

/* respect people who turn motion off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .tile:hover, .chip-btn:hover, .menu-btn:hover { transform: none; }
}

/* ---- users & approvals (admin) ---- */
.urow { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; padding: .75rem 0; border-top: 1px dashed #b9dff0; }
.urow:first-of-type { border-top: 0; }
.uact { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.uact select { min-height: 40px; border-radius: 12px; border: 2px solid #b9dff0; padding: 0 .5rem; background: #fff; }
#who { font-size: .85rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

.urow.editing { display: block; }
.uedit { display: grid; gap: .6rem; width: 100%; }
#usearch { flex: 1; min-width: 0; }

/* ---- routes page ---- */
.map { height: 55vh; min-height: 320px; border-radius: 20px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(13,51,71,.15); margin: .75rem 0; position: relative; z-index: 0; isolation: isolate; }
.route-chip { border: 0; cursor: pointer; font-weight: 800; min-height: 40px; min-width: 48px; transition: transform .15s, opacity .15s; }
.route-chip:hover { transform: scale(.96); }
.route-chip.is-sel { outline: 3px solid var(--ink); outline-offset: 2px; }
.route-chip.is-dim { opacity: .45; }
.results { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .4rem; }
.results li { background: #fff; border-radius: 14px; padding: .5rem .75rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.stoplink { background: none; border: 0; color: var(--ink); font: inherit; text-align: left; padding: .35rem 0; cursor: pointer; text-decoration: underline dotted; min-height: 40px; }
.stoplink small { color: #5b7a8c; }
.stoplist { padding-left: 1.4rem; margin: .25rem 0 1rem; }
.stoplist li { padding: 0; }
.tt-wrap { overflow-x: auto; border-radius: 12px; border: 2px solid #cfe9f5; background: #fff; }
.tt { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .9rem; }
.tt th { position: sticky; top: 0; background: #e6f5fc; padding: .5rem .6rem; text-align: center; white-space: nowrap; font-size: .8rem; }
.tt td { padding: .4rem .6rem; text-align: center; border-top: 1px solid #e6f1f7; }
.tt tr.next td { background: #fff7c2; font-weight: 800; }

.chip-btn.danger { color: #b3261e; border-color: #f2b8b5; }

.tiny { font-size: .78rem; line-height: 1.35; }
.lrow { padding: .5rem 0; border-top: 1px dashed #b9dff0; }
.lrow:first-of-type { border-top: 0; }

.detour-banner { background: #ffe3e0; border: 2px solid #f2b8b5; border-radius: 14px; padding: .6rem .8rem; margin: .5rem 0; }
.route-chip.has-detour::after { content: " 🚧"; }
.ext { display: inline-flex; gap: .3rem; align-items: center; }
.ext input[type=date] { min-height: 40px; border-radius: 12px; border: 2px solid #b9dff0; padding: 0 .4rem; background: #fff; }
textarea { width: 100%; border-radius: 14px; border: 2px solid #b9dff0; padding: .6rem .8rem; font: inherit; background: #fff; }

.notice-bar { background: #d32f2f; color: #fff; padding: .6rem 1rem; font-weight: 700; display: flex; gap: .6rem; align-items: flex-start; justify-content: space-between; }
.notice-bar[hidden] { display: none; }
.notice-bar button { background: #fff; color: #d32f2f; border: 0; border-radius: 999px; padding: .3rem .8rem; font-weight: 800; cursor: pointer; min-height: 36px; }
.notice-bar small { display: block; font-weight: 400; }
.card img.pic, .pic { max-width: 100%; border-radius: 14px; margin: .5rem 0; display: block; }
.f input, .f select, .f textarea { font: inherit; }
.rowline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0; }
.edtable { width: 100%; border-collapse: collapse; }
.edtable td { padding: 2px; }
.edtable input { width: 100%; min-height: 40px; border: 2px solid #b9dff0; border-radius: 10px; padding: 0 .4rem; background: #fff; }
.pre { white-space: pre-wrap; }
.badge-hidden { background: #eee; color: #666; }
.qbox { border: 2px solid #cfe9f5; border-radius: 14px; padding: .6rem .8rem; margin: .6rem 0; background: #fff; }
.qbox.good { border-color: #6cc48a; } .qbox.bad { border-color: #f2b8b5; }
.opt { display: flex; gap: .5rem; align-items: center; padding: .35rem 0; min-height: 40px; }
.bubble .meta { font-size: .72rem; color: #5b7a8c; font-weight: 400; }
.bubble.reply { margin-left: 1.5rem; }

/* ---- standard phone size: phones are the priority; on wider screens the app stays phone-sized and centred ---- */
:root { --phone-w: 430px; }
body { font-size: 16.5px; }
.login, #app { width: 100%; max-width: var(--phone-w); margin-inline: auto; }
#app { min-height: 100dvh; }
main { width: calc(100% - 1.5rem); }
.search { grid-template-columns: 1fr; }
.map { height: min(55vh, 440px); }
.menu { left: max(.5rem, calc(50vw - var(--phone-w) / 2 + .5rem)); width: min(23rem, calc(100vw - 1rem), calc(var(--phone-w) - 1rem)); }
@media (min-width: 481px) {
  html { background: #bfe3f3; }
  body { background: transparent; }
  #app, .login { background: linear-gradient(180deg, var(--sky-xl) 0%, #ffffff 60%); box-shadow: 0 0 36px rgba(13, 51, 71, .22); min-height: 100dvh; }
}

/* Tasks screen */
.tasklist { display: grid; gap: .35rem; margin: .5rem 0; }
.taskbox { display: flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; }
.taskbox input { width: 22px; height: 22px; }


/* ===== People, ATU, schedules, planner ===== */
.menu-btn { position: relative; }
.menu-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #d32f2f; border: 2px solid #fff; }
.count-pill { display: inline-block; min-width: 1.4em; padding: 0 .4em; margin-left: .4em; border-radius: 999px; background: #d32f2f; color: #fff; font-size: .75rem; font-weight: 800; text-align: center; line-height: 1.5; }
.menu-group { display: flex; align-items: center; width: 100%; gap: .6rem; padding: .7rem 1rem; min-height: 44px; background: none; border: 0; font: inherit; font-weight: 800; text-align: left; cursor: pointer; color: inherit; }
.menu-group .caret { margin-left: auto; }
.submenu { padding-left: 1.2rem; border-left: 3px solid #0b2a5b33; margin-left: 1.1rem; }

/* the ATU badge: white letters in a navy circle (swap this rule to change it everywhere) */
.atu-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #0b2a5b; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.stamp { display: inline-block; color: #e57373; border: 2px solid #e57373; border-radius: 6px; padding: 0 .35em; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-4deg); opacity: .85; }
.profile-card { position: relative; overflow: hidden; }
.big-stamp { position: absolute; right: .9rem; bottom: .9rem; font-size: 1.15rem; transform: rotate(-9deg); opacity: .55; }
.profile-card.stamped { min-height: 9rem; padding-bottom: 3.2rem; }
.pchips { display: flex; flex-wrap: wrap; gap: .35rem; }
.phead { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #cfe9f5; color: #0d3347; font-weight: 800; background-size: cover; background-position: center; }
.avatar.big { width: 84px; height: 84px; font-size: 1.6rem; }
.prow { padding: .6rem 0; border-bottom: 1px solid #0001; }
.pmain { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; min-height: 48px; }
.ptxt { line-height: 1.5; }
.pcontact { padding-left: 56px; }
.letter-head { font-weight: 800; color: #0b2a5b; margin-top: .75rem; border-bottom: 2px solid #0b2a5b33; }
.print-btn { background: none; border: 1px solid #0003; border-radius: 10px; min-width: 44px; min-height: 44px; font-size: 1.15rem; cursor: pointer; }
.page-head .print-btn { margin-left: auto; }
.pick { display: block; margin: .3rem 0; text-align: left; }
.tp-legs { padding-left: 1.2rem; }
.tp-legs li { margin: .5rem 0; }

@media print {
  .topbar, .menu, .scrim, .preview-bar, .notice-bar, .no-print, .print-btn, .btn, .chip-btn, .segment, .search, form, .uact, .msg { display: none !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #999 !important; break-inside: avoid; }
  main { max-width: none !important; padding: 0 !important; }
}

.bus-pin span { display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 11px; font: 700 12px/18px system-ui, sans-serif; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px #0006; }
.live-chip { display: inline-block; margin-left: .35rem; padding: 0 .5em; border-radius: 999px; background: #e3f7e8; color: #14532d; font-size: .75rem; font-weight: 700; }

/* Live Buses route drop-down */
.lv-dd { margin-bottom: .75rem; }
.lv-dd-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .45rem 1rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 800; cursor: pointer; }
.lv-dd-dot { padding: .1rem .55rem; border-radius: 999px; font-weight: 800; }
.lv-dd-panel { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; padding: .75rem; max-height: 40vh; overflow-y: auto; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-s); }
.lv-dd-panel[hidden] { display: none; }

/* ===== Compact layout: more room for content, same look ===== */
:root { --header-h: 50px; --radius: 14px; }
body { font-size: 15.5px; line-height: 1.35; }
p { margin: 0 0 .5rem; }
h1, h2, h3 { margin: 0 0 .35rem; }
.topbar { gap: .4rem; padding-inline: .5rem; }
.menu-btn { width: 40px; height: 40px; }
.menu-btn svg { width: 24px; height: 24px; }
.topbar-title { font-size: 1.1rem; }
.topbar .role-chip { font-size: .72rem; padding: .15rem .55rem; }
.topbar .chip-btn { font-size: .78rem; padding: .22rem .65rem; min-height: 30px; }
.preview-bar { padding: .3rem .6rem; font-size: .75rem; gap: .35rem; }
.preview-bar .chip-btn { padding: .2rem .6rem; font-size: .75rem; }
main { margin: .5rem auto 1.5rem; }
.page-head.tidy { margin: 0 0 .3rem; justify-content: flex-end; }
.page-head.tidy .big, .page-head.tidy h1 { display: none; }
.page-head.tidy .print-btn { min-width: 34px; min-height: 34px; font-size: 1rem; }
@media print { .page-head.tidy h1 { display: block; } }
.page-head { margin-bottom: .5rem; gap: .5rem; }
.page-head .big { font-size: 1.6rem; }
.page-head h1 { font-size: 1.3rem; }
.card { padding: .65rem .8rem; margin-bottom: .6rem; border-width: 1px; }
.card h3 { font-size: 1rem; margin-bottom: .25rem; }
.btn { min-height: 44px; padding: .5rem 1.1rem; font-size: 1rem; }
.chip { padding: .3rem .7rem; }
.chips, .segment { gap: .35rem; margin-bottom: .5rem; }
.tiles { grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .75rem; }
.tile { min-height: 4.6rem; padding: .5rem; border-radius: 16px; font-size: .95rem; gap: .15rem; }
.tile .em { font-size: 1.7rem; }
.f input, .f select, .search select, .search input, .composer input { min-height: 44px; padding: .45rem .75rem; }
.form { gap: .6rem; }
.msg { padding: .45rem .7rem; }
.search { margin-bottom: .5rem; }
.menu { padding: .25rem 0; }
.menu a { padding: .55rem 1rem; font-size: 1rem; gap: .6rem; }
.menu .sec { padding: .35rem 1rem .1rem; font-size: .7rem; }
.menu-group { padding: .5rem 1rem; min-height: 40px; }
.urow { padding: .5rem 0; }
.prow { padding: .4rem 0; }
.lrow { padding: .35rem 0; }
.avatar.big { width: 64px; height: 64px; font-size: 1.3rem; }
.bubble { padding: .4rem .7rem; }
.map { height: min(62vh, 520px); margin: .4rem 0; }

/* Live Buses: one slim bar, big map */
.lv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .35rem; }
.lv-bar #lv-routes { display: contents; }
.lv-bar .lv-dd-btn { order: 1; min-height: 38px; padding: .25rem .8rem; }
.lv-bar #lv-sum { order: 2; margin: 0; font-size: .85rem; flex: 1; min-width: 8rem; }
.lv-bar .lv-dd-panel { order: 3; flex-basis: 100%; margin-top: 0; }
#lv-map { height: calc(100dvh - 135px) !important; min-height: 340px; margin: 0 0 .3rem; }
.topbar .print-btn { min-width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); font-size: .95rem; }
.notice-bar { padding: .35rem .75rem; font-size: .85rem; align-items: center; }
.notice-bar button { min-height: 30px; padding: .15rem .7rem; font-size: .8rem; }
.search { grid-template-columns: 7.2rem 1fr; gap: .4rem; }
.route-chip { min-height: 34px; min-width: 42px; }
.route-chip.chip { padding: .15rem .6rem; }
.disclaimer { font-size: .68rem; line-height: 1.25; margin: .2rem 0; }
.search:not(:has(select)) { grid-template-columns: 1fr; }
.chip { font-size: .85rem; }
.pchips { gap: .25rem; }
.segment .chip-btn, .rowline .chip-btn { padding: .22rem .75rem; font-size: .85rem; }
.avatar { width: 38px; height: 38px; font-size: .9rem; }
.avatar.big { width: 64px; height: 64px; font-size: 1.3rem; }
.pcontact { padding-left: 50px; }
.menu a { padding: .45rem 1rem; }
.c-gray { background: #e3e6e8; color: #4b5560; }

/* action log: small plain labels, no coloured blocks */
.lrow { font-size: .78rem; line-height: 1.3; padding: .3rem 0; }
.lg-act { font-weight: 700; font-size: .78rem; }
.lg-ok { color: #2e7d4f; }
.lg-warn { color: #c2691a; }
.lg-info { color: #5a6670; }

/* videos */
.vid { display: block; width: 100%; max-height: 60vh; border-radius: 14px; background: #000; margin: .5rem 0; }
.vid-wrap { position: relative; width: 100%; padding-top: 56.25%; margin: .5rem 0; border-radius: 14px; overflow: hidden; background: #000; }
.vid-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-field input[type=url] { min-height: 40px; }
.vid-field progress { width: 100%; }
.vid-cur .vid, .vid-cur .vid-wrap { max-width: 260px; }

.back-btn { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.55); color: var(--ink); cursor: pointer; margin-left: -.1rem; }
.back-btn:active { transform: scale(.88); }
@media print { .back-btn { display: none !important; } }

.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--ink); font-weight: 800; font-size: 1.3rem; }
.boot small { font-weight: 500; color: var(--muted); font-size: .9rem; }

/* bus pins: the arrow points the way the bus is heading */
.bus-pin { position: relative; }
.bus-pin span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.bus-arr { position: absolute; inset: 0; pointer-events: none; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1px #fff); }
.bus-arr b { position: absolute; top: 0; left: 18px; width: 12px; height: 13px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* short message at the bottom of the screen, fades after 5 seconds */
.afo-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); max-width: 90vw; padding: .6rem 1rem; border-radius: 999px; background: rgba(90, 100, 108, .92); color: #fff; font-size: .85rem; font-weight: 600; text-align: center; z-index: 5000; opacity: 0; pointer-events: none; transition: opacity .3s; }
.afo-toast.show { opacity: 1; }

/* Routes page: Trip planner and "All routes" side by side */
.rs-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.rs-row .btn { margin: 0; white-space: nowrap; min-height: 38px; padding: .25rem .9rem; }
.rs-row .lv-dd { margin: 0; flex: 1; min-width: 0; }
.rs-row .lv-dd-btn { min-height: 38px; padding: .25rem .8rem; width: 100%; justify-content: space-between; }
#rs-panel .lv-dd-panel { margin: 0 0 .6rem; }

/* top bar: Admin chip and Log out look the same; title sits in the middle */
.topbar .role-chip, .topbar .chip-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 30px; padding: .2rem .7rem; border: 0; border-radius: 999px;
  font: inherit; font-size: .78rem; font-weight: 700; line-height: 1.2; white-space: nowrap;
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-s);
}
.topbar .topbar-title { text-align: center; }

/* Home: Emergency and Daily tiles. They blink and the icon rings while something is unread. */
button.tile { border: 0; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; }
.tiles.tiles2 { grid-template-columns: repeat(2, 1fr); }
#home-emerg[hidden] { display: none; }
.nt-tile.ring { animation: nt-blink 1s steps(1) infinite; }
.nt-tile.ring .em { display: inline-block; transform-origin: 50% 10%; animation: nt-ring .6s ease-in-out infinite; }
@keyframes nt-blink { 0%, 100% { background: #ff8a80; box-shadow: 0 0 0 3px #d32f2f; } 50% { background: #ffd54f; box-shadow: 0 0 0 3px #f9a825; } }
@keyframes nt-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-16deg); } 60% { transform: rotate(10deg); } 80% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .nt-tile.ring, .nt-tile.ring .em { animation: none; } .nt-tile.ring { background: #ff8a80; box-shadow: 0 0 0 3px #d32f2f; } }

/* direction arrows along a selected route */
.route-arr { background: none; border: 0; pointer-events: none; }
.route-arr svg { display: block; filter: drop-shadow(0 0 1px rgba(0,0,0,.4)); }

/* bus markers: a little bus drawing plus the route number */
.bus-pin span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; padding: 2px 7px 2px 5px; }
.bus-pin span svg { flex: none; display: block; }
.bus-pin span b { font-weight: 800; }

/* a stop (in the list) flashed red for a moment to show it can be tapped */
.stoplink.hint-red { background: #d32f2f; color: #fff; border-radius: 8px; box-shadow: 0 0 0 3px rgba(211, 47, 47, .35); }
.stoplink.hint-red small { color: #fff; }

/* ---- laptops and desktops: use the wider screen instead of a phone-sized column ---- */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  :root { --phone-w: 1000px; }
  body { font-size: 17px; }
  .tile { min-height: 6.2rem; }
  .map { height: min(70vh, 680px); }
  .stoplist { columns: 2; column-gap: 2rem; }
  .stoplist li { break-inside: avoid; }
}

/* map pop-ups: text wraps and the box grows downwards instead of sideways off the screen */
.leaflet-popup-content { overflow-wrap: anywhere; word-break: normal; }
.leaflet-popup-content-wrapper { max-width: calc(100vw - 2.5rem); }
.leaflet-popup-content { font-size: 15px; line-height: 1.35; }
.leaflet-popup-content .tiny { font-size: .95em; }


/* John the Bus Duck (cartoon helper on Home) */
#buddy { position: fixed; left: 8px; bottom: 8px; z-index: 900; display: flex; align-items: flex-end; gap: 6px; max-width: calc(100vw - 16px); pointer-events: none; }
#buddy[hidden] { display: none; }
#buddy > * { pointer-events: auto; }
.bd-duck { order: -1; background: none; border: 0; padding: 0; cursor: pointer; flex: none; transform-origin: 50% 100%; animation: bd-in .6s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
#buddy.bd-small .bd-duck { transform: scale(.62); animation: bd-bob 3s ease-in-out infinite; }
#buddy.bd-small { left: 2px; bottom: 2px; }
.bd-bubble { background: #fff; color: #222; border: 2px solid #1f6fd1; border-radius: 16px 16px 16px 4px; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.3); font-size: 15px; line-height: 1.35; max-width: 270px; animation: bd-pop .35s ease both; }
.bd-text { margin: 0 0 8px; }
.bd-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-btn { border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; background: #e6eaf2; color: #234; cursor: pointer; }
.bd-btn.bd-go { background: #1f6fd1; color: #fff; font-weight: 600; }
.bd-btn.bd-off { background: none; text-decoration: underline; padding: 7px 4px; font-size: 12px; color: #667; }
.bd-jaw { transform-origin: 60px 84px; }
#buddy.bd-talk .bd-jaw { animation: bd-talk .22s ease-in-out infinite alternate; }
#buddy.bd-talk .bd-duck { animation: bd-hop .45s ease-in-out infinite alternate; }
.bd-hl { outline: 4px solid #ff8a1f; outline-offset: 3px; animation: bd-glow 1s ease-in-out infinite alternate; position: relative; z-index: 5; }
@keyframes bd-in { from { transform: translateX(-120px) rotate(-12deg); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes bd-pop { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes bd-talk { from { transform: translateY(0) } to { transform: translateY(8px) scaleY(1.1) } }
@keyframes bd-blink { 0%, 92%, 100% { transform: scaleY(1) } 96% { transform: scaleY(.1) } }
.bd-eyes { transform-origin: 60px 55px; animation: bd-blink 4s infinite; }
@keyframes bd-hop { from { transform: translateY(0) } to { transform: translateY(-5px) } }
@keyframes bd-bob { 0%, 100% { transform: scale(.62) translateY(0) } 50% { transform: scale(.62) translateY(-3px) } }
@keyframes bd-glow { from { outline-color: #ff8a1f } to { outline-color: #ffd93b } }
@media (prefers-reduced-motion: reduce) { #buddy *, .bd-hl { animation: none !important; } }

.bd-ptr { position: fixed; z-index: 950; font-size: 38px; line-height: 1; display: none; pointer-events: none; transform: translate(-30%, -10%); transition: left .6s ease, top .6s ease; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.bd-ptr.bd-tap { animation: bd-tapA .35s ease; }
@keyframes bd-tapA { 50% { transform: translate(-30%, -10%) scale(.7); } }

#buddy .bd-btns { max-height: 42vh; overflow-y: auto; }
.road-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.road-list li { padding: .55rem 0; border-top: 1px solid #d9eaf3; }
.road-list li:first-child { border-top: 0; }
.road-list a { font-weight: 700; color: #0b4a6e; }
.road-list li { display: flex; gap: .6rem; align-items: flex-start; }
.road-ico { font-size: 1.5rem; line-height: 1.2; }
.road-warn { background: #fff0f0; border-radius: 10px; padding-left: .4rem; }
.road-warn a { color: #b10f0f; }
.tiles.tiles1 { grid-template-columns: 1fr; }
.road-list a.road-src { font-weight: 600; color: #1b6a96; text-decoration: underline; }

/* ===== Advertisements ===== */
.ad-card { position: relative; background: var(--card, #fff); border: 2px dashed #f5a623; border-radius: 16px; padding: 14px; margin: 12px 0; }
.ad-tag { position: absolute; top: 8px; right: 10px; font-size: 11px; background: #fff3d6; color: #7a4b00; border-radius: 8px; padding: 1px 8px; }
.ad-img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.ad-card h3 { margin: 4px 0; padding-right: 70px; }
.ad-card video, .ad-card iframe { width: 100%; max-height: 220px; border-radius: 12px; }
.ad-promo { background: #eefbea; border-radius: 10px; padding: 6px 10px; }
.ad-more summary { cursor: pointer; color: #0b63c4; }
.ad-go { margin-top: 6px; }
.ad-row h3 { word-break: break-word; }
.season-strip { position: relative; display: flex; gap: 10px; align-items: center; border-radius: 16px; padding: 12px 14px; margin: 12px 0; background: #ffe9c7; color: #3a2400; }
.season-strip .season-em { font-size: 34px; }
.season-strip .ad-tag { top: 4px; right: 8px; }
.season-strip .chip-btn { margin-left: auto; white-space: nowrap; }
.season-halloween { background: #2b1b3d; color: #ffd9a0; }
.season-christmas { background: #0f5132; color: #fff; }
.season-diwali { background: #5a1a6b; color: #ffe08a; }
.season-strip[hidden], .ad-card[hidden], #home-ad[hidden], #dy-ad[hidden] { display: none; }
/* Fruit costumes during a seasonal event */
html[data-season] #buddy .bd-duck { position: relative; }
html[data-season] #buddy .bd-duck::before { content: ''; position: absolute; left: 50%; top: -22px; width: 56px; height: 48px; margin-left: -28px; background-repeat: no-repeat; background-size: contain; pointer-events: none; z-index: 2; }
html[data-season="christmas"] #buddy .bd-duck::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 48'%3E%3Cpath d='M6 38 Q10 6 36 4 Q30 20 50 38Z' fill='%23d62828'/%3E%3Crect x='3' y='34' width='50' height='10' rx='5' fill='%23fff'/%3E%3Ccircle cx='38' cy='5' r='6' fill='%23fff'/%3E%3C/svg%3E"); }
html[data-season="halloween"] #buddy .bd-duck::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 48'%3E%3Cpath d='M28 2 L40 36 L16 36Z' fill='%23222'/%3E%3Cellipse cx='28' cy='38' rx='26' ry='7' fill='%23222'/%3E%3Crect x='19' y='28' width='18' height='6' fill='%237a2fbf'/%3E%3C/svg%3E"); }
html[data-season="diwali"] #buddy .bd-duck::before { content: '🪔'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }

/* Movable fruit: dragged to a custom spot, the speech bubble flips to stay on screen */
#buddy.bd-moved { max-width: calc(100vw - 4px); }
#buddy.bd-right { flex-direction: row-reverse; }
#buddy.bd-right .bd-bubble { border-radius: 16px 16px 4px 16px; }
#buddy.bd-top { align-items: flex-start; }
#buddy.bd-top .bd-bubble { border-radius: 4px 16px 16px 16px; }
#buddy.bd-top.bd-right .bd-bubble { border-radius: 16px 4px 16px 16px; }
.bd-duck { touch-action: none; cursor: grab; }

/* Fruit menu: every title button is the same width and height, in a calm colour */
.bd-bubble:has(.bd-item) { width: min(300px, calc(100vw - 120px)); }
.bd-btns:has(.bd-item) { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.bd-btn.bd-item { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; padding: 8px 14px; border-radius: 12px; background: #fff7e6; color: #3b2a10; border: 2px solid #f2d9a6; font-weight: 600; flex: none; }
.bd-btn.bd-item:hover, .bd-btn.bd-item:focus-visible { background: #ffeccb; }
.bd-btn.bd-item.bd-sub { background: #f1f3f6; border-color: #d9dee6; color: #3a4452; font-weight: 500; justify-content: center; }
.bd-bubble:has(.bd-item) { border-color: #f2d9a6; }

/* Transfers and badges */
.bdg { display: inline-block; background: #fff3d6; color: #6b4300; border: 1px solid #f2d9a6; border-radius: 999px; padding: 0 8px; font-size: .8em; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.bdg:empty { display: none; }
.bdg-toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 1000; background: #0d3349; color: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.35); text-align: center; transition: opacity .5s, transform .5s; max-width: 90vw; }
.bdg-toast.out { opacity: 0; transform: translateX(-50%) translateY(-12px); }
.bd-hero { text-align: center; }
.bd-big { font-size: 64px; line-height: 1.1; }
.bd-bar { height: 14px; border-radius: 999px; background: #e3eef6; overflow: hidden; margin: 8px 0; }
.bd-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb347, #ff8a1f); border-radius: 999px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 5px 0; }
.bd-on { background: #fff3d6; border-radius: 8px; padding-left: 6px; font-weight: 700; }
.bd-top { padding-left: 1.4em; margin: 0; }
.bd-top li { padding: 4px 0; }

/* Tours and examples: the text sits in a slim bar at the bottom, so the map and the pointing finger stay clear */
.bd-hide { display: none; }
#buddy.bd-dock { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; flex-direction: row !important; align-items: flex-end !important; max-width: 100vw; padding: 0 6px 6px; }
#buddy.bd-dock .bd-duck { transform: none; animation: none; }
#buddy.bd-dock .bd-duck svg { width: 54px; height: 54px; }
#buddy.bd-dock .bd-bubble { flex: 1; max-width: none; width: auto !important; border-radius: 14px; padding: 6px 10px 8px; font-size: 14px; max-height: 24vh; overflow-y: auto; position: relative; }
#buddy.bd-dock .bd-text { margin: 0 0 6px; padding-right: 74px; }
#buddy.bd-dock .bd-hide { display: block; position: absolute; top: 4px; right: 6px; border: 0; background: #eef2f7; color: #345; border-radius: 999px; padding: 2px 9px; font-size: 12px; cursor: pointer; }
#buddy.bd-dock .bd-btn { padding: 5px 10px; font-size: 13px; }
#buddy.bd-dock.bd-textoff .bd-text { display: none; }
#buddy.bd-dock .bd-btns { flex-direction: row !important; }

/* keep the app's grey hint above the tour text bar */
body:has(#buddy.bd-dock:not([hidden])) .afo-toast { bottom: calc(24vh + 14px); }

/* Thumbs bar under every page */
.fb-bar { max-width: 760px; margin: 14px auto 90px; padding: 10px 14px; border: 2px dashed var(--sky-l, #cfe3f1); border-radius: 14px; text-align: center; font-size: .95rem; }
.fb-bar:empty { display: none; }
.fb-btn { font-size: 1.6rem; line-height: 1; border: 2px solid #cfe3f1; background: #fff; border-radius: 999px; padding: 6px 14px; margin: 0 4px; cursor: pointer; }
.fb-btn:hover, .fb-btn:focus-visible { background: #fff3d6; border-color: #f2d9a6; }
.fb-form { margin-top: 8px; text-align: left; }
/* ASL */
.sign-btn { border: 0; border-radius: 999px; padding: 6px 12px; background: #fff3d6; color: #5a3b00; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.sign-btn[hidden] { display: none; }
.sg-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.sg-box { background: #fff; color: #123; border-radius: 16px; padding: 12px; width: min(560px, 100%); max-height: 94vh; overflow: auto; }
.sg-box video, .sg-box iframe { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; }
.sg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.sg-f input { display: block; width: 100%; margin: 6px 0; }

/* News: weather/road icon filter */
.road-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.road-tab { display: inline-flex; align-items: center; gap: 4px; border: 2px solid #cfe3f1; background: #fff; border-radius: 999px; padding: 5px 10px; font-size: .9rem; cursor: pointer; color: #0b4a6e; }
.road-tab .rt-i { font-size: 1.2rem; line-height: 1; }
.road-tab .rt-n { background: #e6f2f9; border-radius: 999px; padding: 0 7px; font-size: .78rem; font-weight: 700; }
.road-tab.on { background: #0b4a6e; border-color: #0b4a6e; color: #fff; }
.road-tab.on .rt-n { background: rgba(255,255,255,.25); color: #fff; }
.road-tab.empty:not(.on) { opacity: .45; filter: grayscale(1); }
@media (max-width: 520px) { .road-tab .rt-l { display: none; } .road-tab { padding: 6px 12px; } }
.road-when { display: inline-block; background: #eef6fb; color: #0b4a6e; border-radius: 6px; padding: 0 6px; font-size: .78rem; font-weight: 700; margin-right: 4px; white-space: nowrap; }
.road-foot { margin-top: 12px; border-top: 1px solid #d9eaf3; padding-top: 8px; }

.road-review { margin: 6px 0; padding: 6px 8px; background: #fff3d6; border-radius: 8px; font-size: .88rem; }
.road-review .chip-btn { margin: 4px 4px 0 0; }

/* Field Alert */
.fa-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.fa-cap { flex: 1 1 140px; text-align: center; font-size: 1.15rem; cursor: pointer; }
.fa-media { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: #000; margin: 8px 0; }
.fa-new textarea { width: 100%; margin: 6px 0; }
.fa-h { margin: 18px 0 8px; }
.fa-new-card { border-color: #e54646; box-shadow: 0 0 0 3px rgba(229, 70, 70, .25); }
.fa-wait { color: #b10f0f; font-weight: 700; }
.fa-toast { opacity: 1; background: #c62828; font-size: 1rem; }

/* Share a Ride */
.rd-card.rd-open { border-color: #7ccf9a; }
.rd-card.rd-booked { border-color: #4a9ad8; }
.rd-card.rd-done { opacity: .85; }
.rd-card.rd-noshow, .rd-card.rd-cancelled { opacity: .65; }
.rd-note { margin-top: 14px; }
#rd-form label { display: block; margin: 8px 0; font-weight: 600; }
#rd-form input, #rd-form textarea { display: block; width: 100%; margin-top: 4px; }

/* Classifieds */
.cl-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.cl-photos img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 2px solid #cfe3f1; }
.cl-pv { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.cl-gone { opacity: .6; }
.cl-price { font-size: 1.1rem; color: #0b6b3a; }
.cl-ints { background: #eef9f1; border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.cl-rep { color: #b10f0f; }
.cl-filter { margin-bottom: 8px; }
.cl-filter select, .cl-filter input { margin: 4px 4px 4px 0; }
.cl-note { margin-top: 14px; }
#cl-form label { display: block; margin: 8px 0; font-weight: 600; }
#cl-form input:not([type=checkbox]):not([type=radio]):not([type=file]), #cl-form textarea, #cl-form select { display: block; width: 100%; margin-top: 4px; }
#cl-form .cl-inline { font-weight: 400; }
#cl-types .road-tab { cursor: pointer; }

/* Home: Field Alert, Emergency and Daily in one row */
.tiles.tiles3 { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.tiles.tiles3 .tile { min-height: 4.2rem; padding: .4rem .2rem; font-size: .85rem; line-height: 1.15; }
.tiles.tiles3 .tile .em { font-size: 1.5rem; }
.tbadge { display: inline-block; background: #d32f2f; color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; }

/* Read aloud */
.tts-btn { border: 0; border-radius: 999px; padding: 6px 10px; background: #e6f2f9; color: #0b4a6e; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.tts-btn[aria-pressed="true"] { background: #ffe0e0; color: #8a1010; }
.tts-rate { border: 0; border-radius: 999px; padding: 6px 8px; background: transparent; color: #0b4a6e; font-size: .72rem; font-weight: 700; cursor: pointer; }
@media (max-width: 520px) { .tts-btn span { display: none; } .tts-rate { display: none; } }

/* Reminder */
.rem-banner { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 6000; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #c62828; color: #fff; font-size: 1.1rem; box-shadow: 0 6px 24px rgba(0,0,0,.35); animation: rem-flash 1s steps(1) infinite; }
.rem-banner button { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 1.1rem; background: #fff; color: #c62828; cursor: pointer; }
@keyframes rem-flash { 50% { background: #e53935; } }
.rem-dt { display: flex; gap: 10px; flex-wrap: wrap; }
.rem-dt label { flex: 1 1 8rem; font-weight: 600; }
.rem-dt input { display: block; width: 100%; margin-top: 4px; font-size: 1.1rem; }
.rem-switch { font-size: 1.2rem; }
.rem-switch input { width: 1.4rem; height: 1.4rem; vertical-align: middle; }
.dl-ov { position: fixed; inset: 0; z-index: 5900; background: #0b1b2b; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.dl-ov .dl-ico { font-size: 4rem; } .dl-ov h1 { font-size: 2.2rem; margin: 8px 0; } .dl-ov p { font-size: 1.15rem; opacity: .9; } .dl-ov .dl-s { opacity: .6; font-size: 1rem; } .dl-ov button { margin-top: 14px; border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 800; font-size: 1.1rem; background: #fff; color: #0b1b2b; cursor: pointer; }
.rem-bigbtn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 16px; font-size: 1.2rem; font-weight: 800; background: #2e7d32; color: #fff; cursor: pointer; margin-bottom: 8px; }
.rem-set { background: #e8f5e9; color: #1b5e20; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; line-height: 1.5; }
@media (prefers-color-scheme: dark) { .rem-set { background: #1b3a1e; color: #c8e6c9; } }
.wh-today { border: 2px solid #2e7d32; } .wh-sum { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .wh-sum b { font-size: 1.3rem; } .wh-tot { font-size: 1.3rem; margin: 8px 0; }
fieldset.wh-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.sg-ack { color: #1b5e20; font-weight: 700; }
.sg-log { margin: 4px 0; border-bottom: 1px solid #0002; padding-bottom: 4px; }

.tour-pill { margin-left: auto; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: .95rem; background: #ffd9a8; color: #5a2d00; cursor: pointer; white-space: nowrap; }
html[data-season="eid"] #buddy .bd-duck::before { content: '🌙'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="hanukkah"] #buddy .bd-duck::before { content: '🕎'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="lunar"] #buddy .bd-duck::before { content: '🏮'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="dragonboat"] #buddy .bd-duck::before { content: '🐉'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="midautumn"] #buddy .bd-duck::before { content: '🥮'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="kwanzaa"] #buddy .bd-duck::before { content: '🕯️'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="easter"] #buddy .bd-duck::before { content: '🐣'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="passover"] #buddy .bd-duck::before { content: '🫓'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="nowruz"] #buddy .bd-duck::before { content: '🌷'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="blackhistory"] #buddy .bd-duck::before { content: '✊🏿'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="eid"] #buddy .bd-duck::before { content: '🌙'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="hanukkah"] #buddy .bd-duck::before { content: '🕎'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="lunar"] #buddy .bd-duck::before { content: '🏮'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="kwanzaa"] #buddy .bd-duck::before { content: '🕯️'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="easter"] #buddy .bd-duck::before { content: '🐣'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="passover"] #buddy .bd-duck::before { content: '🫓'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="nowruz"] #buddy .bd-duck::before { content: '🌷'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
html[data-season="blackhistory"] #buddy .bd-duck::before { content: '✊🏿'; font-size: 30px; line-height: 1; top: -16px; background: none; width: 40px; margin-left: -20px; text-align: center; }
.ev-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; font-size: 1.7rem; margin: .2rem 0 .6rem; }

.gm-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: .6rem 0; }
.gm-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 0; border-radius: 16px; padding: 14px; background: #ffe7c7; color: #3b2300; cursor: pointer; font: inherit; }
.gm-card:nth-child(2n) { background: #d9ecff; color: #0b2a4a; } .gm-card:nth-child(3n) { background: #dff7e4; color: #0d3a1c; }
.gm-ico { font-size: 2rem; }
.gm-wrap canvas { width: 100%; max-width: 360px; height: auto; display: block; margin: 8px auto; border-radius: 12px; background: #0b1b2b; touch-action: none; }
.gm-pad { display: flex; justify-content: center; gap: 12px; margin: 6px 0; }
.gm-pad button { min-width: 72px; min-height: 56px; font-size: 1.6rem; border: 0; border-radius: 14px; background: #ffd9a8; color: #5a2d00; touch-action: none; user-select: none; }

.ann-banner { position: fixed; left: 10px; right: 10px; top: 70px; z-index: 9000; display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #fff4d6; color: #3b2300; border: 2px solid #f0b445; border-radius: 16px; padding: 12px 14px; box-shadow: 0 6px 20px #0004; font-size: 1.05rem; }
.ann-banner button { border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 800; background: #3b2300; color: #fff; min-height: 44px; cursor: pointer; }
.an-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
/* games: smaller picker tiles so all fit, playing cards */
.gm-list { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gm-card { align-items: center; text-align: center; padding: 8px 4px; border-radius: 14px; gap: 2px; }
.gm-card .gm-ico { font-size: 1.5rem; } .gm-card b { font-size: .78rem; line-height: 1.1; } .gm-card .muted { display: none; } .gm-card .tiny { font-size: .65rem; }
.pcards { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pc { width: 54px; height: 76px; border-radius: 8px; background: #fff; border: 2px solid #2b2b2b; color: #222; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.pc.r { color: #d32f2f; } .pc.back { background: repeating-linear-gradient(45deg, #2b5fa8, #2b5fa8 6px, #1d4580 6px, #1d4580 12px); border-color: #fff; box-shadow: 0 0 0 2px #1d4580; }
.pmem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; margin: 8px 0; }
.pmc { border: 0; background: none; padding: 0; cursor: pointer; } .pmc.ok { opacity: .45; } .pmc .pc { width: 62px; height: 88px; }
.gm-chips { font-size: 1.05rem; margin: 4px 0; }
@media (max-width: 380px) { .gm-list { grid-template-columns: repeat(3, 1fr); } }

/* numbers: the same number on a menu line and on its Home tile */
.mnum { font-size: .7rem; font-weight: 700; color: #000; min-width: 1.3em; text-align: right; }
.tile { position: relative; }
.tnum { position: absolute; left: 8px; top: 6px; font-size: .7rem; font-weight: 700; color: #000; line-height: 1; }
.menu-group .mnum { margin-right: .35rem; }
/* posts */
.po-row { display: flex; gap: 12px; align-items: flex-start; }
.po-th { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: #eef3f8; flex: none; }
.po-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.8rem; line-height: 1.1; }
.po-main { min-width: 0; flex: 1; } .po-main h3 { margin: 0 0 2px; }
.po-ov { position: fixed; inset: 0; z-index: 9500; background: #000d; display: flex; flex-direction: column; }
.po-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; background: #fff; }
.po-img { flex: 1; overflow: auto; text-align: center; } .po-img img { max-width: 100%; height: auto; }

/* Daily Additional Work Sheet (Forms) */
.ws-sheet { background: #fff; border: 2px solid #000; max-width: 560px; margin: 0 auto 12px; font-family: Georgia, 'Times New Roman', serif; color: #000; }
.ws-top { padding: 14px 10px; text-align: right; } .ws-co { font-style: italic; font-size: 1rem; color: #333; }
.ws-title { font: 700 1.35rem Arial, sans-serif; text-align: center; padding: 10px; border-top: 3px double #000; border-bottom: 3px double #000; }
.ws-t { border-collapse: collapse; width: 100%; } .ws-t td { border: 2px solid #000; padding: 4px 6px; vertical-align: top; font-size: .8rem; font-weight: 700; }
.ws-t td.w36 { width: 36%; } .ws-t td.w40 { width: 40%; } .ws-t td.w14 { width: 14%; } .ws-t td.w26 { width: 26%; }
.ws-c { text-align: center; vertical-align: middle !important; } .ws-sm { font-size: .65rem !important; text-align: center; vertical-align: middle !important; } .ws-sec { text-align: center; font-size: .75rem !important; }
.ws-fill { height: 52px; } .ws-l { display: block; }
.ws-sheet input, .ws-sheet textarea { display: block; width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px dashed #6a8aa8; background: #f4faff; font: 600 1rem system-ui, sans-serif; margin-top: 4px; padding: 4px; }
.ws-sheet > p { padding: 0 10px; }
.ws-dec { border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: #eef8f0; border: 1px solid #9ccfa8; } .ws-dec.partly { background: #fff4e0; border-color: #e6b86a; } .ws-dec.denied { background: #fdeaea; border-color: #e19a9a; }
.ws-appr { margin-top: 8px; display: grid; gap: 6px; }
.wh-extra h3 { margin-top: 0; }
.ws-sheet, .ws-sheet td, .ws-sheet input, .ws-sheet textarea { letter-spacing: 0; word-spacing: 0; }
.ws-t td { font-size: .74rem; padding: 4px 5px; } .ws-t td.w36 { width: 32%; } .ws-t td.w14 { width: 17%; } .ws-t td.w26 { width: 24%; }

.news-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #eaf5fb; font-size: 1rem; margin-right: .25rem; vertical-align: middle; }

a.ev-link { text-decoration: none; color: inherit; }

.road-th { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid #cfe0ec; background: #eef3f8; display: block; }
.road-list .road-ico { flex: none; min-width: 1.6rem; display: inline-flex; align-items: flex-start; justify-content: center; }
.news-th { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid #cfe0ec; vertical-align: middle; margin-right: .3rem; }
