/* ============================================================================
   PORT COMPLETION W4 — THE WIDE BREAKPOINTS (owner queue item 10, 2026-09-23)
   ----------------------------------------------------------------------------
   Owner, on #24 sentences_library at iPad portrait: the web showed a
   "← Fluency Rules" link, a big page heading and the topic chips as a ten-row
   WALL; the app shows the slim bar, one scrolling chip rail, the count, the
   rows. The W bands rebuilt the PHONE composition and let 701px+ fall back to
   older wide rules. This sheet makes the app's composition hold at iPad
   portrait, iPad landscape and desktop — the app's round-15 tablet layout
   (captures app-ipad-p / app-ipad-l, run 2026-09-23_87f79c7):

   1 · THE SLIM BAR. W1's `.w1-bar` (back + title, or the lesson rail) is
       already painted into #topbar at every width; ≥701 it now SHOWS, in the
       breadcrumb's place. The web's top-bar tools (search, streak, account)
       stay on the right — owner item 1: "desktop keeps its top bar". Today
       has no bar (the app names itself once, on Today). The in-page back
       links and page headings the bar replaces are hidden at every width —
       the phone's list, verbatim, plus `.w3-head` (W3's tab-root titles).
   2 · THE BOUNDED COLUMN. The app lays every screen but Today and the map in
       ONE 680 column (round 15); the page here does the same. Today keeps the
       width (two-by-two in portrait, one row of four in landscape — the app's
       landscape Today); the constellation keeps the whole stage; a running
       activity keeps its own fit engine (studio_exercise.css).
   3 · RAILS STAY RAILS. The topic chips (#24) and the scenario chips scroll
       as ONE row at every width.
   4 · THE APP'S COUNTS inside the column: tracks stacked, 4 guides, 3 lesson
       tiles, 3 paths, 3 category/set tiles, 3 scenario cards, 3 practice
       tiles, the decoder's 4-up picker, the 6-up glyph index at the tile's
       own height, the full-width Segmented, the plate at its phone height.
   5 · THE SHEETS. The app's showAppSheet is a BOTTOM sheet, content-high,
       inside the column. On the web ≥701 the dialog was fixed with inset:0,
       so `height:auto` stretched it to the viewport (the tall white box on
       #23 / #33); it is now bottom-anchored and 680 wide. The game setup
       sheet (#qsheet) takes the same shape.
   6 · the scenario Words NavRow: the count sits beside the chevron (both
       spans were growing, which parked it mid-row) — every width.

   Preview layer only (body.hts-studio); `--app-*` tokens only; nothing added
   to the DOM; linked LAST, after studio_app_w3.css.
   ============================================================================ */

/* 1 · in-page duplicates of the bar — every width (the phone already did) */
body.hts-studio.hts-studio.hts-studio .w1-top,
body.hts-studio.hts-studio.hts-studio .b2-head,
body.hts-studio.hts-studio.hts-studio .b4-track > .b4-head,
body.hts-studio.hts-studio.hts-studio .b4-index > .b4-head,
body.hts-studio.hts-studio.hts-studio .b5-dhead,
body.hts-studio.hts-studio.hts-studio .b4-back,
body.hts-studio.hts-studio.hts-studio .b3-back,
body.hts-studio.hts-studio.hts-studio .w3-head{ display:none!important; }

