.flow-shell {
  padding-bottom: 0;
}
.flow-shell .topbar {
  max-width: 1280px;
  height: 84px;
  border-bottom: 1px solid var(--line);
}
.desktop-nav {
  display: flex;
  gap: 8px;
  margin-right: auto;
  margin-left: clamp(16px, 3vw, 40px);
}
.desktop-nav a {
  position: relative;
  display: flex;
  min-height: 48px;
  min-width: 7rem;
  justify-content: center;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  line-height: 1.5;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 30px;
}
.desktop-nav a[aria-current] {
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 600;
}
.desktop-nav .inbox-badge { position: absolute; right: 0; top: 0; }
.desktop-nav .ui-icon { display: block; width: 22px; height: 22px; }
.inbox-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 20px;
  padding: 0 5px;
  font-size: 11px;
  background: var(--accent-dark);
  color: white;
}
[hidden] {
  display: none !important;
}
.mobile-nav, .mobile-break {
  display: none;
}
.flow-shell main {
  max-width: 1280px;
  padding: 24px 28px 40px;
}
.start-page {
  max-width: 580px;
  margin: clamp(20px, 5vh, 48px) auto 0;
  text-align: left;
}
.start-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.start-page .eyebrow {
  margin-bottom: 20px;
  font-size: 11px;
}
.start-description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.conversation-art {
  position: relative;
  width: 320px;
  height: 160px;
  margin: 26px auto;
}
.conversation-art span {
  position: absolute;
  padding: 21px 26px;
  border-radius: 25px 25px 25px 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 16px;
  left: 16px;
  top: 9px;
  transform: rotate(-7deg);
}
.conversation-art span + span {
  left: auto;
  right: 0;
  top: 82px;
  border-radius: 25px 25px 8px 25px;
  background: var(--warm);
  color: var(--muted);
  transform: rotate(5deg);
}
.conversation-art i {
  position: absolute;
  top: 20px;
  right: 10px;
  font-style: normal;
  color: var(--accent);
  font-size: 42px;
  transform: rotate(12deg);
}
.start-controls {
  width: 100%;
  margin: 28px 0 0;
}
.match-conditions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 18px;
}
.match-conditions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.start-button {
  min-height: 56px;
  font-size: 1.0625rem;
}
.start-button span {
  font-size: 24px;
  margin-left: auto;
}
.start-rules, .mixed-disclosure {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 18px;
  margin-bottom: 0;
}
.mixed-disclosure {
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.6;
}
.daily-usage {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 12px;
}
.waiting-page .search-orbit {
  margin: 40px auto;
}
.waiting-page .subtle {
  font-size: 14px;
}
.button.liked {
  background: var(--accent);
  color: white;
}
.button:disabled {
  color: var(--muted);
}
.detail-dialog {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  max-height: 85dvh;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.detail-dialog::backdrop {
  background: rgba(32, 41, 68, 0.38);
}
.detail-dialog > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.detail-dialog > header h2 {
  font-size: 17px;
  margin: 0;
}
.dialog-close {
  background: var(--accent-soft);
  border: 0;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}
.dialog-content {
  padding: 24px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-photo {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 20px;
}
.profile-bio {
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.profile-meta {
  color: var(--muted);
  font-size: 0.875rem;
}
.history-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.history-messages .message {
  max-width: 90%;
}

@media (max-width: 760px) {
  .flow-shell .topbar {
    height: 64px;
    padding: 0 20px;
  }
  .desktop-nav {
    display: none;
  }
  .flow-shell main {
    padding: 20px 20px 105px;
  }
  .mobile-nav {
    position: fixed;
    z-index: 20;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 8px;
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
    border-radius: 30px;
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 600;
  }
  .mobile-nav a[aria-current] {
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 600;
  }
  .start-page {
    margin-top: 16px;
  }
  .start-page h1 {
    font-size: clamp(1.75rem, 7vw, 2rem);
  }
  .start-description {
    font-size: 1rem;
  }
  .mobile-break {
    display: block;
  }
  .conversation-art {
    transform: scale(0.9);
    margin: 12px auto;
    width: min(100%, 310px);
  }
  .match-conditions {
    font-size: 0.875rem;
  }
  .start-rules, .mixed-disclosure {
    font-size: 0.875rem;
  }
  .detail-shell .topbar {
    display: none;
  }
  .detail-shell main {
    padding: 0;
  }
  .detail-dialog {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    max-height: 85dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
