:root {
  --bg: #fff8ef;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #22262f;
  --muted: #72727d;
  --line: rgba(34, 38, 47, 0.1);
  --coral: #ff6f61;
  --coral-soft: #ffe0d8;
  --mint: #69d6b5;
  --mint-soft: #dff8ef;
  --sky: #78bdf2;
  --sky-soft: #e6f3ff;
  --sun: #ffd166;
  --lilac: #a68cf4;
  --danger: #f15a6b;
  --shadow: 0 22px 60px rgba(60, 47, 32, 0.14);
  --small-shadow: 0 12px 28px rgba(36, 30, 22, 0.11);
  --radius: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(120, 189, 242, 0.24), transparent 26rem),
    radial-gradient(circle at 86% 6%, rgba(255, 209, 102, 0.24), transparent 22rem),
    linear-gradient(145deg, #fff8ef, #eef8f4 55%, #fff9f0);
}

body.legal-page {
  display: block;
  padding: 24px;
}

.legal-document {
  width: min(100%, 760px);
  margin: 0 auto;
  border: 1px solid rgba(34, 38, 47, 0.1);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.94);
  padding: clamp(18px, 5vw, 34px);
  box-shadow: var(--small-shadow);
}

.legal-document a {
  color: #155d49;
  font-weight: 900;
}

.legal-document h1 {
  margin: 18px 0 8px;
  line-height: 1.05;
}

.legal-document h2 {
  margin: 24px 0 8px;
}

.legal-document p {
  color: var(--muted);
  line-height: 1.55;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(120, 189, 242, 0.48);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.icon-sprite {
  display: none;
}

.app-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.phone-shell {
  position: relative;
  width: min(100%, 430px);
  height: min(920px, calc(100vh - 40px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(34, 38, 47, 0.12);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 248, 239, 0.95));
  box-shadow: var(--shadow);
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: calc(14px + var(--safe-top)) 16px 12px;
  background: rgba(255, 253, 249, 0.84);
  border-bottom: 1px solid rgba(34, 38, 47, 0.08);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  padding: 0;
  text-align: left;
}

.brand-lockup strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--coral), var(--sun) 52%, var(--mint));
  color: #231f20;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 111, 97, 0.28);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(34, 38, 47, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button svg,
.nav-button svg,
.round-action svg,
.primary-button svg,
.secondary-button svg,
.pill svg,
.section-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.install-sheet {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  background: rgba(34, 38, 47, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.install-sheet.open {
  opacity: 1;
  pointer-events: auto;
}

.install-card {
  border: 1px solid rgba(34, 38, 47, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.96);
  padding: 14px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  transition: transform 180ms ease;
}

.install-sheet.open .install-card {
  transform: translateY(0);
}

.install-card p {
  margin: -4px 0 14px;
  color: var(--muted);
  line-height: 1.42;
}

.screen {
  position: absolute;
  inset: 77px 0 calc(78px + var(--safe-bottom));
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px 20px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
  animation: riseIn 220ms ease both;
}

.screen[data-screen="signup"] {
  inset-bottom: 0;
  padding-bottom: calc(26px + var(--safe-bottom));
}

.screen.auth-screen {
  inset-bottom: 0;
  padding-bottom: calc(26px + var(--safe-bottom));
}

.phone-shell.auth-mode .bottom-nav {
  display: none;
}

.auth-card {
  display: grid;
  gap: 10px;
}

.auth-card .secondary-button {
  margin-top: 0;
}

.text-button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 900;
}

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

.onboarding-visual {
  position: relative;
  height: 245px;
  overflow: hidden;
  border: 1px solid rgba(34, 38, 47, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(34, 38, 47, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(34, 38, 47, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 20% 18%, rgba(255, 111, 97, 0.34), transparent 7rem),
    radial-gradient(circle at 76% 24%, rgba(105, 214, 181, 0.34), transparent 8rem),
    radial-gradient(circle at 44% 86%, rgba(120, 189, 242, 0.3), transparent 8rem),
    #fffdf9;
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
  box-shadow: var(--small-shadow);
}

.halo {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.78;
}

.halo-one {
  width: 130px;
  height: 130px;
  left: 22px;
  top: 18px;
  background: rgba(255, 209, 102, 0.34);
}

.halo-two {
  width: 150px;
  height: 150px;
  right: 12px;
  bottom: 2px;
  background: rgba(166, 140, 244, 0.22);
}

.city-card {
  position: absolute;
  z-index: 2;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 38, 47, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 26px rgba(42, 37, 30, 0.12);
  backdrop-filter: blur(14px);
}

.city-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.city-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.city-card-a {
  left: 18px;
  top: 22px;
}

.city-card-b {
  right: 20px;
  top: 60px;
}

.city-card-c {
  left: 92px;
  bottom: 22px;
}

.friend-dot,
.map-pin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #231f20;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(33, 30, 25, 0.18);
}

.friend-dot {
  background: var(--sun);
}

.dot-a {
  left: 42px;
  bottom: 72px;
}

.dot-b {
  left: 160px;
  top: 70px;
  background: var(--mint);
}

.dot-c {
  right: 70px;
  bottom: 48px;
  background: var(--sky);
}

.map-pin {
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--coral);
}

.map-pin svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.pin-a {
  left: 112px;
  top: 35px;
}

.pin-b {
  right: 34px;
  bottom: 100px;
  background: #232733;
}

.route-line {
  position: absolute;
  left: 70px;
  top: 92px;
  width: 250px;
  height: 96px;
  border: 3px dashed rgba(34, 38, 47, 0.18);
  border-right: 0;
  border-bottom: 0;
  border-radius: 70px 0 0 0;
  transform: rotate(8deg);
}

.panel,
.profile-card,
.ai-panel,
.venue-item,
.conversation,
.chat-list,
.map-card,
.verification-box {
  border: 1px solid rgba(34, 38, 47, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(51, 43, 33, 0.08);
}

.panel {
  margin-top: 12px;
  padding: 14px;
}

.section-heading,
.screen-toolbar,
.profile-preview,
.conversation-header,
.chat-row,
.venue-item,
.profile-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-heading h1,
.section-heading h2,
.section-heading h3,
.screen-toolbar h2 {
  margin: 0;
  line-height: 1.1;
}

.section-heading h1 {
  font-size: clamp(1.55rem, 7vw, 2.05rem);
}

.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: #232733;
  background: var(--mint-soft);
}

form label,
.control-grid label {
  display: grid;
  gap: 7px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 800;
}

form label.check-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 10px;
  margin: 12px 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.check-row input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--coral);
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(34, 38, 47, 0.12);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  padding: 12px;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(34, 38, 47, 0.03);
}

textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.45;
}

.form-note {
  margin: -3px 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.form-note.error {
  color: #b52135;
  font-weight: 800;
}

.form-note.success {
  color: #155d49;
  font-weight: 800;
}

.field-block {
  margin: 12px 0;
}

.field-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 900;
}

.chip-editor,
.tag-list,
.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.tag,
.reason-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(34, 38, 47, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.chip {
  min-height: 40px;
}

.chip.active {
  border-color: transparent;
  background: #232733;
  color: #fff;
}

.tag.cuisine {
  background: var(--coral-soft);
}

.tag.hobby {
  background: var(--sky-soft);
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius);
  font-weight: 900;
}

.primary-button {
  margin-top: 14px;
  color: #231f20;
  background: linear-gradient(135deg, var(--sun), var(--mint));
  box-shadow: 0 14px 28px rgba(105, 214, 181, 0.24);
}

.secondary-button {
  color: var(--ink);
  background: var(--sky-soft);
}

.screen-toolbar {
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 12px;
}

.screen-toolbar h2 {
  font-size: 1.45rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid rgba(34, 38, 47, 0.08);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.pill.verified {
  color: #155d49;
  background: var(--mint-soft);
}

.profile-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 14px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0) 20%, rgba(20, 22, 28, 0.9) 78%),
    radial-gradient(circle at 25% 22%, rgba(255, 209, 102, 0.9), transparent 9rem),
    radial-gradient(circle at 78% 20%, rgba(105, 214, 181, 0.72), transparent 9rem),
    linear-gradient(135deg, #ff897a, #8fd7ff 48%, #242733);
  touch-action: pan-y;
  user-select: none;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 26px 28px auto auto;
  width: 118px;
  height: 118px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(12deg);
}

.profile-card.dragging {
  transition: none;
}

.profile-card-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.profile-card-art::before {
  content: "";
  position: absolute;
  inset: 28px 28px auto auto;
  width: 142px;
  height: 142px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(12deg);
}

.profile-card-art::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 48px;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
}

.big-initial {
  position: absolute;
  left: 68%;
  top: 26%;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  border: 4px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 3rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow: 0 22px 44px rgba(20, 22, 28, 0.16);
  backdrop-filter: blur(12px);
}

.profile-card-content {
  position: absolute;
  inset: auto 14px 14px;
}

.profile-card-top {
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-card h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.profile-card p {
  margin: 7px 0 12px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
}

.score-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 950;
  backdrop-filter: blur(12px);
}

.profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-meta .pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.22);
}

.profile-card .tag {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.profile-card .pill.verified-light {
  background: rgba(223, 248, 239, 0.24);
  color: #fff;
}

.match-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: -2px 0 12px;
  padding: 5px;
  border: 1px solid rgba(34, 38, 47, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.match-mode-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 950;
}

.match-mode-switch button.active {
  color: #22262f;
  background: linear-gradient(135deg, var(--sun), var(--mint));
  box-shadow: 0 8px 18px rgba(105, 214, 181, 0.2);
}

.match-mode-switch svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.round-action {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--small-shadow);
}

.round-action svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
}

.reject {
  background: #2f3340;
}

.meet {
  color: #22262f;
  background: var(--sun);
}

.like {
  background: var(--coral);
}

.match-strip {
  display: grid;
  gap: 10px;
}

