/* HTML 발표 자료 카드(static/js/chat_deck.js) — 16:9 무대(샌드박스 iframe 의 덱)와 아래 막대(제목·쪽 넘기기·전체 화면·내려받기).
   모션 카드(chat_motion.css)와 같은 집안의 생김새 — 둥근 틀, 얇은 테두리, 파란 주 단추. */

.cd {
  width: 100%;
  max-width: 760px;
  margin: 10px 0 4px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color, rgba(148, 163, 184, .28));
  background: var(--surface-color, #fff);
  box-sizing: border-box;
}
.cd__stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--cd-ratio, 16 / 9);
  max-width: var(--cd-max-w, none);
  margin: 0 auto;
  background: #0b0b0c;
}
.cd__stage:fullscreen { aspect-ratio: auto; max-width: none; background: #000; }
.cd__stage:-webkit-full-screen { aspect-ratio: auto; max-width: none; background: #000; }
.cd__frame { display: block; width: 100%; height: 100%; border: 0; background: #0b0b0c; color-scheme: normal; }

.cd__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
}
.cd__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cd__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd__sub { font-size: 12.5px; color: var(--text-secondary, #64748b); font-variant-numeric: tabular-nums; }

.cd__nav { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.cd__count {
  min-width: 52px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  font-variant-numeric: tabular-nums;
}
.cd__actions { display: flex; gap: 6px; flex: 0 0 auto; }

.cd__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, .35));
  background: transparent;
  color: var(--text-color);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.cd__btn svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cd__btn:hover:not(:disabled) { background: color-mix(in srgb, var(--text-color, #111) 6%, transparent); }
.cd__btn:disabled { opacity: .38; cursor: default; }
.cd__btn--icon { width: 32px; padding: 0; border-color: transparent; }
.cd__btn--primary { background: #0082FF; border-color: #0082FF; color: #fff; }
.cd__btn--primary:hover:not(:disabled) { background: #006fe0; }
.cd__note { margin: 0; padding: 0 14px 12px; font-size: 13px; line-height: 1.5; color: var(--text-secondary, #64748b); }
.cd__note[hidden] { display: none; }

/* 쓰는 중 — 코드 대신 고요한 자리와 지금까지 쓴 장 수 */
.cd--pending .cd__stage { display: flex; align-items: center; justify-content: center; }
.cd__pending { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .78); font-size: 14px; }
.cd__pending-count { color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums; }
.cd__pending-count::before { content: "·"; margin-right: 10px; }
.cd__spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  animation: cd-spin .8s linear infinite;
}
@keyframes cd-spin { to { transform: rotate(360deg); } }

/* 좁은 화면 — 단추 글자를 접고 아이콘만 */
@media (max-width: 560px) {
  .cd__btn-text { display: none; }
  .cd__actions .cd__btn { width: 32px; padding: 0; }
  .cd__bar { padding: 8px 8px 8px 12px; gap: 6px; }
}
