:root {
  color-scheme: dark;
  --brand-dark: #183222;
  --brand-mid: #3f6b47;
  --brand-light: #89a887;
  --brand-accent: #5b7e5d;
  --background: #0f1a12;
  --surface: #172019;
  --surface-2: #1f2f22;
  --outline: #3a5040;
  --text: #dde8d8;
  --text-muted: #9db89a;
  --nav-bg: #111a13;
  --nav-selected: #89a887;
  --nav-unselected: #3a5040;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top center, rgba(91, 126, 93, 0.18), transparent 34%),
    linear-gradient(180deg, #132017 0%, #0f1a12 100%);
  color: var(--text);
  font-family: "Segoe UI", "Roboto", system-ui, sans-serif;
}

body {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.auth-screen {
  min-height: var(--app-viewport-height, 100dvh);
  padding:
    max(28px, env(safe-area-inset-top))
    22px
    max(28px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  overflow: auto;
}

.auth-shell {
  width: min(100%, 360px);
  display: grid;
  gap: 28px;
  justify-items: center;
}

.auth-brand {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.auth-logo-tile {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(237, 233, 225, 0.03)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(237, 233, 225, 0.16);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-logo-tile img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.auth-brand__copy {
  display: grid;
  gap: 8px;
}

.auth-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0;
  color: var(--text-muted);
}

.auth-panel {
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(26, 38, 28, 0.95), rgba(17, 26, 19, 0.96));
  border: 1px solid rgba(137, 168, 135, 0.08);
  box-shadow: var(--shadow);
}

.auth-panel--status {
  padding: 20px;
}

.auth-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(12, 19, 13, 0.72);
}

.auth-segment__button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.auth-segment__button--active {
  background: rgba(63, 107, 71, 0.9);
  color: #eef6ea;
}

.auth-segment__button:disabled {
  cursor: default;
  opacity: 0.62;
}

.auth-method-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(137, 168, 135, 0.14);
  background: rgba(12, 19, 13, 0.46);
}

.auth-method-segment__button {
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-method-segment__button--active {
  background: rgba(72, 101, 74, 0.72);
  color: #eef6ea;
}

.auth-method-segment__button:disabled {
  cursor: default;
  opacity: 0.62;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-field {
  min-height: 58px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(16, 24, 18, 0.82);
}

.auth-field:focus-within {
  border-color: rgba(137, 168, 135, 0.38);
  box-shadow: 0 0 0 1px rgba(137, 168, 135, 0.12);
}

.auth-field__icon {
  display: grid;
  place-items: center;
  color: rgba(157, 184, 154, 0.76);
}

.auth-field__icon svg {
  width: 18px;
  height: 18px;
}

.auth-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.auth-input:disabled {
  cursor: default;
  opacity: 0.7;
}

.auth-input::placeholder {
  color: rgba(157, 184, 154, 0.54);
}

.auth-error {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(122, 31, 31, 0.18);
  border: 1px solid rgba(255, 129, 129, 0.16);
  color: #ffb8b8;
  font-size: 14px;
}

.auth-info {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(57, 103, 64, 0.2);
  border: 1px solid rgba(130, 185, 129, 0.2);
  color: #cce5c9;
  font-size: 14px;
  line-height: 1.4;
}

.auth-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-action-grid .auth-submit,
.auth-secondary {
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  line-height: 1.2;
}

.auth-secondary {
  border: 1px solid rgba(137, 168, 135, 0.28);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(25, 38, 27, 0.72);
  color: #dcebd8;
  font-weight: 600;
}

.auth-secondary:disabled {
  cursor: default;
  opacity: 0.58;
}

.auth-submit {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(180deg, #5d815e, #557454);
  color: #f5faf2;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(34, 58, 37, 0.28);
}

.auth-submit:disabled {
  cursor: default;
  opacity: 0.72;
}

.auth-note {
  margin: 2px 0 0;
  text-align: center;
  font-size: 13px;
  color: rgba(157, 184, 154, 0.72);
}

.auth-note--left {
  text-align: left;
}

.auth-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.auth-status__spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid rgba(137, 168, 135, 0.16);
  border-top-color: rgba(137, 168, 135, 0.92);
  animation: auth-spin 900ms linear infinite;
}

.auth-status__title {
  margin: 0 0 6px;
  font-size: 18px;
}

@keyframes auth-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  height: var(--app-viewport-height, 100dvh);
  min-height: var(--app-viewport-height, 100dvh);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding:
    max(10px, env(safe-area-inset-top))
    10px
    calc(98px + max(10px, env(safe-area-inset-bottom)))
    10px;
  overflow: hidden;
}

.app-shell--screen-chat {
  padding-top: max(4px, env(safe-area-inset-top));
  padding-left: 0;
  padding-right: 4px;
  padding-bottom: calc(94px + max(6px, env(safe-area-inset-bottom)));
}

.app-shell--screen-map {
  display: block;
  padding: 0;
}

.app-shell--screen-map .phone-frame,
.app-shell--screen-map .content-shell {
  height: var(--app-viewport-height, 100dvh);
}

.phone-frame {
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  border-radius: 24px;
  background: rgba(23, 32, 25, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.top-bar__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.top-bar__copy {
  min-width: 0;
}

.screen-title,
.section-title {
  margin: 0;
  line-height: 1.1;
}

.screen-title {
  font-size: clamp(20px, 2.6vw, 28px);
}

.screen-subtitle,
.section-subtitle,
.item-meta,
.surface-meta,
.stat-label,
.conversation-preview {
  color: var(--text-muted);
}

.screen-subtitle,
.section-subtitle,
.surface-meta,
.stat-label {
  margin: 2px 0 0;
  font-size: 13px;
}

.top-bar__actions,
.chip-row,
.conversation-head,
.surface-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill,
.chip,
.badge,
.drawer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
}

.pill {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(157, 184, 154, 0.14);
  background: rgba(17, 26, 19, 0.78);
}

.chip {
  padding: 8px 12px;
  background: rgba(31, 48, 35, 0.84);
  border: 1px solid rgba(137, 168, 135, 0.14);
  font-size: 14px;
}

.chip--selected {
  background: rgba(63, 107, 71, 0.9);
  color: white;
}

.badge {
  min-width: 30px;
  height: 30px;
  flex: none;
  justify-content: center;
  padding: 0 8px;
  background: rgba(137, 168, 135, 0.18);
  color: #ddf2d7;
  font-weight: 600;
  font-size: 13px;
}

.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #35d07f;
  box-shadow: 0 0 0 6px rgba(53, 208, 127, 0.16);
}

.content-shell {
  position: relative;
  min-height: 0;
  display: grid;
  height: 100%;
  overflow: hidden;
}

.content-card {
  min-height: 0;
  height: 100%;
  border-radius: 26px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  background: linear-gradient(180deg, rgba(31, 47, 34, 0.9), rgba(15, 26, 18, 0.95));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.content-card--screen-chat {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.content-card--screen-map {
  border: 0;
  border-radius: 0;
  background: #0f1a12;
  box-shadow: none;
}

.content-card--screen-map > .section {
  overflow: hidden;
}

.content-card > .section {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.screen-grid {
  display: grid;
  min-height: 0;
  height: 100%;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
}

.screen-grid--detail {
  grid-template-columns: clamp(216px, 18vw, 268px) minmax(0, 1fr);
}

.panel {
  min-width: 0;
  min-height: 0;
}

.panel--rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(157, 184, 154, 0.08);
  background: rgba(17, 26, 19, 0.74);
}

.panel--side {
  border-left: 1px solid rgba(157, 184, 154, 0.08);
  background: rgba(17, 26, 19, 0.48);
}

.panel--main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel--rail .section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.content-card--screen-chat .panel--rail .section {
  padding: 10px 12px 12px;
}

.rail-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(12, 19, 13, 0.68);
  border: 1px solid rgba(137, 168, 135, 0.08);
}

.rail-segment__button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 140ms ease, color 140ms ease;
}

.rail-segment__button--active {
  background: rgba(63, 107, 71, 0.88);
  color: #f3faf0;
}

.rail-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
}

.rail-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(23, 32, 25, 0.46);
  border: 1px solid rgba(157, 184, 154, 0.08);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.rail-item:hover {
  transform: translateY(-1px);
}

.rail-item--active {
  background: rgba(31, 48, 35, 0.94);
  border-color: rgba(137, 168, 135, 0.28);
}

.rail-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
}

