@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/vendor/nunito-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/vendor/nunito-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/vendor/nunito-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/vendor/nunito-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/vendor/nunito-latin-ext-900.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/vendor/nunito-latin-900.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-sky: #18aaf5;
  --c-sky-deep: #0a84de;
  --c-blue: #0b74c9;
  --c-blue-press: #085a9c;
  --c-pink: #ff2db4;
  --c-pink-deep: #c8107a;
  --c-pink-press: #9e0b60;
  --c-yellow: #ffc400;
  --c-green: #3fc11b;
  --c-green-soft: #e3f9d6;
  --c-red: #e5374f;
  --c-red-press: #b3233a;

  --c-bg: #f5f4f1;
  --c-surface: #ffffff;
  --c-surface-2: #f2f5fa;
  --c-text: #1b1f3b;
  --c-text-muted: #5b6283;
  --c-border: #dde3ee;
  --c-bubble-other: #eef1f7;
  --c-bubble-broadcast: #fff4cc;
  --c-bubble-broadcast-text: #3d3000;
  --c-scrim: rgb(20 24 55 / .35);
  --c-ring: rgb(255 45 180 / .45);

  --shadow-sm: 0 2px 8px rgb(27 31 59 / .08);
  --shadow-md: 0 10px 30px rgb(27 31 59 / .14);
  --shadow-lg: 0 20px 50px rgb(27 31 59 / .22);

  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;

  --z-map: 0;
  --z-ui: 50;
  --z-toast: 100;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --fs-body: clamp(1rem, .96rem + .2vw, 1.06rem);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --c-bg: #1c1c1e;
  --c-surface: #1a1f3d;
  --c-surface-2: #242a4f;
  --c-text: #f3f5ff;
  --c-text-muted: #a9b0d6;
  --c-border: #313863;
  --c-bubble-other: #262c54;
  --c-bubble-broadcast: #4a3c05;
  --c-bubble-broadcast-text: #fff1bd;
  --c-green-soft: #1d3a1a;
  --c-scrim: rgb(0 0 0 / .55);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / .3);
  --shadow-md: 0 10px 30px rgb(0 0 0 / .45);
  --shadow-lg: 0 20px 50px rgb(0 0 0 / .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.45;
  color: var(--c-text);
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 3px solid var(--c-pink); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--c-sky), var(--c-sky-deep));
  z-index: var(--z-toast);
  transition: opacity .35s ease-in-out;
}
.boot--done { opacity: 0; pointer-events: none; }
.boot__logo { border-radius: 26px; box-shadow: var(--shadow-lg); animation: bob 1.6s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 54px;
  padding: 0 var(--s-5);
  border: 0;
  border-radius: var(--r-pill);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #fff;
  background: var(--c-blue);
  box-shadow: 0 5px 0 var(--c-blue-press), var(--shadow-sm);
  transition: box-shadow .12s ease-in-out, filter .2s ease-in-out;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { box-shadow: 0 1px 0 var(--c-blue-press), var(--shadow-sm); }
.btn[disabled], .btn[aria-busy="true"] { filter: saturate(.4) brightness(1.05); cursor: progress; }
.btn--block { width: 100%; }
.btn--pink { background: var(--c-pink-deep); box-shadow: 0 5px 0 var(--c-pink-press), var(--shadow-sm); }
.btn--pink:active { box-shadow: 0 1px 0 var(--c-pink-press), var(--shadow-sm); }
.btn--blue { background: var(--c-blue); }
.btn--danger { background: var(--c-red); box-shadow: 0 5px 0 var(--c-red-press), var(--shadow-sm); }
.btn--danger:active { box-shadow: 0 1px 0 var(--c-red-press), var(--shadow-sm); }
.btn--ghost {
  color: var(--c-text);
  background: var(--c-surface-2);
  box-shadow: 0 4px 0 var(--c-border);
  font-size: 1.05rem;
}
.btn--ghost:active { box-shadow: 0 1px 0 var(--c-border); }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--c-yellow);
  color: #2b2100;
  font-size: .85rem;
  font-weight: 900;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  font-size: 1.3rem;
  transition: box-shadow .2s ease-in-out, filter .2s ease-in-out;
}
.round-btn:hover { box-shadow: var(--shadow-lg); }
.round-btn--small { width: 40px; height: 40px; font-size: 1rem; box-shadow: none; background: var(--c-surface-2); }
.round-btn--avatar {
  background: linear-gradient(135deg, var(--c-yellow), var(--c-pink));
  border: 3px solid var(--c-surface);
}
.me-initial { color: #fff; font-weight: 900; font-size: 1.2rem; }

.login {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + var(--s-5)) var(--s-4) calc(var(--safe-bottom) + var(--s-5));
  overflow-y: auto;
  background: linear-gradient(170deg, #4cc3ff 0%, var(--c-sky) 45%, var(--c-sky-deep) 100%);
}
[data-theme="dark"] .login { background: linear-gradient(170deg, #1d2a6b 0%, #141a44 55%, #0b0f2a 100%); }

.login__sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login__cloud {
  position: absolute;
  width: 220px;
  height: 70px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / .35);
  filter: blur(2px);
  animation: drift 26s linear infinite;
}
.login__cloud::before, .login__cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}
.login__cloud::before { width: 90px; height: 90px; left: 40px; top: -45px; }
.login__cloud::after { width: 70px; height: 70px; left: 110px; top: -30px; }
.login__cloud--a { top: 12%; left: -240px; }
.login__cloud--b { top: 38%; left: -240px; animation-duration: 34s; animation-delay: -12s; transform: scale(.7); }
.login__cloud--c { top: 74%; left: -240px; animation-duration: 40s; animation-delay: -25s; }
[data-theme="dark"] .login__cloud { background: rgb(255 255 255 / .08); }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 480px)); }
}

