:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f0f2f8; --text: #14161c; --muted: #6b7280; --border: #e5e7ee;
  --primary: #6c5ce7; --primary-strong: #5a4bd6; --primary-soft: #ece9fd; --accent: #ff7a00; --success: #16a34a; --danger: #dc2626; --warn: #d97706;
  --shadow: 0 8px 30px rgba(20, 22, 28, 0.08); --radius: 14px; --sidebar-w: 248px; --sidebar-w-icon: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1115; --surface: #171a21; --surface-2: #1f232d; --text: #eceef3; --muted: #9aa1b1; --border: #2a2f3a; --primary-soft: #26224a; --shadow: 0 8px 30px rgba(0,0,0,.4); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0f1115; --surface: #171a21; --surface-2: #1f232d; --text: #eceef3; --muted: #9aa1b1; --border: #2a2f3a; --primary-soft: #26224a; --shadow: 0 8px 30px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; font-size: 15px; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2rem; font-weight: 900; } h2 { font-size: 1.5rem; font-weight: 800; } h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; } .bold { font-weight: 700; }
.hidden { display: none !important; }
.only-mobile { display: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; transition: width .2s; overflow: hidden; }
.app-shell.sidebar-collapsed .sidebar { width: var(--sidebar-w-icon); }
.app-shell.sidebar-collapsed .sidebar .label, .app-shell.sidebar-collapsed .brand-name, .app-shell.sidebar-collapsed .sidebar-foot, .app-shell.sidebar-collapsed .nav-group-title { display: none; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 900; font-size: 1.1rem; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 900; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.nav-group-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-weight: 500; white-space: nowrap; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-item .ico { width: 22px; text-align: center; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-title { font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.view { padding: 24px 20px 48px; max-width: 1240px; width: 100%; margin: 0 auto; }
.footer { border-top: 1px solid var(--border); padding: 32px 20px; color: var(--muted); font-size: .85rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; max-width: 1240px; margin: 0 auto; }
.footer-grid h4 { font-size: .9rem; color: var(--text); }
.footer-grid a { display: block; color: var(--muted); padding: 2px 0; }
.footer-company { max-width: 1240px; margin: 24px auto 0; border-top: 1px solid var(--border); padding-top: 16px; font-size: .78rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: transform .05s, background .15s; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-strong); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-ghost { background: transparent; border-color: transparent; } .btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 10px; font-size: .85rem; border-radius: 8px; } .btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: 1.05rem; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.pill { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.badge-soft { background: var(--surface-2); color: var(--muted); }
.badge-success { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.badge-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge-danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); transition: .15s; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-5 { grid-template-columns: repeat(5, 1fr); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row-between { justify-content: space-between; } .col { display: flex; flex-direction: column; gap: 12px; }
.stack > * + * { margin-top: 16px; }
.section { margin: 56px 0; } .section-head { text-align: center; margin-bottom: 28px; } .section-head p { color: var(--muted); font-size: 1.05rem; }
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 2.6rem; margin-bottom: 12px; } .hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto 24px; }
.hero-box { max-width: 720px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; border: none; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chip { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 600; border: 1px solid var(--border); cursor: pointer; }
.chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px auto; max-width: 820px; }
.stat { text-align: center; } .stat .value { font-size: 1.8rem; font-weight: 900; color: var(--primary); } .stat .label { color: var(--muted); }
.marquee { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: inline-flex; gap: 12px; animation: marquee 40s linear infinite; padding: 6px 0; }
.marquee-track.reverse { animation-direction: reverse; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.creator { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.creator .avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.quote { font-style: italic; color: var(--muted); }
.faq-item { border-bottom: 1px solid var(--border); } .faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::after { content: '+'; color: var(--muted); } .faq-item[open] summary::after { content: '−'; }
.faq-item .answer { padding: 0 0 16px; color: var(--muted); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); border-color: var(--primary); }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.input-row { display: flex; gap: 8px; } .input-row input { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; } .check input { width: auto; }
.toggle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; } .table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; } .table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.table-wrap { overflow-x: auto; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; } .progress > div { height: 100%; background: var(--primary); transition: width .3s; }
.log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; background: var(--surface-2); border-radius: 8px; padding: 10px; max-height: 180px; overflow: auto; }
.clip-card { display: flex; flex-direction: column; gap: 8px; }
.clip-preview { aspect-ratio: 9 / 16; max-height: 320px; border-radius: 12px; background: #000 center/cover no-repeat; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.clip-preview.r-1-1 { aspect-ratio: 1; } .clip-preview.r-4-5 { aspect-ratio: 4 / 5; } .clip-preview.r-16-9 { aspect-ratio: 16 / 9; max-height: 200px; }
.clip-preview .sub { position: absolute; left: 8%; right: 8%; text-align: center; font-weight: 900; text-shadow: 0 2px 6px #000, 0 0 2px #000; color: #fff; }
.clip-preview .hook { position: absolute; top: 10px; left: 10px; right: 10px; background: rgba(0,0,0,.55); color: #ffd400; border-radius: 8px; padding: 6px 8px; font-size: .8rem; font-weight: 700; }
.clip-preview .zoom { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: 3px 6px; border-radius: 6px; }
.timeline { position: relative; height: 40px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.timeline .seg { position: absolute; top: 6px; bottom: 6px; background: var(--primary); opacity: .75; border-radius: 4px; }
.timeline .cut { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, var(--danger) 0 4px, transparent 4px 8px); opacity: .5; }
.waveform { width: 100%; height: 120px; border-radius: 10px; background: var(--surface-2); display: block; cursor: crosshair; }
.seg-row { display: grid; grid-template-columns: 82px 82px 1fr auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.seg-row.active { background: var(--primary-soft); border-radius: 8px; }
.seg-row input { padding: 6px 8px; font-size: .85rem; }
.subtitle-preview { background: #000 url('https://picsum.photos/seed/preview/540/960') center/cover; aspect-ratio: 9/16; max-height: 420px; border-radius: 12px; position: relative; display: grid; place-items: end center; overflow: hidden; }
.subtitle-preview .line { margin-bottom: 12%; text-align: center; padding: 6px 12px; border-radius: 8px; max-width: 90%; }
.pricing-card { position: relative; } .pricing-card.popular { border-color: var(--primary); box-shadow: var(--shadow); } .pricing-card .price { font-size: 1.9rem; font-weight: 900; }
.pricing-card ul { padding-left: 18px; color: var(--muted); }
.rank { font-weight: 900; color: var(--primary); width: 32px; }
.video-item { display: grid; grid-template-columns: 32px 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.video-item img { width: 64px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.entry-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.entry-card:hover { box-shadow: var(--shadow); }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 380px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--border); z-index: 60; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer-wide { width: 460px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.chat-body { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; } .msg.admin { border: 1px solid var(--accent); } .msg.system { align-self: center; font-size: .8rem; color: var(--muted); background: transparent; }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-tools { padding: 0 16px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notif { padding: 10px 0; border-bottom: 1px solid var(--border); } .notif.unread { font-weight: 700; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 16px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); animation: fade .2s; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.notice-bar { background: var(--primary-soft); color: var(--primary); padding: 8px 20px; font-size: .9rem; font-weight: 600; }
.notice-bar.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.kbd { font-family: ui-monospace, monospace; font-size: .75rem; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); cursor: pointer; } .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.template-card { cursor: pointer; border: 2px solid transparent; } .template-card.active { border-color: var(--primary); }
.template-swatch { height: 90px; border-radius: 10px; display: grid; place-items: center; background: #222 url('https://picsum.photos/seed/tpl/300/120') center/cover; color: #fff; font-weight: 900; text-shadow: 0 1px 4px #000; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } .admin-stat { padding: 16px; } .admin-stat .value { font-size: 1.6rem; font-weight: 900; }
.step { display: flex; gap: 14px; align-items: flex-start; } .step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 900; flex-shrink: 0; }
.persona { display: flex; flex-direction: column; gap: 8px; } .persona .who { font-weight: 800; color: var(--primary); }
.result-chip { display: inline-block; background: var(--surface-2); padding: 4px 10px; border-radius: 8px; font-size: .85rem; font-weight: 700; margin-right: 6px; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.sticky { position: sticky; top: 72px; }
.desktop-only { display: none; } .is-desktop .desktop-only { display: initial; } .is-desktop .web-only { display: none; }
@media (max-width: 1000px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .footer-grid { grid-template-columns: 1fr 1fr; } .admin-grid { grid-template-columns: repeat(2, 1fr); } .split { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 55; transform: translateX(-100%); width: var(--sidebar-w) !important; } .app-shell.sidebar-mobile-open .sidebar { transform: none; }
  .only-mobile { display: inline-grid; } .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } .hero h1 { font-size: 1.9rem; } .stats { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; } .view { padding: 16px; } .admin-grid { grid-template-columns: 1fr; } .seg-row { grid-template-columns: 70px 70px 1fr; }
}

/* ---- 미리보기 플레이어 (보관함 · 스튜디오 · 재구성 공용) ---- */
.player { display: flex; flex-direction: column; gap: 8px; }
.player-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; width: 100%; max-height: 70vh; margin: 0 auto; }
.player.r-9-16 .player-stage { aspect-ratio: 9 / 16; max-height: 70vh; width: auto; min-width: 240px; }
.player.r-1-1 .player-stage { aspect-ratio: 1; max-height: 70vh; width: auto; min-width: 240px; }
.player.r-4-5 .player-stage { aspect-ratio: 4 / 5; max-height: 70vh; width: auto; min-width: 240px; }
.player-media, .player-media video, .player-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player-sub { position: absolute; left: 6%; right: 6%; bottom: 12%; text-align: center; color: #fff; font-weight: 900; font-size: clamp(14px, 2.2vw, 26px); text-shadow: 0 2px 6px #000, 0 0 2px #000; pointer-events: none; }
.player-hook { position: absolute; top: 12px; left: 12px; right: 12px; background: rgba(0,0,0,.6); color: #ffd400; border-radius: 10px; padding: 8px 10px; font-weight: 800; pointer-events: none; }
.player-card { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: #14161c; color: #fff; font-size: clamp(18px, 3vw, 36px); font-weight: 900; }
.player-kind { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 4px 8px; border-radius: 8px; pointer-events: none; }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.6); padding: 20px; text-align: center; }
.player-loading.error { color: #ffb4b4; }
.player-bar { display: flex; align-items: center; gap: 10px; }
.player-progress { position: relative; flex: 1; height: 14px; border-radius: 7px; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.player-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); opacity: .85; width: 0; pointer-events: none; }
.player-mark { position: absolute; top: 10px; bottom: 0; opacity: .8; }
.player-mark.k-source { background: transparent; } .player-mark.k-replay { background: var(--accent); } .player-mark.k-slowmo { background: #16a34a; } .player-mark.k-card { background: #6b7280; }
.player-chapter { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
.player-time { font-variant-numeric: tabular-nums; font-size: .85rem; min-width: 100px; text-align: right; }
.player-host { min-height: 200px; }
.library-grid .clip-preview { display: grid; place-items: center; }
.library-play { font-size: 2.4rem; color: #fff; text-shadow: 0 2px 10px #000; opacity: .85; }
.library-card .btn-ghost.active { color: var(--warn); }
.transcript-panel textarea { width: 100%; font-family: inherit; }
.preview-inline { margin: 12px 0; }

/* ---- 유튜브 최적화 · 썸네일 편집기 ---- */
.seo-best { font-size: 1.2rem; font-weight: 900; margin-top: 6px; }
.seo-title { padding: 8px 6px; border-bottom: 1px dashed var(--border); cursor: pointer; } .seo-title:hover { background: var(--primary-soft); border-radius: 8px; }
.thumb-editor { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.thumb-preview { background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; } .thumb-preview img { width: 100%; max-height: 60vh; object-fit: contain; }
/* 썸네일·제목·태그 리믹스: 입력 모드 탭 · 선택된 제목 */
.mr-tabs .btn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); } .seo-title.active { background: var(--primary-soft); border-radius: 8px; }
.thumb-cands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.thumb-cand { border: 2px solid var(--border); border-radius: 10px; padding: 4px; cursor: pointer; text-align: center; } .thumb-cand.active { border-color: var(--primary); background: var(--primary-soft); }
.thumb-cand img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; }
.thumb-cand-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--surface-2); border-radius: 6px; color: var(--muted); }
.thumb-capture-box video { border-radius: 10px; background: #000; max-height: 60vh; }
.player-cta { display: grid; place-items: center; gap: 14px; }
.player-cta .cta-btn { background: #ff0033; color: #fff; padding: 10px 26px; border-radius: 999px; font-size: .55em; font-weight: 900; box-shadow: 0 6px 20px rgba(255,0,51,.35); }
.player-cta .cta-icons { font-size: .5em; opacity: .9; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.voice-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; } .voice-card.active { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 1000px) { .thumb-editor { grid-template-columns: 1fr; } }

/* 미리보기: 원본 박힌 자막 영역(하단) 잘라내기 */
.player-media.cropped video, .player-media.cropped iframe { height: calc(100% / (1 - var(--crop, 0))); top: 0; object-fit: cover; }
.player-blur { position: absolute; left: 0; right: 0; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(0, 0, 0, .45); pointer-events: none; }

/* ---- 플랫폼 공통: 접근성 · 로딩/빈/오류 상태 · 검색 · 오프라인 · 자동 저장 ---- */
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.global-search { flex: 0 1 320px; min-width: 0; }
.global-search input { padding: 7px 12px; border-radius: 999px; font-size: .9rem; }
.skeleton-card { position: relative; overflow: hidden; }
.skeleton-line { height: 12px; border-radius: 6px; background: var(--surface-2); margin: 10px 0; position: relative; overflow: hidden; }
.skeleton-line::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.empty-state { text-align: center; padding: 40px 20px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.empty-state .empty-icon, .error-screen .empty-icon { font-size: 2.4rem; margin-bottom: 8px; }
.error-screen { text-align: center; max-width: 560px; margin: 24px auto; }
.error-screen code { display: inline-block; max-width: 100%; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); padding: 4px 8px; border-radius: 6px; font-size: .8rem; }
.ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; font-weight: 800; font-size: .85rem; }
.ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; }
.offline-bar { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 75; background: var(--warn); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.autosave-status { font-weight: 600; }
.autosave-status.saving { color: var(--warn); } .autosave-status.saved { color: var(--success); } .autosave-status.failed { color: var(--danger); } .autosave-status.dirty { color: var(--muted); } .autosave-status.offline { color: var(--warn); }
.search-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.search-row .ico { font-size: 1.3rem; width: 28px; text-align: center; }
.search-row:hover { background: var(--surface-2); border-radius: 8px; }
.project-card .project-title { color: var(--text); display: block; margin: 6px 0 2px; }
.project-card .btn-ghost.active { color: var(--warn); }
.job-row { margin-bottom: 10px; padding: 14px 16px; }
.media-table td { vertical-align: middle; }
.wave-wrap { overflow-x: auto; touch-action: pan-x; border-radius: 10px; }
.wave-wrap .waveform { min-width: 100%; }
.editor-tools .btn { white-space: nowrap; }
.kbd { white-space: nowrap; }
.chip[role="button"] { user-select: none; }
.standalone .topbar { padding-top: max(10px, env(safe-area-inset-top)); }

/* 플레이어 확장 컨트롤: 속도 · 프레임 · 볼륨 · 반복 · A-B · 전체화면 */
.player-bar { flex-wrap: wrap; }
.player-bar .btn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.player-speed { width: auto; padding: 4px 6px; font-size: .8rem; border-radius: 8px; }
.player-volume { width: 70px; padding: 0; height: 24px; accent-color: var(--primary); }
.player-ab { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--warn) 35%, transparent); pointer-events: none; }
.player-fs .player-stage, .player-fake-fs .player-stage { max-height: none; }
.player-stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.player-stage:fullscreen .player-media video, .player-stage:fullscreen .player-media iframe { object-fit: contain; }
.player-fake-fs { position: fixed; inset: 0; z-index: 90; background: #000; padding: 12px; }
.player-fake-fs .player-stage { height: calc(100vh - 80px); max-height: none; aspect-ratio: auto; width: 100%; }

/* 애니메이션 줄이기 (설정 또는 OS) */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } .marquee-track { animation: none; } }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
body.reduce-motion .marquee-track { animation: none; }

/* 모바일 · 태블릿: 가로 스크롤 없음, 터치 영역 ≥ 44px, 세로 모드 편집 */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas, iframe { max-width: 100%; }
@media (max-width: 900px) { .global-search { flex-basis: 180px; } .thumb-cands { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .global-search { display: none; }
  .topbar { padding: 8px 12px; gap: 6px; } .topbar-actions { gap: 2px; } #platform-badge, #feedback-btn { display: none; }
  .view { padding: 14px 12px 40px; }
  .card { padding: 14px; }
  .row { gap: 8px; }
  .btn, .icon-btn, .tab, .chip, select, input:not([type=range]):not([type=checkbox]):not([type=color]) { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .seg-row { grid-template-columns: 1fr 1fr; grid-template-areas: 'start end' 'text text' 'actions actions'; gap: 6px; padding: 10px 0; }
  .seg-row input[data-f="start"] { grid-area: start; } .seg-row input[data-f="end"] { grid-area: end; } .seg-row input[data-f="text"] { grid-area: text; font-size: 1rem; } .seg-row > .row { grid-area: actions; justify-content: flex-end; }
  .seg-row input { padding: 10px; font-size: 16px; } /* iOS 자동 확대 방지 */
  .editor-split .sticky { position: static; }
  .subtitle-preview { max-height: 300px; }
  .player-bar { gap: 6px; } .player-time { min-width: 80px; font-size: .75rem; } .player-volume { display: none; } .player-speed { font-size: .75rem; }
  .player.r-9-16 .player-stage, .player.r-1-1 .player-stage, .player.r-4-5 .player-stage { width: 100%; max-height: 62vh; }
  .modal { padding: 8px; } .modal-box { padding: 16px; max-height: 94vh; }
  .drawer, .drawer-wide { width: 100vw; }
  .table { font-size: .82rem; } .table th, .table td { padding: 8px 6px; }
  .tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
  .toggle-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; } .input-row input[type=file] { max-width: none !important; }
  .hero { padding: 24px 0 12px; } .hero h1 { font-size: 1.6rem; } .section { margin: 32px 0; }
  .toast-root { width: calc(100vw - 24px); } .toast { text-align: center; }
  .offline-bar { bottom: 12px; width: calc(100vw - 24px); text-align: center; }
  .thumb-cands { grid-template-columns: repeat(2, 1fr); } .voice-grid { grid-template-columns: 1fr; }
  .split { gap: 12px; }
  .grid { gap: 10px; }
  h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; }
}
@media (max-width: 430px) {
  .view { padding: 12px 10px 36px; }
  .card { padding: 12px; border-radius: 12px; }
  .btn-lg { padding: 12px 16px; font-size: 1rem; }
  .row-between > .row { width: 100%; }
  .pricing-card .price { font-size: 1.5rem; }
  .player-bar .player-step { display: none; }
}
/* 큰 터치 영역 (설정에서 켬, 기본 켬) */
@media (pointer: coarse) { body.touch-lg .seg-row .btn-sm { min-width: 44px; } body.touch-lg .waveform { height: 150px; } body.touch-lg .player-progress { height: 22px; border-radius: 11px; } }
