:root {
  --bg: #01242f;
  --bg-2: #001f24;
  --panel: #001f24;
  --panel-2: #002a32;
  --line: #1eb5c1;
  --text: #ffffff;
  --muted: #ffffff;
  --cyan: #1eb5c1;
  --cyan-2: #35f0ff;
  --cyan-dark: #159aa5;
  --white: #ffffff;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  padding: max(16px, env(safe-area-inset-top)) 14px calc(86px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.topbar {
  height: 44px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

body:not([data-current-screen="start"]):not([data-current-screen="login"]):not([data-current-screen="summary"]) .topbar {
  display: flex;
}

body[data-current-screen="start"],
body[data-current-screen="start"] .app-shell {
  background: #01242f;
}

.icon-button,
.back-button,
.map-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  position: relative;
}

.icon-button svg,
.back-button svg,
.map-button svg,
.bottom-nav svg,
.row-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gps-pill {
  min-width: 144px;
  text-align: center;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 14px;
  box-shadow: none;
}

.badge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--bg);
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.view {
  display: none;
  animation: show 180ms ease-out;
}

.view.active {
  display: block;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.08;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
}

.start-view {
  min-height: calc(100vh - 132px);
  display: none;
  place-content: center;
  gap: 18px;
  position: relative;
  background: transparent;
  padding-bottom: 96px;
  box-sizing: border-box;
}

.start-view.active {
  display: grid;
}

.app-version {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 11px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-block {
  text-align: center;
  display: grid;
  gap: 8px;
}

.profile-view {
  position: relative;
  padding-bottom: 22px;
}

.profile-version {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 11px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo {
  width: min(230px, 72vw);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
}

.brand-subtitle {
  margin: 0;
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
}

.benefits {
  display: grid;
  gap: 10px;
  width: min(100%, 320px);
  margin: 0 auto;
  justify-self: center;
  color: var(--white);
}

.benefits div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.small-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--bg);
  background: var(--cyan);
  font-size: 11px;
  font-weight: 900;
}

.stacked-actions {
  display: grid;
  gap: 10px;
}

.start-view .stacked-actions {
  margin-top: 14px;
}

.start-help-line {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.start-help-line:active,
.start-help-line:focus-visible {
  color: var(--cyan);
}

#startMainButton {
  position: relative;
  isolation: isolate;
}

#startMainButton::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(30, 165, 187, 0.5);
  z-index: -1;
  animation: tzmButtonPulse 2.8s infinite;
}

@keyframes tzmButtonPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

body.is-installed .start-view .install-button {
  display: none;
}

body.is-installed .start-view .install-status {
  display: none;
}

body.is-installed .start-view .install-help {
  display: none;
}

body.install-confirmed:not(.is-installed) .start-view .install-button,
body.install-confirmed:not(.is-installed) .start-view .install-status,
body.install-confirmed:not(.is-installed) .start-view .install-help {
  display: none;
}

.start-view .install-button,
.start-view .install-status,
.start-view .install-help,
.start-view .install-success {
  display: none !important;
}

body.is-installed .start-view .install-success {
  display: none;
}

@media (min-width: 760px) {
  .start-view .install-button {
    display: none;
  }

  .start-view .install-status {
    display: none;
  }

  .start-view .install-help {
    display: none;
  }

  .start-view .install-success {
    display: none;
  }

  body:not(.is-installed) .start-view .stacked-actions .primary-button,
  body:not(.is-installed) .start-view .stacked-actions .secondary-button {
    display: block;
  }
}

.primary-button,
.secondary-button,
.ghost-button,
.row-button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.route-actions .row-button {
  font-weight: 400;
  text-transform: none;
}

