:root {
  color-scheme: dark;
  --bg: #0e0e11;
  --panel: #18181c;
  --panel-hover: #222228;
  --line: #26262e;
  --line-strong: #383844;
  --muted: #8c909c;
  --muted-light: #b0b4c0;
  --text: #ffffff;
  --text-secondary: #9ea2ae;
  --accent: #00f0ff;
  --accent-hover: #33f3ff;
  --accent-dim: rgba(0, 240, 255, 0.12);
  --purple: #9d7df2;
  --danger: #ff5252;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); overflow: hidden; height: 100vh; }
button, input, select, textarea { font: inherit; outline: none; }
button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
button:hover { background: var(--panel-hover); }
button:disabled { opacity: 0.35; cursor: not-allowed; }
button.primary {
  color: #000000;
  background: var(--accent);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
}
button.primary:hover { background: var(--accent-hover); }

input, select, textarea {
  color: var(--text);
  background: #202026;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=range] { accent-color: var(--accent); padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #32323a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #454550; }

/* 1. Top Announcement Banner */
.top-announcement {
  height: 34px;
  background: #141418;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 12px;
  color: var(--muted-light);
  padding: 0 40px;
}
.announcement-content span { font-weight: 400; }
.announcement-content a {
  color: #ffffff;
  text-decoration: underline;
  margin-left: 6px;
  font-weight: 500;
  cursor: pointer;
}
.announcement-content a:hover { color: var(--accent); }
.announcement-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.announcement-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* 2. Topbar Navigation */
.topbar {
  height: 50px;
  background: #121215;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px 0 0;
  flex-shrink: 0;
  user-select: none;
}
.topbar-rail-slot {
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.capcut-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.topbar-drawer-slot {
  width: 340px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
}
.drawer-header-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.drawer-header-dropdown:hover {
  color: #ffffff;
}
.topbar-v-line {
  width: 1px;
  height: 18px;
  background: var(--line);
  flex-shrink: 0;
  margin-right: 14px;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.project-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cloud-offline-icon {
  color: #727785;
  flex-shrink: 0;
}
#project-name {
  width: 140px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 6px;
  transition: all 0.15s ease;
  font-variant-numeric: tabular-nums;
}
#project-name:hover, #project-name:focus {
  background: #202026;
  border-color: var(--line);
}
.edit-title-btn {
  background: none;
  border: none;
  padding: 4px;
  color: var(--muted);
}
.edit-title-btn:hover { color: #fff; }
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #55b685;
  margin-left: 4px;
}

.top-center {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  margin-right: auto;
}
.top-preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-center-sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}
.top-history-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.top-icon-btn {
  background: transparent;
  border: none;
  color: var(--muted-light);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-icon-btn:hover {
  background: var(--panel-hover);
  color: #ffffff;
}
.top-icon-btn.disabled {
  opacity: 0.45;
  cursor: default;
}
.top-zoom-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-light);
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.top-zoom-dropdown:hover {
  background: var(--panel-hover);
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.top-credit-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #181a20;
  border: 1px solid #282a33;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: #9fa4b2;
}
.top-credit-badge span {
  color: #ffffff;
}
.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #25252d;
  padding: 0;
}
.top-file-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1c1d22;
  border: 1px solid #2d2e38;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  min-width: 140px;
}
.top-file-menu[hidden] {
  display: none !important;
}
.top-file-menu .menu-btn {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #e5e7eb;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.top-file-menu .menu-btn:hover {
  color: #00f0ff;
  background: #262630;
}
.capcut-export-btn {
  background: #18191e;
  color: #727785;
  border: 1px solid #2b2e35;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.capcut-export-btn.active, .capcut-export-btn:hover {
  background: linear-gradient(135deg, #00f0ff 0%, #00c6d7 100%);
  color: #000000;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.2);
}

/* 3. Main Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: 72px 340px minmax(360px, 1fr) 360px;
  grid-template-rows: minmax(360px, 1fr) 380px;
  height: calc(100vh - 84px); /* 50px topbar + 34px announcement */
  gap: 1px;
  background: var(--line);
}

/* 4. Left Tool Rail */
.rail {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 72px;
  background: #121215;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
}
.rail button {
  width: 58px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 10.5px;
  border: 1px solid transparent;
}
.rail-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}
.rail button:hover {
  background: #1c1c22;
  color: #ffffff;
}
.rail button.active {
  background: #24272e;
  color: #ffffff;
  border-color: transparent;
}
.rail-help {
  margin-top: auto;
}

