/* Phone layout. The pages are built for desktop first; these rules tune them for an
   iPhone-sized screen: tighter vertical rhythm, the theme toggle moved up into the
   header so nothing floats over the text, and the home caption stacked. */
.se-deckrow::-webkit-scrollbar{display:none}
@media (max-width: 700px){
  html{-webkit-text-size-adjust:100%}
  .se-root{position:relative}

  /* Theme toggle sits in the header row, beside Work / About, instead of floating over content. */
  .se-root > button[aria-label^="Switch to"]{position:absolute !important;top:23px !important;right:4px !important;bottom:auto !important}
  .se-root > header > nav{margin-right:30px}

  /* Vertical rhythm: desktop gaps are halved or so on a phone. */
  .se-root section[style*="padding: 120px"]{padding-top:72px !important}
  .se-root section[aria-label="See the full deck"]{padding-top:72px !important}
  .se-root section[aria-label="See the full deck"] > div:first-child{padding-bottom:24px !important}
  .se-root nav[aria-label="Next project"]{padding-top:96px !important;padding-bottom:112px !important}
  .se-root section[style*="gap: 64px"]{gap:48px !important}

  /* Credits wrap instead of running into each other. */
  .se-credits{gap:24px 20px !important}
  .se-credits span,.se-credits a{white-space:normal !important}

  /* Home: the page fits the visible screen (Safari's toolbar included), caption stacked on the left. */
  .se-root[style*="height: 100vh"]{height:100dvh !important}
  .se-root main > div[style*="5vw, 76px"]{flex-direction:column !important;align-items:flex-start !important;gap:2px !important;padding:0 clamp(16px, 2vw, 28px) !important}
  .se-root main > div[style*="5vw, 76px"] > *{flex:none !important;text-align:left !important;min-height:0 !important}
  .se-root > div[aria-hidden="true"][style*="height: 84px"]{height:28px !important}
}