.login__card {
  position: relative;
  display: grid;
  gap: var(--s-4);
  width: min(100%, 400px);
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  animation: pop-in .6s var(--spring) both;
}
.login__logo {
  justify-self: center;
  margin-top: calc(-1 * var(--s-7) - var(--s-5));
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--c-surface);
  animation: bob 3s ease-in-out infinite;
}
.login__title { text-align: center; font-size: 2rem; font-weight: 900; line-height: 1.1; }
.login__lead { text-align: center; color: var(--c-text-muted); margin-top: calc(-1 * var(--s-3)); }
.login__captcha { display: grid; justify-content: center; min-height: 65px; }
.login__error {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: rgb(229 55 79 / .12);
  color: var(--c-red);
  font-weight: 800;
  text-align: center;
}
[data-theme="dark"] .login__error { color: #ff8a9b; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(30px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.field { display: grid; gap: 6px; }
.field__label { font-size: .9rem; font-weight: 800; color: var(--c-text-muted); padding-left: var(--s-2); }
.field__input {
  width: 100%;
  min-height: 54px;
  padding: 0 var(--s-4);
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  font-size: 1.05rem;
  font-weight: 800;
  transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}
.field__input:focus { outline: none; border-color: var(--c-pink); box-shadow: 0 0 0 4px var(--c-ring); }

.switch { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; justify-self: start; min-height: 44px; }
.switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--c-border);
  transition: background-color .25s ease-in-out;
}
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--spring);
}
.switch__input:checked + .switch__track { background: var(--c-green); }
.switch__input:checked + .switch__track .switch__thumb { transform: translateX(22px); }
.switch__input:focus-visible + .switch__track { outline: 3px solid var(--c-pink); outline-offset: 2px; }
.switch__text { font-weight: 800; }

.app { position: fixed; inset: 0; }
.map { position: absolute; inset: 0; z-index: var(--z-map); background: var(--c-bg); }

.topbar {
  position: absolute;
  top: calc(var(--safe-top) + var(--s-3));
  left: calc(var(--safe-left) + var(--s-4));
  right: calc(var(--safe-right) + var(--s-4));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  z-index: var(--z-ui);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.status {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  max-width: 100%;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
}
.status__text { overflow: hidden; text-overflow: ellipsis; }
.status__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c-text-muted); flex: 0 0 auto; }
.status[data-kind="live"] .status__dot { background: var(--c-green); animation: beat 1.4s ease-in-out infinite; }
.status[data-kind="waking"] .status__dot { background: var(--c-sky); animation: blink 1s ease-in-out infinite; }
.status[data-kind="offline"] .status__dot { background: var(--c-red); }

@keyframes beat {
  0%, 100% { box-shadow: 0 0 0 0 rgb(63 193 27 / .55); }
  50% { box-shadow: 0 0 0 7px rgb(63 193 27 / 0); }
}
@keyframes blink { 50% { opacity: .25; } }

.toast {
  position: absolute;
  top: calc(var(--safe-top) + 72px);
  left: 50%;
  translate: -50% 0;
  display: grid;
  gap: 2px;
  width: min(calc(100% - 32px), 420px);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  animation: drop-in .5s var(--spring) both;
  cursor: pointer;
  border: 0;
  text-align: left;
}
.toast__title { font-weight: 900; }
.toast__body { color: var(--c-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-24px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.card {
  position: absolute;
  left: calc(var(--safe-left) + var(--s-3));
  right: calc(var(--safe-right) + var(--s-3));
  bottom: calc(var(--safe-bottom) + var(--s-3));
  display: grid;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3) var(--s-3);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-ui);
  --hide: 0px;
  transform: translateY(calc(var(--hide) + var(--drag, 0px)));
  transition: transform .4s var(--spring);
  animation: rise .7s var(--spring) backwards .1s;
}
.card[data-hidden="true"] { --hide: calc(100% - 34px); }
.card--dragging { transition: none; }
.card[data-hidden="true"] .card__head, .card[data-hidden="true"] .people { pointer-events: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(120%); }
  to { opacity: 1; transform: none; }
}

.card__grip {
  justify-self: center;
  width: 140px;
  height: 30px;
  margin: -6px 0 -10px;
  padding: 0;
  border: 0;
  background: none;
  position: relative;
  touch-action: manipulation;
}
.card__grip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 11px;
  width: 44px;
  height: 5px;
  margin-left: -22px;
  border-radius: var(--r-pill);
  background: var(--c-border);
  transition: background-color .2s ease-in-out;
}
.card__grip:hover::before { background: var(--c-text-muted); }

