/* REPLY FIRST (assignment 3, 2026-11-11). Loaded after the demo page's inline styles.
   1. Every control a finger uses is at least 44px in both directions (DESIGN.md "compact, touch-friendly targets";
      assignment 3 acceptance). Baseline: 15 controls under 44px on the result screen, 19 on setup
      (docs/opus-execution-plan/baseline-mobile-ux.md, finding 5).
   2. On a phone the reply and its actions land on screen with the result: the "Your response is ready!" banner is
      dropped and the count card becomes one compact row (finding 4: Share and the format switch were below the fold
      at 360 and 390px). Colours and type tokens are unchanged. */

/* ── 1. Touch targets (all widths) ───────────────────────────────────────────────────────────────────── */
#step2 .pr-nav-arrow{width:44px;height:44px}
.context-ask-chip{min-height:44px;padding:0 14px;display:inline-flex;align-items:center}
.ds-slider,.ds-slider::-webkit-slider-runnable-track{height:44px}
.ds-slider::-moz-range-track{height:44px}
.ds-slider::-webkit-slider-thumb{margin-top:9px}
.followup-trigger{min-height:44px}
.sa-return-link{min-height:44px;display:inline-flex;align-items:center}
.se-engine-bar .se-seg button{min-height:44px}
.coparent-suggest-yes,.coparent-suggest-no{min-height:44px;min-width:44px}
.vs-nav{width:44px;height:44px;margin-top:-22px}
.vs-scrub{height:44px}
.vs-dots .vs-dot{pointer-events:none} /* a position indicator now; Previous / Next, swipe and the scrubber move the carousel */
.upsell-cta{min-height:44px}

/* ── 2. Reply first on a phone ───────────────────────────────────────────────────────────────────────── */
@media (max-width:640px){
  #step2 > .inst{display:none}
  #step2 .result-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;
    padding:10px 14px;margin-bottom:var(--space-4,10px);text-align:left}
  /* The count has its own row, so the row height does not change when "0" becomes "4 Weaknesses Found" on a stream. */
  #step2 .result-header .result-count{order:1;flex:1 0 100%;font-size:20px;line-height:1.2;min-height:1.2em}
  #step2 .result-header .result-sub{display:none}
  /* The chip row (production's X-Ray view): one row that scrolls sideways, held at one chip's height even while
     empty, so chips arriving after the reply never push anything down; each chip is a 44px target. */
  #step2 #tagSummary{margin:8px 0 12px;flex-wrap:nowrap!important;justify-content:flex-start!important;overflow-x:auto;
    min-height:48px;scrollbar-width:none;padding-bottom:4px}
  #step2 #tagSummary::-webkit-scrollbar{display:none}
  #step2 #tagSummary .tag-chip{flex:0 0 auto;display:inline-flex!important;align-items:center;min-height:44px;white-space:nowrap}
}

/* The camera and microphone buttons now sit in a row under the message box (44px each, never over the text), so the
   image menu opens above that row. */
.image-source-menu{bottom:52px}

/* The delivery line now follows the reply's actions (moved in the page), so it takes its space above, not below. */
.delivery-line{margin:var(--space-5,14px) 0 0}

/* Format switch on narrow phones: three equal pills that always fit the card (at 360px the nowrap pills ran past its
   edges in Strategy and Co-Parent); a long label wraps to two lines inside its 44px pill rather than being cut off. */
@media (max-width:420px){
  #step2 .format-toggle{gap:6px}
  #step2 .format-toggle .fmt-pill{flex:1 1 0;min-width:0;padding:4px 6px;font-size:13px;line-height:1.15;white-space:normal!important;text-align:center}
}

/* While a streamed reply is arriving (demo-app.js setStreamingReply): the reply alone. Its actions, X-Ray, Drop Score
   and everything after the reply card appear together when it is complete, so nothing visible is pushed down while it
   types (with the reply now at the top of the screen, that push was most of the reveal's layout shift). */
#step2.dm-streaming #responseBox > :not(.response-message),
#step2.dm-streaming #responseBox ~ *{display:none!important}
/* The app's bottom bar follows the result in the page; while the reply streams it would ride down with every new line. */
body.dm-reply-streaming #bottomNav{display:none!important}
