:root {
  --canvas: #f7f3ed;
  --canvas-deep: #f0eae2;
  --paper: #fffdfa;
  --paper-soft: #fbf8f4;
  --ink: #282522;
  --ink-soft: #6f6962;
  --ink-faint: #9a938b;
  --line: #e9e1d8;
  --coral: #ef756d;
  --coral-deep: #d85e57;
  --coral-soft: #fde0db;
  --peach: #f8c9bc;
  --mint: #b9d9cd;
  --mint-deep: #608f80;
  --mint-pale: #e9f4ef;
  --sand: #d8c4aa;
  --sand-soft: #f0e5d6;
  --yellow: #efd591;
  --yellow-pale: #fbf3d8;
  --blue: #7195aa;
  --danger: #c74d47;
  --shadow: 0 18px 55px rgba(72, 57, 45, 0.08);
  --shadow-soft: 0 8px 28px rgba(72, 57, 45, 0.06);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --sidebar: 232px;
  font-family: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 8%, rgba(248, 201, 188, 0.16), transparent 24rem),
    var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  touch-action: manipulation;
}

body::-webkit-scrollbar {
  display: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(239, 117, 109, 0.3);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 20px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(61, 53, 46, 0.07);
  background: rgba(241, 235, 227, 0.82);
  backdrop-filter: blur(16px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.brand small {
  margin-left: 1px;
  padding-left: 9px;
  border-left: 1px solid #d9cfc4;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 24px;
  flex: none;
}

.brand-mark i {
  position: absolute;
  top: 2px;
  width: 21px;
  height: 21px;
  border: 2.5px solid var(--coral);
  border-radius: 50%;
}

.brand-mark i:first-child {
  left: 0;
}

.brand-mark i:last-child {
  right: 0;
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
}

.side-nav {
  display: grid;
  gap: 7px;
  margin-top: 58px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 15px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  color: #716a63;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(63, 53, 44, 0.08);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -20px;
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--coral);
}

.nav-icon {
  color: #8f877f;
}

.nav-item.is-active .nav-icon {
  color: var(--coral);
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.nav-badge {
  margin-left: auto;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 10px;
  line-height: 1;
}

.side-partner {
  margin-top: auto;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.56);
}

.side-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-person div:not(.avatar) {
  min-width: 0;
}

.side-person strong,
.side-person small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-person strong {
  font-size: 12px;
}

.side-person small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.side-battery {
  margin-left: auto;
  color: var(--mint-deep);
  font-size: 11px;
  font-weight: 750;
}

.side-footer {
  padding-top: 17px;
  border-top: 1px solid rgba(102, 91, 81, 0.1);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
}

.privacy-note > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--mint-deep);
  background: var(--mint-pale);
}

.privacy-note svg {
  width: 15px;
  height: 15px;
}

.privacy-note strong,
.privacy-note small {
  display: block;
}

.privacy-note strong {
  font-size: 10px;
}

.privacy-note small {
  margin-top: 2px;
  font-size: 9px;
  color: var(--ink-faint);
}

.main-content {
  width: 100%;
  max-width: 1440px;
  padding: 39px 45px 64px;
  margin: 0 auto;
}

.mobile-bar,
.mobile-nav {
  display: none;
}

.mobile-bar .mode-pill {
  width: auto;
  min-width: 0;
  height: 31px;
  flex: none;
  display: flex;
  flex-wrap: nowrap;
  padding: 0 10px;
  white-space: nowrap;
}

.view {
  display: none;
  animation: view-in 320ms cubic-bezier(0.2, 0.72, 0.32, 1) both;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-intro {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.12em;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(25px, 2.3vw, 34px);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.intro-sub {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.icon-button.is-spinning svg {
  animation: spin 500ms ease;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.avatar-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--sand);
  color: #fff;
  box-shadow: 0 0 0 1px #ded2c4;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

.avatar img,
.avatar-button img,
.message-avatar img,
.marker-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(310px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.demo-mode-banner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -9px 0 18px;
  padding: 11px 14px;
  border: 1px solid #f1d5cb;
  border-radius: 16px;
  background: #fff5f1;
}

.demo-mode-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.demo-mode-icon svg {
  width: 16px;
  height: 16px;
}

.demo-mode-banner > div {
  flex: 1;
  min-width: 0;
}

.demo-mode-banner strong,
.demo-mode-banner small {
  display: block;
}

.demo-mode-banner strong {
  font-size: 10px;
}

.demo-mode-banner small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8px;
}

.demo-mode-banner button {
  flex: none;
  border: 0;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--coral-deep);
  background: #fff;
  font-size: 8px;
  font-weight: 650;
  cursor: pointer;
}

.map-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(230, 221, 211, 0.85);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.map-heading {
  min-height: 59px;
  padding: 4px 7px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.map-heading h2 {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 680;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 117, 109, 0.12);
  animation: breathe 2.4s ease-in-out infinite;
}

.live-pill.pale {
  color: var(--mint-deep);
}

.live-pill.pale i {
  background: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(96, 143, 128, 0.11);
}

@keyframes breathe {
  50% { box-shadow: 0 0 0 7px rgba(239, 117, 109, 0.05); }
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-person-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
}

.map-person-switch button {
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 8px;
  font-weight: 650;
  cursor: pointer;
}

.map-person-switch button.is-active {
  color: var(--coral-deep);
  background: #fff1ed;
  box-shadow: 0 2px 8px rgba(120, 70, 57, 0.08);
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.chip.is-selected {
  border-color: var(--coral-soft);
  color: var(--coral-deep);
  background: #fff3f0;
}

.chip svg {
  width: 15px;
  height: 15px;
  margin: 0 auto;
}

.map-fab-stack,
.map-dock,
.map-location-alert {
  display: none;
}

.map-frame {
  position: relative;
  height: 480px;
  overflow: hidden;
  border-radius: 21px;
  background: #e8e7df;
  isolation: isolate;
}

.map-frame.tall {
  height: 620px;
}

.map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  contain: paint;
  background: #e9e8e1;
}

.map-canvas.is-dragging {
  cursor: grabbing;
}

.map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(to top, rgba(56, 52, 43, 0.13), transparent 28%);
}

.map-fallback,
.map-tile-layer,
.route-svg,
.marker-layer {
  position: absolute;
  inset: 0;
}

.map-fallback {
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(36deg, transparent 43%, rgba(255, 255, 255, 0.9) 44%, rgba(255, 255, 255, 0.9) 47%, transparent 48%),
    linear-gradient(-24deg, transparent 36%, rgba(255, 255, 255, 0.84) 37%, rgba(255, 255, 255, 0.84) 39%, transparent 40%),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(190, 187, 172, 0.25) 43px 44px),
    repeating-linear-gradient(90deg, transparent 0 64px, rgba(190, 187, 172, 0.24) 65px 66px),
    #dedfd8;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 72% 28%, rgba(151, 195, 199, 0.24), transparent 34%),
    linear-gradient(145deg, #f6f4ee, #e8e7df);
  opacity: 1;
  transition: opacity 240ms ease;
  pointer-events: auto;
}

.map-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.map-loading strong {
  margin-top: 3px;
  font-size: 11px;
}

.map-loading small {
  color: var(--ink-faint);
  font-size: 9px;
}