.rail-item__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rail-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.rail-item__title {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-item__meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section {
  padding: 18px;
}

.section-title {
  font-size: 22px;
}

.surface-toolbar {
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(157, 184, 154, 0.08);
  min-width: 0;
  overflow: hidden;
}

.surface-title {
  margin: 0;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-toolbar > div:first-child {
  min-width: 0;
}

.surface-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list,
.item-list,
.messages {
  display: grid;
  gap: 14px;
}

.conversation-card,
.info-card,
.stat-card,
.profile-card {
  border-radius: 20px;
  background: rgba(23, 32, 25, 0.88);
  border: 1px solid rgba(157, 184, 154, 0.12);
  padding: 14px 16px;
}

.conversation-card {
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.conversation-card:hover {
  transform: translateY(-1px);
}

.conversation-card--active {
  background: rgba(31, 48, 35, 0.98);
  border-color: rgba(137, 168, 135, 0.38);
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(145deg, #234125, #16351d);
  color: #dff0dc;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  flex: none;
}

.avatar--purple {
  background: linear-gradient(145deg, #5432b7, #271464);
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-name,
.item-title {
  margin: 0;
  font-size: 16px;
}

.conversation-preview {
  margin: 4px 0 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-button,
.action-button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(31, 48, 35, 0.94);
  border: 1px solid rgba(137, 168, 135, 0.12);
}

.icon-button--recording {
  background: linear-gradient(145deg, rgba(124, 38, 38, 0.98), rgba(164, 58, 58, 0.9));
  border-color: rgba(255, 129, 129, 0.3);
  color: #fff4f4;
}

.action-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(63, 107, 71, 1), rgba(91, 126, 93, 0.9));
  color: white;
}

.action-button--ghost {
  background: rgba(31, 48, 35, 0.84);
  color: var(--text);
}

.action-button--danger {
  background: rgba(92, 28, 28, 0.92);
  color: #ffe5e5;
}

.messages {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 10px;
  align-content: start;
  gap: 10px;
}

.message-row {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-width: 0;
  width: 100%;
}

.message-row--mine {
  justify-items: end;
}

.message-bubble {
  min-width: 0;
  max-width: min(680px, calc(100% - 12px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(26, 40, 29, 0.96);
  border: 1px solid rgba(137, 168, 135, 0.1);
}

.message-bubble--actionable {
  cursor: context-menu;
}

.message-row--mine .message-bubble {
  background: linear-gradient(145deg, rgba(63, 107, 71, 1), rgba(91, 126, 93, 0.9));
  color: white;
}

.reply-quote-block {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  margin: 0 0 8px;
  border-radius: 14px;
  background: rgba(22, 36, 26, 0.94);
}

.reply-quote-block__accent {
  border-radius: 999px;
  background: #89a887;
}

.reply-quote-block__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.reply-quote-block__author {
  color: #9fd39d;
  font-size: 12px;
  line-height: 1.2;
}

.reply-quote-block__text {
  color: #bed7b6;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-row--mine .reply-quote-block {
  background: rgba(18, 40, 22, 0.28);
}

.message-row--mine .reply-quote-block__author {
  color: #d6edcc;
}

.message-row--mine .reply-quote-block__text {
  color: rgba(244, 251, 241, 0.9);
}

.message-author {
  color: var(--brand-light);
  font-size: 13px;
  font-weight: 600;
}

.message-text {
  margin: 4px 0 0;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.message-time {
  color: var(--text-muted);
  font-size: 12px;
}

.message-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(12, 19, 13, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  white-space: nowrap;
}

.attachment-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(12, 19, 13, 0.22);
  color: inherit;
  text-decoration: none;
}

.attachment-card--button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.attachment-card--image {
  width: min(var(--attachment-preview-width, 320px), 100%);
  max-width: 100%;
  justify-self: start;
  padding: 8px;
}

.attachment-card--image.attachment-card--button {
  width: min(var(--attachment-preview-width, 320px), 100%);
}

.message-row--mine .attachment-card--image {
  justify-self: end;
  margin-left: auto;
}

.attachment-card--image-fallback {
  align-items: start;
}

.attachment-card--inline {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.attachment-card--failed {
  border-color: rgba(255, 129, 129, 0.28);
}

.attachment-card--audio {
  width: clamp(220px, 38vw, 300px);
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #18261b;
  gap: 0;
}

.attachment-kind {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.attachment-audio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attachment-duration {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.audio-message-bubble {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.audio-message-bubble__toggle {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #d6edcc;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.audio-message-bubble__toggle svg {
  width: 18px;
  height: 18px;
}

.audio-message-bubble__content {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.audio-message-bubble__head,
.audio-message-bubble__times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audio-message-bubble__label {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.audio-message-bubble__speed {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(61, 158, 99, 0.14);
  color: #d6edcc;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.audio-message-bubble__seek {
  width: 100%;
  margin: 0;
  background: transparent;
  accent-color: #84c78c;
}

.audio-message-bubble__seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(78, 106, 82, 0.2);
}

.audio-message-bubble__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: -3.5px;
  background: #d6edcc;
  border: 0;
}

.audio-message-bubble__seek::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(78, 106, 82, 0.2);
}

.audio-message-bubble__seek::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: #84c78c;
}

.audio-message-bubble__seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #d6edcc;
}

.audio-message-bubble__seek:disabled {
  opacity: 0.78;
}

.audio-message-bubble__times {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
}

.audio-message-transcript {
  grid-column: 2 / -1;
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding-top: 2px;
}

.audio-message-transcript__label,
.audio-message-transcript__status,
.audio-message-transcript__text,
.audio-message-transcript__meta {
  margin: 0;
}

.audio-message-transcript__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #b9d7b3;
}

.audio-message-transcript__status,
.audio-message-transcript__text {
  font-size: 12px;
  line-height: 1.45;
  color: #dbe7d5;
  white-space: pre-wrap;
  word-break: break-word;
}

.audio-message-transcript__meta {
  font-size: 11px;
  line-height: 1.2;
  color: #8da593;
}

.audio-message-transcript--pending .audio-message-transcript__status {
  color: #d7cc9f;
}

.audio-message-transcript--failed .audio-message-transcript__status {
  color: #efb7b7;
}

.audio-message-bubble--preparing .audio-message-bubble__toggle {
  color: #e0c88a;
}

.audio-message-bubble--playing .audio-message-bubble__speed {
  background: rgba(61, 158, 99, 0.22);
}

.attachment-caption {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.attachment-caption--muted {
  color: var(--text-muted);
}

.attachment-card__cta {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(61, 158, 99, 0.14);
  color: #d6edcc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.attachment-preview {
  display: block;
  width: 100%;
  max-width: min(420px, 100%);
  aspect-ratio: var(--attachment-preview-aspect-ratio, 4 / 3);
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(9, 14, 10, 0.46);
}

.attachment-preview[data-preview-state="loading"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(9, 14, 10, 0.46);
}

.attachment-audio {
  width: 100%;
  max-width: min(420px, 100%);
  min-height: 40px;
}

.composer-attachment-draft {
  margin: 10px 14px 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.82);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.reply-composer-card {
  margin: 10px 14px 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(22, 36, 26, 0.94);
}

.reply-composer-card__accent {
  align-self: stretch;
  border-radius: 999px;
  background: #89a887;
}

.reply-composer-card__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.reply-composer-card__title {
  color: #9fd39d;
  font-size: 12px;
  line-height: 1.2;
}

.reply-composer-card__text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-composer-card__close {
  color: var(--text-muted);
}

.composer-attachment-draft__thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.composer-attachment-draft__icon {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(31, 48, 35, 0.92);
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.composer-attachment-draft__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.composer-attachment-draft__copy strong,
.composer-attachment-draft__copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-attachment-draft__copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.composer-attachment-draft__remove {
  font-size: 22px;
  line-height: 1;
}

.composer {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(157, 184, 154, 0.08);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.composer-attach {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #1e2b21;
  color: #d6edcc;
  flex: 0 0 auto;
  transition: background-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.composer-attach svg {
  width: 18px;
  height: 18px;
}

.composer-attach:hover,
.composer-attach:active {
  transform: translateY(-1px);
  background: #253427;
}

.composer-field {
  min-height: 50px;
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.82);
  color: var(--text);
  resize: none;
  overflow: auto;
}

.composer-primary {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #d6edcc;
  background: #1e2b21;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.composer-primary svg {
  width: 20px;
  height: 20px;
  transition: transform 160ms ease;
}

.composer-primary--text svg,
.composer-primary--recording svg {
  transform: rotate(180deg);
}

.composer-primary:hover,
.composer-primary:active {
  transform: translateY(-1px);
}

.composer-primary--text:hover svg,
.composer-primary--recording:hover svg,
.composer-primary--text:active svg,
.composer-primary--recording:active svg {
  transform: rotate(180deg);
}

.composer-primary:disabled {
  color: #3a5040;
  background: #1e2b21;
  transform: none;
}

.composer-primary--empty {
  background: #7a2d2d;
}

.composer-primary--text,
.composer-primary--recording {
  background: #3f6b47;
}

.composer-recording-shell {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(157, 184, 154, 0.08);
  display: grid;
  gap: 10px;
}

.recording-status {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.recording-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e84040;
  box-shadow: 0 0 0 0 rgba(232, 64, 64, 0.45);
  animation: voicePulse 1.3s ease-out infinite;
}

.recording-status__time {
  color: #e0c88a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.recording-status__wave {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.recording-status__wave span {
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: rgba(214, 237, 204, 0.68);
  animation: recordingWave 0.9s ease-in-out infinite;
}

.recording-status__wave span:nth-child(2n) {
  animation-duration: 1.1s;
}

.recording-status__wave span:nth-child(3n) {
  animation-duration: 0.78s;
}

.recording-status__mic {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #24402a;
  color: #e58d8d;
}

.recording-status__mic svg {
  width: 16px;
  height: 16px;
}

.composer--recording {
  padding: 0;
  border-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: visible;
}

.composer-cancel {
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: rgba(232, 64, 64, 0.14);
  color: #e58d8d;
  font-weight: 600;
  padding: 0 16px;
  transition: background-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.composer-cancel:hover,
.composer-cancel:active {
  transform: translateY(-1px);
  background: rgba(232, 64, 64, 0.18);
}

.composer-cancel:disabled {
  opacity: 0.56;
}

.composer-field:disabled {
  opacity: 0.72;
  cursor: default;
}

.composer-error {
  margin: 0 14px 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 129, 129, 0.16);
  background: rgba(122, 31, 31, 0.18);
  color: #ffb8b8;
  font-size: 13px;
}

@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 125, 125, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 125, 125, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 125, 125, 0);
  }
}

@keyframes recordingWave {
  0%,
  100% {
    transform: scaleY(0.45);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1.45);
    opacity: 1;
  }
}

@keyframes composerSwapIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-actions-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: transparent;
}

.message-actions-menu {
  position: fixed;
  z-index: 31;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.98);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  display: grid;
  gap: 4px;
}

.message-actions-menu__item {
  border: 0;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.message-actions-menu__item:hover {
  background: rgba(31, 48, 35, 0.94);
}

.message-actions-menu__item--danger {
  color: #ffb8b8;
}

.message-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 32;
  width: min(420px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  border-radius: 24px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.98);
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.36);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.message-sheet__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(157, 184, 154, 0.08);
}

.message-sheet__title {
  margin: 0;
  font-size: 18px;
}

.message-sheet__meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.message-sheet__list {
  display: grid;
  gap: 8px;
  padding: 12px 16px 16px;
  overflow: auto;
  align-content: start;
}

.message-sheet__target {
  border: 1px solid rgba(157, 184, 154, 0.08);
  border-radius: 18px;
  background: rgba(23, 32, 25, 0.88);
  color: inherit;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}

.message-sheet__target-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.message-sheet__target-copy strong,
.message-sheet__target-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-sheet__target-copy span {
  color: var(--text-muted);
  font-size: 13px;
}

.attachment-sheet-backdrop {
  background: rgba(2, 7, 3, 0.42);
  backdrop-filter: blur(4px);
}

.attachment-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  z-index: 32;
  border-radius: 24px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.98);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  animation: composerSwapIn 180ms ease both;
}

.attachment-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.attachment-sheet__title {
  margin: 0;
  font-size: 18px;
}

.attachment-sheet__list {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.attachment-sheet__item {
  border: 0;
  border-radius: 18px;
  min-height: 58px;
  background: rgba(28, 41, 31, 0.82);
  color: var(--text);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
  transition: background-color 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.attachment-sheet__item:disabled {
  opacity: 0.58;
}

.attachment-sheet__item:hover,
.attachment-sheet__item:active {
  transform: translateY(-1px);
  background: rgba(35, 51, 38, 0.92);
}

.attachment-sheet__icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(63, 107, 71, 0.22);
  color: #d6edcc;
}

.attachment-sheet__icon svg {
  width: 18px;
  height: 18px;
}

.attachment-sheet__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.attachment-sheet__copy strong,
.attachment-sheet__copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-sheet__copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.attachment-sheet__footer {
  padding: 0 12px 12px;
}

.attachment-sheet__cancel {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 18px;
  background: rgba(31, 48, 35, 0.92);
  color: var(--text);
  transition: background-color 140ms ease, transform 140ms ease;
}

.attachment-sheet__cancel:hover,
.attachment-sheet__cancel:active {
  transform: translateY(-1px);
  background: rgba(37, 56, 40, 0.96);
}

.camera-capture-backdrop {
  position: fixed;
  inset: 0;
  z-index: 42;
  background: rgba(2, 7, 3, 0.58);
  backdrop-filter: blur(6px);
}

.camera-capture-sheet {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 24px));
  max-height: calc(var(--app-viewport-height, 100dvh) - 24px);
  z-index: 43;
  border-radius: 28px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  display: grid;
  gap: 0;
}