/* 3 · one scrolling row of chips, every width */
body.hts-studio.hts-studio.hts-studio .b4-chips,
body.hts-studio.hts-studio.hts-studio .b3-chips{
  flex-wrap:nowrap!important;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
body.hts-studio.hts-studio.hts-studio .b4-chips::-webkit-scrollbar{ display:none; }
body.hts-studio.hts-studio.hts-studio .b4-chips > *{ flex:0 0 auto; }

/* 6 · NavRow: title grows, the count keeps its own width beside the chevron */
body.hts-studio.hts-studio.hts-studio .w2-nav--plain > .w2-nav__meta{ flex:0 0 auto; }
/* owner 10-21: the word counts form one right-aligned column (the generic .w2-nav > span:nth-child(2){flex:1} rule outranked the line above) */
body.hts-studio.hts-studio.hts-studio .w2-nav.w2-nav--plain > span.w2-nav__meta{ flex:0 0 auto; min-width:6.5em; text-align:right; font-variant-numeric:tabular-nums; }

@media (min-width:701px){
  /* 1 · the slim bar in the breadcrumb's place */
  body.hts-studio.hts-studio.hts-studio #topbar > .breadcrumb{ display:none!important; }
  body.hts-studio.hts-studio.hts-studio #topbar > .top-actions{ margin-left:auto; }
  body.hts-studio.hts-studio.hts-studio #topbar > .w1-bar{
    display:flex;
    flex-direction:column;
    justify-content:center;
    flex:1 1 auto;
    min-width:0;
    align-self:stretch;
  }
  body.hts-studio.hts-studio.hts-studio .w1-bar__row{
    display:flex;
    align-items:center;
    gap:var(--app-gap-m);
    min-width:0;
  }
  body.hts-studio.hts-studio.hts-studio .w1-bar__t{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    font-size:var(--app-size-title-m);
    line-height:var(--app-lh-title-m);
    font-weight:600;
    color:var(--app-ink);
  }
  body.hts-studio.hts-studio.hts-studio .w1-bar--rail .w1-bar__t{
    font-size:var(--app-size-label);
    line-height:var(--app-lh-label);
    color:var(--app-ink-muted);
  }
  body.hts-studio.hts-studio.hts-studio .w1-bar__sp{ display:none; }
  body.hts-studio.hts-studio.hts-studio .w1-bar .w1-meter{ margin:var(--app-gap-xs) 0 0; }
  body.hts-studio.hts-studio.hts-studio .w1-bar .b6-meter{ height:3px; }

  /* 2 · the app's 680 column — not Today, not the map, not a running activity */
  body.hts-studio.hts-studio.hts-studio:not(.ex-active) #view > .st-page:not(:has(.b1-today)):not(:has(> .cmg)){
    max-width:680px;
    margin-left:auto;
    margin-right:auto;
  }

  /* 4 · the app's counts */
  body.hts-studio.hts-studio.hts-studio .b2-tracks{ grid-template-columns:minmax(0,1fr); }
  body.hts-studio.hts-studio.hts-studio .b2-track{
    grid-template-columns:4px minmax(0,1fr) auto;
    grid-template-rows:auto;
    align-items:center;
  }
  body.hts-studio.hts-studio.hts-studio .b2-track__rule{ grid-row:auto; }
  body.hts-studio.hts-studio.hts-studio .st-appart--track{
    grid-column:auto;
    justify-self:auto;
    margin:var(--app-gap-m) var(--app-gap-m) var(--app-gap-m) 0;
  }
  body.hts-studio.hts-studio.hts-studio .b2-refs{ grid-template-columns:repeat(4,minmax(0,1fr)); }

  body.hts-studio.hts-studio.hts-studio .w1-grid,
  body.hts-studio.hts-studio.hts-studio .w1-grid--paths{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.hts-studio.hts-studio.hts-studio .w1-gidx{ grid-template-columns:repeat(6,minmax(0,1fr)); }
  body.hts-studio.hts-studio.hts-studio .w1-glyph{ aspect-ratio:auto; height:var(--app-touch-large); }

  body.hts-studio.hts-studio.hts-studio .b3-plate{ min-height:136px; }
  body.hts-studio.hts-studio.hts-studio .b3-seg{ max-width:none; }
  body.hts-studio.hts-studio.hts-studio .b3-grid,
  body.hts-studio.hts-studio.hts-studio .b3-scenes{ grid-template-columns:repeat(3,minmax(0,1fr)); }

  body.hts-studio.hts-studio.hts-studio .w3-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.hts-studio.hts-studio.hts-studio .w3-grid--feature{ grid-template-columns:repeat(2,minmax(0,1fr)); }

  body.hts-studio.hts-studio.hts-studio .b5-pgrid{ grid-template-columns:repeat(4,minmax(0,1fr)); }

  /* 5 · showAppSheet: a bottom sheet, content-high, in the column */
  body.hts-studio.hts-studio.hts-studio #device-sheet:has(> :is(.w1-sheet,.b4-zsheet,.b6-letter)){
    inset:auto 0 0;
    width:min(680px,100vw);
    height:auto;
    max-height:calc(100dvh - 60px);
    margin:0 auto;
    border-radius:var(--app-r-sheet) var(--app-r-sheet) 0 0;
    border-bottom:0;
  }
  body.hts-studio.hts-studio.hts-studio #device-sheet:has(> :is(.w1-sheet,.b4-zsheet,.b6-letter))::before{
    content:"";
    position:absolute;
    top:10px; left:50%;
    width:36px; height:4px;
    margin-left:-18px;
    border-radius:var(--app-r-pill);
    background:var(--app-line-strong);
  }
  /* the game setup sheet, the same shape */
  body.hts-studio.hts-studio.hts-studio.ex-active #qsheet{
    align-content:end!important;
    justify-items:center!important;
    padding:12px 12px 0!important;
  }
  body.hts-studio.hts-studio.hts-studio.ex-active #qsheet .qsheet{
    width:min(680px,100%)!important;
    height:auto!important;
    max-height:calc(100dvh - 60px)!important;
    border-radius:var(--app-r-sheet) var(--app-r-sheet) 0 0;
  }
}

/* 2 · Today: two-by-two in portrait, the app's one row of four in landscape */
@media (min-width:701px) and (orientation:landscape){
  body.hts-studio.hts-studio.hts-studio .b1-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); }
}
