/* Рамка презентації та дві історії всередині одного дня. */
.topbar {
  position:fixed;
  inset:0 0 auto;
  z-index:100;
  height:var(--header);
  display:flex;
  align-items:center;
  gap:24px;
  padding:0 28px;
  background:var(--brand-700);
  color:white;
  box-shadow:0 3px 16px #172D5040;
  border-bottom:2px solid #426DB5
}

.wordmark {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:23px;
  letter-spacing:-.055em;
  font-weight:800;
  white-space:nowrap
}

.brand-mark {
  display:block;
  flex:none;
  width:40px;
  height:40px;
  object-fit:contain
}

.static-mode .brand-mark,
.no-js .brand-mark {
  content:url("../../assets/brand/selltiva.png")
}

.steps-nav {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex:1
}

.steps-nav a {
  min-height:48px;
  padding:8px 9px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color:#D8E5FB;
  font-size:16px;
  font-weight:700;
  white-space:nowrap;
  border:2px solid transparent
}

.steps-nav a i {
  display:none;
  font-style:normal
}

.steps-nav a[aria-current=step] {
  background:white;
  color:var(--brand-700);
  border-color:#C9D9F0;
  box-shadow:var(--soft-shadow)
}

.top-actions {
  display:flex;
  gap:10px;
  align-items:center
}

.try-button {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:46px;
  border:2px solid #B2C7E8;
  border-radius:12px;
  padding:9px 14px;
  background:white;
  color:var(--brand-700);
  font-weight:800;
  font-size:16px;
  box-shadow:var(--soft-shadow)
}

.try-button .icon {
  width:18px
}

.skip-motion {
  min-height:48px;
  border:0;
  background:transparent;
  color:white;
  font-weight:600;
  font-size:16px;
  padding:4px 8px;
  max-width:150px;
  line-height:1.25
}

.mobile-nav .skip-motion {
  color:var(--brand-700);
  max-width:none;
  width:100%;
  text-align:left
}

.motion-paused *, .motion-paused *:before, .motion-paused *:after {
  animation-play-state:paused!important
}

.no-js .pause-motion {
  display:none
}

.menu-toggle {
  display:none;
  background:#315DA6;
  border:2px solid #91B3E5;
  border-radius:12px;
  min-width:48px;
  min-height:48px;
  color:white
}

.mobile-nav {
  position:fixed;
  top:64px;
  left:0;
  right:0;
  z-index:99;
  background:var(--brand-700);
  color:white;
  padding:12px 20px;
  box-shadow:var(--shadow);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}

.mobile-nav a {
  padding:10px 12px;
  min-height:48px;
  border:2px solid #688DC6;
  border-radius:10px;
  font-size:16px
}

.mobile-nav a[aria-current=step] {
  background:#FFF;
  color:var(--brand-700)
}