.card__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-3); }
.card__avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 3px solid var(--c-surface);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-sky), var(--c-pink));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.card__avatar--me { background: linear-gradient(135deg, var(--c-yellow), var(--c-pink)); }
.card__who {
  display: grid;
  min-width: 0;
  padding: var(--s-1) 0;
  border: 0;
  background: none;
  text-align: left;
  min-height: 44px;
}
.card__name { font-size: 1.25rem; font-weight: 900; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__meta { color: var(--c-text-muted); font-weight: 800; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__love { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; margin-top: 4px; font-size: .78rem; font-weight: 900; color: var(--c-pink-deep); }
.card__stat { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: rgb(200 16 122 / .09); white-space: nowrap; line-height: 1.4; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .card__love { color: #ff8fd2; }
[data-theme="dark"] .card__stat { background: rgb(255 143 210 / .14); }
.card__love--together .card__stat:first-child { animation: beat-text 2s ease-in-out infinite; }
@keyframes beat-text { 50% { opacity: .75; } }
.card__speed {
  display: grid;
  justify-items: center;
  min-width: 60px;
  padding: 6px var(--s-2);
  border-radius: var(--r-md);
  background: var(--c-pink-deep);
  color: #fff;
  line-height: 1;
  animation: pop-in .45s var(--spring) both;
}
.card__speed-value { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.card__speed-unit { font-size: .72rem; font-weight: 900; opacity: .9; }

.round-btn--chat { position: relative; width: 48px; height: 48px; box-shadow: none; background: var(--c-surface-2); font-size: 1.3rem; }
.badge--float { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; font-size: .75rem; box-shadow: 0 0 0 2px var(--c-surface); }

.card__more {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: var(--s-3);
  overflow: hidden;
  max-height: var(--more, 0px);
  opacity: var(--more-o, 0);
  transition: max-height .42s var(--ease-out), opacity .25s ease-in-out;
}
.card[data-expanded="true"] .card__more { opacity: var(--more-o, 1); }
.card--dragging .card__more { transition: none; }

.card__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.card__chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  font-size: .92rem;
  font-weight: 800;
}
.chip--good { background: var(--c-green-soft); }

.card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); padding-bottom: var(--s-1); }
.card__actions .btn { min-height: 48px; padding: 0 var(--s-3); font-size: 1.05rem; }
.card { touch-action: pan-x; user-select: none; -webkit-user-select: none; }

.people {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 8px var(--s-1) 2px;
  margin-top: -6px;
}
.people::-webkit-scrollbar { display: none; }
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 3px var(--s-3) 3px 3px;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  font-weight: 900;
  flex: 0 0 auto;
  transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}
.person-chip[data-following="true"] { border-color: var(--c-pink); box-shadow: 0 0 0 3px var(--c-ring); }
.person-chip[aria-selected="true"]:not([data-following="true"]) { background: var(--c-surface); }
.person-chip__avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-sky), var(--c-pink));
  font-size: .85rem;
}
.person-chip__dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--c-surface-2);
  background: var(--c-text-muted);
}
.person-chip[data-kind="live"] .person-chip__dot,
.person-chip[data-kind="recent"] .person-chip__dot { background: var(--c-green); }
.person-chip[data-kind="waking"] .person-chip__dot { background: var(--c-sky); }
.person-chip__name { white-space: nowrap; }
.person-chip { position: relative; }
.person-chip__unread {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--c-pink-deep);
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--c-surface);
}
.person-chip__unread[hidden] { display: none; }
.poke__from .avatar-slot.poke__avatar { flex: 0 0 32px; width: 32px; height: 32px; max-width: 32px; max-height: 32px; overflow: hidden; border-radius: 50%; }

.status[data-kind="recent"] .status__dot { background: var(--c-green); }

.place {
  display: grid;
  justify-items: center;
  width: 52px;
  height: 60px;
  pointer-events: none;
}
.place::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 5px;
  margin-left: -6px;
  border-radius: 50%;
  background: rgb(27 31 59 / .22);
  filter: blur(1px);
}
.place__bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff 0%, #fff4e6 100%);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--place-color, var(--c-pink)), 0 8px 16px rgb(27 31 59 / .22);
  transform-origin: 50% 100%;
  animation: place-pop .55s var(--spring) both;
}
.place--work .place__bubble { background: linear-gradient(160deg, #fff 0%, #e8f4ff 100%); }
.place__bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 1px);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: var(--place-color, var(--c-pink));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.place__icon { font-size: 1.55rem; line-height: 1; translate: 0 1px; }
.place__bubble, .place::after { transition: opacity .3s ease-in-out, transform .3s ease-in-out; }
.place--here { pointer-events: none; }
.place--here .place__bubble, .place--here::after { opacity: 0; transform: scale(.6); }
.place__owner {
  position: absolute;
  right: -8px;
  top: -6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--c-sky), var(--c-pink));
  color: #fff;
  font-size: .7rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgb(27 31 59 / .25);
}
.place__owner .avatar-slot { width: 100%; height: 100%; display: grid; place-items: center; font-size: inherit; }
@keyframes place-pop {
  from { opacity: 0; transform: translateY(8px) scale(.6); }
  to { opacity: 1; transform: none; }
}

