/* two Taxi — shared styles. Tokens follow the Claude Design boards. */
:root {
  --bg: #ecedef;
  --sheet: #ffffff;
  --raised: #f2f3f5;
  --line: #e6e7ea;
  --text: #14172e;
  --muted: #5e6370;
  --btn: #1b2152;
  --on-btn: #ffffff;
  --accent: #725f9e;
  --cream: #f6e0a2;
  --good: #1e8a4c;
  --warn: #d9822b;
  --bad: #c62f3e;
  --shadow: 0 -4px 24px rgba(20, 23, 46, 0.1);
  --card-shadow: 0 2px 12px rgba(20, 23, 46, 0.08);
  --dim: rgba(20, 23, 46, 0.35);
  --r: 14px;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme='night'] {
  --bg: #16181d;
  --sheet: #1a1c21;
  --raised: #24272e;
  --line: #2c3038;
  --text: #f2f3f5;
  --muted: #9ba1ac;
  --btn: #f6e0a2;
  --on-btn: #14172e;
  --accent: #b6a6e6;
  --good: #5bd18b;
  --warn: #f0a650;
  --bad: #ff6b78;
  --shadow: 0 -6px 30px rgba(0, 0, 0, 0.45);
  --card-shadow: none;
  --dim: rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
/* iPhone: follow the phone's text size (Dynamic Type). Android does it through <meta name="text-scale">.
   A size picked in the app's menu is set inline and wins over this. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  html {
    font: -apple-system-body;
  }
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.015em;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 3.5rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active {
  transform: scale(0.985);
}
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}
.btn.big {
  min-height: 4rem;
  font-size: 1.3rem;
}
.btn.soft {
  background: var(--raised);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  min-height: 3rem;
  font-size: 1rem;
  font-weight: 600;
}
.btn.danger {
  background: transparent;
  color: var(--bad);
  min-height: 3rem;
  font-size: 1rem;
  font-weight: 600;
}
.btn.good {
  background: var(--good);
  color: #fff;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 50%;
  background: var(--sheet);
  color: var(--text);
  box-shadow: var(--card-shadow);
  flex: none;
}
.icon-btn svg {
  width: 1.3rem;
  height: 1.3rem;
}

/* Inputs */
.field {
  display: block;
  margin: 0 0 12px;
}
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.input {
  width: 100%;
  min-height: 3.3rem;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--sheet);
  font-size: 1.1rem;
  outline: none;
}
.input:focus {
  border-color: var(--accent);
}
textarea.input {
  padding: 12px 14px;
  min-height: 5rem;
  resize: vertical;
}

/* Chips & segmented controls */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 2.5rem;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 0.95rem;
  font-weight: 600;
}
.chip[aria-pressed='true'],
.chip.on {
  border-color: var(--text);
  background: var(--text);
  color: var(--sheet);
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--raised);
}
.seg button {
  min-height: 2.9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 600;
  color: var(--muted);
}
.seg button[aria-pressed='true'] {
  background: var(--sheet);
  color: var(--text);
  box-shadow: var(--card-shadow);
}

/* Lists */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 3.6rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row .grow {
  flex: 1;
  min-width: 0;
}
.row .t {
  font-weight: 600;
}
.row .s {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

/* Map */
.map {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 0;
}
.leaflet-container {
  font-family: var(--font) !important;
  background: var(--bg) !important;
}
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(255, 255, 255, 0.7) !important;
}
/* Folded to a small „i“ until tapped; the OpenStreetMap credit must stay reachable (ODbL). */
.leaflet-control-attribution:not(.open) {
  width: 16px;
  height: 16px;
  padding: 0 !important;
  margin: 0 4px 4px 0 !important;
  border-radius: 50%;
  overflow: hidden;
  font-size: 0 !important;
  opacity: 0.55;
  cursor: pointer;
  position: relative;
}
.leaflet-control-attribution:not(.open)::before {
  content: 'i';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic 700 11px/1 Georgia, serif;
  color: #333;
}
:root[data-theme='night'] .leaflet-control-attribution:not(.open)::before {
  color: #ddd;
}
.leaflet-control-attribution.open {
  max-width: calc(100vw - 24px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root[data-theme='night'] .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #aaa !important;
}
:root[data-theme='night'] .leaflet-control-attribution a {
  color: #ccc !important;
}
:root[data-theme='night'] .leaflet-popup-content-wrapper,
:root[data-theme='night'] .leaflet-popup-tip {
  background: var(--sheet);
  color: var(--text);
}
/* The base map a little more contrasty than stock, which looked too soft (David, 2026-10-28). */
.map-contrast .leaflet-tile-pane {
  filter: contrast(1.12) saturate(1.1);
}
:root[data-theme='night']:not([data-mapday]) .osm-tiles {
  filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.85) saturate(0.6);
}
.leaflet-control-zoom {
  display: none;
}