.mini-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  border: 1px solid rgba(34, 38, 47, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.mini-match h4 {
  margin: 0;
}

.mini-match p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-match > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #242733;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(34, 38, 47, 0.12);
}

.avatar {
  width: 44px;
  height: 44px;
  background: var(--sun);
}

.profile-avatar.small {
  width: 46px;
  height: 46px;
  background: var(--mint);
}

.profile-avatar.large {
  width: 82px;
  height: 82px;
  background: linear-gradient(135deg, var(--coral), var(--sun));
  font-size: 1.8rem;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0 12px;
  border: 1px solid rgba(34, 38, 47, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 5px;
}

.segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 900;
}

.segmented button.active {
  color: var(--ink);
  background: var(--sun);
}

.segmented svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.map-card {
  overflow: hidden;
  height: 280px;
  margin-bottom: 12px;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(34, 38, 47, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(34, 38, 47, 0.06) 1px, transparent 1px),
    linear-gradient(145deg, #eff9f5, #fff4e9);
  background-size: 42px 42px;
}

.map-road {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(34, 38, 47, 0.05);
}

.road-a {
  left: -30px;
  top: 72px;
  width: 360px;
  height: 30px;
  transform: rotate(22deg);
}

.road-b {
  left: 92px;
  top: -20px;
  width: 32px;
  height: 360px;
  transform: rotate(-14deg);
}

.road-c {
  right: -40px;
  bottom: 62px;
  width: 320px;
  height: 28px;
  transform: rotate(-18deg);
}

.venue-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  color: #22262f;
  background: var(--sun);
  box-shadow: 0 12px 24px rgba(34, 38, 47, 0.18);
  transform: rotate(-45deg);
}

.venue-pin span {
  transform: rotate(45deg);
  font-size: 0.76rem;
  font-weight: 950;
}

.venue-pin.primary {
  width: 52px;
  height: 52px;
  background: var(--coral);
  color: #fff;
}

.user-location {
  position: absolute;
  left: 49%;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 10px rgba(120, 189, 242, 0.18);
}

.map-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  padding: 7px 11px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.ai-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(230, 243, 255, 0.9), rgba(255, 255, 255, 0.88));
}

.ai-panel h3,
.venue-item h3 {
  margin: 0;
  font-size: 1rem;
}

.ai-panel p,
.venue-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

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

.venue-item {
  align-items: flex-start;
  padding: 12px;
}

.venue-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--coral-soft);
  font-size: 1rem;
  font-weight: 950;
}

.venue-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.small-button {
  min-height: 36px;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--mint-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.chat-layout {
  display: grid;
  gap: 12px;
}

.chat-list {
  display: grid;
  gap: 2px;
  overflow: hidden;
}

.chat-row {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.chat-row.active {
  background: var(--sky-soft);
}

.chat-row-content {
  min-width: 0;
  flex: 1;
}

.chat-row h3 {
  margin: 0;
  font-size: 0.98rem;
}

.chat-row p {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-time {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.conversation {
  overflow: hidden;
}

.conversation-header {
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 38, 47, 0.08);
}

.conversation-header h3 {
  margin: 0;
  font-size: 1rem;
}

.conversation-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.messages {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: clamp(220px, 30vh, 272px);
  max-height: 310px;
  overflow-y: auto;
  padding: 12px;
}

.message {
  width: fit-content;
  max-width: 78%;
  border-radius: 16px 16px 16px 5px;
  background: #f3f1ee;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.message.me {
  justify-self: end;
  border-radius: 16px 16px 5px 16px;
  background: var(--mint);
  color: #17241f;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(34, 38, 47, 0.08);
}

.composer input {
  min-height: 46px;
}

.send-button {
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--coral);
}

.profile-preview {
  align-items: center;
  margin-bottom: 16px;
}

.profile-preview h3 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-preview p {
  margin: 2px 0 8px;
  color: var(--muted);
}

.verification-box {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(223, 248, 239, 0.86), rgba(255, 255, 255, 0.88));
}

.verification-box p {
  margin: -5px 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

.legal-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.legal-links a {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(34, 38, 47, 0.09);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.danger-soft {
  color: #842131;
  background: #ffe1e6;
}

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

.safety-actions button {
  min-height: 38px;
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bottom-nav {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 10px calc(8px + var(--safe-bottom));
  border-top: 1px solid rgba(34, 38, 47, 0.09);
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(18px);
}

.nav-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 58px;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 900;
}

.nav-button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(34, 38, 47, 0.08);
}

.nav-button svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 540px) {
  body {
    background: var(--bg);
  }

  .app-stage {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .onboarding-visual {
    height: 216px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .chat-row {
    min-height: 64px;
  }

  .chat-time {
    display: none;
  }

  .messages {
    min-height: 218px;
    max-height: 242px;
  }
}

@media (max-width: 360px) {
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-lockup strong {
    font-size: 1.05rem;
  }

  .screen-toolbar h2 {
    font-size: 1.22rem;
  }

  .profile-card {
    min-height: 390px;
  }

  .segmented span {
    display: none;
  }

  .nav-button {
    font-size: 0.66rem;
  }
}
