/* «Кино под открытым небом» (0.55 «Сезоны», summer; public/summer-openair.js). body.oa-on while the hall's evening is lit.
   Nothing here changes a size and nothing lies over the picture: the scene is a layer UNDER .video-wrap (inserted
   before it in #stage) that reaches into the margins round the stage; the night is the page's own background. */
body.oa-on #stage { position: relative; }
.oa-scene { position: absolute; pointer-events: none; overflow: hidden; border-radius: 18px; contain: strict; }
.oa-scene[hidden] { display: none; }
.oa-scene .oa-art, .oa-scene .oa-flies { position: absolute; left: 0; top: 0; display: block; }
body.maximized .oa-scene { display: none; }

/* The night: the hall's background and the header (stars painted once, still). */
body.oa-on #app-main {
  background:
    radial-gradient(ellipse 60% 40% at 78% 0%, rgba(255, 176, 102, .10), transparent 70%),
    linear-gradient(180deg, #0c1430 0%, #131b39 52%, #1a2036 100%);
}
body.oa-on > header {
  background-color: #0b1229;
  background-image:
    radial-gradient(1px 1px at 8% 30%, rgba(255, 255, 255, .8) 50%, transparent 52%),
    radial-gradient(1px 1px at 23% 72%, rgba(255, 244, 214, .7) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 41% 22%, rgba(255, 255, 255, .85) 50%, transparent 54%),
    radial-gradient(1px 1px at 57% 64%, rgba(232, 238, 255, .7) 50%, transparent 52%),
    radial-gradient(1px 1px at 69% 18%, rgba(255, 255, 255, .75) 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 83% 58%, rgba(255, 236, 190, .8) 50%, transparent 54%),
    radial-gradient(1px 1px at 94% 26%, rgba(255, 255, 255, .7) 50%, transparent 52%),
    linear-gradient(180deg, #0a1027 0%, #121a38 100%);
}

/* The lobby before the film (body.lobby-on: the screen shows the lobby, no picture): the night meadow (summer-openair.js
   #oa-meadow: hills, trees, string lights, deckchairs, a lantern, the moon) at the screen's bottom, a tile of still stars,
   the night; its fireflies on a canvas behind the lobby's buttons. */
body.oa-on.lobby-on .video-wrap, body.oa-on:not(.lobby-on) #idle {
  background:
    var(--oa-meadow, none) center bottom / max(100%, 760px) auto no-repeat,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='180'><g fill='%23e8eeff'><circle cx='12' cy='20' r='.9'/><circle cx='64' cy='58' r='.6'/><circle cx='101' cy='14' r='1.1' fill='%23ffe9b8'/><circle cx='150' cy='77' r='.7'/><circle cx='196' cy='31' r='.8'/><circle cx='240' cy='92' r='1'/><circle cx='31' cy='120' r='.7'/><circle cx='88' cy='150' r='.9' fill='%23ffe9b8'/><circle cx='137' cy='131' r='.6'/><circle cx='214' cy='158' r='.8'/><circle cx='176' cy='118' r='.5'/><circle cx='45' cy='86' r='.5'/></g></svg>") 0 0 / 260px 180px repeat,
    linear-gradient(180deg, #0b1230 0%, #131c3c 55%, #1a2442 100%);
}
body.oa-on.lobby-on #idle { background: transparent; }
.video-wrap > .oa-idle-flies { position: absolute; left: 0; top: 0; pointer-events: none; } /* before #idle: under the lobby's buttons */
body:not(.lobby-on) .video-wrap > .oa-idle-flies { display: none; }

/* The stage's frame: an outdoor screen — a cream canvas edge and its dark rim (outside the picture, drawn by the box). */
body.oa-on:not(.maximized) .video-wrap {
  border-color: rgba(255, 240, 210, .45);
  box-shadow: 0 0 0 3px #efe6d2, 0 0 0 5px #2b2118, 0 18px 46px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 214, 140, .10);
}

/* Stars and bulbs twinkle only while nothing plays (body.oa-calm; never with reduced motion). */
@keyframes oa-tw { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
body.oa-on.oa-calm .oa-scene .oa-tw0 { animation: oa-tw 3.4s ease-in-out infinite; }
body.oa-on.oa-calm .oa-scene .oa-tw1 { animation: oa-tw 4.3s ease-in-out .9s infinite; }
body.oa-on.oa-calm .oa-scene .oa-tw2 { animation: oa-tw 5.2s ease-in-out 1.7s infinite; }
@media (prefers-reduced-motion: reduce) { body.oa-on .oa-scene .oa-tw0, body.oa-on .oa-scene .oa-tw1, body.oa-on .oa-scene .oa-tw2 { animation: none; } }

/* A deckchair under every face of the participants' strip (the chairs' stripes: summer-openair.js #oa-chairs). The pill
   keeps its size; only its left end turns square-ish like a chair's back. */
body.oa-on .participants .person { position: relative; border-radius: 8px 999px 999px 8px; }
body.oa-on .participants .person::before {
  content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 28px; pointer-events: none;
  background-repeat: no-repeat; background-position: center; background-size: 100% 100%; border-radius: 7px 0 0 7px;
}

/* The chair's front — its armrest and legs — over the face, which sits a touch higher: the face sits IN the chair. */
body.oa-on .participants .person .av { top: -2.5px; }
body.oa-on .participants .person::after {
  content: ''; position: absolute; left: 0; bottom: 1px; width: 28px; height: 7.5px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 9' preserveAspectRatio='none'><path d='M5 2.6 L2.6 8.6 M23 2.6 L25.4 8.6' stroke='%232b1b10' stroke-width='2.6' stroke-linecap='round'/><path d='M5 2.6 L2.6 8.6 M23 2.6 L25.4 8.6' stroke='%237a5434' stroke-width='1.4' stroke-linecap='round'/><rect x='0.8' y='0.4' width='26.4' height='2.8' rx='1.3' fill='%238a5f3a' stroke='%232b1b10' stroke-width='.6'/><rect x='2' y='0.9' width='24' height='0.8' rx='.4' fill='%23b88a5c'/></svg>") no-repeat 0 0 / 100% 100%;
}

/* «⋯»: the host's checkbox, like «Пауза — всем». */
.mi.oa-mi .oa-mi-box { display: inline-grid; place-items: center; box-sizing: border-box; width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid var(--muted); border-radius: 5px; color: transparent; }
.mi.oa-mi .oa-mi-box svg { width: 12px; height: 12px; }
.mi.oa-mi:hover .oa-mi-box, .mi.oa-mi:focus-visible .oa-mi-box { border-color: var(--accent); }
.mi.oa-mi[aria-checked="true"] .oa-mi-box { border-color: var(--accent); background: var(--accent); color: #11141a; }
.mi.oa-mi .oa-mi-t { flex: 1 1 auto; }
.mi.oa-mi .oa-mi-moon { flex: 0 0 auto; font-size: 13px; }

@media (max-width: 760px) {
  body.oa-on:not(.maximized) .video-wrap { box-shadow: 0 0 0 2px #efe6d2, 0 0 0 3.5px #2b2118, 0 10px 28px rgba(0, 0, 0, .5); }
  .oa-scene { border-radius: 12px; }
  /* The phone's strip is a stack of 38px faces: the face gets smaller inside the same tile and sits in the chair. */
  body.oa-on .participants .person { border-radius: 9px; }
  body.oa-on .participants .person .av { width: 26px; height: 26px; top: -4px; }
  body.oa-on .participants .person::before { left: 1px; right: 1px; width: auto; border-radius: 7px; }
  body.oa-on .participants .person::after { left: 1px; right: 1px; width: auto; height: 10px; }
}
