/* =========================================================
   V141 · DAYS 1–3 RESPONSIVE QA RECOVERY
   Loaded last. Built from real Samsung screenshots + full source audit.
   Goal: preserve the world while guaranteeing readable, tappable UI.
   ========================================================= */

/* Defensive text/layout rules: never allow a control to collapse into vertical letters. */
.chapter-day1 *,
.chapter-day2 *,
.chapter-day3 *,
.v104-d3-scene *{box-sizing:border-box}
.chapter-day1 button,
.chapter-day2 button,
.chapter-day3 button,
.v104-d3-scene button{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  hyphens:none;
}
.chapter-day1 img,.chapter-day2 img,.chapter-day3 img,.v104-d3-scene img{max-width:100%}

/* Keep the persistent HUD secondary to the scene on both phone and desktop. */
@media (max-width:760px){
  .chapter-day1 .brand,.chapter-day2 .brand,.chapter-day3 .brand{
    top:max(8px,env(safe-area-inset-top))!important;left:8px!important;
    max-width:184px!important;padding:4px 8px 4px 4px!important;gap:7px!important;
  }
  .chapter-day1 .brand img,.chapter-day2 .brand img,.chapter-day3 .brand img{width:36px!important;height:36px!important}
  .chapter-day1 .brand b,.chapter-day2 .brand b,.chapter-day3 .brand b{font-size:10.5px!important;letter-spacing:.09em!important;white-space:nowrap!important}
  .chapter-day1 .brand small,.chapter-day2 .brand small,.chapter-day3 .brand small{font-size:6px!important;letter-spacing:.14em!important}
  .chapter-day1 .sound,.chapter-day2 .sound,.chapter-day3 .sound{top:max(9px,env(safe-area-inset-top))!important;right:8px!important;width:42px!important;height:42px!important}
  .chapter-day1 .journey-menu-trigger,.chapter-day2 .journey-menu-trigger,.chapter-day3 .journey-menu-trigger{
    top:max(56px,calc(env(safe-area-inset-top) + 47px))!important;right:8px!important;width:44px!important;height:44px!important;
  }
  .chapter-day1 .scene-meta,.chapter-day2 .scene-meta,.chapter-day3 .scene-meta{
    top:max(57px,calc(env(safe-area-inset-top) + 48px))!important;left:10px!important;
    max-width:calc(100vw - 70px)!important;min-height:0!important;padding:4px 8px!important;
  }
  .chapter-day1 .scene-meta time,.chapter-day2 .scene-meta time,.chapter-day3 .scene-meta time{font-size:15px!important}
  .chapter-day1 .scene-meta span,.chapter-day2 .scene-meta span,.chapter-day3 .scene-meta span{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
}

/* ======================== DAY 1 ======================== */
@media (max-width:760px){
  /* Airport */
  .chapter-day1 .airport-v53-signs{top:max(118px,15svh)!important;left:10px!important;right:10px!important;width:auto!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .chapter-day1 .airport-v53-sign{min-width:0!important;min-height:52px!important;padding:7px 6px!important}
  .chapter-day1 .airport-v53-sign b{font-size:16px!important;line-height:1.05!important}.chapter-day1 .airport-v53-sign span{font-size:8px!important;line-height:1.2!important}
  .chapter-day1 .airport-whisper{left:12px!important;right:12px!important;bottom:max(74px,calc(env(safe-area-inset-bottom) + 66px))!important;max-width:none!important;padding:9px 11px!important}
  .chapter-day1 .airport-whisper p{font-size:14px!important;line-height:1.35!important}.chapter-day1 .airport-whisper small{font-size:8px!important}
  .chapter-day1 .airport-v58-next{left:12px!important;right:12px!important;bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important;width:auto!important;min-height:50px!important}

  /* Shuttle */
  .chapter-day1 .shuttle-whisper,.chapter-day1 .shuttle-arrival-cue{
    left:12px!important;right:12px!important;bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important;width:auto!important;max-width:none!important;max-height:38svh!important;overflow:auto!important;
  }
  .chapter-day1 .shuttle-cinematic{left:12px!important;right:12px!important;bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important;width:auto!important;max-height:42svh!important;overflow:auto!important;padding:12px!important}
  .chapter-day1 .shuttle-route-thread{min-width:0!important}.chapter-day1 .shuttle-route-thread b{font-size:10px!important}
  .chapter-day1 .shuttle-player-next,.chapter-day1 .shuttle-arrival-action{width:100%!important;min-height:48px!important}

  /* Ticket machine: do not reproduce the previous 7px miniature UI. */
  .chapter-day1 .machine-screen{
    left:8%!important;right:auto!important;top:28svh!important;width:84%!important;min-height:0!important;max-height:55svh!important;
    padding:13px 14px!important;gap:7px!important;overflow:auto!important;border-radius:15px!important;
    background:rgba(238,243,237,.96)!important;box-shadow:0 16px 44px rgba(0,0,0,.30)!important;
  }
  .chapter-day1 .machine-screen>span{font-size:9px!important}.chapter-day1 .machine-screen h2{font-size:22px!important;line-height:1.12!important;margin:3px 0!important}
  .chapter-day1 .machine-screen p{font-size:11px!important;line-height:1.35!important;margin:3px 0!important}
  .chapter-day1 .machine-screen>button,.chapter-day1 .machine-screen .primary{min-height:46px!important;padding:9px 11px!important;font-size:11px!important}
  .chapter-day1 .machine-screen>img{max-height:120px!important;object-fit:contain!important}
  .chapter-day1 .machine-screen .machine-payment{min-height:180px!important}.chapter-day1 .machine-screen .drag-help{display:block!important;font-size:9px!important}

  /* Gate + subway */
  .chapter-day1 .gate-copy{top:max(118px,15svh)!important;left:12px!important;right:12px!important;width:auto!important;max-height:25svh!important;overflow:auto!important;padding:11px 13px!important}
  .chapter-day1 .gate-copy h2{font-size:26px!important;line-height:1.1!important}.chapter-day1 .gate-copy span{font-size:8px!important}
  .chapter-day1 .metro-map{top:max(116px,15svh)!important;left:10px!important;right:10px!important;padding:9px!important;gap:4px!important;border-radius:16px!important}
  .chapter-day1 .metro-stop{min-width:0!important}.chapter-day1 .metro-stop b{width:36px!important;height:36px!important;font-size:12px!important}.chapter-day1 .metro-stop span{font-size:8px!important;line-height:1.15!important}
  .chapter-day1 .metro-announcement{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important;max-height:45svh!important;overflow:auto!important;padding:12px 13px!important}
  .chapter-day1 .metro-announcement h2{font-size:24px!important}.chapter-day1 .metro-announcement p{font-size:12px!important}.chapter-day1 .metro-choices{display:grid!important;grid-template-columns:1fr 1fr!important}.chapter-day1 .metro-choices button{min-width:0!important;min-height:46px!important;font-size:10px!important}

  /* Hakata / taxi */
  .chapter-day1 .hakata-whisper,.chapter-day1 .hakata-mei-cue,.chapter-day1 .taxi-stand-whisper,.chapter-day1 .taxi-address-panel,
  .chapter-day1 .taxi-greeting-v38,.chapter-day1 .taxi-ride-control,.chapter-day1 .taxi-arrival-meter,.chapter-day1 .v123-taxi-receipt{
    left:10px!important;right:10px!important;width:auto!important;max-width:none!important;
  }
  .chapter-day1 .hakata-whisper,.chapter-day1 .hakata-mei-cue,.chapter-day1 .taxi-stand-whisper{bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important}
  .chapter-day1 .taxi-address-panel,.chapter-day1 .taxi-greeting-v38,.chapter-day1 .taxi-ride-control,.chapter-day1 .taxi-arrival-meter,.chapter-day1 .v123-taxi-receipt{
    bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:43svh!important;overflow:auto!important;
  }
  .chapter-day1 .taxi-human-choice,.chapter-day1 .sato-human-choice,.chapter-day1 .meal-human-choice{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .chapter-day1 .taxi-human-choice>button,.chapter-day1 .sato-human-choice>button,.chapter-day1 .meal-human-choice>button{min-width:0!important;min-height:52px!important;padding:8px 9px!important}
  .chapter-day1 .taxi-human-choice b,.chapter-day1 .sato-human-choice b,.chapter-day1 .meal-human-choice b{font-size:12px!important;line-height:1.2!important}
  .chapter-day1 .taxi-human-choice small,.chapter-day1 .sato-human-choice small,.chapter-day1 .meal-human-choice small{font-size:9px!important;line-height:1.2!important}
  .chapter-day1 .taxi-arrival-exit{left:10px!important;right:10px!important;width:auto!important;min-width:0!important;transform:none!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important}

  /* Ryokan / Sato */
  .chapter-day1 .ryokan-whisper,.chapter-day1 .sato-response,.chapter-day1 .meal-sato-whisper,.chapter-day1 .meal-farewell-choice,.chapter-day1 .meal-breath{
    left:10px!important;right:10px!important;width:auto!important;max-width:none!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;
    max-height:42svh!important;overflow:auto!important;
  }
  .chapter-day1 .sato-response{padding:9px!important}.chapter-day1 .sato-response button{min-height:48px!important}

  /* Genkan / room */
  .chapter-day1 .genkan-copy{top:max(116px,15svh)!important;left:10px!important;right:10px!important;width:auto!important;max-height:24svh!important;overflow:auto!important;padding:10px 12px!important}
  .chapter-day1 .genkan-copy h2{font-size:25px!important}.chapter-day1 .genkan-copy p{font-size:11px!important}
  .chapter-day1 .shoe-choice{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  .chapter-day1 .shoe-choice button{min-width:0!important;min-height:104px!important}.chapter-day1 .shoe-choice img{height:72px!important}.chapter-day1 .shoe-choice span{font-size:10px!important}
  .chapter-day1 .room-heading{top:max(116px,15svh)!important;left:12px!important;right:12px!important;width:auto!important}.chapter-day1 .room-heading h2{font-size:30px!important}
  .chapter-day1 .room-details{left:10px!important;right:10px!important;bottom:max(84px,calc(env(safe-area-inset-bottom) + 76px))!important;gap:8px!important;justify-content:center!important}
  .chapter-day1 .room-details button{width:66px!important;height:66px!important;flex:0 0 66px!important}.chapter-day1 .detail-slip{left:10px!important;right:10px!important;bottom:max(74px,calc(env(safe-area-inset-bottom) + 66px))!important;width:auto!important;max-height:28svh!important;overflow:auto!important}
  .chapter-day1 .room-continue{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important}

  /* Meal / garden */
  .chapter-day1 .meal-learning,.chapter-day1 .chopstick-lesson,.chapter-day1 .dish-tip{
    left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important;max-height:48svh!important;overflow:auto!important;
  }
  .chapter-day1 .meal-farewell-choice,.chapter-day1 .meal-breath{padding:9px 10px!important}.chapter-day1 .meal-breath p{font-size:16px!important;line-height:1.3!important}
  .chapter-day1 .garden-whisper{left:10px!important;right:10px!important;top:max(112px,14svh)!important;bottom:auto!important;width:auto!important;max-width:none!important;padding:9px 11px!important}
  .chapter-day1 .garden-whisper p{font-size:14px!important;line-height:1.3!important}.chapter-day1 .garden-whisper small{font-size:9px!important}
  .chapter-day1 .garden-fact{left:10px!important;right:10px!important;bottom:max(78px,calc(env(safe-area-inset-bottom) + 70px))!important;width:auto!important;max-width:none!important;max-height:28svh!important;overflow:auto!important}
  .chapter-day1 .garden-nav{right:10px!important;bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important}

  /* Bath / after-bath */
  .chapter-day1 .bath-entry-whisper,.chapter-day1 .bath-repere,.chapter-day1 .wash-ready-card,.chapter-day1 .wash-step-card,.chapter-day1 .soak-rule,.chapter-day1 .afterbath-card,.chapter-day1 .afterbath-culture{
    left:10px!important;right:10px!important;width:auto!important;max-width:none!important;max-height:42svh!important;overflow:auto!important;
  }
  .chapter-day1 .bath-entry-whisper,.chapter-day1 .wash-ready-card,.chapter-day1 .wash-step-card,.chapter-day1 .afterbath-card{bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important}
  .chapter-day1 .bath-repere,.chapter-day1 .afterbath-culture{top:max(116px,15svh)!important;bottom:auto!important}
  .chapter-day1 .soak-rule{top:max(116px,15svh)!important;bottom:auto!important}.chapter-day1 .soak-rule h2{font-size:25px!important}
  .chapter-day1 .bath-step-5 .soak-rule{top:auto!important;bottom:max(78px,calc(env(safe-area-inset-bottom) + 70px))!important;max-height:20svh!important}
  .chapter-day1 .afterbath-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.chapter-day1 .afterbath-actions button{min-width:0!important;min-height:48px!important}

  /* Yukata / night */
  .chapter-day1 .yukata-guide-card{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important;max-height:30svh!important;overflow:auto!important}
  .chapter-day1 .yukata-done{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important}
  .chapter-day1 .night-whisper{left:12px!important;right:132px!important;bottom:max(12px,calc(env(safe-area-inset-bottom) + 7px))!important;max-width:none!important}.chapter-day1 .night-whisper p{font-size:17px!important}
  .chapter-day1 .night-passport-hotspot{right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:108px!important;height:70px!important}
}

/* ======================== DAY 2 ======================== */
@media (max-width:760px){
  .chapter-day2 .d2-story-panel,.chapter-day2 .d2-aoi-panel,.chapter-day2 .d2-shop-panel,.chapter-day2 .d2-ritual-panel,.chapter-day2 .d2-prayer-panel,
  .chapter-day2 .v72-shelf-sheet,.chapter-day2 .v72-basket-sheet,.chapter-day2 .v72-counter-card,.chapter-day2 .v73-basket-drawer,.chapter-day2 .v79-tanaka-dialogue,
  .chapter-day2 .v79-question-panel,.chapter-day2 .v79-answer-panel,.chapter-day2 .v79-farewell-panel,.chapter-day2 .v78-return-panel{
    left:10px!important;right:10px!important;width:auto!important;max-width:none!important;box-sizing:border-box!important;
  }
  .chapter-day2 .d2-story-panel,.chapter-day2 .d2-aoi-panel,.chapter-day2 .d2-ritual-panel,.chapter-day2 .d2-prayer-panel,.chapter-day2 .v72-counter-card,
  .chapter-day2 .v79-tanaka-dialogue,.chapter-day2 .v79-question-panel,.chapter-day2 .v79-answer-panel,.chapter-day2 .v79-farewell-panel,.chapter-day2 .v78-return-panel{
    bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:48svh!important;overflow:auto!important;padding:12px 13px!important;
  }
  .chapter-day2 .d2-story-panel h2{font-size:30px!important;line-height:1.03!important}.chapter-day2 .d2-story-panel p{font-size:12px!important;line-height:1.4!important}
  .chapter-day2 .d2-food-choices{grid-template-columns:1fr 1fr!important}.chapter-day2 .d2-food-choices button{min-width:0!important;min-height:48px!important;font-size:11px!important;padding:7px 8px!important}

  /* Aoi: no tiny copy / no cramped cards. */
  .chapter-day2 .d2-aoi-panel{max-height:50svh!important}.chapter-day2 .d2-aoi-meaning{font-size:16px!important}.chapter-day2 .d2-aoi-panel .d2-dialogue-choices{grid-template-columns:1fr!important}
  .chapter-day2 .d2-aoi-panel .d2-dialogue-choices button{min-height:48px!important}.chapter-day2 .d2-aoi-panel .d2-dialogue-choices b{font-size:12px!important}.chapter-day2 .d2-aoi-panel .d2-dialogue-choices span{font-size:10px!important}

  /* Konbini shelves/basket: sheets take the lower half, product names stay horizontal. */
  .chapter-day2 .v72-shelf-sheet,.chapter-day2 .v72-basket-sheet,.chapter-day2 .v73-basket-drawer{
    bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:55svh!important;overflow:auto!important;padding:12px!important;
  }
  .chapter-day2 .v72-shelf-products,.chapter-day2 .v73-product-grid{grid-template-columns:1fr 1fr!important;gap:6px!important}
  .chapter-day2 .v72-shelf-product,.chapter-day2 .v73-product-choice{min-width:0!important}.chapter-day2 .v73-product-choice b{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:11px!important;line-height:1.2!important}
  .chapter-day2 .v73-product-choice small{font-size:9px!important}.chapter-day2 .v73-product-choice strong{font-size:10px!important}
  .chapter-day2 .v73-basket-drawer footer{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important}.chapter-day2 .v73-checkout-go{min-height:46px!important;white-space:normal!important}

  /* Checkout V140 kept, with extra hardening. */
  .chapter-day2 .v73-payment-dock{max-height:46svh!important}.chapter-day2 .v73-pay-methods button{min-width:0!important}.chapter-day2 .v73-pay-methods b{white-space:normal!important}

  /* Shrine physical sequence. */
  .chapter-day2 .d2-physical-ritual,.chapter-day2 .d2-physical-prayer{max-width:none!important}.chapter-day2 .d2-gesture-action{min-height:66px!important;padding:11px 13px!important}.chapter-day2 .d2-gesture-action span{font-size:21px!important}.chapter-day2 .d2-gesture-action small{font-size:9px!important}
  .chapter-day2 .d2-offering-choices,.chapter-day2 .d2-wish-choices{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.chapter-day2 .d2-offering-choices button,.chapter-day2 .d2-wish-choices button{min-width:0!important;min-height:48px!important}
  .chapter-day2 .v86-shrine-discovery{left:10px!important;right:10px!important;width:auto!important;max-width:none!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:48svh!important;overflow:auto!important}

  /* Kawabata / Tanaka */
  .chapter-day2 .v78-arcade-caption{left:10px!important;right:10px!important;width:auto!important;top:max(116px,15svh)!important;padding:9px 11px!important}.chapter-day2 .v78-arcade-caption p{font-size:15px!important;line-height:1.3!important}
  .chapter-day2 .v78-arcade-walk{left:10px!important;right:10px!important;width:auto!important;max-width:none!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;min-height:48px!important}
  .chapter-day2 .v79-inspect-hint{top:max(112px,14svh)!important;left:12px!important;right:12px!important;width:auto!important}.chapter-day2 .v79-detail-hotspot{width:62px!important;height:62px!important}
  .chapter-day2 .v80-doll-story{padding-top:max(108px,14svh)!important;padding-left:10px!important;padding-right:10px!important;overflow:auto!important}.chapter-day2 .v80-doll-story-card{padding:12px 13px!important}.chapter-day2 .v80-doll-story-card>h2{font-size:28px!important}.chapter-day2 .v80-doll-story-copy p{font-size:12px!important}
}

/* ======================== DAY 3 ======================== */
@media (max-width:760px){
  .v104-d3-scene{overflow:hidden!important}
  .v104-d3-scene .v104-hud{top:max(108px,calc(env(safe-area-inset-top) + 98px))!important;left:12px!important;right:auto!important;transform:none!important;max-width:calc(100vw - 76px)!important;overflow:hidden!important}
  .v104-d3-scene .v104-hud span,.v104-d3-scene .v104-hud b{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .v104-d3-scene .v104-whisper,.v104-d3-scene .v104-dialogue-stack,.v104-d3-scene>.v104-dialogue,.v104-d3-scene .v104-optional-reply,.v104-d3-scene .v104-bill-flow,.v104-d3-scene .v104-cruise-ticket{
    left:10px!important;right:10px!important;width:auto!important;max-width:none!important;box-sizing:border-box!important;
  }
  .v104-d3-scene .v104-whisper{bottom:max(72px,calc(env(safe-area-inset-bottom) + 64px))!important;max-height:34svh!important;overflow:auto!important;padding:10px 11px!important}.v104-d3-scene .v104-whisper p{font-size:17px!important;line-height:1.28!important}
  .v104-d3-scene .v104-primary-action{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;width:auto!important;max-width:none!important;min-height:50px!important}
  .v104-d3-scene .v104-truth-note,.v104-d3-scene .v104-observation,.v104-d3-scene .v104-memory-chip{right:10px!important;max-width:calc(100vw - 20px)!important;font-size:10px!important}
  .v104-d3-scene .v104-culture-note{top:max(146px,18svh)!important;right:10px!important;width:min(240px,65vw)!important;max-height:34svh!important;overflow:auto!important}.v104-d3-scene .v104-culture-note p{font-size:10px!important}
  .v104-d3-scene .v104-dialogue-stack,.v104-d3-scene>.v104-dialogue{bottom:max(78px,calc(env(safe-area-inset-bottom) + 70px))!important;max-height:43svh!important;overflow:auto!important}
  .v104-d3-scene .v104-dialogue p{font-size:11px!important}.v104-d3-scene .v104-dialogue span{font-size:9px!important}.v104-d3-scene .v104-dialogue small{font-size:8px!important}
  .v104-d3-scene .v104-phrase>span,.v104-d3-scene .v104-phrase details{font-size:10px!important}
  .v104-d3-scene .v104-choice-row{left:10px!important;right:10px!important;bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.v104-d3-scene .v104-choice-row .v104-action{min-width:0!important;white-space:normal!important}
  .v104-d3-scene .v104-optional-reply{bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:45svh!important;overflow:auto!important}.v104-d3-scene .v104-optional-reply>div{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}

  /* Physical menu: readable two-column cards on phones, not one very tall skinny column. */
  .v104-d3-scene .v104-menu-object{left:8px!important;right:8px!important;top:max(108px,calc(env(safe-area-inset-top) + 98px))!important;bottom:max(8px,calc(env(safe-area-inset-bottom) + 5px))!important;width:auto!important;max-height:none!important;padding:14px 12px 12px!important;overflow:auto!important;border-radius:16px!important;transform:none!important}
  .v104-d3-scene .v104-menu-object header h3{font-size:25px!important}.v104-d3-scene .v104-menu-object header span{font-size:9px!important}
  .v104-d3-scene .v104-menu-list{grid-template-columns:1fr 1fr!important;gap:6px!important}.v104-d3-scene .v104-menu-list button{grid-template-columns:46px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:6px!important;padding:7px!important;min-width:0!important}.v104-d3-scene .v104-menu-list button img{grid-row:1/3;width:46px!important;height:44px!important}.v104-d3-scene .v104-menu-list button strong{grid-column:2!important;font-size:10px!important}
  .v104-d3-scene .v104-menu-drinks{grid-template-columns:1fr 1fr!important;gap:6px!important}.v104-d3-scene .v104-menu-drinks button{min-width:0!important;grid-template-columns:36px minmax(0,1fr) auto!important;align-items:center!important}.v104-d3-scene .v104-menu-drinks button b{font-size:10px!important}.v104-d3-scene .v104-menu-drinks button small{font-size:9px!important}

  .v104-d3-scene .v104-bill-flow{bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;grid-template-columns:1fr!important;max-height:52svh!important;overflow:auto!important}.v104-d3-scene .v104-bill-paper{grid-column:1!important;grid-row:auto!important;min-height:0!important;transform:none!important}.v104-d3-scene .v104-bill-flow .v104-action{width:100%!important}
  .v104-d3-scene .v104-cruise-ticket{bottom:max(10px,calc(env(safe-area-inset-bottom) + 6px))!important;max-height:45svh!important;overflow:auto!important}.v104-d3-scene .v104-cruise-ticket span{font-size:10px!important}

  /* Mei stays spatial, but her dialogue must never be squeezed between her body and screen edge. */
  .v104-d3-scene .v104-mei-presence>img{right:-6vw!important;bottom:max(58px,calc(env(safe-area-inset-bottom) + 50px))!important;width:min(40vw,170px)!important;max-height:44svh!important}
  .v104-d3-scene .v104-mei-presence>.v104-whisper{left:10px!important;right:30vw!important;bottom:max(78px,calc(env(safe-area-inset-bottom) + 70px))!important;width:auto!important;max-height:35svh!important;overflow:auto!important}.v104-d3-scene .v104-mei-presence>.v104-whisper p{font-size:16px!important}
}

@media (max-width:380px){
  .chapter-day1 .brand,.chapter-day2 .brand,.chapter-day3 .brand{max-width:160px!important}.chapter-day1 .brand small,.chapter-day2 .brand small,.chapter-day3 .brand small{display:none!important}
  .chapter-day1 .taxi-human-choice,.chapter-day1 .sato-human-choice,.chapter-day1 .meal-human-choice{grid-template-columns:1fr!important}
  .chapter-day2 .v72-shelf-products,.chapter-day2 .v73-product-grid{grid-template-columns:1fr!important}
  .v104-d3-scene .v104-menu-list,.v104-d3-scene .v104-menu-drinks{grid-template-columns:1fr!important}
  .v104-d3-scene .v104-mei-presence>.v104-whisper{right:27vw!important}
}

/* Desktop: prevent accidental HUD/panel collisions while preserving composed layouts. */
@media (min-width:761px){
  .chapter-day1 .machine-screen{max-height:72vh!important;overflow:auto!important}
  .chapter-day1 .metro-announcement,.chapter-day1 .taxi-address-panel,.chapter-day1 .sato-response,.chapter-day1 .meal-farewell-choice,.chapter-day1 .dish-tip,.chapter-day1 .afterbath-card{max-height:64vh!important;overflow:auto!important}
  .chapter-day2 .d2-story-panel,.chapter-day2 .d2-aoi-panel,.chapter-day2 .v72-shelf-sheet,.chapter-day2 .v72-basket-sheet,.chapter-day2 .v72-counter-card,.chapter-day2 .v73-basket-drawer,.chapter-day2 .v79-tanaka-dialogue,.chapter-day2 .v78-return-panel{max-height:72vh!important;overflow:auto!important}
  .v104-d3-scene .v104-menu-object{max-height:82vh!important;overflow:auto!important}
  .v104-d3-scene .v104-bill-flow{max-width:760px!important}
}

/* V141.1 · phone legibility floor. The experience is not a desktop squeezed into 360px. */
@media (max-width:760px){
  .chapter-day1 button:not(.journey-menu-trigger):not(.sound),
  .chapter-day2 button:not(.journey-menu-trigger):not(.sound),
  .chapter-day3 button:not(.journey-menu-trigger):not(.sound),
  .v104-d3-scene button{font-size:12px!important;line-height:1.25!important}
  .chapter-day1 button b,.chapter-day2 button b,.chapter-day3 button b,.v104-d3-scene button b,
  .chapter-day1 button strong,.chapter-day2 button strong,.chapter-day3 button strong,.v104-d3-scene button strong{font-size:12px!important;line-height:1.2!important}
  .chapter-day1 button small,.chapter-day2 button small,.chapter-day3 button small,.v104-d3-scene button small{font-size:10px!important;line-height:1.25!important}

  .chapter-day1 .machine-screen p,.chapter-day1 .gate-copy p,.chapter-day1 .genkan-copy p,
  .chapter-day1 .sato-response p,.chapter-day1 .meal-sato-whisper p,.chapter-day1 .meal-farewell-choice p,
  .chapter-day2 .d2-story-panel>p,.chapter-day2 .d2-aoi-beat,.chapter-day2 .d2-physical-copy,
  .chapter-day2 .v72-shelf-sheet p,.chapter-day2 .v72-basket-sheet p,.chapter-day2 .v72-counter-card p,
  .chapter-day2 .v79-tanaka-dialogue p,.chapter-day2 .v78-return-panel p{font-size:13px!important;line-height:1.42!important}

  .chapter-day2 .v73-cashier-dialogue p,.chapter-day2 .v73-cashier-dialogue summary{font-size:12px!important;line-height:1.35!important}
  .chapter-day2 .v73-response-pills b,.chapter-day2 .v73-pay-methods b,.chapter-day2 .v73-pay-action{font-size:12px!important}
  .chapter-day2 .v73-response-pills small{font-size:10px!important}
  .chapter-day2 .v73-pay-total b{font-size:19px!important}

  .v104-d3-scene .v104-dialogue p{font-size:14px!important;line-height:1.36!important}
  .v104-d3-scene .v104-dialogue span{font-size:11px!important;line-height:1.3!important}
  .v104-d3-scene .v104-dialogue small{font-size:10px!important}
  .v104-d3-scene .v104-phrase>span,.v104-d3-scene .v104-phrase details{font-size:11px!important;line-height:1.32!important}
  .v104-d3-scene .v104-menu-list button strong,.v104-d3-scene .v104-menu-drinks button b{font-size:12px!important}
  .v104-d3-scene .v104-menu-drinks button small{font-size:10px!important}
  .v104-d3-scene .v104-culture-note p{font-size:11px!important;line-height:1.35!important}
}

/* V141.2 · issues found by rendered QA harnesses. */
@media (max-width:760px){
  /* Some legacy machine rules still applied translate(-50%,-50%) after the V141 geometry. */
  .chapter-day1 .machine-screen{transform:none!important}
  .chapter-day1 .detail-slip>button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;display:grid!important;place-items:center!important}
  /* The yatai menu is modal: its own title replaces the tiny scene HUD while open. */
  .v104-d3-scene:has(.v104-menu-object) .v104-hud{display:none!important}
}
@media (min-width:761px){
  .chapter-day1 .detail-slip>button{min-width:44px!important;min-height:44px!important}
  .chapter-day2 .v73-pay-methods button{min-height:44px!important}
}

/* V141.3 · shuttle is a full-screen world layer, not a bottom card. */
@media (max-width:760px){
  .chapter-day1.d1-shuttle .shuttle-cinematic,
  .chapter-day1 .shuttle-cinematic{
    inset:0!important;left:0!important;right:0!important;top:0!important;bottom:0!important;
    width:auto!important;height:auto!important;max-height:none!important;padding:0!important;overflow:hidden!important;
  }
  .chapter-day1.d1-shuttle .shuttle-player-next,
  .chapter-day1 .shuttle-player-next{left:14px!important;right:14px!important;width:auto!important;bottom:max(14px,calc(env(safe-area-inset-bottom) + 10px))!important}
  .chapter-day1.d1-shuttle .shuttle-route-thread,
  .chapter-day1 .shuttle-route-thread{left:14px!important;right:14px!important;bottom:max(116px,calc(env(safe-area-inset-bottom) + 106px))!important}
  .chapter-day1.d1-shuttle .shuttle-cinematic>small,
  .chapter-day1 .shuttle-cinematic>small{left:14px!important;right:14px!important;bottom:max(76px,calc(env(safe-area-inset-bottom) + 68px))!important;line-height:1.3!important}
}

/* V141.4 · the full-screen Hakata-doll story has its own context label. */
.chapter-day2.d2-tanaka:has(.v80-doll-story) .scene-meta{display:none!important}
