:root {
  --bg: #0b0b0f;
  --bg-glow: radial-gradient(1200px 600px at 50% -10%, rgba(168,85,247,0.10), transparent 60%);
  --card-bg: #15151b;
  --card-bg-raised: #1a1a22;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f0f0f4;
  --text-muted: #8f8f9c;
  --text-faint: #63636e;
  --purple: #a855f7;
  --purple-soft: rgba(168,85,247,0.14);
  --purple-hover: #bb7bfa;
  --success: #4ade80;
  --error: #f87171;
  --stop: #b3413d;
  --stop-hover: #c85450;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Pretendard", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.view { max-width: 1080px; margin: 0 auto; padding: 12px 24px 14px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* 로그인 화면(.overlay, z-index:50) 위에도 떠야 해서 고정 위치 + 더 높은 z-index로 둠 -
   보일 때만 body에 lan-hint-visible을 줘서 그만큼 내용을 아래로 밀어냄(안 보일 땐 레이아웃
   그대로 유지). */
.lan-hint-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--purple-soft); border-bottom: 1px solid var(--purple);
  font-size: 12px; color: var(--text); backdrop-filter: blur(3px);
}
.lan-hint-banner span { flex: 1; }
.lan-hint-banner a {
  color: var(--purple); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.lan-hint-banner a:hover { text-decoration: underline; }
body.lan-hint-visible { padding-top: 42px; }
.topbar h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.main-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.main-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 4px;
  margin-right: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease;
}
.main-tab-btn:hover { color: var(--text); }
.tab-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--error);
  margin-left: 5px;
  vertical-align: super;
}
.main-tab-btn.active { color: var(--text); border-bottom-color: var(--purple); }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 12px 18px;
  margin-bottom: 10px;
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: #2a2a33;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--purple); color: #14000f; }
.btn-primary:hover:not(:disabled) { background: var(--purple-hover); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.btn-icon {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 9px 11px;
  border: 1px solid var(--border);
}
.btn-icon:hover:not(:disabled) { background: rgba(255,255,255,0.10); }
.btn-stop { background: var(--stop) !important; color: #fff !important; }
.btn-stop:hover:not(:disabled) { background: var(--stop-hover) !important; }
.btn-wide { width: 100%; margin-top: 18px; }
.link-btn {
  background: none; border: none; color: var(--text); cursor: pointer;
  font-size: 14px; font-weight: 700; padding: 4px 0; letter-spacing: -0.01em;
}

#sheet-card-body { margin-top: 8px; }

.muted { color: var(--text-muted); }
.muted-inline { color: var(--text-muted); font-size: 12px; }
#result-breakdown-label { margin-top: -8px; margin-bottom: 12px; }

/* ---- auth modal (브라우저 네이티브 인증 팝업 느낌) ---- */
.auth-modal {
  background: var(--card-bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 90vw;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.auth-modal-header { padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.auth-modal-header h2 { margin: 0 0 5px; font-size: 16px; font-weight: 700; }
.auth-modal-header p { margin: 0; font-size: 12px; color: var(--text-muted); }
.auth-modal-body { padding: 18px 22px; }
.auth-modal-body input { width: 100%; }
.password-field-row { display: flex; gap: 8px; margin-bottom: 10px; }
.password-field-row input { flex: 1; min-width: 0; margin-bottom: 0 !important; }
.password-field-row button { flex-shrink: 0; }

.auth-google-section { margin-top: 14px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text-muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
#auth-google-btn { display: flex; justify-content: center; }
.auth-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* ---- onboarding ---- */
.onboarding-card {
  max-width: 460px;
  margin: 60px auto;
  background: var(--card-bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
}
.onboarding-card h1 { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.onboarding-step { margin-top: 24px; }
.onboarding-step h2 { font-size: 13px; font-weight: 700; margin: 0 0 5px; }
.hint { font-size: 11.5px; color: var(--text-muted); margin: 0 0 10px; line-height: 1.5; }

.rag-actions-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.sprint-week-input { width: 90px; }

.sprint-tabs-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.sprint-tabs-row { display: flex; gap: 8px; align-items: center; }
.sprint-tabs-row select { flex: 0 0 90px; }
.sprint-tabs-row input { flex: 1; min-width: 0; }
.sprint-tab-handle {
  flex: 0 0 auto; width: 16px; text-align: center; cursor: grab;
  color: var(--text-muted); font-size: 15px; user-select: none;
}
.sprint-tab-handle:active { cursor: grabbing; }
.sprint-tabs-row.dragging { opacity: 0.4; }
.sprint-tabs-actions-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 18px; }

.days-picker { position: relative; }
.days-picker-popover {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 10;
  background: var(--card-bg-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  padding: 12px; display: flex; flex-direction: column; gap: 8px; width: 200px;
}
.days-picker-popover label { font-size: 12px; color: var(--text-muted); }
.days-picker-popover input, .days-picker-popover select { width: 100%; }
.status-line { font-size: 12px; margin: 4px 0 8px; }
.status-info { color: var(--text-muted); }
.status-success { color: var(--success); }
.status-error { color: var(--error); }
.status-progress { color: var(--purple); }
.file-btn { display: inline-block; }
.token-row { display: flex; gap: 8px; }
.token-row input { flex: 1; min-width: 0; }
.token-row button { white-space: nowrap; flex-shrink: 0; }

input[type="text"], input[type="number"], input[type="password"], select {
  background: #0e0e12;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-soft);
}
input::placeholder { color: var(--text-faint); }

/* ---- sheet card ---- */
.sheet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-row label { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.sheet-row input[type="text"] { flex: 1; min-width: 200px; }
#sheet-status:empty { display: none; }

/* ---- tagging settings (run-row에 같이 들어가는 인라인 설정) ---- */
.setting-inline { display: flex; align-items: center; gap: 6px; }
.setting-inline label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.setting-inline input { width: 64px; }

/* 이미지/비디오 시소 토글 - 두 옵션 중 하나를 항상 고르는 형태라 role-btn 세그먼트와 같은 톤 */
.mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.mode-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-btn.active { background: var(--purple); color: #14000f; }

/* ---- workflow ---- */
.workflow-header { margin-bottom: 8px; }
.workflow-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.workflow-title-row #search-input { flex: 1; min-width: 160px; }
.estimate-row { display: flex; align-items: center; gap: 12px; }
.checkbox-inline { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.checkbox-inline input { accent-color: var(--purple); }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.table-scroll th, .table-scroll td { white-space: nowrap; } /* 좁은 화면에서 줄바꿈 대신 가로 스크롤되게 */

/* video-table은 JS에서 10개씩 페이지네이션해서 높이가 자연히 제한되지만, result-table은
   페이지네이션이 없어서 태깅 건수만큼 그대로 다 쌓여 표시됨 - 배치가 크면(50건+) 페이지
   전체가 한없이 길어짐(실제 보고된 문제). 세로 스크롤 가능한 고정 높이로 감쌈. */
#result-body .table-scroll { max-height: 287px; overflow-y: auto; } /* 헤더(26.5) + 10행(26 x 10) 실측값 - 10줄만 보이고 나머진 드래그로 스크롤 */
#result-body thead th { position: sticky; top: 0; z-index: 1; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 6px 12px;
  background: #1c1c24;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
tbody td { padding: 5px 12px; border-top: 1px solid var(--border); }
tbody tr { cursor: pointer; transition: background 0.1s ease; }
tbody tr:hover { background: rgba(255,255,255,0.035); }
tbody tr.selected-row { background: var(--purple-soft); }
tbody tr.failed-row td:nth-child(3) { color: var(--error); }
tbody tr.duplicate-row { opacity: 0.55; }
.dup-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text-muted); font-size: 10px; font-weight: 700;
  vertical-align: middle;
}
.col-check { width: 30px; }
td.mono { font-family: "SF Mono", Menlo, monospace; font-size: 12px; color: var(--text-muted); }
.loading-cell { text-align: center; color: var(--text-muted); padding: 28px 12px !important; cursor: default; }
tbody tr:has(.loading-cell):hover { background: none; }
tbody input[type="checkbox"] { accent-color: var(--purple); }

.pagination { display: flex; justify-content: center; gap: 4px; margin: 6px 0 0; }
.pagination button {
  min-width: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.pagination button:hover:not(:disabled):not(.active) { background: rgba(255,255,255,0.06); color: var(--text); }
.pagination button.active { background: var(--purple); color: #14000f; }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination span.ellipsis { color: var(--text-faint); padding: 5px; }

/* 표(왼쪽, 넓게) + 미리보기(오른쪽, 고정폭)를 좌우로 둬서 예전에 세로로 쌓이던 높이를
   줄임 - preview-row가 sticky라 표를 스크롤해도 미리보기는 그 자리에 계속 보임. */
.workflow-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.workflow-main { min-width: 0; } /* 표가 넓어져도 grid 컬럼 폭을 안 밀어내게 */

.preview-row { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.preview-video, .preview-frames { min-width: 0; }
/* LIGHTWEIGHT_THUMBNAILS(GCP)일 때만 - 썸네일 1장만 덩그러니 표 옆에 붙어있으면 붕 떠
   보여서(표는 훨씬 길고 썸네일 영역만 짧음) 카드처럼 감싸고 여유 있는 min-height 안에서
   세로 중앙 정렬함. preview-row 자체를 표 높이만큼 늘리진 않음 - 늘리면 sticky(스크롤해도
   계속 보이는 것)가 무의미해짐(이미 표만큼 크면 더 떠 있을 공간이 없음). */
.preview-frames:has(.frame-thumbs.single-thumb) {
  /* 바깥 #workflow-card가 이미 --card-bg 배경이라 여기도 같은 색을 쓰면 테두리만 둘 겹친
     것처럼 어긋나 보임(실제 지적된 문제) - card-bg-raised로 한 톤 밝게 구분하고 radius도
     바깥 카드(--radius-lg)에 맞춤. */
  background: var(--card-bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}
.preview-label { font-size: 11.5px; color: var(--text-faint); margin-bottom: 8px; }
#preview-video-el { width: 100%; max-height: 320px; border-radius: var(--radius-md); background: #000; border: 1px solid var(--border); }
.frame-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.frame-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; display: block; border: 1px solid var(--border); }
/* LIGHTWEIGHT_THUMBNAILS 배포(GCP 등)용 - 영상 재생 없이 CDN 정적 썸네일 1장만 옴,
   2칸 그리드에 억지로 끼우면 반쪽만 채워져서 어색해짐 - 한 칸 꽉 채워 크게 보여줌. */
.frame-thumbs.single-thumb { grid-template-columns: 1fr; }
/* height를 명시 안 하면(auto가 기본값이지만) max-height+aspect-ratio+object-fit 조합에서
   높이가 종종 max-height(320px)를 그대로 써버려 실제로는 16:9가 아니라 거의 정사각형으로
   렌더링됨(실측 확인 - width:300px면 16:9 계산상 168.75px여야 하는데 320px로 나옴) -
   height:auto를 명시해서 폭 기준으로 높이를 제대로 계산하게 강제함. max-height는 모바일
   (좁은 화면에서 workflow-grid가 세로로 쌓여 폭이 넓어질 때) 이미지가 너무 커지는 걸
   막는 안전장치로만 남겨둠. */
.frame-thumbs.single-thumb img { aspect-ratio: 16 / 9; height: auto; max-height: 320px; cursor: zoom-in; }

/* GCP에서 poster 모드로 이미지/비디오 토글이 없어지면서 남은 컨트롤 몇 개만 4px
   간격으로 다닥다닥 붙어있는 게 좁고 답답해 보인다는 지적 - 12px로 늘림. */
.run-row { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.run-row.run-row-divided { padding-top: 8px; border-top: 1px solid var(--border); }
.run-row .btn { padding: 7px 10px; font-size: 12px; }
.run-row .setting-inline { gap: 4px; }
.run-row .setting-inline label { font-size: 11px; }
.run-row .setting-inline input { width: 58px; }


/* ---- postprocess ---- */
.pp-report {
  white-space: pre-wrap; font-family: "SF Mono", Menlo, monospace; font-size: 12px;
  background: #0e0e12; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; margin-top: 12px; max-height: 200px; overflow-y: auto; color: var(--text-muted);
}
textarea.pp-report { width: 100%; resize: vertical; outline: none; }
textarea.pp-report:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.clip-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.clip-row {
  display: flex; align-items: baseline; gap: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.clip-id-btn {
  background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 3px 8px; font-size: 11px;
  font-family: "SF Mono", Menlo, monospace; cursor: pointer; transition: background 0.15s ease;
  flex-shrink: 0;
}
.clip-id-btn:hover { background: var(--purple); color: #14000f; border-color: var(--purple); }
.clip-reasons { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ---- log ---- */
.log-header-actions { display: flex; align-items: center; gap: 10px; }
#log-copy-btn { padding: 4px 8px; font-size: 12px; }
.log-box {
  background: #0e0e12; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; height: 220px; overflow-y: auto; margin-top: 12px;
  font-family: "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; color: var(--text-muted);
}

.progress-bar-track {
  height: 8px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 0%; border-radius: 999px; background: var(--purple);
  transition: width 0.3s ease, background 0.3s ease;
}
.progress-bar-fill.done { background: var(--success); }
.progress-bar-fill.has-failures { background: var(--error); }

.progress-summary-row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px;
}
.progress-summary-row .status-line { margin: 0; flex: 1; }
.progress-stats { display: flex; gap: 8px; flex-shrink: 0; }
.stat-chip {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.stat-chip-success { background: rgba(74,222,128,0.14); color: var(--success); }
.stat-chip-fail { background: rgba(248,113,113,0.14); color: var(--error); }

/* ---- settings overlay ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(6,6,9,0.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.apply-flash { font-size: 12px; color: var(--success); min-width: 60px; font-weight: 600; }

/* ---- 프롬프트 수정 모달 ---- */
.prompt-modal {
  background: var(--card-bg-raised); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  width: 720px; max-width: 92vw; max-height: 85vh; overflow-y: auto; padding: 22px;
}
.prompt-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.app-settings-modal { width: 440px; }
.app-settings-modal .onboarding-step:first-of-type { margin-top: 0; }
.prompt-modal-header h2 { margin: 0; font-size: 16px; font-weight: 700; }
.prompt-field { margin-bottom: 22px; }
.prompt-field textarea {
  width: 100%; background: #0e0e12; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5;
  resize: none; overflow-y: hidden; outline: none; /* 자동 높이 조절 - 스크롤은 모달 하나만 */
}
.prompt-field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.prompt-actions-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.claude-edit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #D97757; color: #fff;
}
.claude-edit-btn:hover:not(:disabled) { background: #c76a4a; }
.claude-mark { flex-shrink: 0; }

.settings-role-row { display: flex; gap: 6px; margin: 10px 0 14px; }
#advanced-role-toggle-btn { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.card-header-row { display: flex; align-items: center; justify-content: space-between; }
.role-btn {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text);
  padding: 7px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 600;
}
.role-btn.active { background: var(--purple); border-color: var(--purple); color: #14000f; }
.role-btn-add { flex: 0 0 auto; width: 34px; }

/* 추가 목적지 - 소스/일반/SBS 옆에 같은 role-btn 모양으로 붙임(display:contents로 이
   <span> 래퍼가 레이아웃엔 안 끼고 안의 칩들만 부모 flex row에 직접 참여하게 함) */
.extra-destinations-inline { display: contents; }
.dest-chip {
  position: relative; flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); padding: 7px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: default; text-align: center;
}
.dest-chip-remove {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--red, #e5484d); color: #fff; border: none; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transform: scale(0.8); transition: opacity 0.12s, transform 0.12s; pointer-events: none;
}
.dest-chip:hover .dest-chip-remove { opacity: 1; transform: scale(1); pointer-events: auto; }
.add-destination-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.add-destination-form input { width: 100%; }
.add-destination-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---- lightbox ---- */
#lightbox-overlay { cursor: zoom-out; }
#lightbox-img { max-width: 92vw; max-height: 92vh; border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,0.6); }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card-bg-raised); border: 1px solid var(--border-strong); color: var(--text);
  padding: 10px 18px; border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  font-size: 13px; font-weight: 600; z-index: 100;
}

/* ---- 태블릿 이하: 표+미리보기 좌우 2열 유지하기엔 좁아서 다시 세로로 쌓음 ---- */
@media (max-width: 1000px) {
  .workflow-grid { grid-template-columns: 1fr; }
  .preview-row { position: static; }
}

/* ---- 모바일(실제로 팀원들이 폰 브라우저로 접속해서 씀) ---- */
@media (max-width: 640px) {
  .view { padding: 16px 12px 40px; }
  .card { padding: 16px 14px; }
  .topbar h1 { font-size: 18px; }
  .main-tab-btn { margin-right: 14px; font-size: 13px; }

  .days-picker-popover { right: auto; left: 0; width: min(220px, calc(100vw - 56px)); }
}