.picker { position: absolute; inset: 0; z-index: var(--z-ui); pointer-events: none; }
.picker__cross {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -56px 0 0 -28px;
  border-radius: 50% 50% 50% 8px;
  rotate: -45deg;
  background: var(--c-pink-deep);
  box-shadow: var(--shadow-lg);
  animation: drop-in .45s var(--spring) both;
}
.picker__cross span { rotate: 45deg; font-size: 1.6rem; }
.picker__bar {
  position: absolute;
  left: calc(var(--safe-left) + var(--s-3));
  right: calc(var(--safe-right) + var(--s-3));
  bottom: calc(var(--safe-bottom) + var(--s-3));
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: rise .5s var(--spring) both;
}
.picker__text { font-weight: 900; font-size: 1.1rem; text-align: center; }
.picker__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

.list__actions { display: inline-flex; gap: var(--s-2); }
.list__action--primary { color: var(--c-blue); }
[data-theme="dark"] .list__action--primary { color: #8fd3ff; }

.share {
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  padding: 0 var(--s-3);
}
.share[open] { padding-bottom: var(--s-3); }
.share__summary {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 52px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.share__summary::-webkit-details-marker { display: none; }
.share__summary::after { content: "›"; margin-left: auto; font-size: 1.4rem; color: var(--c-text-muted); transition: rotate .2s ease-in-out; }
.share[open] .share__summary::after { rotate: 90deg; }
.share__steps { margin: 0 0 var(--s-3); padding-left: 1.3em; display: grid; gap: var(--s-2); font-weight: 700; }
.share__hint { margin-top: var(--s-2); font-size: .82rem; color: var(--c-text-muted); font-weight: 700; }
.share .pair { margin-bottom: var(--s-3); }
.manual { display: grid; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); background: var(--c-surface); }
.manual__title { font-weight: 900; }
.manual__hint { font-size: .85rem; font-weight: 700; color: var(--c-text-muted); }
.manual__list { display: grid; gap: 6px; margin: 0; }
.manual__list dt { font-size: .8rem; font-weight: 900; color: var(--c-text-muted); }
.manual__list dd { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-2); min-width: 0; }
.manual__list code { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--c-surface-2); font-size: .85rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