.map-loading-ring {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(239, 117, 109, 0.18);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.map-fallback::before {
  content: "";
  position: absolute;
  width: 43%;
  height: 145%;
  top: -23%;
  right: 2%;
  transform: rotate(11deg);
  border-radius: 46%;
  background: linear-gradient(90deg, rgba(171, 205, 210, 0.7), #c8dde0 25%, #bfd9dc);
  box-shadow: inset 16px 0 34px rgba(56, 97, 105, 0.05);
}

.map-fallback::after {
  content: "";
  position: absolute;
  width: 64%;
  height: 80%;
  top: 5%;
  left: 1%;
  background:
    radial-gradient(ellipse at 20% 28%, rgba(196, 217, 183, 0.82) 0 10%, transparent 11%),
    radial-gradient(ellipse at 47% 42%, rgba(204, 221, 191, 0.68) 0 11%, transparent 12%),
    radial-gradient(ellipse at 25% 72%, rgba(198, 217, 188, 0.7) 0 12%, transparent 13%);
  opacity: 0.9;
}

.map-tiles {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.map-static-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  will-change: transform;
  z-index: 2;
  pointer-events: none;
}

.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 250ms ease;
  user-select: none;
  pointer-events: none;
}

.map-tile.is-loaded {
  opacity: 0.9;
}

.route-svg {
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route-glow {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 9 8;
}

.live-connect-line {
  stroke: rgba(232, 111, 103, 0.72);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 3 8;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}

.live-distance-label rect {
  fill: rgba(255, 253, 250, 0.94);
  stroke: rgba(235, 195, 187, 0.8);
  stroke-width: 1;
}

.live-distance-label text {
  fill: #b95d55;
  font-size: 8px;
  font-weight: 750;
}

.marker-layer {
  z-index: 4;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-marker.partner-marker {
  z-index: 2;
}

.partner-marker .marker-pulse {
  position: absolute;
  width: 58px;
  height: 58px;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: rgba(239, 117, 109, 0.18);
  transform: translate(-50%, -50%);
  animation: map-pulse 2.8s ease-out infinite;
}

@keyframes map-pulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.8; }
  80% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
  100% { opacity: 0; }
}

.self-marker .marker-face,
.partner-marker .marker-face {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}

.partner-marker .marker-face {
  background: var(--coral);
  box-shadow: 0 8px 24px rgba(126, 63, 55, 0.3);
}

.self-marker .marker-face {
  width: 42px;
  height: 42px;
  background: #678f87;
  box-shadow: 0 7px 22px rgba(52, 92, 82, 0.3);
}

.marker-stack {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.partner-marker .marker-label,
.self-marker .marker-label {
  position: static;
  transform: none;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 4px 14px rgba(60, 50, 40, 0.12);
  font-size: 9px;
  font-weight: 700;
}

.marker-battery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #43826f;
  background: rgba(235, 249, 241, 0.96);
  box-shadow: 0 3px 10px rgba(60, 80, 68, 0.11);
  font-size: 8px;
  font-weight: 750;
}

.marker-battery i {
  position: relative;
  width: 10px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.marker-battery i::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 1px;
  background: currentColor;
}

.marker-battery i::after {
  content: "";
  position: absolute;
  top: 1px;
  right: -3px;
  width: 2px;
  height: 3px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}

.marker-battery.is-low {
  color: #c9534c;
  background: rgba(255, 239, 236, 0.97);
}

.map-legend {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 5px 17px rgba(62, 56, 48, 0.1);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.map-zoom-controls {
  position: absolute;
  z-index: 9;
  top: 14px;
  right: 14px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 6px 20px rgba(62, 56, 48, 0.13);
  backdrop-filter: blur(8px);
}

.map-zoom-controls button {
  width: 34px;
  height: 32px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.map-zoom-controls button + button {
  border-top: 1px solid var(--line);
}

.map-zoom-controls button:active {
  background: var(--paper-soft);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.map-legend b {
  font-weight: inherit;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.self { background: #678f87; }
.legend-dot.partner { background: var(--coral); }

.map-distance {
  position: absolute;
  right: 15px;
  bottom: 15px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 6px 20px rgba(62, 56, 48, 0.13);
  backdrop-filter: blur(8px);
}

.trail-live-summary {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.91);
  box-shadow: 0 7px 24px rgba(58, 50, 42, 0.14);
  backdrop-filter: blur(12px);
}

.trail-live-summary > div {
  min-width: 0;
}

.trail-live-summary strong {
  margin-right: 4px;
  font-size: 18px;
}

.trail-live-summary span,
.trail-live-summary small {
  color: var(--ink-soft);
  font-size: 9px;
}

.trail-live-summary small {
  display: block;
  margin-top: 3px;
}

.trail-live-summary button {
  flex: none;
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  color: var(--coral-deep);
  background: #fff0ec;
  font-size: 9px;
  font-weight: 700;
}

.distance-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.distance-icon svg {
  width: 15px;
  height: 15px;
}

.map-distance strong,
.map-distance small {
  display: block;
}

.map-distance strong {
  font-size: 11px;
}

.map-distance small {
  margin-top: 1px;
  color: var(--ink-faint);
  font-size: 8px;
}

.map-location-card {
  position: relative;
  margin-top: 10px;
  min-height: 59px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 5px 3px;
}

.place-nearby {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 5px 4px;
  padding: 10px 11px;
  border: 1px solid #eee5dc;
  border-radius: 13px;
  background: #fcf8f4;
}

.place-nearby-label {
  flex: none;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--mint-deep);
  background: var(--mint-pale);
  font-size: 7px;
  font-weight: 700;
}

.place-nearby > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.place-nearby b {
  position: relative;
  padding-right: 10px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 600;
}

.place-nearby b::after {
  content: "·";
  position: absolute;
  right: 2px;
  color: #c5bbb2;
}

.place-nearby b:last-child::after {
  display: none;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.mini-avatar.coral {
  background: var(--coral);
}

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

.map-location-copy > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.map-location-copy strong {
  font-size: 12px;
}

.freshness {
  color: var(--mint-deep);
  font-size: 8px;
}

.map-location-copy p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.round-link {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffaf7;
  color: var(--coral);
  cursor: pointer;
}

.round-link svg {
  width: 16px;
  height: 16px;
}

.home-side {
  display: grid;
  gap: 14px;
}

.card {
  padding: 19px;
  border: 1px solid rgba(230, 221, 211, 0.9);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

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

.card-head h2 {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
}

.compact-head {
  align-items: center;
}

.section-kicker {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.soft-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
}

.soft-icon svg {
  width: 17px;
  height: 17px;
}

.soft-icon.coral { color: var(--coral-deep); background: var(--coral-soft); }
.soft-icon.peach { color: #a96856; background: #f9e2d9; }
.soft-icon.mint { color: var(--mint-deep); background: var(--mint-pale); }
.soft-icon.yellow { color: #9d7c34; background: var(--yellow-pale); }

.partner-focus {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 22px;
}

.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.avatar.coral { background: linear-gradient(145deg, #f4978b, #df655e); }
.avatar.sand { background: linear-gradient(145deg, #dcc8ae, #bda283); }
.avatar-large { width: 50px; height: 50px; font-size: 15px; }
.avatar-small { width: 32px; height: 32px; font-size: 9px; }
.avatar.tiny { width: 24px; height: 24px; font-size: 7px; }
.avatar-xl { width: 78px; height: 78px; font-size: 20px; border: 5px solid var(--paper); }

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

.partner-copy strong,
.partner-copy span {
  display: block;
}

.partner-copy strong {
  font-size: 13px;
}

.partner-copy span {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.online-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #73a997;
  box-shadow: 0 0 0 3px rgba(115, 169, 151, 0.12);
}

.online-dot.paused {
  background: #c6b4a2;
  box-shadow: 0 0 0 3px rgba(160, 139, 121, 0.1);
}

.battery-ring {
  --level: 78;
  position: relative;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--mint-deep) calc(var(--level) * 1%), #e9eee9 0);
}

.battery-ring.is-low {
  background: conic-gradient(var(--coral) calc(var(--level) * 1%), #f3e5e2 0);
}

.battery-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.battery-ring > span {
  position: relative;
  font-size: 12px;
  font-weight: 760;
}

.battery-ring small {
  font-size: 7px;
  font-weight: 600;
}

.battery-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
  color: var(--ink-faint);
}

.battery-line > svg {
  width: 15px;
  height: 15px;
}

.battery-track {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0ec;
}

.battery-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #93c3b1, #6fa18f);
  transition: width 400ms ease;
}

.battery-line small {
  min-width: 50px;
  text-align: right;
  color: var(--mint-deep);
  font-size: 8px;
}

.quick-card {
  padding-bottom: 16px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.quick-action {
  min-width: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: #dfcfc1;
}

.quick-action .soft-icon {
  width: 33px;
  height: 33px;
  border-radius: 11px;
}

.quick-action strong,
.quick-action small {
  display: block;
  white-space: nowrap;
}

.quick-action strong {
  font-size: 10px;
}

.quick-action small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.self-status {
  min-height: 65px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed #d9cfc5;
  border-radius: 19px;
  background: rgba(255, 253, 250, 0.5);
}

.self-status-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.self-status-left strong,
.self-status-left span {
  display: block;
}

.self-status-left strong {
  font-size: 10px;
}

.self-status-left span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.self-status-left span i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: #76aa99;
}

.my-battery {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--mint-deep);
}

.my-battery svg {
  width: 14px;
  height: 14px;
}

.my-battery strong {
  font-size: 10px;
}

.bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.78fr);
  gap: 20px;
  margin-top: 20px;
}

.together-card {
  min-height: 105px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding-left: 18px;
}

.together-visual {
  position: relative;
  flex: none;
  width: 74px;
  height: 68px;
}

.together-visual .avatar {
  position: absolute;
  z-index: 2;
}

.together-visual .avatar:first-of-type {
  left: 6px;
  top: 18px;
}

.together-visual .avatar:last-of-type {
  right: 5px;
  top: 18px;
}

.orbit {
  position: absolute;
  inset: 4px;
  border: 1px solid #eadcd2;
  border-radius: 50%;
  transform: rotate(-22deg);
}

.orbit-two {
  inset: 11px 6px;
  border-color: #d7e6df;
  transform: rotate(28deg);
}

.together-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.together-card h3,
.note-card h3 {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.45;
}

.together-card .section-kicker b {
  color: var(--coral);
}

.text-button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 9px 4px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
}

.text-button svg {
  width: 12px;
  height: 12px;
}

.note-card {
  min-height: 105px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.note-card > div {
  flex: 1;
}

.checkmark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mint-deep);
  background: var(--mint-pale);
}

.checkmark svg {
  width: 13px;
  height: 13px;
}

/* Trail */
.trail-intro {
  align-items: center;
}

.date-switcher {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 250, 0.72);
}

.date-switcher button {
  min-width: 60px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.date-switcher button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 10px rgba(50, 44, 38, 0.09);
}

.trail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.75fr);
  gap: 20px;
}

.trail-avatars {
  display: flex;
}

.trail-avatars .avatar + .avatar {
  margin-left: -7px;
}

.trail-summary {
  display: grid;
  gap: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.22), transparent 9rem),
    linear-gradient(140deg, #e67e72, #d7625d);
  box-shadow: 0 18px 40px rgba(165, 76, 68, 0.19);
}

.metric-card .soft-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.metric-card .section-kicker {
  display: block;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.7);
}

