/* 영상, 자막, 프롬프트, 컨트롤 막대. 전체보기(data-view="full")는 브라우저 창 안에서 영상만 최대로 보여 준다. */
.stage { position: relative; }

/* 영상 줄: 영상 + (켜면) 오른쪽 프롬프트 */
.stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.app.prompt-on .stage-row { grid-template-columns: minmax(0, 1fr) 340px; }

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

/* 자막층: 실제 영상 영역(cap-area)에 맞춰 놓고, 크기는 영상 높이 기준(cqh)으로 정한다.
   숫자는 녹화 영상에 박힌 Vimeo 자막을 1920x1080 기준으로 잰 값이다:
   한 줄 바탕 y 978~1054, 글자 폭 42자 1409px → 글자 크기 48.2px(4.465cqh) */
.captions { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cap-area { position: absolute; container-type: size; }

/* 가림 띠: 박힌 원본 자막 자리(y 972~1060)를 가로 전체로 덮는다. 두 줄 구간은 y 896부터 */
.cap-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.85cqh;
  height: 8.15cqh;
  background: #000;
}

.cap-band.two { height: 15.2cqh; }

.cap-text {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 3.3cqh;
  font-family: "Apple SD Gothic Neo", var(--font);
  font-size: 4.465cqh;
  line-height: 1.2;
  text-align: center;
}

.cap-text span {
  padding: 0.198em 0.456em;
  background: #000;
  color: #fff;
  white-space: pre-line;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 영상 위 작은 알림(이어보기 안내 등) */
.notice {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 5px 6px 5px 12px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 13px;
}

.notice button {
  flex: none;
  border: 0;
  border-radius: 99px;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

/* 프롬프트(대본) */
.prompt {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.prompt-inner {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 8px;
}

.pp { margin-bottom: 2px; padding: 6px 8px; border-radius: 6px; }
.pp.on { background: var(--accent-bg); }

.pp-time {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.pp-text { margin: 2px 0 0; color: var(--sub); font-size: 13.5px; line-height: 1.65; }
.pp.on .pp-text { color: var(--text); }
.pp-text span { border-radius: 3px; cursor: pointer; }
.pp-text span:hover { background: var(--hover); }
.pp-text span.on { background: rgba(47, 111, 219, 0.2); color: var(--text); }
.prompt-empty { margin: 8px; color: var(--sub); font-size: 13px; }

/* 컨트롤 막대 */
.controls {
  display: flex;
  flex-wrap: wrap;   /* 창이 좁으면 버튼이 다음 줄로 넘어간다 */
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}

.cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  white-space: nowrap;
}

.cb:hover { background: var(--hover); }
.cb.on { background: var(--accent-bg); color: var(--accent-text); border-color: transparent; }
.cb.na { opacity: 0.45; }
.cb svg { width: 18px; height: 18px; fill: currentColor; }

.time {
  padding: 0 4px;
  color: var(--sub);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.seek {
  flex: 1;
  min-width: 80px;
  accent-color: var(--accent);
  cursor: pointer;
}

.rate { position: relative; }

.rate-menu {
  position: absolute;
  right: 0;
  bottom: 42px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 76px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.rate-menu button {
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.rate-menu button:hover { background: var(--hover); }
.rate-menu button.on { color: var(--accent-text); font-weight: 600; }

/* 전체보기: 탭과 주소창은 그대로 두고, 페이지 안에서 영상이 창을 가득 채운다(프롬프트를 켜면 오른쪽에) */
.app[data-view="full"] .stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
}

.app[data-view="full"] .stage-row {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 0;
}

.app[data-view="full"] .screen {
  flex: 1;
  width: auto;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.app[data-view="full"] .prompt {
  flex: none;
  width: 360px;
  border: 0;
  border-left: 1px solid #333;
  border-radius: 0;
  background: #161616;
}

.app[data-view="full"] .prompt-inner { padding-bottom: 72px; }
.app[data-view="full"] .pp-text { color: #9a9a9a; }
.app[data-view="full"] .pp.on { background: #1f2c45; }
.app[data-view="full"] .pp.on .pp-text,
.app[data-view="full"] .pp-text span.on { color: #f2f2f2; }
.app[data-view="full"] .pp-time { color: #a8c6ff; }

.app[data-view="full"] .controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 10px 16px 12px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  transition: opacity 0.25s;
}

.app[data-view="full"] .cb {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app[data-view="full"] .cb.on { background: rgba(255, 255, 255, 0.28); }
.app[data-view="full"] .time { color: #ddd; }
.app[data-view="full"] .rate-menu { background: #222; border-color: #444; }
.app[data-view="full"] .stage.idle .controls { opacity: 0; pointer-events: none; }
.app[data-view="full"] .stage.idle,
.app[data-view="full"] .stage.idle video { cursor: none; }