.primary-button {
  background: var(--cyan);
  color: var(--white);
  box-shadow: none;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.row-button:disabled {
  opacity: 0.72;
}

.secondary-button {
  background: var(--bg);
  color: var(--white);
  border-color: var(--cyan);
}

.summary-edit-button {
  width: 100%;
  background: var(--bg);
  color: var(--cyan);
  border-color: var(--cyan);
  margin-top: 10px;
}

.ghost-button {
  background: var(--bg);
  color: var(--white);
}

.install-button {
  min-height: 50px;
  border-radius: 8px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: var(--bg);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.install-button:disabled {
  opacity: 0.72;
}

.install-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.install-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.install-help {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--white);
  font-size: 13px;
}

.install-help[hidden] {
  display: none;
}

.install-help strong {
  color: var(--cyan);
}

.install-help p {
  color: var(--muted);
}

.install-help .ghost-button {
  min-height: 40px;
  font-size: 12px;
}

.install-success {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: var(--bg);
  color: var(--white);
  text-align: center;
}

.install-success[hidden] {
  display: none;
}

.install-success strong {
  color: var(--cyan);
  font-size: 15px;
}

.install-success p {
  color: var(--muted);
  font-size: 13px;
}

.screen-title {
  min-height: 48px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  margin-bottom: 18px;
}

.screen-title h2 {
  grid-column: 2;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-panel,
.summary-card {
  padding: 16px;
  display: grid;
  gap: 15px;
}

.summary-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}

.summary-map-slot {
  margin: 0 0 14px;
}

.summary-map-slot .map-panel {
  margin-bottom: 0;
}

.login-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  padding: 13px 12px;
}

textarea {
  resize: vertical;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.code-grid input {
  text-align: center;
  padding: 11px 0;
  font-weight: 900;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.map-panel {
  height: 246px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  margin-top: 6px;
}

.google-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 28px;
  text-align: center;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(30, 165, 187, .13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 165, 187, .13) 1px, transparent 1px),
    var(--bg-2);
  background-size: 28px 28px;
}

.map-fallback strong {
  color: var(--cyan-light);
  font-size: 18px;
}

.map-fallback span {
  color: var(--muted);
  font-size: 13px;
}

.map-panel.map-ready .map-fallback {
  display: none;
}

.map-button {
  position: absolute;
  right: 12px;
  background: var(--bg);
  z-index: 3;
}

.map-button.locate {
  top: 102px;
}

.map-button.zoom {
  top: 150px;
}

.ride-card {
  margin-top: 12px;
  position: relative;
  padding: 12px 0 0;
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}

.route-field {
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
}

.route-field span {
  color: var(--white);
  font-size: 18px;
}

.route-field input {
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  font-size: 18px;
  font-weight: 400;
}

.address-clear-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.route-field.end {
  margin-top: 6px;
  padding-top: 0;
}

.route-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.destination-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.route-actions[hidden],
.destination-actions[hidden] {
  display: none;
}

.row-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  color: var(--text);
  border-color: var(--line);
  text-transform: none;
  min-height: 42px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.route-actions .row-button,
.route-inline-action .row-button,
.destination-actions .row-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 0 12px 0 0;
}

.route-inline-action {
  display: grid;
  justify-items: stretch;
}

.route-inline-action .row-button {
  width: 100%;
}

.route-inline-action .row-button svg,
.route-actions .row-button svg,
.destination-actions .row-button svg {
  box-sizing: content-box;
  width: 17px;
  height: 17px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.ride-options {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
}

.scheduled-fields {
  display: grid;
  gap: 10px;
}

.scheduled-fields[hidden] {
  display: none;
}

.route-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 38px;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.route-item.stop-item {
  grid-template-columns: 82px minmax(0, 1fr) 38px;
  gap: 8px;
  padding-right: 0;
}

.route-item.wait-item {
  grid-template-columns: 82px minmax(0, 1fr) 38px;
}

.route-item-label {
  min-height: 40px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
}

.route-item input,
.minute-input {
  min-width: 0;
  min-height: 40px;
}

.route-item input {
  padding: 0 12px;
}

.minute-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.minute-input input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.minute-input span {
  padding-right: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-item button {
  width: 38px;
  height: 38px;
  min-height: 40px;
  justify-self: end;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--white);
  padding: 0;
}

.route-item.stop-item button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  justify-self: end;
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button,
.tabs button {
  min-height: 42px;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.segmented button.active,
.tabs button.active {
  color: var(--white);
  background: var(--cyan-dark);
}

.toggle-line,
.compact-field,
.select-line {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 4px 12px 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.select-line select {
  width: min(170px, 52%);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.scheduled-fields .select-line {
  border: 0;
  border-radius: 0;
  padding: 4px 12px 4px 2px;
}

.scheduled-fields input[type="date"],
.scheduled-fields input[type="time"] {
  width: 170px;
  margin-left: auto;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--white);
  color-scheme: dark;
  accent-color: var(--cyan);
}

.toggle-line input {
  width: 42px;
  height: 22px;
  accent-color: var(--cyan);
}

.compact-field input {
  width: 78px;
  padding: 8px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.summary-card dl {
  margin: 0;
  display: grid;
  gap: 0;
}

.summary-card dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  padding: 12px 0;
}

.summary-card dt {
  color: var(--muted);
}

.summary-card dd {
  margin: 0;
}

.summary-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--white);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-box {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0;
}

.route-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.route-summary-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(68px, auto);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
  padding-right: 4px;
  box-sizing: border-box;
}

.route-summary-row strong {
  color: var(--white);
  display: block;
  font-size: 16px;
}

.route-summary-row.muted-leg strong {
  font-size: 13px;
  color: var(--muted);
}

.fee-summary {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
  display: grid;
  gap: 7px;
}

.fee-summary > strong {
  color: var(--white);
  font-weight: 800;
}

.fee-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(68px, auto);
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  padding-right: 4px;
  box-sizing: border-box;
}