.metric-card > strong {
  display: block;
  margin-top: 5px;
  font-size: 38px;
  font-weight: 620;
  letter-spacing: -0.05em;
}

.metric-card > strong small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 19px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.77);
  font-size: 9px;
}

.metric-foot svg {
  width: 14px;
  height: 14px;
}

.moments-card {
  min-height: 410px;
}

.tiny-date {
  color: var(--ink-faint);
  font-size: 9px;
}

.route-timeline {
  position: relative;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.route-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 18px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, #d8cec3 0 4px, transparent 4px 8px);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 9px;
  min-height: 64px;
}

.timeline-dot {
  position: relative;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: #cfc5ba;
  box-shadow: 0 0 0 1px #d8cfc5;
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  background: var(--coral);
  box-shadow: 0 0 0 1px #e4a29b;
}

.timeline-item:last-child .timeline-dot {
  background: #78a695;
}

.timeline-copy strong,
.timeline-copy small {
  display: block;
}

.timeline-copy strong {
  font-size: 11px;
  line-height: 1.35;
}

.timeline-copy small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.45;
}

.timeline-copy .trail-real-address {
  max-width: 240px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.timeline-copy .trail-stay-duration {
  color: var(--coral-deep);
  font-weight: 700;
}

.timeline-time {
  padding-top: 1px;
  color: var(--ink-faint);
  font-size: 8px;
}

/* Chat */
.chat-view {
  height: calc(100vh - 103px);
  min-height: 630px;
  max-width: 910px;
  margin: 0 auto;
}

.chat-page-head {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 15px;
  border-bottom: 1px solid var(--line);
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-entry-button {
  position: relative;
}

.screen-entry-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  animation: breathe 2.2s infinite;
}

.chat-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-person .avatar {
  width: 44px;
  height: 44px;
}

.chat-person h1 {
  margin: 0;
  font-size: 16px;
}

.chat-person p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.chat-surface {
  position: relative;
  height: calc(100% - 127px);
  min-height: 430px;
  overflow-y: auto;
  padding: 20px 8px 30px;
  scrollbar-width: thin;
  scrollbar-color: #d9d0c7 transparent;
}

.chat-day {
  display: flex;
  justify-content: center;
  margin: 2px 0 23px;
}

.chat-day span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--ink-faint);
  background: rgba(255, 253, 250, 0.7);
  font-size: 8px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.message-row {
  max-width: min(74%, 510px);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: message-in 220ms ease both;
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-size: 7px;
  font-weight: 700;
  overflow: hidden;
}

.message-bubble {
  position: relative;
  padding: 11px 14px 9px;
  border: 1px solid #ebe2d9;
  border-radius: 5px 17px 17px 17px;
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(65, 54, 44, 0.05);
  color: #413c37;
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.message-time {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 7px;
  line-height: 1;
  text-align: right;
}

.message-row.mine {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-row.mine .message-avatar {
  background: var(--sand);
}

.message-row.mine .message-bubble {
  border-color: transparent;
  border-radius: 17px 5px 17px 17px;
  color: #fff;
  background: linear-gradient(145deg, #f1877f, #e86f68);
  box-shadow: 0 8px 22px rgba(199, 90, 82, 0.16);
}

.message-row.mine .message-time {
  color: rgba(255, 255, 255, 0.68);
}

.message-kind-heart {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-kind-heart svg {
  width: 15px;
  height: 15px;
}

.typing-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.typing-bubble {
  display: flex;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #ebe2d9;
  border-radius: 5px 15px 15px 15px;
  background: var(--paper);
}

.typing-bubble i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b5ada5;
  animation: typing 1.1s infinite ease-in-out;
}

.typing-bubble i:nth-child(2) { animation-delay: 160ms; }
.typing-bubble i:nth-child(3) { animation-delay: 320ms; }

@keyframes typing {
  50% { transform: translateY(-3px); opacity: 0.5; }
}

.chat-composer {
  height: 55px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(68, 56, 44, 0.07);
}

.composer-tool,
.send-button {
  width: 37px;
  height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.composer-tool {
  color: var(--coral);
  background: #fff1ee;
}

.composer-tool svg,
.send-button svg {
  width: 16px;
  height: 16px;
}

.chat-composer input {
  min-width: 0;
  flex: 1;
  height: 35px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.chat-composer input::placeholder {
  color: #aea69d;
}

.send-button {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 5px 13px rgba(216, 94, 87, 0.22);
}

/* Us */
.relationship-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid #f0ddd4;
  border-radius: 999px;
  color: var(--coral-deep);
  background: #fff7f4;
  font-size: 9px;
  font-weight: 650;
}

.relationship-pill svg {
  width: 13px;
  height: 13px;
}

.us-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.86fr);
  gap: 20px;
}

.relationship-card {
  position: relative;
  min-height: 600px;
  padding: 46px 34px;
  overflow: hidden;
  border: 1px solid #eeded5;
  border-radius: var(--radius-xl);
  text-align: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.85), transparent 16rem),
    linear-gradient(155deg, #fbebe4, #f5e3d8 55%, #ede4d9);
  box-shadow: var(--shadow);
}

.relationship-glow {
  position: absolute;
  top: -110px;
  left: 50%;
  width: 410px;
  height: 410px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  box-shadow:
    0 0 0 44px rgba(255, 255, 255, 0.13),
    0 0 0 90px rgba(255, 255, 255, 0.08);
}

.relationship-avatars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 26px;
}

.heart-bridge {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--coral);
  background: var(--paper);
  box-shadow: 0 5px 15px rgba(110, 70, 60, 0.1);
}

.heart-bridge svg {
  width: 15px;
  height: 15px;
}