.pin { width: 72px; height: 72px; }
.pin__car {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 54px;
  margin: -27px 0 0 -17px;
  opacity: 0;
  transform: scale(.3);
  transition: opacity .25s ease-in-out, transform .55s var(--spring);
  pointer-events: none;
}
.pin__car-rot { position: absolute; inset: 0; transform: rotate(var(--car-brg, 0deg)); }
.pin__car-svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }
.pin__car-rot::before { content: ""; position: absolute; left: 4px; right: 4px; top: 6px; bottom: -2px; border-radius: 14px; background: rgb(27 31 59 / .22); transform: translate(2px, 3px); }
.car__trail { position: absolute; left: 50%; top: 100%; width: 0; height: 0; }
.car__puff { position: absolute; left: -6px; top: -8px; width: 12px; height: 12px; border-radius: 50%; background: rgb(255 255 255 / .9); box-shadow: 0 0 0 1px rgb(27 31 59 / .06); opacity: 0; }
.car__streak { position: absolute; top: -26px; width: 2.5px; height: 14px; border-radius: 2px; background: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / .95)); opacity: 0; }
.car__streak--left { left: -19px; }
.car__streak--right { left: 16.5px; }
.pin--car .car__puff { animation: car-puff 1s linear infinite; }
.pin--car .car__puff:nth-child(2) { animation-delay: .33s; }
.pin--car .car__puff:nth-child(3) { animation-delay: .66s; }
.pin--car .car__streak { animation: car-streak .7s ease-in infinite; }
.pin--car .car__streak--right { animation-delay: .35s; }
@keyframes car-puff {
  0% { opacity: .85; transform: translate(0, 0) scale(.35); }
  100% { opacity: 0; transform: translate(var(--drift, 3px), 30px) scale(1.5); }
}
.car__puff:nth-child(2) { --drift: -4px; }
.car__puff:nth-child(3) { --drift: 1px; }
@keyframes car-streak {
  0% { opacity: 0; transform: translateY(-6px); }
  30% { opacity: .9; }
  100% { opacity: 0; transform: translateY(26px); }
}
@media (prefers-reduced-motion: reduce) {
  .pin--car .car__puff, .pin--car .car__streak { animation: none; }
}
.car__paint { fill: var(--car-color, var(--person-color)); }
.car__edge { stroke: rgb(27 31 59 / .35); stroke-width: 1.2; }
.car__glass { fill: #1b2233; opacity: .88; }
.car__roof { fill: #000; opacity: .1; }
.car__light { fill: #fffbe0; }
.car__tail { fill: #ff3b55; }
.pin--car .pin__car { opacity: 1; transform: scale(1); }
.pin__chase { display: none; position: absolute; left: 50%; top: 50%; width: 132px; height: 150px; margin: -96px 0 0 -66px; pointer-events: none; }
.pin__chase-canvas { display: block; width: 100%; height: 100%; }
.pin--drive3d.pin--car .pin__chase { display: block; }
.pin--drive3d.pin--car .pin__car,
.pin--drive3d.pin--car .pin__avatar,
.pin--drive3d.pin--car .pin__badge,
.pin--drive3d.pin--car .pin__ring,
.pin--drive3d.pin--car .pin__cone,
.pin--drive3d.pin--car .status-badge { display: none; }
.topbar[data-driving="true"] .status { display: none; }
.drive-hud {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  max-width: 100%;
  height: 44px;
  padding: 0 var(--s-4) 0 4px;
  border-radius: var(--r-pill);
  background: rgb(18 19 24 / .86);
  color: #fff;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  animation: hud-in .3s var(--ease-out) both;
}
.drive-hud[hidden] { display: none; }
.drive-hud__speed {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 64px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--c-pink-deep);
  line-height: 36px;
}
.drive-hud__speed b { font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.drive-hud__speed small { font-size: .68rem; font-weight: 800; opacity: .85; }
.drive-hud__street { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; font-weight: 900; }
.drive-hud__street:empty { display: none; }
@keyframes hud-in { from { opacity: 0; } to { opacity: 1; } }
.maplibregl-marker:has(.pin--car) { will-change: transform; }
.pin--car .pin__badge > span:first-child { display: none; }
.pin__avatar { transition: transform .5s var(--spring), border-width .3s ease-in-out; }
.pin--car .pin__avatar { transform: translate(24px, -24px) scale(.42); border-width: 6px; }
.pin.pin--car .pin__ring { animation: none; opacity: 0; }
.pin.pin--car .pin__bubble { display: none; }
.emoji-tray .emoji-btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--c-pink); }
.pin.pin--car .status-badge.status-badge--pin { visibility: hidden; animation: none; }
.pin__cone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  background: conic-gradient(from -26deg, rgb(255 45 180 / .5) 0deg 52deg, transparent 52deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 70%);
  mask-image: radial-gradient(circle, #000 18%, transparent 70%);
  transform: rotate(var(--brg, 0deg));
  transition: transform .8s var(--ease-out), opacity .4s ease-in-out;
  opacity: 0;
}
.pin--moving .pin__cone { opacity: 1; }
.pin__ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 3px solid var(--c-pink);
  opacity: 0;
}
.pin--live .pin__ring { animation: ripple 2s ease-out infinite; }
@keyframes ripple {
  from { opacity: .7; transform: scale(1); }
  to { opacity: 0; transform: scale(1.9); }
}
.pin__avatar {
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 4px solid #fff;
  background: linear-gradient(135deg, var(--c-sky), var(--c-pink));
  color: #fff;
  font-size: 1.9rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgb(27 31 59 / .3);
}
.pin--stale .pin__avatar { filter: grayscale(.6) brightness(.95); }
.pin__badge {
  position: absolute;
  left: 50%;
  top: 100%;
  translate: -50% -12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: #fff;
  color: #1b1f3b;
  font-size: .95rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgb(27 31 59 / .25);
}
.pin__badge small { font-size: .7rem; color: #5b6283; }
.pin__bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 190px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: #fff;
  color: #5b6283;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgb(27 31 59 / .22);
  animation: pop-in .5s var(--spring) both;
  pointer-events: none;
}
.pin__bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #fff;
}
.pin__bubble--live { color: #1b7a3d; }
.pin__bubble--live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 0 var(--c-green);
  animation: live-dot 1.8s ease-out infinite;
}
@keyframes live-dot {
  from { box-shadow: 0 0 0 0 rgb(63 193 27 / .6); }
  to { box-shadow: 0 0 0 6px rgb(63 193 27 / 0); }
}

.sheet {
  position: fixed;
  inset: auto 0 var(--kb, 0px) 0;
  width: min(100%, 560px);
  max-width: 100%;
  max-height: min(86dvh, 760px, calc(100dvh - var(--kb, 0px) - 12px));
  margin: 0 auto;
  padding: 0 0 var(--safe-bottom);
  border: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .45s var(--ease-out) both; }
.sheet--closing[open] { animation: sheet-down .25s ease-in both; }
.sheet::backdrop { background: var(--c-scrim); animation: fade .3s ease-in-out both; }
.sheet--closing::backdrop { animation: fade .25s ease-in-out reverse both; }

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet__grip { width: 44px; height: 5px; margin: var(--s-3) auto 0; border-radius: var(--r-pill); background: var(--c-border); flex: 0 0 auto; }
.chat-head { display: inline-flex; align-items: center; gap: var(--s-3); min-width: 0; }
.chat-head .avatar-slot.chat-head__avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-sky), var(--c-pink)); color: #fff; font-weight: 900; box-shadow: 0 0 0 3px var(--c-surface), 0 4px 10px rgb(27 31 59 / .2); }
.chat-head .sheet__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4) var(--s-3) var(--s-5);
  flex: 0 0 auto;
}
.sheet__title { font-size: 1.5rem; font-weight: 900; }
.sheet__body { display: grid; gap: var(--s-5); padding: 0 var(--s-4) var(--s-5); overflow-y: auto; overscroll-behavior: contain; }

