:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
  --chip: #eef0f3;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --panel: #1e2125;
    --text: #e6e8eb;
    --muted: #9aa1aa;
    --line: #30343a;
    --accent: #3b82f6;
    --chip: #2a2e34;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
body.no-scroll { overflow: hidden; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* 버튼·입력 */
.btn {
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.danger { color: var(--danger); }
.btn.primary.danger, .btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-style: dashed; }
.btn.small { padding: 3px 9px; font-size: 13px; }
.btn.big { font-size: 17px; padding: 12px 28px; font-weight: 700; }

/* 숨쉬듯 은은하게 빛나는 버튼 (눌러야 할 곳 안내) */
@keyframes breathe-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); border-color: var(--line); }
  50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, .28); border-color: var(--accent); }
}
@keyframes breathe-solid {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); filter: brightness(1); }
  50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, .32); filter: brightness(1.12); }
}
/* [사용 방법] 버튼: 파란 안쪽과 로즈 핑크 테두리가 번갈아 숨쉬기
   (안쪽이 가장 밝을 때 테두리는 꺼지고, 테두리가 가장 밝을 때 안쪽은 어두워진다) */
@keyframes breathe-rose {
  0%, 100% {
    background-color: rgb(59, 130, 246);
    border-color: rgba(244, 114, 182, 0);
    box-shadow: 0 0 0 0 rgba(244, 114, 182, 0);
  }
  50% {
    background-color: rgb(30, 58, 138);
    border-color: #f472b6;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, .38);
  }
}
.btn.breathe { animation: breathe-ring 2.4s ease-in-out infinite; }
/* 파란 채움 + 핑크 테두리 교차 숨쉬기: [사용 방법](안내를 닫았을 때), [필요한 화면 모두 공유] */
.btn.breathe-pink { animation: breathe-rose 2.4s ease-in-out infinite; background: var(--accent); color: var(--accent-text); }
.btn.breathe-pink:hover { animation-play-state: paused; }
.btn.primary.breathe { animation: breathe-solid 2s ease-in-out infinite; }
.btn.breathe:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .btn.breathe, .btn.primary.breathe { animation: none; border-color: var(--accent); }
  .btn.breathe-pink { animation: none; border-color: #f472b6; }
}
.btn.block { width: 100%; }
input[type=text], input[type=number], select {
  font: inherit;
  font-size: 14px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
input[type=number] { width: 80px; }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* 머리말 */
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 19px; }
.beta { font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.privacy { flex: 1; font-size: 13px; color: var(--ok); font-weight: 600; }
/* 머리말 버튼들은 모두 같은 크기 (가장 긴 "설정 내보내기"에 맞춤) */
.top-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.unsupported { background: #fff4e5; color: #8a4b00; padding: 10px 20px; border-bottom: 1px solid #f3d9b1; }
@media (prefers-color-scheme: dark) { .unsupported { background: #3a2a12; color: #f5c27a; border-color: #5a4220; } }

/* 배치 */
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; padding: 20px; max-width: 1400px; margin: 0 auto; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.sets { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; align-self: start; position: sticky; top: 12px; }
.sets h2 { margin-bottom: 10px; }
.sets ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.set-btn { width: 100%; text-align: left; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; display: flex; flex-direction: column; }
.set-btn small { color: var(--muted); font-size: 12px; }
.sets li.active .set-btn { background: var(--chip); border-color: var(--accent); font-weight: 700; }
.set-tools { display: flex; gap: 6px; margin-top: 8px; }
.work { display: grid; gap: 16px; min-width: 0; }

.card, .notice { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.card-head > div { display: flex; gap: 8px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; margin-right: 6px; }
.step.wide { width: auto; min-width: 24px; padding: 0 8px; border-radius: 12px; }
.step-sep { color: var(--muted); margin: 0 6px; font-weight: 400; }
.notice { position: relative; border-color: var(--accent); }
.notice-title { margin: 0 0 14px; }
.howto { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: start; }
.howto-step { display: grid; gap: 8px; padding: 6px; margin: -6px; border: 1.5px solid transparent; border-radius: 14px; }
/* 지금 조작 중인 단계: 채움 없이 핑크 테두리만 숨쉬기 (카드 + 아래 설명까지) */
.howto-step.current { animation: breathe-box 2.4s ease-in-out infinite; }
/* 캡처 직후 결과 칸: 테두리만 핑크로 깜빡임 */
.card.breathe-card { border-width: 1.5px; animation: breathe-box 2.4s ease-in-out infinite; }
/* 이미 지나온 단계: 핑크 테두리 점등 (깜빡이지 않음) */
.howto-step.done { border-color: #f472b6; }
@media (prefers-reduced-motion: reduce) { .howto-step.current { animation: none; border-color: #f472b6; } }
.howto-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
}
.howto-card b { font-size: 16px; }
.howto-card span { color: var(--muted); font-size: 13px; }
.howto-no {
  position: absolute; top: 10px; left: 10px;
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff !important; font-size: 12px !important; font-weight: 700;
}
.howto-icon { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.howto-arrow { align-self: center; margin-top: -40px; color: var(--muted); font-size: 20px; }
.howto-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); background: var(--chip); border-radius: 8px; padding: 8px 10px; }
.howto-note b { color: var(--text); font-weight: 600; }
.howto-note ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 860px) {
  .howto { grid-template-columns: 1fr; }
  .howto-arrow { display: none; }
}
.notice .close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.empty { color: var(--muted); padding: 16px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; margin: 8px 0 0; }

/* 화면 카드 */
.more-hint { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--chip); border-radius: 6px; font-size: 13.5px; }
/* 브레스 효과 (파란 채움 + 핑크 테두리 교차) — 모니터 더 등록 안내 */
.more-hint.breathe-pink, .more-hint.calm {
  animation: breathe-rose 2.4s ease-in-out infinite;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 12px 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}
.more-hint.breathe-pink, .more-hint.calm { cursor: pointer; }
/* 영역 지정을 마친 뒤: 모양은 그대로, 깜빡임만 멈춤 */
.more-hint.calm { animation: none; }
.hint-link { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
/* [몇 대인지 확인]: 안내 상자 오른쪽에 위아래 꽉 차게, 너비 두 배 */
.more-hint.with-btn { display: flex; align-items: center; gap: 16px; padding-right: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.more-hint.with-btn .hint-text { flex: 1; padding: 16px 0; }
.more-hint .hint-btn {
  align-self: stretch;
  width: 214px;
  flex: none;
  margin: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  font-size: 15px;
  font-weight: 700;
}
/* 버튼도 브레스 효과. 같은 효과인 안내 상자와 반 박자 엇갈려(상자가 밝을 때 버튼은 어둡게) 묻히지 않게 */
.more-hint .hint-btn.breathe-pink { animation-delay: -1.2s; }
/* 카드 한 줄에 3장: 미리보기(200)는 그대로, 오른쪽 이름·설명·버튼 칸을 좁게 세로로 쌓는다 */
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 10px; }
.screen { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: grab; user-select: none; }
/* 오른쪽 칸: 미리보기(200) 높이에 맞춰 위→아래로. 이름 칸은 낮게, 주 버튼은 남는 높이를 채워 크게 */
.screen .screen-body { display: flex; flex-direction: column; gap: 5px; min-height: 200px; }
.screen .screen-name { font-size: 13px; padding: 2px 6px; height: 26px; }
.screen .screen-meta { gap: 4px; font-size: 12px; }
.screen .screen-meta .muted { width: 100%; line-height: 1.35; }
.screen .screen-actions { flex: 1; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.screen .screen-actions .btn { width: 100%; }
.screen .screen-actions .btn-main { flex: 1; min-height: 44px; font-size: 16px; font-weight: 700; border-radius: 8px; }
.screen.on { border-color: var(--ok); }
.screen.dragging { opacity: .45; }
/* "2 캡처 순서"에서 이름을 고치는 영역이 있는 화면 */
.screen.editing-target { border-color: #f472b6; box-shadow: 0 0 0 2px #f472b6; }
.screen.drop-before { box-shadow: inset 4px 0 0 var(--accent); }
.screen.drop-after { box-shadow: inset -4px 0 0 var(--accent); }
.screen input, .screen button { cursor: auto; }
.screen button:not(:disabled) { cursor: pointer; }
/* 미리보기: 200×200 칸 안에 화면 비율 그대로 (세로 모니터는 세로로, 가로 모니터는 가로로) */
.thumb-frame { width: 200px; height: 200px; flex: none; display: grid; place-items: center; background: var(--chip); border-radius: 6px; overflow: hidden; }
.thumb { max-width: 200px; max-height: 200px; object-fit: contain; display: block; border-radius: 4px; }
.thumb.none { width: 100%; height: 100%; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.screen-body { display: grid; gap: 5px; min-width: 0; flex: 1; }
.screen-name { font-weight: 700; width: 100%; }
.screen-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.screen-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--chip); color: var(--muted); }
.chip.ok { background: #dcfce7; color: #166534; }
.chip.warn { background: #fef3c7; color: #92400e; }

/* 영역 표 */
.set-options { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0; }
.var-example { font-size: 12.5px; color: var(--muted); background: var(--chip); border-radius: 6px; padding: 3px 8px; }
table.regions { width: 100%; border-collapse: collapse; margin-top: 6px; }
table.regions th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
table.regions td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
table.regions td.no { font-variant-numeric: tabular-nums; color: var(--muted); width: 60px; }
table.regions td input[type=text] { width: 100%; min-width: 140px; }
table.regions .center { text-align: center; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 2px; }

/* 실행 */
.run-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 12px; }
/* 캡처 실행 설정: 칸별 상자 */
.run-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); display: grid; gap: 8px; align-content: start; }
.opt-wide { grid-column: span 2; }
.opt-label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.opt-help { margin: 0; font-size: 12px; color: var(--muted); }
.opt input[type=number] { width: 70px; }
.opt input[type=text], .opt select { width: 100%; }
/* 저장 방식: 고른 쪽 상자가 핑크 테두리로 켜짐(점등) */
.save-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.save-tile { font: inherit; text-align: left; display: grid; gap: 3px; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.save-tile b { font-size: 14px; }
.save-tile span { font-size: 12px; color: var(--muted); }
.save-tile:hover:not(:disabled) { border-color: var(--accent); }
.save-tile.on { border-color: #f472b6; background: rgba(59, 130, 246, .12); }
.save-tile:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 860px) { .opt-wide { grid-column: auto; } }
#saveFolder .folder { display: grid; gap: 8px; justify-items: start; color: var(--text); font-size: 13.5px; }
.save-mode { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.folder { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.preview { color: var(--muted); font-size: 13px; word-break: break-all; }
.warn { color: var(--warn); font-weight: 600; }

/* 결과 */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.result { border: 2px solid var(--line); border-radius: 8px; padding: 6px; display: grid; gap: 6px; }
.result.sel { border-color: var(--accent); }
.result.error { border-color: var(--danger); }
.result img { width: 100%; height: 130px; object-fit: contain; background: var(--chip); border-radius: 4px; display: block; }
.result img.zoomable { cursor: zoom-in; }
/* 결과 크게 보기 */
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(8, 9, 11, .92); display: grid; place-items: center; overflow: hidden; }
.viewer-nav, .viewer-close, .viewer-cap { z-index: 1; } /* 확대한 이미지보다 위에 */
.viewer-img { max-width: calc(100vw - 160px); max-height: calc(100vh - 110px); object-fit: contain; background: #fff; box-shadow: 0 10px 50px rgba(0,0,0,.5); cursor: zoom-out; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 72px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 24px; cursor: pointer; }
.viewer-nav:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.viewer-nav:disabled { opacity: .25; cursor: default; }
.viewer-nav.prev { left: 20px; }
.viewer-nav.next { right: 20px; }
.viewer-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; cursor: pointer; }
.viewer-close:hover { background: rgba(255,255,255,.28); }
.viewer-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #cbd5e1; font-size: 14px; white-space: pre; }
.result .no-img { height: 130px; display: grid; place-items: center; background: var(--chip); border-radius: 4px; color: var(--muted); font-size: 13px; text-align: center; padding: 6px; }
.result label { font-size: 13px; word-break: break-all; }

.foot { max-width: 1400px; margin: 0 auto; padding: 0 20px 30px; color: var(--muted); font-size: 13px; }
.other-services a { color: var(--accent); text-decoration: none; }
.other-services a:hover { text-decoration: underline; }

/* 영역 지정 화면 */
.editor { position: fixed; inset: 0; z-index: 50; background: #0d0f12; color: #e6e8eb; display: flex; flex-direction: column; outline: none; }
.ed-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid #2a2e34; flex-wrap: wrap; }
.ed-title { font-size: 16px; }
.ed-status { flex: 1; color: #fbbf24; font-weight: 600; }
/* 화면 받기 두 버튼은 붙여 두고, 완료·취소와는 간격을 둔다 */
.ed-actions { display: flex; gap: 28px; }
.ed-group { display: flex; gap: 6px; }
/* 위쪽 버튼은 모두 같은 크기 */
.ed-top .btn { width: 158px; text-align: center; padding-left: 6px; padding-right: 6px; }
/* 영역 고르기 아래 전체 화면 버튼 */
.editor .btn.ed-full { width: 100%; margin: -8px 0 6px; }
.ed-rotate { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
/* 두 버튼이 "전체 화면으로 보기" 상자 너비 안에 반씩 들어가게 */
.ed-rotate .btn { min-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; padding-right: 6px; }
.editor .btn { background: #1e2125; color: #e6e8eb; border-color: #3a3f46; }
.editor .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.editor .btn.danger { color: #f87171; }
.ed-body { flex: 1; display: flex; min-height: 0; }
.ed-stage-wrap { flex: 1; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #060708; }
.ed-stage-wrap canvas { position: absolute; left: 0; top: 0; }
.ed-zoombar { display: flex; gap: 6px; align-items: center; }
.ed-zoom { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; color: #9aa1aa; font-size: 13px; }
.ed-ov { cursor: crosshair; touch-action: none; }
.ed-side { width: 320px; flex: none; border-left: 1px solid #2a2e34; padding: 14px; overflow-y: auto; }
.ed-list { display: grid; gap: 8px; }
.ed-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
.ed-mode { font: inherit; display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid #3a3f46; background: #15171a; color: #e6e8eb; }
.ed-mode b { font-size: 13px; }
.ed-mode span { font-size: 11px; color: #9aa1aa; }
.ed-mode.on { border-color: var(--accent); }
button.ed-mode { cursor: pointer; }
button.ed-mode:hover { border-color: var(--accent); background: #1b2233; }
.badge.full { background: #0f766e; }
.chip.kind { background: transparent; border: 1px solid var(--line); }
.ed-item { border: 1px solid #2a2e34; border-radius: 8px; padding: 8px; display: grid; gap: 6px; font-size: 13px; }
.ed-item.selected { border-color: #ff4d4f; }
.ed-item-head { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.ed-item-head input { flex: 1 1 120px; min-width: 0; }
.ed-side { overflow-x: hidden; }
.ed-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ed-nums .num { display: grid; font-size: 11px; color: #9aa1aa; }
.ed-nums input { width: 100%; padding: 3px 4px; }
.editor input[type=text], .editor input[type=number] { background: #15171a; color: #e6e8eb; border-color: #3a3f46; }
.badge { font-size: 11px; background: #1971c2; color: #fff; border-radius: 4px; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.ed-item.selected .badge { background: #ff4d4f; }
/* 조작 방법 상자: 핑크 테두리가 은은하게 숨쉬어 눈에 띄게 */
@keyframes breathe-box {
  0%, 100% { border-color: #3a3f46; box-shadow: 0 0 0 0 rgba(244, 114, 182, 0); }
  50% { border-color: #f472b6; box-shadow: 0 0 0 3px rgba(244, 114, 182, .25); }
}
.ed-hint {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #3a3f46;
  border-radius: 10px;
  background: #15171a;
  display: grid;
  gap: 6px;
  animation: breathe-box 2.4s ease-in-out infinite;
}
.ed-hint-title { font-size: 14px; color: #f9a8d4; margin-bottom: 2px; }
.ed-tip { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; font-size: 13px; color: #e6e8eb; }
.ed-key { justify-self: start; font-size: 12px; padding: 1px 7px; border-radius: 5px; background: #2a2e34; border: 1px solid #3a3f46; color: #cbd5e1; white-space: nowrap; }
.ed-hint-note { margin: 4px 0 0; font-size: 12px; color: #9aa1aa; }
/* 브레스 효과 (파란 채움 + 핑크 테두리 교차) — 조작 방법 아래 안내 문구 */
.ed-hint-note.breathe-pink {
  animation: breathe-rose 2.4s ease-in-out infinite;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 8px;
}
.ed-hint-note.clickable { cursor: pointer; }
.ed-hint-note.clickable:hover .ed-link { color: #fde7f3; }
.ed-link { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.ed-link:hover { color: #fde7f3; }
@media (prefers-reduced-motion: reduce) { .ed-hint { animation: none; border-color: #f472b6; } }

/* 실행 중 창 */
.run-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: none; place-items: center; }
.run-overlay.show { display: grid; }
/* 진행 창 위쪽 주황 안내 줄 (영역 지정 화면의 안내 글씨와 같은 색) */
.run-status { position: absolute; top: 0; left: 0; right: 0; padding: 12px 16px; background: #1e2125; border-bottom: 1px solid #3a3f46; color: #fbbf24; font-weight: 700; font-size: 16px; text-align: center; }
.run-box { background: var(--panel); color: var(--text); border-radius: 12px; padding: 18px 20px; min-width: 340px; max-width: 520px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.run-title { font-weight: 700; font-size: 16px; }
.run-msg { margin: 6px 0 12px; color: var(--muted); }
.run-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.run-check { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
/* 안내 창 글 중 꼭 봐야 할 말 (붉게) */
.run-em { color: var(--danger); font-weight: 700; }
@media (prefers-color-scheme: dark) { .run-em { color: #f87171; } }
.run-period { font: inherit; font-size: 14px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.dlg-thumb { display: block; width: 100%; max-height: 220px; object-fit: contain; background: var(--chip); border-radius: 8px; margin: 10px 0 4px; }
.run-box.dlg .warn { margin: 0 0 10px; }
/* 누른 버튼 바로 아래에 [공유 시작]이 오도록 놓는 안내 창 (위치는 main.js 가 정함) */
.run-overlay.anchored { display: block; }
.run-overlay.anchored .run-box {
  position: absolute;
  width: 506px;
  max-width: calc(100vw - 20px);
  min-width: 0;
}
.run-overlay.anchored .dlg-row { flex-direction: column; }
.run-overlay.anchored .dlg-row .dlg-thumb { width: 100%; max-height: 173px; }
.run-overlay.anchored .run-buttons .btn { padding: 9px 16px; font-size: 15px; }
.run-box.dlg > .run-buttons:first-child { margin-bottom: 12px; } /* 아래로 펼칠 때 버튼 줄이 맨 위 */
.dlg-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; }
.dlg-row .dlg-thumb { width: 150px; max-height: 120px; margin: 0; flex: none; }
.dlg-row .run-msg { margin: 0 0 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 70; max-width: 420px; background: #3a1d1d; color: #fde2e2; border: 1px solid #7f2a2a; border-radius: 10px; padding: 12px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: opacity .5s; }
.toast.hide { opacity: 0; }
/* 항상 위의 작은 창(PIP): 앱과 같은 어두운 바탕, 큰 글씨, 꽉 찬 버튼 */
/* 모든 작은 창: 내용은 창 맨 위부터 */
html:has(body.pip) { background: #1e2125; }
body.pip { margin: 0; display: block; background: #1e2125; color: #e6e8eb; }
body.pip .run-box { background: transparent; color: inherit; box-shadow: none; border-radius: 0; min-width: 0; max-width: none; margin: 0; padding: 10px 16px 14px; }
body.pip .run-title { font-size: 16px; }
body.pip .run-msg { font-size: 13px; margin: 6px 0 12px; color: #9aa1aa; }
body.pip .run-buttons .btn { flex: 1; padding: 10px 12px; font-size: 15px; font-weight: 700; }
body.pip .btn { background: #2a2e34; color: #e6e8eb; border-color: #3a3f46; }
body.pip .btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