.relationship-card h2 {
  position: relative;
  z-index: 1;
  margin: 25px 0 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.relationship-card h2 .amp {
  margin: 0 10px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 21px;
  font-style: italic;
  font-weight: 400;
}

.relationship-card > p {
  position: relative;
  z-index: 1;
  max-width: 330px;
  margin: 13px auto 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.8;
}

.relationship-stats {
  position: absolute;
  right: 27px;
  bottom: 29px;
  left: 27px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  padding: 18px 10px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.47);
  backdrop-filter: blur(9px);
}

.relationship-stats div strong,
.relationship-stats div span {
  display: block;
}

.relationship-stats div strong {
  font-size: 18px;
  font-weight: 670;
}

.relationship-stats div span {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.relationship-stats > i {
  width: 1px;
  height: 24px;
  background: rgba(144, 123, 109, 0.17);
}

.settings-stack {
  display: grid;
  gap: 15px;
}

.pairing-card,
.privacy-card {
  padding: 21px;
}

.connected-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--mint-deep);
  background: var(--mint-pale);
  font-size: 8px;
  font-weight: 700;
}

.connected-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6aa18f;
}

.pair-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 16px;
  padding: 13px 15px;
  border: 1px dashed #dfd2c5;
  border-radius: 15px;
  background: var(--paper-soft);
}

.pair-code-row span,
.pair-code-row strong {
  display: block;
}

.pair-code-row span {
  color: var(--ink-faint);
  font-size: 8px;
}

.pair-code-row strong {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: 0.22em;
  font-weight: 680;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: #fff;
  box-shadow: 0 2px 8px rgba(65, 53, 43, 0.07);
  font-size: 8px;
  cursor: pointer;
}

.copy-button svg {
  width: 12px;
  height: 12px;
}

.primary-button,
.secondary-button,
.quiet-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  padding: 0 17px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  border: 1px solid var(--coral);
  color: #fff;
  background: linear-gradient(145deg, #f1857d, #e96e67);
  box-shadow: 0 9px 21px rgba(213, 94, 86, 0.17);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(114, 77, 60, 0.13);
}

.primary-button svg,
.secondary-button svg {
  width: 14px;
  height: 14px;
}

.secondary-button {
  border: 1px solid #ddd1c5;
  color: var(--ink);
  background: var(--paper);
}

.quiet-button {
  border: 0;
  color: var(--ink-faint);
  background: transparent;
}

.primary-button.full,
.secondary-button.full {
  width: 100%;
}

.privacy-shield {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--mint-deep);
  background: var(--mint-pale);
}

.privacy-shield svg {
  width: 15px;
  height: 15px;
}

.setting-row {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0e9e1;
}

.setting-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-setting-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar-setting-actions .text-button,
.avatar-setting-actions .quiet-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 9px;
}

.setting-copy .soft-icon {
  width: 33px;
  height: 33px;
  border-radius: 11px;
}

.setting-copy strong,
.setting-copy small {
  display: block;
}

.setting-copy strong {
  font-size: 10px;
}

.setting-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.switch {
  position: relative;
  width: 39px;
  height: 22px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: #ddd6ce;
  cursor: pointer;
  transition: background 180ms ease;
}

.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(57, 49, 42, 0.2);
  transition: transform 180ms ease;
}

.switch.is-on {
  background: var(--mint-deep);
}

.switch.is-on i {
  transform: translateX(17px);
}

.static-check {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--mint-deep);
  background: var(--mint-pale);
}

.static-check svg {
  width: 13px;
  height: 13px;
}

.us-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plus-card {
  background:
    radial-gradient(circle at 92% 10%, rgba(242, 207, 133, 0.2), transparent 8rem),
    linear-gradient(145deg, #fffdfa, #fdf7ef);
}

.plus-mark {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  color: #a67520;
  background: #faedc8;
  font-size: 6px;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}

.plus-status {
  padding: 5px 8px;
  border-radius: 999px;
  color: #8e8171;
  background: #f4ede4;
  font-size: 8px;
  font-weight: 650;
}

.plus-status.is-active {
  color: #8b681d;
  background: #faedc8;
}

.plus-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 16px;
}

.plus-benefits span {
  padding: 8px 10px;
  border: 1px solid #eee3d7;
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  font-size: 8px;
}

.plus-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

.plus-foot small {
  color: var(--ink-faint);
  font-size: 8px;
}

.plus-foot button {
  flex: none;
  border: 0;
  padding: 6px 9px;
  border-radius: 8px;
  color: #85631e;
  background: #faedc8;
  font-size: 8px;
  font-weight: 650;
  cursor: pointer;
}

.membership-dialog-card .invite-heart {
  margin-left: 0;
}

.membership-state-panel {
  display: grid;
  gap: 5px;
  padding: 14px;
  margin: 18px 0;
  border: 1px solid #eee2d2;
  border-radius: 14px;
  background: #fffaf1;
}

.membership-state-panel span {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #9d7a2f;
  background: #faedc8;
  font-size: 7px;
  font-weight: 700;
}

.membership-state-panel strong {
  font-size: 12px;
}

.membership-state-panel small {
  color: var(--ink-faint);
  font-size: 8px;
}

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

.membership-feature-list > div {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: 11px;
  background: var(--paper-soft);
}

.membership-feature-list > div > span {
  min-width: 34px;
  padding: 5px 4px;
  border-radius: 8px;
  color: #a87924;
  background: #faedc8;
  font-size: 8px;
  font-weight: 750;
  text-align: center;
}

.membership-feature-list strong,
.membership-feature-list small {
  display: block;
}

.membership-feature-list strong {
  font-size: 9px;
}

.membership-feature-list small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 7px;
}

.membership-contact {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.places-dialog-card {
  max-height: min(760px, calc(100svh - 30px));
}

.saved-places {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 17px;
}

.saved-place {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
}

.saved-place > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: var(--mint-deep);
  background: var(--mint-pale);
}

.saved-place div {
  min-width: 0;
  flex: 1;
}

.saved-place strong,
.saved-place small {
  display: block;
}

.saved-place strong { font-size: 9px; }
.saved-place small { margin-top: 3px; color: var(--ink-faint); font-size: 7px; }
.saved-place button {
  border: 0;
  padding: 5px;
  color: #b55751;
  background: transparent;
  font-size: 8px;
}

.place-form {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.place-form-row {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: end;
  gap: 9px;
}

.place-form .field select {
  width: 100%;
  height: 46px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 16px;
}

.place-form-row .secondary-button {
  height: 46px;
  margin-bottom: 14px;
}

.place-checks {
  display: flex;
  gap: 17px;
  margin: 2px 0 8px;
  color: var(--ink-soft);
  font-size: 9px;
}

.place-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.place-checks input {
  accent-color: var(--coral);
}

/* Authentication */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 250;
  min-height: 100svh;
  overflow-y: auto;
  padding: 28px clamp(24px, 5vw, 74px);
  background:
    radial-gradient(circle at 12% 84%, rgba(191, 219, 209, 0.32), transparent 24rem),
    radial-gradient(circle at 89% 12%, rgba(248, 205, 194, 0.3), transparent 26rem),
    #fbf7f2;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.auth-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-brand-row {
  width: 100%;
  max-width: 1270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.auth-layout {
  width: 100%;
  max-width: 1160px;
  min-height: calc(100svh - 105px);
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(410px, 0.83fr);
  align-items: center;
  gap: clamp(50px, 8vw, 125px);
  margin: 0 auto;
}

.auth-story {
  position: relative;
  padding: 12px 0;
}

.auth-story h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(43px, 5vw, 67px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.16;
}

.auth-story h1 span {
  color: var(--coral);
  font-style: italic;
}

.auth-story > p:not(.welcome-kicker) {
  position: relative;
  z-index: 2;
  max-width: 430px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.9;
}

.auth-trust-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 15px;
  margin-top: 30px;
}

.auth-trust-list > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-trust-list .soft-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
}

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

.auth-trust-list strong {
  font-size: 10px;
}

.auth-trust-list small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.auth-orbit {
  position: absolute;
  z-index: 0;
  top: -95px;
  right: -70px;
  width: 410px;
  height: 410px;
  opacity: 0.58;
  pointer-events: none;
}