.chat {
  list-style: none;
  margin: 0;
  padding: var(--s-2) var(--s-4) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 180px;
  flex: 1 1 auto;
}
.chat__empty { margin: auto; text-align: center; color: var(--c-text-muted); font-weight: 800; padding: var(--s-6) 0; }
.chat__item { display: grid; gap: 2px; justify-items: start; max-width: 82%; animation: pop-in .35s var(--spring) both; }
.chat__item--mine { align-self: flex-end; justify-items: end; }
.chat__author { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 900; color: var(--c-text-muted); padding: 0 var(--s-2); }
.chat__bubble {
  padding: 10px 16px;
  border-radius: 22px 22px 22px 6px;
  background: var(--c-bubble-other);
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat__item--mine .chat__bubble { border-radius: 22px 22px 6px 22px; background: var(--c-pink-deep); color: #fff; }
.chat__item--broadcast:not(.chat__item--mine) .chat__bubble { background: var(--c-bubble-broadcast); color: var(--c-bubble-broadcast-text); }
.chat__meta { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--s-3); font-size: .75rem; color: var(--c-text-muted); }
.chat__time { font-size: inherit; }
.chat__receipt { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--c-text-muted); }
.receipt-tick { width: 17px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chat__receipt .receipt-avatar { width: 16px; height: 16px; flex: 0 0 16px; font-size: .5rem; background: linear-gradient(135deg, var(--c-sky), var(--c-pink)); box-shadow: 0 0 0 1.5px var(--c-surface); }
.chat__receipt .receipt-avatar .avatar-img { width: 16px; height: 16px; }
.receipt-dots { display: inline-flex; gap: 3px; padding: 2px 0; }
.receipt-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot-bounce 1s ease-in-out infinite; }
.receipt-dots i:nth-child(2) { animation-delay: .15s; }
.receipt-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-bounce { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
.receipt-retry {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgb(229 55 79 / .12);
  color: var(--c-red);
  font-size: .75rem;
  font-weight: 900;
}
.chat__receipt[data-kind="seen"] { color: var(--c-sky-deep); }
[data-theme="dark"] .chat__receipt[data-kind="seen"] { color: #8fd3ff; }
.chat__receipt[data-kind="failed"] { color: var(--c-red); }

.combo, .poke {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--s-2);
  pointer-events: none;
  z-index: var(--z-toast);
}
.combo__emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: calc(96px * var(--s, 1));
  line-height: 1.1;
  transition: font-size .2s var(--spring);
  filter: drop-shadow(0 12px 24px rgb(27 31 59 / .3));
}
.combo--pop .combo__emoji { animation: combo-pop .22s var(--spring); }
@keyframes combo-pop { from { scale: .8; } to { scale: 1; } }
.combo__emoji[data-motion="beat"] { animation: emoji-beat .9s ease-in-out infinite; }
.combo__emoji[data-motion="flame"] { animation: emoji-flame .5s ease-in-out infinite alternate; transform-origin: 50% 90%; }
.combo--pop .combo__emoji[data-motion="beat"] { animation: combo-pop .22s var(--spring), emoji-beat .9s ease-in-out .22s infinite; }
.combo--pop .combo__emoji[data-motion="flame"] { animation: combo-pop .22s var(--spring), emoji-flame .5s ease-in-out .22s infinite alternate; }
@keyframes emoji-beat {
  0%, 100% { scale: 1; }
  15% { scale: 1.14; }
  30% { scale: .97; }
  45% { scale: 1.08; }
}
@keyframes emoji-flame {
  from { scale: 1 1; rotate: -3deg; filter: drop-shadow(0 12px 24px rgb(255 120 0 / .35)) brightness(1); }
  to { scale: .96 1.08; rotate: 3deg; filter: drop-shadow(0 14px 30px rgb(255 120 0 / .55)) brightness(1.12); }
}
.combo__count {
  order: -1;
  padding: 2px 18px 4px;
  border: 3px solid #fff;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--c-pink), var(--c-pink-deep));
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  line-height: 1.2;
  box-shadow: 0 8px 22px rgb(200 16 122 / .4);
}
.combo__count[hidden] { display: none; }
.combo__count--pop { animation: count-pop .25s var(--spring); }
@keyframes count-pop { from { scale: 1.35; } to { scale: 1; } }
.combo--fly .combo__emoji { animation: combo-fly .42s ease-in forwards; }
.combo--fly .combo__count { opacity: 0; transition: opacity .2s ease-in-out; }
@keyframes combo-fly { to { translate: 0 -38vh; scale: .25; opacity: 0; } }

