/* 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;
}
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;
}
: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;
}
.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 + 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(14px + env(safe-area-inset-top));
  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%, -140%);
  transition: transform 0.25s ease;
  pointer-events: none;
}
#t2-toast.show {
  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 + 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 + env(safe-area-inset-bottom));
}

.offline-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 950;
  padding: calc(6px + 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 + 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; }
.btn.danger-fill { background: var(--bad); color: #fff; }
@media (min-width: 700px) { .t2-ask { align-items: center; } }
