:root {
  --bg: #FBF8F3; --paper: #FFFFFF; --ink: #141414; --ink2: #4A4744; --mute: #8C8782;
  --line: #E7E1D8; --mg: #E5006E; --mg-soft: #FCE6F0; --mg-bg: #FFF7FA; --ok: #1F7A4D;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body { color: var(--ink); font-family: "Pretendard", system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-size: 15px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
.num { font-family: "Montserrat", "Pretendard", sans-serif; }
.hidden { display: none !important; }

/* 브랜드 */
.brand { font-weight: 900; letter-spacing: -0.04em; font-size: 26px; white-space: nowrap; }
.brand .by { font-weight: 600; color: var(--mute); letter-spacing: -0.01em; font-size: 13px; margin-left: 6px; }

/* 버튼·칩 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 15px; border: 2px solid var(--ink); background: var(--paper); white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--mg); border-color: var(--mg); color: #fff; }
.btn.primary:hover { filter: brightness(.95); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-width: 1.5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line); color: var(--ink2); background: var(--paper); white-space: nowrap; }
.chip:hover { border-color: var(--ink2); }
.chip.on { border-color: var(--mg); color: var(--mg); background: var(--mg-soft); }
.link { font-size: 13px; font-weight: 700; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.link.mg { color: var(--mg); text-decoration: none; }
.play { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--paper); }
.play::after { content: ""; border-left: 10px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.play.mg { border-color: var(--mg); }
.play.mg::after { border-left-color: var(--mg); }
.play.playing::after { border: 0; width: 10px; height: 12px; margin: 0; border-left: 3px solid var(--mg); border-right: 3px solid var(--mg); }
.play:disabled { opacity: .3; cursor: not-allowed; }
.input, .textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); padding: 0 14px; height: 44px; outline: none; }
.textarea { padding: 12px 14px; height: auto; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus { border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 6px; background: #F1EDE6; color: var(--ink2); white-space: nowrap; }
.tag.r1 { background: var(--ink); color: #fff; }
.tag.r2 { background: var(--mg); color: #fff; }
.tag.r3 { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tag.r4 { background: #fff; color: var(--mg); box-shadow: inset 0 0 0 1.5px var(--mg); }
.muted { color: var(--mute); }
.err { color: var(--mg); font-weight: 600; }

/* 상단 바 */
.top { height: 68px; background: var(--paper); border-bottom: 1.5px solid var(--line); display: flex; align-items: center; padding: 0 32px; gap: 20px; position: sticky; top: 0; z-index: 20; }
.tabs { display: flex; gap: 4px; margin-left: 20px; }
.tabs button { font-size: 15px; font-weight: 700; color: var(--mute); padding: 8px 14px; border-radius: 8px; }
.tabs button.on { color: var(--ink); background: var(--bg); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; margin-right: 6px; }
.dot.on { background: var(--mg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--line); object-fit: cover; }

/* 2단 작업대 */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; padding: 28px 32px 60px; max-width: 1480px; margin: 0 auto; }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; }
.ed-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1.5px solid var(--line); flex-wrap: wrap; }
.ed-head h2 { font-size: 20px; font-weight: 800; }
.ed-head .meta { font-size: 13.5px; color: var(--mute); font-weight: 600; }
.ed-head .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 56px 24px; text-align: center; }
.empty h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.empty p { color: var(--ink2); margin: 10px 0 22px; line-height: 1.6; }