.camera-capture-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.camera-capture-sheet__title {
  margin: 0 0 4px;
  font-size: 20px;
}

.camera-capture-sheet__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.camera-capture-preview {
  position: relative;
  margin: 0 16px;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background:
    radial-gradient(circle at 50% 35%, rgba(67, 104, 72, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(12, 18, 13, 0.98) 0%, rgba(8, 12, 9, 0.98) 100%);
}

.camera-capture-preview__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.camera-capture-preview__overlay {
  position: absolute;
  inset: 14px 14px auto 14px;
  pointer-events: none;
}

.camera-capture-preview__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 12, 8, 0.72);
  color: #ecf7e8;
  font-size: 13px;
  font-weight: 600;
}

.camera-capture-preview__badge--recording {
  background: rgba(98, 23, 23, 0.84);
}

.camera-capture-preview__rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff6565;
  box-shadow: 0 0 0 0 rgba(255, 101, 101, 0.38);
  animation: voicePulse 1.3s ease-out infinite;
}

.camera-capture-sheet__error {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 129, 129, 0.16);
  background: rgba(81, 20, 20, 0.18);
  color: #ffb8b8;
  font-size: 13px;
}

.camera-capture-sheet__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.camera-capture-button {
  min-height: 50px;
  border: 0;
  border-radius: 18px;
  font-weight: 600;
  transition: background-color 140ms ease, transform 140ms ease, color 140ms ease, opacity 140ms ease;
}

.camera-capture-button:hover,
.camera-capture-button:active {
  transform: translateY(-1px);
}

.camera-capture-button:disabled {
  opacity: 0.58;
  transform: none;
}

.camera-capture-button--secondary {
  background: rgba(31, 48, 35, 0.92);
  color: var(--text);
}

.camera-capture-button--secondary:hover,
.camera-capture-button--secondary:active {
  background: rgba(37, 56, 40, 0.96);
}

.camera-capture-button--primary {
  background: #3f6b47;
  color: #f3f6ef;
}

.camera-capture-button--primary:hover,
.camera-capture-button--primary:active {
  background: #4b7c54;
}

.metrics-grid,
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-value {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 600;
}

.map-stage {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(112, 176, 123, 0.22), transparent 23%),
    radial-gradient(circle at 72% 24%, rgba(71, 120, 81, 0.32), transparent 22%),
    linear-gradient(180deg, #193222 0%, #101913 100%);
  border: 1px solid rgba(137, 168, 135, 0.14);
}

.map-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f1a12;
}

.map-canvas {
  position: absolute;
  inset: 0;
}

.mapboxgl-map,
.mapboxgl-canvas-container,
.mapboxgl-canvas {
  width: 100%;
  height: 100%;
}

.mapboxgl-ctrl-top-right {
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
}

