/* Mobile layout — 08.10.2026. Loaded last: on phones every film scene shows the
   full illustration on top and keeps the text below it instead of over it. */
@media(max-width:600px){
  :root{--m-hud:56px;--m-picture:calc(100vw * 0.566);--m-picture-wide:calc(100vw * 0.665)}

  /* Header and film HUD in one row */
  header{height:62px;padding-inline:14px}
  header .brand{width:104px}
  header nav{flex-wrap:nowrap;max-width:none;gap:9px}
  header nav a,header nav button{font-size:11px;padding:6px 0;white-space:nowrap}
  #shortcut{max-width:none;line-height:1.3}
  .film-hud{top:10px;left:14px;right:14px;align-items:flex-start}
  .film-brand img{width:96px}
  .film-brand>span{font-size:8px}
  .film-hud>div{max-width:none;flex-wrap:nowrap;gap:9px}
  .film-hud>div button{font-size:11px;padding:4px 0;white-space:nowrap}

  /* Film and hug: picture on top, fully visible */
  .film .film-picture img,.film .film-picture video,
  .film.has-dialogue #meeting-image,.film.has-dialogue #answer-world{
    top:var(--m-hud);height:var(--m-picture);object-fit:contain;object-position:center top;transform-origin:center top}
  .film-picture:before{background:var(--paper)}
  .film-vignette,.film.has-dialogue .film-vignette{background:none}
  .film-caption,.hug-caption{top:calc(var(--m-picture) + var(--m-hud) + 18px);left:20px;right:20px}
  .film-caption h2{font-size:40px}
  .film-caption p{font-size:16px;margin:14px auto}
  .film-dialogue,.film-dialogue[data-question]{
    top:calc(var(--m-picture) + var(--m-hud) + 8px);bottom:58px;height:auto;max-height:none;left:12px;right:12px}
  .film-dialogue[data-question="-1"]{bottom:58px}
  .film-dialogue,.film-dialogue[data-question]{display:flex;flex-direction:column;overflow:visible;padding-bottom:10px}
  .film-dialogue .question-bubble{flex:none;margin-bottom:6px}
  .film-dialogue .answers{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:3px 8px 10px;scrollbar-width:thin;scrollbar-color:#9c826a transparent}
  .film-dialogue .question-actions{flex:none}
  .film-dialogue[data-question="-1"] .answers{display:none}
  .film-bottom{bottom:12px;left:14px;right:14px}
  .film-bottom p{max-width:190px;font-size:12px}
  .hug-caption h2{font-size:40px}
  .hug-caption p{font-size:17px}
  .promise-scene{top:calc(var(--m-picture) + var(--m-hud) + 8px);bottom:auto;left:16px;right:16px;padding:22px 20px;background:#f5f1e7f2}
  .promise-scene h2{font-size:38px}

  /* Chapters: illustration sits at the bottom, text stays in the top half */
  #world-stage>img{top:auto;bottom:0;height:var(--m-picture-wide);object-fit:contain;object-position:center bottom}
  #world-stage>img[src*="/g2-"]{height:calc(100vw * 0.4)}
  .world-shade{background:linear-gradient(var(--paper) 0,var(--paper) calc(100dvh - var(--m-picture-wide) - 10px),transparent calc(100dvh - var(--m-picture-wide) + 30px))}
  #journey .chapter-copy,#money .chapter-copy{top:16px;padding:0 0 10px;max-height:calc(100dvh - var(--m-picture-wide) - 30px);overflow:visible}
  #money .chapter-copy{max-height:none}
  #journey .chapter-copy h2{font-size:36px}
  #journey .chapter-copy p{font-size:15px;line-height:1.55;margin-top:12px}
  #journey .chapter-copy .eyebrow{margin-bottom:10px;font-size:11px}
  #money .chapter-copy h2{font-size:34px}
  #money .chapter-copy>p:not(.echo){font-size:14px}
  .income-paths{margin-top:10px}
  .income-paths li{padding:7px 0}
  .income-paths b{font-size:14px}
  .income-paths span{font-size:13px;line-height:1.4}

  /* Postcard image keeps its full frame */
  .point-b-art>#postcard-image{height:auto;aspect-ratio:1600/1063;object-fit:cover}
  .point-b-art #point-b-meeting{height:120px;width:46%;bottom:38px}

  /* Day film: short title above the picture, captions below it */
  .day-film .film-picture img,.day-film .film-picture video{top:118px;height:var(--m-picture-wide);object-fit:contain;object-position:center top}
  .day-vignette{background:none}
  .day-film-title{top:14px;left:20px;right:20px}
  .day-film-title .eyebrow{font-size:11px;margin-bottom:8px}
  .day-film-title h2{font-size:30px;line-height:1.1}
  .day-film-title p{display:none}
  .day-caption{top:calc(var(--m-picture-wide) + 136px);bottom:auto;left:20px;right:20px}
  .day-caption>span{font-size:18px;margin-bottom:10px}
  .day-caption h3{font-size:32px;max-width:none}
  .day-caption p{font-size:16px;max-width:none}
  .day-bottom{bottom:12px;left:20px;right:20px}
  .day-coda .film-picture img,.day-coda .film-picture video{top:var(--m-hud);height:var(--m-picture);object-fit:contain;object-position:center top}
  .coda-shade{background:none}
  .coda-dialogue{top:calc(var(--m-picture) + var(--m-hud) + 18px);left:20px;right:20px}
  .coda-line p{font-size:28px}
  .coda-adult p{font-size:26px}
  .coda-heart p{font-size:34px}

  /* Finale: text above, picture below */
  #final-poster,.finale #final-video,.finale #final-poster{top:auto;bottom:0;height:48svh;object-fit:contain;object-position:center bottom}
  .finale .film-stage:after{background:none}
  .finale .scene-copy{top:24px}
  .finale .scene-copy h2{font-size:44px}

  /* Hero background lighter on phones */
  .hero-landscape{background-image:url('assets/img/m/00-fon-doroga.webp')}

  /* Tariffs: one card opens at a time */
  .tariff-comparison-panel{display:none!important}
  .plan-mobile-list{margin:18px 0 0;padding:18px 0 0;border-top:1px solid #b9a78466}
  .plan-mobile-list ul{list-style:none;margin:0;padding:0}
  .plan-mobile-list li{padding:9px 0;border-bottom:1px dashed #b9a78466;font-size:15px;line-height:1.5}
  .plan-mobile-list li:last-child{border-bottom:0}
  .plan-mobile-list b{display:block;font-weight:700}
  .plan-mobile-list span{display:block;color:#5c5f52;margin-top:2px}
  .plan-mobile-list li.is-off{opacity:.55}
  .price.pro .plan-mobile-list span,.price.pro .plan-mobile-list li.is-off{color:inherit;opacity:1}
  .price.pro .plan-mobile-list li.is-off{opacity:.6}
}
/* Short phones (iPhone SE/8 and similar): smaller picture box and tighter text */
@media(max-width:600px) and (max-height:720px){
  :root{--m-picture:22svh;--m-picture-wide:26svh}
  .film-dialogue,.film-dialogue[data-question]{bottom:44px}
  .film-dialogue .question-bubble{padding:14px 16px 16px}
  .film-dialogue h2,.film-dialogue[data-question="-1"] h2{font-size:25px}
  .film-dialogue #question-intro,.film-dialogue[data-question="-1"] #question-intro{font-size:13px;line-height:1.45;margin-top:8px}
  .film-dialogue .dialogue-label{font-size:12px;margin:6px 0 4px}
  .film-dialogue .intro-memory,.film-dialogue[data-question="-1"] .intro-memory{font-size:14px;margin:6px 0 10px;padding-bottom:10px}
  .film-dialogue .eyebrow{font-size:10px;margin-bottom:4px}
  .film-dialogue .answer{font-size:14px;min-height:44px;padding-block:7px}
  .film-dialogue .reaction{font-size:13px;margin-top:8px}
  .film-continue{font-size:14px;padding:9px 0}
  .film-bottom{bottom:8px}
  .film-caption h2,.hug-caption h2{font-size:34px}
  .promise-scene{padding:16px 18px}.promise-scene h2{font-size:32px}.promise-scene p{font-size:14px;margin-top:10px}.promise-scene .button{margin-top:14px;min-height:44px}
  #journey .chapter-copy h2{font-size:30px}
  #journey .chapter-copy p{font-size:14px;line-height:1.5}
  #money .chapter-copy .echo,#money .chapter-copy small{display:none}
  #world-stage>img[src*="/g2-"]{height:calc(100vw * 0.34)}
  #money .chapter-copy h2{font-size:28px}
  .income-paths li{padding:5px 0}.income-paths b{font-size:13px}.income-paths span{font-size:12px}
  .day-film-title h2{font-size:26px}
  .day-caption h3{font-size:26px}.day-caption p{font-size:14px}
  .coda-line p{font-size:24px}.coda-adult p{font-size:22px}.coda-heart p{font-size:28px}
}

/* 09.10: in-app browsers (Telegram, Max) report a short svh — the stage stopped
   above the real screen bottom. Stage follows the visible viewport, and while the
   questions are on screen the picture gets smaller so the answers have room. */
@media(max-width:600px) and (prefers-reduced-motion:no-preference){
  .film-stage{height:100svh;height:100dvh}
}
@media(max-width:600px){
  .film.has-dialogue,.film:has(#conversation:not([hidden])){--m-picture:calc(100vw * 0.46)}
  #meeting-image,#hug-poster,#answer-world{transform:none!important}
  .film .film-picture img,.film .film-picture video{transition:height .5s,opacity .6s}
  .film-dialogue .question-bubble,.film-dialogue[data-question="-1"] .question-bubble,.film-dialogue[data-question="4"] .question-bubble{padding:14px 18px 16px;margin-bottom:6px}
  .film-dialogue .question-top{margin-bottom:2px}
  .film-dialogue .dialogue-label{font-size:13px;margin:6px 0 4px}
  .film-dialogue h2,.film-dialogue[data-question="-1"] h2{font-size:27px;line-height:1.12}
  .film-dialogue #question-intro,.film-dialogue[data-question="-1"] #question-intro{font-size:14px;line-height:1.45;margin-top:8px}
  .film-dialogue[data-question="-1"] .intro-memory{font-size:15px;line-height:1.5;margin:6px 0 10px;padding-bottom:10px}
  .film-dialogue .answers{display:flex;flex-direction:column;gap:6px;padding-top:4px}
  .film-dialogue .answers>*{flex:none}
  .film-dialogue .answer,.film-dialogue[data-question="4"] .answer{font-size:15px;line-height:1.4;min-height:50px;padding-block:8px 10px}
  .film-dialogue .question-actions{margin-top:6px}
  .film-dialogue .reaction{font-size:14px;line-height:1.4;margin-top:6px}
}
@media(max-width:600px) and (max-height:720px){
  .film.has-dialogue,.film:has(#conversation:not([hidden])){--m-picture:calc(100vw * 0.36)}
  .film-dialogue h2,.film-dialogue[data-question="-1"] h2{font-size:23px}
  .film-dialogue #question-intro,.film-dialogue[data-question="-1"] #question-intro{font-size:13px}
  .film-dialogue .answer,.film-dialogue[data-question="4"] .answer{font-size:14px;min-height:44px;padding-block:6px 8px}
}

/* 09.10: while a question is open the chapter label and scroll hint step aside,
   the card reaches down to the bottom edge. */
@media(max-width:600px){
  .film:has(#conversation:not([hidden])) .film-bottom{display:none}
  .film-dialogue,.film-dialogue[data-question],.film-dialogue[data-question="-1"]{bottom:12px}
  .film-dialogue .question-actions{margin-top:4px;padding-top:4px}
  .film-dialogue .reaction{margin-top:2px;min-height:0}
  .film-dialogue .reaction:empty{display:none}
}
