/* LYV responsive application shell. Layout only; screen and control behavior stays in place. */
@media (min-width: 900px) {
  html, body { min-width: 320px; min-height: 100vh; min-height: 100dvh; }
  body { background: #f7f5ef; }
  .shell { min-height: 100vh; min-height: 100dvh; padding: 0; align-items: stretch; justify-content: stretch; }
  .phone { width: 100%; max-width: none; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .status { display: none; }
  .screen { inset: 0; padding-bottom: 32px; }
  .screen.has-nav { padding-left: 248px; padding-bottom: 32px; }
  .screen > .content { width: 100%; max-width: 960px; margin-inline: auto; padding: 34px 36px 48px; }
  #discover > .content, #explore > .content { max-width: 1160px; padding: 34px clamp(28px, 4vw, 52px) 52px; }
  #discover #lyvDiscoverActivities, #explore #exploreResults { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 18px; }
  #discover #lyvDiscoverActivities > .activity.card { width: 100%; max-width: 480px; justify-self: start; }
  #discover #lyvDiscoverActivities > .tiny, #explore #exploreResults > .tiny { grid-column: 1 / -1; }

  .screen.has-nav > .nav {
    position: fixed; z-index: 45; inset: 0 auto 0 0; display: flex; flex-direction: column;
    align-items: stretch; justify-content: flex-start; gap: 6px; width: 224px; max-width: none;
    height: 100vh; height: 100dvh; padding: 30px 16px; border: 0; border-right: 1px solid #e7e4dc;
    border-radius: 0; background: #fffefa; box-shadow: none; transform: none;
  }
  .screen.has-nav > .nav button { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-width: 0; min-height: 50px; padding: 0 12px; border: 0; border-radius: 14px; background: transparent; color: #68736c; font-size: 14px; font-weight: 650; line-height: 1.25; text-align: left; }
  .screen.has-nav > .nav button .ico { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; font-size: 21px; line-height: 1; }
  .screen.has-nav > .nav button.active { background: #e5eee8; color: #244d40; }
  .screen.has-nav > .nav button.plus { width: 100%; height: auto; color: transparent; font-size: 0; box-shadow: none; }
  .screen.has-nav > .nav button.plus::before { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border-radius: 0; background: transparent; color: #244d40; box-shadow: none; font-size: 22px; }
  .screen.has-nav > .nav button.plus::after { content: "Host"; color: #68736c; font-size: 14px; font-weight: 650; }
  .screen.has-nav > .nav button:focus-visible { outline: 3px solid #ae4f39; outline-offset: 2px; }
  #discover > .nav { border: 0; border-right: 1px solid var(--lyv-discover-line); background: var(--lyv-discover-surface); box-shadow: none; }
  #discover > .nav button { color: var(--lyv-discover-muted); }
  #discover > .nav button.active { color: var(--lyv-discover-green); }
  #discover > .nav button.plus::before { background: transparent; color: var(--lyv-discover-green); box-shadow: none; }
  #discover > .nav button.plus::after { color: var(--lyv-discover-muted); }

  .modal { align-items: center; justify-content: center; padding: 28px; }
  .modal > .sheet { width: min(560px, 100%); max-height: min(90vh, 900px); max-height: min(90dvh, 900px); overflow: auto; border-radius: 24px; padding: 24px; }
  .modal .lyv-delete-account-sheet { max-height: calc(min(90vh, 900px) - 48px); max-height: calc(min(90dvh, 900px) - 48px); }
  .toast { right: auto; bottom: 24px; left: calc(50% - 210px); width: 420px; }
  #activity > .hero { width: calc(100% - 72px); max-width: 828px; margin-inline: auto; }
  #activity .content { max-width: 900px; padding-bottom: 56px; }
  #activity .sticky { position: static; z-index: auto; bottom: auto; max-width: 480px; margin: 24px auto 0; padding: 16px 0 0; background: transparent; }
}

@media (min-width: 768px) and (max-width: 899px) {
  .shell { min-height: 100vh; min-height: 100dvh; padding: 16px; }
  .phone { width: min(760px, calc(100vw - 32px)); height: calc(100vh - 32px); height: calc(100dvh - 32px);border: 0; border-radius: 24px; box-shadow: 0 16px 44px rgba(16, 35, 29, .12); }
  .status { display: none; }
  .screen { inset: 0; }
  .screen > .content { width: 100%; max-width: 760px; margin-inline: auto; padding: 30px 30px 88px; }
  #activity > .hero { width: calc(100% - 60px); max-width: 700px; margin-inline: auto; }
  #activity .sticky { position: static; z-index: auto; bottom: auto; max-width: 480px; margin: 24px auto 0; padding: 16px 0 0; background: transparent; }
  #discover > .content, #explore > .content { max-width: 820px; padding: 30px 30px 88px; }
  #discover #lyvDiscoverActivities, #explore #exploreResults { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; gap: 16px; }
  #discover #lyvDiscoverActivities > .tiny, #explore #exploreResults > .tiny { grid-column: 1 / -1; }
  .nav, #discover .nav { bottom: 16px; width: min(760px, calc(100vw - 32px)); max-width: none; }
  .screen.has-nav { padding-bottom: calc(var(--lyv-nav-height) + 36px); }
  .sticky { bottom: 16px; z-index: 5; }
}

@media (max-width: 767px) {
  html, body { min-height: 100vh; min-height: 100dvh; }
  .shell { min-height: 100vh; min-height: 100dvh; padding: 0; }
  .phone { width: 100%; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .screen { inset: 0; }
  .screen.has-nav { padding-bottom: calc(var(--lyv-nav-height) + env(safe-area-inset-bottom) + 16px); }
  .nav, #discover .nav { bottom: 0; width: 100vw; max-width: none; }
  .nav button:focus-visible { outline: 3px solid #ae4f39; outline-offset: -3px; }
  .sticky { bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 5; }
  #activity { scroll-padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  #activity .content { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  .modal { padding-bottom: env(safe-area-inset-bottom); }
}

/* Keep navigation active colors consistent across the mobile bar and desktop sidebar. */
.screen.has-nav > .nav button.active {
  background: #E2ECE5;
  color: #203D33;
  border-radius: 12px;
}

#discover > .nav button:not(.plus) {
  color: #68756E;
}

#discover > .nav button.active {
  background: #E2ECE5;
  color: #203D33;
}

#discover > .nav button .lyv-nav-svg {
  color: #68756E;
}

#discover > .nav button.active .lyv-nav-svg {
  color: #203D33;
}