.mapboxgl-ctrl-group {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(137, 168, 135, 0.18);
  background: rgba(17, 26, 19, 0.92);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.mapboxgl-ctrl-group button {
  background: transparent;
}

.mapboxgl-ctrl button .mapboxgl-ctrl-icon {
  filter: invert(92%) sepia(14%) saturate(202%) hue-rotate(54deg) brightness(92%) contrast(90%);
}

.map-top-strip {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(72vw, 520px);
}

.map-tool-cluster-shell {
  position: absolute;
  right: 16px;
  bottom: max(144px, calc(env(safe-area-inset-bottom) + 128px));
  z-index: 9;
  pointer-events: none;
}

.map-tool-cluster-shell > * {
  pointer-events: auto;
}

.map-track-recorder-shell {
  position: absolute;
  left: 16px;
  bottom: max(144px, calc(env(safe-area-inset-bottom) + 128px));
  z-index: 10;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.map-track-recorder-shell > * {
  pointer-events: auto;
}

.track-recorder {
  display: flex;
  align-items: center;
  gap: 10px;
}

.track-recorder--active,
.track-recorder--stopped,
.track-recorder--loading {
  padding: 8px;
  border: 1px solid rgba(157, 184, 154, 0.24);
  border-radius: 8px;
  background: rgba(17, 26, 19, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.track-recorder__start,
.track-recorder__stop {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #f3f6ef;
  cursor: pointer;
  touch-action: manipulation;
}

.track-recorder__start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #3f6b47;
  font-weight: 600;
}

.track-recorder__start svg,
.track-recorder__stop svg {
  width: 22px;
  height: 22px;
}

.track-recorder__stop {
  width: 46px;
  display: grid;
  flex: none;
  place-items: center;
  background: #8b3b3b;
}

.track-recorder__stats {
  min-width: 160px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 10px;
  color: #c9d8c3;
  font-size: 12px;
}

.track-recorder__stats strong {
  grid-column: 1 / -1;
  color: #f1f5ed;
  font-size: 15px;
}

.track-recorder__error {
  margin: 0;
  color: #ffc0b8;
  font-size: 12px;
}

.track-recorder--active .track-recorder__error {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 6px);
  max-width: 280px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(72, 28, 28, 0.96);
}

.map-status-chip--recording {
  border-color: rgba(245, 208, 97, 0.42);
  color: #f5d061;
}

.track-save-sheet {
  position: fixed;
  left: 50%;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(157, 184, 154, 0.24);
  border-radius: 8px;
  background: #111a13;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48);
}

.track-save-sheet h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.track-save-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-tool-cluster {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.map-tool-cluster__panel {
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.map-tool-cluster--open .map-tool-cluster__panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.map-tool-cluster__handle {
  min-width: 52px;
  height: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(137, 168, 135, 0.18);
  border-radius: 16px;
  background: rgba(17, 26, 19, 0.92);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.map-tool-cluster__handle--active {
  border-color: rgba(137, 168, 135, 0.3);
  background: rgba(31, 48, 35, 0.96);
}

.map-tool-cluster__handle-icon svg {
  width: 20px;
  height: 20px;
}

.map-tool-cluster__handle-chevron {
  font-size: 18px;
  line-height: 1;
  opacity: 0.82;
}

.map-tool-button {
  min-height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(137, 168, 135, 0.18);
  border-radius: 18px;
  background: rgba(17, 26, 19, 0.94);
  color: var(--text);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.map-tool-button--active {
  border-color: rgba(137, 168, 135, 0.34);
  background: rgba(52, 79, 57, 0.95);
}

.map-tool-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db89a;
}

.map-tool-button__icon svg {
  width: 22px;
  height: 22px;
}

.map-tool-button__label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.map-status-chip,
.marker-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(137, 168, 135, 0.18);
  background: rgba(17, 26, 19, 0.88);
  color: var(--text);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.map-status-chip--action {
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.map-status-chip--active {
  border-color: rgba(137, 168, 135, 0.36);
  background: rgba(52, 79, 57, 0.92);
}

.map-status-chip--error,
.marker-pill--warning {
  border-color: rgba(255, 132, 132, 0.18);
  color: #ffd0d0;
  background: rgba(70, 20, 20, 0.82);
}

.marker-pill--public {
  border-color: rgba(137, 168, 135, 0.18);
  background: rgba(52, 79, 57, 0.88);
}

.marker-pill--private {
  background: rgba(17, 26, 19, 0.88);
}

.map-marker-card-shell {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  z-index: 8;
  pointer-events: none;
}

.map-marker-card-shell > * {
  pointer-events: auto;
}

.map-center-info-shell {
  position: absolute;
  left: 16px;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  z-index: 8;
  pointer-events: none;
}

.map-center-info {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  background: rgba(15, 23, 16, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.map-center-info__coords {
  font-size: 14px;
  color: var(--text);
}

.map-center-info__meta {
  display: grid;
  gap: 6px;
}

.map-center-info__meta > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.map-center-info__meta span,
.map-center-info__empty {
  font-size: 12px;
  color: var(--text-muted);
}

.map-center-info__meta strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.map-center-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-center-crosshair__h,
.map-center-crosshair__v {
  position: absolute;
  background: rgba(255, 214, 214, 0.94);
  box-shadow: 0 0 0 1px rgba(21, 29, 23, 0.75);
}

.map-center-crosshair__h {
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
}

.map-center-crosshair__v {
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
}

.map-center-crosshair__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffd2d2;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(21, 29, 23, 0.82);
}

.map-forest-picker-shell {
  position: absolute;
  top: max(58px, calc(env(safe-area-inset-top) + 52px));
  right: 16px;
  z-index: 9;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.map-forest-picker-shell > * {
  pointer-events: auto;
}

.map-forest-picker {
  display: grid;
  gap: 12px;
  padding: 14px 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  background: rgba(15, 23, 16, 0.96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.map-forest-picker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-forest-picker__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.map-forest-picker__close {
  flex-shrink: 0;
}

.map-forest-picker__search {
  display: grid;
  gap: 6px;
}

.map-forest-picker__search > span {
  font-size: 12px;
  color: var(--text-muted);
}

.map-forest-picker__search input {
  width: 100%;
  border: 1px solid rgba(137, 168, 135, 0.16);
  border-radius: 14px;
  background: rgba(16, 24, 18, 0.86);
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
}

.map-forest-picker__search input:focus {
  border-color: rgba(137, 168, 135, 0.38);
  box-shadow: 0 0 0 1px rgba(137, 168, 135, 0.12);
}

.map-forest-picker__content {
  display: grid;
  gap: 10px;
}

.map-forest-picker__state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 84px;
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(157, 184, 154, 0.18);
  border-top-color: rgba(214, 237, 204, 0.92);
  animation: auth-spin 0.85s linear infinite;
  flex-shrink: 0;
}

.spinner--small {
  width: 16px;
  height: 16px;
}

.map-forest-picker__state--error {
  color: #ffb8b8;
}

.map-forest-picker__list {
  display: grid;
  gap: 8px;
  max-height: min(360px, 42vh);
  overflow-y: auto;
}

.map-forest-picker__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(137, 168, 135, 0.14);
  background: rgba(19, 29, 21, 0.92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.map-forest-picker__item--selected {
  border-color: rgba(137, 168, 135, 0.3);
  background: rgba(34, 58, 36, 0.96);
}

.map-forest-picker__checkbox {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(137, 168, 135, 0.24);
  background: rgba(14, 20, 15, 0.72);
  flex-shrink: 0;
}

.map-forest-picker__checkbox--checked {
  border-color: rgba(137, 168, 135, 0.48);
  background: linear-gradient(180deg, rgba(137, 168, 135, 0.9), rgba(92, 131, 91, 0.94));
}

.map-forest-picker__item-copy {
  display: grid;
  gap: 4px;
}

.map-forest-picker__item-copy strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.map-forest-picker__item-copy small {
  font-size: 12px;
  color: var(--text-muted);
}

.map-forest-picker__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.mark-popup .mapboxgl-popup-tip {
  display: none;
}

.mark-popup .mapboxgl-popup-content {
  background: #131f13;
  border-radius: 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: visible;
  animation: popupIn 0.18s cubic-bezier(.4, 0, .2, 1) forwards;
}

.mark-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-content::before,
.mark-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-content::after,
.mark-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-content::before,
.mark-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-content::after {
  content: "";
  position: absolute;
  top: 50px;
  width: 0;
  height: 0;
}

.mark-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-content::before {
  left: -10px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid #131f13;
}

.mark-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-content::after {
  left: -11px;
  top: 49px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 11px solid rgba(255, 255, 255, 0.1);
  z-index: -1;
}

.mark-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-content::before {
  right: -10px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid #131f13;
}

.mark-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-content::after {
  right: -11px;
  top: 49px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 11px solid rgba(255, 255, 255, 0.1);
  z-index: -1;
}

.mark-popup__shell {
  width: 280px;
  box-sizing: border-box;
}

.mark-popup__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 12px;
}

.mark-popup__copy {
  min-width: 0;
}

.mark-popup__eyebrow {
  margin: 0 0 3px;
  font-size: 10px;
  color: #5a8060;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.mark-popup__title {
  font-size: 19px;
  font-weight: 500;
  color: #dcedc8;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mark-popup__coords,
.mark-popup__meta {
  font-size: 11px;
}

.mark-popup__coords {
  color: #5a8060;
  margin-top: 4px;
}

.mark-popup__meta {
  color: #4a6a4a;
  margin-top: 1px;
}

.mark-popup__close {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #7a9f7a;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mark-popup__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 16px 10px;
}

.mark-popup__badge {
  font-size: 11px;
  border-radius: 4px;
  padding: 2px 9px;
  border: 0.5px solid transparent;
}

.mark-popup__badge--private {
  background: rgba(102, 187, 106, 0.12);
  border-color: rgba(102, 187, 106, 0.25);
  color: #81c784;
}

.mark-popup__badge--public {
  background: rgba(255, 167, 38, 0.12);
  border-color: rgba(255, 167, 38, 0.25);
  color: #ffb74d;
}

.mark-popup__badge--hidden {
  background: rgba(100, 100, 100, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
  color: #666;
}

.mark-popup__description {
  padding: 0 16px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #a5c8a7;
  overflow-wrap: anywhere;
}

.mark-popup__divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.07);
}

.mark-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 16px;
}

.mark-popup__row-actions {
  display: flex;
  gap: 6px;
}

.mark-popup__action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  color: #a5c8a7;
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.mark-popup__action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mark-popup__action--danger {
  background: rgba(180, 60, 60, 0.12);
  border-color: rgba(220, 80, 80, 0.25);
  color: #ef9a9a;
}

.mark-popup__action--danger:hover {
  background: rgba(180, 60, 60, 0.22);
}

.mark-popup__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.mark-popup__id {
  font-size: 10px;
  color: #3a5a3a;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateX(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.map-create-sheet-shell {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  z-index: 9;
  pointer-events: none;
}

.map-create-sheet-shell > * {
  pointer-events: auto;
}

.map-create-sheet {
  display: grid;
  gap: 12px;
  padding: 16px 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  background: rgba(15, 23, 16, 0.96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.map-create-sheet--hint {
  gap: 10px;
}

.map-create-sheet__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.map-create-sheet__text,
.map-create-sheet__coords,
.map-create-sheet__error {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.map-create-sheet__coords {
  color: var(--text-muted);
}

.map-create-sheet__error {
  color: #ffb8b8;
}

.map-create-sheet__field {
  display: grid;
  gap: 6px;
}

.map-create-sheet__field > span {
  font-size: 12px;
  color: var(--text-muted);
}

.map-create-sheet__field input,
.map-create-sheet__field textarea {
  width: 100%;
  border: 1px solid rgba(137, 168, 135, 0.16);
  border-radius: 14px;
  background: rgba(16, 24, 18, 0.86);
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
  resize: none;
}

.map-create-sheet__field input:focus,
.map-create-sheet__field textarea:focus {
  border-color: rgba(137, 168, 135, 0.38);
  box-shadow: 0 0 0 1px rgba(137, 168, 135, 0.12);
}

.map-create-sheet__toggle {
  min-height: 38px;
  width: fit-content;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(137, 168, 135, 0.18);
  background: rgba(17, 26, 19, 0.88);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.map-create-sheet__toggle--active {
  border-color: rgba(255, 167, 38, 0.28);
  background: rgba(255, 167, 38, 0.12);
  color: #ffb74d;
}

.map-create-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 820px) {
  .map-tool-cluster-shell {
    right: 16px;
    bottom: max(118px, calc(env(safe-area-inset-bottom) + 102px));
  }

  .map-track-recorder-shell {
    left: 16px;
    bottom: max(118px, calc(env(safe-area-inset-bottom) + 102px));
  }

  .map-tool-button__label {
    display: none;
  }

  .map-forest-picker-shell {
    top: auto;
    left: 16px;
    right: 16px;
    width: auto;
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 76px));
  }

  .map-center-info-shell {
    right: 16px;
    bottom: max(178px, calc(env(safe-area-inset-bottom) + 162px));
  }

  .map-center-info {
    max-width: none;
  }
}

.beta-map-marker {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.beta-map-marker__pulse,
.beta-map-marker__dot {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.beta-map-marker__pulse {
  display: none;
}

.beta-map-marker__dot {
  border: 2.5px solid rgba(23, 51, 29, 0.94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.beta-map-marker--own .beta-map-marker__dot {
  background: #89a887;
}

.beta-map-marker--own-public .beta-map-marker__dot {
  background: #f5d061;
  border-color: #f8ffcf;
}

.beta-map-marker--public .beta-map-marker__dot {
  background: #f5d061;
  border-color: #f8ffcf;
}

.beta-map-marker--selected {
  transform: scale(1.18);
}

.beta-map-marker--selected .beta-map-marker__dot {
  box-shadow: 0 0 0 4px rgba(245, 208, 97, 0.18), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.marker-list {
  min-height: 0;
  overflow: auto;
}

.marker-list-card {
  cursor: pointer;
}

.marker-list-card__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.marker-list-card__pin {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.marker-list-card__pin--private {
  background: #89a887;
}

.marker-list-card__pin--public {
  background: #d8d26b;
}

.marker-list-card__copy {
  min-width: 0;
}

.marker-detail-panel {
  display: grid;
  align-content: start;
}

.marker-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  background: rgba(18, 27, 20, 0.94);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.marker-card--map {
  background: rgba(15, 23, 16, 0.94);
}

.marker-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.marker-card__copy {
  min-width: 0;
}

.marker-card__eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marker-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.marker-card__meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.marker-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marker-card__description {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.marker-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-card--screen-markers > .section {
  overflow: hidden;
  background: #182018;
}

.markers-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  gap: 0;
  overflow: hidden;
  background: #182018;
}

.markers-screen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 10px;
  background: #182018;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.markers-screen__headline {
  min-width: 0;
}

.markers-screen__title,
.markers-screen .section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: #c8e6c9;
}

.markers-screen__subtitle {
  margin: 1px 0 0;
  font-size: 11px;
  line-height: 1.25;
  color: #5a8060;
}

.markers-screen__close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #7a9f7a;
  border: 0;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.markers-screen__body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #182018;
}

.markers-screen__empty {
  margin: 14px 20px;
}

.markers-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.markers-table--grouped {
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 8px;
}

.entity-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entity-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 8px;
}

.entity-group__title {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ea37f;
}

.entity-group__count {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.2;
  color: #547354;
}

.entity-group__rows {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.marker-mobile-row {
  width: 100%;
  min-width: 0;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.marker-mobile-row--hidden {
  opacity: 0.5;
}

.marker-mobile-row--removing {
  opacity: 0;
}

.marker-mobile-row__tap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 20px;
  min-height: 48px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease;
}

.marker-mobile-row__tap:hover,
.marker-mobile-row__tap:active {
  background: rgba(255, 255, 255, 0.04);
}

.marker-mobile-row__dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
}

.marker-mobile-row__dot--private {
  background: #66bb6a;
}

.marker-mobile-row__dot--public {
  background: #ffa726;
}

.marker-mobile-row__dot--hidden {
  background: #42a5f5;
}

.marker-mobile-row__content {
  flex: 1;
  min-width: 0;
}

.marker-mobile-row__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.marker-mobile-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: #dcedc8;
}

.marker-mobile-row__badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  border: 0.5px solid transparent;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.marker-mobile-row__badge--private {
  background: rgba(102, 187, 106, 0.12);
  border-color: rgba(102, 187, 106, 0.25);
  color: #81c784;
}

.marker-mobile-row__badge--public {
  background: rgba(255, 167, 38, 0.12);
  border-color: rgba(255, 167, 38, 0.25);
  color: #ffb74d;
}

.marker-mobile-row__badge--hidden {
  background: rgba(100, 100, 100, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  color: #8a928a;
}

.marker-mobile-row__meta {
  margin-top: 2px;
  font-size: 11px;
  color: #5a8060;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marker-mobile-row__chevron {
  margin-top: 4px;
  flex-shrink: 0;
  color: #4a6a4a;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.marker-mobile-row--expanded .marker-mobile-row__chevron {
  transform: rotate(90deg);
}

.marker-mobile-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 20px 0 41px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, margin-top 0.25s ease, margin-bottom 0.25s ease;
}

.marker-mobile-row--expanded .marker-mobile-row__actions {
  max-height: 132px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.marker-mini-action {
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #a5c8a7;
  font-size: 12px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.marker-mini-action:hover,
.marker-mini-action:active {
  background: rgba(255, 255, 255, 0.09);
}

.marker-mini-action--danger {
  background: rgba(180, 60, 60, 0.15);
  border-color: rgba(220, 80, 80, 0.3);
  color: #ef9a9a;
}

.marker-mini-action--danger:hover,
.marker-mini-action--danger:active {
  background: rgba(180, 60, 60, 0.22);
}

.marker-mobile-row__divider {
  height: 0.5px;
  margin: 0 20px;
  background: rgba(255, 255, 255, 0.05);
}

.markers-screen__footer {
  display: block;
  padding: 12px 20px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  background: #182018;
  flex-shrink: 0;
}

.marker-footer-action {
  width: 100%;
  min-height: 44px;
  padding: 11px 0;
  border-radius: 10px;
  border: 0.5px solid rgba(102, 187, 106, 0.3);
  background: rgba(102, 187, 106, 0.1);
  color: #81c784;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.marker-footer-action:hover,
.marker-footer-action:active {
  background: rgba(102, 187, 106, 0.16);
}

.trips-screen {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.trips-screen--editor {
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
}

.content-card--screen-buffering > .section {
  overflow: hidden;
  background: #182018;
}

.buffering-screen {
  grid-template-rows: auto minmax(0, 1fr);
}

.buffering-screen__head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.buffering-screen__head-actions .markers-screen__close:disabled {
  opacity: 0.45;
  cursor: default;
}

.buffering-inline-error {
  width: min(calc(100% - 24px), 736px);
  margin: 10px auto 0;
}

.buffering-queue-banner {
  width: min(calc(100% - 24px), 736px);
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px auto 0;
  padding: 9px 10px 9px 12px;
  border: 0.5px solid rgba(129, 199, 132, 0.22);
  border-radius: 8px;
  background: rgba(62, 99, 66, 0.18);
  color: #cce2cd;
}

.buffering-queue-banner--error {
  border-color: rgba(255, 183, 77, 0.28);
  background: rgba(118, 79, 25, 0.18);
  color: #ffd3a0;
}

.buffering-queue-banner__content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.buffering-queue-banner strong,
.buffering-queue-banner__content span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.buffering-queue-banner strong {
  font-size: 12px;
  line-height: 1.25;
}

.buffering-queue-banner__content span {
  color: #9eb79f;
  font-size: 10px;
  line-height: 1.25;
}

.buffering-queue-banner--error .buffering-queue-banner__content span {
  color: #d7ae7d;
}

.buffering-queue-banner .icon-button {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.buffering-customer-list {
  display: grid;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 12px 20px;
  gap: 8px;
}

.buffering-customer-row {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #243624;
  color: #e8f2e8;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.buffering-customer-row:hover,
.buffering-customer-row:active {
  background: #2a3d2a;
  border-color: rgba(129, 199, 132, 0.24);
}

.buffering-customer-row__mark {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #81c784;
  box-shadow: 0 0 0 4px rgba(129, 199, 132, 0.1);
}

.buffering-customer-row__content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.buffering-customer-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8f2e8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.buffering-customer-row__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9eb79f;
  font-size: 11px;
  line-height: 1.3;
}

.buffering-customer-row__chevron,
.buffering-shift-card__chevron {
  flex-shrink: 0;
  color: #7d9a7e;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.buffering-detail,
.buffering-editor {
  width: min(100%, 760px);
  min-width: 0;
  margin: 0 auto;
  padding: 0 12px 24px;
}

.buffering-detail__head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.buffering-detail__head > div {
  min-width: 0;
}

.buffering-detail__head h3,
.buffering-detail__head p,
.buffering-direction-block__head h4,
.buffering-direction-block__head p,
.buffering-shift-list h5,
.buffering-editor__summary h4 {
  margin: 0;
}

.buffering-detail__head h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8f2e8;
  font-size: 16px;
  line-height: 1.25;
}

.buffering-detail__head p {
  margin-top: 2px;
  color: #8fa990;
  font-size: 11px;
}

.buffering-back {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #b8cdb8;
}

.buffering-direction-list {
  display: grid;
}

.buffering-detail__notice {
  margin-top: 12px;
}

.buffering-direction-block {
  min-width: 0;
  padding: 16px 0 18px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.buffering-direction-block:last-child {
  border-bottom: 0;
}

.buffering-direction-block__head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.buffering-direction-block__head h4,
.buffering-editor__summary h4 {
  color: #c8dfc8;
  font-size: 14px;
  line-height: 1.35;
}

.buffering-direction-block__head p,
.buffering-direction-block__head span {
  color: #91ad92;
  font-size: 11px;
  line-height: 1.35;
}

.buffering-draft-card,
.buffering-run-card,
.buffering-shift-card {
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #243624;
}

.buffering-active-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.buffering-active-head h5 {
  margin: 0;
  color: #e8f2e8;
  font-size: 13px;
  line-height: 1.2;
}

.buffering-new-shift,
.buffering-add-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.buffering-new-shift svg,
.buffering-add-photo svg {
  width: 16px;
  height: 16px;
}

.buffering-active-empty {
  margin: 0;
  padding: 10px 12px;
  border: 0.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #809681;
  font-size: 12px;
}

.buffering-draft-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  padding: 11px 12px;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.buffering-draft-card:hover,
.buffering-draft-card:active {
  background: #2a3d2a;
  border-color: rgba(129, 199, 132, 0.24);
}

.buffering-draft-card__topline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buffering-draft-card__topline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8f2e8;
  font-size: 13px;
}

.buffering-draft-card__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a4bba5;
  font-size: 11px;
}

.buffering-draft-card > .buffering-customer-row__chevron {
  grid-column: 2;
  grid-row: 1 / 3;
}

.buffering-shift-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.buffering-shift-list h5 {
  color: #e8f2e8;
  font-size: 13px;
  line-height: 1.2;
}

.buffering-shift-card {
  overflow: hidden;
  background: #2a3d2a;
}

.buffering-shift-card__toggle {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.buffering-shift-card__content {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 5px;
}

.buffering-shift-card__topline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buffering-shift-card__topline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8f2e8;
  font-size: 13px;
}

.buffering-shift-card__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a4bba5;
  font-size: 11px;
}

.buffering-shift-card--expanded .buffering-shift-card__chevron {
  transform: rotate(90deg);
}

.buffering-shift-card__details {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.buffering-shift-card__details p {
  margin: 8px 0 0;
  color: #afc4b0;
  font-size: 11px;
  line-height: 1.4;
}

.buffering-shift-card__details .buffering-shift-card__warning {
  color: #ffd7a8;
}

.buffering-queue-card {
  border-color: rgba(129, 199, 132, 0.18);
}

.buffering-queue-card__details .marker-mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: start;
}

.buffering-queue-card__details .marker-mini-action svg {
  width: 15px;
  height: 15px;
}

.buffering-editor__summary {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.buffering-editor__run-head,
.buffering-run-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.buffering-editor__run-head strong,
.buffering-run-card__head strong {
  color: #dcecdc;
  font-size: 13px;
}

.buffering-run-list {
  display: grid;
  gap: 8px;
  padding: 14px 0;
}

.buffering-run-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.buffering-photo-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.buffering-photo-tile {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}

.buffering-photo-tile__media,
.buffering-photo-tile__empty {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #172317;
}

.buffering-photo-tile__preview {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.buffering-photo-tile__preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.buffering-photo-tile__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: rgba(26, 16, 16, 0.86);
  color: #ffb1b1;
  cursor: pointer;
}

.buffering-photo-tile__remove svg {
  width: 16px;
  height: 16px;
}

.buffering-photo-tile__empty {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #718672;
  font-size: 11px;
  text-align: center;
}

.buffering-photo-tile strong {
  color: #dcecdc;
  font-size: 11px;
  line-height: 1.25;
}

.buffering-photo-tile > span {
  min-width: 0;
  color: #8fa990;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.buffering-straight-distance,
.buffering-close-hint {
  margin: 0;
  color: #8fa990;
  font-size: 11px;
  line-height: 1.35;
}

.buffering-close-hint {
  padding: 0 0 10px;
  color: #d0b57a;
}

.buffering-editor__actions {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.buffering-editor__actions .marker-footer-action {
  min-width: 0;
}

.buffering-editor button:disabled,
.buffering-source-sheet button:disabled,
.buffering-fuel-dialog button:disabled {
  opacity: 0.5;
  cursor: default;
}

.buffering-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(2, 7, 3, 0.7);
  backdrop-filter: blur(4px);
}

.buffering-source-sheet,
.buffering-fuel-dialog {
  position: fixed;
  z-index: 89;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(var(--app-viewport-height, 100dvh) - 24px);
  overflow: auto;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #182518;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.buffering-source-sheet {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 14px;
}

.buffering-fuel-dialog {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.buffering-source-sheet__head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.buffering-source-sheet__head > div {
  min-width: 0;
}

.buffering-source-sheet__head h3,
.buffering-source-sheet__head p {
  margin: 0;
}

.buffering-source-sheet__head h3 {
  color: #e8f2e8;
  font-size: 16px;
  line-height: 1.3;
}

.buffering-source-sheet__head p {
  margin-top: 3px;
  color: #8fa990;
  font-size: 11px;
}

.buffering-source-sheet__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.buffering-source-sheet__actions button {
  min-height: 82px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #243624;
  color: #dcecdc;
  font-family: inherit;
  cursor: pointer;
}

.buffering-source-sheet__actions svg {
  width: 24px;
  height: 24px;
}

.buffering-source-sheet__actions strong {
  font-size: 12px;
}

.buffering-source-sheet__cancel {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #a9bea9;
  font-family: inherit;
  cursor: pointer;
}

.buffering-fuel-check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #213321;
  color: #dcecdc;
  font-size: 13px;
}

.buffering-fuel-check input {
  width: 18px;
  height: 18px;
  accent-color: #6fa975;
}

.buffering-fuel-dialog__actions {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(160px, 1fr);
  gap: 8px;
}

.trips-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
  background: #182018;
}

.trip-tab {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #7ea37f;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.trip-tab:hover,
.trip-tab:active {
  background: rgba(255, 255, 255, 0.08);
}

.trip-tab--active {
  background: rgba(102, 187, 106, 0.14);
  border-color: rgba(102, 187, 106, 0.25);
  color: #a9d4ab;
}

.marker-mobile-row__badge--trip-muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #a0b5a0;
}

.marker-mobile-row__badge--trip-info {
  background: rgba(66, 165, 245, 0.14);
  border-color: rgba(66, 165, 245, 0.28);
  color: #8ac5f7;
}

.marker-mobile-row__badge--trip-warn {
  background: rgba(255, 183, 77, 0.14);
  border-color: rgba(255, 183, 77, 0.28);
  color: #ffcc80;
}

.marker-mobile-row__badge--trip-danger {
  background: rgba(239, 154, 154, 0.14);
  border-color: rgba(239, 154, 154, 0.3);
  color: #ef9a9a;
}

.marker-mobile-row__badge--trip-success {
  background: rgba(129, 199, 132, 0.14);
  border-color: rgba(129, 199, 132, 0.28);
  color: #a5d6a7;
}

.marker-mobile-row__dot--trip-muted {
  background: #90a490;
}

.marker-mobile-row__dot--trip-info {
  background: #42a5f5;
}

.marker-mobile-row__dot--trip-warn {
  background: #ffb74d;
}

.marker-mobile-row__dot--trip-danger {
  background: #ef9a9a;
}

.marker-mobile-row__dot--trip-success {
  background: #81c784;
}

.trip-mobile-row__actions {
  flex-direction: column;
  align-items: flex-start;
  max-height: 0;
}

.marker-mobile-row--expanded .trip-mobile-row__actions {
  max-height: none;
  overflow: visible;
}

.trip-mobile-row__badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 60%;
}

.trip-mobile-row__submeta {
  margin-top: 4px;
  font-size: 10px;
  color: #4f6f52;
}

.trip-mobile-row__summary-grid {
  display: grid;
  gap: 6px;
  width: 100%;
}

.trip-mobile-row__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.trip-mobile-row__footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.trip-mobile-row__updated {
  min-width: 0;
  font-size: 10px;
  color: #557457;
  line-height: 1.2;
}

.trip-inline-note {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  color: #99b99b;
  font-size: 12px;
  line-height: 1.35;
}

.trip-inline-note--warning {
  background: rgba(255, 183, 77, 0.1);
  border-color: rgba(255, 183, 77, 0.2);
  color: #ffcc80;
}

.trip-inline-note--text {
  color: #d1e1d1;
}

.trip-history-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trip-history-panel__toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
}

.trip-history-panel__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
}

.trip-history-panel__search {
  padding: 0 20px;
}

.trip-history-docs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.trip-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}

.trip-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}

.trip-editor__headline {
  min-width: 0;
}

.trip-editor__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #dcedc8;
}

.trip-editor__subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #7ea37f;
}

.trip-editor__body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.trip-editor__pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-editor__hint {
  font-size: 12px;
  color: #7ea37f;
}

.trip-editor__autosave {
  margin-left: auto;
  font-size: 11px;
  color: #8fb891;
}

.trip-form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.trip-form-section__title {
  margin: 0;
  color: #dcedc8;
  font-size: 14px;
  font-weight: 600;
}

.trip-field-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.trip-field-grid--two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.trip-endpoint__place-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: end;
  gap: 8px;
}

.trip-endpoint__place {
  min-width: 0;
}

.trip-gps-button {
  width: 54px;
  height: 42px;
  border-radius: 21px;
  border: 1px solid rgba(143, 199, 147, 0.72);
  background: transparent;
  color: #cde6ce;
  padding: 0 5px;
  font-size: 11px;
  cursor: pointer;
}

.trip-gps-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.trip-coordinate-line {
  min-height: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 5px 8px;
  color: #a9c9aa;
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.trip-coordinate-line--missing {
  color: #6f8d72;
}

.trip-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.trip-segmented__button {
  min-height: 38px;
  border-radius: 7px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: #91ad94;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.trip-segmented__button--active {
  border-color: rgba(102, 187, 106, 0.34);
  background: rgba(46, 125, 50, 0.68);
  color: #eff8ef;
}

.trip-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trip-doc-list .trip-doc-section {
  border: 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
}

.trip-doc-list .trip-doc-section:last-child {
  border-bottom: 0;
}

.trip-doc-list .trip-doc-section__actions {
  margin-top: -2px;
}

.trip-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trip-field__label {
  font-size: 12px;
  color: #7ea37f;
}

.trip-field__input,
.trip-field__textarea {
  width: 100%;
  border-radius: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #dcedc8;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.trip-field__input:focus,
.trip-field__textarea:focus {
  border-color: rgba(102, 187, 106, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.trip-field__textarea {
  resize: vertical;
  min-height: 92px;
}

.trip-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #9fc6a1;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.trip-chip--active {
  background: rgba(102, 187, 106, 0.14);
  border-color: rgba(102, 187, 106, 0.3);
  color: #dcedc8;
}

.trip-doc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.trip-doc-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-doc-section__headline {
  min-width: 0;
}

.trip-doc-section__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #dcedc8;
}

.trip-doc-section__subtitle {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #88a796;
}

.trip-doc-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-doc-section__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.trip-doc-grid--history {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.trip-doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.trip-doc-card__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
}

.trip-doc-card__preview--clickable {
  cursor: pointer;
}

.trip-doc-card__preview-frame {
  width: 100%;
  height: 100%;
}

.trip-doc-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trip-doc-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  color: #8ba78d;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.trip-doc-card__meta {
  min-width: 0;
}

.trip-doc-card__name {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: #d5e4d5;
  padding: 0;
  font-size: 12px;
  text-align: left;
  cursor: default;
}

.trip-doc-card__name--link {
  cursor: pointer;
  color: #b8ddb9;
}

.trip-doc-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.trip-doc-chip__name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: #d5e4d5;
  padding: 0;
  font-size: 12px;
  cursor: default;
}

.trip-doc-chip__name--link {
  cursor: pointer;
  color: #b8ddb9;
}

.trip-doc-chip__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 0;
  background: rgba(180, 60, 60, 0.16);
  color: #ef9a9a;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trip-editor__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px 16px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
}

.trip-editor__submit {
  width: auto;
  min-width: 180px;
  padding: 0 20px;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(157, 184, 154, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 184, 154, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
}

.map-river {
  position: absolute;
  inset: 18% 18% 24% 12%;
  border-radius: 999px;
  border: 14px solid rgba(110, 165, 210, 0.72);
  filter: blur(10px);
  transform: rotate(-24deg);
  opacity: 0.46;
}

.map-pin,
.track-segment {
  position: absolute;
}

.map-pin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #d8ed99;
  box-shadow: 0 0 0 8px rgba(216, 237, 153, 0.14);
}

.track-segment {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c8db8c, #53b47a);
}

.floating-stack {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 10px;
}

.floating-card,
.bottom-sheet-preview,
.empty-note {
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(17, 26, 19, 0.88);
}

.floating-card {
  padding: 12px 14px;
  min-width: 170px;
  border-radius: 20px;
}

.floating-card__title {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.floating-card__value {
  margin: 6px 0 0;
  font-size: 18px;
}

.bottom-sheet-preview {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 28px;
}

.sheet-handle {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(157, 184, 154, 0.28);
  margin: 0 auto 16px;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.profile-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 30px;
  font-size: 34px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.profile-screen {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 20px 20px 112px;
}

.profile-screen__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-screen__title {
  margin-bottom: 6px;
}

.profile-screen__subtitle {
  margin: 0;
}

.profile-screen__map-button {
  min-height: 42px;
  padding: 0 18px;
  flex: none;
}

.profile-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(35, 67, 59, 1);
  background: linear-gradient(180deg, rgba(20, 31, 27, 0.98), rgba(15, 24, 20, 0.98));
}

.profile-user-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(145deg, #20332d, #172822);
  color: #b9e8de;
}

.profile-user-card__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-user-card__eyebrow {
  margin-bottom: 2px;
}

.profile-user-card__login,
.profile-user-card__role,
.profile-user-card__status {
  margin: 0;
}

.profile-user-card__login {
  font-size: 22px;
  font-weight: 600;
  color: #d6edcc;
}

.profile-user-card__role {
  font-size: 13px;
  color: #8fa89b;
}

.profile-user-card__status {
  font-size: 13px;
  color: #7cc8ba;
}

.profile-user-card__badge-wrap {
  align-self: start;
}

.profile-dashboard {
  display: grid;
  gap: 18px;
}

.profile-group {
  display: grid;
  gap: 12px;
}

.profile-group__header {
  display: grid;
  gap: 6px;
}

.profile-group__header::after {
  content: "";
  display: block;
  height: 1px;
  opacity: 0.16;
  background: currentColor;
}

.profile-group__header--primary {
  color: #67d1c2;
}

.profile-group__header--maps {
  color: #89a887;
}

.profile-group__header--app {
  color: #8fb9e8;
}

.profile-group__header--service {
  color: #b7bec8;
}

.profile-group__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.profile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-tile {
  min-height: 96px;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(157, 184, 154, 0.12);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: space-between;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, opacity 140ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.profile-tile:hover,
.profile-tile:active {
  transform: translateY(-1px);
}

.profile-tile:disabled {
  opacity: 0.56;
  transform: none;
  cursor: default;
}

.profile-tile--primary {
  background: #152521;
  border-color: #254a42;
}

.profile-tile--maps {
  background: #17241a;
  border-color: #2e4d33;
}

.profile-tile--app {
  background: #17212a;
  border-color: #2d4258;
}

.profile-tile--service {
  background: #1b1d20;
  border-color: #3a4048;
}

.profile-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-tile__icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: #d6edcc;
}

.profile-tile__icon svg {
  width: 20px;
  height: 20px;
}

.profile-tile__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-tile__title,
.profile-tile__status {
  margin: 0;
}

.profile-tile__title {
  font-size: 14px;
  font-weight: 600;
  color: #d6edcc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tile__status {
  font-size: 12px;
  color: #9dbb9d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-chip--positive {
  background: #eaf3de;
  color: #27500a;
}

.profile-chip--warning {
  background: #faeeda;
  color: #633806;
}

.profile-chip--info {
  background: #e6f1fb;
  color: #0c447c;
}

.profile-chip--muted {
  background: #2a3035;
  color: #d0d5dc;
}

.profile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 9, 5, 0.52);
  backdrop-filter: blur(10px);
}

.profile-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 82px);
  transform: translateX(-50%);
  z-index: 91;
  width: min(720px, calc(100vw - 24px));
  display: grid;
  gap: 14px;
  padding: 18px 20px 18px;
  border-radius: 24px;
  border: 1px solid rgba(157, 184, 154, 0.18);
  background: linear-gradient(180deg, rgba(18, 25, 22, 0.98), rgba(14, 19, 16, 0.98));
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.36);
}

.profile-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-sheet__eyebrow,
.profile-sheet__title,
.profile-sheet__subtitle,
.profile-sheet__note,
.profile-sheet__label,
.profile-sheet__value {
  margin: 0;
}

.profile-sheet__eyebrow {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-sheet__title {
  font-size: 24px;
  font-weight: 600;
  color: #d6edcc;
}

.profile-sheet__subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #7a9e7c;
}

.profile-sheet__rows {
  display: grid;
  gap: 0;
}

.profile-sheet__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-sheet__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-sheet__label {
  font-size: 14px;
  color: #d6edcc;
}

.profile-sheet__value {
  font-size: 12px;
  color: #8da593;
}

.profile-sheet__note {
  font-size: 12px;
  line-height: 1.5;
  color: #8da593;
}

.profile-sheet__note--success {
  color: #b9dbb6;
}

.profile-sheet__note--error {
  color: #f0aaaa;
}

.profile-sheet__language-actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 16px;
}