.auth-orbit-ring {
  position: absolute;
  border: 1px solid #e8d8ce;
  border-radius: 50%;
}

.auth-orbit-ring.ring-a {
  inset: 20px 0;
  transform: rotate(23deg);
}

.auth-orbit-ring.ring-b {
  inset: 63px 35px;
  border-color: #cbded5;
  transform: rotate(-31deg);
}

.auth-orbit-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: var(--coral);
  background: rgba(255, 253, 250, 0.76);
  box-shadow: 0 9px 30px rgba(143, 92, 74, 0.09);
  font-family: Georgia, serif;
  font-size: 26px;
}

.auth-orbit-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 8px rgba(239, 117, 109, 0.08);
}

.auth-orbit-dot.dot-a {
  top: 16%;
  left: 18%;
}

.auth-orbit-dot.dot-b {
  right: 14%;
  bottom: 19%;
  background: var(--mint-deep);
  box-shadow: 0 0 0 8px rgba(96, 143, 128, 0.08);
}

.auth-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 500px;
  justify-self: end;
  padding: 31px;
  border: 1px solid rgba(234, 222, 213, 0.88);
  border-radius: 30px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 30px 80px rgba(83, 62, 48, 0.13);
  backdrop-filter: blur(16px);
}

.auth-card-heading h2 {
  margin: 6px 0 0;
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.045em;
}

.auth-card-heading p {
  margin: 8px 0 21px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--canvas-deep);
}

.auth-tabs button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.auth-tabs button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 11px rgba(57, 47, 39, 0.09);
}

.auth-form {
  display: none;
}

.auth-form.is-active {
  display: block;
  animation: view-in 220ms ease both;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.auth-field {
  display: block;
  margin-bottom: 13px;
}

.auth-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.auth-field > span small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 500;
}

.auth-input-wrap {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.auth-input-wrap:focus-within {
  border-color: #e7b1a9;
  box-shadow: 0 0 0 3px rgba(239, 117, 109, 0.09);
}

.auth-input-wrap > span {
  flex: none;
  color: #aaa198;
}

.auth-input-wrap > span svg {
  width: 15px;
  height: 15px;
}

.auth-input-wrap input,
.auth-input-wrap select {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.auth-input-wrap input::placeholder {
  color: #b7afa7;
}

.auth-input-wrap select {
  appearance: none;
  cursor: pointer;
}

.auth-select-wrap::after {
  content: "⌄";
  color: var(--ink-faint);
  font-size: 12px;
}

.password-toggle {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 8px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
}

.password-toggle svg {
  width: 14px;
  height: 14px;
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 4px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
}

.remember-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--coral);
}

.auth-text-link,
.auth-switch-copy button {
  border: 0;
  padding: 0;
  color: var(--coral-deep);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.auth-error {
  min-height: 17px;
  margin: 6px 0 6px;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-switch-copy {
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
}

.recover-illustration {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  color: var(--coral-deep);
  background: #fff0ec;
}

.recover-illustration svg {
  width: 22px;
  height: 22px;
}

.auth-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f0e7df;
  color: var(--ink-faint);
  font-size: 7px;
}

.auth-card-foot > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-card-foot svg {
  width: 11px;
  height: 11px;
}

.server-link {
  border: 0;
  padding: 0;
  color: var(--mint-deep);
  background: transparent;
  font-size: 8px;
  text-decoration: underline;
  cursor: pointer;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -3px 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--paper-soft);
}

.account-row span,
.account-row strong {
  display: block;
}

.account-row span {
  color: var(--ink-faint);
  font-size: 7px;
}

.account-row strong {
  margin-top: 3px;
  font-size: 9px;
}

.text-danger-button {
  border: 0;
  padding: 5px;
  color: #b4615b;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

/* Welcome */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  min-height: 100svh;
  padding: 28px clamp(26px, 5vw, 78px) 24px;
  background:
    radial-gradient(circle at 82% 42%, rgba(249, 207, 196, 0.36), transparent 28rem),
    radial-gradient(circle at 5% 95%, rgba(187, 218, 208, 0.28), transparent 25rem),
    #fbf7f1;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.welcome-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
}

.welcome-brand {
  font-size: 24px;
}

.welcome-private {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 9px;
}

.welcome-private svg {
  width: 13px;
  height: 13px;
}

.welcome-grid {
  width: 100%;
  max-width: 1200px;
  min-height: calc(100vh - 140px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 0.96fr) minmax(420px, 1.04fr);
  align-items: center;
  gap: clamp(30px, 5vw, 90px);
}

