/* ════ 편집 잠금 ════ */
.nc-locked { opacity: 0.7; }
.nc-editing-badge {
  font-size: 10px; font-weight: 700; color: #1e3a5f;
  background: #fef9c3; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; margin-right: 28px;
}

/* ════ 공통 로딩 팝업 ════ */
.loading-overlay-modal { z-index: 99990 !important; }
.loading-modal-box { max-width: 280px; }
.loading-modal-body {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 30px 24px;
}
.loading-spinner-wrap { position: relative; width: 48px; height: 48px; }
.loading-spinner-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid #c8d8e8; border-top-color: #43627e;
  animation: spin-ring 0.8s linear infinite;
}
@keyframes spin-ring { to { transform: rotate(360deg); } }
.loading-modal-text {
  font-size: 16px; font-weight: 800; color: #28343e;
  text-align: center;
}
.loading-modal-timer {
  font-size: 13px; font-weight: 600; color: #54606c;
  font-family: monospace;
}

/* ════ AI 리뷰 오버레이 ════ */
.rv-agent-overlay {
  position: absolute; inset: 0; z-index: 100;
  background: rgba(230,239,249,0.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.rv-agent-overlay-text {
  font-size: 18px; font-weight: 900; color: #28343e;
  letter-spacing: 0.04em;
  animation: pulse-text 1.5s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ════ 알림 팝업 ════ */
.notif-overlay-clear { background: rgba(30,40,55,0.15) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.notif-modal-box { max-height: 80vh; min-height: 50vh; width: 90%; max-width: 520px; display: flex; flex-direction: column; }
.notif-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 80px; max-height: 60vh;
}
.notif-empty {
  text-align: center; color: #94a3b8; padding: 48px 20px; font-size: 15px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: #fff; border: 1.5px solid #28343e;
  cursor: default; transition: opacity 0.15s;
}
.notif-item.notif-unread { border-left: 4px solid #43627e; }
.notif-item.notif-read { opacity: 0.6; }
.notif-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.notif-icon-review { background: #dbeafe; color: #2563eb; }
.notif-icon-deliver { background: #dcfce7; color: #16a34a; }
.notif-icon-default { background: #f1f5f9; color: #64748b; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 800; color: #28343e; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: #54606c; line-height: 1.4; }
.notif-time { font-size: 10px; color: #94a3b8; margin-top: 3px; }
.notif-item-wrap { position: relative; overflow: hidden; border-radius: 10px; }
.notif-delete-bg {
  position: absolute; inset: 0; background: #dc2626;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 20px; color: #fff; font-weight: 700; font-size: 13px;
  border-radius: 10px; z-index: 0;
}
.notif-item { position: relative; z-index: 1; }
.notif-delete-btn {
  background: none; border: none; cursor: pointer;
  color: #94a3b8; padding: 4px; border-radius: 6px;
  flex-shrink: 0; touch-action: manipulation;
  display: flex; align-items: center;
}
.notif-delete-btn:hover { color: #dc2626; background: rgba(220,38,38,0.1); }

/* ════ SPLASH SCREEN ════ */
.splash-screen {
  position: fixed; inset: 0; z-index: 99999;
  background: #dfe9f5;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
.splash-screen.fade-out { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 120px; height: 120px;
  object-fit: contain; border-radius: 24px;
  animation: splash-fade-in 0.8s ease-out both;
}
@keyframes splash-fade-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* ════ 자동로그인 체크박스 ════ */
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #54606c;
  cursor: pointer; padding: 4px 0;
  justify-content: center;
}
.login-remember input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: #43627e;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════════
   ROOT VARIABLES
════════════════════════════════════════════════════════════════ */
:root {
  /* ── 에디토리얼 블루 팔레트 (v3.5) ── */
  --bg-primary:      #f5f6f8;
  --bg-secondary:    #eef0f4;
  --bg-card:         #ffffff;
  --bg-card-hover:   #f8f9fb;
  --bg-input:        #ffffff;
  --accent:          #09003e;
  --accent-light:    #3d2db5;
  --accent-dark:     #09003e;
  --accent-glow:     rgba(9, 0, 62, 0.12);
  --text-primary:    #111827;
  --text-secondary:  #6b7280;
  --text-muted:      #9ca3af;
  --success:         #059669;
  --warning:         #d97706;
  --error:           #dc2626;
  --border:          #e5e7eb;
  --border-light:    #f3f4f6;
  --sketch-green:    #059669;
  /* MD3 tokens */
  --md-primary:        #09003e;
  --md-primary-dark:   #06002a;
  --md-primary-glow:   rgba(9, 0, 62, 0.15);
  --md-surface:        #f8f9fa;
  --md-surface-card:   #ffffff;
  --md-surface-low:    #f3f4f5;
  --md-on-surface:     #191c1d;
  --md-on-surface-var: #424656;
  --md-outline:        #727687;
  --md-outline-var:    #c2c6d8;
  --md-sidebar-bg:     #f8fafc;
  --md-sidebar-border: #e2e8f0;
  --font-headline:     'Manrope', 'Playfair Display', Georgia, sans-serif;
  --font-body:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Sidebar */
  --sidebar-bg:      #1e293b;
  --sidebar-border:  #2d3f55;
  --sidebar-text:    #94a3b8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-accent:  #3d2db5;
  --sidebar-hover:   rgba(255,255,255,0.05);
  /* Layout */
  --sidebar-width:   220px;
  --header-height:   44px;
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       12px;
  --radius-xl:       16px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:       0 8px 32px rgba(0,0,0,0.14);
  --trans:           0.18s ease;
}

/* ════════════════════════════════════════════════════════════════
   BASE
════════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-y;
  max-width: 100vw;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

input, textarea, [contenteditable], p, span, .script-text, .copilot-bubble, .rv-card, .rs-retro-body, .edit-panel-textarea {
  -webkit-user-select: text;
  user-select: text;
}
button, label { user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

h1, h2, h3 { font-weight: 900; line-height: 1.2; letter-spacing: -0.02em; }
p { color: var(--text-secondary); }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, button { font-family: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════════
   SCREENS
════════════════════════════════════════════════════════════════ */
.screen {
  position: fixed; inset: 0;
  display: none;                /* display:none 만이 Electron에서 완전 차단 */
  flex-direction: column;
}
.screen.active {
  display: flex;
}

/* ════════════════════════════════════════════════════════════════
   SETUP SCREEN
════════════════════════════════════════════════════════════════ */
#screen-setup {
  align-items: center; justify-content: center;
  background: var(--bg-primary);
}

.setup-container {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; width: 100%; max-width: 460px; padding: 40px 24px;
}

.setup-logo {
  font-size: 14px; font-weight: 900; letter-spacing: 3px;
  color: #1a1a1a; text-transform: uppercase;
  padding: 16px 28px; border: none; position: relative;
  background: transparent;
}
.setup-logo::before {
  content: '';
  position: absolute; inset: -8px -16px; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90'%3E%3Cpath d='M110,8 C160,4 210,20 212,45 C214,70 165,84 110,82 C55,80 6,68 8,45 C10,22 60,12 110,8Z' fill='none' stroke='%23c0392b' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M105,12 C155,6 205,22 208,44 C211,66 158,82 108,80 C58,78 12,64 14,44 C16,24 55,18 105,12Z' fill='none' stroke='%23c0392b' stroke-width='1.8' opacity='0.5' stroke-linecap='round'/%3E%3Cpath d='M115,6 C162,2 208,18 210,42 C212,66 160,80 112,82 C64,84 10,70 8,48 C6,26 68,10 115,6Z' fill='none' stroke='%23e67e22' stroke-width='1.5' opacity='0.4' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  animation: sketch-drift 4s ease-in-out infinite alternate;
}
@keyframes sketch-drift {
  0%   { transform: rotate(-1.5deg) scale(1); }
  33%  { transform: rotate(1deg) scale(1.02); }
  66%  { transform: rotate(-0.5deg) scale(0.99); }
  100% { transform: rotate(1.5deg) scale(1.01); }
}

.setup-title {
  font-size: 26px; font-weight: 800;
  color: var(--text-primary);
}
.setup-version {
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); opacity: 0.6;
  vertical-align: middle; margin-left: 4px;
}

.setup-desc { color: var(--text-secondary); font-size: 14px; }

.setup-form {
  display: flex; flex-direction: column; gap: 12px; width: 100%;
}

.setup-link { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.setup-link:hover { color: var(--accent-dark); }

/* TEXT INPUT CONTEXT BAR → see ti-card layout section below */

/* ── 릴리즈 노트 모달 ────────────────────────────────────────── */
.release-modal-box { max-width: 480px; }
.release-notes-body {
  padding: 16px 20px; overflow-y: auto; max-height: 60vh;
  display: flex; flex-direction: column; gap: 20px;
}
.rn-version-block { display: flex; flex-direction: column; gap: 8px; }
.rn-version-header { display: flex; align-items: baseline; gap: 10px; }
.rn-version-tag {
  font-size: 1rem; font-weight: 700; color: var(--accent-light);
}
.rn-version-date { font-size: 0.78rem; color: var(--text-muted); }
.rn-items {
  margin: 0; padding: 0 0 0 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.rn-items li { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

.tab-btn {
  padding: 9px 18px; border: none;
  background: transparent; color: var(--sidebar-text);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--trans);
  letter-spacing: 0.01em; white-space: nowrap;
  display: flex; align-items: center; width: 100%; text-align: left;
  font-family: inherit;
}
.tab-btn:hover { color: var(--sidebar-text-active); background: var(--sidebar-hover); }
.tab-btn.active {
  color: var(--sidebar-accent);
  background: rgba(59,130,246,0.12);
}
.tab-btn.active::after { display: none; }

/* API Status Dot */
.api-status {
  display: none !important;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0; display: inline-block;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.api-status.connected {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(74, 142, 90, 0.2);
  animation: pulse-dot 2.5s ease-in-out infinite;
}
.api-status.disconnected {
  background: var(--error);
  box-shadow: none;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 142, 90, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(74, 142, 90, 0); }
}

/* ════════════════════════════════════════════════════════════════
   TAB CONTENT
════════════════════════════════════════════════════════════════ */
.tab-content {
  display: none; flex-direction: column; flex: 1; overflow: hidden;
}
.tab-content.active { display: flex; }


/* ════════════════════════════════════════════════════════════════
   SUB SCREENS
════════════════════════════════════════════════════════════════ */
.sub-screen-container {
  flex: 1; position: relative; overflow: hidden;
}

.sub-screen {
  position: absolute; inset: 0;
  display: none;                /* display:none으로 완전 차단 */
  flex-direction: column; gap: 16px;
  padding: 20px 28px;
  overflow-y: auto;
}
.sub-screen.active {
  display: flex;
}

.sub-header h2 { font-size: 20px; margin-bottom: 4px; }
.sub-desc { font-size: 13px; color: var(--text-secondary); }

.sub-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 12px;
}


/* ── 네비게이션 버튼 (하단, 클린 스타일) ──────────── */
.sub-nav-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 16px 0; margin-top: auto;
  flex-wrap: wrap;
}
.nav-half-btn {
  padding: 10px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px; font-weight: 600;
  cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: all var(--trans);
  white-space: nowrap; min-width: 80px;
}
.nav-half-btn::before { display: none !important; }
.nav-half-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-half-btn-left { }
.nav-half-btn-right { }
.nav-half-btn-right.btn-primary-half {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.nav-half-btn-right.btn-primary-half:hover {
  background: var(--accent-dark); border-color: var(--accent-dark);
}
.nav-half-btn.sketch-red {
  color: var(--error); border-color: rgba(220,38,38,0.4);
}
.nav-half-btn.sketch-red:hover {
  background: rgba(220,38,38,0.06); border-color: var(--error);
}
.nav-half-btn:disabled {
  opacity: 0.35; cursor: not-allowed;
  border-color: var(--border); color: var(--text-muted);
}
.nav-half-btn:disabled:hover {
  border-color: var(--border); color: var(--text-muted); background: transparent;
}

/* ════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--trans); white-space: nowrap;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.btn-primary::before { display: none !important; }
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark); transform: none;
}

.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--trans);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent); color: var(--accent);
  transform: none;
}

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--trans);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary); border-color: var(--text-secondary);
  transform: none;
}

.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

.btn-generate { padding: 12px 32px; font-size: 15px; border-radius: var(--radius-md); }

.btn-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--text-muted); padding: 4px;
  transition: color var(--trans);
}
.btn-eye:hover { color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════════
   FORMS & INPUTS
════════════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.req { color: var(--error); }
.optional { color: var(--text-muted); font-weight: 400; }
.field-hint { font-size: 12px; color: var(--text-secondary); }

.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 14px; outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 42px; }

.search-input {
  padding: 8px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 13px; outline: none;
  transition: border-color var(--trans);
  min-width: 200px;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.checkbox { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--accent); cursor: pointer; }

/* ════════════════════════════════════════════════════════════════
   VOICE GRID
════════════════════════════════════════════════════════════════ */
.voice-toolbar {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding: 10px;
}

.voice-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--trans);
  display: flex; flex-direction: column; gap: 8px;
}
.voice-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.voice-card.selected {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.voice-avatar {
  display: none;
}

.voice-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.voice-category { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.voice-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.voice-tag {
  padding: 2px 7px; border-radius: 99px; font-size: 10px; font-weight: 600;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border);
}

.voice-preview-btn {
  margin-top: auto; padding: 5px 10px; border: 1px solid var(--border-light);
  border-radius: 50% 42% 55% 45% / 45% 50% 42% 55%;
  background: transparent; color: var(--text-secondary);
  font-size: 11px; cursor: pointer; transition: all 0.3s ease;
}
.voice-preview-btn:hover {
  color: var(--text-primary);
  transform: rotate(-1.5deg) scale(1.03);
}
.voice-preview-btn.playing { border-color: inherit; color: inherit; }

.voice-selected-badge {
  display: none; align-items: center; gap: 4px;
  font-size: 11px; color: var(--accent-dark); font-weight: 600;
  margin-top: auto;
}
.voice-card.selected .voice-selected-badge { display: flex; }
.voice-card.selected .voice-preview-btn { display: none; }

/* ════════════════════════════════════════════════════════════════
   STATE: Loading / Empty / Error
════════════════════════════════════════════════════════════════ */
.state-loading, .state-empty, .state-error {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 60px 20px;
  color: var(--text-secondary);
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner.large { width: 48px; height: 48px; border-width: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   TIME SETTING
════════════════════════════════════════════════════════════════ */
.time-setting-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 32px; padding: 20px 0;
}

.time-inputs {
  display: flex; align-items: center; gap: 16px;
}

.time-field {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

.time-input {
  width: 90px; text-align: center;
  padding: 14px 8px; font-size: 40px; font-weight: 800;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary); outline: none;
  transition: border-color var(--trans);
  -moz-appearance: textfield;
}
.time-input::-webkit-inner-spin-button,
.time-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.time-input:focus { border-color: var(--accent); }

.time-unit { font-size: 14px; color: var(--text-secondary); font-weight: 600; }

.time-arrow {
  width: 90px; padding: 6px; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; font-size: 12px; transition: all var(--trans);
}
.time-arrow:hover {
  color: var(--accent); border-color: var(--accent); background: var(--bg-card);
  transform: none;
}

.time-colon { font-size: 44px; font-weight: 800; color: var(--text-muted); margin-bottom: 20px; }

.time-presets {
  display: flex; align-items: center; gap: 8px;
}
.preset-label { font-size: 12px; color: var(--text-muted); margin-right: 4px; }
.preset-btn {
  padding: 6px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--trans);
}
.preset-btn:hover {
  color: var(--accent); border-color: var(--accent); background: var(--accent-glow);
  transform: none;
}

/* ════════════════════════════════════════════════════════════════
   TEXT INPUT
════════════════════════════════════════════════════════════════ */
/* #sub-text-input padding → .ti-screen override below */
.text-input-container {
  display: flex; flex-direction: column; gap: 10px; flex: 1;
  max-width: 700px; margin: 0 auto; width: 100%;
}

.text-input-titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.text-input-titlebar h2 { font-size: 18px; white-space: nowrap; flex: 1; text-align: center; }

.text-input-wrap {
  display: flex; flex-direction: column; gap: 10px; flex: 1;
}

.text-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.pause-sec-select {
  font-size: 12px; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary);
  cursor: pointer; height: 28px;
}
.toolbar-label {
  font-size: 12px; color: var(--text-muted); margin-right: 2px;
}
.pause-btn {
  font-size: 11px; padding: 4px 10px;
  color: var(--text-secondary); border-color: var(--border);
  transition: all 0.4s ease;
  border-radius: 50% 42% 55% 45% / 45% 50% 42% 55%;
}
.pause-btn:hover {
  color: var(--text-primary);
  transform: rotate(-1.5deg) scale(1.03);
}
.pause-btn-active {
  border-color: var(--accent) !important; color: var(--accent) !important;
  background: rgba(196,168,130,0.12); font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent);
}

/* ── 쉬기 설정 인라인 패널 ──────────────────────────────────── */
.custom-pause-panel {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 6px;
  animation: fadeIn 0.15s ease;
}
.pause-panel-inner {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.pause-slider {
  width: 100%; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: var(--border); border-radius: 99px; outline: none; cursor: pointer;
  accent-color: var(--accent);
}
.pause-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.pause-slider-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-muted); padding: 0 2px;
}
.pause-panel-right {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.pause-number-input {
  width: 68px; text-align: center; font-size: 15px;
  padding: 5px 8px !important;
}
.pause-unit { font-size: 13px; color: var(--text-muted); }

/* ── 분할 텍스트 입력 ─────────────────────────────────────── */
.split-textarea-wrap {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden;
}

#body-textarea, #time-adjust-textarea {
  width: 100%; padding: 14px;
  background: var(--bg-input);
  border: none; outline: none;
  color: var(--text-primary); font-size: 14px; line-height: 1.7;
  resize: vertical; font-family: inherit;
  transition: background var(--trans);
}
#body-textarea      { min-height: 38px; }
#time-adjust-textarea { min-height: 38px; }
#body-textarea:focus, #time-adjust-textarea:focus {
  background: var(--bg-input);
  box-shadow: inset 0 0 0 2px var(--accent-glow);
}
#body-textarea::placeholder, #time-adjust-textarea::placeholder { color: var(--text-muted); }

/* 시간조절용 기사 구분선 */
.time-adjust-divider {
  display: flex; align-items: center; justify-content: center;
  height: 26px; cursor: row-resize;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  user-select: none;
  transition: background 0.2s;
}
.time-adjust-divider:hover { background: var(--bg-card-hover); }
.time-adjust-divider .divider-label {
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.03em;
}
.ta-char-count {
  text-align: right; padding: 2px 14px 4px;
  font-size: 11px; color: var(--text-muted);
}
.ta-char-count .over { color: var(--error); font-weight: 600; }

/* 보호구역 구분선 */
.textarea-divider {
  display: flex; align-items: center; justify-content: center;
  height: 26px; cursor: row-resize;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.textarea-divider:hover { background: var(--bg-card-hover); }
.divider-label {
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.03em;
  pointer-events: none;
}

.text-stats-bar {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
}
.text-stats-bar strong { color: var(--text-primary); }
.stat-sep { color: var(--border-light); }

.duration-bar-wrap { padding: 4px 0; }

.duration-track {
  position: relative; height: 6px; border-radius: 3px;
  background: var(--bg-card); overflow: visible;
}

.duration-fill {
  height: 100%; border-radius: 3px;
  background: var(--md-primary);
  transition: width 0.3s ease;
  max-width: 100%;
}

.duration-target-mark {
  position: absolute; top: -4px; width: 2px; height: 14px;
  background: var(--warning); border-radius: 1px;
  transition: left 0.3s ease;
}

/* 본문 위 글자수 표시 */
.body-meta-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 2px 4px;
  font-size: 12px;
}
.body-total-chars { font-weight: 600; color: var(--text-secondary); }
.body-char-count { color: #111827; }

/* 목소리 미리듣기 로딩 상태 */
.voice-preview-btn.loading { opacity: 0.6; pointer-events: none; }

.text-warning {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.text-warning.warn-short { background: rgba(176,96,48,0.1); color: var(--warning); border: 1px solid rgba(176,96,48,0.3); }
.text-warning.warn-long { background: rgba(176,48,80,0.1); color: var(--error); border: 1px solid rgba(176,48,80,0.3); }
.text-warning.warn-ok { background: rgba(74,142,90,0.12); color: var(--success); border: 1px solid rgba(74,142,90,0.3); }
.text-warning.hidden { display: none; }

/* ── 텍스트 입력 v3.6 레이아웃 ──────────────────────────────── */
.ti-screen { gap: 14px !important; }

/* 헤더 */
.ti-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.ti-header-main { flex: 1; }
.ti-title { font-size: 28px; font-weight: 800; color: var(--text-primary); margin: 0 0 6px; line-height: 1.2; }
.ti-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.ti-back-btn {
  flex-shrink: 0; padding: 8px 18px; font-size: 13px; font-weight: 600;
  border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); cursor: pointer;
  margin-top: 4px; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ti-back-btn:hover { background: #f5f7fa; }

/* 메인 카드 */
.ti-card {
  background: #ffffff; border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden; display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}

/* 본문 섹션 (흰색) */
.ti-body-section {
  display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
  background: #fff; padding: 20px 24px 16px;
}
.ti-label-body {
  display: block;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--md-primary);
  margin-bottom: 12px;
}
.ti-body-section #body-textarea {
  border: none; border-radius: 0;
  background: #fff; outline: none;
  font-size: 15px; line-height: 1.75;
  color: var(--text-primary); resize: none;
  font-family: inherit; min-height: 38px; flex: 1; height: 100%; width: 100%;
  padding: 0;
}
.ti-body-section #body-textarea::placeholder { color: var(--text-muted); }
.ti-body-section #body-textarea:focus { box-shadow: none; background: #fff; }

/* 시간조절용 섹션 (회색) */
.ti-adj-section {
  background: #f9fafb; border-top: 1px solid #f3f4f6;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.ti-adj-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; cursor: row-resize; user-select: none;
}
.ti-label-adj {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: #9ca3af;
}
.ti-adj-count { display: none; }
.ti-adj-section #time-adjust-textarea {
  background: #f9fafb; border: none; border-radius: 0;
  outline: none; font-size: 14px; line-height: 1.7;
  color: #4b5563; resize: none; font-family: inherit;
  min-height: 38px; height: 80px; width: 100%;
  padding: 4px 24px 14px;
}
.ti-adj-section #time-adjust-textarea::placeholder { color: #9ca3af; }
.ti-adj-section #time-adjust-textarea:focus { box-shadow: none; background: #f9fafb; }

/* 푸터 행 */
.ti-footer-row {
  display: flex; flex-direction: column;
  gap: 8px; flex-shrink: 0;
  background: #ffffff; border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 10px 20px;
}
.ti-footer-stats {
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
}
.ti-footer-vdivider { display: none; }
.ti-footer-bar-row {
  display: flex; align-items: center; gap: 10px;
}
.ti-footer-bar-row .duration-track {
  flex: 1; background: #d1d5db; height: 8px; border-radius: 9999px; position: relative; overflow: visible;
}
.ti-footer-bar-row .duration-fill { background: var(--md-primary); border-radius: 9999px; height: 100%; }
.ti-footer-bar-target { font-size: 11px; font-weight: 700; color: #9ca3af; white-space: nowrap; flex-shrink: 0; }
.ti-footer-stat-group { display: flex; flex-direction: column; gap: 3px; }
.ti-footer-stat-row { flex-direction: row; align-items: center; gap: 6px; text-align: right; flex-shrink: 0; }
.ti-footer-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ti-footer-label-inline {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.ti-footer-counts {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-secondary);
}
.ti-footer-counts strong { color: var(--text-primary); font-size: 14px; font-weight: 700; }
.ti-sep { color: #d1d5db; font-size: 12px; }
.ti-footer-vdivider { width: 1px; height: 28px; background: #e5e7eb; flex-shrink: 0; }
.ti-footer-time {
  font-size: 20px; font-weight: 800; color: var(--md-primary); display: block;
}
.ti-footer-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ti-review-btn {
  padding: 10px 28px; border-radius: 10px;
  background: var(--md-primary); color: #fff;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.ti-review-btn:hover:not(:disabled) { background: var(--md-primary-dark); }
.ti-review-btn:disabled { background: #c0cfe8; cursor: not-allowed; }

/* 예상 길이 바 */
.ti-duration-card {
  background: #f3f4f6; border-radius: 16px;
  padding: 16px 18px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.ti-duration-header {
  display: flex; align-items: center; justify-content: space-between;
}
.ti-duration-title {
  font-size: 12px; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 6px;
}
.ti-duration-target { font-size: 12px; font-weight: 700; color: #9ca3af; }
.ti-duration-target span { color: #374151; }
.ti-duration-caption { font-size: 10px; color: #9ca3af; margin: 0; }

/* 예상 길이 바 안의 duration 요소 */
.ti-duration-card .duration-track {
  background: #d1d5db; height: 10px; border-radius: 9999px;
}
.ti-duration-card .duration-fill { background: var(--md-primary); border-radius: 9999px; }

/* 툴바 (context bar) */
.text-input-context-bar {
  display: flex; align-items: center;
  padding: 0 28px 10px; gap: 10px;
  background: transparent; flex-shrink: 0;
}
.ti-toolbar-left { display: flex; align-items: center; gap: 8px; }

/* 공통 pill 버튼 */
.ti-pill-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 34px; border-radius: 8px;
  background: #fff; border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer; font-size: 13px; font-weight: 600;
  color: #111827; white-space: nowrap; user-select: none;
  transition: background 0.12s;
}
.ti-pill-wrap:hover { background: #f9fafb; }
.ti-pill-icon { width: 16px; height: 16px; flex-shrink: 0; }
.ti-pill-text { font-size: 13px; font-weight: 600; }

/* 쉬기: 초 선택 오버레이 */
.ti-sec-wrap {
  position: relative; display: inline-block; min-width: 10px;
  cursor: pointer;
}
.ti-sec-overlay {
  position: absolute; inset: -4px -6px;
  opacity: 0; cursor: pointer; width: calc(100% + 12px);
}

/* 임시저장 pill */
.ti-save-pill { color: #4b5563; }

/* 툴바 우측 상태 text-warning */
#text-input-context-bar .text-warning {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 0; background: transparent; border: none;
}
#text-input-context-bar .text-warning.warn-ok { color: #10b981; }
#text-input-context-bar .text-warning.warn-ok::before {
  content: '';
  display: inline-block; width: 18px; height: 18px; flex-shrink: 0;
  background: #10b981; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
#text-input-context-bar .text-warning.warn-short { color: var(--warning); font-size: 12px; }
#text-input-context-bar .text-warning.warn-long { color: var(--error); font-size: 12px; }
#text-input-context-bar .text-warning.hidden { display: none; }

/* 인라인 툴바 (subtitle 아래) */
.ti-toolbar-inline {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; flex-wrap: wrap;
}
.ti-toolbar-inline .text-warning {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 0; background: transparent; border: none;
}
.ti-toolbar-inline .text-warning.warn-ok { color: #10b981; }
.ti-toolbar-inline .text-warning.warn-ok::before {
  content: '';
  display: inline-block; width: 18px; height: 18px; flex-shrink: 0;
  background: #10b981; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.ti-toolbar-inline .text-warning.warn-short { display: none; }
.ti-toolbar-inline .text-warning.warn-long  { display: none; }
.ti-toolbar-inline .text-warning.hidden { display: none; }

/* 쉬기 pause pill */
.ti-pause-pill { position: relative; }
.ti-pause-clock-btn {
  display: flex; align-items: center; cursor: pointer; flex-shrink: 0;
}
.ti-pause-clock-btn:hover .ti-pill-icon { transform: scale(1.15); }
.ti-pill-text { cursor: pointer; }
.ti-pill-text:hover { color: var(--md-primary); }

/* 쉬기 팝업 */
.pause-picker-popup {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 999; overflow: hidden; min-width: 80px;
}
.pause-picker-popup-up { top: auto; bottom: calc(100% + 6px); }
.ppp-scroll { display: flex; flex-direction: column; }
.ppp-item {
  padding: 9px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; color: #374151; text-align: center;
  transition: background 0.1s;
}
.ppp-item:hover { background: #f3f4f6; }
.ppp-item.ppp-selected { color: var(--md-primary); background: #eff6ff; }

/* 하단 고정 네비게이션 */
.ti-bottom-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; flex-shrink: 0;
  border-top: 1px solid #e5e7eb;
  background: var(--bg-primary);
}
.ti-bnav-dots { display: flex; align-items: center; gap: 8px; }
.ti-bnav-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #d1d5db;
}
.ti-bnav-dot-active { background: var(--md-primary); }
.ti-bnav-prev {
  font-size: 14px; font-weight: 600; color: #6b7280;
  background: transparent; border: none; cursor: pointer; padding: 8px 4px;
}
.ti-bnav-prev:hover { color: #374151; }
.ti-bnav-next {
  padding: 12px 28px; border-radius: 14px;
  background: var(--md-primary); color: #fff;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.ti-bnav-next:hover:not(:disabled) { background: var(--md-primary-dark); }
.ti-bnav-next:disabled { background: #c0cfe8; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════
   GENERATING
════════════════════════════════════════════════════════════════ */
.generating-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px;
  height: 100%; padding: 40px;
}
/* ── Generating Retro Window ── */
.gen-retro-window { overflow: hidden; }
.gen-retro-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; padding: 32px 40px;
}
.gen-retro-body h2 { font-size: 28px; font-weight: 900; color: #1e2833; margin: 0; letter-spacing: -0.02em; }
.gen-retro-body .gen-meta {
  background: #dfe9f5; border: 1.5px solid #28343e; color: #3a4a58;
}
.gen-retro-body .gen-elapsed { color: #54606c; margin-top: 0; font-size: 14px; }
.gen-retro-body .gen-desc { color: #54606c; font-size: 14px; margin: 0; text-align: center; }
.gen-cancel-btn {
  width: auto !important; max-width: none !important;
  flex: 0 0 44px !important; height: 44px !important;
  font-size: 14px !important; padding: 0 40px !important;
  align-self: center !important;
  min-height: 44px !important; max-height: 44px !important;
}

/* 로봇 아이콘 + 회전 점선 링 */
.gen-robot-wrap {
  position: relative; width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.gen-robot-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px dashed #5a9fd4;
  animation: gen-ring-spin 3s linear infinite;
}
.gen-robot-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: #b5d5f6; border: 2.5px solid #28343e;
  display: flex; align-items: center; justify-content: center;
}
@keyframes gen-ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.wave-animation {
  display: flex; align-items: center; gap: 5px; height: 56px;
}

.w-bar {
  width: 5px; height: 100%; border-radius: 3px;
  background: var(--accent);
  animation: wave-anim 1.2s ease-in-out infinite;
}
.w-bar:nth-child(2) { animation-delay: 0.12s; }
.w-bar:nth-child(3) { animation-delay: 0.24s; }
.w-bar:nth-child(4) { animation-delay: 0.36s; height: 130%; }
.w-bar:nth-child(5) { animation-delay: 0.24s; }
.w-bar:nth-child(6) { animation-delay: 0.12s; }
.w-bar:nth-child(7) { animation-delay: 0s; }

@keyframes wave-anim {
  0%, 100% { transform: scaleY(0.4); }
  50%       { transform: scaleY(1); }
}

.generating-wrap h2 { font-size: 22px; }
.gen-desc { font-size: 14px; color: var(--text-secondary); min-height: 20px; }

.gen-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
  background: var(--bg-card); padding: 6px 16px;
  border-radius: 99px; border: 1px solid var(--border);
}
.meta-dot { color: var(--border-light); }

/* ════════════════════════════════════════════════════════════════
   RESULT
════════════════════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════
   RESULT PAGE (rs-*)   ← 레퍼런스 HTML 기준 완전 재작성
   색상 토큰: primary=#09003e  background=#f8f9fa
              surface-container-lowest=#fff  surface-container-low=#f3f4f5
              surface-container-high=#e7e8e9  outline=#727687
              on-surface=#191c1d  on-surface-variant=#424656
              outline-variant=#c2c6d8  secondary=#425ca0
════════════════════════════════════════════════════════════════ */

/* sub-screen 재정의 */
#sub-result.sub-screen, .rs-result-screen {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  align-items: stretch;
  padding: 0 !important;
  background: #e6eff9;
  gap: 0;
}


/* 결과 레트로 윈도우 */
.rs-retro-window {
  margin: 6px !important; overflow: hidden; position: relative;
  min-height: 0; flex: 1;
  display: flex; flex-direction: column;
}
.rs-retro-body {
  flex: 1; min-height: 0;
  overflow-y: auto !important; -webkit-overflow-scrolling: touch;
  padding: 14px 18px; display: flex; flex-direction: column; gap: 12px;
}
/* 결과 푸터 */
.rs-retro-footer {
  gap: 12px; flex-shrink: 0 !important;
  position: sticky; bottom: 0; z-index: 10;
  background: rgba(223,233,245,0.95);
  backdrop-filter: blur(4px);
}
.rs-dl-group {
  flex: 1; display: flex; gap: 8px;
}
.rs-dl-group .rs-result-btn { flex: 1; max-width: none !important; }
.rs-result-btn {
  max-width: none !important; font-size: 15px !important; font-weight: 700 !important;
  height: 52px !important;
}
.rs-deliver-btn { flex: 1; }
.rs-result-btn:hover:not(:disabled) {
  background: #28343e !important; color: #e6eff9 !important;
}

/* 커스텀 패널 좌우 분할 레이아웃 */
.retro-custom-split {
  display: flex; gap: 18px; align-items: flex-start; width: 100%;
}

/* 시간 프리셋 버튼 그리드 (좌측, 넉넉한 여백) */
.retro-time-grid {
  flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-content: flex-start;
}
.retro-time-btn {
  padding: 14px 8px; font-size: 15px; font-weight: 700; font-family: var(--font-headline);
  color: #28343e; background: #fff; border: 2px solid #28343e; border-radius: 10px;
  box-shadow: 3px 3px 0 #28343e; cursor: pointer; text-align: center;
  transition: background 0.1s, color 0.1s, transform 0.1s;
}
.retro-time-btn:hover { background: #dfe9f5; }
.retro-time-btn.active { background: #28343e; color: #e6eff9; }

/* 시간 선택 (우측, 좁고 세로로 길게) */
.retro-custom-time-compact {
  width: 30%; flex-shrink: 0;
}
.retro-custom-time-compact .retro-custom-time-row {
  padding: 20px 14px; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.retro-custom-time-compact .retro-custom-time-label {
  font-size: 14px;
}
.retro-custom-time-compact .retro-custom-time-val {
  font-size: 28px;
}

/* ── 담당자 지정 화면 ── */
.assignee-body { gap: 14px !important; }
.assignee-desc {
  font-size: 14px; font-weight: 600; color: #54606c;
  text-align: center; padding: 4px 0;
}
.assignee-grid {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; overflow-y: auto;
}
.assignee-loading {
  text-align: center; padding: 40px 0;
  color: #94a3b8; font-size: 14px;
}
.assignee-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; min-height: 56px; box-sizing: border-box;
  background: #fff; border: 2px solid #28343e; border-radius: 12px;
  cursor: pointer; transition: all 0.12s;
  box-shadow: 2px 2px 0 #28343e;
}
/* 담당자 카드 세로를 모드 버튼과 맞춤(2열) */
.assignee-card .assignee-avatar { width: 34px; height: 34px; }
.assignee-card .assignee-name { font-size: 14px; }
.assignee-card .assignee-role { font-size: 11px; }
.assignee-hint { font-size: 12px; font-weight: 600; color: #5b6b7a; text-align: center; margin-top: 2px; }
.assignee-card:hover { background: #dfe9f5; }
.assignee-card.selected {
  background: #c8ddf0; color: #28343e;
  border-color: #28343e;
  box-shadow: inset 0 0 0 2px #43627e, 2px 2px 0 #28343e;
}
.assignee-card.selected .assignee-name { color: #28343e; }
.assignee-card.selected .assignee-role { color: #43627e; }
.assignee-card.selected .assignee-avatar { background: #43627e; color: #e6eff9; }
.assignee-card.selected .assignee-check { display: block; color: #16a34a; }
.assignee-avatar {
  width: 44px; height: 44px;
  border-radius: 10px; background: #d7e4f1; color: #43627e;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1.5px solid #28343e;
}
.assignee-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.assignee-name { font-size: 16px; font-weight: 800; color: #28343e; }
.assignee-role { font-size: 12px; font-weight: 600; color: #94a3b8; }
.assignee-check { display: none; font-size: 24px; }

/* ── 제작 모드 토글 (담당자 화면) — 테두리 없이 하단 영역 ───────── */
/* 담당자 리스트도 한 줄에 2개(제작모드처럼) — 카드가 세로로 늘어나지 않게 align-content:start */
.assignee-grid { max-height: 50%; display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; align-items: start; }
/* "제작 모드" 라벨을 "이 뉴스를 담당할…" 안내문과 같은 폰트/크기로 */
.assignee-mode-label { font-size: 14px !important; font-weight: 600 !important; color: #54606c !important; }
/* 툴바 안 에이전트 배지: 절대배치 해제(인라인 좌측) → 통계는 space-between으로 우측 */
.ti-toolbar-badge { position: static !important; transform: none !important; right: auto !important; }
/* 에이전트 본문 카드가 diff 닫히면 세로로 꽉 차도록 강제 */
.rv-card-agent { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
.rv-card-agent .rv-body-bg { flex: 1 1 auto !important; min-height: 60px !important; }
.rv-card-agent .rv-body-textarea { height: 100% !important; }
.assignee-mode {
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
  padding: 16px 4px 4px; margin-top: 8px; flex: 1; min-height: 0;
  border-top: 1.5px dashed #c2cedb;
}
.assignee-mode-label { font-size: 13px; font-weight: 800; color: #28343e; text-align: center; }
.assignee-mode-toggle { display: flex; gap: 10px; }
.amode-btn {
  flex: 1; padding: 8px 10px; min-height: 56px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #28343e; border-radius: 10px;
  font-size: 15px; font-weight: 800; color: #54606c; cursor: pointer;
  transition: all 0.12s; box-shadow: 2px 2px 0 #28343e;
}
.amode-btn:hover { background: #dfe9f5; }
.amode-btn.amode-selected {
  background: #c8ddf0; color: #28343e;
  box-shadow: inset 0 0 0 2px #43627e, 2px 2px 0 #28343e;
}
.assignee-mode-hint { font-size: 12px; font-weight: 600; color: #5b6b7a; text-align: center; min-height: 16px; }

/* ── 에이전트 명령 프롬프트창 (AI리뷰 / 결과 화면) ─────────────── */
.agent-prompt-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 8px 12px; margin: 6px 14px;
  background: #f3f7fc; border: 2px solid #28343e; border-radius: 12px;
  box-shadow: 2px 2px 0 #28343e;
}
.agent-prompt-modes { display: flex; gap: 4px; }
.apmode-btn {
  padding: 7px 10px; background: #fff; border: 1.5px solid #28343e; border-radius: 8px;
  font-size: 12px; font-weight: 800; color: #54606c; cursor: pointer; white-space: nowrap;
}
.apmode-btn.apmode-selected { background: #43627e; color: #fff; }
.agent-prompt-input {
  flex: 1; min-width: 110px; padding: 9px 12px;
  border: 1.5px solid #28343e; border-radius: 8px; font-size: 14px; color: #28343e; background: #fff;
}
.agent-prompt-input:disabled { background: #e7edf3; }
.agent-prompt-send {
  padding: 9px 16px; background: #16a34a; color: #fff;
  border: 1.5px solid #28343e; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 2px 2px 0 #28343e; white-space: nowrap;
}
.agent-prompt-send:disabled { background: #94a3b8; cursor: default; box-shadow: none; }
.agent-prompt-preview {
  padding: 9px 14px; background: #2563eb; color: #fff;
  border: 1.5px solid #28343e; border-radius: 8px; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 2px 2px 0 #28343e; white-space: nowrap;
}
.agent-prompt-preview:disabled { background: #94a3b8; cursor: default; box-shadow: none; }
/* 마커 버튼 + 칩 */
.agent-marker-btn {
  padding: 9px 12px; background: #fff; border: 1.5px solid #28343e; border-radius: 8px;
  font-size: 13px; font-weight: 800; color: #43627e; cursor: pointer; white-space: nowrap; box-shadow: 2px 2px 0 #28343e;
}
.agent-marker-btn:hover { background: #eef3f9; }
.rv-marker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 14px 6px; }
.rv-marker-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  background: #e7ddff; color: #5b4bb0; border: 1.5px solid #8b7ad8; border-radius: 9999px;
  font-size: 12px; font-weight: 700;
}
.rv-marker-x { background: none; border: none; color: #8b7ad8; cursor: pointer; font-size: 11px; padding: 0 2px; line-height: 1; }
/* 에이전트 수정 기록(누적 항목) */
.rv-hermes-history { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rv-hermes-entry { border-bottom: 1px dashed #e2e8f0; padding-bottom: 6px; }
.rv-hermes-entry:last-child { border-bottom: none; padding-bottom: 0; }
.rv-hermes-entry-head { font-size: 12px; font-weight: 700; color: #28343e; margin-bottom: 4px; }
/* 프롬프트 반영 중 애니메이션(😊 0~10 반복) */
.rv-hermes-anim { display: inline; font-weight: 400; }
.rv-hermes-anim strong { color: #5b4bb0; font-weight: 800; }
.rv-hermes-emoji { margin-left: 4px; letter-spacing: 1px; }

/* ── 본문 내 마커 표시(음영 + 위첨자 번호) ───────────────────────── */
.rv-agent-body {
  flex: 1; min-height: 0; width: 100%; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;
  font-size: 13px; line-height: 1.65; color: #28343e;
  font-family: var(--font-body); cursor: text;
}
.rv-mk {
  background: #fff3bf; box-shadow: inset 0 -2px 0 #f59f00;
  border-radius: 3px; padding: 0 1px; color: inherit;
}
/* 번호 뱃지(왼쪽 위) */
.rv-mk-num {
  font-size: 9px; font-weight: 900; color: #fff; background: #f59f00;
  border-radius: 4px; padding: 0 3px; margin-right: 2px; vertical-align: super; line-height: 1;
  user-select: none;
}
/* ✕ 취소(오른쪽 위) — 클릭 시 마커 해제 */
.rv-mk-x {
  font-size: 9px; font-weight: 900; line-height: 1; vertical-align: super;
  margin-left: 2px; padding: 1px 3px; border: none; border-radius: 4px; cursor: pointer;
  background: #e03131; color: #fff; user-select: none;
}
.rv-mk-x:hover { background: #c92a2a; }
.rv-fixed-text .rv-mk { background: #ffe8cc; box-shadow: inset 0 -2px 0 #e8590c; }
.rv-fixed-text .rv-mk-num { background: #e8590c; }

/* ── 헤더 중앙 전광판 (에이전트모드 길이 상태) ───────────────── */
.nav-marquee-center { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; padding: 0 12px; }
.header-marquee {
  max-width: 100%; padding: 5px 16px; border-radius: 9999px;
  background: #eef3f9; border: 1.5px solid #c2cedb;
  font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.header-marquee .rv-stat-time-big { font-size: 15px; }
.header-marquee .rv-stat-chars-small { color: #94a3b8; }
.header-marquee .rv-stat-ok { color: #16a34a; }

/* ── 에이전트 작업중 화면 (타이머 + 로그) ───────────────────────── */
.rv-agent-working {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 12px; padding: 28px 16px;
}
.rv-agent-working-badge { font-size: 44px; line-height: 1; animation: rvAgentPulse 1.4s ease-in-out infinite; }
@keyframes rvAgentPulse { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
.rv-agent-working-title { font-size: 18px; font-weight: 800; color: #28343e; text-align: center; }
.rv-agent-working-title span { color: #2563eb; font-variant-numeric: tabular-nums; }
.rv-agent-working-log {
  width: 100%; max-width: 520px; flex: 1; min-height: 0; overflow-y: auto;
  margin-top: 6px; padding: 10px 14px; background: #f3f7fc;
  border: 1.5px solid #c2cedb; border-radius: 10px;
  font-size: 12.5px; line-height: 1.7; color: #4a5663; font-family: var(--font-body);
}
.rv-agent-log-line { padding: 1px 0; border-bottom: 1px dashed #e2e8f0; }
.rv-agent-log-line:last-child { border-bottom: none; color: #1e2833; font-weight: 700; }

/* ── 에이전트모드 통계바 (글자수 작게·시간 크게) ───────────────── */
.rv-retro-stat--agent { gap: 10px; }
.rv-stat-time-big { font-size: 18px; font-weight: 900; }
.rv-stat-chars-small { font-size: 11px; color: #94a3b8; font-weight: 600; margin-left: 8px; }
.rv-stat-ok { font-size: 13px; font-weight: 800; color: #16a34a; }
.rv-retro-stat--agent .rv-tts-play-btn {
  font-size: 14px; font-weight: 800; padding: 8px 16px;
  background: #2563eb; color: #fff; border: 2px solid #28343e; border-radius: 10px; box-shadow: 2px 2px 0 #28343e;
}
.rv-retro-stat--agent .rv-tts-play-btn:disabled { background: #94a3b8; box-shadow: none; }

/* ── 에이전트 상태 위젯 (왼쪽 패널 하단) ───────────────────────── */
.agent-health {
  flex-shrink: 0; margin-top: auto; margin-bottom: 8px; padding: 10px 12px;
  background: #eef3f9; border: 1.5px solid #c2cedb; border-radius: 10px;
}
.agent-health-title { font-size: 12px; font-weight: 800; color: #28343e; margin-bottom: 8px; }
.agent-health-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; }
.agent-health-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #4a5663; }
.agent-health-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.agent-health-ok .agent-health-dot { background: #16a34a; }
.agent-health-err { color: #dc2626; }
.agent-health-err .agent-health-dot { background: #dc2626; }
.agent-health-idle { color: #94a3b8; }
.agent-health-idle .agent-health-dot { background: #cbd5e1; }
.agent-health-loading { font-size: 12px; color: #94a3b8; }
/* 확정 값 요약(음성/목표/담당/모드) */
.wf-summary {
  flex-shrink: 0; margin-bottom: 8px; padding: 10px 12px;
  background: #fff; border: 1.5px solid #c2cedb; border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.wf-summary-line { font-size: 12px; font-weight: 700; color: #28343e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 에이전트별 상태 동그라미 (정상=초록 깜빡임) */
.agent-health-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; vertical-align: middle; background: #94a3b8; }
.agent-health-pulse.ok { background: #16a34a; }                                           /* 정상 = 깜빡임 없이 초록 */
.agent-health-pulse.err { background: #dc2626; animation: agentPulseBlink 0.6s ease-in-out infinite; }  /* 오류 = 빨강 깜빡임 */
.agent-health-pulse.idle { background: #cbd5e1; }
@keyframes agentPulseBlink { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22,163,74,0.5); } 50% { opacity: 0.35; box-shadow: 0 0 0 4px rgba(22,163,74,0); } }

/* 창 제목 에이전트 모드 배지 — 제목은 중앙, 배지는 우측(절대배치)로 분리 */
.retro-win-bar { position: relative; }
.agent-mode-badge {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  padding: 2px 10px; border-radius: 9999px;
  background: #e7ddff; color: #6d5bc7; border: 1.5px solid #8b7ad8;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}

/* 고정 첫·끝인사 (비활성 표시) — 기사작성 + 리뷰 */
.ti-agent-fixed, .rv-agent-fixed {
  padding: 8px 12px; border-radius: 8px; flex-shrink: 0;
  background: #eef1f5; color: #7e8896; font-size: 14px; font-weight: 600;
  border: 1px dashed #c2cedb;
}
.rv-agent-intro { margin-bottom: 6px; }
.rv-agent-outro { margin-top: 6px; }
/* 끝인사 버전 안내(기사작성 화면) — 자동 선택이라 안내만 */
.ti-outro-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.ti-outro-presets-label { font-size: 12px; font-weight: 800; color: #5b4bb0; }
.ti-outro-auto-note { font-size: 11px; font-weight: 600; color: #7e8896; }
.ti-outro-preset-btn {
  padding: 4px 12px; background: #fff; border: 1.5px solid #c2cedb; border-radius: 9999px;
  font-size: 12px; font-weight: 700; color: #54606c; cursor: pointer;
}
.ti-outro-preset-btn.selected { background: #e7ddff; border-color: #8b7ad8; color: #5b4bb0; }
.rv-card-agent { gap: 0; }
.rv-card-agent .rv-body-bg { flex: 1; min-height: 0; display: flex; }
.rv-body-readonly { background: #fbfcfe !important; cursor: default; }
/* 에이전트모드: 수정 위젯(UNDO/REDO/수정·삭제/추가) + 하단 재생성/미리듣기 바 숨김 (요소는 유지) */
.rv-card-agent .rv-review-action-row,
.rv-card-agent .rv-legacy-bottom-bar { display: none !important; }
/* 본문/고정멘트 글씨를 diff(에이전트 수정)와 동일 크기로 통일 + 간격 정리 */
.rv-card-agent { padding: 10px 14px !important; gap: 4px !important; }
/* 에이전트모드: 본문 textarea는 소스로 숨기고 #rv-agent-body div가 마커 표시를 담당 */
.rv-card-agent .rv-body-textarea { display: none !important; }
.rv-card-agent .rv-body-bg { padding: 10px 12px; }
.rv-card-agent .rv-agent-fixed { font-size: 13px; padding: 6px 10px; }
.rv-card-agent .rv-agent-intro { margin-bottom: 12px; }
.rv-card-agent .rv-agent-outro { margin-top: 12px; }
/* 에이전트 수정 diff 패널: 닫혔을 때 얇게(본문이 세로로 더 늘어나도록) */
.rv-hermes-panel:has(.rv-hermes-details:not([open])) { max-height: none; }

/* 리뷰 화면 하단 푸터 — 버튼 세로를 원래대로(여백이 너무 넓어 보이지 않게) */
.rv-retro-window .retro-make-footer { padding: 12px 16px; }
.rv-retro-window .retro-make-btn,
.rv-retro-window .retro-make-btn-back { height: 52px; font-size: 16px; box-shadow: 3px 3px 0 #28343e; }

/* 입고요청 확인 모달 */
.deliver-modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(30,40,55,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.deliver-modal-box {
  background: #e6eff9; border: 2px solid #28343e;
  border-radius: 14px; box-shadow: 6px 6px 0 #28343e;
  width: 320px; overflow: hidden;
}
.deliver-modal-titlebar {
  background: #28343e; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.deliver-modal-dots { display: flex; gap: 6px; }
.deliver-modal-winlabel { color: #e6eff9; font-size: 13px; font-weight: 700; font-family: var(--font-headline); }
.deliver-modal-body { display: flex; align-items: center; gap: 16px; padding: 22px 20px 14px; }
.deliver-hex-wrap { position: relative; width: 54px; height: 54px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.deliver-hex-svg { width: 54px; height: 54px; }
.deliver-hex-icon { position: absolute; font-size: 22px; color: #fff; font-weight: 900; font-family: var(--font-headline); }
.deliver-modal-text { flex: 1; }
.deliver-modal-title { font-size: 15px; font-weight: 800; color: #28343e; margin: 0 0 6px; }
.deliver-modal-desc { font-size: 13px; color: #3d4a5a; margin: 0; line-height: 1.5; }
.deliver-modal-warn { color: #c0584a; font-weight: 700; }
.deliver-modal-btns { display: flex; gap: 10px; padding: 14px 20px 18px; }
.deliver-btn-cancel, .deliver-btn-confirm {
  flex: 1; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 800;
  font-family: var(--font-headline); cursor: pointer; border: 2px solid #28343e;
  box-shadow: 3px 3px 0 #28343e; transition: transform 0.1s, box-shadow 0.1s;
}
.deliver-btn-cancel { background: #fff; color: #28343e; }
.deliver-btn-confirm { background: #28343e; color: #e6eff9; }
.deliver-btn-cancel:hover, .deliver-btn-confirm:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #28343e; }
.deliver-btn-cancel:active, .deliver-btn-confirm:active { transform: translate(1px,1px); box-shadow: none; }

/* (구 action row 제거됨) */

/* result-wrap (legacy, kept for JS refs) */
.result-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; padding: 20px 0; max-width: 560px; margin: 0 auto; width: 100%;
}

/* 헤더 (레퍼런스 <header class="px-8 pt-8 pb-4">) */
.rs-header {
  padding: 28px 32px 12px; flex-shrink: 0;
}
.rs-title {
  font-size: 22px; font-weight: 800; color: #1a1a1a;
  margin: 0; letter-spacing: -0.02em;
}

/* 콘텐츠 영역 (레퍼런스 <div class="px-8 py-2 flex-grow flex flex-col space-y-6 overflow-hidden">) */
.rs-content {
  flex: 1; padding: 8px 32px; display: flex; flex-direction: column;
  gap: 20px; overflow: hidden; min-height: 0;
}

/* 오디오 카드 (레퍼런스 <section id="audio-player">) */
.rs-audio-card {
  display: flex; align-items: center; gap: 12px;
  background: #ffffff; border-radius: 12px;
  padding: 10px 14px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1.5px solid rgba(40,52,62,0.08);
}
.rs-play-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: #28343e; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.rs-play-btn:hover { background: #3a4f66; }
.rs-audio-card-vertical { flex-direction: column; gap: 6px; }
.rs-audio-top-row { display: flex; align-items: center; gap: 14px; width: 100%; }
.rs-audio-time-row { text-align: right; font-size: 13px; font-weight: 700; color: #54606c; }
.rs-audio-inner { flex: 1; display: flex; flex-direction: column; gap: 8px; }
/* pills 행 (오디오 카드 내부) */
.rs-audio-pills {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: space-between;
}
/* 오디오 카드 내 결과 pill — 작게 */
.rs-audio-pills .rs-pill-result {
  font-size: 11px; padding: 3px 10px; font-weight: 600;
}
/* track + time-total 행 */
.rs-audio-track-row {
  display: flex; align-items: center; gap: 10px;
}
.rs-audio-track {
  flex: 1; height: 6px; border-radius: 3px; width: 100%;
  background: rgba(0,0,0,0.1); cursor: pointer; position: relative;
}
.rs-audio-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  width: 0%; background: #28343e; border-radius: 3px; pointer-events: none;
}
.rs-audio-thumb {
  position: absolute; top: 50%; left: 0%; width: 14px; height: 14px;
  border-radius: 50%; background: #28343e; transform: translate(-50%, -50%);
  pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.rs-time-display {
  font-size: 12px; font-weight: 600; color: #727687;
  white-space: nowrap; flex-shrink: 0; min-width: 80px; text-align: right;
}
/* 진행 시간 — 트랙 내부 왼쪽 */
.rs-time-inside {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; color: #ffffff;
  letter-spacing: 0.04em; pointer-events: none; z-index: 2;
  text-shadow: 0 0 3px rgba(0,0,0,0.55), 0 0 6px rgba(0,0,0,0.3);
}
/* 전체 시간 — 트랙 오른쪽 */
.rs-time-total {
  font-size: 11px; font-weight: 600; color: #727687;
  white-space: nowrap; flex-shrink: 0;
}
.rs-vol-btn {
  padding: 6px; background: none; border: none; cursor: pointer;
  color: #727687; display: flex; align-items: center; flex-shrink: 0;
  border-radius: 6px; transition: color 0.15s;
}
.rs-vol-btn:hover { color: #09003e; }

/* 대본 카드 */
.rs-script-card {
  flex: 1; display: flex; flex-direction: column;
  background: #ffffff; border-radius: 12px;
  border: 2px solid #28343e;
  box-shadow: 4px 4px 0 #28343e;
  overflow: hidden; position: relative; min-height: 240px;
}
.rs-script-hdr { display: none; }
.rs-script-lbl { display: none; }
/* 대본 카드 하단 액션 버튼 바 */
.rs-script-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; flex-shrink: 0;
  border-top: 1px solid var(--border-light);
}
.rs-script-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px;
  border: 1.5px solid #28343e; background: #ffffff;
  color: #28343e; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.1s;
}
.rs-script-action-btn:hover:not(:disabled) { background: #f1f5f9; }
.rs-script-action-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#btn-revision-merge { display: none; }
.rs-script-icon-btn {
  background: none; border: none; cursor: pointer;
  color: #727687; display: flex; align-items: center;
  padding: 4px; border-radius: 6px; transition: color 0.15s;
}
.rs-script-icon-btn:hover { color: #09003e; }
.rs-script-body { flex: 1; overflow-y: auto; padding: 0; }
.rs-script-body::-webkit-scrollbar { width: 4px; }
.rs-script-body::-webkit-scrollbar-track { background: transparent; }
.rs-script-body::-webkit-scrollbar-thumb { background: #c2c6d8; border-radius: 10px; }
#script-body { flex: 1; overflow-y: auto; }
#script-body.collapsed { overflow: hidden; max-height: 0; }

/* 수정 패널 버튼 */
.rs-edit-btn {
  padding: 7px 14px; border-radius: 10px; border: 2px solid #28343e;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap; box-shadow: 2px 2px 0 #28343e;
  transition: transform 0.1s, box-shadow 0.1s;
}
.rs-edit-btn:not(:disabled):hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #28343e; }
.rs-edit-btn:not(:disabled):active { transform: translate(1px,1px); box-shadow: none; }
.rs-edit-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.rs-edit-btn-secondary { background: #fff; color: #28343e; }
.rs-edit-btn-primary { background: transparent; color: #28343e; border-color: #28343e; min-width: 72px; }
.rs-edit-btn-primary:not(:disabled):hover { background: #28343e; color: #e6eff9; }

/* misc */
.level-status { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; }
.level-status.ok   { color: var(--success); }
.level-status.warn { color: var(--warning); }

@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

.script-text {
  margin: 0; padding: 16px;
  font-family: inherit; font-size: 15px; line-height: 1.75;
  color: var(--text-muted); white-space: pre-wrap; word-break: break-all;
}

/* ── 카라오케 하이라이트 ─────────────────────────────────────── */
.kara-text {
  user-select: text;
  cursor: text;
}
.kara-text span {
  color: var(--text-muted);
  transition: color 0.07s ease, font-weight 0.07s ease;
  border-radius: 2px;
}
.kara-text span.kara-done {
  color: #111827;
  font-weight: inherit;
  background: none;
}
.break-badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  color: #c0584a;
  padding: 1px 6px; margin: 0 2px;
  background: rgba(224, 112, 100, 0.1);
  border: 1px solid rgba(224, 112, 100, 0.4);
  border-radius: 6px;
  vertical-align: middle;
}
.script-section-divider {
  display: block; text-align: center;
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.05em;
  padding: 8px 0 4px; margin: 4px 0;
  border-top: 1px dashed var(--border);
}
.edited-mark {
  background: transparent;
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #e74c3c;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.rs-caret-after {
  box-shadow: 2px 0 0 #1a73e8;
  background: rgba(26, 115, 232, 0.08);
}
.rs-caret-before {
  box-shadow: -2px 0 0 #1a73e8;
  background: rgba(26, 115, 232, 0.08);
}

/* ════════════════════════════════════════════════════════════════
   AI 리뷰 결과 화면 (rv-* 클래스)
════════════════════════════════════════════════════════════════ */
/* ── Review Retro Window ── */
.rv-retro-window { overflow: hidden; }
.rv-retro-body {
  flex: 1; min-height: 0; overflow-y: hidden;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 8px;
}
.rv-retro-stat {
  border-bottom: 2px solid #28343e; padding: 10px 16px;
  background: #dfe9f5; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; color: #54606c;
}
.rv-retro-stat .rv-stat-counts { font-size: 16px; color: #111827; font-weight: 700; }
.rv-retro-stat .rv-est-val {
  font-size: 13.5px !important; font-weight: 900 !important;
  color: #1e2833 !important; line-height: 1; font-family: var(--font-body);
}
/* Cards inside retro window */
.rv-retro-body .rv-card {
  background: #fff; border-radius: 10px; padding: 20px;
  box-shadow: none; border: 1.5px solid #b5c8d8;
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
.rv-retro-body .rv-card-ta { border: 2px solid #28343e; }
.rv-retro-body .rv-body-bg { background: #f5f8fc; }
.rv-retro-body .rv-ta-editable { background: #f5f8fc; }
.rv-retro-body .rv-ta-editable:focus { background: #fff; border-color: #28343e; }

.rv-screen {
  gap: 20px !important;
  padding: 28px 40px 20px !important;
  background: #f8f9fa;
}
/* 헤더 */
.rv-header-bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid rgba(194,198,216,0.3); padding-bottom: 24px; flex-shrink: 0;
}
.rv-header-text { display: flex; flex-direction: column; gap: 6px; }
.rv-page-title  { font-family: 'Manrope', var(--font-ui, sans-serif); font-size: 28px; font-weight: 800; color: #191c1d; margin: 0; }
.rv-page-sub    { font-size: 14px; color: #424656; margin: 0; }
.rv-status-badge {
  display: flex; align-items: center; gap: 8px;
  background: #edeeef; padding: 8px 16px; border-radius: 9999px;
  font-size: 14px; font-weight: 600; color: #191c1d; white-space: nowrap; flex-shrink: 0;
}
.rv-status-icon { font-size: 18px; color: #f59e0b; font-variation-settings: 'FILL' 1; }
.rv-status-value { font-weight: 700; }

/* 섹션 컨테이너 */
.rv-sections { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }

/* 카드 */
.rv-card {
  background: #fff; border-radius: 12px; padding: 14px;
  box-shadow: 0 12px 40px rgba(9,0,62,0.04); border: 1px solid rgba(194,198,216,0.25);
  min-height: 0;
}
.rv-card-ta {
  border: 2px solid rgba(9,0,62,0.12); box-shadow: 0 12px 40px rgba(9,0,62,0.06);
}
.rv-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.rv-card-title-wrap { display: flex; align-items: center; gap: 12px; }
.rv-card-accent-bar    { width: 6px; height: 24px; background: #09003e; border-radius: 9999px; flex-shrink: 0; }
.rv-card-accent-bar-ta { background: #1a0099; }
.rv-card-title { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 700; color: #191c1d; margin: 0; }

/* 카드 우측 스탯 */
.rv-card-stats { display: flex; align-items: center; gap: 16px; }
.rv-stat-col   { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rv-stat-col-label { display: none; }
.rv-stat-col-val   { font-size: 14px; font-weight: 600; color: #191c1d; }
.rv-stat-sep       { width: 1px; height: 32px; background: rgba(194,198,216,0.4); }
.rv-text-primary           { color: #09003e; }
.rv-text-primary-container { color: #1a0099; }

/* 본문 텍스트 (읽기 전용) */
.rv-body-bg { background: #f3f4f5; border-radius: 8px; padding: 12px; min-height: 0; flex: 1; display: flex; }
.rv-body-textarea {
  width: 100%; border: 2px solid transparent; border-radius: 8px; background: transparent; outline: none; resize: none;
  font-size: 15px; line-height: 1.75; color: #424656; font-family: inherit;
  min-height: 0; height: 100%; cursor: text; box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.rv-body-textarea:focus { border-color: rgba(9,0,62,0.25); background: #fff; }

/* diff */
.rv-diff-wrap  { display: none !important; background: #f8f9fa; border-radius: 8px; padding: 14px 14px; margin-bottom: 8px; border: 1px solid #e7e8e9; }
.rv-diff-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #727687; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.rv-diff-body  { font-size: 14px; line-height: 1.7; color: #424656; }

/* 재측정 버튼 */
.rv-remeas-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px; border: 1px solid #e1e3e4;
  background: #edeeef; color: #424656; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.rv-remeas-btn:hover { background: #e1e3e4; }
.rv-remeas-btn:disabled { opacity: 0.5; cursor: wait; }

/* 시간조절용 툴바 */
.rv-ta-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.rv-ta-pills { display: flex; gap: 8px; }
.rv-pill {
  padding: 6px 16px; border-radius: 9999px; border: 1px solid rgba(194,198,216,0.4);
  background: transparent; font-size: 13px; font-weight: 600; color: #425ca0;
  cursor: pointer; transition: background 0.15s;
}
.rv-pill:hover { background: rgba(155,180,254,0.2); }

/* 시간조절용 textarea */
.rv-ta-wrap { position: relative; }
.rv-ta-editable {
  width: 100%; min-height: 140px; background: #f3f4f5; border-radius: 8px;
  border: 2px solid transparent; padding: 20px; font-size: 15px; line-height: 1.7;
  color: #191c1d; font-family: inherit; resize: none; outline: none; box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.rv-ta-editable:focus { border-color: rgba(9,0,62,0.25); background: #fff; }
.rv-ta-editable:disabled, .rv-body-textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.rv-ta-edit-icon {
  position: absolute; bottom: 14px; right: 14px; font-size: 18px; color: #c2c6d8;
  pointer-events: none; transition: color 0.15s;
}
.rv-ta-wrap:focus-within .rv-ta-edit-icon { color: rgba(0,102,255,0.5); }
.rv-need-info { font-size: 14px; font-weight: 600; display: inline; }
.rv-bottom-bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #e7e8e9; flex-wrap: wrap; flex-shrink: 0;
}
.rv-remeas-retro-btn:disabled { opacity: 0.5; cursor: wait; }

/* 통계 바 */
.rv-stat-bar {
  background: rgba(237,238,239,0.6); backdrop-filter: blur(8px);
  border-radius: 16px; padding: 20px 24px; border: 1px solid rgba(194,198,216,0.15); flex-shrink: 0;
}
.rv-stat-main-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rv-stat-counts { font-size: 14px; color: #424656; }
.rv-arrow { margin: 0 6px; color: #727687; }
.rv-stat-dur-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rv-est-label { display: none; }
.rv-est-val { font-family: 'Manrope', sans-serif; font-size: 26px; font-weight: 900; color: #09003e; line-height: 1; transition: color 0.2s; }
/* 프로그레스 */
.rv-progress-track {
  position: relative; width: 100%; height: 12px;
  background: #e1e3e4; border-radius: 9999px; overflow: hidden; margin-bottom: 8px;
}
.rv-progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(to right, #09003e, #1a0099);
  border-radius: 9999px; transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(0,102,255,0.3);
}
.rv-progress-marker {
  position: absolute; top: -2px; width: 2px; height: calc(100% + 4px);
  background: #f59e0b; z-index: 2;
}
.rv-progress-labels { display: flex; justify-content: flex-end; }
.rv-progress-labels span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: #727687; }
.rv-target-label { color: #f59e0b !important; }

/* 푸터 */
.rv-footer { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.rv-btn-back {
  padding: 12px 28px; border-radius: 12px; border: 1px solid #c2c6d8;
  background: #fff; color: #191c1d; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.rv-btn-back:hover { background: #f3f4f5; }
.rv-btn-generate {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 36px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #09003e, #1a0099);
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(9,0,62,0.25); transition: box-shadow 0.15s, filter 0.15s;
}
.rv-btn-generate:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(9,0,62,0.4); filter: brightness(1.08); }
.rv-btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 기존 AI 텍스트 리뷰 화면 (하위 호환) ─────────────────────── */
.review-wrap {
  max-width: 700px; margin: 0 auto; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 20px;
}
.review-header {
  position: sticky; top: -20px; z-index: 10;
  background: var(--bg-primary); padding: 20px 16px 10px;
  border-bottom: 2px solid var(--border); margin: -20px -16px 12px;
  width: calc(100% + 32px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.review-header h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--text-primary); }
.review-hint { margin: 0; font-size: 0.85rem; color: var(--text-muted); white-space: pre-line; }

.review-section-label {
  font-size: 0.85rem; font-weight: 700;
  color: var(--accent-light); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}

.review-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.diff-legend { display: flex; gap: 8px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.legend-add    { color: #3a9e6a; font-size: 0.78rem; }
.legend-remove { color: #c0392b; font-size: 0.78rem; text-decoration: line-through; }

.review-diff {
  padding: 14px 16px; border-radius: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  font-size: 0.9rem; line-height: 1.75; color: var(--text-primary);
  max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
ins.diff-add {
  background: rgba(58,158,106,0.18); color: #2ecc71;
  text-decoration: underline; text-decoration-color: rgba(46,204,113,0.5);
  border-radius: 2px;
}
del.diff-remove {
  background: rgba(192,57,43,0.15); color: #e74c3c;
  text-decoration: line-through; text-decoration-color: rgba(231,76,60,0.6);
  border-radius: 2px;
}

.review-textarea {
  width: 100%; min-height: 160px; resize: vertical;
  font-size: 0.9rem; line-height: 1.7; box-sizing: border-box;
}
.review-char-info {
  font-size: 0.8rem; color: var(--text-muted); font-weight: 400;
}
.review-char-info.warn { color: var(--error); }
.review-dur-info {
  font-size: 0.8rem; color: var(--accent); font-weight: 400;
}
/* 자수+예상시간을 오른쪽으로 밀기 위해 첫 번째 span이 auto margin 역할 */
.review-section-title .review-char-info { margin-left: auto; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; }

.review-section { margin-bottom: 16px; }
.review-section-unchanged { opacity: 0.75; }
.review-unchanged-badge {
  font-size: 0.72rem; font-weight: 400; color: var(--text-muted);
  background: var(--bg-secondary); padding: 1px 8px; border-radius: 10px;
  margin-left: 8px; vertical-align: middle;
}
.review-textarea-readonly {
  min-height: 80px !important; background: var(--bg-secondary) !important;
  cursor: default; opacity: 0.85;
}

/* ── 우클릭 컨텍스트 메뉴 ────────────────────────────────────── */
.context-menu {
  position: fixed;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 110px;
  padding: 4px 0;
}
.ctx-menu-item {
  display: block; width: 100%;
  padding: 8px 16px; text-align: left;
  background: none; border: none;
  color: var(--text-primary); font-size: 13px;
  font-family: inherit; cursor: pointer;
  transition: background var(--trans);
}
.ctx-menu-item:hover { background: var(--bg-card-hover); }
.ctx-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.ctx-menu-label { font-size: 11px; color: var(--text-muted); padding: 4px 12px 2px; }
.ctx-menu-pause-row { display: flex; gap: 4px; padding: 4px 8px 6px; }
.ctx-pause-btn {
  font-size: 11px; padding: 3px 8px; border-radius: 10px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.3s ease;
}
.ctx-pause-btn:hover {
  background: transparent; color: var(--text-primary);
  transform: rotate(-1.5deg) scale(1.03);
}
/* 흰 배경 컨텍스트 메뉴 (결과 화면) */
.ctx-white-menu {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  min-width: 100px;
}
.ctx-white-menu .ctx-menu-item { color: #0f172a; }
.ctx-edit-item {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 500;
}
.ctx-white-menu .ctx-menu-item:hover { background: #f1f5f9; }

/* ── 결과 화면 rs-* ─────────────────────────────────────────── */
.rs-pills-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.rs-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 600;
}
.rs-pill-target {
  color: #64748b; font-weight: 500;
}
.rs-pill-result {
  padding: 5px 16px; border-radius: 20px;
  background: #f1f5f9; color: var(--text-secondary); font-weight: 600;
  border: 1.5px solid transparent;
}
.rs-pill-result.rs-pass { background: #dcfce7; color: #16a34a; border-color: #86efac; }
.rs-pill-result.rs-fail { background: #fee2e2; color: var(--error); border-color: #fca5a5; }

/* (구 rs-duration-bar 제거됨 → rs-pills-row 사용) */

/* 결과 화면 수정 패널 — retro-window 내부 아래에서 슬라이드 업 */
.rs-edit-panel {
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 45vh;
  z-index: 100;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.18s ease;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.rs-edit-panel.rs-panel-open {
  transform: translateY(0);
  pointer-events: all;
  visibility: visible;
  opacity: 1;
}
.rs-edit-inner {
  background: #e6eff9;
  border: 2px solid #28343e;
  border-bottom: none;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  border-radius: 12px 12px 0 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rs-edit-winbar {
  border-radius: 10px 10px 0 0;
  justify-content: center !important;
  position: relative;
}
.rs-edit-winbar .retro-win-dots {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
}
.rs-editor-mode-badge {
  background: #fbbf24;
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.rs-edit-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 18px 6px;
  gap: 6px;
  overflow: hidden;
  min-height: 0;
}
.rs-edit-textarea {
  flex: 1;
  min-height: 60px;
  background: #fff;
  border: 2px solid rgba(40,52,62,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  color: #0f172a;
  outline: none;
  line-height: 1.6;
}
.rs-edit-textarea:focus { border-color: #28343e; }
.rs-edit-footer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 12px;
  border-top: 1px solid rgba(40,52,62,0.1);
  flex-shrink: 0;
}
.rs-edit-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
/* 수정 패널 쉬기 버튼 — 이미지206 스타일 (분할 버튼) */
.rs-pause-trigger {
  display: inline-flex; align-items: center; gap: 0;
  font-size: 11px; font-weight: 700; color: #28343e;
  background: #fff; border: 2px solid #28343e;
  border-radius: 8px; font-family: inherit; white-space: nowrap;
  box-shadow: 2px 2px 0 #28343e; padding: 0; overflow: hidden;
}
.rs-pause-btn-insert, .rs-pause-btn-picker {
  display: inline-flex; align-items: center;
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 700; color: #28343e; font-family: inherit;
  padding: 0;
}
.rs-pause-btn-insert:hover { background: #dfe9f5; }
.rs-pause-btn-picker:hover { background: #dfe9f5; }
.rs-pause-label { padding: 7px 10px; }
.rs-pause-sep { width: 1.5px; background: #28343e; align-self: stretch; flex-shrink: 0; }
.rs-pause-caret { padding: 5px 6px; font-size: 9px; }
.ppp-popup {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  z-index: 999; overflow: hidden; min-width: 80px;
}
.rs-footer {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 0 4px; gap: 12px; flex-shrink: 0;
}
.rs-btn-deliver {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 24px; border-radius: 24px;
  background: transparent; border: 1.5px solid #c2c6d8;
  color: #424656; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.rs-btn-deliver:hover { background: #f3f4f5; }
.rs-btn-deliver:disabled { opacity: 0.4; cursor: not-allowed; }
.rs-btn-deliver.deliver-complete { background: #dcfce7; border-color: #86efac; color: #15803d; }
.rs-btn-deliver.deliver-complete:hover { background: #bbf7d0; }
.rs-btn-download {
  padding: 11px 32px; border-radius: 24px;
  background: #09003e; border: none;
  color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 12px rgba(9,0,62,0.3);
  transition: background 0.15s, transform 0.1s;
}
.rs-btn-download:hover { background: #003fa4; transform: scale(1.02); }
.rs-btn-download:disabled { opacity: 0.4; cursor: not-allowed; filter: brightness(0.8); }

/* ── 선택 구간 편집 패널 ─────────────────────────────────────── */
.script-edit-panel {
  margin-top: 10px; padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
}
.edit-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.edit-panel-status {
  font-size: 12px; color: var(--sketch-green); font-weight: 600;
  margin-left: 8px;
}
.edit-panel-info {
  font-size: 12px; color: #111827;
  line-height: 1.6; min-height: 20px;
}
.edit-panel-title {
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
}
.edit-panel-textarea {
  width: 100%; resize: vertical;
  font-family: inherit; font-size: 13px; line-height: 1.6;
  min-height: 72px;
}
.edit-panel-pause-row {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
}
.edit-panel-pause-label {
  font-size: 12px; color: var(--text-muted); margin-right: 4px; white-space: nowrap;
}
.edit-pause-btn {
  font-size: 11px; padding: 3px 8px; border-radius: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; transition: all 0.3s ease;
}
.edit-pause-btn:hover {
  background: transparent; color: var(--text-primary);
  transform: rotate(-1.5deg) scale(1.03);
}
.edit-panel-footer {
  display: flex; justify-content: center; gap: 12px; margin-top: 14px;
}

/* (구 audio-player 클래스 제거됨 → rs-audio-card 사용) */

/* 4 Action Buttons */
.result-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; width: 100%;
}


/* ════════════════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }

.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(4px); }
#release-notes-modal, #usage-guide-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(4px);
}

.modal-box {
  position: relative; z-index: 1;
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); width: 440px; max-width: 90vw;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; }

.modal-close {
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 14px; cursor: pointer;
  border-radius: 6px; transition: all var(--trans);
}
.modal-close:hover { background: var(--bg-card); color: var(--text-primary); }

.modal-body { padding: 20px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════════════ */
/* Persistent alert banner – 오른쪽 상단 고정 */
.alert-banner {
  position: fixed; top: 64px; right: 20px; z-index: 9998;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 340px; padding: 12px 14px;
  background: rgba(176,48,80,0.10); border: 1px solid var(--error);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  font-size: 13px; font-weight: 500; color: var(--error);
  line-height: 1.45;
  animation: toast-in 0.2s ease;
}
.alert-banner-close {
  flex-shrink: 0; background: none; border: none;
  color: var(--error); cursor: pointer; font-size: 13px;
  padding: 0 2px; opacity: 0.7; line-height: 1;
}

/* ── 코파일럿 패널 (레트로 스타일) ───────────────────────────── */
.copilot-panel {
  position: fixed; z-index: 9990;
  width: 340px; height: 480px; max-height: 85vh;
  background: #f0f4f8;
  border: 2.5px solid #28343e;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #28343e;
  flex-direction: column; overflow: hidden;
}
/* 타이틀바 */
.copilot-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: #d8e6f4;
  border-bottom: 2px solid #28343e;
  border-radius: 11px 11px 0 0;
  cursor: grab; user-select: none; flex-shrink: 0;
}
.copilot-header-dots { display: flex; gap: 7px; align-items: center; }
.copilot-dot { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #28343e; }
.copilot-dot-blue { background: #6fa3d8; }
.copilot-dot-red  { background: #e85555; }
.copilot-title { font-size: 12px; font-weight: 900; color: #28343e; letter-spacing: 0.06em; }
.copilot-close {
  width: 26px; height: 26px; border: 1.5px solid #28343e; border-radius: 6px;
  background: #eef4fb; color: #28343e; cursor: pointer;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 #28343e; transition: transform 0.1s;
}
.copilot-close:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #28343e; }
/* 메시지 영역 */
.copilot-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  background: #fff;
  border-bottom: 2px solid #28343e;
  position: relative;
}
/* HLAI 워터마크 — 항상 배경에 표시 */
.copilot-messages::after {
  content: 'HLAI';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 900; color: rgba(40,52,62,0.05);
  letter-spacing: 0.05em; pointer-events: none; z-index: 0;
  line-height: 1;
}
/* 빈 상태 */
.copilot-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-start;
  padding: 10px 0; position: relative; z-index: 1;
}
/* 로봇 아바타 + 말풍선 */
.copilot-avatar-wrap { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.copilot-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: #e8f0fa; border: 2px solid #28343e; border-radius: 10px;
  box-shadow: 2px 2px 0 #28343e;
  display: flex; align-items: center; justify-content: center;
}
.copilot-avatar-bubble {
  background: #eef4fb; border: 1.5px solid #28343e; border-radius: 4px 12px 12px 12px;
  padding: 10px 13px; font-size: 13px; font-weight: 600; color: #28343e;
  line-height: 1.5; max-width: 200px;
  box-shadow: 2px 2px 0 #28343e;
}
/* HLAI 워터마크 (빈상태용 - ::after로 대체됨, 숨김) */
.copilot-watermark { display: none; }
/* 일반 메시지 */
.copilot-msg-wrap { display: flex; position: relative; z-index: 1; }
.copilot-msg-user { justify-content: flex-end; }
.copilot-msg-assistant { justify-content: flex-start; gap: 8px; align-items: flex-start; }
.copilot-msg-assistant .copilot-avatar { width: 32px; height: 32px; font-size: 16px; flex-shrink: 0; }
.copilot-bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 12px;
  font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.copilot-bubble-user {
  background: #43627e; color: #fff;
  border: 1.5px solid #28343e; box-shadow: 2px 2px 0 #28343e;
  border-radius: 12px 12px 4px 12px;
}
.copilot-bubble-assistant {
  background: #eef4fb; color: #28343e;
  border: 1.5px solid #28343e; box-shadow: 2px 2px 0 #28343e;
  border-radius: 4px 12px 12px 12px;
}
/* 입력 영역 */
.copilot-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; background: #d8e6f4; flex-shrink: 0;
}
.copilot-input {
  flex: 1; padding: 9px 14px;
  border: 1.5px solid #28343e; border-radius: 99px;
  font-size: 13px; background: #fff;
  color: #28343e; outline: none;
}
.copilot-input:focus { border-color: #43627e; box-shadow: 0 0 0 2px rgba(67,98,126,0.15); }
.copilot-send-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid #28343e;
  background: #43627e; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 2px 2px 0 #28343e; transition: transform 0.1s, box-shadow 0.1s;
}
.copilot-send-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #28343e; }
.copilot-send-btn:active { transform: translate(1px,1px); box-shadow: none; }
.copilot-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* AI 코파일럿 플로팅 버튼 */
.copilot-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9980;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid #28343e;
  background: #fff;
  box-shadow: 3px 3px 0 #28343e;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.copilot-fab:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #28343e;
}
.copilot-fab:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #28343e;
}
.copilot-fab-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
@supports (padding: env(safe-area-inset-bottom)) {
  .copilot-fab { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.alert-banner-close:hover { opacity: 1; }

#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 6px;
  z-index: 9999; pointer-events: none;
}

.toast {
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease;
  pointer-events: all; min-width: 200px; max-width: 420px;
  text-align: left; display: flex; align-items: center; gap: 10px;
}
.toast-close {
  background: none; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: inherit; opacity: 0.6;
  padding: 0 2px; line-height: 1; flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
.toast-success { background: rgba(74,142,90,0.06); border: 1px solid var(--success); color: var(--success); opacity: 0.5; }
.toast-error   { background: rgba(176,48,80,0.06); border: 1px solid var(--error); color: var(--error); opacity: 0.5; }
.toast-info    { background: rgba(0,0,0,0.03); border: 1px solid #1a1a1a; color: #1a1a1a; opacity: 0.5; }
.toast:hover   { opacity: 1; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 레트로 에러 팝업 */
.retro-error-popup {
  background: #e6eff9;
  border: 2px solid #28343e;
  box-shadow: 3px 3px 0 #28343e;
  border-radius: 12px;
  min-width: 220px;
  max-width: 360px;
  overflow: hidden;
  animation: toast-in 0.2s ease;
  opacity: 0.82;
  pointer-events: all;
  transition: opacity 0.2s;
}
.retro-error-popup:hover { opacity: 1; }
.retro-error-bar {
  background: #e07070;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 10px 10px 0 0;
}
.retro-error-circle { font-size: 13px; margin-right: 6px; opacity: 0.9; }
.retro-error-bar-title { flex: 1; text-align: center; }
.retro-error-close {
  background: none; border: none; color: #fff;
  cursor: pointer; font-size: 13px; font-weight: 700;
  padding: 0 2px; line-height: 1; opacity: 0.8;
}
.retro-error-close:hover { opacity: 1; }
.retro-error-body {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
}
.retro-error-icon-wrap {
  background: rgba(224,112,112,0.15);
  border: 1.5px solid #e07070;
  border-radius: 10px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.retro-error-icon { color: #e07070; font-size: 20px; font-weight: 900; }
.retro-error-appname {
  font-size: 13px; font-weight: 800; color: #28343e; letter-spacing: 0.04em;
}
.retro-error-msg {
  font-size: 11px; color: #64748b; letter-spacing: 0.02em; margin-top: 2px;
  word-break: break-all;
}

/* ════════════════════════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   ROLE-BASED HIDING
════════════════════════════════════════════════════════════════ */
#screen-main[data-role="user"] .admin-only { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   ADMIN PANEL
════════════════════════════════════════════════════════════════ */
#tab-admin { padding: 0; }

.admin-subnav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 0 20px; flex-shrink: 0;
}

.admin-subbtn {
  padding: 12px 20px; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--trans);
}
.admin-subbtn:hover { color: var(--text-primary); }
.admin-subbtn.active {
  color: var(--accent); border-bottom-color: var(--accent);
}

.admin-tab-panel {
  display: none; flex-direction: column; flex: 1; overflow: hidden;
}
.admin-tab-panel.active { display: flex; }

.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px;
}
.admin-toolbar .sub-desc { flex: 1; }

.admin-voice-list {
  flex: 1; overflow-y: auto; padding: 12px 20px;
  display: flex; flex-direction: column; gap: 8px;
}

.admin-voice-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-voice-info {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}

.admin-voice-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #666, #1a1a1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}

.admin-voice-name {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-voice-cat {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.admin-voice-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.btn-danger {
  background: rgba(176, 48, 80, 0.08); color: var(--error);
  border: 1px solid rgba(176, 48, 80, 0.3);
}
.btn-danger:hover { background: rgba(176, 48, 80, 0.15); border-color: var(--error); }

/* ════════════════════════════════════════════════════════════════
   LOG TABLE
════════════════════════════════════════════════════════════════ */
.log-table-wrap {
  flex: 1; overflow-y: auto; padding: 12px 20px;
}

.log-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}

.log-table th {
  text-align: left; padding: 8px 12px;
  background: var(--bg-secondary); color: var(--text-secondary);
  font-weight: 600; font-size: 12px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}

.log-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-primary); vertical-align: middle;
}

.log-table tr:hover td { background: var(--bg-card); }

.log-empty {
  text-align: center; color: var(--text-muted);
  padding: 40px 12px !important;
}

.log-event {
  display: inline-block; padding: 2px 8px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
}
.log-event-login         { background: rgba(74,142,90,0.12);  color: var(--success); }
.log-event-logout        { background: rgba(176,96,48,0.10);  color: var(--warning); }
.log-event-tts_generated { background: rgba(0,0,0,0.06); color: var(--text-primary); }
.log-event-voice_deleted { background: rgba(176,48,80,0.10);  color: var(--error); }

/* ── User Management Panel ── */
.user-form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.user-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-row-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}
.user-row-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.role-badge.admin {
  background: var(--accent-glow);
  color: var(--accent-dark);
}
.role-badge.user {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* ── First Setup Screen ── */
#screen-first-setup {
  align-items: center; justify-content: center;
  background: var(--bg-primary);
}

/* ── Today Count ── */
.remaining-tokens {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.btn-refresh-icon {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-muted);
  padding: 0 2px; margin-right: 10px;
  transition: color 0.2s;
}
.btn-refresh-icon:hover { color: var(--accent); }
.today-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 8px;
  white-space: nowrap;
}

/* ── Gen Elapsed Timer ── */
.gen-elapsed {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── 발음 규칙 탭 ─────────────────────────────────────────────── */
.pronun-wrap {
  max-width: 700px; margin: 0 auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 24px;
}
.pronun-add-section,
.pronun-list-section {
  display: flex; flex-direction: column;
}
.pronun-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.pronun-natural-row {
  display: flex; gap: 8px; align-items: center;
}
.pronun-natural-row .form-input { flex: 1; }
.pronun-manual-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.pronun-manual-row .form-input { flex: 1; min-width: 100px; }
.pronun-arrow { color: var(--text-muted); font-size: 1rem; flex-shrink: 0; }

.pronun-rule-list { display: flex; flex-direction: column; gap: 6px; }
.pronun-rule-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  font-size: 0.9rem;
}
.pronun-rule-pattern  { font-weight: 600; color: var(--text-primary); }
.pronun-rule-arrow    { color: var(--text-muted); font-size: 0.85rem; }
.pronun-rule-replacement { color: var(--accent-dark); }
.pronun-rule-note     { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.pronun-rule-by       { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.pronun-delete-btn    { flex-shrink: 0; }
.pronun-empty { color: var(--text-muted); font-size: 0.9rem; padding: 20px; text-align: center; }

/* ── 발음 사전 모달 ───────────────────────────────────────────── */
/* ── 발음 교정 모달 (레트로 스타일) ───────────────────────────── */
.pronun-modal-overlay {
  position: fixed; inset: 0; z-index: 1800;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.pronun-modal-box {
  background: #f0f4f8;
  border: 2px solid #28343e;
  border-radius: 14px;
  box-shadow: 6px 6px 0 #28343e;
  width: 560px; max-width: 94vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.pronun-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #c8d8e8;
  border-bottom: 2px solid #28343e; flex-shrink: 0;
}
.pronun-modal-title { font-size: 15px; font-weight: 800; color: #1e2833; letter-spacing: 0.01em; }
.pronun-modal-close {
  width: 32px; height: 32px;
  background: #fff; border: 2px solid #28343e; border-radius: 8px;
  font-size: 15px; font-weight: 700; color: #28343e;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.pronun-modal-close:hover { background: #e2e8f0; }
.pronun-modal-body {
  flex: 1; overflow-y: auto; padding: 0;
  display: flex; flex-direction: column;
  background: #fff;
}
.pronun-modal-section { padding: 20px 22px; }
.pronun-modal-list-section { flex: 1; display: flex; flex-direction: column; min-height: 120px; }
.pronun-modal-sec-title {
  font-size: 15px; font-weight: 800; color: #1e2833;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
/* 직접 입력 박스 */
.pronun-direct-box {
  display: flex; align-items: center; gap: 0;
  border: 2px solid #28343e; border-radius: 10px;
  background: #fff; overflow: hidden; padding: 14px 16px; gap: 12px;
}
.pronun-direct-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pronun-direct-label { font-size: 11px; color: #94a3b8; font-weight: 600; }
.pronun-direct-input {
  border: none; outline: none; font-size: 15px; color: #1e2833;
  background: transparent; width: 100%;
}
.pronun-direct-sep {
  width: 1px; height: 40px; background: #dde6f0; flex-shrink: 0;
}
.pronun-save-btn {
  padding: 10px 22px; background: #fff;
  border: 2px solid #28343e; border-radius: 8px;
  font-size: 14px; font-weight: 800; color: #1e2833;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.12s;
}
.pronun-save-btn:hover { background: #f0f4f8; }
/* 규칙 목록 */
.pronun-rule-list {
  border: 2px solid #28343e; border-radius: 10px;
  overflow-y: auto; background: #fff;
  max-height: 320px;
}
.pronun-rule-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #e8eef5;
}
.pronun-rule-item:last-child { border-bottom: none; }
.pronun-rule-num {
  font-size: 9px; font-family: monospace; color: #64748b;
  border: 1px solid #94a3b8; border-radius: 3px;
  padding: 1px 4px; min-width: 34px; text-align: center; flex-shrink: 0;
}
.pronun-rule-content { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pronun-rule-main { font-size: 13px; font-weight: 700; color: #1e2833; }
.pronun-rule-arrow { color: #ef4444; margin: 0 4px; }
.pronun-rule-note-label {
  font-size: 9px; color: #94a3b8; letter-spacing: 0.05em; text-transform: uppercase;
}
.pronun-rule-del {
  background: none; border: none; cursor: pointer;
  color: #94a3b8; padding: 2px;
  transition: color 0.12s; flex-shrink: 0;
}
.pronun-rule-del:hover { color: #ef4444; }
.pronun-rule-del .material-symbols-outlined { font-size: 16px !important; }
.pronun-count-badge {
  background: #e2e8f0; color: #475569;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
}
/* 푸터 */
.pronun-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  background: #eef2f7; border-top: 2px solid #28343e; flex-shrink: 0;
}
.pronun-footer-cancel {
  padding: 10px 26px; background: #fff;
  border: 2px solid #28343e; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: #1e2833; cursor: pointer;
  transition: background 0.12s;
}
.pronun-footer-cancel:hover { background: #f0f4f8; }
.pronun-footer-apply {
  padding: 10px 26px; background: #1e2833; color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity 0.12s;
}
.pronun-footer-apply:hover { opacity: 0.85; }

/* ── 사용법 모달 ─────────────────────────────────────────────── */
.usage-guide-overlay {
  position: fixed; inset: 0; z-index: 1900;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.usage-guide-box {
  background: #f0f4f8;
  border: 2px solid #28343e;
  border-radius: 14px;
  box-shadow: 6px 6px 0 #28343e;
  width: 500px; max-width: 94vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.usage-guide-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: #c8d8e8;
  border-bottom: 2px solid #28343e; flex-shrink: 0;
}
.usage-guide-header-left { display: flex; flex-direction: column; gap: 2px; }
.usage-guide-title { font-size: 18px; font-weight: 900; color: #1e2833; }
.usage-guide-subtitle { font-size: 10px; font-weight: 700; color: #54606c; letter-spacing: 0.1em; }
.usage-guide-body {
  flex: 1; overflow-y: auto; background: #fff;
  padding: 20px 24px; display: flex; flex-direction: column; gap: 24px;
}
.usage-section { display: flex; flex-direction: column; gap: 10px; }
.usage-section-head { display: flex; align-items: center; gap: 14px; }
.usage-icon-wrap {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.usage-icon-wrap .material-symbols-outlined { font-size: 24px !important; }
.usage-section-title { font-size: 18px; font-weight: 800; color: #1e2833; line-height: 1.2; }
.usage-section-underline { height: 3px; width: 100%; border-radius: 2px; margin-top: 3px; }
.usage-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.usage-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: #334155; line-height: 1.55;
}
.usage-list li::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; flex-shrink: 0; margin-top: 5px;
}
.usage-guide-footer {
  display: flex; justify-content: flex-end;
  padding: 14px 20px;
  background: #e8eef6; border-top: 2px solid #28343e; flex-shrink: 0;
}
.usage-confirm-btn {
  padding: 12px 32px; background: #28343e; color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: opacity 0.12s;
}
.usage-confirm-btn:hover { opacity: 0.85; }

/* ── 뉴스 삭제 확인 모달 (레트로 윈도우) ─────────────────────── */
.del-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.del-modal-box {
  background: #dfe9f5;
  border: 2.5px solid #28343e;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #28343e;
  width: 380px; max-width: 92vw;
  overflow: hidden;
  display: flex; flex-direction: column;
}
/* 타이틀바 */
.del-modal-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: #c8d8e8;
  border-bottom: 2px solid #28343e;
}
.del-modal-dots { display: flex; gap: 6px; }
.del-dot { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #28343e; }
.del-dot-red    { background: #ff5f57; }
.del-dot-yellow { background: #febc2e; }
.del-dot-green  { background: #28c840; }
.del-modal-winlabel {
  font-size: 11px; font-weight: 900; color: #28343e;
  letter-spacing: 0.08em; text-transform: uppercase;
}
/* 본문 */
.del-modal-body {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 24px 20px;
  background: #eef4fb;
  border-bottom: 2px solid #28343e;
}
/* 헥사곤 */
.del-hex-wrap {
  position: relative; flex-shrink: 0;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.del-hex-svg { width: 64px; height: 64px; filter: drop-shadow(2px 2px 0 #28343e); }
.del-hex-bang {
  position: absolute;
  font-size: 30px; font-weight: 900; color: #fff;
  line-height: 1; margin-top: -2px;
}
/* 텍스트 */
.del-modal-text { flex: 1; }
.del-modal-title { font-size: 17px; font-weight: 900; color: #28343e; margin: 0 0 6px; letter-spacing: 0.01em; }
.del-modal-desc  { font-size: 13px; color: #3d4f5e; line-height: 1.65; margin: 0; }
.del-modal-warn  { color: #c0392b; font-weight: 700; }
/* 버튼 */
.del-modal-btns  {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 16px 20px;
  background: #dfe9f5;
}
.del-btn-cancel {
  padding: 12px; border: 2px solid #28343e; border-radius: 8px;
  background: #eef4fb; color: #28343e; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 #28343e; transition: transform 0.1s, box-shadow 0.1s;
}
.del-btn-cancel:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #28343e; }
.del-btn-cancel:active { transform: translate(2px,2px); box-shadow: none; }
.del-btn-confirm {
  padding: 12px; border: 2px solid #28343e; border-radius: 8px;
  background: #e85555; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 #28343e; transition: transform 0.1s, box-shadow 0.1s;
}
.del-btn-confirm:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #28343e; }
.del-btn-confirm:active { transform: translate(2px,2px); box-shadow: none; }

/* ── 발음 검수 모달 ───────────────────────────────────────────── */
.pronun-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
/* 발음 검수 모달은 공통 .modal-box 스타일 상속, 차별화만 아래에 */
.pronun-modal-overlay .modal-box { width: 100%; max-width: 560px; max-height: 80vh; }
.pronun-check-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.pronun-check-empty { color: var(--text-muted); font-size: 0.9rem; text-align: center; padding: 20px; }
.pronun-check-item {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  transition: opacity 0.3s;
}
.pronun-check-pair { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.pronun-check-orig  { font-weight: 700; color: var(--error); }
.pronun-check-arrow { color: var(--text-muted); }
.pronun-check-repl  { font-weight: 600; color: var(--accent-dark); }
.pronun-check-reason { font-size: 0.8rem; color: var(--text-muted); }
.pronun-check-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pronun-ignore { color: var(--text-muted) !important; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */

/* 15" 이하 (≤1440px) */
@media (max-width: 1440px) {
  .sub-screen { padding: 16px 20px; }
  .text-input-container { max-width: 640px; }
  .result-wrap { max-width: 520px; }
}

/* 13" 노트북 (≤1280px) */
@media (max-width: 1280px) {
  html { font-size: 13px; }
  .app-header { padding: 0 14px; height: 50px; }
  .tab-btn { padding: 5px 12px; font-size: 12px; }
  .sub-screen { padding: 14px 16px; gap: 12px; }
  .sub-header h2 { font-size: 18px; }
  .step-indicator { padding: 8px 16px 6px; }
  .step-shape { width: 24px; height: 24px; }
  .step-label { font-size: 10px; }
  .voice-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .voice-card { padding: 12px; }
  .time-input { font-size: 32px; width: 76px; padding: 10px 6px; }
  .time-colon { font-size: 36px; }
  .nav-half-btn { padding: 10px 24px; font-size: 14px; }
  .result-wrap { max-width: 480px; }
}

/* 13" 반 크기 / 태블릿 (≤768px) */
@media (max-width: 768px) {
  html { font-size: 12px; }
  .app-header { height: 46px; padding: 0 10px; }
  .brand-name { font-size: 12px !important; }
  .brand-version { font-size: 9px; }
  .tab-btn { padding: 4px 8px; font-size: 11px; }
  .header-right { gap: 4px; }
  .header-username { font-size: 11px; padding: 2px 4px; }
  .remaining-tokens, .today-count { font-size: 9px; }
  .btn-logout { padding: 4px 8px; font-size: 10px; }
  .btn-refresh-icon { font-size: 10px; }
  .step-indicator { padding: 6px 10px 4px; gap: 0; }
  .step { min-width: 50px; }
  .step-shape { width: 20px; height: 20px; }
  .step-label { font-size: 9px; }
  .step-line { max-width: 30px; }
  .sub-screen { padding: 10px 12px; gap: 10px; }
  .sub-header h2 { font-size: 16px; }
  .voice-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .voice-card { padding: 10px; }
  .voice-name { font-size: 12px; }

  .time-input { font-size: 28px; width: 66px; padding: 8px 4px; }
  .time-colon { font-size: 28px; margin-bottom: 14px; }
  .time-arrow { width: 66px; font-size: 10px; }
  .preset-btn { padding: 4px 12px; font-size: 11px; }
  .text-input-container { max-width: 100%; }
  #body-textarea { min-height: 120px; height: 180px; }
  .nav-half-btn { padding: 10px 20px; font-size: 13px; }
  .sub-nav-bar { gap: 12px; padding: 12px 0; }
  .result-wrap { max-width: 100%; padding: 12px 0; gap: 16px; }
  #sub-result .result-wrap { padding: 0; }
  .rs-audio-card { padding: 12px 14px; gap: 10px; }
  .rs-play-btn { width: 38px; height: 38px; }
  .setup-container { padding: 28px 16px; gap: 16px; }
  .setup-title { font-size: 22px; }
  .setup-logo { font-size: 12px; padding: 8px 16px; }
  .modal-box, .modal-box { width: 95vw; max-width: 95vw; }
  .generating-wrap { padding: 20px; gap: 14px; }
  .generating-wrap h2 { font-size: 18px; }
  .review-wrap { padding: 16px 10px; }
  .pronun-wrap { padding: 14px 10px; }
  .admin-toolbar { padding: 10px 14px; }
  .admin-voice-list { padding: 10px 14px; }
  .log-table-wrap { padding: 10px 14px; }

  /* ── 리뷰 화면 ── */
  .rv-screen { padding: 16px 14px 16px !important; gap: 14px !important; }
  .rv-card { padding: 16px; }
  .rv-card-title { font-size: 15px; }
  .rv-page-title { font-size: 22px; }
  .rv-page-sub { font-size: 13px; }
  .rv-header-bar { padding-bottom: 14px; }
  .rv-card-top { margin-bottom: 14px; }

  /* ── 푸터 예상시간 ── */
  .ti-footer-row { padding: 8px 14px; }
  .ti-footer-stats { gap: 8px; flex-wrap: wrap; }
  .ti-footer-counts { font-size: 11px; gap: 3px; flex-wrap: wrap; }
  .ti-footer-counts strong { font-size: 12px; }
  .ti-footer-time { font-size: 17px; white-space: nowrap; }
  .ti-footer-stat-row { white-space: nowrap; }
  .ti-footer-label-inline { font-size: 11px; }

  /* ── 텍스트 입력 pill 툴바 ── */
  .text-input-context-bar { padding: 0 12px 8px; gap: 6px; }
  .ti-pill-wrap { padding: 0 10px; height: 30px; font-size: 12px; gap: 4px; }
  .ti-pill-text { font-size: 12px; }

  /* ── 결과 화면 pills ── */
  .rs-pill { font-size: 12px; padding: 4px 10px; }
}

/* iPad (≤1024px portrait) */
@media (max-width: 1024px) and (min-width: 769px) {
  html { font-size: 13px; }
  .text-input-container { max-width: 580px; }
  .result-wrap { max-width: 500px; }
  .voice-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* iPhone Pro (≤430px) */
@media (max-width: 430px) {
  html { font-size: 11px; }
  .app-header { height: 42px; padding: 0 8px; }
  .brand-name { font-size: 11px !important; letter-spacing: 0.02em !important; }
  .tab-nav { gap: 2px; }
  .tab-btn { padding: 3px 6px; font-size: 10px; }
  .header-right { gap: 3px; }
  .remaining-tokens, .today-count { font-size: 8px; }
  .btn-logout { padding: 3px 6px; font-size: 9px; }
  .step-indicator { padding: 4px 6px 2px; }
  .step { min-width: 40px; }
  .step-shape { width: 18px; height: 18px; }
  .step-label { font-size: 8px; }
  .step-line { max-width: 20px; }
  .sub-screen { padding: 8px 10px; gap: 8px; }
  .sub-header h2 { font-size: 15px; }
  .sub-desc { font-size: 11px; }
  .voice-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .voice-card { padding: 8px; gap: 6px; }
  .voice-name { font-size: 11px; }

  .voice-category { font-size: 9px; }
  .time-input { font-size: 24px; width: 58px; padding: 6px 4px; }
  .time-colon { font-size: 24px; margin-bottom: 10px; }
  .time-arrow { width: 58px; }
  .time-presets { gap: 4px; flex-wrap: wrap; }
  .preset-btn { padding: 3px 10px; font-size: 10px; }
  #body-textarea { min-height: 100px; height: 150px; font-size: 13px; }
  #time-adjust-textarea { height: 60px; }
  .nav-half-btn { padding: 8px 16px; font-size: 12px; }
  .sub-nav-bar { gap: 8px; padding: 10px 0; }
  .result-wrap { gap: 12px; }
  .rs-audio-card { padding: 10px 12px; gap: 8px; }
  .rs-play-btn { width: 34px; height: 34px; }
  .script-text { font-size: 11px; padding: 8px 10px; }
  .setup-container { padding: 20px 12px; gap: 14px; }
  .setup-title { font-size: 20px; }
  .setup-logo { font-size: 11px; padding: 6px 14px; letter-spacing: 2px; }
  .setup-form { gap: 10px; }
  .form-input { padding: 8px 10px; font-size: 13px; }
  .btn-lg { padding: 10px 20px; font-size: 13px; }
  .generating-wrap { padding: 16px; gap: 12px; }
  .generating-wrap h2 { font-size: 16px; }
  .gen-meta { font-size: 11px; padding: 4px 10px; }

  /* ── 리뷰 화면 ── */
  .rv-screen { padding: 12px 12px 14px !important; gap: 12px !important; }
  .rv-card { padding: 12px; }
  .rv-card-title { font-size: 14px; }
  .rv-page-title { font-size: 20px; }
  .rv-card-accent-bar { width: 4px; height: 20px; }
  .rv-card-stats { gap: 10px; }
  .rv-stat-col-val { font-size: 13px; }
  .rv-remeas-btn { font-size: 12px; padding: 5px 10px; }

  /* ── 푸터 예상시간 ── */
  .ti-footer-row { padding: 8px 10px; }
  .ti-footer-counts { font-size: 10px; gap: 2px; }
  .ti-footer-counts strong { font-size: 11px; }
  .ti-sep { font-size: 10px; }
  .ti-footer-time { font-size: 15px; white-space: nowrap; }
  .ti-footer-label-inline { font-size: 10px; }

  /* ── 텍스트 입력 pill 툴바 ── */
  .text-input-context-bar { padding: 0 10px 6px; gap: 5px; }
  .ti-pill-wrap { padding: 0 8px; height: 28px; font-size: 11px; gap: 3px; }
  .ti-pill-text { font-size: 11px; }

  /* ── 결과 화면 pills ── */
  .rs-pill { font-size: 11px; padding: 4px 8px; }
  .rs-pills-row { gap: 6px; }
}

/* iPhone Mini (≤375px) */
@media (max-width: 375px) {
  html { font-size: 10px; }
  .app-header { height: 40px; }
  .brand-name { font-size: 10px !important; }
  .tab-btn { padding: 2px 5px; font-size: 9px; }
  .step { min-width: 36px; }
  .step-shape { width: 16px; height: 16px; }
  .step-label { font-size: 7px; }
  .step-line { max-width: 16px; }
  .voice-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 4px; }
  .voice-card { padding: 6px; }
  .voice-name { font-size: 10px; }

  .time-input { font-size: 20px; width: 50px; }
  .time-colon { font-size: 20px; }
  .nav-half-btn { padding: 7px 14px; font-size: 11px; }
  .sub-nav-bar { gap: 6px; }
  #body-textarea { min-height: 80px; height: 120px; font-size: 12px; }
  .setup-title { font-size: 18px; }
  .rs-title { font-size: 18px; }
  .generating-wrap h2 { font-size: 14px; }
}

/* 높이가 짧을 때 (≤600px) */
@media (max-height: 600px) {
  .app-header { height: 40px; }
  .step-indicator { padding: 4px 10px 2px; }
  .sub-screen { padding: 8px 12px; gap: 8px; }
  .generating-wrap { padding: 12px; gap: 10px; }
  .sub-nav-bar { padding: 8px 0; }
}

/* ════════════════════════════════════════════════════════════════
   v3.0 좌우 분할 레이아웃
════════════════════════════════════════════════════════════════ */
.main-split {
  display: flex; flex: 1; overflow: hidden; position: relative;
}
/* 뉴스 템플릿 패널 접기/펼치기 (데스크톱) — 접으면 #right-panel 숨기고 가운데가 넓어짐 */
.newslist-reopen {
  display: none; position: absolute; top: 14px; right: 0; z-index: 30;
  align-items: center; gap: 4px; padding: 8px 10px;
  background: var(--bg-card, #fff); border: 1.5px solid #c2cedb; border-right: none;
  border-radius: 10px 0 0 10px; box-shadow: -2px 2px 0 rgba(40,52,62,0.18);
  cursor: pointer; color: #28343e; font-weight: 800; font-size: 12px;
}
.newslist-reopen:hover { background: #eef3f9; }
.newslist-reopen-label { white-space: nowrap; }
@media (min-width: 769px) {
  .main-split.newslist-collapsed #right-panel { display: none; }
  .main-split.newslist-collapsed .newslist-reopen { display: inline-flex; }
}
@media (max-width: 768px) {
  #btn-collapse-newslist { display: none; }
  .newslist-reopen { display: none !important; }
}
.left-panel {
  flex: 8; display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--border);
}
.left-step {
  display: none; flex: 1; min-height: 0; flex-direction: column; overflow-y: auto;
}
.left-step.active { display: flex; }

.step-new-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; padding: 40px 20px;
}
.step-new-form {
  display: flex; gap: 24px; align-items: flex-end;
  width: 100%; max-width: 520px;
}
.step-new-form .form-group { flex: 1; }
.step-new-form .form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.step-new-form #input-broadcast-date {
  font-size: 22px !important; height: 64px; padding: 0 12px; width: 100%;
}
/* 오른쪽 패널: 뉴스 리스트 — 가로폭 축소(생성과정 영역에 가운데 공간 양보) */
.right-panel {
  flex: 3; min-width: 252px; max-width: 340px;
  display: flex; flex-direction: column;
  background: var(--bg-card); overflow: hidden;
}
.right-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.right-panel-header h3 {
  font-size: 16px; font-weight: 900; letter-spacing: 0.05em;
}
.news-list {
  display: flex; flex-direction: column;
  flex: 1; overflow-y: auto; padding: 8px;
}
.news-list-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; height: 100%;
  text-align: center; color: var(--text-muted); padding: 40px 16px;
  font-size: 13px;
}

/* 뉴스 카드 */
/* ── 뉴스 카드: 미니 레트로 창 스타일 ── */
.news-card {
  border: 1.5px solid #28343e;
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 10px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, box-shadow 0.12s;
  animation: card-slide-in 0.3s ease-out both;
  position: relative;
}
@keyframes card-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.news-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.news-card.active-editing { box-shadow: 0 0 0 2px #43627e, 0 4px 12px rgba(67,98,126,0.2); }

/* 카드 상단 미니 타이틀바 */
.nc-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: #c8d0d8;
  border-bottom: 1px solid #28343e;
  border-radius: 11px 11px 0 0;
  transition: background 0.2s;
}
.news-card.active-editing .nc-bar { background: #b8d0e8; }
.nc-author {
  flex: 1; font-size: 11px; font-weight: 700; color: #111827;
  letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 휴지통 삭제 버튼 (우상단) */
.nc-close-btn {
  position: absolute; top: 4px; right: 6px; z-index: 10;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  font-size: 13px; line-height: 1;
  color: #54606c; opacity: 0.9;
  transition: opacity 0.15s, color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nc-close-btn svg { width: 16px; height: 17px; }
.nc-close-btn:hover { opacity: 1; color: #dc2626; }

/* 카드 바디 */
.nc-body { background: #ffffff; padding: 12px 14px; border-radius: 0 0 10px 10px; }
.nc-title-text {
  font-size: 14px; font-weight: 800; color: #0f172a;
  margin-bottom: 10px; line-height: 1.3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
}
.nc-title-text .nc-title-str { flex: 1; }
/* 타이틀 행의 저장됨 */
.nc-title-text .news-card-saving { margin-top: 1px; }
.nc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nc-dur {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #374151; flex-shrink: 0; flex-wrap: wrap;
}
.nc-dur .material-symbols-outlined { font-size: 13px !important; }
.nc-voice {
  font-size: 11px; color: #4b5563; font-weight: 500;
  padding: 0 6px; border-left: 1px solid #cbd5e1; margin-left: 2px;
}
.nc-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; min-width: 64px; text-align: right;
}

/* 상태 배지 */
.nc-badge-pill {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 99px; white-space: nowrap;
}
.badge-draft     .nc-badge-pill { background: #f1f5f9; color: #475569; }
.badge-body-done .nc-badge-pill { background: #fef9c3; color: #854d0e; }
.badge-final     .nc-badge-pill { background: #dcfce7; color: #15803d; }
.badge-delivered .nc-badge-pill { background: #fef3c7; color: #d97706; }
.badge-completed .nc-badge-pill { background: #dcfce7; color: #15803d; }

/* 임시저장 표시 */
.news-card-saving {
  font-size: 11px; color: #9ca3af; font-weight: 700; display: none; text-align: right; min-width: 64px;
}
.news-card.is-saving .news-card-saving { display: block; }
.news-card.is-saved  .news-card-saving { display: block; color: #16a34a; }

/* 카드 바디는 항상 흰색 */
.nc-body { background: #ffffff !important; }

/* 테마별 카드 테두리 색상 */
.nc-final { border-color: #28343e; }
.nc-past   { border-color: #28343e; }
.nc-draft  { border-color: #28343e; }
.nc-completed { border-color: #86efac; }
.nc-completed .nc-bar { background: #dcfce7 !important; }
.nc-completed .nc-body { background: #f0fdf4 !important; }


/* 탭이 발음규칙/사용자일 때 main-split 숨기기 */
#main-split { display: flex; }

/* ── 메인 영역 ── */
.main-area {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

/* ── 체크 아이콘 (완료) ── */
.check-icon::before { display: none !important; }
.check-icon {
  background: rgba(5,150,105,0.1);
  border: 1px solid rgba(5,150,105,0.3);
  border-radius: var(--radius-sm);
  color: var(--success);
  animation: pop 0.4s ease;
}

.step-new-wrap .btn { transform: none !important; }
.step-new-wrap .btn::before { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   v3.6 — Material Design 3 / 에디토리얼 리디자인
════════════════════════════════════════════════════════════════ */

/* ── 폰트 + 색상 토큰 (variables merged into :root above) ── */
html, body { font-family: var(--font-body); }

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ── Top Nav (frosted glass) ── */
.top-nav {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 40px rgba(9, 0, 62, 0.06);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 24px; height: 64px; flex-shrink: 0; z-index: 10;
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-brand { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.nav-brand-name {
  font-size: 20px; font-weight: 900; color: #111827;
  letter-spacing: -0.04em; text-transform: uppercase; line-height: 1;
  font-family: var(--font-headline);
}
.nav-brand-ver { font-size: 10px; font-weight: 700; color: #94a3b8; cursor: pointer; text-decoration: underline dotted; }
.nav-brand-ver:hover { color: var(--md-primary); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link {
  font-size: 14px; font-weight: 500; color: #475569;
  text-decoration: none; transition: color 0.15s; cursor: pointer;
  font-family: var(--font-headline);
}
.nav-link:hover { color: #3d2db5; text-decoration: none; }
.nav-link.active { color: #09003e; font-weight: 700; border-bottom: 2px solid #09003e; padding-bottom: 2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-search-wrap { position: relative; display: flex; align-items: center; }
/* 중앙 고정 검색바 */
.nav-search-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center;
}
.nav-search-icon {
  position: absolute; left: 12px; color: #94a3b8; pointer-events: none; font-size: 18px;
}
.nav-search-input {
  padding: 8px 16px 8px 40px; background: #f1f5f9; border: none; border-radius: 99px;
  font-size: 13px; outline: none; color: #64748b; cursor: pointer;
  transition: all 0.2s; width: 240px; font-family: var(--font-body);
}
.nav-search-input:hover { background: #e2e8f0; }
.nav-search-input::placeholder { color: #94a3b8; }
.nav-icon-btn {
  width: 36px; height: 36px; border: none; border-radius: 99px;
  background: transparent; color: #64748b; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.nav-icon-btn:hover { background: #f1f5f9; }
.nav-icon-btn .material-symbols-outlined { font-size: 22px; }
.nav-editor-pill {
  background: #f1f5f9; border-radius: 99px;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 12px; cursor: pointer; transition: all 0.15s;
}
.nav-editor-pill:hover { background: #e2e8f0; }
.nav-editor-label { font-size: 12px; font-weight: 600; color: #374151; }
.nav-editor-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--md-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.nav-editor-avatar .material-symbols-outlined { font-size: 18px; }

/* ── 사이드바 v3.6 (라이트) ── */
.left-sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
}

.sidebar-makenews {
  padding: 14px 16px 12px; border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0; cursor: pointer; transition: background 0.12s;
}
.sidebar-makenews:hover { background: rgba(0,0,0,0.02); }
.sidebar-makenews-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 3px;
}
.sidebar-makenews-icon {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0;
  font-family: 'Playfair Display', Georgia, serif;
}
.sidebar-progress-label {
  font-size: 10px; color: #9ca3af; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em; padding-left: 28px;
}

/* step styles consolidated into final block below */

/* 사이드바 통계 */
.sidebar-stats {
  border-top: 1px solid #e5e7eb; padding: 8px 16px; flex-shrink: 0;
}
.sidebar-stat-row {
  display: flex; align-items: center;
  justify-content: space-between; padding: 3px 0;
}
.sidebar-stat-label { font-size: 10px; color: #9ca3af; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }
.sidebar-stat-value {
  display: flex; align-items: center; gap: 2px;
  font-size: 11px; color: #374151; font-weight: 600;
}

/* 사이드바 링크 섹션 */
.sidebar-links { border-top: 1px solid #e5e7eb; padding: 4px 0; flex-shrink: 0; }
.left-sidebar .tab-btn {
  padding: 8px 16px; color: #6b7280; font-size: 12px; font-weight: 500;
  border: none; background: transparent; border-radius: 0;
  display: flex; align-items: center; width: 100%; text-align: left;
}
.left-sidebar .tab-btn:hover { color: #111827; background: rgba(0,0,0,0.04); }
.left-sidebar .tab-btn.active { color: var(--accent); background: rgba(37,99,235,0.06); }
.left-sidebar .tab-btn.active::after { display: none; }

.sidebar-tool-btn {
  display: flex; align-items: center; width: 100%;
  padding: 8px 16px; border: none; background: transparent;
  color: #6b7280; font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: left; transition: all 0.12s; font-family: inherit;
}
.sidebar-tool-btn:hover { color: #111827; background: rgba(0,0,0,0.04); }

/* 사이드바 하단 v3.6 */
.sidebar-bottom {
  padding: 10px 14px; border-top: 1px solid #e5e7eb;
  display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.sidebar-user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-username { font-size: 12px; color: #374151; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.sidebar-ver { font-size: 10px; color: #9ca3af; cursor: pointer; text-decoration: underline dotted; }
.sidebar-ver:hover { color: var(--accent); }
.sidebar-icon-btn { width: 26px; height: 26px; border: none; background: transparent; color: #9ca3af; font-size: 15px; cursor: pointer; border-radius: 4px; transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.sidebar-icon-btn:hover { background: rgba(0,0,0,0.06); color: #374151; }
.sidebar-logout-btn {
  width: 100%; padding: 5px 10px; border: 1px solid #e5e7eb;
  border-radius: 6px; background: transparent; color: #6b7280;
  font-size: 11px; cursor: pointer; font-family: inherit;
  transition: all 0.15s; text-align: center;
}
.sidebar-logout-btn:hover { border-color: #dc2626; color: #dc2626; }
#btn-logout { border: 1px solid #e5e7eb; color: #6b7280; }
#btn-logout:hover { border-color: #dc2626; color: #dc2626; }
.sidebar-logo { color: var(--text-primary); }
.sidebar-section-label { color: #9ca3af; }

/* ── 스텝 배지 + 화면 타이틀 ── */
.step-badge-row {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; margin-bottom: 2px;
}
.step-badge {
  display: inline-flex; align-items: center; padding: 3px 12px;
  border-radius: 20px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.step-badge-label {
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.screen-main-title {
  font-size: 26px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 2px; flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}
.screen-main-subtitle {
  font-size: 13px; color: var(--text-secondary); flex-shrink: 0; margin-bottom: 8px;
}

/* ── Schedule Broadcast 카드 ── */
.step-new-wrap {
  padding: 36px 40px;
  align-items: flex-start;
  justify-content: flex-start;
}
.step-new-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-sm); margin-top: 4px;
}
.live-env-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.25);
  color: var(--success); font-size: 11px; font-weight: 600;
  width: fit-content;
}
.live-env-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}
.step-make-btn {
  padding: 12px 28px; border-radius: 24px; border: none;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.15s; font-family: inherit; width: 100%;
}
.step-make-btn:hover { background: var(--accent-dark); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.step-make-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Queue 패널 ── */
.right-panel-header { flex-wrap: wrap; gap: 8px; }
.queue-filter-row { display: flex; align-items: center; gap: 6px; }
.queue-filter-select {
  font-size: 11px; padding: 3px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-secondary);
  cursor: pointer; outline: none;
}
.news-list-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 40px 16px;
}
.queue-empty-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--bg-secondary); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
}
.queue-empty-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.queue-empty-sub { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.5; }

/* ── 서브스크린 상단 패딩 조정 ── */
.sub-screen { padding: 20px 28px 16px; }

/* ── 모바일 v3.6 ── */
@media (max-width: 1024px) {
  .step-new-wrap { padding: 24px 24px; }
  .screen-main-title { font-size: 22px; }
}
@media (max-width: 768px) {
  .step-new-wrap { padding: 20px 16px; }
  .step-new-card { padding: 18px; }
  .screen-main-title { font-size: 20px; }
  .header-brand-section { display: none; }
  .header-search { max-width: 160px; }
}

/* ════════════════════════════════════════════════════════════════
   v3.6 Login Screen
════════════════════════════════════════════════════════════════ */

#screen-login {
  align-items: center; justify-content: center;
  background: #f5f6f8;
  flex-direction: column;
}

/* 메인 */
.login-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}

/* ── 레트로 윈도우 ── */
.login-window {
  width: 90%; max-width: 340px;
  background: #e6eff9;
  border: 2px solid #28343e;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(40, 52, 62, 0.08);
  overflow: hidden;
}

/* 타이틀 바 */
.login-win-bar {
  background: #dfe9f5;
  border-bottom: 2px solid #28343e;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.login-win-dots { display: flex; align-items: center; gap: 7px; }
.login-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid #28343e;
}
.login-dot-red    { background: #e96b6b; }
.login-dot-yellow { background: #f5c842; }
.login-dot-green  { background: #5eb55e; }
.login-win-label {
  font-size: 12px; font-weight: 700; color: #28343e;
  opacity: 0.5; letter-spacing: 0.04em;
}

/* 콘텐츠 영역 */
.login-win-body {
  padding: 36px 32px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}

/* 아이덴티티 */
.login-identity { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-icon-wrap {
  width: 80px; height: 80px;
  background: #cfd5d9;
  border: 2px solid #28343e;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-3deg);
  overflow: hidden;
}
.login-hlai-logo { width: 100%; height: 100%; object-fit: cover; }
.login-title {
  font-family: var(--font-headline); font-size: 30px;
  font-weight: 900; color: #28343e;
  letter-spacing: -0.02em; margin: 0; text-align: center;
}

/* 폼 카드 */
.login-card {
  width: 100%; display: flex; flex-direction: column; gap: 20px;
}

/* 필드 */
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field-label {
  font-size: 13px; font-weight: 700; color: #28343e; padding: 0 2px;
}
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input {
  width: 100%; height: 52px;
  background: #ffffff;
  border: 2px solid #28343e;
  border-radius: 10px;
  padding: 0 48px 0 44px;
  font-size: 16px; font-weight: 700; color: #28343e;
  font-family: var(--font-body); outline: none;
  text-align: center;
  transition: box-shadow 0.15s;
}
.login-input:focus { box-shadow: 0 0 0 3px rgba(9, 0, 62, 0.15); }
.login-input::placeholder { color: #a0aab4; font-weight: 400; }
.login-input-icon {
  position: absolute; left: 13px;
  font-size: 18px !important; color: #54606c;
  pointer-events: none;
}
.login-show-pw {
  position: absolute; right: 12px;
  border: none; background: transparent;
  color: #54606c; font-size: 12px;
  cursor: pointer; padding: 4px;
  display: flex; align-items: center;
}

/* 로그인 버튼 — 레트로 오프셋 그림자 */
.login-btn-primary {
  width: 100%; height: 56px;
  background: #43627e;
  color: #fff;
  border: 2px solid #2a3e50;
  border-radius: 10px;
  font-size: 16px; font-weight: 800; letter-spacing: 0.04em;
  font-family: var(--font-headline); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 4px 4px 0px #2a3e50;
  transition: box-shadow 0.12s, transform 0.12s;
}
.login-btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #2a3e50;
}
.login-btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ════════════════════════════════════════════════════════════════
   v3.6 Material Design — App Body + Sidebar + Workspace + Queue
════════════════════════════════════════════════════════════════ */

/* App body layout */
.app-body {
  display: flex; flex: 1; overflow: hidden;
  background: #f8fafc;
}

/* ── Left Sidebar (Material Design) ── */
.left-sidebar {
  width: 256px; min-width: 256px; max-width: 256px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0;
}

.sidebar-make-header {
  padding: 24px 16px 12px;
  flex-shrink: 0;
}
.sidebar-make-title {
  font-family: var(--font-headline);
  font-size: 18px; font-weight: 800;
  color: #0f172a; line-height: 1.2;
  margin: 0 0 2px;
}
.sidebar-make-sub {
  font-size: 12px; color: #94a3b8;
  font-weight: 500; margin: 0;
}

/* ── Step Indicator — 카드형 (Image 177) ── */
.step-indicator { flex: 1; overflow-y: auto; }
.step {
  display: flex; align-items: center;
  gap: 10px; padding: 10px 12px;
  margin: 3px 8px; border-radius: 12px;
  cursor: default; transition: all 0.15s;
  border: 2px dashed rgba(40,52,62,0.2);
  background: rgba(40,52,62,0.03);
}
.step[data-step]::before { display: none !important; }

/* Icon circle */
.step-icon-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(40,52,62,0.06); border: 1.5px solid rgba(40,52,62,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.step-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sidebar-step-icon {
  font-size: 18px !important; color: #94a3b8;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.step-check { display: none; color: #fff; font-size: 15px; font-weight: 700; line-height: 1; }
.step-label {
  font-size: 14px; font-weight: 600; color: #94a3b8;
  font-family: var(--font-body);
}
.step-sub { display: none; font-size: 11px; color: rgba(40,52,62,0.6); font-weight: 500; margin-top: 1px; }
.step-star { display: none; font-size: 17px; color: #fbbf24; flex-shrink: 0; }

/* Done step */
.step.done {
  border: 2px dashed rgba(34,197,94,0.4);
  background: transparent;
}
.step.done .step-icon-circle { background: #22c55e; border-color: #22c55e; }
.step.done .sidebar-step-icon { display: none; }
.step.done .step-check { display: block; }
.step.done .step-label { color: #64748b; font-weight: 500; }

/* Active step */
.step.active {
  background: #b5d5f6 !important;
  border: 2px solid #28343e !important;
  box-shadow: 2px 2px 0 #28343e;
}
.step.active .step-icon-circle { background: #fff; border-color: rgba(255,255,255,0.6); }
.step.active .sidebar-step-icon { display: block; color: #28343e; }
.step.active .step-check { display: none; }
.step.active .step-label { color: #28343e; font-weight: 700; }
.step.active .step-sub { display: block; }
.step.active .step-star { display: block; }

.step.step-clickable { cursor: pointer; }
.step.step-clickable:not(.active):hover { background: rgba(40,52,62,0.07); }
#step-indicator.steps-locked .step:not(.step-clickable) { pointer-events: none !important; cursor: default !important; }
#step-indicator.steps-locked .step:not(.step-clickable):hover { background: rgba(40,52,62,0.03) !important; }

/* sidebar-step-new (뉴스 생성) */
#sidebar-step-new {
  border: 2px dashed rgba(40,52,62,0.2);
  background: rgba(40,52,62,0.03);
}
#sidebar-step-new .step-label { color: #94a3b8; font-weight: 500; }
#sidebar-step-new.retro-nav-active {
  background: #b5d5f6 !important;
  border: 2px solid #28343e !important;
  box-shadow: 2px 2px 0 #28343e;
}
#sidebar-step-new.retro-nav-active .step-icon-circle { background: #fff; border-color: rgba(255,255,255,0.6); }
#sidebar-step-new.retro-nav-active .sidebar-step-icon { color: #28343e; }
#sidebar-step-new.retro-nav-active .step-label { color: #28343e; font-weight: 700; }
/* not active → done style */
#sidebar-step-new:not(.retro-nav-active) .step-icon-circle { background: #22c55e; border-color: #22c55e; }
#sidebar-step-new:not(.retro-nav-active) .sidebar-step-icon { display: none; }
#sidebar-step-new:not(.retro-nav-active) .step-check { display: block; }
#sidebar-step-new:not(.retro-nav-active) { border-color: rgba(34,197,94,0.4); background: transparent; }
#sidebar-step-new:not(.retro-nav-active) .step-label { color: #64748b; font-weight: 500; }

/* ── Sidebar divider + token section ── */
.sidebar-divider-section { flex-shrink: 0; padding: 4px 0; }
.sidebar-hr {
  border: none; border-top: 1px solid #e2e8f0; margin: 4px 16px;
}
.sidebar-token-section { padding: 8px 16px; }
.sidebar-token-row {
  display: flex; align-items: center;
  justify-content: space-between; padding: 2px 0;
}
.sidebar-token-text { font-size: 11px; color: #64748b; font-weight: 500; }
.sidebar-refresh-btn {
  border: none; background: transparent; color: #94a3b8;
  cursor: pointer; padding: 2px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.12s;
}
.sidebar-refresh-btn:hover { color: var(--md-primary); }
.sidebar-refresh-btn .material-symbols-outlined { font-size: 16px !important; }

/* ── Sidebar bottom nav ── */
.sidebar-bottom-nav {
  flex-shrink: 0; padding: 4px 0;
}
.sidebar-bottom-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 16px;
  border: none; background: transparent;
  font-size: 12px; font-weight: 500; color: #64748b;
  cursor: pointer; text-align: left;
  font-family: var(--font-body);
  transition: all 0.12s;
}
.sidebar-bottom-item:hover { background: #f1f5f9; color: #0f172a; }
.sidebar-bottom-item .material-symbols-outlined { font-size: 18px !important; color: #94a3b8; }
.sidebar-bottom-item:hover .material-symbols-outlined { color: var(--md-primary); }

/* ── Sidebar user section ── */
.sidebar-user-section {
  flex-shrink: 0; padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar-username {
  font-size: 12px; color: #374151; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.sidebar-logout-btn {
  padding: 4px 10px; border: 1px solid #e2e8f0;
  border-radius: 6px; background: transparent;
  color: #6b7280; font-size: 11px; cursor: pointer;
  font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.sidebar-logout-btn:hover { border-color: #dc2626; color: #dc2626; }

/* ── Main workspace ── */
.main-workspace {
  flex: 1; display: flex; overflow: hidden;
}
.workspace-content {
  flex: 1; padding: 48px 60px;
  overflow-y: auto; background: #f8fafc;
}
.workspace-header { margin-bottom: 32px; }
.workspace-title {
  font-family: var(--font-headline);
  font-size: 48px; font-weight: 800;
  color: #0f172a; letter-spacing: -0.03em;
  line-height: 1.1; margin: 0 0 8px;
}
.workspace-subtitle {
  font-size: 15px; color: #64748b;
  font-family: var(--font-body); margin: 0;
}

/* ── 뉴스 생성 프리셋/커스텀 탭 UI ── */
.bc-new-workspace { display: flex; flex-direction: column; gap: 0; padding: 20px 20px 20px; }

.bc-section-label {
  font-size: 12px; font-weight: 600; color: #64748b;
  letter-spacing: 0.03em; margin-bottom: 8px; margin-top: 16px;
}
.bc-section-label:first-child { margin-top: 0; }

.bc-date-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 12px; padding: 12px 16px; cursor: pointer;
  transition: border-color 0.15s;
}
.bc-date-row:hover { border-color: #8070d0; }
.bc-date-icon { font-size: 20px !important; color: #09003e; }
.bc-date-text { font-size: 15px; font-weight: 500; color: #1e293b; }

.bc-tab-bar {
  display: flex; gap: 6px; margin-top: 20px; margin-bottom: 16px;
  background: #f1f5f9; border-radius: 10px; padding: 4px;
}
.bc-tab {
  flex: 1; padding: 8px 0; border: none; border-radius: 8px;
  background: transparent; font-size: 14px; font-weight: 500;
  color: #64748b; cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body);
}
.bc-tab.active {
  background: #fff; color: #1e293b; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.bc-panel { display: none; flex-direction: column; }
.bc-panel.active { display: flex; flex: 1; min-height: 0; }

.bc-preset-grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 150px;
  gap: 10px; margin-bottom: 0;
  overflow: visible; min-height: 0;
}
.bc-preset-card {
  position: relative; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 16px 14px 14px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bc-preset-card:hover { border-color: #8070d0; box-shadow: 0 2px 12px rgba(37,99,235,0.08); }
.bc-preset-card.selected {
  border-color: #09003e; box-shadow: 0 2px 14px rgba(37,99,235,0.15);
}
.bc-preset-check {
  position: absolute; top: 10px; right: 10px;
  font-size: 18px !important; color: #09003e;
  opacity: 0; transition: opacity 0.12s;
}
.bc-preset-card.selected .bc-preset-check { opacity: 1; }

.bc-preset-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.bc-preset-icon-wrap .material-symbols-outlined { font-size: 22px !important; }

.bc-preset-name {
  font-size: 14px; font-weight: 700; color: #1e293b;
  margin-bottom: 6px; line-height: 1.3;
}
.bc-preset-desc {
  font-size: 11px; color: #64748b; line-height: 1.5;
}

/* ── Broadcast card ── */
.broadcast-card {
  background: #ffffff; border-radius: 16px;
  padding: 32px; max-width: 640px;
  box-shadow: 0 4px 24px rgba(9, 0, 62, 0.06);
  border: 1px solid #e2e8f0;
}
.broadcast-card-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #16a34a; font-size: 12px; font-weight: 600;
  margin-bottom: 24px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}
.broadcast-fields {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin-bottom: 24px;
}
/* 날짜 인풋 브라우저 기본 아이콘 숨김 → 양쪽 박스 동일 너비 */
#input-broadcast-date::-webkit-calendar-picker-indicator { opacity: 0; width: 0; padding: 0; margin: 0; }
.broadcast-field { display: flex; flex-direction: column; gap: 6px; }
.broadcast-field-label {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-align: center;
}
.broadcast-field-input-wrap {
  display: flex; align-items: center; justify-content: center; position: relative;
  height: 56px; padding: 0 18px; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 10px;
  transition: border-color 0.15s; box-sizing: border-box;
}
.broadcast-field-input-wrap:focus-within {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 3px rgba(9, 0, 62, 0.08);
}
.broadcast-field-icon {
  font-size: 22px !important; color: #94a3b8; flex-shrink: 0;
  position: absolute; left: 18px; pointer-events: none;
}
.broadcast-field-display {
  font-size: 18px; font-weight: 500; color: #0f172a; user-select: none;
  text-align: center;
}

/* ── 커스텀 날짜/시간 팝업 ── */
.bc-picker-popup {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 200; padding: 20px 18px 14px;
  width: 300px;
}
.bc-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.bc-cal-nav {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: #64748b; line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.bc-cal-nav:hover { background: #f1f5f9; }
.bc-cal-title { font-size: 16px; font-weight: 700; color: #0f172a; }
.bc-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; margin-bottom: 6px;
}
.bc-cal-weekdays span { font-size: 12px; color: #94a3b8; font-weight: 600; padding: 4px 0; }
.bc-cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.bc-cal-day {
  width: 36px; height: 36px; margin: 1px auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; color: #0f172a; font-weight: 500;
  transition: background 0.1s;
}
.bc-cal-day:hover:not(.bc-other) { background: #eff6ff; }
.bc-cal-day.bc-sel { background: var(--md-primary); color: #fff; }
.bc-cal-day.bc-other { color: #cbd5e1; cursor: default; }
.bc-picker-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.bc-confirm-btn {
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--md-primary); padding: 6px 8px;
}
.bc-confirm-btn:hover { opacity: 0.7; }

/* 시간 picker — iPhone 드럼롤 */
.bc-time-picker { width: 200px; padding: 8px 8px 8px; overflow: hidden; }
.bc-time-cols {
  display: flex; align-items: center;
  position: relative; height: 220px; /* 5 items × 44px */
}
/* 가운데 선택 하이라이트 */
.bc-time-highlight {
  position: absolute; left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 44px; background: #eff6ff; border-radius: 10px;
  pointer-events: none; z-index: 0;
}
.bc-time-col {
  flex: 1; height: 220px; overflow-y: scroll;
  scroll-snap-type: y mandatory;
  position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.bc-time-col::-webkit-scrollbar { display: none; }
.bc-time-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: #334155;
  scroll-snap-align: center;
}
/* 위아래 88px 여백 (2×44px) — 첫/마지막 항목이 가운데 올 수 있게 */
.bc-time-spacer { height: 88px; flex-shrink: 0; }
.bc-time-sep { font-size: 22px; font-weight: 700; color: #0f172a; padding: 0 4px; flex-shrink: 0; z-index: 1; }
.broadcast-card-footer {
  display: flex; align-items: center;
  justify-content: space-between; padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.broadcast-footer-info {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #94a3b8;
}
.broadcast-info-icon { font-size: 16px !important; }
.broadcast-make-btn {
  padding: 10px 32px; border: none;
  background: var(--md-primary); color: #ffffff;
  border-radius: 99px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; cursor: pointer;
  font-family: var(--font-body); transition: all 0.15s;
}
.broadcast-make-btn:hover {
  background: var(--md-primary-dark);
  box-shadow: 0 4px 16px rgba(9, 0, 62, 0.3);
}

/* ── Queue Panel ── */
.right-panel {
  width: 320px; min-width: 280px; max-width: 360px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex; flex-direction: column;
  overflow: hidden; flex-shrink: 0;
}
.queue-panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.queue-panel-title {
  font-family: var(--font-headline);
  font-size: 20px; font-weight: 800;
  color: #0f172a; margin: 0;
}
.queue-filter-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px; border: 1px solid #e2e8f0;
  border-radius: 8px; background: #f8fafc;
  font-size: 12px; font-weight: 500; color: #64748b;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.12s;
}
.queue-filter-btn:hover { border-color: #cbd5e1; background: #f1f5f9; }
.queue-filter-btn .material-symbols-outlined { font-size: 16px !important; }
.news-list {
  flex: 1; overflow-y: auto;
  padding: 12px;
  background: #f8fafc;
}
.news-list-empty {
  display: flex; flex-direction: column;
  align-items: center; padding: 48px 20px;
  gap: 12px; text-align: center;
}
.queue-empty-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: #ffffff; border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.queue-empty-circle .material-symbols-outlined { font-size: 28px !important; color: #94a3b8; }
.queue-empty-title {
  font-family: var(--font-headline);
  font-size: 15px; font-weight: 700; color: #374151; margin: 0;
}
.queue-empty-desc {
  font-size: 12px; color: #94a3b8; line-height: 1.6; margin: 0;
}

/* ── left-step active (workspace) ── */
#step-new.left-step.active {
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════
   v3.6 Time Setting Redesign
════════════════════════════════════════════════════════════════ */
#sub-time-setting.sub-screen.active {
  display: flex; flex-direction: column;
}
#sub-time-setting .ts-card { flex-shrink: 0; }
#sub-time-setting .vs-nav-bar { margin-top: auto; }
.ts-subtitle {
  font-size: 13px; color: #64748b; text-align: left;
  line-height: 1.6; margin: 2px 0 20px; flex-shrink: 0;
}
.ts-card {
  background: #ffffff; border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  display: flex; flex-direction: column; gap: 28px;
  flex-shrink: 0;
}
.ts-inputs {
  display: flex !important; align-items: center; justify-content: center;
  gap: 20px !important;
}
.ts-field {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ts-arrow {
  border: none; background: transparent; cursor: pointer;
  color: var(--md-primary); padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s;
}
.ts-arrow:hover { color: var(--md-primary-dark); }
.ts-arrow .material-symbols-outlined { font-size: 28px !important; }
.ts-num {
  font-size: 72px !important; font-weight: 800 !important;
  width: 120px !important; text-align: center;
  border: none !important; background: transparent !important;
  color: #0f172a !important; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif !important;
  -moz-appearance: textfield; padding: 0 !important;
  line-height: 1;
}
.ts-num::-webkit-outer-spin-button,
.ts-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ts-colon {
  font-size: 56px !important; font-weight: 800; color: #cbd5e1;
  line-height: 1; margin-bottom: 28px; /* label 높이만큼 보정 */
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.ts-label {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  letter-spacing: 0.1em; text-transform: uppercase;
  position: static !important;
}
.ts-presets { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ts-presets-label {
  font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: 0.1em;
}
.ts-preset-row { display: flex; gap: 10px; }
.ts-preset {
  padding: 10px 20px; border: none; border-radius: 12px;
  background: #f1f5f9; color: #374151;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.15s;
}
.ts-preset:hover { background: #e2e8f0; }
.ts-preset.active, .ts-preset[data-active="true"] {
  background: var(--md-primary); color: #ffffff;
  box-shadow: 0 4px 12px rgba(9,0,62,0.25);
}
/* preset-btn active 호환 */
.preset-btn.active { background: var(--md-primary) !important; color: #fff !important; }

html.dark .ts-card { background: #1e293b; border-color: #334155; }
html.dark .ts-num { color: #f1f5f9 !important; }
html.dark .ts-preset { background: #334155; color: #e2e8f0; }
html.dark .ts-preset:hover { background: #475569; }

/* ════════════════════════════════════════════════════════════════
   v3.6 Voice Select Redesign
════════════════════════════════════════════════════════════════ */

/* 검색 */
/* ── 음성 선택 검색 (레트로) ── */
.vs-search-wrap {
  position: relative; display: flex; align-items: center;
  margin-bottom: 16px; flex-shrink: 0;
}
.vs-search-icon {
  position: absolute; left: 14px; color: #54606c;
  font-size: 20px !important; pointer-events: none;
}
.vs-search-input {
  width: 100%; height: 44px; padding: 0 16px 0 44px;
  background: #fff; border: 2px solid #28343e; border-radius: 10px;
  font-size: 14px; color: #1e2833; font-family: var(--font-body);
  outline: none; transition: box-shadow 0.15s;
}
.vs-search-input:focus { box-shadow: 0 0 0 3px rgba(40,52,62,0.12); }
.vs-search-input::placeholder { color: #94a3b8; }

/* 보이스 그리드 */
.voice-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important; flex: 1; overflow-y: auto;
  align-content: start;
}

/* 보이스 카드 (레트로) */
.voice-card {
  background: #fff !important;
  border: 2px solid #28343e !important;
  border-radius: 12px !important;
  padding: 16px !important;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; position: relative; transform: none !important;
  box-shadow: 3px 3px 0 #28343e;
  transition: box-shadow 0.12s, background 0.12s;
}
.voice-card:hover {
  background: #eef4fb !important;
  transform: none !important;
  box-shadow: 3px 3px 0 #28343e !important;
}
.voice-card.selected {
  background: #c8d8e8 !important;
  border-color: #28343e !important;
  box-shadow: 3px 3px 0 #28343e !important;
}

/* 카드 상단 아바타 (CSS ::before) */
.voice-card::before {
  content: '';
  display: block;
  width: 52px; height: 52px; border-radius: 50%;
  background-color: #c8d8e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z' fill='%2343627e'/%3E%3C/svg%3E");
  background-size: 28px; background-repeat: no-repeat; background-position: center;
  flex-shrink: 0; margin-bottom: 2px;
  border: 2px solid #28343e;
}
.voice-card.selected::before {
  background-color: #43627e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z' fill='white'/%3E%3C/svg%3E");
}

/* 선택 체크 배지 */
.voice-card.selected::after {
  content: '✓';
  position: absolute; top: 12px; left: 52px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #28343e; color: #fff; border: 2px solid #fff;
  font-size: 10px; font-weight: 800; line-height: 14px;
  text-align: center;
}

/* 텍스트 */
.voice-name { font-size: 15px; font-weight: 800; color: #1e2833 !important; }
.voice-category { font-size: 10px; color: #54606c !important; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.voice-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.voice-tag {
  padding: 2px 7px;
  font-size: 10px; font-weight: 700;
  background: #dde9f5 !important; color: #28343e !important;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid #28343e; border-radius: 4px !important;
}

/* 미리듣기 버튼 */
.voice-preview-btn {
  display: flex !important; align-items: center; gap: 7px;
  border: 1.5px solid #28343e !important; background: #fff !important;
  color: #1e2833 !important; font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 5px 12px !important; margin-top: auto;
  border-radius: 8px !important; transform: none !important;
  font-family: var(--font-body); white-space: nowrap;
  transition: background 0.12s;
}
.voice-preview-btn::before { display: none !important; }
.voice-preview-btn:hover { background: #eef4fb !important; transform: none !important; }
.voice-preview-btn.playing { background: inherit !important; border-color: inherit !important; color: inherit !important; }
.voice-card.selected .voice-preview-btn { background: #b5c8d8 !important; border-color: #7a9ab8 !important; color: #1e2833 !important; }
.voice-card.selected .voice-preview-btn:hover { background: #a8bece !important; }
.voice-selected-badge { display: none !important; }
.voice-token-info {
  font-size: 11px; font-weight: 600; color: #43627e;
  margin-top: 2px; padding: 2px 0;
}

/* 하단 네비게이션 (레트로) */
.vs-nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 4px; flex-shrink: 0;
  border-top: 2px solid #28343e; margin-top: 4px;
}
.vs-prev-btn {
  display: flex; align-items: center; gap: 6px;
  border: 2px solid #28343e; background: #fff; border-radius: 10px;
  font-size: 14px; font-weight: 700; color: #1e2833;
  cursor: pointer; font-family: var(--font-body); padding: 8px 16px;
  transition: background 0.12s;
}
.vs-prev-btn:hover { background: #eef4fb; }
.vs-prev-btn .material-symbols-outlined { font-size: 18px !important; }
.vs-dots { display: flex; gap: 6px; align-items: center; }
.vs-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c8d8e8; border: 1.5px solid #28343e;
  transition: background 0.15s;
}
.vs-dot.active { background: #28343e; }
.vs-next-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 22px; border: 2px solid #28343e; border-radius: 10px;
  background: #28343e; color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body); transition: opacity 0.12s;
  box-shadow: 3px 3px 0 rgba(40,52,62,0.3);
}
.vs-next-btn:hover { opacity: 0.88; }
.vs-next-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.vs-next-btn .material-symbols-outlined { font-size: 18px !important; }

/* ── Nav User Dropdown ── */
.nav-user-wrap { position: relative; }
.nav-user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: #ffffff;
  border: 2px solid #28343e;
  border-radius: 14px; min-width: 200px;
  box-shadow: 4px 4px 0 #28343e;
  z-index: 200; overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
}
.nav-user-dropdown.open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-dropdown-header {
  padding: 12px 16px;
  font-size: 15px; font-weight: 800; color: #1e2833;
  border-bottom: 2px solid #28343e;
  background: #fff;
}
.nav-dropdown-body {
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
  background: #f0f4f8;
}
.nav-dropdown-item2 {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 10px 10px; border: none;
  background: transparent; border-radius: 10px;
  font-size: 16px; font-weight: 600; color: #1e2833;
  cursor: pointer; font-family: var(--font-body);
  text-align: left; transition: background 0.12s;
}
.nav-dropdown-item2:hover { background: #e2eaf4; }
.nav-dropdown-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nav-dropdown-label { font-size: 16px; font-weight: 600; }
.nav-dropdown-footer {
  padding: 8px 0; text-align: center;
  background: #e2eaf4; border-top: 2px solid #28343e;
  font-size: 11px; color: #64748b;
}

/* ── Settings Modal ── */
.settings-modal-box { max-width: 420px; }
.settings-section-block { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.settings-section-block:last-child { margin-bottom: 0; }
.settings-section-label {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.settings-theme-row { display: flex; gap: 8px; }
.settings-theme-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; color: #64748b;
  font-size: 13px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  transition: all 0.15s;
}
.settings-theme-btn .material-symbols-outlined { font-size: 18px !important; }
.settings-theme-btn:hover { border-color: #cbd5e1; background: #f1f5f9; }
.settings-theme-btn.active {
  background: var(--md-primary); color: #ffffff;
  border-color: var(--md-primary);
  box-shadow: 0 2px 8px rgba(9,0,62,0.25);
}
.settings-theme-btn.active .material-symbols-outlined { color: #ffffff; }

/* ── Dark Mode ── */
html.dark {
  color-scheme: dark;
}
html.dark body { background: #0f172a; }
html.dark .top-nav {
  background: rgba(15,23,42,0.8);
  border-bottom-color: rgba(255,255,255,0.07);
}
html.dark .nav-brand-name { color: #f1f5f9; }
html.dark .nav-link { color: #94a3b8; }
html.dark .nav-link.active { color: #5040c0; border-bottom-color: #5040c0; }
html.dark .nav-search-input { background: #1e293b; color: #e2e8f0; }
html.dark .nav-search-input::placeholder { color: #64748b; }
html.dark .nav-icon-btn { color: #94a3b8; }
html.dark .nav-icon-btn:hover { background: #1e293b; }
html.dark .nav-editor-pill { background: #1e293b; }
html.dark .nav-editor-label { color: #e2e8f0; }
html.dark .nav-user-dropdown { background: #1e293b; border-color: #334155; }
html.dark .nav-dropdown-item { color: #e2e8f0; }
html.dark .nav-dropdown-item:hover { background: #334155; }
html.dark .nav-dropdown-sep { background: #334155; }
html.dark .app-body { background: #0f172a; }
html.dark .left-sidebar { background: #1e293b; border-right-color: #334155; }
html.dark .sidebar-make-title { color: #f1f5f9; }
html.dark .sidebar-make-sub { color: #64748b; }
html.dark .sidebar-hr { border-color: #334155; }
html.dark .sidebar-token-text { color: #94a3b8; }
html.dark .step .step-label { color: #64748b; }
html.dark .step:not(.active):not(.done):hover { background: #334155; }
html.dark .sidebar-step-icon { color: #64748b; }
html.dark .sidebar-bottom-nav { border-top-color: #334155; }
html.dark .sidebar-bottom-item { color: #64748b; }
html.dark .sidebar-bottom-item:hover { background: #334155; color: #e2e8f0; }
html.dark .workspace-content { background: #0f172a; }
html.dark .workspace-title { color: #f1f5f9; }
html.dark .workspace-subtitle { color: #64748b; }
html.dark .broadcast-card {
  background: #1e293b; border-color: #334155;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
html.dark .broadcast-field-label { color: #64748b; }
html.dark .broadcast-field-input-wrap { background: #0f172a; border-color: #334155; }
html.dark .broadcast-field-input { color: #f1f5f9; }
html.dark .broadcast-field-input::-webkit-calendar-picker-indicator { filter: invert(1); }
html.dark .broadcast-time-num { color: #f1f5f9; }
html.dark .broadcast-time-sep-inner { color: #94a3b8; }
html.dark .broadcast-card-footer { border-top-color: #334155; }
html.dark .broadcast-footer-info { color: #64748b; }
html.dark .broadcast-card-live-badge {
  background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2);
}
html.dark .right-panel { background: #1e293b; border-left-color: #334155; }
html.dark .queue-panel-header { border-bottom-color: #334155; }
html.dark .queue-panel-title { color: #f1f5f9; }
html.dark .queue-filter-btn { background: #0f172a; border-color: #334155; color: #94a3b8; }
html.dark .queue-filter-btn:hover { background: #334155; }
html.dark .queue-empty-circle { background: #1e293b; border-color: #334155; }
html.dark .queue-empty-title { color: #f1f5f9; }
html.dark .queue-empty-desc { color: #64748b; }
/* Dark: login screen */
html.dark #screen-login {
  background: radial-gradient(circle at 50% 0%, #1e3a5f 0%, #0f172a 40%);
}
html.dark .login-identity .login-title { color: #f1f5f9; }
html.dark .login-card { background: #1e293b; border-color: rgba(255,255,255,0.06); }
html.dark .login-field-label { color: #94a3b8; }
html.dark .login-input { background: #0f172a; color: #f1f5f9; }
html.dark .login-input:focus { background: #1e293b; box-shadow: 0 0 0 2px rgba(96,165,250,0.2); }
/* Dark: settings modal */
html.dark .modal-box { background: #1e293b; border-color: #334155; }
html.dark .modal-header { border-bottom-color: #334155; color: #f1f5f9; }
html.dark .settings-theme-btn { background: #0f172a; border-color: #334155; color: #94a3b8; }
html.dark .settings-theme-btn:hover { background: #334155; }
html.dark .form-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
html.dark .form-label { color: #94a3b8; }

/* ── Time Picker ── */
.tp-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.tp-card {
  background: #fff; border-radius: 20px;
  width: 280px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.tp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
}
.tp-title { font-size: 14px; font-weight: 700; color: #0f172a; }
.tp-btn-cancel {
  border: none; background: transparent;
  font-size: 13px; color: #94a3b8; cursor: pointer; font-family: inherit;
}
.tp-btn-confirm {
  border: none; background: transparent;
  font-size: 13px; font-weight: 700; color: var(--md-primary);
  cursor: pointer; font-family: inherit;
}
.tp-body {
  display: flex; align-items: center; justify-content: center;
  height: 200px; position: relative; padding: 0 24px; gap: 0;
}
.tp-wheel-wrap { flex: 1; height: 200px; overflow: hidden; position: relative; }
.tp-wheel {
  height: 200px; overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tp-wheel::-webkit-scrollbar { display: none; }
.tp-item {
  height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: #cbd5e1;
  scroll-snap-align: center; transition: color 0.1s;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}
.tp-item.selected { color: #0f172a; }
.tp-colon {
  font-size: 24px; font-weight: 700; color: #0f172a;
  padding: 0 4px; flex-shrink: 0; margin-top: -4px;
}
.tp-highlight {
  position: absolute; left: 24px; right: 24px;
  top: 50%; transform: translateY(-50%);
  height: 40px; background: rgba(9,0,62,0.07);
  border-radius: 10px; pointer-events: none;
}
html.dark .tp-card { background: #1e293b; }
html.dark .tp-title { color: #f1f5f9; }
html.dark .tp-item.selected { color: #f1f5f9; }
html.dark .tp-header { border-bottom-color: #334155; }

/* ── Date Picker ── */
.dp-card { width: 300px; }
.dp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
}
.dp-month-label { font-size: 15px; font-weight: 700; color: #0f172a; }
.dp-nav-btn {
  border: none; background: transparent; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; transition: background 0.1s;
}
.dp-nav-btn:hover { background: #f1f5f9; }
.dp-nav-btn .material-symbols-outlined { font-size: 20px !important; }
.dp-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 8px 12px 4px; gap: 0;
}
.dp-weekdays span {
  text-align: center; font-size: 11px; font-weight: 700;
  color: #94a3b8; padding: 4px 0;
}
.dp-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0 12px 8px; gap: 2px;
}
.dp-day {
  aspect-ratio: 1; border: none; background: transparent;
  border-radius: 50%; font-size: 13px; font-weight: 500;
  color: #374151; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.dp-day:hover { background: #f1f5f9; }
.dp-day.dp-today { color: var(--md-primary); font-weight: 700; }
.dp-day.dp-selected { background: var(--md-primary); color: #fff; font-weight: 700; }
.dp-day.dp-selected:hover { background: var(--md-primary-dark); }
.dp-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 14px; border-top: 1px solid #f1f5f9;
}
html.dark .dp-month-label { color: #f1f5f9; }
html.dark .dp-nav-btn { color: #94a3b8; }
html.dark .dp-nav-btn:hover { background: #334155; }
html.dark .dp-day { color: #cbd5e1; }
html.dark .dp-day:hover { background: #334155; }
html.dark .dp-footer { border-top-color: #334155; }
html.dark .dp-header { border-bottom-color: #334155; }

/* ── Responsive v3.6 ── */
@media (max-width: 1280px) {
  .workspace-content { padding: 40px 40px; }
  .workspace-title { font-size: 40px; }
  .right-panel { width: 280px; min-width: 240px; }
}
@media (max-width: 1024px) {
  .left-sidebar { display: none !important; }
  .workspace-content { padding: 32px 28px; }
  .workspace-title { font-size: 32px; }
  .broadcast-fields { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .workspace-content { padding: 24px 16px; }
  .workspace-title { font-size: 28px; }
  .broadcast-card { padding: 20px; }
}

/* ── 모바일/태블릿 공통 ── */
.mobile-panel-tabs { display: none; }
.panels-slider { display: contents; }
.nav-hlai-logo { display: none; }
.nav-mob-only { display: none !important; }
.nav-desk-only { display: inline-flex !important; }
.mob-news-backdrop { display: none; }

/* 점세개 메뉴 드롭다운 */
.nav-more-wrap { position: relative; }
.nav-more-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 2px solid #28343e; border-radius: 10px;
  box-shadow: 4px 4px 0 #28343e; min-width: 160px; z-index: 9000;
  overflow: hidden;
}
.nav-more-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: none; border: none; border-bottom: 1px solid #e2e8f0;
  font-size: 14px; font-weight: 600; color: #28343e;
  cursor: pointer; font-family: inherit; text-align: left;
}
.nav-more-item:last-child { border-bottom: none; }
.nav-more-item:hover { background: #dfe9f5; }
.nav-more-item .material-symbols-outlined { font-size: 20px; color: #43627e; }
.nav-more-danger { color: #dc2626 !important; }
.nav-more-danger .material-symbols-outlined { color: #dc2626 !important; }

/* ════ 태블릿 ≤1024px ════ */
@media (max-width: 1024px) {
  .nav-search-center { display: none; }
  .nav-mob-only { display: inline-flex !important; }
  .nav-desk-only { display: none !important; }
  .nav-editor-label { display: none; }

  /* 좌측 사이드바 숨김 */
  .left-sidebar { display: none !important; }

  /* 메인 영역 전체 너비 */
  #main-split { position: relative; overflow: hidden; }
  .panels-slider { display: flex; width: 100%; height: 100%; }
  #left-panel { flex: 1; min-width: 0; overflow-y: auto; border-right: none; }

  /* 우측 패널: 슬라이드-인 드로어 */
  #right-panel {
    position: absolute !important;
    top: 0; right: 0; bottom: 0;
    width: 100%; min-width: 0;
    z-index: 500;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: none;
    display: flex !important;
    flex-direction: column;
    background: var(--bg-card, #fff) !important;
  }
  #main-split.mob-drawer-open #right-panel { transform: translateX(0); }

  /* 드로어 배경 오버레이 — 비활성 (전체화면 드로어) */
  .mob-news-backdrop { display: none !important; }

  /* retro-window 여백 축소 */
  .retro-window { margin: 10px !important; }
  .rs-retro-window { margin: 10px !important; }
}

/* ════ 모바일 ≤768px ════ */
@media (max-width: 768px) {
  html { font-size: 13px; }

  /* 헤더 컴팩트화 */
  .top-nav { height: 46px !important; padding: 0 10px !important; }
  .nav-brand-name { font-size: 16px !important; }
  .nav-icon-btn { width: 36px !important; height: 36px !important; }
  .nav-icon-btn .material-symbols-outlined { font-size: 22px !important; }
  .nav-editor-avatar { width: 30px !important; height: 30px !important; }
  .nav-actions { gap: 2px !important; }

  /* 우측 드로어 폭 조정 */
  #right-panel { width: 85vw; max-width: 340px; }

  /* retro-window */
  .retro-window { margin: 6px !important; border-radius: 10px; box-shadow: 2px 2px 0 #28343e; }
  .rs-retro-window { margin: 6px !important; }
  .retro-win-bar { padding: 5px 8px; }
  .retro-dot { width: 9px; height: 9px; }
  .retro-win-title { font-size: 11px; }
  .retro-win-body { padding: 10px 12px !important; }

  /* 프리셋 카드 그리드 */
  .bc-new-workspace { padding: 10px 10px 10px !important; }
  .bc-new-workspace .retro-controls-row { gap: 8px; flex-wrap: wrap; }
  .bc-new-workspace .bc-tab-bar { min-width: auto; }
  .bc-new-workspace .bc-tab { padding: 6px 14px; font-size: 12px; }
  .bc-new-workspace .bc-preset-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bc-new-workspace .bc-preset-card { padding: 12px 8px; }
  .bc-new-workspace .bc-preset-icon-wrap { width: 44px; height: 44px; }
  .bc-new-workspace .bc-preset-name { font-size: 12px; }
  .bc-new-workspace .bc-preset-desc { font-size: 10px; }
  .bc-new-workspace .bc-date-row { font-size: 13px; }

  /* 커스텀 시간 그리드 */
  .retro-custom-split { flex-direction: column; gap: 10px; }
  .retro-custom-time-compact { width: 100%; }
  .retro-time-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .retro-time-btn { padding: 8px 4px; font-size: 12px; box-shadow: 2px 2px 0 #28343e; }

  /* 텍스트 입력 영역 */
  .workspace-content { padding: 10px 8px !important; }

  /* 보이스 선택 그리드 */
  .voice-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .voice-card { padding: 10px !important; }
  .vs-search-wrap { margin: 0 0 6px; }

  /* 시간 설정 */
  .time-input { font-size: 24px !important; width: 60px !important; }
  .time-colon { font-size: 24px !important; }

  /* MAKE 버튼 */
  .retro-make-footer { padding: 8px 10px !important; gap: 8px; }
  .retro-make-btn, .retro-make-btn-back { font-size: 13px !important; padding: 10px 12px; height: 44px !important; }

  /* 텍스트 입력 textarea */
  #body-textarea { min-height: 120px; font-size: 14px; }
  .text-input-container { max-width: 100% !important; }

  /* 생성 중 화면 */
  .generating-wrap { padding: 16px !important; }

  /* 리뷰 화면 */
  .rv-screen { padding: 12px 8px !important; }
  .rv-card { padding: 10px; }

  /* 결과 화면 */
  .rs-retro-window .retro-win-body { padding: 8px; }
  .rs-result-btn { font-size: 12px !important; padding: 8px 10px; height: 40px !important; }
  .result-wrap { max-width: 100% !important; }

  /* 수정 패널 */
  .rs-edit-panel { left: 6px !important; right: 6px !important; }
  .rs-edit-footer-bar { flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
  .rs-edit-btn { font-size: 11px; padding: 5px 8px; }

  /* 오디오 플레이어 */
  .rs-audio-bar { padding: 6px 8px; }

  /* 모달 */
  .modal-box { width: 95vw !important; max-width: 95vw !important; }
  .deliver-modal-box { width: 90vw; }
  .del-modal-box { width: 90vw; }
  .pronun-modal-box { width: 95vw; max-width: 95vw; }

  /* 코파일럿 */
  .copilot-panel { width: 90vw !important; max-width: 340px; }
  .copilot-fab { width: 48px; height: 48px; bottom: 16px; right: 16px; }
}

/* ════ 소형 모바일 ≤430px ════ */
@media (max-width: 430px) {
  html { font-size: 12px; }
  .top-nav { height: 40px !important; padding: 0 6px !important; }
  .nav-brand-name { font-size: 14px !important; }
  .nav-icon-btn { width: 28px !important; height: 28px !important; }
  .nav-icon-btn .material-symbols-outlined { font-size: 17px !important; }
  .nav-editor-avatar { width: 26px !important; height: 26px !important; }
  .nav-actions { gap: 1px !important; }

  .retro-window { margin: 4px !important; }
  .rs-retro-window { margin: 4px !important; }
  .retro-win-bar { padding: 4px 6px; }
  .retro-win-body { padding: 8px !important; }
  .retro-dot { width: 8px; height: 8px; }
  .retro-win-title { font-size: 10px; }

  .bc-new-workspace .bc-preset-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .bc-new-workspace .bc-preset-card { padding: 10px 6px; }
  .bc-new-workspace .bc-preset-icon-wrap { width: 36px; height: 36px; }
  .bc-new-workspace .bc-preset-name { font-size: 11px; }
  .bc-new-workspace .bc-tab { padding: 5px 10px; font-size: 11px; }
  .retro-time-grid { grid-template-columns: repeat(3, 1fr); }

  .retro-make-footer { padding: 6px 8px !important; }
  .retro-make-btn, .retro-make-btn-back { height: 40px !important; font-size: 12px !important; }

  .voice-grid { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .voice-card { padding: 8px !important; }

  #body-textarea { min-height: 100px; font-size: 13px !important; }
  .ti-footer-row { padding: 4px 6px; }
  .ti-footer-time { font-size: 14px; }
  .ti-footer-counts { font-size: 10px; }

  .rv-screen { padding: 8px 6px !important; }
  .rs-result-btn { font-size: 11px !important; height: 36px !important; }
  .rs-edit-btn { font-size: 10px; padding: 4px 6px; }
  .rs-edit-panel { left: 4px !important; right: 4px !important; }

  .copilot-fab { width: 42px; height: 42px; bottom: 12px; right: 12px; }
}

/* ════ PWA safe area (노치/홈바) ════ */
@supports (padding: env(safe-area-inset-top)) {
  .top-nav { padding-top: env(safe-area-inset-top) !important; }
  .app-body { padding-bottom: env(safe-area-inset-bottom); }
  @media (max-width: 1024px) {
    #right-panel { padding-bottom: env(safe-area-inset-bottom); }
  }
}

/* ════════════════════════════════════════════════════════════════
   RETRO DESIGN SYSTEM v4.0
════════════════════════════════════════════════════════════════ */

/* ── Top Nav 오버라이드 ── */
.top-nav {
  background: #dfe9f5 !important;
  backdrop-filter: none !important;
  border-bottom: 2px solid #28343e !important;
  box-shadow: none !important;
  height: 52px !important;
  padding: 0 20px !important;
}
.nav-brand-name {
  font-family: 'Space Grotesk', var(--font-headline) !important;
  font-size: 22px !important; font-weight: 900 !important;
  color: #28343e !important; letter-spacing: -0.02em !important;
  cursor: pointer;
}
.nav-search-center { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-search-input {
  background: #fff !important;
  border: 2px solid #28343e !important;
  border-radius: 8px !important;
  width: 320px !important;
  color: #28343e !important;
  cursor: text !important;
  padding-right: 38px !important;
}
.nav-search-input:hover { background: #fff !important; }
.nav-search-enter-btn {
  position: absolute; right: 8px;
  width: 20px; height: 20px; border-radius: 4px;
  border: none; background: transparent;
  color: #94a3b8; cursor: pointer; opacity: 0.6;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s;
  padding: 0;
}
.nav-search-enter-btn:hover { opacity: 1; }
.nav-search-enter-btn .material-symbols-outlined { font-size: 16px !important; }
.nav-icon-btn {
  width: 40px !important; height: 40px !important;
  border-radius: 8px !important; color: #43627e !important;
}
.nav-icon-btn:hover { background: #cfdbe9 !important; }
.nav-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #a83836; border: 2px solid #dfe9f5;
}
.nav-editor-pill {
  background: transparent !important; padding: 0 !important;
}
.nav-editor-pill:hover { background: transparent !important; }
.nav-editor-avatar {
  width: 36px !important; height: 36px !important;
  border: 2px solid #28343e !important;
  border-radius: 8px !important;
  background: #d7e4f1 !important; color: #43627e !important;
}

/* ── Sidebar 오버라이드 ── */
.left-sidebar {
  background: #e6eff9;
  border-right: 2px solid #28343e;
  display: flex; flex-direction: column;
  width: 220px; min-width: 220px;
  padding: 12px 10px;
  gap: 0;
}
.retro-sidebar-nav {
  display: flex; flex-direction: column; gap: 0; margin-top: 4px; padding: 4px 0;
}
.retro-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  cursor: pointer; transition: all 0.15s;
}
.retro-nav-item:hover { opacity: 0.85; }
.retro-nav-active {
  background: #b5d5f6 !important;
  border: 2px solid #28343e !important;
  box-shadow: 2px 2px 0 #28343e;
  font-weight: 700 !important;
}
#sidebar-step-new { margin: 3px 8px; }
.retro-nav-item .material-symbols-outlined { font-size: 18px; }
.retro-sidebar-stats {
  margin-top: 0; padding: 12px 14px;
  background: #dfe9f5; border: 2px solid #28343e; border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.retro-sidebar-stats .sidebar-token-text { font-size: 12px; font-weight: 700; color: #28343e; }
.retro-sidebar-stats .sidebar-refresh-btn { color: #54606c; }
.retro-sidebar-clock { font-size: 11px; font-weight: 600; color: #54606c; margin-top: 4px; }

/* ── App 배경 ── */
.app-body { background: #f5f6f8 !important; }
.main-area { background: #f5f6f8 !important; }

/* ── Retro Window ── */
.retro-window {
  background: #e6eff9;
  border: 2px solid #28343e;
  border-radius: 14px;
  overflow: visible;
  display: flex; flex-direction: column;
  flex: 1; margin: 16px;
  min-height: 0;
  box-shadow: 4px 4px 0 #28343e;
}
.retro-win-bar {
  background: #dfe9f5;
  border-bottom: 2px solid #28343e;
  padding: 8px 14px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}
.retro-win-dots { display: flex; align-items: center; gap: 6px; }
.retro-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid #28343e;
}
.retro-dot-red    { background: #ff5f57; }
.retro-dot-yellow { background: #febc2e; }
.retro-dot-green  { background: #28c840; }
.retro-win-title {
  font-size: 11px; font-weight: 800; color: #28343e;
  opacity: 0.5; letter-spacing: 0.08em; text-transform: uppercase;
}
.retro-win-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.retro-controls-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* bc-tab-bar 오버라이드 */
.bc-new-workspace .bc-tab-bar {
  background: #dfe9f5; border: 2px solid #28343e; border-radius: 10px;
  padding: 4px; display: flex; gap: 4px;
}
.bc-new-workspace .bc-tab {
  padding: 6px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
  background: transparent; color: #54606c; transition: all 0.15s;
}
.bc-new-workspace .bc-tab.active {
  background: #43627e; color: #fff;
}
/* bc-date-row 오버라이드 */
.bc-new-workspace .bc-date-row {
  background: #fff; border: 2px solid #28343e; border-radius: 8px;
  padding: 6px 14px; display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; font-weight: 700; color: #28343e;
  position: relative;
}
/* 달력 팝업: 날짜 버튼 오른쪽 끝에 맞춰 정렬 (팝업 우측끝 = 버튼 우측끝) */
.bc-date-row .bc-picker-popup {
  right: 0 !important;
  left: auto !important;
}

/* 프리셋 카드 오버라이드 */
.bc-new-workspace .bc-preset-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bc-new-workspace .bc-preset-card {
  background: #edf4fe;
  border: 2px solid #28343e;
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.15s;
  box-shadow: none;
}
.bc-new-workspace .bc-preset-card:hover { transform: none; background: #dfe9f5; box-shadow: none; }
.bc-new-workspace .bc-preset-card.selected {
  border: 3px solid #28343e !important;
  background: #dfe9f5;
  box-shadow: 3px 3px 0 #28343e !important;
}
.retro-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 6px;
}
.bc-new-workspace .bc-preset-icon-wrap {
  width: 48px; height: 48px; border-radius: 10px;
  border: 2px solid #28343e;
  display: flex; align-items: center; justify-content: center;
}
.bc-preset-arrow { color: #a7b3c0; font-size: 18px !important; }
.bc-new-workspace .bc-preset-name { font-size: 15px; font-weight: 800; color: #28343e; margin-bottom: 4px; }
.bc-new-workspace .bc-preset-desc { font-size: 11px; color: #54606c; line-height: 1.5; }
.bc-new-workspace .bc-preset-check { display: none !important; }

/* MAKE 푸터 */
.retro-make-footer {
  padding: 16px 20px;
  border-top: 2px solid #28343e;
  background: rgba(223,233,245,0.4);
  display: flex; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
  border-radius: 0 0 12px 12px;
}
.retro-make-btn {
  flex: 1; max-width: 48%; height: 56px;
  background: #43627e; color: #fff;
  border: 2px solid #28343e; border-radius: 12px;
  font-size: 18px; font-weight: 900; letter-spacing: 0.06em;
  font-family: var(--font-headline); cursor: pointer;
  box-shadow: 4px 4px 0 #28343e;
  transition: transform 0.12s, box-shadow 0.12s;
}
.retro-make-btn:hover:not(:disabled) {
  transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #28343e;
}
.retro-make-btn:active:not(:disabled) {
  transform: translate(2px, 2px); box-shadow: none;
}
.retro-make-btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* step-new의 단독 MAKE 버튼은 중앙 정렬 유지 */
#step-new .retro-make-footer { justify-content: center; }
#step-new .retro-make-btn { flex: none; width: 100%; max-width: 380px; }
.retro-make-btn-back {
  flex: 1; max-width: 48%; height: 56px;
  background: #fff; color: #28343e;
  border: 2px solid #28343e; border-radius: 12px;
  font-size: 18px; font-weight: 900; letter-spacing: 0.06em;
  font-family: var(--font-headline); cursor: pointer;
  box-shadow: 4px 4px 0 #28343e;
  transition: transform 0.12s, box-shadow 0.12s;
}
.retro-make-btn-back:hover {
  transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #28343e;
}
.retro-make-btn-back:active {
  transform: translate(2px, 2px); box-shadow: none;
}

/* step-new 레이아웃 */
#step-new { background: #f5f6f8 !important; overflow: hidden; }
.bc-new-workspace { margin: 0 !important; padding: 0 !important; background: transparent !important; flex: 1; }

/* ── 여백 확대 ── */
.retro-win-body { padding: 14px 18px !important; gap: 10px !important; }
.retro-controls-row { margin-bottom: 0; flex-shrink: 0; }
.bc-new-workspace .bc-preset-grid { gap: 10px !important; }
.bc-new-workspace .bc-preset-card { padding: 20px 18px !important; display: flex; flex-direction: column; justify-content: space-between; }
.bc-new-workspace .bc-preset-icon-wrap { width: 60px !important; height: 60px !important; border-radius: 14px !important; margin-bottom: 14px !important; }
.bc-new-workspace .bc-preset-name { font-size: 20px !important; margin-bottom: 0 !important; }
.bc-new-workspace .bc-preset-desc { font-size: 11px !important; }
.retro-make-footer { padding: 20px 24px !important; }
.retro-window { margin: 20px !important; }

/* ── Voice Select Retro Window ── */
.vs-retro-window { margin: 20px !important; }
.vs-retro-body {
  flex: 1; min-height: 0; overflow: hidden;
  padding: 14px 18px !important; gap: 10px !important;
  display: flex; flex-direction: column;
}
.vs-retro-body .voice-grid {
  flex: 1; min-height: 0; overflow-y: auto;
}

/* ── 뉴스 기사 작성 레트로 창 ── */
.ti-retro-window {
  margin: 20px !important;
}
.ti-retro-toolbar {
  display: flex; align-items: center; gap: 10px;
  justify-content: space-between;
  padding: 10px 16px; border-bottom: 2px solid #28343e;
  background: #dfe9f5; flex-shrink: 0;
  position: relative;
}
.ti-retro-save-btn {
  padding: 6px 14px; border: 2px solid #28343e; border-radius: 8px;
  background: #fff; font-size: 13px; font-weight: 700; color: #1e2833;
  cursor: pointer; box-shadow: 2px 2px 0 #28343e;
  transition: background 0.12s; white-space: nowrap;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.ti-retro-save-btn:hover { background: #eef4fb; }
.ti-retro-save-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rv-preview-btn { min-width: 70px; }
.ti-retro-pause-wrap {
  display: flex; align-items: stretch; position: relative;
  box-shadow: 2px 2px 0 #28343e; border-radius: 8px;
}
.ti-retro-pause-wrap .ti-retro-save-btn:first-child {
  border-radius: 8px 0 0 8px !important;
  box-shadow: none !important;
  min-width: 90px;
}
.ti-retro-pause-arrow {
  border-radius: 0 8px 8px 0 !important;
  padding: 6px 9px !important; font-size: 12px !important;
  border-left: none !important; box-shadow: none !important;
}
.ti-retro-body {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 12px 16px; gap: 0;
}
.ti-retro-textarea {
  background: #fff; border: 2px solid #c8d8e8 !important;
  border-radius: 10px !important; padding: 10px 12px !important;
  font-size: 14px; color: #1e2833; resize: vertical;
  font-family: var(--font-body); line-height: 1.7;
  transition: border-color 0.15s;
}
.ti-retro-textarea:focus { border-color: #28343e !important; outline: none; }
.ti-retro-textarea-main { flex: 1; min-height: 120px; }
.ti-retro-textarea-adj { height: 175px; min-height: 80px; }
.ti-retro-divider {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 2px; font-size: 11px; font-weight: 700;
  color: #54606c; letter-spacing: 0.06em; text-transform: uppercase;
  border-top: 1px dashed #b5c8d8; margin-top: 4px; margin-bottom: 3px;
}
.ti-retro-toolbar-left {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.ti-retro-toolbar-right {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; color: #111827; flex-wrap: wrap; justify-content: flex-start;
}
.ti-retro-toolbar-right .ti-sep { color: #9aabb8; }
.ti-retro-toolbar-right strong { font-size: 16px; font-weight: 900; color: #111827; }
#total-char-info { font-size: 16px !important; color:#111827 !important; }
.ti-retro-est {
  display: flex; align-items: center; gap: 4px;
  font-size: 16px; color: #111827; white-space: nowrap; flex-shrink: 0;
}
.ti-retro-est strong { font-size: 16px; font-weight: 900; color: #111827; }
#text-warning { display: none !important; }

/* ── 목표 시간 설정 레트로 창 ── */
.ts-retro-body {
  justify-content: center; align-items: center; gap: 16px;
}
.ts-retro-hint {
  font-size: 26px; color: #54606c; font-weight: 500; text-align: center;
}
.ts-retro-display {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
}
.ts-retro-field {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ts-retro-arrow {
  background: #dfe9f5; border: 2px solid #28343e; border-radius: 10px;
  width: 96px; height: 40px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: #28343e;
  transition: background 0.12s;
}
.ts-retro-arrow:hover { background: #c8d8e8; }
.ts-retro-arrow .material-symbols-outlined { font-size: 22px; }
.ts-retro-num {
  width: 96px; text-align: center;
  font-size: 56px !important; font-weight: 900 !important; color: #1e2833 !important;
  background: #fff; border: 2px solid #28343e !important; border-radius: 12px !important;
  padding: 10px 0 !important; box-shadow: 4px 4px 0 #28343e;
  font-family: var(--font-headline) !important;
  -moz-appearance: textfield;
}
.ts-retro-num::-webkit-outer-spin-button,
.ts-retro-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ts-retro-label { display: none; }
.ts-retro-colon {
  font-size: 52px; font-weight: 900; color: #28343e;
  padding-bottom: 28px; line-height: 1;
}
.ts-retro-presets {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 10px; row-gap: 16px;
  width: calc(96px * 2 + 16px + 16px); /* 숫자 2개 + 콜론 gap + 여유 */
}
.ts-retro-preset {
  padding: 10px 0 !important; border: 2px solid #28343e !important;
  border-radius: 10px !important; background: #fff !important;
  font-size: 15px !important; font-weight: 700 !important; color: #1e2833 !important;
  cursor: pointer; box-shadow: 3px 3px 0 #28343e;
  transition: background 0.12s, transform 0.1s;
}
.ts-retro-preset:hover { background: #dfe9f5 !important; transform: none !important; }
.ts-retro-preset:active { transform: translate(2px, 2px) !important; box-shadow: none !important; }

/* ── 커스텀 패널 스타일 ── */
.retro-custom-time-wrap { position: relative; }
/* 시간 팝업: 시간 행 바로 아래, 오른쪽 끝 맞춤 */
.retro-custom-time-wrap .bc-picker-popup {
  top: calc(100% + 6px); right: 0; left: auto; z-index: 500;
}
.retro-custom-time-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid #28343e; border-radius: 10px;
  padding: 14px 18px; font-size: 15px; font-weight: 700; color: #28343e;
  box-shadow: 3px 3px 0 #28343e;
}
.retro-custom-time-label { flex: 1; color: #54606c; font-size: 16px; font-weight: 600; }
.retro-custom-time-val { font-size: 28px; font-weight: 900; color: #28343e; letter-spacing: 0.04em; font-family: var(--font-headline); }
.retro-custom-clock-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 4px; margin-top: 4px;
}
.retro-min-presets {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px;
}
.retro-min-btn {
  flex: 1; min-width: 60px; height: 52px;
  background: #edf4fe; border: 2px solid #28343e; border-radius: 10px;
  font-size: 18px; font-weight: 800; color: #28343e; cursor: pointer;
  box-shadow: 3px 3px 0 #28343e;
  transition: transform 0.12s, box-shadow 0.12s;
}
.retro-min-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 #28343e; }
.retro-min-btn:active { transform: translate(1px,1px); box-shadow: none; }
.retro-min-btn.active { background: #43627e; color: #fff; }

/* ── 위젯 창 디자인 ──────────────────────────────────────────────── */
.right-panel {
  background: #f5f6f8 !important;
  border-left: 2px solid #28343e !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
}

.widget-window {
  border: 2px solid #28343e;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #28343e;
  background: #e6eff9;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.widget-win-bar {
  background: #dfe9f5;
  border-bottom: 2px solid #28343e;
  border-radius: 12px 12px 0 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.widget-win-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: #28343e;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.widget-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #54606c;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 6px;
  transition: background 0.12s;
}
.widget-icon-btn:hover { background: rgba(40,52,62,0.1); }
.widget-close-btn { display: none; }
@media (max-width: 1024px) {
  .widget-close-btn {
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; color: #54606c;
    padding: 3px; border-radius: 6px; touch-action: manipulation;
  }
  .widget-close-btn:hover { background: rgba(40,52,62,0.1); }
}

.widget-window .news-list {
  background: #edf4fe !important;
  border-radius: 0;
}

/* 알림/에러 바 */
.queue-notif {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 2px solid #28343e;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  min-height: 44px;
}
.queue-notif-info  { background: #eff6ff; color: #1e40af; }
.queue-notif-warn  { background: #fffbe6; color: #7d6608; }
.queue-notif-error { background: #fff0f0; color: #b91c1c; }
.queue-notif-ok    { background: #f0fdf4; color: #15803d; }
.queue-notif-icon  { font-size: 16px !important; flex-shrink: 0; }
.queue-notif-msg   { flex: 1; line-height: 1.4; }
.queue-notif-close {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.5; flex-shrink: 0;
  display: flex; align-items: center; padding: 2px; border-radius: 4px;
}
.queue-notif-close:hover { opacity: 1; }

/* ════════════════════════════════════════════════════════════════
   MOBILE RETRO OVERRIDES (must come AFTER retro design system)
════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 전체 overflow 방지 */
  .app-body, .main-area, #main-split, .panels-slider, #left-panel, .left-step, .sub-screen {
    max-width: 100vw !important; overflow-x: hidden !important;
  }

  /* 레트로 윈도우 */
  .retro-window { margin: 6px !important; box-shadow: 2px 2px 0 #28343e !important; max-width: calc(100vw - 12px) !important; overflow: hidden !important; }
  .rs-retro-window { margin: 6px !important; }
  .retro-win-bar { padding: 5px 8px !important; }
  .retro-dot { width: 9px !important; height: 9px !important; }
  .retro-win-title { font-size: 11px !important; }
  .retro-win-body { padding: 10px 10px !important; }

  /* 사이드바 강제 숨김 */
  .left-sidebar { display: none !important; }

  /* 프리셋/커스텀 탭 */
  .bc-new-workspace { padding: 0 !important; }
  .bc-new-workspace .bc-tab { padding: 5px 12px !important; font-size: 12px !important; }
  .bc-new-workspace .bc-date-row { font-size: 12px !important; padding: 5px 10px !important; }
  .bc-new-workspace .bc-preset-grid { gap: 8px !important; }
  .bc-new-workspace .bc-preset-card { padding: 12px 8px !important; }
  .bc-new-workspace .bc-preset-icon-wrap { width: 40px !important; height: 40px !important; }
  .bc-new-workspace .bc-preset-name { font-size: 19px !important; font-weight: 800 !important; }
  .bc-new-workspace .bc-preset-card { display: flex !important; flex-direction: column !important; text-align: center !important; }
  .retro-card-top { justify-content: space-between !important; }
  .left-panel > .left-step > .retro-window { margin: 12px !important; }
  .bc-new-workspace .bc-preset-desc { font-size: 9px !important; }
  .retro-controls-row { gap: 8px !important; }

  /* MAKE / 네비 버튼 — 항상 좌우 배치 */
  .retro-make-footer { padding: 8px 10px !important; gap: 8px !important; flex-direction: row !important; }
  .retro-make-btn { height: 44px !important; font-size: 13px !important; box-shadow: 2px 2px 0 #28343e !important; flex: 1 !important; max-width: 50% !important; }
  .retro-make-btn-back { height: 44px !important; font-size: 12px !important; box-shadow: 2px 2px 0 #28343e !important; flex: 1 !important; max-width: 50% !important; }
  #step-new .retro-make-btn { max-width: 100% !important; }

  /* 시간 설정 숫자 입력 */
  .ts-retro-num { width: 110px !important; font-size: 48px !important; }
  .ts-retro-colon { font-size: 36px !important; }
  .ts-retro-arrow { width: 110px !important; }

  /* 보이스 카드 */
  .voice-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .voice-card { padding: 10px !important; }
  .voice-card .voice-name { font-size: 13px !important; }

  /* 시간 설정 */
  .retro-custom-split { flex-direction: column !important; gap: 10px !important; }
  .retro-custom-time-compact { width: 100% !important; }
  .retro-time-grid { gap: 8px !important; width: 100% !important; grid-template-columns: repeat(5, 1fr) !important; }
  .retro-time-btn { padding: 8px 4px !important; font-size: 12px !important; box-shadow: 2px 2px 0 #28343e !important; }

  /* 결과 화면 */
  .rs-result-btn { font-size: 13px !important; height: 40px !important; box-shadow: 2px 2px 0 #28343e !important; }
  .rs-retro-footer { padding: 8px 10px !important; }

  /* 수정 패널 */
  .rs-edit-panel { left: 6px !important; right: 6px !important; }

  /* 담당자 */
  .assignee-card { padding: 10px 12px !important; }
  .assignee-name { font-size: 14px !important; }
  .assignee-avatar { width: 36px !important; height: 36px !important; }

  /* AI 리뷰 결과 */
  .rv-retro-window { display: flex !important; flex-direction: column !important; min-height: 0 !important; flex: 1 !important; margin: 12px !important; }
  .rv-retro-body { padding: 8px 8px !important; gap: 8px !important; overflow: hidden !important; }
  .rv-sections { flex: 1 !important; min-height: 0 !important; }
  .rv-retro-body .rv-card { padding: 10px !important; flex: 1 !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
  .rv-retro-body .rv-card-title { display: none !important; }
  .rv-diff-label { display: none !important; }
  .rv-diff-wrap { display: none !important; }
  .rv-diff-body { font-size: 13px !important; line-height: 1.5 !important; }
  .rv-body-bg { flex: 1 !important; min-height: 0 !important; display: flex !important; }
  .rv-body-textarea, .rv-ta-editable { height: 100% !important; max-height: none !important; font-size: 14px !important; }
  .rv-card-ta { max-height: none !important; }
  .rv-retro-stat { padding: 6px 10px !important; font-size: 10px !important; flex-wrap: nowrap !important; white-space: nowrap !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; gap: 4px !important; }
  .rv-retro-stat .rv-stat-counts { font-size: 10px !important; flex: 1 !important; }
  .rv-retro-stat .rv-est-val { font-size: 13px !important; font-weight: 900 !important; text-align: right !important; }
  .rv-bottom-bar { flex-wrap: nowrap !important; gap: 4px !important; }
  .rv-bottom-bar .rv-bottom-stats .rv-stat-col-val:first-child { display: none !important; }
  .rv-bottom-bar .rv-bottom-stats .rv-stat-sep { display: none !important; }
  .ti-retro-pause-wrap .ti-retro-save-btn:first-child { min-width: 60px !important; font-size: 11px !important; padding: 4px 8px !important; }
  .ti-retro-pause-wrap .ti-retro-pause-arrow { font-size: 10px !important; padding: 4px 6px !important; }
  .rv-remeas-retro-btn { min-width: 44px !important; padding: 5px 8px !important; font-size: 11px !important; }
  .rv-preview-btn { min-width: 44px !important; padding: 5px 8px !important; font-size: 11px !important; }
  .rv-stat-bar { padding: 12px 10px !important; border-radius: 10px !important; }
  .rv-stat-main-row { flex-direction: column !important; align-items: stretch !important; gap: 4px !important; margin-bottom: 10px !important; }
  .rv-stat-counts { font-size: 12px !important; }
  .rv-stat-dur-wrap { align-items: flex-end !important; }
  .rv-est-val { font-size: 20px !important; }

  /* 텍스트 입력 툴바 — 통계만 표시, 버튼 숨김 */
  .ti-retro-toolbar {
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 2px !important;
    padding: 6px 10px !important;
    flex-direction: column !important;
  }
  .ti-retro-toolbar-left { display: none !important; }
  .ti-retro-toolbar-right {
    display: flex !important; flex-wrap: nowrap !important;
    justify-content: center !important;
    font-size: 11px !important;
    gap: 3px !important;
    width: 100% !important;
    white-space: nowrap !important;
  }

  /* textarea — iOS 자동 zoom 방지 (16px 이상) + 시간조절용 확대 */
  .ti-retro-textarea { font-size: 16px !important; }
  .ti-retro-textarea-adj { min-height: 80px !important; }
  input, textarea, select { font-size: 16px !important; }

  /* 시간조절용 드래그 구분선 */
  .ti-retro-divider {
    cursor: row-resize !important;
    padding: 10px 16px !important;
    touch-action: none !important;
  }
}

@media (max-width: 430px) {
  .retro-window { margin: 4px !important; }
  .rs-retro-window { margin: 4px !important; }
  .retro-win-body { padding: 6px 6px !important; }
  .bc-new-workspace .bc-tab { padding: 4px 8px !important; font-size: 11px !important; }
  .bc-new-workspace .bc-preset-icon-wrap { width: 32px !important; height: 32px !important; }
  .bc-new-workspace .bc-preset-name { font-size: 17px !important; font-weight: 800 !important; }
  .retro-make-btn { height: 40px !important; font-size: 12px !important; }
  .retro-make-btn-back { height: 40px !important; font-size: 11px !important; }
  .retro-make-btn, .retro-make-btn-back { max-width: 50% !important; }
  .voice-card { padding: 8px !important; }
  .voice-card .voice-name { font-size: 11px !important; }
  .rs-edit-panel { left: 4px !important; right: 4px !important; }

  /* 헤더 아이콘 크기 */
  .nav-icon-btn { width: 36px !important; height: 36px !important; }
  .nav-icon-btn .material-symbols-outlined { font-size: 24px !important; }
}

/* ════ 모바일 자동 줌 방지 (최하단 — 최우선) ════ */
@media (max-width: 1024px) {
  input, textarea, select, [contenteditable] {
    font-size: 16px !important;
    transform-origin: left top;
  }
  #body-textarea,
  #time-adjust-textarea,
  textarea.ti-retro-textarea,
  textarea.ti-retro-textarea-main,
  textarea.ti-retro-textarea-adj {
    font-size: 16px !important;
    line-height: 1.7 !important;
    font-family: var(--font-body) !important;
    padding: 10px 12px !important;
  }
  #time-adjust-textarea,
  .ti-retro-textarea-adj {
    min-height: 120px !important;
    margin-top: 10px !important;
  }
  .ti-retro-divider {
    display: none !important;
  }
  .ti-retro-toolbar-right {
    font-size: 11px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }
}


/* ── AI 리뷰 화면: 모바일 Flutter 흐름에 맞춘 읽기/선택/수정 UI ── */
.rv-sections > div {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rv-card-body-main {
  flex: 1 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.rv-change-summary {
  flex-shrink: 0;
  border: 1px solid #d8dee8;
  background: #f8fafc;
  border-radius: 9px;
  padding: 8px 10px;
  color: #28343e;
  font-size: 13px;
}
.rv-change-summary summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.rv-change-summary summary::-webkit-details-marker { display: none; }
.rv-change-summary .material-symbols-outlined { font-size: 17px; color: #2563eb; }
.rv-change-summary b { font-weight: 900; }
.rv-change-summary em { margin-left: auto; font-style: normal; font-size: 12px; color: #64748b; }
.rv-change-none .material-symbols-outlined { color: #16a34a; }
.rv-change-diff {
  margin-top: 8px;
  max-height: 130px;
  overflow: auto;
  border-top: 1px dashed #cbd5e1;
  padding-top: 8px;
  font-size: 13px;
  line-height: 1.65;
}
.rv-retro-window .rv-legacy-bottom-bar {
  display: none !important;
}
.rv-retro-window .rv-body-bg {
  flex: 1 !important;
  min-height: 300px !important;
  padding: 10px !important;
}
.rv-retro-window .rv-body-textarea {
  height: 100% !important;
  min-height: 300px !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
  padding: 14px !important;
  background: #fff !important;
  border: 1px solid #d7dee8 !important;
  color: #20242a !important;
  -webkit-user-select: text;
  user-select: text;
}
.rv-review-action-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(64px, 0.5fr) minmax(64px, 0.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding-top: 2px;
}
.rv-review-action-row .rs-script-action-btn {
  justify-content: center;
  min-height: 38px;
}
@media (max-width: 1024px) {
  .rv-retro-window .rv-retro-body { padding: 6px 8px !important; }
  .rv-retro-window .rv-card { padding: 8px !important; }
  .rv-retro-window .rv-body-bg { min-height: 0 !important; }
  .rv-retro-window .rv-body-textarea { min-height: 0 !important; font-size: 16px !important; }
  .rv-change-summary { padding: 7px 9px !important; font-size: 12px !important; }
  .rv-change-summary em { display: none; }
  .rv-review-action-row { gap: 6px; }
  .rv-review-action-row .rs-script-action-btn { min-height: 36px; padding: 6px 8px; font-size: 12px; }
}


/* ── AI 리뷰 선택/수정 안정화 보정 ── */
.rv-card-body-main {
  overflow: hidden !important;
}
.rv-retro-window .rv-body-bg {
  min-height: 0 !important;
  overflow: hidden !important;
}
.rv-retro-window .rv-body-textarea {
  min-height: 0 !important;
  caret-color: #2563eb !important;
  overflow: auto !important;
}
.rv-change-summary {
  max-height: 46px;
  overflow: hidden;
}
.rv-change-summary[open] {
  max-height: 296px;
  overflow: auto;
}
.rv-change-diff {
  max-height: 184px !important;
  white-space: pre-wrap !important;
  word-break: break-word;
}
.rv-review-action-row {
  position: relative;
  z-index: 2;
}

.rv-tts-top-btn {
  margin-left: 6px;
  min-height: 44px;
  border: 2px solid #28343e;
  border-radius: 12px;
  background: #fff;
  color: #28343e;
  box-shadow: 4px 4px 0 #8a99a8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 16px;
  white-space: nowrap;
  cursor: pointer;
}
.rv-tts-top-btn:not(:disabled):hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #8a99a8;
}
.rv-tts-top-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
@media (max-width: 560px) {
  .rv-retro-stat {
    gap: 6px !important;
    flex-wrap: wrap;
  }
  .rv-tts-top-btn {
    width: 100%;
    margin-left: 0;
    padding: 7px 10px;
  }
}


.rv-change-diff ins,
.rv-change-diff del,
.rv-change-diff span {
  white-space: pre-wrap !important;
}


/* AI 리뷰 화면에서 결과화면 수정 패널을 재사용할 때 부모 hidden 영향 제거 */
.rs-edit-panel.rs-edit-panel-review {
  position: fixed !important;
  left: var(--review-panel-left, max(12px, env(safe-area-inset-left))) !important;
  top: var(--review-panel-top, 96px) !important;
  right: auto !important;
  width: var(--review-panel-width, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 12px) !important;
  bottom: auto !important;
  height: var(--review-panel-height, min(48vh, 380px)) !important;
  min-width: 280px !important;
  min-height: 220px !important;
  max-height: calc(100vh - 16px) !important;
  overflow: hidden;
  z-index: 9999 !important;
}
.rs-edit-panel.rs-edit-panel-review .rs-edit-inner {
  border: 2px solid #28343e;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.24);
}
.rs-edit-panel.rs-edit-panel-review .rs-edit-winbar {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.rs-edit-panel.rs-edit-panel-review .rs-edit-winbar:active {
  cursor: grabbing;
}
.rs-edit-panel.rs-edit-panel-review .rs-resize-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 10002;
  touch-action: none;
}
.rs-edit-panel.rs-edit-panel-review .rs-resize-nw {
  left: -5px;
  top: -5px;
  cursor: nwse-resize;
}
.rs-edit-panel.rs-edit-panel-review .rs-resize-ne {
  right: -5px;
  top: -5px;
  cursor: nesw-resize;
}
.rs-edit-panel.rs-edit-panel-review .rs-resize-sw {
  left: -5px;
  bottom: -5px;
  cursor: nesw-resize;
}
.rs-edit-panel.rs-edit-panel-review .rs-resize-se {
  right: -5px;
  bottom: -5px;
  cursor: nwse-resize;
}
.rs-edit-panel.rs-edit-panel-review .rs-edit-footer-bar {
  gap: 8px !important;
}
.rs-edit-panel.rs-edit-panel-review .rs-edit-footer-left {
  flex: 1 1 auto;
  min-width: 0;
}
.rs-edit-panel.rs-edit-panel-review .rs-pause-trigger,
.rs-edit-panel.rs-edit-panel-review .rs-edit-btn {
  min-height: 34px;
}
.rs-edit-panel.rs-edit-panel-review #btn-edit-panel-confirm,
.rs-edit-panel.rs-edit-panel-review #btn-edit-panel-apply {
  min-width: 72px;
}
@media (max-width: 1024px) {
  .rs-edit-panel.rs-edit-panel-review {
    left: var(--review-panel-left, 6px) !important;
    top: var(--review-panel-top, 72px) !important;
    right: auto !important;
    width: var(--review-panel-width, calc(100vw - 12px)) !important;
    height: var(--review-panel-height, min(52vh, 380px)) !important;
    min-height: 220px !important;
  }
}
@media (max-width: 430px) {
  .rs-edit-panel.rs-edit-panel-review {
    left: var(--review-panel-left, 4px) !important;
    top: var(--review-panel-top, 64px) !important;
    width: var(--review-panel-width, calc(100vw - 8px)) !important;
    height: var(--review-panel-height, min(54vh, 390px)) !important;
    min-width: 260px !important;
    min-height: 220px !important;
  }
  .rs-edit-panel.rs-edit-panel-review .rs-edit-footer-bar {
    padding: 7px 8px 10px !important;
  }
  .rs-edit-panel.rs-edit-panel-review .rs-edit-footer-left {
    gap: 6px;
  }
  .rs-edit-panel.rs-edit-panel-review .rs-edit-btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
}


/* AI 리뷰 TTS 상태 안내 */
.rv-tts-status {
  margin-left: 2px;
  margin-right: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}
.rv-tts-status:empty { display: none; }
@media (max-width: 720px) {
  .rv-tts-status { font-size: 11px; margin-right: 6px; }
}


/* 수정모드 AI리뷰 */
.rs-edit-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.rs-edit-review-diff {
  margin: 8px 0 0;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
  flex-shrink: 0;
}
.rs-edit-review-details summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 10px;
  color: #27323d;
  font-size: 13px;
  user-select: none;
}
.rs-edit-review-details summary em {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}
.rs-edit-review-diff-body {
  max-height: 120px;
  overflow: auto;
  padding: 8px 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  line-height: 1.65;
}
@media (max-width: 720px) {
  .rs-edit-footer-right { gap: 6px; }
  #btn-edit-panel-ai-review { min-width: 64px; padding-left: 8px; padding-right: 8px; }
  .rs-edit-review-diff-body { max-height: 90px; }
}

.rs-edit-action-hint {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  align-self: center;
}
.rs-edit-action-hint:empty { display: none; }
@media (max-width: 720px) {
  .rs-edit-action-hint { font-size: 10.5px; }
}

.rv-tts-play-btn {
  margin-left: auto;
  margin-right: 4px;
  min-width: 74px;
  min-height: 44px;
  padding: 9px 13px;
  border: 2px solid #8a99a8;
  border-radius: 12px;
  background: #fff;
  color: #28343e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 #8a99a8;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.rv-tts-play-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.rv-tts-play-btn + .rv-tts-status { margin-left: 2px; }

.rv-karaoke-active {
  font-weight: inherit !important;
  color: inherit !important;
}


/* 리뷰 화면 상단 통계/오디오 완료 팝업 */
#body-char-count { color:#111827 !important; font-size:16px !important; font-weight:900 !important; }
.rv-stat-need { margin-left:4px; font-size:14px; font-weight:700; }
.rv-stat-sep-text { color:#64748b; margin:0 4px; font-weight:700; }
.rv-body-textarea[readonly] { caret-color:#111827; cursor:text; }
.rv-audio-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 12000;
  min-width: 280px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 14px 14px;
  border: 2px solid #28343e;
  border-radius: 14px;
  background: #fffdf8;
  color: #28343e;
  box-shadow: 5px 5px 0 rgba(40,52,62,.35);
  animation: rvAudioToastIn .18s ease-out;
}
.rv-audio-toast-hide { opacity: 0; transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }
.rv-audio-toast-title { font-size: 13px; font-weight: 700; color:#4b5563; margin-bottom: 9px; }
.rv-audio-toast-player { display:flex; align-items:center; gap:10px; }
.rv-audio-toast-play {
  width:34px; height:30px; border:2px solid #28343e; border-radius:9px; background:#fff; color:#28343e;
  display:inline-flex; align-items:center; justify-content:center; box-shadow:2px 2px 0 #8a99a8; cursor:pointer;
}
.rv-audio-toast-play .material-symbols-outlined { font-size:18px; }
.rv-audio-toast-bar { flex:1; height:8px; background:#e5e7eb; border:1px solid #cbd5e1; border-radius:999px; overflow:hidden; }
.rv-audio-toast-bar span { display:block; width:0%; height:100%; background:#2563eb; border-radius:999px; transition:width .08s linear; }
@keyframes rvAudioToastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }


/* 리뷰 본문 클릭 위치 표시 + 미리듣기 카라오케 */
.rv-body-bg { position: relative; }
.rv-caret-marker {
  position:absolute;
  display:none;
  width:2px;
  background:#2563eb;
  border-radius:2px;
  box-shadow:0 0 0 2px rgba(37,99,235,.14);
  pointer-events:none;
  z-index:4;
  animation: rvCaretBlink 1s step-end infinite;
}
@keyframes rvCaretBlink { 50% { opacity:.25; } }
.rv-main-kara-overlay {
  overflow-y:auto;
  white-space:pre-wrap;
  word-break:break-word;
  box-sizing:border-box;
  width:100%;
  color:#aab0b8;
}
.rv-main-kara-overlay span.rv-kara-past { color:#111827; font-weight:inherit; }
.rv-audio-toast {
  min-width:auto !important;
  max-width:min(360px, calc(100vw - 32px)) !important;
  padding:13px 15px !important;
}
.rv-audio-toast-title { margin-bottom:0 !important; }
.rv-audio-toast-player, .rv-audio-toast-play, .rv-audio-toast-bar { display:none !important; }


/* 생성완료 화면 정리 */
.rs-script-footer { display: none !important; }
.rs-info-sep { color:#94a3b8; margin:0 6px; }
.kara-text span { color:#aab0b8; }
.kara-text span.kara-done { color:#111827; font-weight:inherit; background:none; }
.rs-retro-footer .rs-dl-group { flex:1; display:flex; gap:8px; }
.rs-retro-footer .rs-dl-group .rs-result-btn { flex:1 1 0; min-width:0; font-size:14px !important; }
.rs-retro-footer .rs-deliver-btn { flex:1; }

.rs-global-busy-dim {
  position:fixed; inset:0; z-index:9990;
  display:none;
  background:transparent;
  backdrop-filter:none;
}
.rs-edit-panel.rs-edit-busy { opacity:1; pointer-events:none; z-index:10000; }
.rs-edit-panel.rs-edit-busy::after { display:none; }

.app-confirm-overlay {
  position:fixed; inset:0; z-index:13000;
  display:flex; align-items:center; justify-content:center;
  padding:18px; background:rgba(17,24,39,.42);
}
.app-confirm-dialog {
  width:min(440px, 100%); border:3px solid #28343e; border-radius:18px;
  background:#fffdf8; color:#28343e; box-shadow:7px 7px 0 rgba(40,52,62,.36);
  padding:22px 22px 18px; font-family:inherit;
}
.app-confirm-title { font-size:18px; font-weight:900; margin-bottom:12px; }
.app-confirm-message { font-size:14px; line-height:1.65; color:#475569; margin-bottom:18px; }
.app-confirm-actions { display:flex; gap:10px; justify-content:flex-end; }
.app-confirm-actions button {
  min-width:96px; height:42px; border:2px solid #28343e; border-radius:12px;
  background:#fff; color:#28343e; font-weight:900; cursor:pointer; box-shadow:3px 3px 0 #8a99a8;
}
.app-confirm-actions .app-confirm-ok { background:#28343e; color:#fff; }
.app-confirm-actions .app-confirm-ok.danger { background:#dc2626; color:#fff; border-color:#991b1b; }
.right-panel.ui-busy { pointer-events:none; opacity:0.72; }

/* 오디오 파형 확인 모달 */
.rs-wave-btn {
  height:34px; padding:0 14px; border:2px solid #28343e; border-radius:11px;
  background:#fffdf8; color:#28343e; font-weight:900; font-size:13px;
  box-shadow:3px 3px 0 #8a99a8; cursor:pointer; white-space:nowrap;
}
.rs-wave-btn:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }
.audio-editor-overlay { z-index:15000; align-items:center; justify-content:center; padding:22px; }
.audio-editor-box {
  width:min(1120px, 96vw); max-height:88vh; overflow:hidden;
  border:3px solid #28343e; border-radius:20px; background:#e6eff9;
  box-shadow:8px 8px 0 rgba(40,52,62,.35); color:#28343e;
}
.audio-editor-titlebar { border-bottom:3px solid #28343e; }
.audio-editor-close {
  width:36px; height:30px; border:2px solid #28343e; border-radius:9px;
  background:#fff; color:#28343e; font-weight:900; cursor:pointer;
}
.audio-editor-body { padding:18px; display:flex; flex-direction:column; gap:12px; }
.audio-editor-info {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  font-size:14px; font-weight:800; color:#475569;
}
#audio-editor-hint { margin-left:auto; font-weight:600; color:#64748b; }
.audio-editor-wave {
  width:100%; height:300px; border:2px solid #b7c9da; border-radius:16px;
  background:#fff; cursor:crosshair; display:block;
}
.audio-editor-controls { display:flex; align-items:center; gap:12px; justify-content:space-between; }
.audio-editor-btn {
  min-width:110px; height:42px; border:2px solid #28343e; border-radius:12px;
  background:#28343e; color:#fff; font-weight:900; box-shadow:3px 3px 0 #8a99a8; cursor:pointer;
}
.audio-editor-zoom-label { display:flex; align-items:center; gap:10px; font-size:14px; font-weight:800; color:#475569; }
.audio-editor-zoom-label input { width:220px; }
@media (max-width: 768px) {
  .rs-wave-btn { height:32px; padding:0 10px; font-size:12px; }
  .audio-editor-box { width:98vw; }
  .audio-editor-wave { height:220px; }
  #audio-editor-hint { margin-left:0; width:100%; }
}

/* ── 에르메스 추천 패널 (리뷰 화면) ── */
.rv-hermes-panel {
  margin: 0 0 10px; padding: 8px 12px;
  border: 1px solid #d8d2c4; border-left: 3px solid #8b7ad8;
  background: #faf9f5; border-radius: 6px; font-size: 13px;
  max-height: 46vh; overflow-y: auto;   /* 추천 10건 이상이어도 스크롤로 전부 확인 */
  /* rv-sections>div의 flex:1 무력화 → 내용만큼만 차지(닫히면 작게), 본문 카드가 남은 세로 전부 차지 */
  flex: 0 0 auto !important;
}
.rv-hermes-panel.rv-hermes-error { border-left-color: #d97706; }
.rv-hermes-head { font-weight: 700; cursor: pointer; user-select: none; }
.rv-hermes-status { font-weight: 400; color: #888; margin-left: 6px; }
.rv-hermes-count { font-weight: 600; color: #8b7ad8; margin-left: 6px; }
.rv-hermes-meta { float: right; font-weight: 400; font-size: 11px; color: #aaa; }
.rv-hermes-timing-head { margin: 8px 0 4px; font-weight: 600; color: #444; }
.rv-hermes-sec { margin-top: 8px; }
.rv-hermes-sec-title { font-size: 11px; font-weight: 700; color: #8b7ad8; text-transform: uppercase; margin-bottom: 4px; }
.rv-hermes-row { padding: 6px 8px; margin-bottom: 6px; background: #fff; border: 1px solid #eee8da; border-radius: 4px; }
.rv-hermes-diff { line-height: 1.5; }
.rv-hermes-diff del { color: #b91c1c; background: #fee2e2; text-decoration: line-through; padding: 0 2px; }
.rv-hermes-diff ins { color: #15803d; background: #dcfce7; text-decoration: none; padding: 0 2px; }
.rv-hermes-delta { color: #888; font-size: 12px; }
.rv-hermes-reason { color: #777; font-size: 12px; margin-top: 2px; }
.rv-hermes-actions { margin-top: 4px; display: flex; gap: 6px; }
.rv-hermes-actions button {
  font-size: 12px; padding: 2px 10px; border: 1px solid #c9c2b2;
  background: #f5f2ea; border-radius: 4px; cursor: pointer;
}
.rv-hermes-actions button:hover:not(:disabled) { background: #ece7da; }
.rv-hermes-actions button:disabled { opacity: 0.5; cursor: default; }
.rv-hermes-actions .rv-hermes-rule { border-color: #8b7ad8; color: #6d5bc7; }