/* Bottom sheet */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  max-height: 88%;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  background: var(--sheet);
  box-shadow: var(--shadow);
  padding: 16px 16px calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom)));
}
.sheet .grab {
  width: 40px;
  height: 5px;
  margin: -6px auto 10px;
  border-radius: 3px;
  background: var(--line);
}

/* Toast */
#t2-toast {
  position: fixed;
  left: 50%;
  top: calc(72px + var(--safe-area-inset-top, env(safe-area-inset-top)));
  text-align: center;
  z-index: 9999;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--sheet);
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
#t2-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#t2-toast.bad {
  background: var(--bad);
  color: #fff;
}

/* Full-screen panels (menus, lists) */
.panel {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  animation: slide 0.2s ease;
}
@keyframes slide {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}
.panel header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + var(--safe-area-inset-top, env(safe-area-inset-top))) 12px 10px;
  border-bottom: 1px solid var(--line);
}
.panel header h2 {
  flex: 1;
  font-size: 1.25rem;
}
.panel .body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px calc(24px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom)));
}

.offline-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 950;
  padding: calc(6px + var(--safe-area-inset-top, env(safe-area-inset-top))) 12px 6px;
  background: var(--warn);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* In-app confirmation */
.t2-ask { position: fixed; inset: 0; z-index: 9990; display: flex; align-items: flex-end; justify-content: center; background: var(--dim); padding: 16px; }
.t2-ask-box { width: 100%; max-width: 420px; background: var(--sheet); border-radius: 20px; padding: 20px 16px calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); display: grid; gap: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.3); animation: slide .2s ease; }
.t2-ask-box p { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; text-align: center; }
.t2-ask-note { margin: -2px 0 6px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 600; text-align: center; line-height: 1.3; }
/* A yes/no question with optional reasons (driver: give the order back; passenger: cancel). */
.relask { max-width: 560px; }
.rel-l { font-size: .95rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.rel-why { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rel-c { min-height: 2.5rem; padding: 5px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.15; cursor: pointer; }
.rel-c[aria-pressed='true'] { border-color: #725f9e; color: inherit; background: color-mix(in srgb, #725f9e 16%, transparent); }
.rel-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.rel-main .btn { min-height: 3.6rem; font-size: 1.15rem; font-weight: 800; color: #fff; }
/* David 2026-10-28: „Да, откажи“ is GREEN (go ahead), „Не“ is neutral grey — no red here. */
.rel-yes { background: #1e8e4e; } .rel-no { background: #6b7280; }
/* low screens (phone on its side): tighter, so the whole question fits without scrolling */
@media (max-height: 420px) {
  .relask { padding-top: 10px; padding-bottom: 10px; gap: 6px; }
  .relask p { margin-bottom: 0; font-size: 1.05rem; }
  .relask .t2-ask-note { margin: 0; padding: 6px 10px; font-size: .9rem; }
  .relask .rel-l { display: none; }
  .rel-c { min-height: 2.1rem; padding: 3px 8px; font-size: .85rem; }
  .rel-main { margin-top: 2px; } .rel-main .btn { min-height: 3rem; }
}
.t2-info { margin: 0 0 12px; font-size: 1.5rem; font-weight: 800; line-height: 1.4; text-align: center; word-spacing: .15em; font-variant-numeric: tabular-nums; }
.btn.danger-fill { background: var(--bad); color: #fff; }
.btn.go-fill { background: #1e8e4e; color: #fff; }
@media (min-width: 700px) { .t2-ask { align-items: center; } }

/* ---- in-app call screen ---- */
.callscreen { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; justify-content: space-between; padding: calc(56px + var(--safe-area-inset-top, env(safe-area-inset-top))) 24px calc(40px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom))); background: #14172e; color: #fff; text-align: center; }
.callscreen .who { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.callscreen .cav { width: 96px; height: 96px; border-radius: 50%; background: #725f9e; display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; }
.callscreen .cname { font-size: 1.8rem; font-weight: 700; }
.callscreen .cstate { font-size: 1.15rem; color: #c9cce0; font-variant-numeric: tabular-nums; }
.callscreen .cnote { font-size: .85rem; color: #8b90b0; }
.callscreen .cbtns { display: flex; justify-content: center; gap: 40px; }
.callscreen .cbtn { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: #fff; font: inherit; font-size: .95rem; cursor: pointer; }
.callscreen .cbtn svg { width: 76px; height: 76px; padding: 20px; border-radius: 50%; box-sizing: border-box; }
.callscreen .cbtn.yes svg { background: #1e8a4c; }
.callscreen .cbtn.no svg { background: #c62f3e; transform: rotate(135deg); }
.callscreen .cbtn.mute svg { background: rgba(255,255,255,.14); }
.callscreen .cbtn.mute.on svg { background: #fff; color: #14172e; }

/* Chat between the passenger and the driver (common.js T2.chat) */
.chat-btn { position: relative; }
.t2-chatbadge { position: absolute; top: -4px; right: -4px; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; box-sizing: border-box; border-radius: .65rem; background: #d32f2f; color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3rem; text-align: center; box-shadow: 0 0 0 2px var(--sheet); }
.t2-chatbadge[hidden] { display: none; }
.chatpop { position: fixed; z-index: 1900; top: calc(10px + var(--safe-area-inset-top, env(safe-area-inset-top))); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: #1b2152; color: #fff; font: inherit; font-size: 1rem; text-align: left; box-shadow: 0 8px 30px rgba(0,0,0,.35); cursor: pointer; animation: chatpop .25s ease-out; }
.chatpop svg { flex: none; width: 1.6rem; height: 1.6rem; color: #f6e0a2; }
.chatpop .cp-t { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.chatpop .cp-go { flex: none; padding: 6px 12px; border-radius: 999px; background: #f6e0a2; color: #1b2152; font-weight: 700; font-size: .9rem; }
@keyframes chatpop { from { transform: translate(-50%, -30px); opacity: 0; } }
.chatscreen { position: fixed; z-index: 1800; left: 0; right: 0; top: 0; height: 100%; display: flex; justify-content: center; background: var(--dim); }
.chatscreen .ch-box { width: 100%; max-width: 640px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; background: var(--bg); color: var(--text); padding: var(--safe-area-inset-top, env(safe-area-inset-top)) 0 var(--safe-area-inset-bottom, env(safe-area-inset-bottom)); }
.chatscreen .ch-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; background: var(--sheet); border-bottom: 1px solid var(--line); }
.chatscreen .ch-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatscreen .ch-x { flex: none; width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: #d32f2f; color: #fff; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.chatscreen .ch-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.chatscreen .ch-empty { margin: auto; max-width: 22rem; text-align: center; color: var(--muted); }
.chatscreen .cb { max-width: 82%; padding: 9px 12px 6px; border-radius: 16px; overflow-wrap: anywhere; }
.chatscreen .cb.them { align-self: flex-start; background: var(--sheet); border-bottom-left-radius: 4px; box-shadow: var(--card-shadow); }
.chatscreen .cb.me { align-self: flex-end; background: var(--btn); color: var(--on-btn); border-bottom-right-radius: 4px; }
.chatscreen .cb-t { font-size: 1.02rem; line-height: 1.35; white-space: pre-wrap; }
.chatscreen .cb-who { font-size: .78rem; font-weight: 700; opacity: .75; margin-bottom: 1px; }
.chatscreen .cb.them.parent { background: color-mix(in srgb, #f6e0a2 45%, var(--sheet)); }
.chatscreen .cb-at { margin-top: 2px; font-size: .72rem; opacity: .65; text-align: right; }
.chatscreen .ch-seen { align-self: flex-end; font-size: .78rem; color: var(--muted); margin-top: -4px; }
.chatscreen .ch-quick { flex: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; max-height: 32vh; overflow-y: auto; border-top: 1px solid var(--line); background: var(--sheet); }
.chatscreen .ch-quick:empty { display: none; }
.chatscreen .ch-q { max-width: 100%; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--raised); color: var(--text); font: inherit; font-size: .95rem; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.chatscreen .ch-form { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 10px; background: var(--sheet); }
.chatscreen textarea { flex: 1; min-width: 0; min-height: 2.9rem; max-height: 120px; box-sizing: border-box; resize: none; overflow-y: hidden; scrollbar-width: thin; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; line-height: 1.3; }
.chatscreen .ch-send { flex: none; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: #725f9e; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(114, 95, 158, .4); }
.lostscreen .lost-ride { flex: none; padding: 8px 16px; font-size: .9rem; color: var(--muted); background: var(--sheet); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.lostscreen .lost-ride:empty { display: none; }
.lostscreen .lost-case { flex: none; max-height: 62%; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; background: var(--sheet); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.lostscreen .lost-case:empty { display: none; }
.lostscreen .lsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.lostscreen .lsteps > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .78rem; text-align: center; color: var(--muted); }
.lostscreen .lsteps span { overflow-wrap: anywhere; }
.lostscreen .lsteps i { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.lostscreen .lsteps .done i { background: #2e9e5b; } .lostscreen .lsteps .done { color: var(--text); }
.lostscreen .lsteps .now i { background: #1b6ef3; } .lostscreen .lsteps .now { color: var(--text); font-weight: 800; }
.lostscreen .lsteps .bad i { background: #d32f2f; }
.lostscreen .litem { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.lostscreen .litem img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.lostscreen .litem span { min-width: 0; }
.lostscreen .lnow { display: grid; gap: 8px; }
.lostscreen .lnow p { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lostscreen .lbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.lostscreen .lbtns .btn { flex: 1 1 9rem; min-width: 0; min-height: 3rem; margin: 0; white-space: normal; overflow-wrap: anywhere; flex-direction: column; justify-content: center; gap: 0; line-height: 1.2; }
.lostscreen.lformopen .ch-list { display: none; }
.lostscreen.lformopen .lost-case { flex: 1 1 auto; max-height: none; align-content: start; }
.lostscreen .ch-form[hidden] { display: none; }
.lostscreen .lbtns.col { flex-direction: column; }
.lostscreen .lbtns.col .btn { flex: none; width: 100%; }
.lostscreen .btn.go { background: #2e9e5b; color: #fff; border-color: #2e9e5b; }
.lostscreen .lwait { padding: 10px 12px; border-radius: 12px; background: var(--raised, var(--bg)); color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.lostscreen .lplan { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #1b6ef3; overflow-wrap: anywhere; }
.lostscreen .lform label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); font-weight: 600; min-width: 0; }
.lostscreen .lform .input { width: 100%; min-width: 0; box-sizing: border-box; }
.lostscreen .lform .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lostscreen .lform .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.lostscreen .lphoto { display: flex !important; grid-auto-flow: column; align-items: center; gap: 10px; padding: 8px 12px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; color: var(--text) !important; }
.lostscreen .lphoto svg { width: 1.8rem; height: 1.8rem; flex: none; }
.lostscreen .lphoto img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.lostscreen .lnote { margin: 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.lostscreen .ch-empty .lnote { margin-top: 10px; }
.lostscreen .lwarn { margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #ffd54f 30%, var(--sheet)); font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.lostscreen .lsub { display: block; font-size: .82rem; font-weight: 600; opacity: .85; margin-top: 2px; }
.lostscreen .lplan small { color: var(--muted); }
.lostscreen .ltipline { font-weight: 700; color: #2e7d32; }
.lostscreen .ltip { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.lostscreen .lpts { display: flex; flex-wrap: wrap; gap: 6px; }
.lostscreen .lpts .chip { display: flex; flex-direction: column; align-items: flex-start; min-height: 2.6rem; height: auto; padding: 6px 12px; max-width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.lostscreen .lpts .chip small { font-weight: 400; font-size: .8rem; opacity: .8; }
.lostscreen .loffice { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--raised, var(--bg)); overflow-wrap: anywhere; }
.lostscreen .lstep { align-self: center; max-width: 92%; padding: 5px 12px; border-radius: 999px; background: var(--raised, var(--sheet)); color: var(--muted); font-size: .85rem; text-align: center; overflow-wrap: anywhere; }
.lostscreen .lstep small { margin-left: 6px; opacity: .75; }
.chatscreen .cb.them.admin { background: color-mix(in srgb, #c9cff5 45%, var(--sheet)); }
html[data-app='driver'] .chatscreen.lostscreen .ch-box { display: flex; }
.lostscreen .lost-done { padding: 10px 4px; text-align: center; color: var(--muted); font-weight: 600; }
.chatscreen .ch-send svg { width: 1.3rem; height: 1.3rem; }
/* The driver: bigger text and buttons; on a tablet lying down the ready answers sit in a column on the right. */
html[data-app='driver'] .chatscreen .ch-box { max-width: 900px; }
html[data-app='driver'] .chatscreen .cb-t { font-size: 1.3rem; }
html[data-app='driver'] .chatscreen .ch-title { font-size: 1.3rem; }
/* rounded corners (not a pill), so ready answers on two or more lines stay inside their frame */
html[data-app='driver'] .chatscreen .ch-q { padding: 12px 18px; border-radius: 20px; font-size: 1.15rem; font-weight: 600; }
html[data-app='driver'] .chatpop { font-size: 1.2rem; padding: 16px 18px; }
@media (orientation: landscape) and (min-width: 700px) {
  html[data-app='driver'] .chatscreen .ch-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 34%); grid-template-rows: auto minmax(0, 1fr) auto; }
  html[data-app='driver'] .chatscreen .ch-head { grid-column: 1 / -1; }
  html[data-app='driver'] .chatscreen .ch-list { grid-column: 1; grid-row: 2; }
  html[data-app='driver'] .chatscreen .ch-form { grid-column: 1; grid-row: 3; }
  html[data-app='driver'] .chatscreen .ch-quick { grid-column: 2; grid-row: 2 / 4; max-height: none; flex-direction: column; flex-wrap: nowrap; align-content: stretch; border-top: 0; border-left: 1px solid var(--line); }
  html[data-app='driver'] .chatscreen .ch-q { width: 100%; text-align: center; }
}

/* The bell: always next to the menu; red number for the unread ones. */
.t2-bell { position: relative; }
.t2-bell[hidden] { display: none; }
.t2-bellbadge { position: absolute; top: -4px; right: -4px; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; box-sizing: border-box; border-radius: .65rem; background: #d32f2f; color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3rem; text-align: center; box-shadow: 0 0 0 2px var(--sheet); }
.t2-bellbadge[hidden] { display: none; }
.bellscreen { position: fixed; z-index: 1850; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); box-sizing: border-box; background: var(--dim); }
.bellscreen .bl-card { width: 100%; max-width: 520px; max-height: 100%; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 18px; background: var(--sheet); color: var(--text); box-shadow: 0 10px 40px rgba(0,0,0,.3); overflow: hidden; }
.bellscreen .bl-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); }
.bellscreen .bl-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bellscreen .bl-x { flex: none; width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: var(--raised, rgba(0,0,0,.06)); color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.bellscreen .bl-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
.bellscreen .bl-item { width: 100%; box-sizing: border-box; display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; position: relative; }
.bellscreen button.bl-item { cursor: pointer; }
.bellscreen .bl-item + .bl-item { border-top: 1px solid var(--line); }
.bellscreen .bl-item > svg { flex: none; width: 1.6rem; height: 1.6rem; margin-top: 2px; color: var(--muted); }
.bellscreen .bl-item.office > svg { color: #d32f2f; }
.bellscreen .bl-item.new::after { content: ''; position: absolute; top: 10px; left: 8px; width: 10px; height: 10px; border-radius: 50%; background: #d32f2f; }
.bellscreen .bl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 14px; }
.bellscreen .bl-text { overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bellscreen .bl-text.full { display: block; white-space: pre-wrap; }
.bellscreen .bl-at { font-size: .85rem; color: var(--muted); }
.bellscreen .bl-item { flex-wrap: wrap; }
.bellscreen .bl-item .bl-body { flex: 1 1 9rem; }
.bellscreen .bl-acts { flex: none; align-self: center; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bellscreen .bl-ico { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: 12px; cursor: pointer; }
.bellscreen .bl-ico svg { width: 1.2rem; height: 1.2rem; }
.bellscreen .bl-ico.i { background: #e3edff; color: #2f6fe0; }
.bellscreen .bl-ico.p { background: #ece6f7; color: #725f9e; }
.bellscreen .bl-ico.g { background: #d9f2e3; color: #13703c; }
:root[data-theme='night'] .bellscreen .bl-ico.i { background: #22324f; color: #8fb4ff; }
:root[data-theme='night'] .bellscreen .bl-ico.p { background: #33294a; color: #c9b6f2; }
:root[data-theme='night'] .bellscreen .bl-ico.g { background: #1d3a2a; color: #7fdca4; }
.bellscreen .bl-detail .bl-acts { margin-left: 0; }
.bellscreen .bl-detail { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 14px; }
.bellscreen .bl-back { align-self: flex-start; min-height: 2.4rem; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: none; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.bellscreen .bl-dh { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.bellscreen .bl-dh svg { flex: none; width: 1.6rem; height: 1.6rem; color: var(--muted); }
.bellscreen .bl-detail.office .bl-dh svg { color: #d32f2f; }
.bellscreen .bl-dtext { font-size: 1.15rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bellscreen .bl-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
/* A message from the office: red window in the middle until „Разбрах“. */
.pushstrip { position: fixed; z-index: 2600; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; max-width: 520px; margin: 0 auto; box-sizing: border-box; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 0; border-radius: 16px; background: #15171a; color: #fff; font: inherit; text-align: left; box-shadow: 0 8px 30px rgba(0,0,0,.35); cursor: pointer; animation: noticepop .25s ease-out; }
.pushstrip > svg { flex: none; width: 1.4rem; height: 1.4rem; margin-top: 2px; }
.pushstrip .ps-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pushstrip .ps-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pushstrip .ps-seen { flex: none; width: 2.9rem; height: 2.9rem; align-self: center; display: grid; place-items: center; border: 0; border-radius: 12px; background: #1f9d55; color: #fff; cursor: pointer; }
.pushstrip .ps-seen svg { width: 1.5rem; height: 1.5rem; }
.pushstrip .ps-body span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; opacity: .9; font-size: .92em; }
.noticepop { position: fixed; z-index: 2000; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); box-sizing: border-box; background: rgba(0,0,0,.55); }
.noticepop .np-card { width: 100%; max-width: 520px; max-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 20px; background: #c62828; color: #fff; box-shadow: 0 12px 50px rgba(0,0,0,.45); overflow: hidden; animation: noticepop .25s ease-out; }
.noticepop .np-head { flex: none; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; min-width: 0; }
.noticepop .np-head svg { flex: none; width: 1.8rem; height: 1.8rem; }
.noticepop .np-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noticepop .np-text { flex: 0 1 auto; min-height: 0; overflow-y: auto; font-size: 1.45rem; font-weight: 700; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.noticepop .np-at { flex: none; font-size: .9rem; opacity: .85; }
.noticepop .np-ok { flex: none; min-height: 3.6rem; border: 0; border-radius: 14px; background: #fff; color: #c62828; font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; }
@keyframes noticepop { from { transform: scale(.92); opacity: 0; } }
