/* ============ Waymate styles ============ */
:root {
  --navy: #32152d;
  --navy2: #6e244f;
  --blue: #d64573;
  --cyan: #f08a9d;
  --bg: #fff4f5;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #f2d5dc;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at 15% 10%, #ffe1e8 0%, transparent 34%), linear-gradient(160deg, #f6dce4 0%, #fff5f5 60%, #f8e7dc 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
}
button { font-family: inherit; cursor: pointer; }
input, button { font-size: 15px; }

.app {
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(11, 36, 71, .18);
}
@media (min-width: 480px) {
  .app { border-radius: 0; }
}

/* ---------- App bar ---------- */
.appbar {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy2) 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.brand-sub { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.pill-line { display: inline-block; width: 16px; height: 5px; border-radius: 3px; background: var(--cyan); }
.appbar-actions { display:flex; align-items:center; gap:8px; }
.avatar-btn { background: none; border: none; padding: 0; border-radius: 50%; }
.appbar-actions .icon-btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color:#fff; }

/* ---------- Layout ---------- */
#content { flex: 1; overflow-y: auto; padding: 14px 14px 26px; }
.screen { animation: fadein .18s ease; }
@keyframes fadein { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.spread { justify-content: space-between; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  border: 1px solid #e8eef6;
}

/* ---------- Buttons / inputs ---------- */
.btn {
  border: none; border-radius: 14px;
  padding: 13px 16px; font-weight: 700; font-size: 15px;
  transition: transform .05s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--blue), #ef7e84); color: #fff; box-shadow: 0 4px 12px rgba(214, 69, 115, .3); }
.btn.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--navy2); }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn.block { display: block; width: 100%; margin-bottom: 10px; }
.btn.disabled { opacity: .45; pointer-events: none; }
.btn.small-btn { padding: 9px 13px; font-size: 13px; border-radius: 11px; }
.icon-btn {
  background: #fff; border: 1.5px solid var(--line); color: var(--navy2);
  width: 36px; height: 36px; border-radius: 11px; font-size: 15px;
}
.input {
  width: 100%; padding: 12px 13px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; outline: none; color: var(--text);
}
.input:focus { border-color: var(--cyan); }
.search-row { display:flex; gap:8px; align-items:center; margin-bottom:12px; }
.search-row .input { min-width:0; }
.people-search-results { max-height: min(58dvh, 480px); overflow:auto; }
.search-empty { color:var(--muted); text-align:center; padding:22px 10px; font-size:13px; }
.search-result { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.search-result:last-child { border-bottom:0; }
.search-result-info { flex:1; min-width:0; }
.search-result-info b { display:block; color:var(--navy); }
.search-result-info span { display:block; color:var(--muted); font-size:12px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-page {
  min-height: 100%;
  margin: -14px -14px -26px;
  padding: 18px 16px 32px;
  background: linear-gradient(180deg, #fff8f9 0%, var(--bg) 42%, #fff 100%);
}
.search-page-head { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.search-back {
  width:40px; height:40px; border:1px solid var(--line); border-radius:14px;
  background:#fff; color:var(--navy); font-size:30px; line-height:1; padding:0 0 4px;
  box-shadow:0 3px 10px rgba(50,21,45,.06);
}
.search-kicker { color:var(--blue); font-size:10px; font-weight:800; letter-spacing:.16em; }
.search-page-head h2 { color:var(--navy); font-size:25px; margin-top:3px; }
.search-page-mark {
  margin-left:auto; width:40px; height:40px; border-radius:14px;
  background:#ffe0e8; color:var(--blue); display:flex; align-items:center; justify-content:center;
  font-size:23px; font-weight:800;
}
.instagram-search {
  display:flex; align-items:center; gap:9px; min-height:48px; padding:0 13px;
  border:1px solid #f0cbd4; border-radius:16px; background:#fff;
  box-shadow:0 8px 20px rgba(214,69,115,.08);
}
.instagram-search:focus-within { border-color:var(--blue); box-shadow:0 8px 22px rgba(214,69,115,.14); }
.instagram-search-icon { color:var(--muted); font-size:22px; line-height:1; }
.instagram-search input {
  flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--text);
  font-size:15px; padding:12px 0;
}
.instagram-search input::placeholder { color:#9b8790; }
.search-clear {
  width:24px; height:24px; border:0; border-radius:50%; background:#eadde1;
  color:var(--navy2); font-size:18px; line-height:20px; padding:0;
}
.search-page-note { color:var(--muted); font-size:12px; line-height:1.5; margin:12px 3px 16px; }
.search-page .people-search-results { max-height:none; overflow:visible; }
.search-page .search-result {
  background:#fff; border:1px solid #f0e3e6; border-radius:16px; padding:12px;
  margin-bottom:9px; box-shadow:0 4px 14px rgba(50,21,45,.05);
}
.search-page .search-result:last-child { border-bottom:1px solid #f0e3e6; }
.field { display: block; margin-bottom: 11px; }
.field > span, .field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.select-like {
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 12px 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.select-like:after { content: "▾"; color: var(--muted); }
.select-like.placeholder { color: #94a3b8; font-weight: 500; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600;
}
.chip.on { background: #e0f7fb; border-color: var(--cyan); color: #067d8c; }

/* ---------- Home ---------- */
.hello { font-size: 20px; font-weight: 800; margin: 2px 4px 12px; }
.train-card strong { font-size: 14px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef2f7; color: var(--muted); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.train-times { display: flex; gap: 8px; margin-top: 10px; }
.train-chip { flex: 1; background: #eaf6ff; border-radius: 12px; padding: 8px 4px; text-align: center; }
.train-chip b { display: block; font-size: 16px; color: var(--navy); }
.train-chip span { font-size: 11px; color: var(--muted); }

.active-mini {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 16px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 13px;
}
.active-mini b { display: block; font-size: 13.5px; color: var(--text); }

.book-card { padding: 16px; }
.station-row { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 6px; align-items: stretch; margin-bottom: 12px; }
.st-box {
  background: #f1f6fd; border: 1.5px dashed #c3d6ee; border-radius: 13px;
  padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; justify-content: center;
}
.st-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.st-name { font-size: 13.5px; font-weight: 700; margin-top: 3px; line-height: 1.25; }
.st-name.placeholder { color: #94a3b8; font-weight: 500; }
.swap {
  align-self: center; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line); color: var(--blue); font-size: 16px; font-weight: 700;
}
.fare-box { background: #f8fafc; border: 1px solid #e8eef6; border-radius: 13px; padding: 11px 13px; margin: 4px 0 12px; }
.fare-line { font-size: 13px; color: var(--muted); }
.fare-line b { color: var(--text); font-size: 15px; }
.fare-total { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.fare-total b { font-size: 19px; color: var(--navy); }
.fare-note { font-size: 11.5px; color: var(--muted); margin-top: 7px; }

.buddy-promo {
  background: linear-gradient(120deg, var(--navy), #155e9e);
  color: #fff; display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: none; width: 100%; text-align: left; font-size: 15px;
}
.buddy-promo .big { font-size: 26px; }
.buddy-promo strong { display: block; font-size: 14.5px; }
.buddy-promo span { font-size: 12.5px; opacity: .85; }
.buddy-promo:after { content: "›"; margin-left: auto; font-size: 24px; opacity: .7; }

/* ---------- Auth ---------- */
.auth { padding: 26px 6px; }
.auth-hero { font-size: 54px; text-align: center; margin-bottom: 6px; }
.auth-hero.small { font-size: 42px; }
.auth h1 { text-align: center; font-size: 26px; margin-bottom: 6px; color: var(--navy); }
.auth h2 { text-align: center; font-size: 20px; margin-bottom: 4px; color: var(--navy); }
.auth .muted { margin-bottom: 18px; }
.auth .fineprint { margin-top: 16px; }
.fineprint { font-size: 11px; color: var(--muted); line-height: 1.6; }
.otp-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

/* ---------- Ticket ---------- */
.confirm { display: flex; gap: 10px; align-items: center; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; }
.confirm span { display: block; color: var(--muted); font-size: 12px; }
.ticket { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 2px 10px rgba(15,23,42,.08); border: 1px solid #e8eef6; position: relative; }
.ticket.cancelled { opacity: .55; filter: grayscale(.6); }
.t-route { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; text-align: center; }
.t-route b { flex: 1; }
.t-arrow { color: var(--cyan); font-size: 22px; flex: none; }
.t-meta { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.t-depart { text-align: center; font-size: 13.5px; margin: 12px 0; color: var(--muted); }
.t-depart b { color: var(--text); margin-left: 6px; }
.t-qr { display: flex; justify-content: center; padding: 8px 0 4px; border-top: 2px dashed var(--line); }
.t-qr img { border-radius: 8px; }
.t-id { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: .4px; }
.t-status { text-align: center; margin-top: 8px; }
.qr-fallback { border: 2px dashed var(--line); border-radius: 12px; padding: 22px 26px; text-align: center; }
.qr-fallback b { display: block; font-size: 20px; letter-spacing: 2px; color: var(--navy); }
.qr-fallback span { font-size: 11px; color: var(--muted); }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; margin-bottom: 0; }
.link-danger { display: block; margin: 16px auto 0; background: none; border: none; color: var(--danger); font-size: 12.5px; text-decoration: underline; }

/* ---------- Tickets list ---------- */
.page-title { font-size: 20px; font-weight: 800; margin: 2px 4px 14px; color: var(--navy); }
.tk-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; padding: 13px 14px; }
.tk-icon { font-size: 22px; }
.tk-info { flex: 1; min-width: 0; }
.tk-info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-info span { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 34px 20px; border: 2px dashed var(--line); border-radius: 16px; font-size: 14px; line-height: 1.6; }

/* ---------- Buddy / matches ---------- */
.cta strong { font-size: 16px; }
.cta p { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.55; }
.how { background: #fff; border-radius: 18px; border: 1px solid #e8eef6; padding: 14px; margin-bottom: 12px; }
.how div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 7px 0; }
.how span {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: #e0f7fb; color: #067d8c; font-weight: 800; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.match-head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 16px 4px 8px; }
.match-card { padding: 14px; }
.match-top { display: flex; gap: 11px; align-items: center; }
.match-id { flex: 1; min-width: 0; }
.match-id b { font-size: 15px; }
.match-id span { display: block; font-size: 12px; margin-top: 2px; }
.match-score {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  border: 2.5px solid #a5e8f0; color: #0891b2; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.match-route { margin: 11px 0 3px; font-size: 13.5px; font-weight: 600; }
.match-sub { font-size: 12px; color: var(--muted); margin-bottom: 11px; }
.match-actions { display: flex; gap: 8px; align-items: center; }
.match-actions .link-danger { margin: 0 0 0 auto; }
.vf { color: #0ea5e9; font-size: 13px; }
.my-post .small-btn { margin-top: 10px; }
.my-post div { margin-top: 4px; font-size: 13.5px; }
.safety-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; padding: 12px 13px; font-size: 12.5px; line-height: 1.55; margin-top: 14px; color: #713f12; }

.buddy-hero {
  margin: -14px -14px 14px;
  padding: 22px 18px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(0, 218, 211, .28), transparent 34%),
    linear-gradient(145deg, #081d3b 0%, #123f79 62%, #0d7892 100%);
  border-radius: 0 0 26px 26px;
}
.buddy-kicker { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: #6be4e3; margin-bottom: 8px; }
.buddy-hero h2 { font-size: 26px; line-height: 1.08; letter-spacing: -.5px; margin-bottom: 8px; }
.buddy-hero p { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.8); max-width: 340px; }
.buddy-hero-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.buddy-hero-pills span {
  color: #dffefe; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 5px 9px; font-size: 10.5px; font-weight: 700;
}
.route-status { padding: 15px; border: 1px solid #c8e8ec; background: linear-gradient(140deg, #f8ffff, #fff); }
.route-status-label { color: #087e8b; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.route-line { display: flex; align-items: center; gap: 9px; margin: 18px 0 8px; }
.route-stop { max-width: 42%; font-size: 12px; font-weight: 800; line-height: 1.15; color: var(--navy); }
.route-stop.right { text-align: right; }
.route-track { flex: 1; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--cyan)); position: relative; }
.route-track:before, .route-track:after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; background: #fff; border: 3px solid var(--blue); border-radius: 50%; transform: translateY(-50%); }
.route-track:before { left: 0; }
.route-track:after { right: 0; border-color: var(--cyan); }
.route-track i { position: absolute; left: 50%; top: -4px; width: 12px; height: 12px; background: #fff; border: 3px solid #27b8c4; border-radius: 50%; transform: translateX(-50%); }
.route-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.route-meta span:last-child { color: #087e8b; font-weight: 700; }
.route-preference { margin: 12px 0 10px; padding-top: 10px; border-top: 1px solid #e5f2f3; font-size: 12px; color: var(--muted); }
.route-preference b { color: var(--text); }
.buddy-start { padding: 23px 18px 18px; text-align: center; background: linear-gradient(155deg, #ffffff, #f4fbff); border-color: #cbe5f2; }
.start-orbit { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 14px; color: #0a7391; font-size: 24px; }
.start-orbit span:first-child { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; background: #e3f7fb; border: 1px solid #b8e8ed; border-radius: 16px; }
.start-orbit span:last-child { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: #fff; background: linear-gradient(135deg, #ff5f7e, #eb3f6b); border-radius: 50%; }
.start-orbit i { width: 24px; border-top: 2px dashed #a8dce4; }
.start-eyebrow { color: #087e8b; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; }
.buddy-start h3 { color: var(--navy); font-size: 21px; margin: 7px 0 6px; }
.buddy-start p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.route-proof { padding: 2px 6px; margin: 12px 0 4px; }
.route-proof > div { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e4edf5; }
.route-proof > div:last-child { border-bottom: 0; }
.proof-icon { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #087e8b; background: #e1f7f8; border-radius: 10px; font-size: 10px; font-weight: 800; }
.route-proof b, .route-proof small { display: block; text-align: left; }
.route-proof b { font-size: 12.5px; color: var(--navy); }
.route-proof small { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.deck-heading { display: flex; justify-content: space-between; align-items: end; margin: 18px 4px 9px; }
.deck-heading b, .deck-heading span { display: block; }
.deck-heading b { color: var(--navy); font-size: 15px; }
.deck-heading span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.deck-heading strong { color: #087e8b; font-size: 11px; }
.swipe-card { position: relative; padding: 16px; border: 1px solid #cfe3ef; box-shadow: 0 10px 24px rgba(21, 74, 126, .12); touch-action: pan-y; transition: transform .22s ease, opacity .22s ease; user-select: none; }
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-card.swiping-right { border-color: #55c9a5; }
.swipe-card.swiping-left { border-color: #ee8b9e; }
.swipe-stamp { position: absolute; top: 28px; z-index: 2; padding: 5px 9px; border: 2px solid; border-radius: 7px; font-size: 13px; font-weight: 900; letter-spacing: 1px; opacity: 0; pointer-events: none; transform: rotate(-12deg); }
.like-stamp { right: 22px; color: #0a9b76; border-color: #0a9b76; transform: rotate(12deg); }
.pass-stamp { left: 22px; color: #dc5a72; border-color: #dc5a72; }
.swiping-right .like-stamp, .swiping-left .pass-stamp { opacity: 1; }
.swipe-away-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }
.swipe-away-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.match-card-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.match-label { color: #087e8b; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.match-window { color: #b45309; background: #fff7e6; border-radius: 999px; padding: 4px 8px; font-size: 10.5px; font-weight: 800; }
.match-top { gap: 12px; }
.match-id b { display: block; color: var(--navy); font-size: 17px; }
.match-id .vf { display: inline; font-size: 10px; }
.match-id span.muted { line-height: 1.35; margin-top: 4px; }
.match-score { width: 51px; height: 51px; border: 0; background: #e6faf7; color: #087e8b; flex-direction: column; line-height: 1; }
.match-score b { font-size: 14px; }
.match-score span { margin-top: 4px; color: #4e9698; font-size: 9px; font-weight: 700; }
.match-route { display: flex; align-items: center; gap: 7px; margin: 15px 0 4px; padding: 10px 11px; color: var(--navy); background: #f3f8fd; border-radius: 11px; font-size: 12px; font-weight: 800; }
.match-route span { flex: 1; line-height: 1.15; }
.match-route span:last-child { text-align: right; }
.match-route i { color: var(--cyan); font-size: 16px; font-style: normal; }
.match-sub { margin-bottom: 13px; font-size: 11.5px; }
.shared-stations { padding: 10px; margin-bottom: 15px; background: #f9fbfd; border: 1px dashed #cbddec; border-radius: 12px; }
.shared-stations small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .8px; margin-bottom: 7px; }
.shared-stations > div { display: flex; flex-wrap: wrap; gap: 5px; }
.shared-stations span { color: #205483; background: #e7f1fb; border-radius: 999px; padding: 4px 7px; font-size: 10px; font-weight: 700; }
.deck-actions { align-items: center; gap: 10px; }
.deck-action { flex: none; width: 45px; height: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #fff; font-size: 25px; line-height: 17px; }
.deck-action span { font-size: 8px; font-weight: 800; margin-top: 3px; }
.deck-action.pass { color: #dc5a72; border: 1px solid #f2c4cf; }
.connect-btn { flex: 1; padding-left: 10px; padding-right: 10px; font-size: 13px; }
.deck-empty { text-align: center; padding: 24px 18px 18px; }
.deck-empty-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin: 0 auto 11px; color: #087e8b; background: #e1f7f8; border-radius: 14px; font-size: 23px; }
.deck-empty b, .deck-empty span { display: block; }
.deck-empty b { color: var(--navy); font-size: 15px; }
.deck-empty span { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 5px 0 14px; }
.deck-empty .btn { margin-bottom: 0; }
.deck-hint { color: var(--muted); text-align: center; font-size: 11px; line-height: 1.4; margin: 8px 20px 0; }
.swipe-card .link-danger { margin-top: 13px; font-size: 11px; }

.route-actions { display: flex; gap: 8px; margin-top: 10px; }
.route-actions .btn { flex: 1; }

/* ---------- Buddies ---------- */
.buddy-page-head { display: flex; align-items: flex-start; gap: 12px; padding: 8px 4px 14px; }
.buddy-page-head > div:first-child { flex: 1; }
.buddy-page-head h2 { color: var(--navy); font-size: 22px; line-height: 1.05; margin: 4px 0 7px; }
.buddy-page-head p { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.buddy-page-icon { width: 48px; height: 48px; border-radius: 16px; background: #ffe0e8; display: flex; align-items: center; justify-content: center; font-size: 25px; flex: none; }
.friend-tabs { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; }
.friend-tab { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); padding: 8px 12px; font-weight: 700; font-size: 12px; }
.friend-tab.active { background: #ffe4eb; border-color: #f0a7b8; color: var(--navy2); }
.friend-tab span { background: var(--blue); color: #fff; padding: 2px 5px; border-radius: 999px; margin-left: 4px; }
.friend-search-btn { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy2); padding: 8px 12px; font-weight: 800; font-size: 12px; }
.friend-list { display: flex; flex-direction: column; gap: 10px; }
.friend-card { margin: 0; padding: 13px; }
.friend-top { display: flex; align-items: center; gap: 10px; }
.friend-id { flex: 1; min-width: 0; }
.friend-id b, .friend-id span, .friend-id small { display: block; }
.friend-id b { color: var(--navy); font-size: 15px; }
.friend-id span { color: var(--blue); font-size: 11px; font-weight: 700; margin-top: 2px; }
.friend-id small { color: var(--muted); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-dot { color: #18b77d; font-size: 12px; }
.friend-route { display: flex; align-items: center; gap: 7px; margin: 12px 0 10px; padding: 8px 10px; border-radius: 10px; background: #fff7f8; color: var(--muted); font-size: 11px; font-weight: 700; }
.friend-route span:first-child { color: var(--navy2); }
.friend-actions { display: flex; gap: 8px; }
.friend-actions .btn { flex: 1; }

/* ---------- Post form ---------- */
.flow-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.flow-head strong { flex: 1; font-size: 17px; color: var(--navy); }

/* ---------- Chat ---------- */
.chat-head { margin-bottom: 8px; }
.chat-who b { font-size: 15px; display: block; }
.chat-who span { display: block; }
.chat-wrap {
  display: flex; flex-direction: column; gap: 8px;
  max-height: calc(100dvh - 320px); min-height: 220px;
  overflow-y: auto; padding: 6px 2px 10px;
}
.chat-note { background: #eef6ff; border: 1px solid #d3e5fb; color: #38507a; font-size: 11.5px; border-radius: 12px; padding: 8px 11px; margin-bottom: 4px; }
.bubble {
  max-width: 80%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45;
  background: #fff; border: 1px solid #e8eef6; align-self: flex-start; border-bottom-left-radius: 5px;
}
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #0e9bd6); color: #fff; border: none; border-bottom-right-radius: 5px; }
.bubble i { display: block; font-style: normal; font-size: 9.5px; opacity: .55; margin-top: 3px; text-align: right; }
.chat-bar { display: flex; gap: 8px; margin-top: 10px; }
.chat-bar .input { flex: 1; }
.chat-bar .btn { padding: 12px 16px; }

/* ---------- Profile ---------- */
.profile-card { display: flex; gap: 14px; align-items: center; }
.p-name { font-size: 17px; }
.profile-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 4px 8px; }
.profile-section-head h3 { margin: 0; color: var(--navy); font-size: 16px; }
.profile-section-head span { color: var(--muted); font-size: 11px; }
.profile-tickets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.profile-tickets .tk-row { margin: 0; }
.profile-empty { margin: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid #e8eef6; border-radius: 16px; padding: 12px 6px; text-align: center; }
.stat b { display: block; font-size: 18px; color: var(--navy); }
.stat span { font-size: 10.5px; color: var(--muted); }

/* ---------- Avatar ---------- */
.avatar { border-radius: 50%; object-fit: cover; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; letter-spacing: .5px; }

/* ---------- Modal / sheet ---------- */
.modal {
  position: absolute; inset: 0; background: rgba(2, 8, 20, .55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.sheet {
  background: #fff; width: 100%; border-radius: 22px 22px 0 0;
  padding: 16px 16px 22px; max-height: 82%; overflow-y: auto;
  animation: slideup .2s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head strong { font-size: 16px; color: var(--navy); }
.picker-list { max-height: 52vh; overflow-y: auto; margin-top: 10px; }
.st-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: #fff; border: none; border-bottom: 1px solid #eef2f7;
  padding: 11px 6px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text);
}
.dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); }
.dot.v { background: #0ea5e9; }
.dot.n { background: #6366f1; }
.ix-pill { font-size: 10px; font-weight: 700; background: #eef2ff; color: #4f46e5; border-radius: 999px; padding: 2px 7px; }
.safety-list { margin: 4px 4px 0 20px; font-size: 13.5px; line-height: 1.7; color: #334155; }

/* ---------- Payment ---------- */
.pay-route { text-align: center; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.pay-amt { text-align: center; font-size: 36px; font-weight: 800; color: var(--navy); margin: 6px 0 14px; }
.pay-opt {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line);
  border-radius: 13px; padding: 12px 13px; margin-bottom: 9px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.pay-opt:has(input:checked) { border-color: var(--blue); background: #f0f6ff; }
.pay-opt small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.pay-opt input { accent-color: var(--blue); }
.pay-processing { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0 14px; color: var(--muted); font-size: 14px; font-weight: 600; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3.5px solid #dbeafe; border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tab bar ---------- */
.tabbar {
  flex: none; display: flex; background: #fff; border-top: 1px solid #e8eef6;
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 600; padding: 5px 0;
}
.tabbar button span { display: block; font-size: 20px; margin-bottom: 2px; filter: grayscale(1) opacity(.65); }
.tabbar button.active { color: var(--blue); }
.tabbar button.active span { filter: none; }

/* ---------- Toast ---------- */
.toast {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px; z-index: 60;
  box-shadow: 0 6px 20px rgba(2, 8, 20, .35); max-width: 88%; text-align: center;
  animation: slideup .2s ease;
}


/* ---------- Social connection affordances ---------- */
.friend-empty { margin-top: 6px; }
.friend-actions .btn:disabled { opacity: .55; cursor: not-allowed; }
.friend-actions .icon-btn { flex: 0 0 36px; color: var(--muted); letter-spacing: 1px; }




/* ---------- Product polish ---------- */
.tab-badge { display:inline-flex; align-items:center; justify-content:center; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:var(--blue); color:#fff; font-size:9px; font-style:normal; vertical-align:middle; }
.google-btn { font-weight:800; }
.chat-safety { display:flex; gap:12px; justify-content:flex-end; margin-top:8px; }
.chat-safety button { border:0; background:none; color:var(--muted); font-size:11px; text-decoration:underline; }




/* ---------- Instagram-style chat canvas and profile controls ---------- */
#content.chat-mode { overflow: hidden; }
#screen-chat { height: 100%; min-height: calc(100dvh - 150px); display: flex; flex-direction: column; }
#screen-chat .chat-wrap { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
#screen-chat .chat-bar { flex: none; position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 calc(4px + env(safe-area-inset-bottom)); }
.profile-actions { display:flex; gap:8px; margin-bottom:10px; }
.profile-actions .btn { flex:1; margin-bottom:0; }
.profile-edit-icon { margin-left:auto; }
.profile-bio { margin-top:4px; max-width:220px; }
.settings-list { margin-bottom:12px; }
.settings-row { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 4px; background:none; border:0; border-bottom:1px solid #eef2f7; text-align:left; color:var(--text); }
.settings-row span:first-child { display:flex; align-items:flex-start; gap:10px; }
.settings-row b, .settings-row small { display:block; }
.settings-row b { font-size:13px; }
.settings-row small { color:var(--muted); font-size:11px; margin-top:3px; }
.settings-value { color:var(--muted); font-size:12px; }
textarea.input { resize:vertical; font-family:inherit; }


/* ---------- Chat overflow and profile photo editing ---------- */
.chat-options-row { display:flex; justify-content:flex-end; margin-top:4px; }
.chat-more { font-weight:800; letter-spacing:2px; color:var(--muted); }
.options-list { margin-bottom:4px; }
.option-row { width:100%; display:flex; align-items:center; gap:12px; padding:14px 4px; background:none; border:0; border-bottom:1px solid #eef2f7; text-align:left; color:var(--text); }
.option-row span { display:block; }
.option-row b, .option-row small { display:block; }
.option-row b { font-size:13px; }
.option-row small { color:var(--muted); font-size:11px; margin-top:3px; }
.profile-photo-edit { display:flex; flex-direction:column; align-items:center; gap:9px; margin:2px 0 16px; }
.profile-photo-edit .btn { margin:0; }

.photo-actions { display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; }
.photo-actions .btn { margin:0; }