.fee-summary-row strong {
  color: var(--white);
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.route-summary-row > :last-child {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.price-box span {
  color: var(--muted);
}

.price-box strong {
  font-size: 38px;
  color: var(--white);
  font-weight: 500;
}

.discount-price-box {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 6px;
}

.discount-price-box span,
.discount-price-box small {
  color: var(--cyan);
}

.discount-price-box strong {
  font-size: 38px;
  color: var(--cyan);
  font-weight: 900;
}

.discount-join-button {
  min-height: 42px;
  margin-top: 6px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
}

.discount-join-button span,
.discount-join-button .join-button-subtitle {
  color: var(--white);
}

.join-button-subtitle {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.1;
  opacity: 0.95;
  text-transform: none;
  letter-spacing: 0;
}

.discount-join-button[hidden] {
  display: none;
}

.price-box p {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  margin: 12px 0;
}

.notifications-view .tabs {
  grid-template-columns: repeat(2, 1fr);
}

.reservations-view > h2,
.loyalty-view > h2,
.debts-view > h2 {
  margin: 18px 0;
}

.context-tabs {
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 14px;
}

.tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--bg);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

.tab-badge[hidden] {
  display: none;
}

.reservation-list,
.notification-list {
  display: grid;
  gap: 10px;
}

.reservations-view .reservation-list {
  margin-top: 14px;
  padding-bottom: calc(156px + env(safe-area-inset-bottom));
}

.reservation-card,
.notification-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 13px;
}

.reservation-card {
  display: block;
}

.reservation-card.empty {
  display: block;
}

.reservation-summary {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(88px, 96px) 20px;
  gap: 8px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.reservation-summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--cyan);
  transition: transform 160ms ease;
}

