:root {
  --bg: #f7f1e7;
  --surface: #fffefa;
  --surface-soft: #fcf8ef;
  --surface-low: #efe9dd;
  --surface-line: #ded4c4;
  --primary: #1fa278;
  --primary-quiet: #e6f2ea;
  --brand-lead: #163d39;
  --text: #102522;
  --muted: #5b6962;
  --gold: #9a741f;
  --gold-soft: #f3e4bb;
  --danger: #b3261e;
  --shadow: 0 18px 44px rgba(27, 37, 31, 0.08);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--brand-lead);
  font-size: 3.6rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.brand span {
  color: var(--primary);
}

.brand.small {
  font-size: 1.55rem;
  letter-spacing: 0;
}

.brand.footer {
  font-size: 1.22rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(31, 162, 120, 0.18);
}

.auth-page {
  min-height: 100vh;
  padding: 28px 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(31, 162, 120, 0.11), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(154, 116, 31, 0.09), transparent 30%),
    var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 0.86fr);
  gap: 24px;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  align-items: stretch;
}

.hero-card,
.panel,
.modal-card {
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid rgba(222, 212, 196, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  min-width: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-page .brand {
  font-size: clamp(2.1rem, 3.3vw, 3rem);
}

.hero-copy h1 {
  margin: 12px 0 12px;
  max-width: 620px;
  font-size: clamp(3rem, 4.6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.auth-kicker {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.web-preview {
  margin-top: 24px;
}

.trip-preview {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: 0 14px 34px rgba(16, 37, 34, 0.06);
}

.preview-eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.preview-meta-line .trip-sub {
  margin-top: 0;
  line-height: 1;
}

.preview-meta-line .pill {
  min-height: 34px;
}

.route-box {
  --pin-edge: 28px;
  --pin-size: 74px;
  --pin-center: calc(var(--pin-edge) + (var(--pin-size) / 2));
  position: relative;
  min-height: 216px;
  margin-top: 20px;
  padding: 20px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--primary-quiet);
  border: 1px solid rgba(31, 162, 120, 0.08);
  box-shadow: inset 0 0 0 1px rgba(31, 162, 120, 0.04);
}

.route-line {
  position: absolute;
  left: var(--pin-center);
  top: 34px;
  width: calc(100% - (var(--pin-center) * 2));
  height: 72px;
  z-index: 0;
  overflow: visible;
}

.route-line path {
  fill: none;
  stroke: rgba(31, 162, 120, 0.4);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 6.4;
  vector-effect: non-scaling-stroke;
}

.route-pin {
  position: absolute;
  top: 34px;
  z-index: 1;
  width: var(--pin-size);
  height: var(--pin-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 22px;
  background: #fffefa;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(16, 37, 34, 0.08);
}

.route-pin .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.7;
}

.route-pin span {
  line-height: 1;
}

.route-pin.end {
  right: var(--pin-edge);
  color: var(--gold);
}

.route-pin.start {
  left: var(--pin-edge);
}

.route-stats {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: 0 10px 24px rgba(16, 37, 34, 0.06);
}

.metric {
  text-align: center;
}

.metric b {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric strong {
  display: block;
  margin-top: 2px;
  font-size: 1.12rem;
}

.preview-pills {
  margin-top: 16px;
  gap: 10px;
}

.preview-pills .pill {
  min-width: 112px;
}

.preview-pills .pill .icon {
  width: 16px;
  height: 16px;
}

.preview-status {
  margin-top: 14px;
}

.status-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-quiet);
}

.status-icon .icon {
  width: 22px;
  height: 22px;
}

.preview-status .status-icon .icon {
  transform: translate(-1px, 1px);
}

.preview-actions {
  margin-top: 14px;
}

.mini-panel {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface-low);
  border: 1px solid rgba(222, 212, 196, 0.72);
}

.mini-panel strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--brand-lead);
}

.mini-panel span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.auth-card {
  width: 100%;
  min-width: 0;
  padding: clamp(30px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.95);
  border: 1px solid rgba(222, 212, 196, 0.95);
  box-shadow: var(--shadow);
}

.auth-card-heading {
  margin-bottom: 22px;
}

.auth-card-heading h2 {
  margin: 9px 0 8px;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.auth-card-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-page .route-box {
  --pin-edge: 20px;
  --pin-size: 54px;
  min-height: 146px;
  margin-top: 14px;
  border-radius: 20px;
}

.auth-page .route-pin {
  top: 20px;
  gap: 2px;
  border-radius: 17px;
  font-size: 0.62rem;
}

.auth-page .route-pin .icon {
  width: 18px;
  height: 18px;
}

.auth-page .route-line {
  top: 16px;
  height: 52px;
}

.auth-page .route-stats {
  left: 16px;
  right: 16px;
  bottom: 14px;
  padding: 10px;
  border-radius: 16px;
}

.auth-page .metric b {
  font-size: 0.68rem;
}

.auth-page .metric strong {
  font-size: 0.91rem;
}

.auth-page .preview-pills {
  margin-top: 10px;
}

.auth-page .preview-status {
  margin-top: 10px;
  padding: 10px;
}

.auth-page .status-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.trust-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.trust-point {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-low);
}