.poke { background: radial-gradient(circle at center, rgb(27 31 59 / .28), rgb(27 31 59 / 0) 70%); animation: fade .25s ease-in-out both; }
.poke__from {
  order: -2;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: 6px var(--s-4) 6px 6px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
  font-weight: 900;
  animation: drop-in .45s var(--spring) both;
}
.poke__avatar { width: 32px; height: 32px; font-size: .9rem; background: linear-gradient(135deg, var(--c-sky), var(--c-pink)); }
.poke__emoji { font-size: calc(120px * var(--s, 1)); animation: pop-in .4s var(--spring) both; }
.poke__emoji[data-motion="beat"] { animation: pop-in .4s var(--spring) both, emoji-beat .9s ease-in-out .4s infinite; }
.poke__emoji[data-motion="flame"] { animation: pop-in .4s var(--spring) both, emoji-flame .5s ease-in-out .4s infinite alternate; }
.poke--boom .poke__emoji { animation: poke-boom .35s ease-out forwards; }
.poke--boom .poke__from, .poke--boom .combo__count { opacity: 0; transition: opacity .3s ease-in-out .2s; }
@keyframes poke-boom { to { scale: 1.8; opacity: 0; } }
.burst--radial { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.burst__item--radial { font-size: calc(2.4rem * var(--size, 1)); animation-name: burst-radial; animation-duration: 1.4s; }
@keyframes burst-radial {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)); }
}
.chat__bubble { transition: opacity .25s ease-in-out; }
.chat__item--pending .chat__bubble { opacity: .65; }
.chat__item--mine { animation: send-pop .38s var(--spring) both; transform-origin: bottom right; }
@keyframes send-pop { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4) var(--s-4);
  border-top: 1px solid var(--c-border);
  flex: 0 0 auto;
}
.composer__input {
  width: 100%;
  min-height: 50px;
  max-height: 140px;
  height: var(--composer-h, auto);
  padding: 13px var(--s-4);
  border: 2px solid var(--c-border);
  border-radius: 25px;
  background: var(--c-surface-2);
  font-size: 1rem;
  font-weight: 700;
  resize: none;
  overflow-y: hidden;
  scrollbar-width: none;
  transition: border-color .2s ease-in-out;
}
.composer__input::-webkit-scrollbar { display: none; }
.composer__input--scroll { overflow-y: auto; }
.composer__input:focus { outline: none; border-color: var(--c-pink); }
.composer__send {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--c-pink-deep);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 0 var(--c-pink-press);
  transition: box-shadow .12s ease-in-out;
}
.composer__send:active { box-shadow: 0 1px 0 var(--c-pink-press); }

.profile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-4); }
.profile__name { font-size: 1.3rem; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile__row { display: flex; align-items: center; gap: var(--s-2); min-width: 0; max-width: 100%; }
.name-form { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); width: 100%; margin-top: var(--s-1); }
.name-form__input { min-height: 46px; }
.name-form__save { min-height: 46px; padding: 0 var(--s-4); font-size: 1rem; }
.profile__sub { color: var(--c-text-muted); font-weight: 800; }

.group { display: grid; gap: var(--s-3); }
.group__title { font-size: 1rem; font-weight: 900; color: var(--c-text-muted); padding-left: var(--s-1); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 52px; padding: var(--s-2) var(--s-4); border-radius: var(--r-lg, 18px); background: var(--c-surface-2); font-weight: 800; cursor: pointer; }
.switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; flex: 0 0 52px; width: 52px; height: 30px; border-radius: var(--r-pill); background: var(--c-border); transition: background-color .2s ease-in-out; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(27 31 59 / .25); transition: transform .25s var(--spring); }
.switch__input:checked + .switch__track { background: var(--c-pink-deep); }
.switch__input:checked + .switch__track::after { transform: translateX(22px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--c-pink); outline-offset: 2px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.list__empty { color: var(--c-text-muted); font-weight: 700; padding: var(--s-2) var(--s-1); }
.list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
}
.list__icon { font-size: 1.5rem; width: 40px; text-align: center; }
.list__text { display: grid; min-width: 0; }
.list__title { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__sub { font-size: .85rem; color: var(--c-text-muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__action {
  min-height: 40px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--c-red);
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}
.list__action:disabled { color: var(--c-green); cursor: default; box-shadow: none; background: transparent; }

.pair {
  display: grid;
  gap: var(--s-1);
  justify-items: center;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c-yellow), var(--c-pink));
  color: #fff;
  animation: pop-in .45s var(--spring) both;
}
.pair__code { font-size: 2.2rem; font-weight: 900; letter-spacing: .14em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgb(0 0 0 / .15); }
.pair__hint { font-weight: 800; text-shadow: 0 1px 0 rgb(0 0 0 / .15); }

.maplibregl-map { font-family: inherit; }
.maplibregl-ctrl-top-right { top: calc(var(--safe-top) + 64px); right: var(--safe-right); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--c-surface); color: var(--c-text-muted); box-shadow: var(--shadow-sm); }
.maplibregl-ctrl-attrib a { color: inherit; }
.maplibregl-marker { will-change: transform; }

.avatar-slot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  font-weight: 900;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.round-btn--avatar { padding: 0; overflow: hidden; font-size: 1.2rem; }
.card__avatar { position: relative; }
.card__avatar .avatar-slot { font-size: inherit; }
.card__avatar--large { width: 76px; height: 76px; font-size: 2rem; }

