/* /video — minimalist short-form Reading Video */

.video-page [hidden] { display: none !important; }

.video-page {
  --vid-ink: #1c1a17;
  --vid-muted: #6c675f;
  --vid-line: rgba(28, 26, 23, .12);
  --vid-panel: #ffffff;
  --vid-soft: #f7f5f0;
  --vid-gold: #b9852f;
  --vid-teal: #0f9b8e;
  background: linear-gradient(180deg, #fbfaf7 0%, #ffffff 42%);
}

.video-hero {
  padding: 64px 0 12px;
}
.video-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.video-hero h1 {
  margin: 6px 0 12px;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--vid-ink);
  max-width: 760px;
}
.video-hero .page-lead {
  max-width: 640px;
  color: var(--vid-muted);
}
.video-quota {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--vid-line);
  border-radius: 14px;
  background: var(--vid-panel);
  box-shadow: 0 10px 30px -24px rgba(20, 18, 15, .5);
}
.video-quota span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--vid-muted); }
.video-quota b { font-size: 1.15rem; color: var(--vid-ink); white-space: nowrap; }

.video-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0 56px;
  align-items: start;
}
.video-shell:not(.has-preview) .video-form-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}
.video-shell.has-preview {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
}

.video-form-card {
  background: var(--vid-panel);
  border: 1px solid var(--vid-line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 24px 70px -52px rgba(20, 18, 15, .55);
}

.video-step {
  display: flex;
  gap: 16px;
  padding: 6px 0 22px;
}
.video-step + .video-step {
  border-top: 1px solid var(--vid-line);
  padding-top: 24px;
}
.video-step-no {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vid-soft);
  border: 1px solid var(--vid-line);
  font-size: .82rem;
  font-weight: 700;
  color: var(--vid-gold);
}
.video-step > div { flex: 1 1 auto; min-width: 0; }
.video-step h2 {
  margin: 2px 0 14px;
  font-size: 1.05rem;
  color: var(--vid-ink);
}

.video-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.video-topic {
  text-align: left;
  padding: 16px;
  border: 1px solid var(--vid-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s var(--ease, ease), box-shadow .18s var(--ease, ease), transform .18s var(--ease, ease);
}
.video-topic:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -30px rgba(20, 18, 15, .6); }
.video-topic b { display: block; color: var(--vid-ink); font-size: .95rem; }
.video-topic small { display: block; margin-top: 6px; color: var(--vid-muted); font-size: .8rem; line-height: 1.45; }
.video-topic.is-on {
  border-color: rgba(185, 133, 47, .7);
  box-shadow: inset 0 0 0 1px rgba(185, 133, 47, .45);
  background: linear-gradient(180deg, rgba(185, 133, 47, .06), #fff 60%);
}

.video-form-fields { display: grid; gap: 14px; }
.video-field { display: grid; gap: 6px; }
.video-field label { font-size: .82rem; font-weight: 600; color: var(--vid-ink); }
.video-field input,
.video-field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--vid-line);
  border-radius: 10px;
  background: #fff;
  color: var(--vid-ink);
  font: inherit;
  font-size: .95rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.video-field input:focus,
.video-field select:focus {
  outline: none;
  border-color: rgba(15, 155, 142, .6);
  box-shadow: 0 0 0 3px rgba(15, 155, 142, .12);
}
.video-field small { color: var(--vid-muted); font-size: .76rem; line-height: 1.4; }

.video-hd-fields { display: grid; gap: 14px; padding-top: 4px; }
.video-hd-fields[hidden] { display: none; }
.video-city-field { position: relative; }
.video-city-results {
  position: absolute;
  z-index: 30;
  top: calc(100% - 18px);
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--vid-line);
  border-radius: 12px;
  box-shadow: 0 22px 50px -26px rgba(20, 18, 15, .5);
}
.video-city-results li { margin: 0; }
.video-city-results button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.video-city-results button:hover,
.video-city-results button:focus { background: var(--vid-soft); outline: none; }
.video-city-results b { font-size: .88rem; color: var(--vid-ink); }
.video-city-results span { font-size: .74rem; color: var(--vid-muted); }

.video-generate { margin-top: 6px; justify-content: center; }
.video-generate.is-busy { opacity: .7; cursor: progress; }
.video-fine { margin: 2px 0 0; color: var(--vid-muted); font-size: .76rem; line-height: 1.5; }

