/* Мобільний плеєр: дві горизонтальні панелі та керування в межах вікна. */
@media (max-width:899px) {
  html.mobile-horizontal:not(.static-mode) .story-scene {
    height:calc(100vh - 64px);
    height:calc(100dvh - 64px);
    min-height:0;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene,
  html.mobile-horizontal:not(.static-mode) .final-scene {
    grid-template-rows:auto minmax(0,1fr) auto;
  }
  html.mobile-horizontal:not(.static-mode) .scene-heading {
    min-height:0;
    padding:6px 12px;
    grid-template-columns:auto 1fr;
    gap:2px 10px;
  }
  html.mobile-horizontal:not(.static-mode) .scene-time { font-size:12px; grid-column:1; }
  html.mobile-horizontal:not(.static-mode) .scene-heading h2 {
    grid-column:2; font-size:19px; line-height:1.15; text-align:right;
  }
  html.mobile-horizontal:not(.static-mode) .scene-kicker { display:none; }
  html.mobile-horizontal:not(.static-mode) .scene-6 .scene-kicker {
    display:block; grid-column:1/-1; font-size:10px; margin:0; line-height:1.2;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .stage {
    display:grid; grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) minmax(0,1fr);
    overflow:hidden;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .side {
    position:relative; inset:auto; width:100%; height:100%; clip-path:none;
    min-height:0;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .panel-inner {
    position:relative; inset:auto; margin:0; width:100%; height:100%; min-height:0;
    padding:5px 10px !important;
    grid-template-rows:22px auto minmax(0,1fr) 28px;
    gap:3px;
  }
  html.mobile-horizontal:not(.static-mode) .side-label {
    min-height:22px; padding:2px 6px; font-size:12px; gap:5px;
    border-width:1px; box-shadow:none;
  }
  html.mobile-horizontal:not(.static-mode) .side-label .icon { width:13px; height:13px; }
  html.mobile-horizontal:not(.static-mode) .person-name { display:inline; font-size:11px; padding-left:5px; }
  /* Все реплики занимают одну ячейку: самая высокая заранее резервирует место.
     Скрытие и смена текста не меняют размер GIF; динамический --caption-space не используется. */
  html.mobile-horizontal:not(.static-mode) .compare-scene .caption-zone {
    display:grid; grid-template-columns:minmax(0,1fr); height:auto; padding-bottom:6px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .caption-zone > .caption {
    position:relative; inset:auto; grid-area:1 / 1; align-self:start;
  }
  html.mobile-horizontal:not(.static-mode) .caption {
    padding:5px 8px; font-size:14px; line-height:1.2; border-radius:10px; border-width:1px;
    max-height:none; box-shadow:0 2px 5px #14203220;
  }
  html.mobile-horizontal:not(.static-mode) .caption-speaker { font-size:11px; margin-bottom:2px; }
  html.mobile-horizontal:not(.static-mode) .caption small { font-size:12px; line-height:1.2; margin-top:3px; }
  html.mobile-horizontal:not(.static-mode) .caption--speech:after { width:7px; height:7px; bottom:-4px; }
  html.mobile-horizontal:not(.static-mode) .caption--thought:before { display:none; }
  html.mobile-horizontal:not(.static-mode) .caption--thought:after { width:6px; height:6px; bottom:-5px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .action-zone {
    margin:0; padding:0; min-height:0; overflow:hidden; border-radius:8px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .media-slot {
    position:absolute; inset:0; width:100%; height:100%;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .media-slot img,
  html.mobile-horizontal:not(.static-mode) .compare-scene .media-slot canvas {
    object-fit:cover; object-position:center 20%; border-radius:8px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .scene-divider {
    left:0; right:0; top:calc(50% - 1px); bottom:auto; width:100%; height:2px;
    box-shadow:none; background:#8A99AD;
    transform:none !important;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .work-meters {
    min-height:0; align-self:stretch; display:grid; grid-template-columns:1fr 1fr;
    grid-template-rows:18px 5px; column-gap:12px; row-gap:2px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .meter-label { font-size:11px; margin:0; gap:4px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .meter-label strong { font-size:14px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .work-meters > .meter-track { grid-column:1; grid-row:2; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .meter-track { height:5px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .free-meter {
    margin:0; display:grid; grid-column:2; grid-row:1/3; grid-template-rows:18px 5px;
    gap:2px; font-size:11px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .free-meter strong { font-size:12px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .center-caption-zone {
    top:calc(50% - 24px); left:12px; right:12px;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .ui-chip {
    left:auto; right:4px; bottom:4px; max-width:66%; padding:3px 5px;
    font-size:11px; line-height:1.15; border-width:1px; box-shadow:none;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .ui-stack { width:28%; top:4px; right:4px; gap:3px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .preview-card { min-height:28px; padding:2px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .preview-card i { margin:2px 0; height:2px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .preview-card .mini-picture { height:10px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .campaign-tree { width:34%; top:3px; right:3px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .campaign-tree span { font-size:10px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .toggle-list { width:38%; top:3px; right:3px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .toggle-row { font-size:10px; padding:2px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .generation-note { bottom:3px; left:auto; right:3px; max-width:58%; font-size:11px; padding:3px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .document-fly { top:3px; width:26px; height:30px; font-size:11px; }
  html.mobile-horizontal:not(.static-mode) .scene-footer {
    display:grid; grid-template-columns:1fr auto; gap:4px 8px;
    padding:4px 10px calc(6px + env(safe-area-inset-bottom));
  }
  html.mobile-horizontal:not(.static-mode) .scene-footer > .honest-note { display:none; }
  html.mobile-horizontal:not(.static-mode) .scene-controls { display:contents; }
  html.mobile-horizontal:not(.static-mode) .scene-secondary { grid-row:1; grid-column:1; margin:0; }
  html.mobile-horizontal:not(.static-mode) .scene-secondary button {
    min-height:28px; padding:3px 6px; font-size:11px; gap:4px; border-width:1px; box-shadow:none;
  }
  html.mobile-horizontal:not(.static-mode) .scene-secondary .icon { width:13px; height:13px; }
  html.mobile-horizontal:not(.static-mode) .scene-transport {
    grid-row:2; grid-column:1/-1; width:100%; margin:0; gap:8px;
  }
  html.mobile-horizontal:not(.static-mode) .scene-transport a { flex:1; min-width:0; min-height:44px; padding:6px; font-size:14px; }
  html.mobile-horizontal:not(.static-mode) .scene-transport .pause-motion { width:44px; height:44px; min-width:44px; min-height:44px; }
  html.mobile-horizontal:not(.static-mode) .mobile-scene-note { display:block; grid-row:1; grid-column:2; align-self:center; }
  html.mobile-horizontal:not(.static-mode) .mobile-scene-note summary { cursor:pointer; font-size:11px; padding:4px 0; }
  html.mobile-horizontal:not(.static-mode) .mobile-scene-note p {
    position:absolute; bottom:100%; left:8px; right:8px; padding:12px;
    border:1px solid #7588A8; border-radius:10px; background:#FFF; color:var(--ink); box-shadow:var(--shadow);
    font-size:13px; line-height:1.35; z-index:40;
  }
  html.mobile-horizontal:not(.static-mode) .day-clock {
    top:32px !important; left:auto; right:72px; transform:translateY(-50%); gap:0; z-index:101;
  }
  html.mobile-horizontal:not(.static-mode) .day-clock .clock-body { display:none; }
  html.mobile-horizontal:not(.static-mode) .day-clock .digital-time { font-size:14px; min-width:54px; padding:3px 5px; border-width:1px; }
  html.mobile-horizontal:not(.static-mode) .intro-copy { padding-top:14px; }
  html.mobile-horizontal:not(.static-mode) .eyebrow { font-size:11px; margin-bottom:10px; }
  html.mobile-horizontal:not(.static-mode) .intro-copy h1 { font-size:clamp(28px,8vw,42px); }
  html.mobile-horizontal:not(.static-mode) .intro-subtitle { font-size:15px; margin-top:10px; }
  html.mobile-horizontal:not(.static-mode) .intro-stage { top:30%; bottom:30%; }
  html.mobile-horizontal:not(.static-mode) .intro-person figcaption { font-size:12px; padding:5px; }
  html.mobile-horizontal:not(.static-mode) .intro-choices { bottom:66px; gap:6px; }
  html.mobile-horizontal:not(.static-mode) .intro-choices .button { min-height:40px; font-size:14px; padding:6px 10px; }
  html.mobile-horizontal:not(.static-mode) .intro-note { font-size:10px; line-height:1.3; bottom:20px; }
  html.mobile-horizontal:not(.static-mode) .final-results { top:6px; left:10px; right:10px; gap:8px; }
  html.mobile-horizontal:not(.static-mode) .result-card { padding:8px; font-size:13px; }
  html.mobile-horizontal:not(.static-mode) .result-card > span { font-size:11px; }
  html.mobile-horizontal:not(.static-mode) .result-card strong { font-size:18px; margin-top:4px; }
  html.mobile-horizontal:not(.static-mode) .result-card p { font-size:15px; margin:4px 0; }
  html.mobile-horizontal:not(.static-mode) .result-card .final-free { font-size:11px; margin-top:5px; }
  html.mobile-horizontal:not(.static-mode) .result-card .meter-track { height:5px; margin-top:4px; }
  html.mobile-horizontal:not(.static-mode) .meeting-media { top:165px; left:0; right:0; bottom:0; }
  html.mobile-horizontal:not(.static-mode) .final-captions { top:165px; left:10px; right:10px; }
  html.mobile-horizontal:not(.static-mode) .final-brand { top:8%; font-size:32px; }
  html.mobile-horizontal:not(.static-mode) .final-brand .brand-mark { width:40px; height:40px; }
  html.mobile-horizontal:not(.static-mode) .final-message { top:25%; left:16px; right:16px; }
  html.mobile-horizontal:not(.static-mode) .final-message p:first-child { font-size:20px; }
  html.mobile-horizontal:not(.static-mode) .final-message p:nth-child(2) { font-size:13px; margin:8px 0; }
  html.mobile-horizontal:not(.static-mode) .final-message .button { min-height:40px; padding:6px; font-size:13px; margin:3px 0; }
  html.mobile-horizontal:not(.static-mode) .final-portraits { height:24%; bottom:4px; }
  html.mobile-horizontal:not(.static-mode) .final-portraits img { height:100%; width:auto; }
}

@media (max-width:899px) and (max-height:700px) {
  html.mobile-horizontal:not(.static-mode) .scene-heading h2 { font-size:16px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .panel-inner {
    grid-template-rows:20px auto minmax(0,1fr) 22px; padding-block:3px !important; gap:2px;
  }
  html.mobile-horizontal:not(.static-mode) .side-label { min-height:20px; font-size:11px; }
  html.mobile-horizontal:not(.static-mode) .caption { font-size:13px; padding:4px 6px; }
  html.mobile-horizontal:not(.static-mode) .caption-speaker { display:none; }
  html.mobile-horizontal:not(.static-mode) .caption small { font-size:11px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .work-meters { grid-template-rows:15px 4px; gap:1px 8px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .free-meter { grid-template-rows:15px 4px; gap:1px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .meter-label strong { font-size:12px; }
  html.mobile-horizontal:not(.static-mode) .compare-scene .generation-note { font-size:10px; }
  html.mobile-horizontal:not(.static-mode) .scene-secondary button { min-height:24px; }
  html.mobile-horizontal:not(.static-mode) .scene-footer { padding-block:3px; gap:3px 8px; }
  html.mobile-horizontal:not(.static-mode) .final-message p:first-child { font-size:17px; }
  html.mobile-horizontal:not(.static-mode) .final-message { top:23%; }
  html.mobile-horizontal:not(.static-mode) .final-brand { font-size:28px; }
  html.mobile-horizontal:not(.static-mode) .final-portraits { height:18%; }
}

/* У повернутому телефоні дві широкі панелі використовують коротку висоту разом. */
@media (max-width:899px) and (max-height:500px) and (orientation:landscape) {
  html.mobile-horizontal:not(.static-mode) .compare-scene .stage {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr);
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .scene-divider {
    left:calc(50% - 1px); top:0; bottom:0; width:2px; height:100%;
  }
  html.mobile-horizontal:not(.static-mode) .compare-scene .center-caption-zone { top:8px; left:20%; right:20%; }
  html.mobile-horizontal:not(.static-mode) .intro-copy { width:50%; margin:0; padding:12px; }
  html.mobile-horizontal:not(.static-mode) .intro-copy h1 { font-size:28px; }
  html.mobile-horizontal:not(.static-mode) .intro-stage { left:50%; right:0; top:20px; bottom:65px; }
  html.mobile-horizontal:not(.static-mode) .intro-choices { left:12px; right:52%; bottom:60px; }
  html.mobile-horizontal:not(.static-mode) .intro-choices .button { font-size:12px; min-height:36px; }
  html.mobile-horizontal:not(.static-mode) .intro-note { bottom:18px; font-size:10px; }
  html.mobile-horizontal:not(.static-mode) .final-results { right:53%; }
  html.mobile-horizontal:not(.static-mode) .meeting-media { left:48%; top:0; }
  html.mobile-horizontal:not(.static-mode) .final-captions { left:48%; top:8px; }
  html.mobile-horizontal:not(.static-mode) .final-brand { left:0; right:62%; top:12%; font-size:26px; }
  html.mobile-horizontal:not(.static-mode) .final-message { top:6px; left:40%; right:12px; }
  html.mobile-horizontal:not(.static-mode) .final-message p:first-child { font-size:16px; }
  html.mobile-horizontal:not(.static-mode) .final-message p:nth-child(2) { font-size:12px; margin:6px 0; }
  html.mobile-horizontal:not(.static-mode) .final-message .button { min-height:34px; }
  html.mobile-horizontal:not(.static-mode) .final-portraits { left:4%; right:66%; height:40%; }
}
