/* Starwink website v10 (2026-09-29): the phone-first pass (founder: "the mobile version does need a thorough verification and rework"; "keep the desktop version as it is").
   Every rule here sits inside the phone breakpoint; desktop is unchanged from v9. The critique it answers: STRATEGY-v2 section 18. */

@media (max-width: 819.98px) {
  /* 1. worlds: one swipe row of seven cards (was a 5.7-screen scroll story); the next card peeks so the row reads as a row */
  #app-frame.w4-stacked .w4-list { display: block; padding-bottom: var(--site-section); }
  .w4-row { display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: calc(-1 * var(--site-gutter)); padding: var(--sp-2) var(--site-gutter) var(--sp-4); scroll-padding-inline: var(--site-gutter); }
  .w4-row::-webkit-scrollbar { display: none; }
  .w4-row .w4-card { flex: 0 0 84%; scroll-snap-align: start; grid-template-columns: 1fr; align-items: stretch; align-content: start; }
  .w4-row .w4-card img { height: 12.5rem; min-height: 0; }
  .w4-row .w4-card > div { padding: var(--sp-4); }

  /* the worlds title shows whole on a phone (a thumb scrolls faster than it typed) */
  .wt7-ch, .wt7-line { opacity: 1; transform: none; animation: none !important; transition: none; }
  .wt7-star { opacity: 1; transform: none; }
  .wt7 { padding-bottom: var(--sp-5); }

  /* 3. method and Make: one demo panel above a compact list; nothing pinned, nothing greyed; the current step shows its words */
  .m4-stage-col, .mk-stage-col { position: relative; top: auto; }
  .m4-steps .m4-step, .m4-steps .m4-step:first-child, .m4-steps .m4-step:last-child,
  .mk-beats .mk-beat, .mk-beats .mk-beat:first-child, .mk-beats .mk-beat:last-child { min-height: 3.25rem; padding: var(--sp-3) 0; opacity: 1; cursor: pointer; align-items: center; }   /* beats the scroll-story padding (244px top) and last-step height (503px) */
  .m4-step .h3, .mk-beat .h3 { font-size: 1.15rem; }
  .m4-step:not(.is-now) .step-d, .mk-beat:not(.is-now) .step-d { display: none; }
  .m4-steps .m4-step.is-now, .mk-beats .mk-beat.is-now { align-items: start; }   /* the open step's mark sits beside its title, not mid-paragraph */
  .m4-steps, .mk-beats { margin-top: var(--sp-5); border-top: 1px solid var(--hairline); }
  .m4-step, .mk-beat { border-bottom: 1px solid var(--hairline); }
  .m4-grid, .mk-grid { gap: 0; }

  /* 2 + 9. keepsakes: no blurred edge treasures on a phone; the title at the same size as every other section */
  .k8-near { display: none !important; }
  .k4-head .h2 { font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4.4rem); white-space: normal; }
  .k10-sheet { position: fixed; inset: 0; z-index: 90; }
  .k10-scrim { position: absolute; inset: 0; background: rgba(var(--shadow-rgb), 0.55); opacity: 0; transition: opacity calc(240ms * var(--dz-k)) var(--ease-light); }
  .k10-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; overscroll-behavior: contain; outline: none;
    padding: var(--sp-5) var(--site-gutter) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    background: var(--feature-bg); box-shadow: var(--sh-lg); transform: translateY(100%); transition: transform calc(300ms * var(--dz-k)) var(--ease-settle); }
  .k10-sheet.is-open .k10-scrim { opacity: 1; }
  .k10-sheet.is-open .k10-panel { transform: none; }
  .k10-grip { display: block; width: 2.5rem; height: 4px; margin: calc(-1 * var(--sp-3)) auto var(--sp-3); border-radius: var(--radius-pill); background: rgba(242, 239, 232, 0.3); }
  .k10-x { position: absolute; top: var(--sp-2); right: var(--sp-2); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--onart-ink); cursor: pointer; }
  .k10-x svg { width: 20px; height: 20px; }
  .k10-card.k4-card { position: static; translate: none; width: auto; max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; }
  html.k10-lock { overflow: hidden; }

  /* 7. plans read Free, Library, Studio */
  .p4-card--lib { order: 0; }

  /* 4. finger-sized controls (hit areas grow; the type does not) */
  .seg--sm button, .player-bar .seg button, .mu-lang button { min-height: 44px; }
  .progress button { height: 44px; }
  .mu-seek { height: 44px; }
  .m4-tabs button { min-height: 44px; min-width: 44px; }
  .mk-cta, .foot-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-head .brand { padding-block: 5px; }

  /* 5. no label under 12px */
  .mu-soon, .r4-pt .mu-soon, .m4-tabs button, .m4-draft-k, .y6-day, .y6-tag, .mk-ex { font-size: 12px; }

  /* 11. phones: solid grounds instead of live background blur, and loops rest while their section is off screen */
  .site-head, .mu-shelf, .p4-card, .dock, .stage-end { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  #app-frame .site-head.is-scrolled, #app-frame .site-head.has-ground, #app-frame .site-head.dz-night.has-ground:not(.is-scrolled) { background: rgba(var(--feature-bg-rgb), 0.97); box-shadow: 0 1px 0 rgba(242, 239, 232, 0.08); }
  #app-frame.arm-shelf .site-head.has-ground:not(.is-scrolled) { background: var(--l0); box-shadow: 0 1px 0 var(--hairline); }   /* the light hero keeps its dark header ink */
  .sw-away, .sw-away *, .sw-away::before, .sw-away::after, .sw-away *::before, .sw-away *::after { animation-play-state: paused !important; }
  .k4-t[data-band="b"] { top: auto; bottom: var(--yb); }
  .keeps4 { overflow-anchor: none; }   /* the script holds the tapped treasure in place; the browser's own anchoring moved it a second time */
  .k4-t:hover img { transform: none; }   /* a tap leaves hover stuck on touch screens; the tap feedback is :active */
}
@media (max-width: 819.98px) and (prefers-reduced-motion: reduce) {
  .m4-step .step-d, .mk-beat .step-d { display: block !important; }
  .k10-panel, .k10-scrim { transition: none; }
}
