/* v72: portrait layouts; leave desktop compositions intact. */
@media(max-width:740px){
html{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body[data-mobile-scene]{display:block!important;min-height:100svh!important;overflow-x:hidden!important;touch-action:pan-y}
body[data-mobile-scene] button,body[data-mobile-scene] .btn,body[data-mobile-scene] a.btn{min-height:46px;touch-action:manipulation}
body[data-mobile-scene] .stage,body[data-mobile-scene] .scene,body[data-mobile-scene] .wrap{width:100%!important;min-width:0!important;max-width:100%!important;border:0!important;border-radius:0!important;max-height:none!important}
/* Invitation: readable text in a flowing paper card. */
body[data-mobile-scene="1"] .stage{height:auto!important;min-height:100svh!important;aspect-ratio:auto!important;padding:0!important}
body[data-mobile-scene="1"] #opening{height:max(640px,100svh)!important;min-height:0!important;aspect-ratio:auto!important}
body[data-mobile-scene="1"] .title-art{width:94%;top:65px}
body[data-mobile-scene="1"] .envelope-wrap{width:92%;top:59%}
body[data-mobile-scene="1"] .hint{width:88%;bottom:30px;line-height:1.5;font-size:15px}
body[data-mobile-scene="1"] .stage:has(#letter:not([hidden])) #opening{display:none!important}
body[data-mobile-scene="1"] .letter-screen{position:relative;inset:auto;min-height:100svh;padding:72px 14px 24px}
body[data-mobile-scene="1"] .letter-panel{display:block;width:100%;max-height:none;transform:none;animation:none;border:4px double #b98a52;border-radius:20px;background:radial-gradient(#fff9e8,#e9d1ae);box-shadow:0 12px 32px #0007;padding:25px 18px}
body[data-mobile-scene="1"] .letter-bg{display:none}
body[data-mobile-scene="1"] .letter-copy{position:relative;inset:auto;padding:0;overflow:visible}
body[data-mobile-scene="1"] .letter-copy p{font-size:18px;line-height:1.5;max-width:100%;margin:0 0 14px}
body[data-mobile-scene="1"] .sign{margin:8px 0 18px auto}
body[data-mobile-scene="1"] .cta{font-size:18px;width:100%;padding:13px 12px;margin-top:6px}
/* Opening dialogue: actors above a card that grows with the text. */
body[data-mobile-scene="2"] .stage{aspect-ratio:auto!important;min-height:100svh!important;padding:310px 14px 24px}
body[data-mobile-scene="2"] #harbu{top:58px!important;bottom:auto!important;left:3%!important;width:57%!important;height:240px!important}
body[data-mobile-scene="2"] #shurh{top:117px!important;bottom:auto!important;left:auto!important;right:0!important;width:43%!important;height:180px!important}
body[data-mobile-scene="2"] .dialog,body[data-mobile-scene="2"] .dialog.shurh-talk{position:relative;left:auto;top:auto;bottom:auto;width:100%;min-height:0;max-height:none;overflow:visible;padding:62px 18px 22px}
body[data-mobile-scene="2"] .dialog .line{font-size:19px!important;line-height:1.5!important}
/* Courses: scrolling cards rather than a cropped fixed-height canvas. */
body[data-mobile-scene].course .scene,body[data-mobile-scene].course .scene:has(.fact){display:flex;flex-direction:column;gap:16px;aspect-ratio:auto!important;height:auto!important;min-height:100svh!important;padding:270px 12px 24px!important;overflow:hidden}
body[data-mobile-scene].course #harbu,body[data-mobile-scene].course .scene.clue-mode #harbu,body[data-mobile-scene].course #harbu.fact-pose{top:55px!important;bottom:auto!important;left:3%!important;right:auto!important;width:59%!important;height:205px!important;object-position:bottom center}
body[data-mobile-scene].course #shurh,body[data-mobile-scene].course .scene.clue-mode #shurh{top:97px!important;bottom:auto!important;left:auto!important;right:1%!important;width:43%!important;height:160px!important;object-position:bottom center}
body[data-mobile-scene].course .quiz,body[data-mobile-scene].course .quiz:has(.fact){position:relative!important;inset:auto!important;order:2;width:100%!important;height:auto!important;max-height:none!important;padding:22px 18px!important;overflow:visible!important;flex:none;transform:none!important}
body[data-mobile-scene].course .quiz h2{font-size:25px!important;line-height:1.2}
body[data-mobile-scene].course .food,body[data-mobile-scene].course .quiz:has(.fact) .food{height:180px!important;flex-shrink:0}
body[data-mobile-scene].course .drink-wrap,body[data-mobile-scene].course .quiz:has(.fact) .drink-wrap{height:210px!important;min-height:210px!important}
body[data-mobile-scene].course .drink-wrap .food{height:100%!important}
body[data-mobile-scene].course .question{font-size:18px!important;line-height:1.45!important}
body[data-mobile-scene].course .choice{font-size:17px!important;line-height:1.4!important;padding:13px 12px!important}
body[data-mobile-scene].course .quiz:after{display:none!important}
body[data-mobile-scene].course .fact{font-size:18px!important;line-height:1.5!important;margin-top:18px!important}
body[data-mobile-scene].course .fact p{margin-bottom:14px!important}
body[data-mobile-scene].course .action{font-size:17px!important;line-height:1.35;width:100%;margin-top:18px!important}
body[data-mobile-scene].course .feedback,body[data-mobile-scene].course .scene.clue-mode .feedback{position:relative!important;inset:auto!important;order:1;width:100%!important;max-height:none!important;overflow:visible!important;transform:none!important;padding:60px 18px 20px!important}
body[data-mobile-scene].course .feedback p{font-size:18px!important;line-height:1.5!important}
/* Search: preserve the entire map and use its bounds for touch coordinates. */
body[data-mobile-scene="7"] .wrap{overflow:visible!important;touch-action:pan-y!important}
body[data-mobile-scene="7"] .wrap>.stage{width:100%!important;min-width:0!important;aspect-ratio:auto!important;min-height:100svh!important;height:auto!important;padding-top:calc(100vw * 941 / 1672 + 95px);padding-bottom:22px}
body[data-mobile-scene="7"] .bg,body[data-mobile-scene="7"] .dark,body[data-mobile-scene="7"] #hotspots{position:absolute;inset:auto 0 auto 0;top:85px;width:100%;height:auto;aspect-ratio:1672/941}
body[data-mobile-scene="7"] #hotspots{z-index:4;touch-action:none}
body[data-mobile-scene="7"] .bg{background-size:100% 100%!important}
body[data-mobile-scene="7"] .hot{min-height:44px;min-width:44px;touch-action:none}
body[data-mobile-scene="7"] .hot::before{inset:0}
body[data-mobile-scene="7"] .help{top:10px;left:12px;right:100px;max-width:none;font-size:13px;line-height:1.35;padding:9px 11px}
body[data-mobile-scene="7"] #speech{position:relative;inset:auto;transform:none;width:calc(100% - 24px);min-width:0;max-height:none;margin:12px;overflow:visible}
body[data-mobile-scene="7"] .finale,body[data-mobile-scene="7"] .compliment{position:relative;inset:auto;min-height:100svh;padding:315px 12px 24px}
body[data-mobile-scene="7"] .stage:has(.finale:not([hidden])),body[data-mobile-scene="7"] .stage:has(.compliment:not([hidden])),body[data-mobile-scene="7"] .stage:has(.gifts:not([hidden])){padding:0!important}
body[data-mobile-scene="7"] .stage:has(.finale:not([hidden]))>.help,body[data-mobile-scene="7"] .stage:has(.compliment:not([hidden]))>.help,body[data-mobile-scene="7"] .stage:has(.gifts:not([hidden]))>.help{display:none}
body[data-mobile-scene="7"] #finalHarbu{top:60px!important;bottom:auto!important;left:0!important;width:60%!important;height:245px!important}
body[data-mobile-scene="7"] #finalShurh{top:112px!important;bottom:auto!important;right:0!important;width:44%!important;height:190px!important}
body[data-mobile-scene="7"] .finale .speech,body[data-mobile-scene="7"] .compliment .speech{position:relative;inset:auto;transform:none;width:100%;min-width:0;max-height:none;overflow:visible;padding:62px 18px 22px}
body[data-mobile-scene="7"] .speech .line,body[data-mobile-scene="7"] .speech p{font-size:19px!important;line-height:1.5!important}
body[data-mobile-scene="7"] .compliment .portrait{top:25px;bottom:auto;left:0;width:100%;height:290px}
body[data-mobile-scene="7"] .gifts{position:relative;inset:auto;padding:76px 14px 24px;min-height:100svh;overflow:visible}
body[data-mobile-scene="7"] .giftcards{grid-template-columns:1fr;gap:24px;margin-top:20px}
body[data-mobile-scene="7"] .giftwrap{min-height:0;padding-top:125px}
body[data-mobile-scene="7"] .gift{min-height:0;height:auto;padding:25px 18px 20px}
body[data-mobile-scene="7"] .gift p{font-size:17px;line-height:1.5;margin-bottom:12px}
body[data-mobile-scene="7"] .giftfigure.harbu{width:49%;top:-5px;left:0}
body[data-mobile-scene="7"] .giftfigure.shurh{width:38%;top:-5px;right:4%}
body[data-mobile-scene="7"] .giftfigure img{max-height:160px}
body[data-mobile-scene="7"] .gifts h2{font-size:25px;line-height:1.25}
body[data-mobile-scene="7"] .giftsub{font-size:19px;line-height:1.45}
body[data-mobile-scene="7"] .gifts::before{display:none}
}
