/* Phone layout: the question, its living scene and the next action lead.
   Presentation only. Animation, audio and game timing retain their policies. */
#mobileExplore, #mobileRound { display: none; }
#answerDetails .answer-explanation { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 701px) {
  .mobile-disclosure { display: contents; }
  .mobile-disclosure > summary { display: none; }
}

@media (max-width: 700px) {
  :root {
    --ascent-craft-x: 43vw;
    --ascent-craft-y: 137px;
  }

  body { padding: 10px 14px max(22px, env(safe-area-inset-bottom)); }
  header { gap: 8px; margin-bottom: 0; padding-bottom: 9px; }
  header .ibtn { width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; }
  header .hgroup { gap: 6px; }
  header .wordmark { min-height: 44px; padding: 4px; font-size: 24px; white-space: nowrap; }
  header .wordmark::before { margin-right: 5px; font-size: 13px; }
  #setBtn { display: none; }

  /* Secondary destinations remain available from Menu and Explore. */
  #home { padding: 15px 2px 16px; gap: 10px; min-height: 0; }
  #home .eyebrow,
  #home .signsub,
  #home #archiveBtn,
  #home #collectionsBtn,
  #home .home-minor,
  #home .streak,
  #home .reset { display: none; }
  #home .sign { margin: 0; }
  #home .sign::after { inset: -18px -10px -8px; }
  #home .bigword { font-size: 66px; line-height: .95; letter-spacing: -4px; }
  body[data-view="home"] { --ascent-craft-x: 50vw; --ascent-craft-y: 264px; }
  #home .arrival-host { height: 220px; min-height: 220px; flex-basis: 220px; margin: 0; }
  #home .arrival-meta { gap: 7px; padding: 4px 8px; font-size: 10px; line-height: 1.45; }
  #home .cta { max-width: 360px; min-height: 52px; padding: 14px 18px; font-size: 15px; }
  #home .homelinks { width: 100%; max-width: 360px; margin-top: 4px; }
  #home #unlBtn { width: 100%; min-height: 44px; font-size: 13px; }
  #mobileExplore { display: block; min-height: 44px; padding: 10px 14px; font-size: 12px; color: #c8d0b7; }
  #home .home-help { width: 100%; max-width: 360px; font-size: 12px; line-height: 1.6; }
  #home .home-help summary { min-height: 44px; padding: 12px 4px; }
  #home .home-help[open] { padding: 0 14px 12px; }
  #home .home-help .text-btn { min-height: 44px; }

  /* The lift keeps its own animated stage above the question. */
  #game { gap: 0; padding: 0; }
  #game > [data-journey] { display: none; }
  #ascentWindow { display: block; height: 130px; flex-basis: 130px; }
  #altitudeHUD {
    position: absolute; top: 45px; right: 2px; left: auto;
    display: flex; align-items: baseline; gap: 7px; transform: none;
    min-width: 0; max-width: none; padding: 5px 0 5px 10px;
    border: 0; border-radius: 4px; background: #082b25f5; white-space: nowrap;
    text-align: right; text-shadow: 0 2px 8px #061f1d;
  }
  #altitudeHUD .altitude-label { margin: 0; font-size: 9px; letter-spacing: .03em; }
  #altitudeValue { font-size: 28px; letter-spacing: -.8px; }
  #altitudeHUD .altitude-unit { font-size: 13px; margin-left: 3px; }
  #altitudeHUD .altitude-max, #ascentStatus { display: none; }

  #card, body[data-phase] #card {
    width: 100%; padding: 14px; gap: 11px; border-radius: 12px;
    background: #0b3028f5; box-shadow: 0 12px 32px #0002;
  }
  #card > .toprow {
    min-height: 20px; padding: 0; border: 0;
    font-size: 11px; line-height: 1.4; color: #c3caaa;
  }
  #modeLbl, #pips, #card > .toprow > span:has(#hudScore), #cat { display: none; }
  #mobileRound { display: inline; }
  #q, body[data-phase="revealing"] #q, body[data-phase="feedback"] #q {
    font-size: 22px; line-height: 1.23; letter-spacing: -.35px;
  }
  #card .q { padding: 0; min-height: 0; }
  #eventScene { border-radius: 8px; }
  #eventScene .scene-viewport { aspect-ratio: 16 / 9; }
  #eventScene figcaption { display: none; }
  #timerBox { padding: 0; }
  #timeRow { margin-top: 5px; font-size: 10px; }
  #timeNum { font-size: 11px; }
  #card .readout, .round-caption, #motionCue { display: none; }

  /* One visible value and one main action. Format is a small disclosure. */
  #controls { display: flex; flex-direction: column; padding: 0; }
  #slider { order: 0; height: 38px; }
  #controls > .ends { order: 1; margin-top: -2px; font-size: 9px; }
  #controls > .controls { order: 2; margin-top: 10px !important; gap: 10px; }
  #controls .typed { gap: 7px; font-size: 13px; }
  #controls .typed input { height: 46px; max-width: 120px; font-size: 19px; }
  #lock { height: 46px; min-height: 46px; padding: 10px 18px; font-size: 13px; }
  #guessOptions { order: 3; margin-top: 8px; }
  #guessError { order: 4; }
  #guessOptions > summary {
    min-height: 40px; padding: 10px 0; width: fit-content;
    font-size: 11px; line-height: 1.6; color: #b9c9b3; cursor: pointer;
  }
  #guessOptions .guess-format { margin: 0 0 4px; gap: 8px; }
  #guessOptions .pill { min-height: 44px; padding: 10px 15px; font-size: 12px; }

  /* Reward and comparison stay visible; the explanation opens on demand. */
  #ascentReadout, body[data-phase="feedback"] #ascentReadout {
    display: block; padding: 10px 0 4px;
  }
  #ascentReadout .ascent-kicker, #ascentSummary { display: none; }
  #ascentDelta, body[data-phase="feedback"] #ascentDelta { margin: 0; font-size: 48px; line-height: 1; }
  #ascentFallback { font-size: 12px; }
  body[data-phase="revealing"] #card { min-height: 240px; }
  body[data-phase="feedback"] #card { padding-bottom: 15px; }
  #result > div { gap: 12px !important; }
  body[data-phase="feedback"] .tier { font-size: 24px; }
  .comparison { gap: 12px; }
  .comparison b { font-size: 21px; }
  .comparison small { font-size: 9px; }
  .comparison span { font-size: 11px; }
  #answerDetails, #resultTools, #roundReview { border-top: 1px solid #c6a15d30; font-size: 12px; }
  #answerDetails > summary, #resultTools > summary, #roundReview > summary {
    min-height: 44px; padding: 13px 0; line-height: 1.5;
    color: #e4ce9a; cursor: pointer;
  }
  #answerDetails .fact { font-size: 13px; line-height: 1.6; }
  #answerDetails .wait, #answerDetails .round-proof { font-size: 12px; line-height: 1.6; }
  #answerDetails .evidence-label { font-size: 10px; }
  #answerDetails .round-proof summary { min-height: 44px; padding: 12px 0; }
  #next { min-height: 46px; margin-top: 0; font-size: 14px; }
  #skipReveal { min-height: 44px; font-size: 12px; }

  #end { padding-top: 160px; }
  #end > .card { padding: 17px; border-radius: 12px; }
  #end > .card > [data-journey], #end .reset { display: none; }
  #endScore { font-size: 72px; }
  #endSub { font-size: 13px; }
  #roundReview { margin-top: 8px; }
  #roundReview .review-head { margin-top: 6px; }
  .result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .result-actions .pill { min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .result-actions .next { min-height: 46px; width: 100%; font-size: 14px; }
  .sheet { padding: 20px; }
}