/* Нижний блок аккаунта показываем только на телефоне; короткое окно допускает прокрутку меню. */
.mobile-account-actions { display:none; }
@media (max-width:899px) {
  .mobile-nav { max-height:calc(100dvh - 64px); overflow-y:auto; }
  .mobile-account-actions {
    grid-column:1 / -1;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:8px;
    padding-top:12px;
    border-top:1px solid #688DC6;
  }
  .mobile-account-actions a { flex:1 1 150px; text-align:center; }
  .mobile-account-actions .mobile-account-primary { background:#FFF; color:var(--brand-700); }
}

main {
  padding-top:var(--header)
}

.story-scene {
  height:calc(100vh - var(--header));
  height:calc(100svh - var(--header));
  min-height:650px;
  position:relative;
  isolation:isolate;
  scroll-margin-top:64px
}

.compare-scene {
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:linear-gradient(90deg,var(--l-bg) 50%,var(--r-bg) 50%)
}

.scene-heading {
  min-height:108px;
  max-width:1600px;
  width:100%;
  margin:auto;
  display:grid;
  grid-template-columns:180px 1fr 220px;
  align-items:center;
  gap:24px;
  padding:25px 38px 22px;
  position:relative;
  z-index:6;
  border-bottom:2px solid #53677D24
}

.scene-heading h2 {
  font-size:clamp(30px,3.4vw,54px);
  text-align:center
}

.scene-time {
  font-size:clamp(22px,2.1vw,32px);
  font-weight:800;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.05em
}

.scene-kicker {
  font-size:16px;
  line-height:1.4;
  color:var(--ink-soft);
  font-weight:700;
  text-align:right
}

.stage {
  width:100%;
  max-width:1600px;
  margin:auto;
  min-height:0;
  height:100%;
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  perspective:1200px
}

.side {
  min-width:0;
  position:relative
}

.side--left {
  background:linear-gradient(145deg,var(--l-bg),var(--l-bg-end))
}

.side--right {
  background:linear-gradient(155deg,var(--r-bg),var(--r-bg-end))
}

.panel-inner {
  height:100%;
  position:relative;
  display:grid;
  grid-template-rows:36px minmax(96px,18%) minmax(0,1fr) 86px;
  gap:10px;
  padding:18px 38px 14px
}

.side--left .panel-inner {
  padding-right:60px
}

.side--right .panel-inner {
  padding-left:60px
}

.side-label {
  display:flex;
  align-items:center;
  gap:9px;
  justify-self:start;
  min-height:36px;
  padding:5px 12px;
  border:2px solid #7F8DA1;
  background:#EAF0F6;
  border-radius:9px;
  box-shadow:var(--soft-shadow);
  font-size:16px;
  font-weight:800;
  line-height:1.1;
  white-space:nowrap
}

.side-label .icon {
  width:18px;
  height:18px
}

.side--right .side-label {
  background:var(--brand-700);
  color:white;
  border-color:#173C81;
  border-right:5px solid var(--r-accent)
}

.person-name {
  font-size:16px;
  font-weight:600;
  padding-left:9px;
  border-left:1px solid currentColor;
  opacity:.85
}

.action-zone {
  position:relative;
  min-height:0;
  min-width:0;
  display:grid;
  place-items:center;
  margin-inline:-22px
}

.media-slot {
  height:100%;
  width:100%;
  position:relative;
  display:grid;
  place-items:center;
  min-height:0
}

.media-slot img,.media-slot canvas {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  max-width:100%;
  max-height:100%;
  border-radius:22px
}

.media-slot canvas {
  object-fit:contain
}

.media-slot .movie-media {
  position:absolute;
  inset:0
}

.media-slot .poster {
  opacity:1
}

.media-slot.is-playing .poster {
  visibility:hidden
}

.scene-divider {
  position:absolute;
  z-index:10;
  left:calc(50% - 3px);
  top:0;
  bottom:0;
  width:6px;
  pointer-events:none;
  background:linear-gradient(0deg,var(--brand-500),#FFF 55%,var(--brand-500));
  box-shadow:0 0 15px #FFFFFFB3,0 0 28px #3F7BE066;
  transform-origin:bottom
}

.work-meters {
  position:relative;
  align-self:end;
  min-height:78px;
  z-index:3
}

.meter-label {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:16px;
  line-height:1.25;
  align-items:baseline;
  margin-bottom:7px
}

.meter-label strong {
  font-size:clamp(22px,2.2vw,34px);
  line-height:1;
  font-weight:800;
  white-space:nowrap;
  font-variant-numeric:tabular-nums
}

.meter-track {
  height:11px;
  background:#FFF8;
  border:2px solid #6F7D91;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 2px 4px #14203218
}

.meter-track i {
  display:block;
  width:100%;
  height:100%;
  background:var(--l-time);
  transform:scaleX(0);
  transform-origin:left
}

.meter-aside {
  font-size:16px;
  color:var(--ink-soft);
  margin-top:10px
}

.free-meter {
  margin-top:8px;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:center;
  font-size:16px;
  line-height:1.2
}

.free-meter .meter-track {
  height:9px
}

.free-meter .meter-track i {
  background:var(--r-ok)
}

.scene-footer {
  width:100%;
  max-width:1600px;
  margin:auto;
  position:relative;
  z-index:15;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding:17px 38px 18px;
  background:#F8FAFD;
  border-top:2px solid #7B8BA63A
}

.scene-footer .honest-note {
  max-width:750px
}

.scene-controls {
  display:flex;
  gap:24px;
  align-items:center;
  flex:none
}

.scene-controls button,.next-scene,.back-scene {
  min-height:48px;
  padding:8px 13px;
  border:2px solid #7588A8;
  border-radius:11px;
  background:#FFF;
  box-shadow:var(--soft-shadow);
  font-size:16px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px
}

.scene-controls .icon {
  width:19px;
  height:19px
}

.next-scene,.back-scene {
  background:var(--brand-700);
  color:#FFF;
  border-color:#1B3B70;
  min-width:108px
}

.scene-secondary,.scene-transport {
  display:flex;
  align-items:center;
  gap:8px
}

.scene-transport { flex:none }

.scene-controls .pause-motion {
  width:48px;
  height:48px;
  min-width:48px;
  padding:0;
  flex:none;
  color:var(--brand-700)
}

.pause-motion .play-symbol,
.pause-motion[data-playback="play"] .pause-symbol {
  display:none
}

.pause-motion[data-playback="play"] .play-symbol {
  display:block
}

.mobile-scene-note { display:none }

.repeat-scene {
  display:none!important
}

.scene-complete .repeat-scene {
  display:flex!important
}

.scene-complete .finish-scene {
  display:none
}

.next-scene.is-ready .icon {
  animation:next-nudge 1.5s ease-in-out infinite
}

@keyframes next-nudge {
  50% {
    transform:translateY(4px)
  }

}

.compare-scene>.transcript,.final-scene>.transcript {
  display:none
}

.day-clock {
  position:fixed;
  z-index:35;
  left:50%;
  top:var(--clock-top);
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  pointer-events:none;
  filter:drop-shadow(0 10px 12px #1B253333)
}

.clock-body {
  width:min(22vh,220px);
  height:min(22vh,220px);
  position:relative
}

.clock-face {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible
}

.clock-face--left {
  clip-path:polygon(0 0,50% 0,50% 100%,0 100%)
}

.clock-face--right {
  clip-path:polygon(50% 0,100% 0,100% 100%,50% 100%)
}

.clock-face--left .clock-dial {
  fill:var(--l-surface)
}

.clock-face--right .clock-dial {
  fill:#FFF9E9
}

.clock-mark {
  stroke:#42516B;
  stroke-width:3
}

.clock-face--right .clock-mark {
  stroke:#AA6428
}

.clock-numbers {
  font:800 23px var(--font);
  fill:#334257;
  text-anchor:middle
}

.hour-hand,.minute-hand {
  transform-origin:100px 100px;
  stroke:#374150;
  stroke-linecap:round;
  stroke-width:9
}

.minute-hand {
  stroke-width:5
}

.clock-face--right .hour-hand,.clock-face--right .minute-hand {
  stroke:#B76923
}

.digital-time {
  min-width:126px;
  text-align:center;
  background:#FFF;
  color:var(--ink);
  border:2px solid #697A96;
  border-radius:12px;
  padding:6px 14px;
  font-size:clamp(22px,2.4vw,40px);
  font-weight:800;
  letter-spacing:-.04em;
  line-height:1.2;
  box-shadow:var(--shadow);
  font-variant-numeric:tabular-nums
}

.clock-unified .clock-dial {
  fill:#FFF6E3
}

.clock-unified .clock-face--left .hour-hand,.clock-unified .clock-face--left .minute-hand {
  stroke:#B76923
}

/* Явні мінімальні розміри не дають постеру розсувати CSS Grid. */
.stage  {
  grid-template-rows: minmax(0, 1fr);
}

.side  {
  min-height: 0;
}

.media-slot  {
  display: block;
}

.media-slot > img, .media-slot > canvas  {
  position: absolute;
  inset: 0;
}

.stage  {
  overflow: clip;
}

/* Повний сценарій доступний диктору та з клавіатури. */
html:not(.static-mode) .compare-scene > .transcript, html:not(.static-mode) .final-scene > .transcript  {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

html:not(.static-mode) .transcript:focus-within  {
  z-index: 70;
  width: min(90%, 760px);
  height: auto;
  max-height: 70vh;
  overflow: auto;
  clip-path: none;
  left: 5%;
  top: 110px;
  padding: 20px;
}
.clock-mark-major { stroke-width: 5; }
