/* One content width for every route, including artwork and bottom sheets. */
body[data-page] {
  --shell:100%;
  --phone-gutter:0px;
}
body[data-page] main#app {
  container-type:inline-size;
  width:min(100%,var(--shell));
  margin-inline:auto;
}
body[data-page]:not([data-page="chat"]):not([data-page="call"]) main#app {
  height:var(--phone-height,100dvh);
  min-height:0;
  overflow-y:auto;
  scrollbar-width:none;
}
.night-interior { min-height:100%; }
/* Keep the two top-level destinations in a single, stable tab bar. */
.tab-shell {
  --tab-bottom:max(8px,env(safe-area-inset-bottom,0px));
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  background:linear-gradient(174deg,#0b102b,#11112b 62%,#171028);
}
.tab-content { min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:none; }
.home-art-window {
  width:100%;
  aspect-ratio:1536/2400;
  overflow:hidden;
  overflow:clip;
  mask-image:linear-gradient(black 97%,transparent);
}
.tab-shell .np-profile { min-height:0; }
.tab-shell .np-profile>.np-content { padding-bottom:20px; }
.tab-shell>.nav {
  display:grid;
  grid-template-columns:1fr 1fr;
  margin:6px 5.2% var(--tab-bottom);
  padding:0;
  height:56px;
  border:1px solid #dccdef45;
  border-radius:999px;
  background:linear-gradient(115deg,#393849f5,#272139f5);
  box-shadow:inset 0 1px 3px #e2d7ec16;
}
.tab-shell>.nav button {
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:2px;
  width:100%; height:100%; min-width:0; margin:0; padding:0; border-radius:999px;
  color:#c0b6cd; background:transparent; font:500 13px/16px var(--sans);
}
.tab-shell>.nav button.active { color:#f4e7ff; background:transparent; }
.tab-shell>.nav button.active svg { fill:#e7d4f4; }
.tab-shell>.nav button:focus-visible { outline:2px solid #ffcc9c; outline-offset:-3px; }
@media (min-width:600px) and (min-height:540px), (min-width:431px) and (hover:hover) and (pointer:fine) {
  body[data-page] {
    --shell:clamp(320px,46.2085svh,390px);
    --phone-height:min(100dvh,844px);
    --phone-gutter:max(0px,calc((100svh - 844px) / 2));
    padding-block:var(--phone-gutter);
  }
  body[data-page] main#app {
    height:var(--phone-height);
    min-height:0;
    overflow-y:auto;
    scrollbar-width:none;
  }
  .conversation-page,.voice-call-page { max-height:var(--phone-height); }
  body[data-page] #overlay .scrim {
    inset-block:var(--phone-gutter);
    width:min(100%,var(--shell));
    margin-inline:auto;
  }
}