.welcome-kicker {
  margin: 0 0 17px;
  color: var(--coral-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.welcome-copy h1 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: clamp(43px, 5.3vw, 72px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.16;
}

.welcome-copy h1 span {
  color: var(--coral);
  font-style: italic;
}

.welcome-description {
  max-width: 500px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.95;
}

.welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 23px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.welcome-features span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.feature-dot.coral { background: var(--coral); }
.feature-dot.mint { background: #80b6a3; }
.feature-dot.yellow { background: var(--yellow); }
.feature-dot.sand { background: var(--sand); }

.welcome-actions {
  display: flex;
  gap: 10px;
  margin-top: 31px;
}

.welcome-actions .primary-button,
.welcome-actions .secondary-button {
  min-height: 49px;
  padding: 0 20px;
  font-size: 11px;
}

.privacy-promise {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 17px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.privacy-promise svg {
  width: 13px;
  height: 13px;
}

.welcome-visual {
  position: relative;
  height: min(670px, 74vh);
  min-height: 540px;
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgba(205, 177, 163, 0.3);
  border-radius: 50%;
}

.visual-orbit-a {
  inset: 4% -4% 4% 0;
  transform: rotate(-18deg);
}

.visual-orbit-b {
  inset: 12% 9% 8% -8%;
  transform: rotate(27deg);
}

.phone-mock {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 275px;
  height: 550px;
  padding: 9px;
  border: 2px solid #d8cfc5;
  border-radius: 42px;
  background: #f7f2ec;
  box-shadow:
    0 50px 100px rgba(114, 80, 65, 0.2),
    0 12px 28px rgba(86, 67, 53, 0.12);
  transform: translate(-50%, -50%) rotate(3.5deg);
}

.phone-speaker {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 50%;
  width: 70px;
  height: 17px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #eee8e2;
}

.phone-screen {
  height: 100%;
  overflow: hidden;
  padding: 17px 14px;
  border-radius: 34px;
  background: #f7f3ed;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 1px 9px 0;
  font-size: 8px;
  font-weight: 700;
}

.phone-greeting {
  margin: 26px 4px 15px;
  font-size: 17px;
  font-weight: 700;
}

.phone-greeting span {
  color: var(--coral);
}

.phone-mini-map {
  position: relative;
  height: 228px;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(32deg, transparent 44%, #faf9f4 45% 49%, transparent 50%),
    linear-gradient(-27deg, transparent 37%, #faf9f4 38% 41%, transparent 42%),
    #dfe2da;
}

.fake-river {
  position: absolute;
  top: -30px;
  right: -44px;
  width: 120px;
  height: 300px;
  transform: rotate(13deg);
  border-radius: 50%;
  background: #c4dbdd;
}

.fake-road {
  position: absolute;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
}

.road-a {
  width: 260px;
  top: 76px;
  left: -20px;
  transform: rotate(-12deg);
}

.road-b {
  width: 220px;
  top: 154px;
  left: 5px;
  transform: rotate(18deg);
}

.phone-route {
  position: absolute;
  top: 95px;
  left: 58px;
  width: 103px;
  height: 78px;
  transform: rotate(16deg);
  border-top: 3px dashed var(--coral);
  border-right: 3px dashed var(--coral);
  border-radius: 50%;
}

.phone-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 7px;
  font-weight: 700;
}

.pin-me {
  left: 48px;
  top: 90px;
  width: 21px;
  height: 21px;
  border: 2px solid #fff;
  background: #6d9a8c;
}

.pin-love {
  right: 57px;
  bottom: 50px;
  width: 35px;
  height: 35px;
  border: 3px solid #fff;
  background: var(--coral);
  box-shadow: 0 0 0 14px rgba(239, 117, 109, 0.13);
}

.phone-couple {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 10px;
  border: 1px solid #ebe2d9;
  border-radius: 15px;
  background: #fffdfa;
}

.phone-avatar {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-size: 7px;
  font-weight: 700;
}

.phone-avatar.mini {
  width: 22px;
  height: 22px;
}

.phone-couple div:nth-child(2) {
  flex: 1;
}

.phone-couple strong,
.phone-couple small {
  display: block;
}

.phone-couple strong { font-size: 7px; }
.phone-couple small { margin-top: 3px; color: var(--ink-faint); font-size: 5px; }
.phone-couple b { color: var(--mint-deep); font-size: 7px; }

.phone-chat-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 13px;
  background: #f0e8df;
}

.phone-chat-line span {
  flex: 1;
  font-size: 6px;
}

.phone-chat-line small {
  color: var(--ink-faint);
  font-size: 5px;
}

.float-note {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 17px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: 0 16px 34px rgba(93, 67, 52, 0.12);
  backdrop-filter: blur(12px);
  animation: float 5s ease-in-out infinite;
}

.float-note strong,
.float-note small {
  display: block;
}

.float-note strong { font-size: 9px; }
.float-note small { margin-top: 3px; color: var(--ink-faint); font-size: 7px; }

.note-location {
  top: 17%;
  left: -1%;
  animation-delay: -1.2s;
}

.note-message {
  right: -2%;
  top: 31%;
  animation-delay: -2.8s;
}

.note-battery {
  bottom: 13%;
  left: 3%;
  animation-delay: -4s;
}

@keyframes float {
  50% { transform: translateY(-7px); }
}

.mini-heart {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--coral);
  background: var(--coral-soft);
  font-family: Georgia, serif;
  font-size: 20px;
}

.battery-mini {
  position: relative;
  width: 34px;
  height: 17px;
  padding: 2px;
  border: 1.5px solid var(--mint-deep);
  border-radius: 4px;
}

.battery-mini::after {
  content: "";
  position: absolute;
  top: 4px;
  right: -4px;
  width: 2px;
  height: 7px;
  border-radius: 0 2px 2px 0;
  background: var(--mint-deep);
}

.battery-mini i {
  display: block;
  width: 74%;
  height: 100%;
  border-radius: 1px;
  background: var(--mint-deep);
}

.welcome-footnote {
  max-width: 1200px;
  margin: 10px auto 0;
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

/* Modals */
.modal {
  width: min(460px, calc(100vw - 30px));
  max-height: calc(100svh - 30px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
}

.modal::backdrop {
  background: rgba(36, 31, 27, 0.42);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  max-height: calc(100svh - 30px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: #fffdfa;
  box-shadow: 0 30px 90px rgba(34, 27, 22, 0.25);
}

.modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink-soft);
  cursor: pointer;
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 17px;
  background: #fff0ec;
}

.modal-mark .brand-mark {
  transform: scale(0.9);
}

.modal-card h2 {
  margin: 6px 0 0;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.modal-sub {
  margin: 9px 0 21px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--canvas-deep);
}

.mode-tabs button {
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.mode-tabs button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 9px rgba(56, 47, 40, 0.08);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 12px;
}

.field input::placeholder {
  color: #b4aca4;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  cursor: pointer;
}

.consent-row input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--coral);
}

.form-error {
  min-height: 16px;
  margin: 3px 0 7px;
  color: var(--danger);
  font-size: 9px;
}

.invite-card {
  text-align: center;
}

.invite-heart {
  margin: 0 auto 17px;
  border-radius: 50%;
}

.invite-card .modal-sub {
  max-width: 300px;
  margin-right: auto;
  margin-left: auto;
}

.big-code {
  width: 100%;
  margin: 7px 0 12px;
  padding: 17px 10px;
  border: 1px dashed #decabf;
  border-radius: 16px;
  color: var(--coral-deep);
  background: #fff6f3;
  font-size: 30px;
  font-weight: 720;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.invite-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 17px;
  color: var(--ink-faint);
  font-size: 8px;
}

.invite-tip svg {
  width: 12px;
  height: 12px;
}

/* Screen sharing */
.screen-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
}

.screen-share-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: #fffdfa;
  box-shadow: 0 32px 100px rgba(26, 22, 19, 0.3);
}

.screen-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 44px 17px 2px;
}

.screen-share-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-share-title h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 680;
}

.screen-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  color: var(--coral-deep);
  background: #fff0ec;
}

.screen-mark svg {
  width: 20px;
  height: 20px;
}

.screen-close {
  top: 20px;
  right: 20px;
}

.screen-stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    radial-gradient(circle at 78% 14%, rgba(239, 117, 109, 0.12), transparent 16rem),
    linear-gradient(145deg, #242321, #171716);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.screen-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.screen-placeholder {
  position: relative;
  z-index: 1;
  max-width: 360px;
  padding: 30px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.screen-placeholder-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  color: #f7a79f;
  background: rgba(255, 255, 255, 0.06);
}

.screen-placeholder-icon svg {
  width: 25px;
  height: 25px;
}

.screen-placeholder strong {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}

.screen-placeholder p {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.75;
}

#screen-live-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.screen-live-indicator {
  position: absolute;
  z-index: 3;
  top: 15px;
  left: 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(24, 23, 22, 0.77);
  backdrop-filter: blur(8px);
  font-size: 8px;
  font-weight: 650;
}

.screen-live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f57d75;
  box-shadow: 0 0 0 4px rgba(245, 125, 117, 0.15);
  animation: breathe 2s infinite;
}

.screen-live-indicator time {
  margin-left: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.screen-share-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-soft);
}

.screen-share-status > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen-status-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #c4bbb2;
}

.screen-status-dot.is-live {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 117, 109, 0.1);
}

.screen-share-status strong,
.screen-share-status p {
  display: block;
}

.screen-share-status strong {
  font-size: 10px;
}

.screen-share-status p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.45;
}

.screen-peer {
  flex: none;
  color: var(--mint-deep);
  font-size: 8px;
}

.screen-share-actions {
  display: flex;
  gap: 9px;
  margin-top: 13px;
}

.danger-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #e4a49f;
  border-radius: 13px;
  color: #b84f49;
  background: #fff3f1;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.danger-button svg {
  width: 14px;
  height: 14px;
}

.screen-privacy {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
}

.screen-privacy svg {
  width: 12px;
  height: 12px;
}

.screen-modal.is-viewing .screen-stage {
  min-height: min(62vh, 620px);
}

/* Toasts */
.toast-region {
  position: fixed;
  z-index: 300;
  right: 24px;
  bottom: 24px;
  width: min(330px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: rgba(43, 39, 35, 0.93);
  box-shadow: 0 15px 35px rgba(29, 24, 21, 0.25);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: 10px;
  animation: toast-in 250ms ease both;
}

.toast .toast-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: #fff;
  background: var(--coral);
}

.toast .toast-icon svg {
  width: 13px;
  height: 13px;
}

.toast strong,
.toast small {
  display: block;
}

.toast strong { font-size: 10px; }
.toast small { margin-top: 2px; color: rgba(255, 255, 255, 0.65); font-size: 8px; }

.toast.is-leaving {
  animation: toast-out 250ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

html.app-lock-pending body {
  visibility: hidden;
}

.app-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  overflow: auto;
  background:
    radial-gradient(circle at 85% 12%, rgba(239, 117, 109, 0.2), transparent 32%),
    radial-gradient(circle at 8% 88%, rgba(103, 143, 135, 0.18), transparent 34%),
    linear-gradient(145deg, #fbf7f1, #f1e9df);
}

.app-lock-screen[hidden] {
  display: none;
}

.app-lock-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 24px 70px rgba(83, 66, 53, 0.17);
  backdrop-filter: blur(22px);
  text-align: center;
}

.app-lock-brand {
  justify-content: center;
  margin-bottom: 24px;
}

.app-lock-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 21px;
  color: #a15c4f;
  background: linear-gradient(145deg, #fff0ea, #f5d8cf);
  box-shadow: 0 12px 28px rgba(150, 85, 70, 0.16);
}