.video-progress {
  padding: 18px;
  border: 1px solid var(--vid-line);
  border-radius: 16px;
  background: var(--vid-panel);
}
.video-progress-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--vid-ink); }
.video-progress-head span { color: var(--vid-muted); }
.video-progress-track {
  position: relative;
  height: 6px;
  margin: 10px 0 14px;
  border-radius: 999px;
  background: var(--vid-soft);
  overflow: hidden;
}
.video-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vid-teal), var(--vid-gold));
  transition: width .35s var(--ease, ease);
}
.video-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .74rem;
  color: var(--vid-muted);
}
.video-phases li { display: inline-flex; align-items: center; gap: 6px; }
.video-phases i {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--vid-line);
  background: #fff;
}
.video-phases li.on { color: var(--vid-ink); }
.video-phases li.on i { background: var(--vid-gold); border-color: var(--vid-gold); }
.video-phases li.done i { background: var(--vid-teal); border-color: var(--vid-teal); }

.video-error {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(198, 40, 40, .25);
  border-radius: 12px;
  background: rgba(198, 40, 40, .05);
}
.video-error b { color: #8f1d1d; font-size: .9rem; }
.video-error p { margin: 6px 0 10px; color: #6b2b2b; font-size: .85rem; line-height: 1.5; }

.video-preview-col {
  min-width: 0;
  align-self: stretch;
  display: grid;
  gap: 18px;
  align-content: start;
}

.video-stage-wrap {
  position: sticky;
  top: 96px;
  padding: 0;
}
.video-stage-wrap[hidden] { display: none; }
.video-stage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.video-stage-head h2 { margin: 0 0 4px; font-size: 1.1rem; }
.video-stage-head small { color: var(--vid-muted); font-size: .82rem; }
.video-stage-meta { text-align: right; }
.video-stage-meta b { display: block; font-size: 1rem; color: var(--vid-ink); }
.video-stage-meta small { font-size: .74rem; }
.video-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.video-canvas-wrap { width: 100%; max-width: 380px; margin: 0 auto; }
.vg2-stage-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0e14;
  box-shadow: 0 30px 70px -46px rgba(10, 12, 18, .9);
}
.vg2-stage-canvas { display: block; width: 100%; height: 100%; }
.vg2-stage-overlay { position: absolute; inset: 0; pointer-events: none; }
.vg2-rec {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 18, .62);
  color: #fff;
  font-size: .68rem;
  letter-spacing: .08em;
}
.vg2-rec i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; }
.vg2-rec em { font-style: normal; opacity: .85; }

.video-controls { display: grid; gap: 12px; }
.video-transport { display: flex; align-items: center; gap: 12px; }
.video-clock { font-size: .82rem; color: var(--vid-muted); font-variant-numeric: tabular-nums; }
.video-seek { width: 100%; accent-color: var(--vid-gold); }
.video-rec-box {
  padding: 12px 14px;
  border: 1px solid rgba(198, 40, 40, .28);
  border-radius: 12px;
  background: rgba(198, 40, 40, .04);
}
.video-rec-top {
  display: flex; align-items: center; gap: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .08em; color: #8f1d1d;
}
.video-rec-top i { width: 8px; height: 8px; border-radius: 50%; background: #d21f1f; }
.video-rec-top span { margin-left: auto; font-weight: 500; letter-spacing: 0; color: var(--vid-muted); }
.video-rec-box small { display: block; margin-top: 6px; color: var(--vid-muted); font-size: .74rem; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 14, 11, .55);
  backdrop-filter: blur(3px);
}
.video-modal[hidden] { display: none; }
.video-modal-card {
  width: min(440px, 100%);
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px -40px rgba(0, 0, 0, .7);
}
.video-modal-card h2 { margin: 0 0 10px; font-size: 1.15rem; color: var(--vid-ink); }
.video-modal-card p { margin: 0 0 14px; color: var(--vid-muted); font-size: .9rem; line-height: 1.55; }
.video-countdown { color: var(--vid-ink) !important; font-size: 1rem !important; }
.video-countdown b { font-variant-numeric: tabular-nums; color: var(--vid-gold); }
.video-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.video-modal-actions .btn { flex: 1 1 auto; justify-content: center; }

.video-chart-host {
  position: absolute;
  left: -12000px;
  top: 0;
  width: 1100px;
  height: 1400px;
  overflow: hidden;
  opacity: .01;
  pointer-events: none;
}

@media (max-width: 920px) {
  .video-shell,
  .video-shell.has-preview { grid-template-columns: 1fr; }
  .video-shell:not(.has-preview) .video-form-card { max-width: none; }
  .video-preview-col { align-self: auto; }
  .video-stage-wrap { position: static; }
  .video-canvas-wrap { max-width: 390px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .video-hero { padding-top: 42px; }
  .video-hero-inner { flex-direction: column; align-items: flex-start; }
  .video-form-card { padding: 18px; border-radius: 16px; }
  .video-topics { grid-template-columns: 1fr; }
  .video-step { gap: 12px; }
  .video-stage-head { flex-direction: column; align-items: flex-start; }
}
