.vuel-demo {
  --vd-bg: #191b1e;
  --vd-panel: #222427;
  --vd-line: #35383c;
  --vd-text: #f2f1ed;
  --vd-muted: #a6abb0;
  --vd-accent: #e2ceaa;
  --vd-ease: cubic-bezier(.16, 1, .3, 1);
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: grid;
  grid-template-rows: 62px minmax(270px, 1fr) 164px 34px;
  background: var(--vd-bg);
  color: var(--vd-text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.012em;
  overflow: hidden;
  isolation: isolate;
  color-scheme: dark;
  font-variant-numeric: tabular-nums;
}
.vuel-demo * { box-sizing: border-box; }
.vuel-demo button, .vuel-demo input, .vuel-demo textarea { font: inherit; }
.vuel-demo button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  box-shadow: none;
  transition: background .22s var(--vd-ease), color .22s var(--vd-ease), transform .22s var(--vd-ease);
}
.vuel-demo button:hover { background: #34373b; }
.vuel-demo button:active:not(:disabled) { transform: translateY(1px); }
.vuel-demo button:disabled { opacity: .42; cursor: default; }
.vuel-demo button:focus-visible, .vuel-demo textarea:focus-visible, .vuel-demo input:focus-visible { outline: 2px solid var(--vd-accent); outline-offset: 3px; }
.vuel-demo ::selection { background: #e2ceaa40; color: #fff; }
.vuel-demo svg { width: 19px; height: 19px; flex: none; }
.vuel-demo p { margin: 0; }
.vuel-demo button strong { font-weight: 500; }
.vuel-demo :where(.vd-caption-list, .vd-library) { scrollbar-width: thin; scrollbar-color: #555a61 transparent; }
.vuel-demo [hidden] { display: none !important; }

.vd-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; border-bottom: 1px solid var(--vd-line); background: #26282b; }
.vd-project { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vd-project > strong { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 550; letter-spacing: -.02em; }
.vd-project-dot, .vd-tiny-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--vd-accent); flex: none; }
.vd-project-type { padding-left: 12px; border-left: 1px solid #4b4e52; color: #b5b9be; font-size: 12px; white-space: nowrap; }
.vd-actions { display: flex; align-items: center; gap: 8px; flex: none; font-size: 14px; }
.vuel-demo .vd-cut { background: #393832; color: #e8d9bb; }
.vuel-demo .vd-cut:hover { background: #484339; }
.vuel-demo .vd-export { background: var(--vd-accent); color: #292720; font-weight: 600; padding-inline: 13px; }
.vuel-demo .vd-export:hover { background: #eee0c7; }
.vuel-demo .vd-icon-button { min-width: 44px; padding: 9px; }
.vuel-demo .vd-import-compact { display: none; }

.vd-workspace { min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr) 282px; }
.vd-library { display: flex; flex-direction: column; padding: 0 16px; overflow: auto; border-right: 1px solid var(--vd-line); background: var(--vd-panel); }
.vd-panel-heading { height: 48px; display: flex; justify-content: space-between; align-items: center; flex: none; font-size: 14px; font-weight: 550; letter-spacing: -.02em; }
.vd-count, .vd-caption-count { color: var(--vd-muted); font-size: 12px; font-weight: 400; }
.vuel-demo .vd-media-item { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 0 9px; border-radius: 0; text-align: left; }
.vuel-demo .vd-media-item:hover { background: transparent; }
.vd-media-thumbnail { position: relative; display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; margin: 1px 0 8px; border-radius: 4px; background: #303338; outline: 1px solid #6c6557; outline-offset: 3px; }
.vd-media-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: opacity .22s var(--vd-ease); }
.vd-media-item:hover .vd-media-thumbnail img { opacity: .83; }
.vd-media-thumbnail > span { position: absolute; right: 5px; bottom: 4px; padding: 1px 4px; border-radius: 2px; background: #17191cda; color: #edece8; font-size: 11px; }
.vd-media-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.vd-media-item small { color: var(--vd-muted); font-size: 12px; }
.vuel-demo .vd-import { justify-content: flex-start; min-height: 44px; margin-top: 20px; padding: 8px 0; color: #d4d7db; font-size: 14px; }
.vuel-demo .vd-import:hover { background: transparent; color: #fff; }
.vd-local-note { max-width: 150px; color: var(--vd-muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.vd-library-bottom { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 18px 0; color: var(--vd-muted); font-size: 12px; }

.vd-monitor { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #17191c; }
.vd-monitor-top { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 20px; color: #b6babf; font-size: 13px; flex: none; }
.vd-resolution { color: var(--vd-muted); font-size: 12px; }
.vd-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; padding: 0 16px 5px; container-type: size; }
.vd-frame { position: relative; display: flex; justify-content: center; width: 100%; max-height: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; background: #0e1012; box-shadow: 0 14px 32px #0004; }
@supports (width: 1cqh) { .vd-frame { width: min(100%, calc(100cqh * 16 / 9)); } }
.vd-video { display: block; width: 100%; height: 100%; object-fit: contain; }
.vd-caption { position: absolute; left: 6%; right: 6%; bottom: 10%; text-align: center; pointer-events: none; font-size: clamp(18px, 1.8vw, 28px); line-height: 1.5; font-weight: 500; letter-spacing: -.025em; text-shadow: 0 2px 3px #000b; }
.vd-caption span { padding: 4px 10px; border-radius: 3px; background: #111111bd; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.vuel-demo .vd-play-overlay { position: absolute; inset: 0; width: 52px; height: 52px; margin: auto; border-radius: 50%; background: #151719c4; color: #fff; backdrop-filter: blur(10px); transition: background .22s var(--vd-ease), opacity .3s var(--vd-ease), transform .3s var(--vd-ease); }
.vuel-demo .vd-play-overlay svg { width: 23px; height: 23px; margin-left: 2px; }
.vuel-demo .vd-play-overlay:hover { background: #303338e0; transform: scale(1.06); }
.is-playing .vd-play-overlay { opacity: 0; transform: scale(.92); pointer-events: none; }
.vd-media-error { position: absolute; inset: auto 20px 20px; padding: 10px; background: #342723; color: #f4d5bb; }
.vd-transport { display: flex; align-items: center; justify-content: center; gap: 20px; height: 56px; flex: none; color: #dfe1e3; font-size: 13px; }
.vd-current, .vd-total { width: 64px; }
.vd-current { text-align: right; }
.vd-total { color: var(--vd-muted); }
.vd-transport-actions { display: flex; align-items: center; gap: 6px; }
.vuel-demo .vd-play-button { width: 44px; height: 44px; color: var(--vd-accent); background: #303237; }
.vuel-demo .vd-play-button:hover { background: #40434a; }

.vd-transcript { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0 18px; border-left: 1px solid var(--vd-line); background: var(--vd-panel); }
.vd-caption-list { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 6px; padding: 0 0 12px; overflow: auto; }
.vd-caption-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 2px; color: #c2c6cb; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.vd-caption-empty small { color: var(--vd-muted); font-size: 12px; }
.vuel-demo .vd-caption-empty button { padding-inline: 14px; background: #393832; color: #e8d9bb; }
.vuel-demo .vd-caption-empty button:hover { background: #484339; }
.vuel-demo .vd-caption-row { display: flex; flex-direction: column; align-items: stretch; flex: none; min-height: 74px; padding: 11px 12px; gap: 5px; border-radius: 5px; line-height: 1.6; text-align: left; }
.vd-caption-time { color: var(--vd-muted); font-size: 12px; word-spacing: 10px; }
.vd-caption-copy { color: #e3e5e7; font-size: 15px; line-height: 1.65; word-break: keep-all; }
.vuel-demo .vd-caption-row.is-selected { background: #343531; box-shadow: inset 0 0 0 1px #555144; }
.vd-caption-row.is-selected .vd-caption-time { color: var(--vd-accent); }
.vd-caption-row.is-playing .vd-caption-copy { color: #fff; }
.vd-caption-editor { display: flex; flex-direction: column; flex: none; gap: 8px; padding: 15px 0 18px; border-top: 1px solid var(--vd-line); }
.vd-caption-editor label { color: #e0e2e4; font-size: 13px; }
.vd-caption-editor textarea { width: 100%; min-height: 76px; padding: 10px 11px; border: 1px solid #45494f; border-radius: 5px; resize: none; background: #191b1e; color: var(--vd-text); caret-color: var(--vd-accent); font-size: 15px; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word; transition: border-color .22s var(--vd-ease), background .22s var(--vd-ease); }
.vd-caption-editor textarea:hover { border-color: #65686b; }
.vd-caption-editor textarea:focus { background: #15171a; border-color: #b3a287; }
.vd-caption-editor textarea:disabled { color: #a6abb0; opacity: .7; cursor: default; }
.vd-caption-editor > span { color: var(--vd-muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }

.vd-timeline { overflow: hidden; border-top: 1px solid var(--vd-line); background: #222427; }
.vd-timeline-toolbar { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 22px; border-bottom: 1px solid #34373b; color: var(--vd-muted); font-size: 12px; }
.vd-timeline-toolbar > div { display: flex; align-items: center; gap: 9px; }
.vd-timeline-toolbar strong { color: #e8eaec; font-size: 14px; font-weight: 500; }
.vd-timeline-toolbar svg { width: 15px; height: 15px; }
.vd-cut-summary { margin-left: 10px; color: #bdc1c6; font-size: 12px; }
.is-cut .vd-cut-summary { color: #e2ceaa; }
.vd-timeline-body { display: grid; grid-template-columns: 88px 1fr; height: 124px; padding: 0 24px 0 0; }
.vd-track-labels { display: grid; grid-template-rows: 27px 45px 29px; gap: 6px; border-right: 1px solid #34373b; color: #b9bdc3; font-size: 12px; }
.vd-track-labels span { display: flex; align-items: center; gap: 6px; padding-left: 16px; }
.vd-track-labels svg { width: 14px; height: 14px; }
.vd-track-region { position: relative; display: grid; grid-template-rows: 27px 45px 29px; gap: 6px; min-width: 0; margin: 0 0 0 12px; }
.vd-ruler { position: relative; display: flex; justify-content: space-between; align-items: center; color: #afb5bd; font-size: 12px; }
.vd-ruler span::after { content: ''; position: absolute; bottom: 0; height: 4px; border-left: 1px solid #555a62; }
.vd-video-track, .vd-subtitle-track { position: relative; min-width: 0; background: #1a1c1f; }
.vd-video-clip { position: absolute; top: 0; bottom: 0; overflow: hidden; border: 1px solid #85958a; border-radius: 3px; background: #3e5148; }
.vd-video-clip::before { content: ''; position: absolute; inset: 0; background-image: var(--thumb); background-size: 90px auto; background-repeat: repeat-x; opacity: .5; }
.vd-video-clip > span { position: absolute; bottom: 0; left: 0; right: 0; padding: 2px 7px; overflow: hidden; background: #263b2ee8; color: #e3eee8; font-size: 12px; white-space: nowrap; }
.vd-gap { position: absolute; inset-block: 0; z-index: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; border-inline: 1px dashed #beaa82; background: #1a1d20e8; color: #e4d1ae; font-size: 12px; }
.vd-subtitle-track > span { position: absolute; inset-block: 3px; padding: 0 8px; overflow: hidden; border: 1px solid #9b8966; border-radius: 3px; background: #594d37; color: #f0e0c4; font-size: 12px; line-height: 21px; white-space: nowrap; }
.vd-playhead { position: absolute; top: 17px; bottom: 8px; z-index: 3; width: 1px; background: #f4ead7; pointer-events: none; will-change: left; }
.vd-playhead i { position: absolute; top: -6px; left: -4px; width: 9px; height: 10px; background: #f4ead7; clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%); }
.vd-seek { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: crosshair; }
.vd-track-region:focus-within { outline: 1px solid var(--vd-accent); outline-offset: 3px; }
.vd-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 0 22px; border-top: 1px solid var(--vd-line); background: #1b1d20; color: #b7bdc4; font-size: 12px; }
.vd-notice { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-sample-note { flex: none; color: #a9b0b8; font-size: 11px; white-space: nowrap; }

@media (min-width: 1650px) {
  .vd-workspace { grid-template-columns: 206px minmax(0, 1fr) 326px; }
  .vd-transcript { padding-inline: 22px; }
  .vd-caption-copy, .vd-caption-editor textarea { font-size: 15px; }
  .vd-stage { padding: 4px 20px 8px; }
  .vd-monitor-top { padding-inline: 24px; }
}
@media (max-width: 1350px) {
  .vd-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .vd-library { display: none; }
  .vuel-demo .vd-import-compact { display: inline-flex; }
  .vd-project-type { display: none; }
  .vd-header { padding-inline: 18px; }
  .vd-caption { font-size: clamp(18px, 2vw, 26px); }
  .vd-stage { padding-inline: 18px; }
  .vd-monitor-top { padding-inline: 18px; }
  .vd-transcript { padding-inline: 16px; }
  .vd-sample-note { max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 651px) and (max-width: 900px) {
  .vd-header { gap: 10px; padding-inline: 14px; }
  .vd-project > strong { max-width: 180px; }
  .vd-actions { gap: 6px; }
  .vuel-demo .vd-actions button { padding-inline: 8px; }
  .vd-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 650px) {
  .vuel-demo { height: auto; min-height: 780px; grid-template-rows: 108px auto 164px 52px; }
  .vd-header { flex-direction: column; align-items: stretch; justify-content: center; gap: 10px; padding: 11px 16px; }
  .vd-project { justify-content: space-between; gap: 7px; }
  .vd-project-dot { display: none; }
  .vd-project > strong { max-width: 65%; font-size: 15px; }
  .vd-project-type { display: block; padding: 0; border: 0; font-size: 11px; }
  .vd-actions { justify-content: flex-end; gap: 6px; }
  .vuel-demo .vd-actions button { min-height: 44px; padding-inline: 8px; font-size: 13px; }
  .vd-actions .vd-import-compact { margin-right: auto; }
  .vd-workspace { display: flex; flex-direction: column; }
  .vd-monitor { height: clamp(280px, 70vw, 390px); min-height: 280px; }
  .vd-monitor-top { height: 36px; padding-inline: 16px; font-size: 12px; }
  .vd-resolution { font-size: 11px; }
  .vd-stage { padding: 0 12px; }
  .vd-frame { width: min(100%, calc(100cqh * 16 / 9)); max-height: 100%; }
  .vd-caption { bottom: 9%; font-size: 18px; }
  .vd-transport { height: 52px; gap: 16px; font-size: 12px; }
  .vuel-demo .vd-play-button, .vuel-demo .vd-transport .vd-icon-button { min-width: 44px; min-height: 44px; }
  .vd-transcript { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: 38px 156px; gap: 0 14px; padding: 0 16px; border-left: 0; border-top: 1px solid var(--vd-line); }
  .vd-transcript .vd-panel-heading { grid-column: 1/-1; height: 38px; font-size: 13px; }
  .vd-caption-list { gap: 2px; padding-bottom: 8px; }
  .vd-caption-empty { gap: 5px; padding: 2px 0 7px; font-size: 12px; }
  .vd-caption-empty small { font-size: 11px; }
  .vuel-demo .vd-caption-empty button { min-height: 44px; padding: 6px 10px; font-size: 12px; }
  .vuel-demo .vd-caption-row { min-height: 48px; gap: 1px; padding: 4px 7px; }
  .vd-caption-time { font-size: 11px; word-spacing: 6px; }
  .vd-caption-copy { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .vd-caption-editor { padding: 0 0 10px; border: 0; gap: 5px; }
  .vd-caption-editor label { font-size: 12px; }
  .vd-caption-editor textarea { min-height: 76px; height: 76px; padding: 7px 9px; font-size: 16px; line-height: 1.45; }
  .vd-caption-editor > span { font-size: 11px; line-height: 1.5; }
  .vd-timeline-toolbar { height: 40px; padding-inline: 16px; }
  .vd-timeline-toolbar strong { font-size: 13px; }
  .vd-timeline-hint { display: none; }
  .vd-cut-summary { font-size: 12px; }
  .vd-timeline-body { height: 124px; grid-template-columns: 47px 1fr; padding-right: 16px; }
  .vd-track-labels, .vd-track-region { grid-template-rows: 27px 45px 29px; gap: 4px; }
  .vd-track-labels span { padding-left: 10px; font-size: 11px; }
  .vd-track-labels svg { display: none; }
  .vd-track-region { margin-left: 8px; }
  .vd-ruler { font-size: 11px; }
  .vd-ruler span:nth-child(even) { visibility: hidden; }
  .vd-video-clip > span, .vd-gap { font-size: 11px; }
  .vd-subtitle-track > span { inset-block: 3px; padding-inline: 4px; font-size: 12px; line-height: 21px; }
  .vd-footer { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding-inline: 16px; font-size: 11px; }
  .vd-notice { max-width: 100%; }
  .vd-sample-note { max-width: 100%; font-size: 10px; }
}
@media (max-width: 380px) {
  .vd-actions { gap: 4px; }
  .vuel-demo .vd-actions button { padding-inline: 6px; font-size: 12px; }
  .vd-export svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vuel-demo * { transition: none !important; scroll-behavior: auto !important; }
}
.motion-reduced .vuel-demo * { transition: none !important; scroll-behavior: auto !important; }