.profile-sheet__action-stack {
  display: grid;
  gap: 10px;
  padding: 0 18px 16px;
}

.profile-sheet__action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 16px;
}

.profile-sheet__form {
  display: grid;
  gap: 12px;
  padding: 0 18px 16px;
}

.profile-sheet__field {
  display: grid;
  gap: 8px;
}

.profile-sheet__input {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(134, 170, 129, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #d6edcc;
  font: inherit;
  padding: 0 14px;
  outline: none;
}

.profile-sheet__input:focus {
  border-color: rgba(134, 170, 129, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.profile-sheet__input::placeholder {
  color: #718876;
}

.profile-invite-result {
  display: grid;
  gap: 10px;
  margin: 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 16, 10, 0.55);
}

.profile-invite-result__code {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: #f0f6e5;
  word-break: break-word;
}

.profile-action-button {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(134, 170, 129, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #cfe1c7;
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-action-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-action-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.profile-action-button--primary {
  background: rgba(134, 170, 129, 0.18);
  border-color: rgba(134, 170, 129, 0.45);
  color: #f0f6e5;
}

.profile-log-preview {
  display: grid;
  gap: 10px;
  margin: 0 18px 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 16, 10, 0.55);
  max-height: 240px;
  overflow-y: auto;
}

.profile-log-preview--empty {
  color: #8da593;
  font-size: 12px;
}

.profile-log-preview__entry {
  display: grid;
  gap: 4px;
}

.profile-log-preview__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #9db49e;
}

.profile-log-preview__text {
  font-size: 12px;
  line-height: 1.45;
  color: #d6edcc;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-language-button {
  flex: 1 1 0;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(134, 170, 129, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #cfe1c7;
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.profile-language-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-language-button--active {
  background: rgba(134, 170, 129, 0.18);
  border-color: rgba(134, 170, 129, 0.45);
  color: #f0f6e5;
}

.profile-sheet__close {
  flex: none;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-screen {
    padding: 16px 16px 112px;
    gap: 16px;
  }

  .profile-screen__header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-screen__map-button {
    width: 100%;
  }

  .profile-user-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-user-card__badge-wrap {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-sheet {
    bottom: 0;
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-left: 0;
    border-right: 0;
    transform: translateX(-50%);
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .profile-sheet__action-row {
    grid-template-columns: 1fr;
  }
}

.drawer-toggle {
  display: none;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(137, 168, 135, 0.16);
  background: rgba(31, 48, 35, 0.94);
  color: var(--text);
  cursor: pointer;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 5, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.drawer-panel {
  transition: transform 180ms ease;
}

.bottom-nav {
  flex: none;
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100vw - 20px), 760px);
  max-width: none;
  margin: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 6), minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(17, 26, 19, 0.82);
  border: 1px solid rgba(157, 184, 154, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.work-nav-dismiss {
  position: fixed;
  inset: 0;
  z-index: 69;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.work-nav-slot {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
}

.work-nav-slot--open {
  z-index: 2;
}

.work-nav-slot > .nav-button {
  width: 100%;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.work-nav-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  min-width: 132px;
  padding: 5px;
  border: 1px solid rgba(157, 184, 154, 0.24);
  border-radius: 8px;
  background: rgba(17, 26, 19, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
  z-index: 3;
  pointer-events: auto;
}

.work-nav-menu__item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(31, 48, 35, 0.96);
  color: var(--nav-selected);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0;
  white-space: nowrap;
  touch-action: manipulation;
  pointer-events: auto;
}

.work-nav-menu__icon {
  display: inline-grid;
  place-items: center;
}

.work-nav-menu__icon svg {
  width: 20px;
  height: 20px;
}

.nav-button {
  position: relative;
  min-width: 0;
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 8px 6px;
  background: transparent;
  color: var(--nav-unselected);
  display: grid;
  justify-items: center;
  gap: 6px;
}

.nav-button__icon-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d65d5d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.nav-button svg,
.icon-button svg,
.chip svg,
.action-button svg,
.drawer-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-button--active {
  background: rgba(31, 48, 35, 0.96);
  color: var(--nav-selected);
}

.nav-label {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0;
}

.chat-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 18px;
}

.chat-image-viewer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 5, 3, 0.78);
  backdrop-filter: blur(8px);
}

.chat-image-viewer__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: min(100%, calc(var(--app-viewport-height, 100dvh) - 36px));
  display: grid;
  gap: 10px;
}

.chat-image-viewer__toolbar {
  display: flex;
  justify-content: flex-end;
}

.chat-image-viewer__close {
  background: rgba(10, 14, 11, 0.76);
}

.chat-image-viewer__image {
  display: block;
  width: 100%;
  max-height: calc(var(--app-viewport-height, 100dvh) - 96px);
  object-fit: contain;
  border-radius: 20px;
  background: rgba(6, 9, 6, 0.86);
  box-shadow: var(--shadow);
}

.empty-note {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: start;
  min-height: 260px;
  padding: 28px;
  border-radius: 28px;
  border-style: dashed;
}

.empty-note h3,
.empty-note p {
  margin: 0;
}

.empty-note p {
  max-width: 520px;
  line-height: 1.5;
}

.empty-note--compact {
  min-height: 180px;
  padding: 20px;
  border-radius: 20px;
}

.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: auto;
}

.call-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 5, 0.58);
  backdrop-filter: blur(10px);
}