.trust-point > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: var(--primary);
  border-radius: 11px;
  background: var(--primary-quiet);
}

.trust-point strong,
.trust-point small {
  display: block;
}

.trust-point strong {
  font-size: 0.78rem;
}

.trust-point small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.legal-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.legal-footer a,
.legal-nav a,
.legal-card a {
  color: var(--primary);
  text-decoration: none;
}

.legal-footer a:hover,
.legal-nav a:hover,
.legal-card a:hover {
  text-decoration: underline;
}

.auth-page-footer {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 18px 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer-copy {
  display: grid;
  gap: 4px;
}

.footer-copy > span {
  display: block;
}

.auth-page-footer nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 850;
}

.auth-page-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 850;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--surface-low);
}

.auth-tabs button {
  height: 48px;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.auth-tabs button.active {
  color: #fffefa;
  background: var(--primary);
}

.field-stack {
  display: grid;
  gap: 11px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--surface-line);
  border-radius: 15px;
  color: var(--text);
  background: #fffefa;
  outline: none;
}

.field textarea {
  min-height: 96px;
  padding-top: 14px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(31, 162, 120, 0.65);
  box-shadow: 0 0 0 4px rgba(31, 162, 120, 0.1);
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.auth-feedback {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.auth-feedback.error {
  color: var(--danger);
  background: rgba(179, 38, 30, 0.09);
}

.auth-feedback.notice {
  color: var(--brand-lead);
  background: var(--primary-quiet);
}

.btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 16px;
  color: var(--text);
  background: var(--surface-low);
  font-weight: 900;
}

.btn .icon {
  width: 20px;
  height: 20px;
}

.btn.primary {
  color: #fffefa;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(31, 162, 120, 0.2);
}

.btn.soft {
  color: var(--primary);
  background: var(--primary-quiet);
}

.btn.ghost {
  border: 1px solid var(--surface-line);
  background: var(--surface);
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  width: min(1320px, calc(100vw - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  gap: 22px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.nav-button {
  width: 100%;
  justify-content: flex-start;
  min-height: 48px;
  color: var(--muted);
  background: transparent;
}

.nav-button,
.bottom-nav button {
  align-items: center;
  gap: 10px;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.nav-icon .icon {
  width: 22px;
  height: 22px;
}

.logout-button {
  min-height: 46px;
  color: var(--danger);
  background: rgba(179, 38, 30, 0.08);
}

.nav-button.active {
  color: var(--primary);
  background: var(--primary-quiet);
}

.user-chip {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-low);
}

.avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 3px solid #fffefa;
  color: #fffefa;
  background: #66877d;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(16, 37, 34, 0.12);
}

.avatar.large {
  width: 58px;
  height: 58px;
  font-size: 1.05rem;
}

.main {
  padding-bottom: 90px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-title h1,
.section h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.page-title h1 {
  font-size: 4rem;
  line-height: 0.98;
}

.page-title p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.45;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-line);
}

.section h2 {
  font-size: 2rem;
}

.section-link {
  color: var(--primary);
  background: none;
  font-weight: 850;
}

.card {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.96);
  border: 1px solid rgba(222, 212, 196, 0.94);
  box-shadow: var(--shadow);
}

.home-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.home-prompt h2 {
  margin: 0;
  font-size: 2.35rem;
  letter-spacing: 0;
}

.home-prompt p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.trip-card {
  display: grid;
  gap: 16px;
}

.trip-head,
.person-row,
.message-row,
.ledger-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trip-head-main,
.person-main,
.message-main,
.ledger-main {
  min-width: 0;
  flex: 1;
}

.trip-title,
.person-name,
.message-name,
.ledger-title {
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: 0;
}

.trip-sub,
.person-meta,
.message-preview,
.ledger-sub {
  color: var(--muted);
  margin-top: 4px;
}

.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-text .icon {
  width: 19px;
  height: 19px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-quiet);
  font-weight: 850;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

.pill.gold {
  color: #72510a;
  background: var(--gold-soft);
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-low);
}

.status-row .live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  align-self: stretch;
  margin: 0;
  color: var(--muted);
  background: var(--primary-quiet);
}

.status-row strong {
  display: block;
}