/* 5. Left Drawer / Library Panel */
.library {
  grid-row: 1 / 3;
  grid-column: 2;
  width: 340px;
  background: #16171d;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
  border-right: 1px solid var(--line);
}
.panel-title {
  display: none;
}
.drawer-header-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
}
.drawer-header-dropdown h1 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-title h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}
.tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}
#library-content {
  padding: 14px 16px;
  flex: 1;
  overflow-y: auto;
}
.library-foot {
  padding: 10px 14px;
  color: #656b78;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
}
.local-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 6px rgba(0,240,255,0.6);
}

/* AI Prompt Card in Media Drawer */
.ai-prompt-box {
  background: #1f1f26;
  border: 1px solid #2d2d38;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.ai-prompt-box h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}
.ai-prompt-input {
  width: 100%;
  background: #16161b;
  border: 1px solid #282832;
  border-radius: 6px;
  color: #ffffff;
  padding: 8px;
  font-size: 11px;
  resize: none;
  min-height: 52px;
  line-height: 1.5;
}
.ai-prompt-input::placeholder { color: #626572; }
.ai-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.ai-prompt-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  background: #292934;
  color: var(--muted-light);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #373744;
}
.ai-submit-btn {
  background: #2d2d38;
  color: var(--muted-light);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 0;
}
.ai-submit-btn:hover { background: var(--accent); color: #000; }

/* Sub Tabs [업로드] [생성됨] */
.drawer-subtabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.drawer-subtab {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 0 8px;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
}
.drawer-subtab.active {
  color: #ffffff;
}
.drawer-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* Media Upload Dropzone */
.capcut-dropzone {
  border: 1px dashed #3a3b46;
  background: #1c1c22;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.capcut-dropzone:hover {
  border-color: var(--accent);
  background: #1f2228;
}
.dropzone-cloud-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 4px;
}
.dropzone-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}
.dropzone-subtitle {
  font-size: 11px;
  color: var(--muted);
}

/* Other Upload Sources */
.external-upload-section {
  margin-top: 18px;
  text-align: center;
}
.external-upload-title {
  font-size: 11px;
  color: #727684;
  margin-bottom: 10px;
}
.external-upload-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.ext-btn {
  background: #202028;
  border: 1px solid var(--line);
  color: var(--muted-light);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
}
.ext-btn:hover { background: #2a2a34; color: #fff; }

/* Guide Yellow Tooltip */
.capcut-guide-tooltip {
  position: fixed;
  left: 420px;
  top: 500px;
  width: 250px;
  background: #252216;
  border: 1px solid #4a3e1d;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: #dfce9b;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.capcut-guide-tooltip::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #252216;
}
.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #ffe699;
  margin-bottom: 6px;
  font-size: 12px;
}
.tooltip-close {
  border: none;
  background: none;
  color: #a49466;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}
.tooltip-close:hover { color: #ffffff; }
.tooltip-body {
  color: #dfce9b;
  line-height: 1.5;
  margin-bottom: 8px;
}
.tooltip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: #a49466;
}
.tooltip-next-btn {
  background: #facc15;
  color: #1a1708;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  font-size: 11px;
  cursor: pointer;
}
.tooltip-next-btn:hover { background: #eab308; }

/* Asset Cards */
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.asset-card {
  min-width: 0;
  background: #1f1f26;
  border-radius: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.asset-card:hover { border-color: #3b3b48; }
.asset-preview {
  aspect-ratio: 16 / 9;
  background: #141418;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.asset-preview .media-symbol { font-size: 24px; color: var(--muted); }
.asset-preview .add-asset {
  position: absolute;
  bottom: 4px;
  right: 4px;
  border-radius: 50%;
  padding: 0;
  background: #ffffff;
  color: #000000;
  width: 22px;
  height: 22px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.asset-preview .asset-time {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.75);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 9px;
  color: #fff;
}
.asset-card p {
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-secondary);
}

/* 6. Center Player / Preview Area */
.player {
  background: #0e0e11;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0 16px;
}
.player-heading {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-light);
  font-size: 11px;
  flex-shrink: 0;
}
.canvas-ratio-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #18181e;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.canvas-ratio-picker select {
  background: none;
  border: none;
  font-size: 11px;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
}
.canvas-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #0a0a0d;
  border-radius: 8px;
  border: 1px solid #1c1c24;
}
.canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  background: #000000;
}
#empty-preview {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0e0f12;
  z-index: 10;
}
#empty-preview[hidden] {
  display: none !important;
}
.capcut-empty-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.empty-canvas-plus {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #202028;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #2e2e3a;
}
.empty-canvas-plus:hover {
  background: var(--accent);
  color: #000;
  transform: scale(1.05);
}
.capcut-empty-canvas strong {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}
.capcut-empty-canvas p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.empty-canvas-dropbox {
  margin-top: 4px;
  cursor: pointer;
}