.blk { display: grid; grid-template-columns: 104px minmax(0, 1fr) 150px; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); align-items: start; }
.blk.err { background: var(--mg-bg); box-shadow: inset 4px 0 0 var(--mg); }
.blk.sel { background: var(--mg-bg); }
.blk .who { padding-top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.blk .who .no { font-size: 12px; color: var(--mute); font-weight: 700; }
.blk .tagbtn { position: relative; }
.blk .txt { width: 100%; border: 0; outline: none; resize: none; font-size: 16.5px; line-height: 1.6; font-weight: 500; background: transparent; padding: 4px 0; overflow: hidden; }
.blk .read { margin-top: 8px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.blk .read b { color: var(--mg); white-space: nowrap; padding-top: 3px; }
.blk .read textarea { flex: 1; border: 0; background: transparent; outline: none; resize: none; font-size: 14px; line-height: 1.55; overflow: hidden; }
.blk .sub-tools { display: flex; gap: 12px; margin-top: 6px; }
.blk .act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 2px; }
.blk .act .row { display: flex; gap: 10px; align-items: center; }
.blk .act small { font-size: 13px; color: var(--mute); font-weight: 600; }
.blk .state { font-size: 12.5px; font-weight: 700; color: var(--mute); }
.blk .state.done { color: var(--ok); }
.blk .msg { font-size: 12.5px; margin-top: 6px; }
.add-row { padding: 16px 22px; display: flex; gap: 16px; }

/* 오른쪽 */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; align-self: start; }
.side .panel { padding: 20px; }
.side h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.v { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.v:first-of-type { border-top: 0; padding-top: 2px; }
.v .info { min-width: 0; flex: 1; }
.v b { font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v span.s { font-size: 12.5px; color: var(--mute); }
.v .pick { font-size: 12.5px; font-weight: 800; color: var(--mg); white-space: nowrap; }
.seg { display: flex; gap: 8px; margin-bottom: 16px; }
.seg .chip { height: 36px; flex: 1; font-size: 14px; }
.lab { font-size: 13px; font-weight: 700; color: var(--mute); display: flex; justify-content: space-between; margin-bottom: 10px; }
.lab .num { color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--ink); }
.hint { font-size: 12.5px; color: var(--mute); margin-top: 6px; line-height: 1.5; }
.go { border: 2.5px solid var(--ink) !important; }
.go .cost { font-size: 13px; color: var(--mute); font-weight: 700; }
.go .big { font-size: 30px; font-weight: 800; margin: 2px 0 2px; }
.go .sub { font-size: 12.5px; color: var(--mute); margin-bottom: 14px; }
.go .btn { width: 100%; }
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.dl .btn { height: 42px; font-size: 13.5px; border-width: 1.5px; padding: 0 8px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 12px 0 2px; }
.progress i { display: block; height: 100%; background: var(--mg); width: 0; transition: width .2s; }
.final { margin-top: 14px; }
.final audio { width: 100%; }

/* 모달 */
.modal { position: fixed; inset: 0; background: rgba(20,20,20,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; }
.sheet { background: var(--paper); border-radius: 18px; width: 720px; max-width: 100%; max-height: 86vh; display: flex; flex-direction: column; border: 2px solid var(--ink); }
.sheet header { padding: 20px 24px; border-bottom: 1.5px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sheet header h3 { font-size: 19px; font-weight: 800; }
.sheet header .x { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--mute); }
.sheet .body { padding: 20px 24px; overflow: auto; }
.sheet footer { padding: 16px 24px; border-top: 1.5px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.vlist .v { padding: 12px 0; }
.vlist .v .pick { font-size: 13px; }
.cover { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--bg); flex: none; }
.star { font-size: 20px; color: var(--line); padding: 0 4px; }
.star.on { color: var(--mg); }

/* 로그인·대기 화면 */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate .card { width: 480px; max-width: 100%; text-align: left; }
.gate h1 { font-size: 52px; line-height: 1.05; }
.gate .rule { border-top: 4px solid var(--ink); margin: 22px 0 24px; }
.gate p { font-size: 16px; color: var(--ink2); line-height: 1.7; margin-bottom: 22px; }
.gate .mail { font-size: 17px; font-weight: 800; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* 키 설정 */
.keybox { display: flex; gap: 8px; }
.keybox .input { font-family: "Montserrat", monospace; font-size: 13.5px; }

/* 관리자 */
.admin { max-width: 960px; margin: 0 auto; padding: 32px; display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 24px; }
.admin .panel { padding: 22px; }
.admin h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.arow { display: grid; grid-template-columns: minmax(0,1fr) 120px 110px 60px; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.arow:first-child { border-top: 0; }
.arow .e { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

/* 보관함 */
.lib { max-width: 960px; margin: 0 auto; padding: 32px; }
.lib .panel { padding: 22px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 60; font-size: 14px; }

@media (max-width: 1080px) {
  .main { grid-template-columns: 1fr; }
  .side { position: static; }
  .admin { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; height: auto; flex-wrap: wrap; gap: 8px 12px; }
  .top .brand { font-size: 22px; }
  .top .right { gap: 10px; font-size: 12.5px; }
  .tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .tabs button { font-size: 14px; padding: 6px 10px; white-space: nowrap; }
  #key-status .num, #key-status { white-space: nowrap; }
  .gate h1 { font-size: 40px !important; }
  .blk .act { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .arow { grid-template-columns: minmax(0,1fr) 60px; }
  .arow > :nth-child(2), .arow > :nth-child(3) { display: none; }
  .main { padding: 16px; }
  .blk { grid-template-columns: 1fr; }
  .blk .act { align-items: flex-start; }
}

/* 프로젝트 제목·목록 */
.title-in { font: inherit; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); border: 1.5px solid transparent; background: transparent; border-radius: 10px; padding: 4px 8px; margin-left: -8px; min-width: 0; flex: 0 1 380px; }
.title-in::placeholder { color: var(--mute); font-weight: 700; }
.title-in:hover { border-color: var(--line); }
.title-in:focus { outline: none; border-color: var(--mg); background: var(--paper); }
.pj .info b { white-space: normal; }
.pj.cur b { color: var(--mg); }
.tag-cur { display: inline-block; font-size: 11px; font-weight: 800; color: var(--mg); border: 1.5px solid var(--mg); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }
@media (max-width: 640px) { .title-in { flex-basis: 100%; font-size: 18px; } }

/* 문단별 버전 */
.blk .takes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.blk .takes .lab2 { font-size: 12.5px; font-weight: 800; color: var(--ink2); margin-right: 2px; }
.blk .tk { display: inline-flex; align-items: center; height: 30px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); padding: 0 10px 0 4px; gap: 4px; }
.blk .tk.on { border-color: var(--mg); background: var(--mg-soft); }
.blk .tk .tks { font-size: 12.5px; font-weight: 700; color: var(--ink2); background: none; border: 0; cursor: pointer; padding: 0; }
.blk .tk.on .tks { color: var(--mg); }
.blk .tk .tkp { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; position: relative; flex: none; }
.blk .tk .tkp::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.blk .tk .tkp.playing::after { left: 7px; top: 7px; width: 8px; height: 8px; border: 0; background: #fff; }
.blk .tk.on .tkp { background: var(--mg); }
.blk .takes .hint { flex-basis: 100%; font-size: 12px; }
.blk .tk { padding-right: 4px; }
.blk .tk .tkx { width: 20px; height: 20px; border: 0; background: none; color: var(--mute); font-size: 16px; line-height: 1; cursor: pointer; border-radius: 50%; margin-left: 2px; }
.blk .tk .tkx:hover { color: var(--mg); background: var(--mg-bg); }

/* 내 목소리 만들기 */
.mine-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--mg); border-radius: 12px; background: var(--mg-bg); margin-bottom: 6px; font-size: 13.5px; color: var(--ink2); }
.mine-bar .btn { margin-left: auto; }
.step { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-top: 22px; }
.step:first-child { margin-top: 0; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-family: "Montserrat", sans-serif; }
.script { background: var(--bg); border-radius: 12px; padding: 16px 18px; font-size: 16px; line-height: 1.85; white-space: pre-wrap; max-height: 280px; overflow: auto; color: var(--ink); }
.rec { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.rec-t { font-size: 15px; font-weight: 700; min-width: 44px; }
.rec.on .rec-t { color: var(--mg); }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 600; margin-top: 10px; line-height: 1.5; cursor: pointer; }
.chk input { margin-top: 3px; accent-color: var(--mg); }
.chk .muted { font-weight: 500; }
.tips { margin: 22px 0 0; padding: 14px 16px 14px 32px; border-top: 1.5px solid var(--line); font-size: 13px; color: var(--ink2); line-height: 1.65; }
.tips li { margin-bottom: 4px; }
@media (max-width: 640px) { .mine-bar { flex-direction: column; align-items: stretch; } .mine-bar .btn { margin-left: 0; } }

/* 배역 색 5~8, 배역 편집 */
.tag.r5 { background: var(--mg-soft); color: var(--mg); }
.tag.r6 { background: #E9E4DC; color: var(--ink); }
.tag.r7 { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 999px; }
.tag.r8 { background: #fff; color: var(--mg); box-shadow: inset 0 0 0 1.5px var(--mg); border-radius: 999px; }
.role-edit, .role-rm { gap: 8px; }
.role-in { height: 38px; flex: 1; font-weight: 700; }
.role-rm .info b { white-space: normal; }
.role-rm .rm-to { font: inherit; font-weight: 700; border: 1.5px solid var(--line); border-radius: 8px; padding: 2px 6px; background: var(--paper); }
.roles-check { margin-top: 16px; padding: 14px 16px; border: 1.5px solid var(--mg); border-radius: 12px; background: var(--mg-bg); font-size: 13.5px; line-height: 1.6; }
.roles-check .rc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.roles-check .rc { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.roles-check .rc input { accent-color: var(--mg); width: 16px; height: 16px; }
.roles-check .rc-s { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* 클립 선택 · 전체 듣기 */
.blk .selb { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.blk .selb input, .selall input { accent-color: var(--mg); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.selall { gap: 6px; cursor: pointer; }
.blk.now { background: var(--mg-bg); box-shadow: inset 4px 0 0 var(--mg); }
.seq { display: flex; align-items: center; gap: 10px; }
.seq-btn { font-size: 12.5px; font-weight: 700; color: var(--ink2); border: 1.5px solid var(--line); border-radius: 999px; height: 32px; padding: 0 12px; background: var(--paper); cursor: pointer; }
.seq-btn:hover { border-color: var(--ink2); }
.seq-play { width: 44px; height: 44px; flex: none; }
.seq-info { display: flex; flex-direction: column; margin-left: auto; text-align: right; min-width: 0; }
.seq-info b { font-size: 13px; }
.seq-info span { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.seq-bar { height: 4px; background: var(--line); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.seq-bar i { display: block; height: 100%; width: 0; background: var(--mg); transition: width .2s linear; }

/* 오른쪽 패널: 따로 스크롤 + 전체 듣기는 패널 아래에 고정 */
.side { max-height: calc(100vh - 92px - 16px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 2px; }
.playerbar { position: sticky; bottom: 0; z-index: 5; margin: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 14px 18px 16px; box-shadow: 0 -10px 20px rgba(251,248,243,.95); }
.playerbar .pb-txt { font-size: 14px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playerbar .seq-bar { margin-top: 12px; }
@media (max-width: 1080px) {
  .side { max-height: none; overflow: visible; }
  .playerbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-radius: 0; border-width: 2px 0 0; padding: 10px 16px 12px; box-shadow: 0 -6px 24px rgba(20,20,20,.06); }
  body.has-pb #app:not(.not-work) { padding-bottom: 110px; }
  body.has-pb .toast { bottom: 120px; }
}
#app.not-work .playerbar { display: none; }

/* 전체 선택 줄 · 검정 전체 듣기 카드 */
.ed-sub { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-sub .tools { margin-left: auto; }
.playerbar { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 -10px 20px rgba(251,248,243,.95); }
.playerbar .pb-txt b { color: #fff; }
.playerbar .hint { color: #B9B3AC; }
.playerbar .seq-info b { color: #fff; }
.playerbar .seq-info span { color: #B9B3AC; }
.playerbar .seq-btn { background: transparent; color: #fff; border-color: #4A4744; }
.playerbar .seq-btn:hover { border-color: #fff; }
.playerbar .seq-play { background: var(--mg); border-color: var(--mg); }
.playerbar .seq-play::after { border-left-color: #fff; }
.playerbar .seq-play.playing::after { border-left-color: #fff; border-right-color: #fff; }
.playerbar .seq-bar { background: #3A3836; }
@media (max-width: 1080px) { .playerbar { border-color: var(--ink); } }

/* 구글 로그인 버튼 (툴 디자인) */
.gwrap { position: relative; width: 360px; max-width: 100%; height: 54px; }
.gbtn-c { position: absolute; inset: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; font: inherit; font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; pointer-events: none; transition: background .15s, box-shadow .15s; }
.gwrap:hover .gbtn-c { background: var(--ink); color: #fff; }
.gwrap:hover .gbtn-c svg { background: #fff; border-radius: 50%; padding: 3px; box-sizing: content-box; margin: -3px; }
.gwrap:active .gbtn-c { transform: translateY(1px); }
#gbtn { position: absolute; inset: 0; opacity: 0.01; overflow: hidden; display: flex; align-items: center; justify-content: flex-start; }
#gbtn > div { transform: scaleY(1.4); transform-origin: center; }
.gen-sel { width: 100%; margin-top: 8px; border-color: var(--mg); color: var(--mg); background: var(--mg-bg); }
.gen-sel:hover { background: var(--mg-soft); }

/* 감정·연출 지시 버튼 */
.blk .dirs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.blk .dir { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.blk .dir:hover { border-color: var(--mg); color: var(--mg); }
.blk .dir.mine { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 0; border-color: var(--mg-soft); background: var(--mg-bg); }
.blk .dir.mine > button:first-child { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--mg); background: none; border: 0; padding: 3px 4px 3px 10px; cursor: pointer; }
.blk .dir.mine .x { border: 0; background: none; color: var(--mute); font-size: 14px; cursor: pointer; padding: 0 4px; }
.blk .dir.add { border-style: dashed; color: var(--mute); }
.blk .dir-new { display: inline-flex; gap: 6px; }
.blk .dir-in { font: inherit; font-size: 12.5px; border: 1.5px solid var(--mg); border-radius: 999px; padding: 3px 10px; outline: none; width: 130px; }
.playerbar .seq-bar { cursor: pointer; height: 6px; }
.playerbar .seq { gap: 8px; }
.playerbar .seq-btn { padding: 0 10px; }


/* ===== 시안 A ===== */
:root { --bg: #E4E1D8; --line: #D6D0C5; --sel: #FFD400; --sel-ink: #141414; --go: #1FC29A; --go-ink: #141414; }
.top { border-bottom: 2px solid var(--ink); }
.tabs button.on { background: var(--ink); color: #fff; }
.panel { border: 2px solid var(--ink) !important; border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.side { padding: 0 6px 6px 0; }
.lbl { display: inline-block; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; padding: 5px 11px; border-radius: 8px; letter-spacing: -0.01em; }
.side h3 { justify-content: flex-start; gap: 8px; margin-bottom: 14px; }
.go .cost { margin-bottom: 8px; }
.tipi { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); font: italic 800 11px/1 Georgia, serif; color: var(--ink); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tipi:hover::after, .tipi:focus::after { content: attr(data-tip); position: absolute; left: 50%; top: 26px; transform: translateX(-50%); width: 230px; background: var(--ink); color: #fff; font: 600 12.5px/1.55 Pretendard, sans-serif; padding: 10px 12px; border-radius: 10px; z-index: 30; text-align: left; white-space: normal; }
.lab { align-items: center; gap: 6px; color: var(--ink); font-size: 14px; }
.seg { gap: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.seg .chip { height: 44px; border: 0; border-radius: 0; border-right: 2px solid var(--ink); font-size: 14.5px; font-weight: 800; color: var(--ink); background: #fff; }
.seg .chip:last-child { border-right: 0; }
.seg .chip.on { background: var(--sel); color: var(--sel-ink); }
#model-seg .chip.on::before { content: "✓"; margin-right: 6px; font-weight: 900; }
.seg2 { margin-bottom: 10px; }
.seg2 .chip { height: 40px; font-family: Montserrat, Pretendard, sans-serif; }
.btn { border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { box-shadow: none; }
#gen-all { background: var(--go); color: var(--go-ink); border-color: var(--ink); height: 54px; font-size: 16.5px; font-weight: 800; }
.gen-sel { border-color: var(--ink); color: var(--ink); background: #fff; }
.dl .btn { border-width: 2px; }
.chip { border-color: #CFC8BC; color: var(--ink); }
.ed-head { border-bottom: 2px solid var(--ink); }
.blk { border-bottom: 1.5px solid var(--line); }
.notice { max-width: 1480px; margin: 18px auto -6px; padding: 0 32px; }
.notice:not(.hidden) { display: block; }
.notice { font-size: 14px; }
.notice > * { vertical-align: middle; }
#notice { color: #fff; }
#notice:not(.hidden) { background: transparent; }
#notice b { display: inline-block; border: 2px solid #fff; border-radius: 999px; padding: 2px 10px; margin-right: 10px; font-size: 13px; }
#notice { position: relative; }
#notice::before { content: ""; position: absolute; inset: 0 32px; background: var(--ink); border-radius: 12px; z-index: -1; }
#notice { z-index: 0; padding-top: 14px; padding-bottom: 14px; padding-left: 52px; }
#notice b { color: var(--sel) ; border-color: var(--sel); }
.nbtn { margin-left: 10px; background: var(--sel); color: var(--sel-ink); font-weight: 800; border-radius: 8px; padding: 5px 12px; font-size: 13px; }
.tk-more { font-size: 12.5px; font-weight: 800; color: var(--ink); border: 1.5px dashed var(--ink); border-radius: 999px; padding: 3px 12px; }
.selb input, .selall input { accent-color: var(--mg); }

/* 배역 태그: 섹션 라벨(검정 박스)과 겹치지 않게 흰 바탕 + 색 테두리의 둥근 모양 */
.tag { border-radius: 999px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); padding: 4px 11px; }
.tag.r1 { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.tag.r2 { background: #fff; color: var(--mg); box-shadow: inset 0 0 0 2px var(--mg); }
.tag.r3 { background: #FFF3B8; color: var(--ink); box-shadow: inset 0 0 0 2px #E8BE00; }
.tag.r4 { background: #DDF6EE; color: #0E7A5F; box-shadow: inset 0 0 0 2px #1FC29A; }
.tag.r5 { background: var(--mg-soft); color: var(--mg); box-shadow: inset 0 0 0 2px var(--mg-soft); }
.tag.r6 { background: #EDE9E2; color: var(--ink); box-shadow: inset 0 0 0 2px #EDE9E2; }
.tag.r7 { background: #fff; color: var(--ink); box-shadow: none; border: 2px dashed var(--ink); }
.tag.r8 { background: #fff; color: var(--mg); box-shadow: none; border: 2px dashed var(--mg); }
.tag.r1 { background: #4A4744; color: #fff; box-shadow: inset 0 0 0 2px #4A4744; }
.tag.rn { background: #4A4744; color: #fff; box-shadow: inset 0 0 0 2px #4A4744; }
.tag.r1 { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

/* ===== 시안 A: 팝업 ===== */
.modal { background: rgba(20,20,20,.55); }
.sheet { border: 2px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.sheet header { background: var(--ink); color: #fff; border-bottom: 0; padding: 16px 22px; }
.sheet header h3 { color: #fff; }
.sheet header .x { color: #fff; width: 32px; height: 32px; border: 2px solid #fff; border-radius: 8px; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.sheet footer { border-top: 2px solid var(--ink); }
.sheet .input { border: 2px solid var(--ink); }
.filters { align-items: center; }
.mvseg { display: inline-flex; margin: 0; }
.mvseg .chip { height: 40px; padding: 0 16px; font-size: 14px; }
.mvseg .chip.on::before { content: "✓"; margin-right: 5px; font-weight: 900; }
.lbl.sm { font-size: 12.5px; padding: 4px 9px; border-radius: 7px; }
#mv-lic { height: 40px; border: 2px solid var(--ink); border-radius: 10px; font-weight: 800; padding: 0 14px; background: #fff; color: var(--ink); }
#mv-lic::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; margin-right: 8px; background: #fff; }
#mv-lic.on { background: var(--go); color: var(--ink); }
#mv-lic.on::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; }
.vlist .v { border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.vlist .v:first-of-type { padding-top: 12px; }
.vlist .v:hover { box-shadow: 3px 3px 0 var(--ink); }
.vlist .v .pick { border: 2px solid var(--ink); border-radius: 9px; padding: 8px 14px; background: #fff; color: var(--ink); font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.vlist .v .pick:hover { background: var(--sel); }
.vlist .v .play.mg { border-color: var(--ink); }
.vlist .v .play.mg::after { border-left-color: var(--ink); }
.mine-bar { border: 2px dashed var(--ink); background: #FFF8D6; color: var(--ink); }
.step { font-size: 15.5px; }
.step i { width: 26px; height: 26px; border-radius: 7px; background: var(--sel); color: var(--ink); border: 2px solid var(--ink); font-size: 13px; font-weight: 900; }
.script { border: 2px solid var(--ink) !important; border-radius: 12px !important; }
#cl-kinds { gap: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; display: inline-flex; }
#cl-kinds .chip { height: 40px; border: 0; border-radius: 0; border-right: 2px solid var(--ink); font-weight: 800; padding: 0 16px; }
#cl-kinds .chip:last-child { border-right: 0; }
#cl-kinds .chip.on { background: var(--sel); color: var(--ink); }
#cl-go { background: var(--go); color: var(--ink); border-color: var(--ink); }
.tips { border-top: 2px dashed var(--line); }

/* ===== 사용 안내 ===== */
.guide { display: grid; gap: 20px; }
.guide h3 { margin-bottom: 14px; }
.glinks { display: flex; flex-wrap: wrap; gap: 10px; }
.glinks .btn { text-decoration: none; color: var(--ink); }
.gl { list-style: none; display: grid; gap: 10px; }
.gl li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.65; color: var(--ink); }
.gl li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; background: var(--ink); border-radius: 2px; }
.gtable { overflow-x: auto; margin-bottom: 16px; border: 2px solid var(--ink); border-radius: 12px; }
.gtable table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 480px; }
.gtable th { background: var(--ink); color: #fff; font-weight: 800; padding: 10px 12px; text-align: center; }
.gtable th:first-child, .gtable td:first-child { text-align: left; }
.gtable td { padding: 11px 12px; border-top: 1.5px solid var(--line); text-align: center; font-weight: 700; }
.gtable tbody tr:first-child td { background: #FFF8D6; }
.gtable small { display: block; font-size: 12px; color: var(--mute); font-weight: 600; }
.guide > .panel { min-width: 0; }
@media (max-width: 640px) { .guide { padding: 16px; } .guide h3 .lbl { white-space: normal; line-height: 1.4; } }
.gtable th, .gtable td { white-space: nowrap; }

/* 사용 안내 — 섹션별 컬러 카드 */
.ghero { background: var(--sel); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); padding: 22px 24px; }
.ghero h2 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.ghero p { font-size: 15px; font-weight: 600; }
.guide .panel { padding: 0 !important; overflow: hidden; }
.guide .panel > h3 { margin: 0; padding: 14px 22px; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.guide .panel > h3 small { font-size: 13px; font-weight: 700; opacity: .85; }
.guide .panel > :not(h3) { margin-left: 22px; margin-right: 22px; }
.guide .panel > :last-child { margin-bottom: 22px; }
.guide .panel > h3 + * { margin-top: 18px; }
.gk { width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.guide .panel:nth-of-type(3) > h3 { background: #fff; }
.guide .panel:nth-of-type(4) > h3 { background: #FFE45C; }
.guide .panel:nth-of-type(5) > h3 { background: var(--mg); color: #fff; }
.guide .panel:nth-of-type(6) > h3 { background: var(--go); }
.guide .panel:nth-of-type(4) .gl li::before { background: #E8BE00; border-radius: 50%; }
.guide .panel:nth-of-type(5) .gl li::before { background: var(--mg); border-radius: 50%; }
.guide .panel:nth-of-type(6) .gl li::before { background: var(--go); border-radius: 50%; }
.guide .panel:nth-of-type(5) .gl b { background: var(--mg-soft); padding: 0 3px; border-radius: 4px; }
.guide .panel:nth-of-type(4) .gl b { background: #FFF3B8; padding: 0 3px; border-radius: 4px; }
.guide .panel:nth-of-type(6) .gl b { background: #DDF6EE; padding: 0 3px; border-radius: 4px; }
.gtable th { background: #DDF6EE; color: var(--ink); border-bottom: 2px solid var(--ink); }
.gtable tbody tr:first-child td { background: #fff; }
.gtable td { font-size: 16px; }
.gtable td:not(:first-child) { color: #0E7A5F; font-weight: 900; }
.glinks .btn { background: #fff; }
.glinks .gcharge { background: var(--go); }
.ghero { background: var(--ink); color: #fff; }
.ghero h2, .ghero p { color: #fff; }
.guide .panel.gvs > h3 { background: var(--sel); }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.vcol { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #F4F1EA; }
.vcol.best { background: #fff; box-shadow: 4px 4px 0 var(--go); border-color: var(--ink); }
.vhead { padding: 11px 14px; font-weight: 900; font-size: 16px; border-bottom: 2px solid var(--ink); background: #E9E4DA; display: flex; align-items: center; gap: 8px; }
.vcol.best .vhead { background: var(--go); }
.badge { font-size: 12px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 9px; }
.vcol ul { list-style: none; padding: 12px 14px; display: grid; gap: 8px; }
.vcol li { font-size: 14.5px; line-height: 1.55; padding-left: 16px; position: relative; }
.vcol li::before { content: "–"; position: absolute; left: 0; color: var(--mute); font-weight: 800; }
.vcol.best li::before { content: "✓"; color: #0E7A5F; }
.vsum { border: 2px dashed var(--ink); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; background: #FFFBEA; }
.vsum p { font-size: 14.5px; margin-bottom: 8px; }
.vbars { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; align-items: center; }
.vbars b { font-weight: 900; }
.vbars b.g { color: #0E7A5F; font-size: 18px; }
.guide .panel.gvs .gl li::before { background: #E8BE00; border-radius: 50%; }
.guide .panel.gvs .gl b { background: #FFF3B8; padding: 0 3px; border-radius: 4px; }
@media (max-width: 640px) { .vs { grid-template-columns: 1fr; } }
.vbars small { font-size: 12.5px; font-weight: 600; color: var(--mute); margin-left: 4px; }

/* 시안: 버전 색 = 만든 설정 (기본 노랑 / 감정 연기 초록), 사용 중 = 마젠타 굵은 테두리 */
.blk .tk.m-basic { background: #FFF3B8; border-color: #E8BE00; }
.blk .tk.m-drama { background: #D7F5EA; border-color: #1FC29A; }
.blk .tk .tkm { display: inline-block; font-size: 11px; font-weight: 900; padding: 1px 6px; border-radius: 999px; margin-right: 5px; color: #141414; }
.blk .tk.m-basic .tkm { background: #FFD400; }
.blk .tk.m-drama .tkm { background: #1FC29A; }
.blk .tk .tks { color: var(--ink); }
.blk .tk.on { border: 2.5px solid var(--mg); box-shadow: 2px 2px 0 var(--mg); }
.blk .tk.on.m-basic { background: #FFF3B8; } .blk .tk.on.m-drama { background: #D7F5EA; }
.blk .tk.on .tks { color: var(--ink); font-weight: 900; }
.blk .tk .tkp { background: var(--ink); }

/* 시안: 설정 색 = 버전 색 (기본 노랑 / 감정 연기 초록), 생성 버튼 = 마젠타 */
#model-seg .chip[data-model="s2.1-pro"].on { background: #FFD400; color: #141414; }
#model-seg .chip[data-model="drama-3"].on { background: #1FC29A; color: #141414; }
#gen-all { background: var(--mg); color: #fff; border-color: var(--ink); }
#gen-all:hover { background: #C8005F; }
#gen-all:disabled { background: #F5B3CF; color: #fff; opacity: 1; }
.gen-sel { border-color: var(--mg); color: var(--mg); background: #fff; }
.gen-sel:hover { background: var(--mg-bg); }

/* 시안: 클립 오른쪽 버튼을 눈에 띄게 */
.blk .act .link[data-a=regen] { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 9px; padding: 6px 11px; box-shadow: 2px 2px 0 var(--ink); }
.blk .act .link[data-a=regen]::before { content: "↻"; font-size: 15px; font-weight: 900; }
.blk .act .link[data-a=regen]:hover { background: var(--sel); }
.blk .act .link[data-a=del] { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 12.5px; font-weight: 700; color: #8C8782; background: #fff; border: 1.5px solid #CFC8BC; border-radius: 9px; padding: 5px 10px; }
.blk .act .link[data-a=del]::before { content: "✕"; font-size: 11px; }
.blk .act .link[data-a=del]:hover { color: #D7263D; border-color: #D7263D; background: #FFF1F2; }
@media (min-width: 1081px) { .blk { grid-template-columns: 104px minmax(0, 1fr) 176px; } }
.blk .act .link[data-a=regen], .blk .act .link[data-a=del] { white-space: nowrap; }

/* 시안: 프로젝트 머리 줄 */
.ed-head { padding: 20px 22px 18px; gap: 12px; }
.ed-head .hlbl { flex: none; }
.ed-head .title-in { flex: 1 1 260px; width: 0; min-width: 0; font-size: 22px; font-weight: 900; color: var(--ink); border: 0; border-bottom: 3px solid var(--ink); border-radius: 0; padding: 4px 2px 6px; background: transparent; outline: none; }
.ed-head .title-in::placeholder { color: #B9B2A6; font-weight: 800; }
.ed-head .title-in:focus { border-bottom-color: var(--mg); }
.ed-head .meta { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ed-head .meta b { font-size: 12.5px; font-weight: 800; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 10px; }
.ed-head .meta b.on { background: var(--ink); color: #fff; }
.ed-sub { margin-top: 4px; }
.ed-sub .chip { height: 38px; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); font-weight: 800; color: var(--ink); background: #fff; padding: 0 14px; }
.ed-sub .chip:active { transform: translate(2px,2px); box-shadow: none; }
.ed-sub #paste-open { background: var(--sel); }
.ed-sub .selall input { width: 17px; height: 17px; }
@media (max-width: 640px) { .ed-head .title-in { flex-basis: 100%; width: 100%; font-size: 19px; } .ed-head { padding: 16px; } }
/* 검정 띠 */
.ed-head { background: var(--ink); border-bottom: 3px solid var(--ink); border-radius: 12px 12px 0 0; }
.ed-head .hlbl { background: #fff; color: var(--ink); }
.ed-head .title-in { color: #fff; border-bottom-color: #fff; }
.ed-head .title-in::placeholder { color: #8C8782; }
.ed-head .meta b { background: transparent; color: #fff; border-color: #fff; }
.ed-head .meta b.on { background: #fff; color: var(--ink); }
.ed-sub .chip { box-shadow: none; border-color: #fff; }
.ed-sub #paste-open { background: var(--sel); border-color: var(--sel); }