.status-row span:not(.live-pill) {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.search {
  position: relative;
}

.search input {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--surface-line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-size: 1rem;
}

.search::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid var(--muted);
  border-radius: 999px;
  transform: translateY(-58%);
}

.search::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 50%;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
  transform: rotate(45deg) translate(1px, 7px);
}

.list {
  display: grid;
  gap: 12px;
}

.person-row,
.message-row,
.ledger-row {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(222, 212, 196, 0.82);
}

.person-row .btn,
.message-row .btn {
  min-height: 44px;
}

.message-time {
  color: var(--muted);
  font-weight: 850;
}

.ledger-row {
  display: grid;
  gap: 16px;
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-line);
}

.money-cell {
  padding: 14px;
  text-align: center;
  background: var(--surface-low);
}

.money-cell span {
  display: block;
  color: var(--muted);
  font-weight: 850;
}

.money-cell strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-low);
}

.stat strong {
  display: block;
  color: var(--primary);
  font-size: 1.8rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  display: block;
  margin-top: 6px;
  font-weight: 800;
}

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

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-low);
}

.detail-row a {
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}

.detail-row a:hover {
  color: var(--primary);
}

.trip-chip-row {
  gap: 10px;
}

.trip-chip {
  min-width: 104px;
}

.trip-chip .icon {
  width: 16px;
  height: 16px;
}

.qr-art {
  width: 220px;
  height: 220px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 5px;
  margin: 24px auto;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow);
}

.qr-art span {
  border-radius: 3px;
  background: transparent;
}

.qr-art span.on {
  background: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 37, 34, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(620px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

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

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

.choice {
  min-height: 52px;
  border-radius: 15px;
  color: var(--muted);
  background: var(--surface-low);
  border: 1px solid transparent;
  font-weight: 850;
}

.choice.active {
  color: var(--primary);
  background: var(--primary-quiet);
  border-color: rgba(31, 162, 120, 0.55);
}

.bottom-nav {
  display: none;
}

.legal-shell {
  width: min(920px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.legal-nav-links {
  display: flex;
  gap: 16px;
  font-weight: 850;
}

.legal-card {
  padding: 44px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 3.6rem;
  line-height: 1;
}

.legal-card h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.45rem;
}

.legal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.62;
}

.legal-card section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--surface-line);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(680px, calc(100vw - 32px));
  }

  .brand {
    font-size: 2.85rem;
  }

  .hero-card {
    padding: 26px;
  }

  .hero-copy h1,
  .page-title h1 {
    font-size: 3rem;
  }

  .home-prompt h2 {
    font-size: 2rem;
  }

  .auth-card {
    order: -1;
    padding: 32px;
  }

  .auth-page-footer {
    width: min(680px, calc(100vw - 32px));
  }

  .app-shell {
    display: block;
    width: min(680px, calc(100vw - 26px));
  }

  .sidebar {
    position: static;
    min-height: 0;
    margin-bottom: 16px;
  }

  .sidebar .nav-list,
  .sidebar .user-chip {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .grid.two,
  .stat-grid,
  .profile-card {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 7px;
    border-radius: 28px;
    background: rgba(255, 254, 250, 0.88);
    border: 1px solid rgba(222, 212, 196, 0.85);
    box-shadow: 0 16px 34px rgba(16, 37, 34, 0.13);
    backdrop-filter: blur(14px);
  }

  .bottom-nav button {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 22px;
    color: var(--text);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 850;
    gap: 2px;
  }

  .bottom-nav .nav-icon .icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav button.active {
    color: var(--primary);
    background: var(--primary-quiet);
  }

  .legal-card {
    padding: 28px;
  }

  .legal-card h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 560px) {
  .web-preview,
  .card-actions,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .auth-card,
  .card,
  .panel {
    border-radius: 20px;
  }

  .auth-page {
    padding: 16px 0 24px;
  }

  .auth-shell {
    width: min(100% - 24px, 680px);
    gap: 14px;
  }

  .auth-page .brand {
    font-size: 2.15rem;
  }

  .hero-copy h1 {
    font-size: 2.65rem;
  }

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

  .auth-card {
    padding: 24px 20px;
  }

  .auth-page-footer {
    width: calc(100vw - 24px);
  }

  .topbar {
    display: grid;
  }

  .page-actions {
    justify-content: stretch;
  }

  .page-actions .btn {
    flex: 1;
  }

  .home-prompt {
    grid-template-columns: 1fr;
  }

  .auth-page-footer {
    display: grid;
    gap: 12px;
  }

  .auth-page-footer nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .route-box {
    --pin-edge: 18px;
    --pin-size: 62px;
    min-height: 204px;
  }

  .route-pin {
    border-radius: 19px;
    font-size: 0.7rem;
  }

  .route-stats {
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px 10px;
  }
}