/* Player Controls Bar */
.player-controls {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.timecode {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.timecode b { color: #ffffff; font-weight: 600; }
.time-divider { color: #424652; }
.transport {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--muted-light);
  padding: 6px;
  border-radius: 6px;
}
.ctrl-btn:hover { background: #202026; color: #fff; }
.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  padding: 0;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.play-btn:hover { background: var(--accent); }

/* 7. Right Inspector Panel */
.inspector {
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  user-select: none;
}
#inspector-content {
  padding: 14px 16px;
}
.capcut-promo-card {
  margin: 16px 14px;
  background: #1e2025;
  border: 1px solid #282932;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.promo-banner {
  border-radius: 8px;
  overflow: hidden;
  background: #131418;
}
.promo-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.capcut-promo-card h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}
.capcut-promo-card p {
  margin: 0;
  font-size: 11px;
  color: #8c909e;
  line-height: 1.5;
}
.promo-code-box {
  background: #141418;
  border: 1px solid #262630;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 10px;
  color: #9fa4b2;
  overflow-x: auto;
  white-space: nowrap;
}
.copy-promo-btn {
  background: #18282b;
  border: 1px solid #234b52;
  color: #38efda;
  font-size: 11.5px;
  font-weight: 600;
  padding: 9px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-promo-btn:hover {
  background: #203a3f;
  color: #55fbe8;
}

/* Inspector Controls styling */
.inspector .section { border-top: 1px solid var(--line); padding: 12px 0 6px; }
.inspector h3 { font-size: 12px; font-weight: 600; margin: 12px 0 8px; color: #ffffff; display: flex; justify-content: space-between; }
.inspector label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; color: var(--muted-light); font-size: 11px; }
.inspector label input, .inspector label select { width: 110px; text-align: right; }

/* 8. Bottom Timeline */
.timeline {
  grid-column: 3 / 5;
  background: #121215;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.timeline-toolbar {
  height: 44px;
  background: #16161b;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
}
.tl-center-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: auto;
}
.tl-play-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #242630;
  border: 1px solid #323542;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.tl-play-circle:hover {
  background: #323542;
  border-color: #454959;
}
.tl-timecode-box {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #727785;
}
#tl-current-time {
  color: #ffffff;
  font-weight: 500;
}
.tl-time-sep {
  color: #4a4d57;
}
.tl-left-tools, .tl-right-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tl-selection-tools {
  display: none;
}
#selection-count {
  display: none;
}
.tl-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted-light);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
}
.tl-tool-btn:hover { background: #22222a; color: #ffffff; }
.tl-tool-btn.active { color: var(--accent); }
.divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.zoom input { width: 75px; height: 3px; }
.zoom-icon { font-size: 12px; }

.timeline-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.track-labels {
  width: 120px;
  background: #16161b;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  z-index: 2;
}
.track-labels > div {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  font-size: 11px;
  color: var(--muted-light);
  border-bottom: 1px solid #1f1f26;
}
.track-labels .ruler-label {
  height: 28px;
  font-size: 10px;
  color: #5d616e;
}
.track-icon {
  display: flex;
  align-items: center;
  color: var(--muted);
}

#timeline-scroll {
  overflow: auto;
  flex: 1;
  position: relative;
  background: #0f0f13;
}
#timeline-content{position:relative;min-width:100%;height:236px;touch-action:auto}
#timeline-content.selection-mode{touch-action:none}
#selection-touch-hint{min-width:0;overflow-wrap:anywhere;display:none}
#ruler {
  height: 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: #141418;
}
#ruler span {
  position: absolute;
  top: 6px;
  font-size: 10px;
  color: #656976;
  font-variant-numeric: tabular-nums;
}
#ruler span::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 1px;
  height: 4px;
  background: #3c404c;
}
.track {
  height: 52px;
  position: relative;
  border-bottom: 1px solid #1a1a22;
  background: repeating-linear-gradient(to right, transparent 0, transparent 49px, #171720 49px, #171720 50px);
}
.timeline-empty-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3e4250;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}
.clip{position:absolute;top:6px;height:40px;border-radius:6px;border:1px solid #236f69;background:#174b47;color:#b5fff5;overflow:hidden;padding:6px 8px;cursor:grab;user-select:none;touch-action:none;font-size:11px;font-weight:500;}
.clip.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.clip[data-kind=text] {
  background: #3e3258;
  border-color: #65518f;
  color: #e4d7ff;
}
.clip[data-kind=audio] {
  background: #1f3646;
  border-color: #38607c;
  color: #c4e4fb;
}
.clip[data-kind=effect] {
  background: #4a371e;
  border-color: #8c6a34;
  color: #ffeed1;
}

#playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ffffff;
  pointer-events: none;
  z-index: 10;
}
#playhead i {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 14px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.tl-left-tools button span {
  display: none;
}
.composition-tools {
  display: none !important;
}
.timeline footer {
  display: none !important;
}
kbd {
  background: #202026;
  color: var(--muted-light);
  padding: 1px 4px;
  border-radius: 3px;
  margin: 0 2px;
}