.call-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  padding: 28px 24px 24px;
  border-radius: 28px;
  border: 1px solid rgba(157, 184, 154, 0.18);
  background: linear-gradient(180deg, rgba(26, 37, 29, 0.98), rgba(15, 24, 17, 0.98));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.call-sheet__eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.call-sheet__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.05;
}

.call-sheet__status,
.call-sheet__duration,
.call-sheet__error {
  margin: 0;
}

.call-sheet__status {
  color: rgba(214, 237, 204, 0.82);
  font-size: 15px;
}

.call-sheet__duration {
  color: #b7d7ad;
  font-size: 14px;
  font-weight: 600;
}

.call-sheet__error {
  color: #ffb5b5;
  font-size: 14px;
}

.trip-doc-section--history {
  padding: 10px;
  gap: 8px;
}

.call-sheet__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.call-action {
  min-height: 84px;
  border-radius: 24px;
  border: 1px solid rgba(157, 184, 154, 0.16);
  background: rgba(27, 40, 29, 0.88);
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 12px;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.call-action:hover,
.call-action:active {
  transform: translateY(-1px);
}

.call-action svg {
  width: 24px;
  height: 24px;
}

.call-action span {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.call-action--ghost {
  background: rgba(24, 35, 26, 0.92);
}

.call-action--selected {
  background: rgba(63, 107, 71, 0.26);
  border-color: rgba(131, 175, 135, 0.34);
  color: #d9f0ce;
}

.call-action--primary {
  background: rgba(64, 118, 73, 0.98);
  border-color: rgba(128, 182, 137, 0.3);
  color: #eef9e9;
}

.call-action--danger {
  background: rgba(122, 31, 31, 0.92);
  border-color: rgba(255, 133, 133, 0.2);
  color: #ffd7d7;
}

@media (max-width: 1180px) {
  .screen-grid--detail {
    grid-template-columns: clamp(208px, 24vw, 248px) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .auth-screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .auth-shell {
    gap: 22px;
  }

  .auth-logo-tile {
    width: 96px;
    height: 96px;
    border-radius: 24px;
  }

  .auth-logo-tile img {
    width: 64px;
    height: 64px;
    object-fit: contain;
  }

  .auth-panel {
    padding: 14px;
    border-radius: 26px;
  }

  .app-shell {
    display: block;
    height: var(--app-viewport-height, 100dvh);
    min-height: var(--app-viewport-height, 100dvh);
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .app-shell--screen-map {
    padding: 0;
  }

  .phone-frame {
    gap: 14px;
    min-height: 0;
    height: 100%;
    width: 100%;
  }

  .top-bar {
    padding: 12px 14px;
    border-radius: 20px;
  }

  .top-bar__actions {
    display: none;
  }

  .content-card {
    border-radius: 28px;
  }

  .content-card--screen-map {
    border-radius: 0;
  }

  .screen-grid,
  .screen-grid--detail {
    grid-template-columns: 1fr;
  }

  .panel--rail {
    position: fixed;
    top: 88px;
    left: 12px;
    width: min(340px, calc(100vw - 24px));
    height: calc(var(--app-viewport-height, 100dvh) - 186px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    z-index: 60;
    border-right: 0;
    border-radius: 28px;
    transform: translateX(-110%);
    box-shadow: var(--shadow);
  }

  .panel--rail.drawer-open {
    transform: translateX(0);
  }

  .drawer-backdrop.drawer-open {
    opacity: 1;
    pointer-events: auto;
    z-index: 50;
  }

  .drawer-toggle {
    display: inline-flex;
    justify-content: center;
  }

  .section {
    padding: 18px;
  }

  .surface-toolbar {
    padding: 16px 18px;
  }

  .messages {
    padding: 16px 18px 10px;
  }

  .composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 16px 16px;
  }

  .composer-recording-shell {
    padding: 12px 16px 16px;
  }

  .composer-cancel {
    padding: 0 14px;
  }

  .camera-capture-sheet {
    width: calc(100vw - 16px);
    max-height: calc(var(--app-viewport-height, 100dvh) - 16px);
    border-radius: 24px;
  }

  .camera-capture-sheet__header {
    padding: 16px 16px 12px;
  }

  .camera-capture-preview {
    margin: 0 12px;
    border-radius: 18px;
  }

  .camera-capture-sheet__actions {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    margin: 0;
    gap: 6px;
    padding: 10px;
    border-radius: 24px;
    z-index: 40;
  }

  .call-overlay {
    padding: 16px;
  }

  .call-sheet {
    width: min(100%, 360px);
    padding: 24px 18px 18px;
    border-radius: 24px;
  }

  .call-sheet__actions {
    grid-template-columns: 1fr;
  }

  .nav-button {
    padding: 10px 6px;
  }

  .nav-label {
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .section.buffering-screen {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .bottom-nav {
    gap: 2px;
    padding: 6px;
    border-radius: 18px;
  }

  .nav-button {
    gap: 4px;
    padding: 8px 2px;
    border-radius: 12px;
  }

  .nav-button svg {
    width: 20px;
    height: 20px;
  }

  .nav-label {
    font-size: 9px;
  }

  .buffering-editor__actions {
    grid-template-columns: 1fr;
  }

  .buffering-editor__actions .marker-mini-action {
    min-height: 38px;
  }

  .buffering-fuel-dialog__actions {
    grid-template-columns: 1fr;
  }

  .trip-editor__head,
  .trip-editor__body,
  .trip-editor__actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .trip-editor__actions {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  }

  .trip-editor__submit {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .trip-doc-section__head {
    gap: 8px;
  }

  .trip-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chat-history-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding:8px;font-size:14px}.reply-quote{display:flex;flex-direction:column;text-align:left;color:inherit;background:rgba(160,220,170,.08);border:0;border-left:3px solid #80b48c;padding:8px;max-width:100%;cursor:pointer}.reply-quote span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.message-reactions{display:flex;flex-wrap:wrap;gap:5px}.reaction-chip{border:1px solid #54795b;border-radius:14px;background:transparent;color:inherit;padding:3px 8px;cursor:pointer}.reaction-chip--mine{background:#416b4b}

.group-panel{position:fixed;inset:10% max(16px,calc((100vw - 560px)/2));z-index:80;background:#1c3021;border:1px solid #52735a;border-radius:20px;padding:24px;overflow:auto}.group-panel label{display:block;margin:8px 0}.group-panel input:not([type=checkbox]){display:block;width:100%;padding:10px;color:inherit;background:#102117;border:1px solid #52735a}.group-panel fieldset{max-height:32vh;overflow:auto;border:1px solid #52735a}

.radio-panel{position:fixed;z-index:90;left:50%;top:15%;transform:translateX(-50%);width:min(520px,calc(100vw - 32px));padding:24px;border:1px solid #658e6d;border-radius:24px;background:#203b28;box-shadow:0 20px 80px #0008}.radio-panel p{font-size:16px}.radio-panel .chip-row{flex-wrap:wrap}
.call-video-stage{position:relative;width:100%;aspect-ratio:4/3;background:#09170e;border-radius:16px;overflow:hidden}.call-video-stage video[data-call-remote-video]{width:100%;height:100%;object-fit:contain}.call-video-stage video[data-call-local-video]{position:absolute;right:10px;bottom:10px;width:28%;aspect-ratio:3/4;object-fit:cover;border:1px solid #9ab997;border-radius:10px}.call-camera-off{position:absolute;right:10px;bottom:10px;max-width:28%;font-size:11px;background:#132d1b;padding:6px}.call-sheet{max-height:calc(var(--app-viewport-height, 100dvh) - 32px);overflow:auto}
.call-sheet--video{display:flex;flex-direction:column;width:min(100%,600px);gap:10px}.call-sheet--video>*{flex-shrink:0}.call-sheet--video>p{margin:0}.call-sheet--video .call-video-stage{aspect-ratio:16/9}.call-sheet--video .call-sheet__actions{grid-template-columns:repeat(2,minmax(0,1fr))}.call-sheet--video .call-action{min-height:64px;border-radius:16px}
.map-field-panel-shell{position:absolute;right:12px;top:64px;z-index:14;max-width:calc(100% - 24px);pointer-events:auto}.map-field-toggle{background:#203b28;border:1px solid #638b69;border-radius:12px;padding:10px}.map-field-panel{width:310px;max-width:100%;max-height:55dvh;overflow:auto;background:#1c3021;border:1px solid #638b69;border-radius:12px;padding:14px;margin-top:6px;font-size:14px}.map-field-toggles{display:grid;gap:8px}.map-field-panel select{width:100%;background:#102117;color:inherit;padding:8px;margin-top:6px}.map-field-panel fieldset{margin-top:12px;border:1px solid #52735a}.map-fleet-list{max-height:180px;overflow:auto}.map-fleet-list>div{padding:8px 0;border-bottom:1px solid #52735a}.map-fleet-list small{display:block}.map-speed-legend{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px}.map-speed-legend i{display:inline-block;width:12px;height:6px;margin-right:4px}.map-speed-legend p{margin:0;font-size:12px}
.map-field-panel button{background:#2e5037;color:#edf7e8;border:1px solid #65856b;border-radius:8px;padding:7px 10px;margin:4px 4px 4px 0;font:inherit;cursor:pointer}.map-field-panel button:disabled{opacity:.6}.map-field-panel input[type=search]{width:100%;padding:8px;border:1px solid #65856b;border-radius:8px;background:#102117;color:#edf7e8;font:inherit}.map-field-panel label{line-height:1.5}.map-field-panel a{color:#c4e6bc}.map-field-toggle{color:#edf7e8;font:inherit}

.trip-editor__fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
.trip-tariff-list { display: grid; gap: 8px; max-height: 350px; overflow: auto; }
.trip-tariff-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #526345; border-radius: 10px; cursor: pointer; }
.trip-tariff-card--selected { border-color: #8dc969; background: #253622; }
.trip-tariff-card > span { min-width: 0; display: grid; gap: 5px; overflow-wrap: anywhere; }
.trip-tariff-card small { opacity: .8; }
.work-config-dialog { color: #f2f4d0; background: #19281b; border: 1px solid #597149; border-radius: 16px; width: min(440px, calc(100% - 32px)); max-height: 80vh; padding: 22px; overflow: auto; }
.work-config-dialog::backdrop { background: #000a; }
.work-config-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.work-config-dialog__actions button { white-space: normal; }
.work-multi-options { display: flex; gap: 12px; flex-wrap: wrap; }
.work-dynamic-section { min-width: 0; }
.work-multi-field { border: 0; padding: 0; margin: 0; min-width: 0; }

/* The transformed mobile root gives fixed sheets/navigation the same visible
   viewport as the chat. Native dialogs live in the browser top layer. */
@media (max-width: 900px), (pointer: coarse) {
  #app { position: fixed; inset: 0; height: var(--app-viewport-height, 100dvh);
    transform: translateY(var(--app-viewport-top, 0px)); }
  input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px; }
  .app-shell:not(.app-shell--screen-map) {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .auth-screen { height: var(--app-viewport-height, 100dvh); min-height: 0;
    align-items: start; overflow-y: auto;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right)); }
  .auth-shell { margin-block: auto; }
  .keyboard-open .bottom-nav, .keyboard-open .work-nav-dismiss { display: none; }
  .keyboard-open .app-shell:not(.app-shell--screen-map) { padding-bottom: 6px; }
  .keyboard-open .profile-sheet { bottom: 0; max-height: calc(var(--app-viewport-height, 100dvh) - 16px); }
  .work-config-dialog { max-height: calc(var(--app-viewport-height, 100dvh) - 24px); overflow: auto; }
  button, .marker-mini-action, .trip-choice, .profile-sheet__close { min-height: 44px; }
  .content-card, .panel, .section, .trip-field, .work-config-field { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* Documents: finger-sized controls and scrollable sheets above the iPhone keyboard. */
.documents-screen { height:100%; overflow:auto; overscroll-behavior:contain; padding:20px; color:var(--text-primary,#e6f1e4); }
.documents-heading { display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.documents-screen h1 { font-size:24px; margin:0; }
.documents-screen h2 { font-size:18px; }
.documents-screen p { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.document-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.documents-screen button { min-height:44px; padding:9px 13px; border:1px solid #446047; border-radius:12px; background:#223225; color:#e6f1e4; font:inherit; cursor:pointer; touch-action:manipulation; }
.documents-screen button:disabled { opacity:.45; cursor:default; }
.documents-screen button:focus-visible { outline:2px solid #8bd17f; outline-offset:2px; }
.document-sections { display:flex; gap:8px; overflow-x:auto; padding:12px 0; }
.document-sections button { flex-shrink:0; }
.document-sections [aria-current="page"] { background:#3a603b; border-color:#8bd17f; }
.document-item { min-width:0; padding:12px; border:1px solid #315234; border-radius:16px; background:#132719; margin:12px 0; }
.document-item header { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; overflow-wrap:anywhere; }
.document-item header span,.document-file small { font-size:12px; color:#abc3a6; }
.document-file { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 0; }
.document-file>span { flex:1 1 150px; min-width:0; overflow-wrap:anywhere; }
.document-file small { display:block; margin-top:5px; }
.document-warning { color:#ffb4a5; }
.document-preview { display:block; max-width:100%; max-height:50vh; object-fit:contain; margin:12px auto; }
.document-download { display:inline-flex; align-items:center; min-height:44px; padding:9px 13px; border:1px solid #446047; border-radius:12px; color:#e6f1e4; }
.documents-modal { position:fixed; inset:0; background:#0009; z-index:100; display:flex; align-items:center; justify-content:center; padding:16px; }
.documents-modal>section { width:min(540px,100%); max-height:100%; overflow:auto; background:#132719; border:1px solid #446047; border-radius:20px; padding:20px; }
.documents-modal label { display:block; font-size:14px; margin:12px 0; }
.documents-modal input,.documents-modal select { width:100%; box-sizing:border-box; min-height:44px; margin-top:6px; padding:10px; border:1px solid #446047; background:#102116; color:#e6f1e4; border-radius:10px; font-size:16px; }
@media(max-width:600px) { .documents-screen { padding:14px; } .documents-modal { align-items:flex-end; padding:8px; padding-bottom:max(8px,env(safe-area-inset-bottom)); } .documents-modal>section { padding:16px; } }

.map-field-toggles label,.map-fleet-list label{display:flex;align-items:center;gap:8px;min-height:44px}.map-field-panel select,.map-field-panel input[type=search]{font-size:16px;min-height:44px}.map-field-panel summary{min-height:44px;padding:10px 0;cursor:pointer}.map-field-panel details{border-top:1px solid #52735a}

.chat-queue-status{max-height:35dvh;overflow:auto}.chat-queue-status summary{cursor:pointer;min-height:44px;padding:10px 0}.chat-queue-item{border-top:1px solid currentColor;padding:8px 0;overflow-wrap:anywhere}.chat-queue-item p{margin:4px 0}.chat-queue-item button{min-height:44px}.chat-queue-item small{display:block}

.buffering-closed-photo{display:block;width:100%;max-width:340px;max-height:220px;object-fit:contain;border-radius:12px;margin:8px 0}

.forest-storage-list{max-height:180px;overflow:auto;overflow-wrap:anywhere}.profile-sheet progress{width:100%;height:12px}

.map-field-panel-shell{top:auto;bottom:max(208px,calc(env(safe-area-inset-bottom) + 192px));right:16px}.map-field-panel{position:absolute;right:0;bottom:calc(100% + 8px);margin:0;width:min(310px,calc(100vw - 32px));max-width:none;max-height:min(55dvh,calc(var(--app-viewport-height,100dvh) - 300px));box-sizing:border-box}.map-field-toggle{min-height:44px}

.call-mini-bar{position:fixed;left:12px;right:12px;bottom:calc(86px + env(safe-area-inset-bottom));z-index:80;display:flex;gap:8px;padding:6px;border-radius:16px;background:#173c28;box-shadow:0 8px 28px #0005}.call-mini-bar .call-action{min-height:44px;margin:0}.call-mini-bar .call-action:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