@media (max-width: 700px) and (max-height: 740px) {
  #home { padding-top: 10px; gap: 8px; }
  #home .bigword { font-size: 58px; }
  #home .arrival-host { height: 180px; min-height: 180px; flex-basis: 180px; }
  body[data-view="home"] { --ascent-craft-y: 232px; }
  #ascentWindow { height: 120px; flex-basis: 120px; }
  #altitudeHUD { top: 34px; }
  #card, body[data-phase] #card { padding: 12px; gap: 8px; }
  #q, body[data-phase="revealing"] #q, body[data-phase="feedback"] #q { font-size: 21px; }
  #eventScene .scene-viewport { aspect-ratio: 2.05; }
  #controls > .controls { margin-top: 8px !important; }
  #guessOptions { margin-top: 5px; }
  #end { padding-top: 134px; }
}

@media (max-width: 350px) {
  body { padding-inline: 10px; }
  header { gap: 5px; }
  header .hgroup { gap: 4px; }
  header .wordmark { font-size: 22px; }
  #home .bigword { font-size: 58px; }
  #home .arrival-meta { font-size: 9px; gap: 5px; }
  #controls .typed input { max-width: 90px; }
  #lock { padding-inline: 13px; font-size: 12px; }
  #altitudeHUD { gap: 5px; }
  #altitudeHUD .altitude-label { font-size: 8px; }
  #altitudeValue { font-size: 25px; }
}