.app-lock-icon svg {
  width: 29px;
  height: 29px;
}

.app-lock-card h1 {
  margin: 5px 0 8px;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 32px;
  font-weight: 650;
}

.app-lock-copy {
  max-width: 320px;
  margin: 0 auto 22px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.app-lock-form {
  text-align: left;
}

.app-lock-form .field input {
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.24em;
}

.app-lock-forgot {
  margin-top: 14px;
}

.app-lock-setting-button {
  flex: none;
}

.app-lock-dialog-card .field input {
  text-align: center;
  letter-spacing: 0.18em;
}

.app-lock-disable {
  width: 100%;
  margin-top: 13px;
}

.app-lock-local-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.app-lock-local-note svg {
  width: 13px;
  height: 13px;
}

.app-lock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.app-lock-actions .full {
  width: 100%;
}

/* Responsive */
@media (max-width: 1120px) {
  :root { --sidebar: 205px; }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .home-grid,
  .trail-grid { grid-template-columns: minmax(0, 1.35fr) minmax(285px, 0.75fr); }
  .map-frame { height: 450px; }
  .map-frame.tall { height: 560px; }
  .together-card { gap: 12px; }
  .welcome-grid { grid-template-columns: minmax(350px, 0.95fr) minmax(390px, 1fr); gap: 20px; }
  .phone-mock { width: 250px; height: 510px; }
}

@media (max-width: 900px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .app-shell {
    display: block;
    min-height: 100svh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sidebar { display: none; }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 61px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 8px;
    background: rgba(247, 243, 237, 0.87);
    backdrop-filter: blur(16px);
  }

  .brand.compact {
    font-size: 17px;
  }

  .brand.compact .brand-mark {
    width: 25px;
    height: 20px;
  }

  .brand.compact .brand-mark i {
    width: 18px;
    height: 18px;
    border-width: 2px;
  }

  .mode-pill {
    width: auto;
    height: 31px;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 9px;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--coral);
  }

  .main-content {
    padding: 20px 20px 30px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    min-height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 13px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(222, 212, 202, 0.8);
    background: rgba(255, 253, 250, 0.94);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 12px;
    color: var(--ink-faint);
    background: transparent;
    font-size: 8px;
    font-weight: 600;
  }

  .mobile-nav-item svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav-item.is-active {
    color: var(--coral);
  }

  .mobile-nav-item b {
    position: absolute;
    top: 2px;
    left: calc(50% + 8px);
    min-width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--paper);
    border-radius: 999px;
    color: #fff;
    background: var(--coral);
    font-size: 7px;
  }

  .home-grid,
  .trail-grid,
  .us-grid {
    grid-template-columns: 1fr;
  }

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

  .self-status {
    grid-column: 1 / -1;
  }

  .bottom-row {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .map-frame { height: 480px; }
  .map-frame.tall { height: 570px; }
  .trail-summary { grid-template-columns: 0.7fr 1.3fr; }
  .relationship-card { min-height: 540px; }

  .chat-view {
    height: calc(100svh - 61px - 64px - 40px);
    min-height: 530px;
  }

  .welcome-screen {
    padding: 24px 25px;
  }

  .welcome-grid {
    grid-template-columns: 1fr;
    padding: 50px 0 20px;
  }

  .auth-screen {
    padding: 22px 24px 40px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 55px 0 20px;
  }

  .auth-story {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
  }

  .auth-story > p:not(.welcome-kicker) {
    margin-right: auto;
    margin-left: auto;
  }

  .auth-trust-list {
    width: max-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
  }

  .auth-orbit {
    top: -50px;
    right: 8%;
  }

  .auth-card {
    justify-self: center;
  }

  .welcome-copy {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  .welcome-copy h1 {
    font-size: clamp(40px, 8vw, 63px);
  }

  .welcome-description {
    margin-right: auto;
    margin-left: auto;
  }

  .welcome-features,
  .welcome-actions,
  .privacy-promise {
    justify-content: center;
  }

  .welcome-visual {
    width: min(560px, 100%);
    height: 570px;
    min-height: 570px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 15px 14px 27px;
  }

  .page-intro {
    min-height: 70px;
    margin-bottom: 18px;
  }

  .page-intro h1 {
    font-size: 25px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .intro-sub {
    max-width: 260px;
    font-size: 10px;
  }

  .icon-button {
    width: 35px;
    height: 35px;
  }

  .avatar-button {
    width: 37px;
    height: 37px;
  }

  .home-grid {
    gap: 13px;
  }

  .map-card {
    padding: 10px;
    border-radius: 23px;
  }

  .map-heading {
    min-height: 55px;
    padding: 3px 4px 9px;
  }

  .map-heading h2 {
    font-size: 14px;
  }

  .map-frame {
    height: clamp(490px, 66svh, 650px);
    min-height: 490px;
    max-height: 650px;
    border-radius: 17px;
  }

  .map-frame.tall {
    height: clamp(450px, 58svh, 580px);
    min-height: 450px;
    max-height: 580px;
  }

  .trail-map-card .map-frame.tall {
    height: min(49svh, 430px);
    min-height: 360px;
    max-height: 430px;
  }

  .map-location-card {
    padding: 9px 4px 2px;
  }

  .map-distance {
    right: 10px;
    bottom: 10px;
    padding: 7px 9px;
  }

  .distance-icon {
    width: 26px;
    height: 26px;
  }

  .map-legend {
    top: 10px;
    left: 10px;
  }

  .home-side {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 17px;
    border-radius: 21px;
  }

  .quick-actions {
    gap: 9px;
  }

  .quick-action {
    padding: 9px 8px;
  }

  .bottom-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 13px;
  }

  .together-card .text-button {
    display: none;
  }

  .date-switcher {
    width: 100%;
    margin-top: 14px;
  }

  .trail-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .date-switcher button {
    flex: 1;
  }

  .trail-summary {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 20px;
  }

  .metric-card > strong {
    font-size: 34px;
  }

  .moments-card {
    min-height: auto;
  }

  .relationship-pill {
    display: none;
  }

  .relationship-card {
    min-height: 420px;
    padding: 34px 20px;
    border-radius: 24px;
  }

  .relationship-avatars { margin-top: 15px; }
  .relationship-card h2 { font-size: 21px; }
  .relationship-stats { right: 16px; bottom: 19px; left: 16px; }

  .us-actions {
    flex-direction: column;
    gap: 5px;
  }

  .us-actions .secondary-button {
    width: 100%;
  }

  .chat-view {
    height: calc(100svh - 66px - 64px - 33px);
    min-height: 480px;
  }

  .chat-page-head {
    height: 65px;
    padding-bottom: 10px;
  }

  .chat-surface {
    height: calc(100% - 112px);
    min-height: 365px;
    padding-right: 0;
    padding-left: 0;
  }

  .chat-composer {
    height: 49px;
    border-radius: 16px;
  }

  .screen-modal {
    width: calc(100vw - 12px);
    max-height: calc(100svh - 12px);
  }

  .screen-share-card {
    padding: 17px 12px 16px;
    border-radius: 23px;
  }

  .screen-share-head {
    padding-bottom: 12px;
  }

  .screen-share-title h2 {
    font-size: 18px;
  }

  .screen-stage,
  .screen-modal.is-viewing .screen-stage {
    min-height: min(61svh, 560px);
    border-radius: 16px;
  }

  .screen-share-status {
    align-items: flex-start;
  }

  .screen-peer {
    display: none;
  }

  .screen-share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .screen-share-actions button {
    width: 100%;
  }

  .screen-privacy {
    line-height: 1.55;
  }

  .composer-tool,
  .send-button {
    width: 34px;
    height: 34px;
  }

  .message-row {
    max-width: 84%;
  }

  .message-bubble {
    font-size: 11px;
  }

  .toast-region {
    right: 14px;
    bottom: calc(79px + env(safe-area-inset-bottom));
  }

  .welcome-screen {
    padding: 18px 17px 24px;
  }

  .auth-screen {
    padding: 18px 14px 30px;
  }

  .auth-brand-row {
    padding: 0 3px;
  }

  .auth-layout {
    gap: 25px;
    padding: 37px 0 10px;
  }

  .auth-story h1 {
    font-size: clamp(34px, 10.5vw, 47px);
  }

  .auth-story > p:not(.welcome-kicker) {
    margin-top: 13px;
    font-size: 10px;
    line-height: 1.75;
  }

  .auth-trust-list,
  .auth-orbit {
    display: none;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 23px;
  }

  .auth-card-heading h2 {
    font-size: 23px;
  }

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

  .auth-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-input-wrap {
    height: 45px;
  }

  .welcome-private {
    font-size: 7px;
  }

  .welcome-grid {
    display: block;
    padding-top: 48px;
  }

  .welcome-copy h1 {
    margin-top: 5px;
    font-size: clamp(37px, 11vw, 52px);
    line-height: 1.18;
  }

  .welcome-description {
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.8;
  }

  .welcome-features {
    gap: 10px 16px;
    margin-top: 19px;
    font-size: 9px;
  }

  .welcome-actions {
    display: grid;
    gap: 9px;
    margin-top: 25px;
  }

  .welcome-visual {
    height: 410px;
    min-height: 410px;
    margin-top: 20px;
  }

  .phone-mock {
    width: 200px;
    height: 407px;
    border-radius: 32px;
    padding: 7px;
  }

  .phone-screen {
    padding: 12px 10px;
    border-radius: 26px;
  }

  .phone-speaker {
    top: 13px;
    width: 53px;
    height: 13px;
  }

  .phone-greeting {
    margin: 20px 3px 9px;
    font-size: 12px;
  }

  .phone-mini-map {
    height: 168px;
    border-radius: 16px;
  }

  .phone-couple {
    margin-top: 7px;
    padding: 7px;
  }

  .phone-chat-line {
    margin-top: 5px;
    padding: 6px 7px;
  }

  .note-location {
    top: 4%;
    left: -1%;
  }

  .note-message {
    right: -1%;
    top: 33%;
  }

  .note-battery {
    bottom: 2%;
    left: 1%;
  }

  .float-note {
    padding: 8px 10px;
    border-radius: 13px;
  }

  .float-note strong { font-size: 7px; }
  .float-note small { font-size: 5px; }
  .float-note .soft-icon { width: 28px; height: 28px; border-radius: 9px; }
  .welcome-footnote { display: none; }

  .modal-card {
    padding: 27px 20px;
    border-radius: 23px;
  }

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

@media (max-width: 380px) {
  .map-actions .chip:first-child {
    display: none;
  }

  .quick-action .soft-icon {
    display: none;
  }

  .partner-focus {
    gap: 8px;
  }

  .battery-ring {
    width: 46px;
    height: 46px;
  }

  .welcome-copy h1 {
    font-size: 35px;
  }
}

@media (max-width: 900px) {
  .app-shell.is-map-home {
    height: 100svh;
    min-height: 100svh;
    padding-bottom: 0;
    overflow: hidden;
    background: #ecebe4;
  }

  .app-shell.is-map-home .mobile-bar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 80;
    min-height: calc(50px + env(safe-area-inset-top));
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    justify-content: flex-start;
    background: linear-gradient(to bottom, rgba(247, 247, 244, 0.82), transparent);
    backdrop-filter: none;
    pointer-events: none;
  }

  .app-shell.is-map-home .mobile-bar .brand.compact {
    display: none;
  }

  .app-shell.is-map-home .mode-pill {
    height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 18px rgba(56, 53, 47, 0.14);
    backdrop-filter: blur(14px);
    pointer-events: auto;
  }

  .app-shell.is-map-home .main-content {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100svh;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .app-shell.is-map-home #view-home {
    position: relative;
    height: 100svh;
    overflow: hidden;
    animation: none;
    transform: none;
  }

  .app-shell.is-map-home #view-home > .page-intro,
  .app-shell.is-map-home #view-home > .demo-mode-banner,
  .app-shell.is-map-home .home-side,
  .app-shell.is-map-home .bottom-row,
  .app-shell.is-map-home .map-location-card,
  .app-shell.is-map-home .place-nearby,
  .app-shell.is-map-home .map-legend {
    display: none !important;
  }

  .app-shell.is-map-home .home-grid {
    display: block;
    height: 100%;
  }

  .app-shell.is-map-home .map-card {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell.is-map-home .map-heading {
    position: absolute;
    z-index: 32;
    top: calc(env(safe-area-inset-top) + 52px);
    right: 14px;
    left: 14px;
    min-height: 0;
    padding: 0;
    display: block;
    pointer-events: none;
  }

  .app-shell.is-map-home .map-heading > div:first-child,
  .app-shell.is-map-home #center-map-button {
    display: none;
  }

  .app-shell.is-map-home .map-actions {
    width: 100%;
    justify-content: flex-start;
    pointer-events: none;
  }

  .app-shell.is-map-home .map-person-switch {
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 6px 20px rgba(55, 52, 47, 0.15);
    backdrop-filter: blur(14px);
    pointer-events: auto;
  }

  .app-shell.is-map-home .map-person-switch button {
    min-width: 42px;
    height: 31px;
    padding: 0 12px;
    font-size: 10px;
  }

  .app-shell.is-map-home .map-frame {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 0;
  }

  .app-shell.is-map-home .map-zoom-controls {
    top: calc(env(safe-area-inset-top) + 306px);
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .app-shell.is-map-home .map-zoom-controls button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 7px 22px rgba(55, 52, 47, 0.16);
    font-size: 27px;
    font-weight: 450;
    backdrop-filter: blur(14px);
  }

  .app-shell.is-map-home .map-zoom-controls button + button {
    border-top: 1px solid rgba(255, 255, 255, 0.94);
  }

  .app-shell.is-map-home .map-distance {
    right: auto;
    bottom: calc(env(safe-area-inset-bottom) + 104px);
    left: 50%;
    padding: 8px 12px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
  }

  .app-shell.is-map-home .map-attribution {
    right: 12px !important;
    bottom: calc(env(safe-area-inset-bottom) + 82px) !important;
  }

  .app-shell.is-map-home .mobile-nav {
    display: none;
  }

  .app-shell.is-map-home .map-fab-stack {
    position: fixed;
    z-index: 72;
    top: calc(env(safe-area-inset-top) + 62px);
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .map-fab-button,
  .map-dock-button {
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.94);
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 7px 22px rgba(55, 52, 47, 0.16);
    backdrop-filter: blur(14px);
    cursor: pointer;
  }

  .map-fab-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }

  .map-fab-button svg {
    width: 21px;
    height: 21px;
  }

  .map-screen-button.is-live {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #ef8279, #df645e);
  }

  .map-screen-live-dot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef6d65;
    animation: breathe 1.4s ease-in-out infinite;
  }

  .map-screen-button.is-live .map-screen-live-dot {
    background: #fff;
  }

  .map-fab-button.is-spinning svg {
    animation: spin 600ms linear infinite;
  }

  .app-shell.is-map-home .map-dock {
    position: fixed;
    z-index: 74;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(30px, 11vw, 54px);
    pointer-events: none;
  }

  .app-shell.is-map-home .map-location-alert {
    position: fixed;
    z-index: 73;
    top: calc(env(safe-area-inset-top) + 103px);
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    color: #b34e49;
    background: rgba(255, 245, 241, 0.95);
    box-shadow: 0 7px 22px rgba(119, 67, 58, 0.18);
    backdrop-filter: blur(14px);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
  }

  .app-shell.is-map-home .map-location-alert svg {
    width: 17px;
    height: 17px;
  }

  .map-dock-button {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    pointer-events: auto;
  }

  .map-dock-button svg {
    width: 24px;
    height: 24px;
  }

  .map-dock-button.is-primary {
    width: 68px;
    height: 68px;
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    background: linear-gradient(145deg, #f58b83, #e96561);
    box-shadow: 0 12px 30px rgba(216, 83, 77, 0.33);
  }

  .map-dock-button.is-primary svg {
    width: 29px;
    height: 29px;
    fill: rgba(255, 255, 255, 0.18);
  }

  .map-dock-button b {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: var(--coral);
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