.reservation-summary[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.reservation-card time {
  display: grid;
  gap: 3px;
  font-weight: 900;
}

.reservation-card time span {
  color: var(--muted);
  font-size: 12px;
}

.reservation-places {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reservation-places span {
  color: var(--white);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.reservation-card p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.reservation-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.reservation-details dl {
  display: grid;
  gap: 8px;
}

.reservation-details div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.reservation-details dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reservation-details dd {
  color: var(--white);
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.reservation-details .price-detail dd {
  color: var(--cyan);
  font-weight: 900;
}

.reservation-details .price-detail-regular dd {
  color: var(--white);
  font-weight: 900;
}

.reservation-details .price-detail-discount dd {
  color: var(--cyan);
  font-weight: 900;
}

.reservation-details .discount-info-detail dd {
  color: var(--cyan);
  font-weight: 800;
}

.reservation-cancel-button {
  margin-top: 14px;
}

.status {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: pre-line;
}

.bottom-action {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 402px);
  z-index: 4;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px 22px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.notification-card strong {
  display: block;
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.notification-card p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-card time {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-align: right;
  display: grid;
  gap: 2px;
}

.notification-chevron {
  display: grid;
  place-items: center;
  color: var(--cyan);
}

.notification-chevron svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.notification-card.expanded .notification-chevron svg {
  transform: rotate(180deg);
}

.notification-card.unread strong {
  color: var(--cyan);
  font-weight: 900;
}

.notification-card.expanded p {
  display: block;
  overflow: visible;
  white-space: pre-wrap;
  margin-top: 8px;
}

.notification-copy {
  min-width: 0;
}

.guest-prompt {
  padding: 16px;
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.guest-prompt p {
  color: var(--muted);
}

.loyalty-card,
.debt-card,
.account-card {
  padding: 16px;
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.loyalty-view .loyalty-card {
  background: transparent;
}

.debts-view .debt-card {
  background: transparent;
}

.loyalty-card > span,
.debt-card > span,
.account-card > span {
  width: max-content;
  border-radius: 7px;
  background: var(--cyan-dark);
  color: var(--white);
  padding: 5px 8px;
  font-weight: 800;
}

.loyalty-card strong,
.debt-card strong,
.account-card strong {
  font-size: 24px;
}

.loyalty-card p,
.debt-card p,
.account-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.savings,
.loyalty-details,
.payment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.loyalty-details {
  display: grid;
  gap: 8px;
}

.loyalty-details > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.loyalty-row {
  padding-top: 0;
}

.loyalty-details > div > span {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.loyalty-details > div > strong {
  font-size: 18px;
  min-width: 0;
  justify-self: end;
  text-align: right;
  overflow-wrap: anywhere;
}

.loyalty-promo {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.loyalty-promo p {
  margin: 0;
  color: var(--muted);
}

.loyalty-promo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.loyalty-promo-list {
  display: grid;
  gap: 8px;
}

.loyalty-promo-list article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.loyalty-promo-list span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--cyan);
  color: var(--bg-2);
  font-weight: 900;
}

.loyalty-promo-list strong {
  font-size: 18px;
  display: block;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 3px;
  text-align: left;
}

.loyalty-promo-note {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.loyalty-context-list,
.debt-details-list {
  display: grid;
  gap: 14px;
}

.savings-history,
.debt-history,
.context-notifications {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.savings-history,
.debt-history {
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 12px;
  background: rgba(30, 165, 187, 0.04);
}

.savings-history h3,
.debt-history h3,
.context-notifications h3 {
  margin: 0;
  font-size: 20px;
}

.savings-history p,
.debt-history p,
.context-empty {
  margin: 0;
  color: var(--muted);
}

.loyalty-row.highlight-row span {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.16;
}

.loyalty-row.highlight-row strong {
  color: var(--cyan);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.12;
}

.loyalty-row.highlight-row strong {
  white-space: nowrap;
}

.loyalty-row:not(.highlight-row):not(.danger-row):not(.accent-row) strong {
  white-space: normal;
}

.loyalty-row.danger-row span {
  color: #ff4d4d;
  font-size: 20px;
  font-weight: 400;
}

.loyalty-row.danger-row strong {
  color: #ff4d4d;
  font-size: 25px;
  font-weight: 900;
  white-space: nowrap;
}

.loyalty-row.subtle-row span,
.loyalty-row.subtle-row strong {
  font-size: 20px;
  font-weight: 400;
}

.loyalty-row.accent-row span,
.loyalty-row.accent-row strong {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 700;
}

.loyalty-row.accent-row strong {
  white-space: nowrap;
}

.loyalty-row:not(.highlight-row):not(.danger-row):not(.accent-row) span,
.loyalty-row:not(.highlight-row):not(.danger-row):not(.accent-row) strong {
  font-size: 20px;
  font-weight: 400;
}

.loyalty-row.update-row span,
.loyalty-row.update-row strong {
  font-size: 10px;
  font-weight: 400;
}

.loyalty-row.update-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.loyalty-debt-warning {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.loyalty-debt-warning p {
  color: #ff4d4d;
  font-weight: 800;
}

.danger-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #d92929;
  border: 1px solid #d92929;
  color: var(--white);
}

.context-notification-list {
  display: grid;
  gap: 10px;
}

.context-notification-card {
  grid-template-columns: minmax(0, 1fr) 22px;
}

.context-notification-card .notification-copy small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin: 5px 0 8px;
  line-height: 1.25;
}

.context-value {
  color: var(--cyan);
  font-weight: 900;
}

.savings-history-row,
.debt-history-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
}

.savings-history-list {
  display: grid;
  gap: 8px;
}

.savings-history-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 2px 0;
}

.savings-history-line span {
  color: var(--muted);
  font-size: 15px;
}

.savings-history-line strong {
  font-size: 16px;
}

.savings-history-line b {
  color: var(--cyan-2);
  font-size: 18px;
  text-align: right;
  white-space: nowrap;
}

.savings-history-row summary,
.debt-history-row summary {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.debt-history-row summary {
  grid-template-columns: minmax(0, 1fr) auto 22px;
}

.savings-history-row summary::-webkit-details-marker,
.debt-history-row summary::-webkit-details-marker {
  display: none;
}

.savings-history-row span,
.debt-history-row span {
  color: var(--muted);
  font-size: 15px;
}

.savings-history-row strong,
.debt-history-row strong {
  font-size: 16px;
}

.savings-history-row b,
.debt-history-row b {
  color: var(--cyan-2);
  font-size: 18px;
  text-align: right;
}

.savings-history-row dl,
.debt-history-row dl {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 7px;
}

.savings-history-row dl div,
.debt-history-row dl div {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 10px;
}

.debt-detail-list {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 7px;
}

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

.debt-detail-line span {
  color: var(--muted);
  font-size: 13px;
}

.debt-detail-line strong {
  color: var(--cyan-2);
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
}

.savings-history-row dt,
.debt-history-row dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.savings-history-row dd,
.debt-history-row dd {
  color: var(--white);
  font-size: 13px;
  word-break: break-word;
}

.debt-card #debtAmountLabel {
  color: #ff4d4d;
  display: grid;
  gap: 6px;
  line-height: 1.15;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.debt-card #debtAmountLabel .debt-total-label {
  font-size: 20px;
  font-weight: 400;
}

.debt-card #debtAmountLabel .debt-total-value {
  font-size: 28px;
  font-weight: 900;
}

.debt-card #debtDescriptionLabel {
  display: grid;
  gap: 6px;
  color: var(--muted);
  line-height: 1.3;
}

.debt-card #debtDescriptionLabel strong {
  font-size: 18px;
  line-height: 1.2;
  color: var(--white);
}

.debt-card #debtDescriptionLabel a {
  color: var(--cyan);
  font-weight: 900;
}

.payment-line {
  display: grid;
}

.payment-line a {
  color: white;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.wide {
  width: 100%;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 430px);
  height: calc(70px + env(safe-area-inset-bottom));
  padding: 7px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  backdrop-filter: none;
  z-index: 20;
}

body[data-current-screen="start"] .bottom-nav,
body[data-current-screen="login"] .bottom-nav {
  display: none;
}

.bottom-nav button {
  border: 0;
  background: var(--bg);
  color: var(--muted);
  border-radius: 8px;
  display: grid;
  grid-template-rows: 24px 22px;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 54px;
  position: relative;
}

.bottom-nav svg {
  align-self: end;
}

.bottom-nav span {
  display: grid;
  gap: 1px;
  justify-items: center;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
}

.bottom-nav small {
  color: inherit;
  font-size: 9px;
  font-weight: 700;
}

.bottom-nav button.active {
  color: var(--white);
  background: var(--cyan);
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: 11px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff4d4d;
  color: var(--white);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}

.bottom-nav button.active .nav-badge {
  box-shadow: 0 0 0 2px var(--cyan);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  width: min(calc(100% - 28px), 402px);
  border-radius: 8px;
  background: var(--white);
  color: var(--bg);
  padding: 13px 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
  z-index: 30;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.modal-panel {
  width: min(100%, 402px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--white);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.modal-panel h2 {
  font-size: 22px;
}

.modal-panel p {
  line-height: 1.45;
}

.urgent-modal .modal-panel {
  border-color: #1EA5BB;
  box-shadow: 0 0 0 1px rgba(30, 165, 187, 0.45), 0 18px 44px rgba(0, 0, 0, 0.42);
}

.urgent-modal .modal-panel h2 {
  color: #1EA5BB;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 760px) {
  .app-shell {
    margin-top: 24px;
    margin-bottom: 24px;
    min-height: calc(100vh - 48px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 28px 28px;
  }
}

@media (max-width: 360px) {
  .phone-link {
    font-size: 27px;
  }

  .bottom-nav span {
    font-size: 9px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .install-button {
    padding: 0 12px;
  }
}