.status-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  line-height: 1;
  animation: pop-in .45s var(--spring) both;
}
.status-badge--pin { right: -4px; bottom: auto; top: -4px; width: 32px; height: 32px; font-size: 1.15rem; background: #fff; z-index: 2; }

.pin { cursor: pointer; }
.pin:focus-visible { outline: 3px solid var(--c-pink); outline-offset: 4px; border-radius: 50%; }

.btn--yellow { background: var(--c-yellow); color: #2b2100; box-shadow: 0 5px 0 #b88a00, var(--shadow-sm); }
.btn--yellow:active { box-shadow: 0 1px 0 #b88a00, var(--shadow-sm); }
.btn--icon { width: 54px; padding: 0; font-size: 1.5rem; }
.btn--icon[aria-expanded="true"] { filter: brightness(1.08) saturate(1.2); }

.emoji-tray {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: var(--s-2);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  animation: pop-in .4s var(--spring) both;
}
.emoji-btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--c-surface);
  font-size: 1.5rem;
  line-height: 1;
  transition: box-shadow .15s ease-in-out, border-color .15s ease-in-out, filter .15s ease-in-out;
}
.emoji-btn:hover { box-shadow: var(--shadow-sm); }
.emoji-btn:active { filter: brightness(.92); }
.emoji-btn:disabled { filter: saturate(.3); cursor: progress; }
.emoji-tray .emoji-btn { min-width: 0; width: 100%; }
.emoji-btn--small { min-width: 42px; height: 42px; font-size: 1.35rem; background: var(--c-surface-2); flex: 0 0 auto; }
.emoji-btn--status { background: var(--c-surface-2); }
.emoji-btn--more { color: var(--c-text-muted); font-weight: 900; background: var(--c-surface-2); }
.status-form { margin-top: var(--s-3); }
.status-form__input { font-size: 1.1rem; }
.status-form__input[aria-invalid="true"] { border-color: var(--c-pink-deep); }
.emoji-btn--status[aria-pressed="true"] { border-color: var(--c-pink); box-shadow: 0 0 0 3px var(--c-ring); }
.emoji-btn--clear { font-size: 1rem; color: var(--c-text-muted); font-weight: 900; }

.emoji-bar {
  display: flex;
  gap: 6px;
  padding: var(--s-2) var(--s-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-top: 1px solid var(--c-border);
  flex: 0 0 auto;
}
.emoji-bar::-webkit-scrollbar { display: none; }
.emoji-bar + .composer { border-top: 0; }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: var(--s-2); }

.profile__text { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.avatar-edit { position: relative; display: block; cursor: pointer; border-radius: 50%; }
.avatar-edit:focus-within { outline: 3px solid var(--c-pink); outline-offset: 3px; }
.avatar-edit__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-size: .95rem;
}
.link-btn {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-pink-deep);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}
[data-theme="dark"] .link-btn { color: #ff7ccc; }

.chat__avatar {
  width: 22px;
  height: 22px;
  font-size: .7rem;
  background: linear-gradient(135deg, var(--c-sky), var(--c-pink));
  flex: 0 0 auto;
}
.chat__item--emoji .chat__bubble,
.chat__item--emoji.chat__item--mine .chat__bubble,
.chat__item--emoji.chat__item--broadcast .chat__bubble {
  padding: 0 4px;
  background: none;
  color: inherit;
  font-size: 2.6rem;
  line-height: 1.15;
}

.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.burst__item {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 2rem;
  line-height: 1;
  opacity: 0;
  animation: burst-float 1.9s cubic-bezier(.2, .8, .3, 1) var(--delay, 0ms) both;
}
@keyframes burst-float {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .25), calc(-50% + var(--dy) * .25)) scale(var(--scale)) rotate(var(--rot)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--scale)) rotate(var(--rot)); }
}

@media (min-width: 900px) {
  .card {
    left: calc(var(--safe-left) + var(--s-5));
    right: auto;
    bottom: var(--s-5);
    width: 400px;
  }
  .sheet { inset: auto 0 var(--s-5) 0; border-radius: var(--r-xl); }
  .sheet[open] { animation-name: sheet-pop; }
  .sheet--closing[open] { animation: sheet-pop-out .2s ease-in both; }
  @keyframes sheet-pop { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes sheet-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(40px) scale(.97); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.round-btn[hidden] { display: none; }
.emoji-art { display: block; width: 1.1em; height: 1.1em; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.burst__item--radial .emoji-art { width: 1em; height: 1em; }
.drive-toggle { position: absolute; right: calc(var(--safe-right) + var(--s-3)); top: calc(var(--safe-top) + 76px); z-index: var(--z-ui); transition: background-color .2s ease-in-out, box-shadow .2s ease-in-out; }
.drive-toggle[aria-pressed="true"] { background: var(--c-pink-deep); box-shadow: 0 0 0 3px var(--c-ring), var(--shadow-md); }
.emoji-tray { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.emoji-tray::-webkit-scrollbar { display: none; }
.emoji-tray .emoji-btn { width: 46px; height: 46px; scroll-snap-align: start; }
.card { gap: 6px; padding: 6px var(--s-3) var(--s-3); }
.card__more { gap: var(--s-2); }
.person-chip { min-height: 36px; }
.card__speed { min-width: 52px; padding: 5px 6px; }
.card__speed-value { font-size: 1.3rem; }
.card__name { font-size: 1.12rem; }
.card__meta { font-size: .86rem; }
.drive-toggle { top: calc(var(--safe-top) + 140px); }
@media (min-width: 640px) and (max-width: 899px) {
  .card { left: 50%; right: auto; width: min(440px, calc(100% - 2 * var(--s-3))); margin-left: calc(min(440px, calc(100% - 2 * var(--s-3))) / -2); }
}
.drive-toggle { top: auto; bottom: calc(var(--card-inset, 180px) + 4px); color: var(--c-text); }
.drive-toggle[aria-pressed="true"] { color: #fff; }
.drive-toggle__icon { width: 26px; height: 26px; display: block; }