/* 9. Welcome to CapCut Modal (Reference match) */
.welcome-modal {
  border: none;
  background: #ffffff;
  color: #121214;
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  width: 440px;
  max-width: 90vw;
}
.welcome-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.welcome-box {
  display: flex;
  flex-direction: column;
  position: relative;
}
.welcome-close {
  position: absolute;
  top: -16px;
  right: -16px;
  background: none;
  border: none;
  color: #1c1c1f;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}
.welcome-close:hover { background: #f0f0f2; }
.welcome-box h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #111113;
}
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-btn {
  height: 44px;
  border: 1px solid #e1e3e8;
  background: #ffffff;
  color: #1c1d21;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-btn:hover {
  background: #f7f8fa;
  border-color: #cbced6;
}
.auth-btn.google-btn {
  background: #111215;
  color: #ffffff;
  border-color: #111215;
}
.auth-btn.google-btn:hover {
  background: #23252a;
}
.welcome-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: #8c909e;
  line-height: 1.5;
}
.welcome-footer a {
  color: #111215;
  text-decoration: underline;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c24;
  border: 1px solid var(--accent);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 9999;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Modal Dialogs */
dialog:not(.welcome-modal) {
  width: 480px;
  max-width: 92vw;
  background: #18181f;
  border: 1px solid #2d2d38;
  color: var(--text);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7);
}
dialog::backdrop {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

/* Subscription & Promotion Exclusions (구독 제외) */
#top-announcement { display: none !important; }
.workspace { height: calc(100vh - 50px) !important; }
.top-credit-badge { display: none !important; }
#cart-btn { display: none !important; }
.capcut-promo-card { display: none !important; }
#welcome-dialog { display: none !important; }

/* Dialog building blocks shared by tool dialogs (captions, templates, crop, text). */
dialog .close { float: right; margin: -12px -12px 0 0; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
dialog .close:hover { background: #2a2a35; }
dialog .eyebrow { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; letter-spacing: .12em; }
dialog h2 { margin: 0 0 10px; font-size: 18px; }
dialog .muted { color: var(--muted, #9a9aa6); font-size: 12px; }
dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
dialog [role=status]:empty { display: none; }
.caption-dialog, .template-dialog { width: 860px; max-height: 92dvh; overflow: auto; }
.caption-dialog .caption-setup { display: flex; align-items: end; gap: 12px; margin: 12px 0; }
.caption-dialog .caption-setup label, .template-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted, #9a9aa6); }
.caption-dialog audio { width: 100%; margin: 8px 0; }
.caption-dialog #caption-cues { display: grid; gap: 10px; max-height: 44dvh; overflow: auto; }
.caption-dialog .caption-cue { padding: 10px; border: 1px solid var(--line, #2d2d38); border-radius: 8px; }
.caption-dialog .caption-cue-heading, .caption-dialog .caption-cue-times { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.caption-dialog .caption-cue-heading strong { margin-right: auto; }
.caption-dialog .caption-text-label { display: grid; gap: 4px; margin-top: 8px; }
.caption-dialog textarea, .template-save-dialog textarea, .template-dialog textarea { width: 100%; box-sizing: border-box; }
.template-dialog .template-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.template-dialog #template-preview { display: block; width: 100%; height: auto; background: #000; border-radius: 6px; }
.template-dialog .template-time { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; }
.template-dialog #template-fields { display: grid; gap: 12px; align-content: start; max-height: 50dvh; overflow: auto; }
.template-dialog .template-field { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line, #2d2d38); border-radius: 8px; font-size: 12px; }
.template-save-dialog .template-label { margin-bottom: 12px; }
.template-save-dialog .template-slots { max-height: 36dvh; overflow: auto; border: 1px solid var(--line, #2d2d38); border-radius: 8px; }
.template-save-dialog #template-slot-options label { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; }
@media (max-width: 700px) { .template-dialog .template-editor { grid-template-columns: 1fr; } }
