/* v112: «Кинозал» — the recordings play on the site (watch.js).
   Dark and quiet: the film is the only bright thing in the window.
   No blur and no filters — only transform/opacity move. */
.wz {
  container-type: inline-size;
  height: 100%; overflow: auto;
  background: #0b0810; color: var(--text);
  font-family: var(--font-ui);
}
.wz:focus { outline: none; }

/* ── messages: loading, login, no subscription ── */
.wz-msg {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 40px 28px;
}
.wz-msg h3 { margin: 0; font: 400 clamp(26px, 5cqi, 40px)/1.08 var(--font-display); letter-spacing: -0.01em; }
.wz-msg p { margin: 0; color: #cfc1d8; line-height: 1.55; }
.wz-msg.is-warn h3 { color: #ffd1e5; }
.wz-kicker { font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent) !important; }
.wz-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 79, 154, 0.2); border-top-color: var(--accent);
  animation: wz-spin 0.9s linear infinite;
}
.wz-msg:has(.wz-spin) { align-items: center; text-align: center; }
@keyframes wz-spin { to { transform: rotate(360deg); } }

.wz-steps { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 10px; }
.wz-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.wz-steps b {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 700 14px/1 var(--font-mono);
}
.wz-steps span { padding-top: 5px; color: #e6dbee; }

.wz-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px !important; }
.wz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 700 15px/1 var(--font-ui); text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.wz-btn:hover { background: #ff69aa; }
.wz-btn:active { transform: scale(0.97); }
.wz-btn.is-tg { background: #2aabee; color: #fff; }
.wz-btn.is-tg:hover { background: #45b8f2; }
.wz-btn.is-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.wz-btn.is-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.wz-small { font-size: 14px; color: #a99bb4 !important; }
.wz-link {
  border: 0; padding: 0; background: none; cursor: pointer; color: var(--accent);
  font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* ── the player ── */
.wz-player { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 100%; }
.wz-stage, .wz-side { min-width: 0; }
.wz-title { overflow-wrap: anywhere; }
.wz-stage { position: relative; background: #000; aspect-ratio: 16 / 9; max-height: 78vh; display: grid; place-items: center; }
.wz-video { width: 100%; height: 100%; background: #000; display: block; }
.wz-note {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 28px);
  padding: 10px 14px; border-radius: 12px;
  background: rgba(14, 9, 18, 0.92); box-shadow: 0 8px 24px -10px #000, inset 0 0 0 1px var(--line-strong);
  font-size: 14px;
  animation: wz-in 220ms var(--ease-out);
}
.wz-note[hidden] { display: none; }
@keyframes wz-in { from { opacity: 0; transform: translateY(-6px); } }

.wz-side { display: flex; flex-direction: column; min-height: 0; background: #120d17; border-top: 1px solid var(--line); }
.wz-head { padding: 18px 20px 14px; }
.wz-title { margin: 6px 0 4px; font: 400 clamp(22px, 3.4cqi, 30px)/1.1 var(--font-display); letter-spacing: -0.01em; }
.wz-now { margin: 0; color: var(--accent); font-weight: 600; min-height: 1.4em; }
.wz-meta { margin: 2px 0 0; color: #9d8fa8; font-size: 14px; }

.wz-parts { list-style: none; margin: 0; padding: 0 10px 10px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.wz-season { padding: 14px 10px 6px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #9d8fa8; }
.wz-part {
  position: relative; overflow: hidden;
  width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text);
  font: 500 15px/1.3 var(--font-ui); text-align: left; cursor: pointer;
  transition: background-color 140ms;
}
.wz-part:hover { background: rgba(255, 255, 255, 0.05); }
.wz-part.is-on { background: var(--accent-soft); }
.wz-num {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); font: 700 13px/1 var(--font-mono); color: #cdbfd7;
}
.wz-part.is-on .wz-num { background: var(--accent); color: var(--accent-ink); }
.wz-part.is-done .wz-num { color: var(--good); }
.wz-pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-dur { color: #9d8fa8; font-size: 13px; font-variant-numeric: tabular-nums; }
.wz-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.wz-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: var(--accent); }
.wz-part.is-done .wz-bar::after { background: var(--good); }

.wz-me {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 12px 20px 16px; border-top: 1px solid var(--line); color: #a99bb4; font-size: 13px;
}
.wz-me b { color: var(--text); font-weight: 600; }

/* a wide window: the film on the left, the parts on the right */
@container (min-width: 900px) {
  .wz-player.has-parts { grid-template-columns: minmax(0, 1fr) 330px; grid-template-rows: 1fr; height: 100%; min-height: 0; }
  .wz-player.has-parts .wz-stage { aspect-ratio: auto; max-height: none; height: 100%; }
  .wz-player.has-parts .wz-side { border-top: 0; border-left: 1px solid var(--line); overflow: hidden; }
  .wz-player:not(.has-parts) { grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
  .wz-player:not(.has-parts) .wz-stage { aspect-ratio: auto; max-height: none; min-height: 0; }
  .wz-player:not(.has-parts) .wz-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .wz-player:not(.has-parts) .wz-me { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wz-spin { animation-duration: 2.4s; }
  .wz-note { animation: none; }
}

/* ── «Записи» → «Смотреть на сайте» (apps.js mountCinema) ── */
.sa-cine { margin: 8px 10px 28px; padding-top: 18px; border-top: 2px dashed rgba(239, 233, 225, 0.16); }
.sa-cine[hidden] { display: none; }
.sa-cine-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.sa-cine-title { margin: 0 0 6px; font: 400 clamp(34px, 4.6cqw, 58px)/0.95 var(--sw-tag); color: var(--sw-text); }
.sa-cine-head p { margin: 0; max-width: 52ch; color: #d9cfd6; line-height: 1.45; }
.sa-cine-q {
  width: min(340px, 100%); min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 2px solid rgba(239, 233, 225, 0.22); background: rgba(10, 7, 12, 0.6); color: var(--sw-text);
  font: 500 15px/1 var(--font-ui);
}
.sa-cine-q:focus { outline: none; border-color: var(--accent); }
.sa-cine-label { margin: 18px 0 10px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: #bfb2bd; }
.sa-cine-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; }
.sa-cine-card {
  position: relative; width: 100%; display: grid; gap: 6px; padding: 0 0 6px; border: 0; background: none;
  color: var(--sw-text); text-align: left; cursor: pointer;
}
.sa-cine-poster {
  position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px;
  background: #241b29; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.8);
  transition: transform 200ms var(--ease-out);
}
.sa-cine-poster img, .sa-cine-poster .cover-fallback { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font: 400 34px/1 var(--sw-print); color: #f2e6ee; }
.sa-cine-play {
  position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 15px;
  opacity: 0; transform: scale(0.85); transition: opacity 160ms, transform 200ms var(--ease-out);
}
.sa-cine-card:hover .sa-cine-poster, .sa-cine-card:focus-visible .sa-cine-poster { transform: translateY(-3px); }
.sa-cine-card:hover .sa-cine-play, .sa-cine-card:focus-visible .sa-cine-play { opacity: 1; transform: none; }
.sa-cine-name { font: 600 15px/1.25 var(--font-ui); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sa-cine-sub { font-size: 13px; color: #b9acb8; }
.sa-cine-bar { position: relative; display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.sa-cine-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: var(--accent); }
.sa-cine-empty { color: #d9cfd6; }
@media (hover: none) { .sa-cine-play { opacity: 1; transform: none; } }
@container (max-width: 560px) { .sa-cine-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; } }
