    :root {
      --bg: #0f1419; --panel: #1a222c; --line: #2c3846; --text: #eef3f8;
      --muted: #9aabbc; --accent: #3dcea7; --accent2: #f0a45d;
    }
    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0; font-family: Pretendard, system-ui, sans-serif; color: var(--text);
      background:
        radial-gradient(1100px 560px at 8% -8%, #1d3b36 0%, transparent 55%),
        radial-gradient(800px 420px at 100% 0%, #2a3340 0%, transparent 48%),
        var(--bg);
      height: 100vh; overflow: hidden; display: flex; flex-direction: row;
    }
    nav.sidebar {
      flex: 0 0 220px; width: 220px; display: flex; flex-direction: column; gap: 2px;
      padding: 18px 12px; border-right: 1px solid var(--line); background: #121820; overflow-y: auto;
    }
    nav.sidebar .brand { font-family: Syne, sans-serif; font-weight: 700; letter-spacing: -0.03em; padding: 6px 12px 16px; }
    nav.sidebar a {
      color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem;
      padding: 9px 12px; border-radius: 10px;
    }
    nav.sidebar a:hover { color: var(--text); background: #1c2836; }
    nav.sidebar a.on { color: var(--accent); background: #16352e; }
    .app { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
    header { flex: 0 0 auto; padding: 20px 28px 14px; border-bottom: 1px solid var(--line); }
    .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
    h1 { font-family: Syne, sans-serif; margin: 0 0 6px; font-size: clamp(1.7rem, 3.5vw, 2.2rem); letter-spacing: -0.03em; }
    .sub { color: var(--muted); margin: 0; font-size: .9rem; }
    .sub a { color: var(--accent); }
    [hidden] { display: none !important; }
    main { flex: 1; overflow: auto; padding: 18px 28px 40px; display: grid; gap: 16px; }
    section, .panel {
      background: color-mix(in srgb, var(--panel) 92%, transparent);
      border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
    }
    h2 { margin: 0 0 10px; font-size: 1.05rem; }
    .tts-person-label {
      margin: -4px 0 10px;
      font-size: .88rem;
      font-weight: 600;
      color: var(--accent);
    }
    .sync-story-heading {
      margin: -4px 0 12px;
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--accent);
      line-height: 1.35;
      word-break: keep-all;
    }
    .sync-story-heading.empty { color: var(--muted); font-weight: 500; font-size: .9rem; }
    .desc { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
    button, .btn {
      border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer;
      background: var(--accent); color: #06251c; margin: 0 6px 6px 0; font: inherit;
    }
    button.secondary, .btn.secondary { background: #2a3644; color: var(--text); }
    button.danger { background: #5a2a2a; color: #ffd4d4; }
    button:disabled { opacity: .5; cursor: not-allowed; }
    .actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
    .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
    .card {
      border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #151c24;
      display: grid; gap: 8px;
    }
    .card.pick { cursor: pointer; }
    .card.pick.on { outline: 2px solid var(--accent); }
    .card img, .card video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #0c1117; }
    body.sms-landscape .card img,
    body.sms-landscape .card video { aspect-ratio: 16/9; }
    .thumb-sm { width: 72px; height: 128px; object-fit: cover; border-radius: 8px; background: #0c1117; }
    body.sms-landscape .thumb-sm { width: 128px; height: 72px; }
    .meta { color: var(--muted); font-size: .82rem; }
    .badge {
      display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700;
      background: #243040; color: var(--muted); margin: 0 4px 4px 0;
    }
    .badge.on { background: #1a3d34; color: var(--accent); }
    .card-title-row {
      display: flex; align-items: flex-start; gap: 8px;
    }
    .card-title-row strong { flex: 1; min-width: 0; }
    .yt-icon {
      flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px;
      display: inline-grid; place-items: center;
      background: #ff0000; color: #fff;
      box-shadow: 0 0 0 1px color-mix(in srgb, #ff0000 40%, transparent);
    }
    .yt-icon svg { width: 14px; height: 14px; display: block; }
    .yt-reserve-badge {
      flex: 0 0 auto;
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: .72rem;
      font-weight: 700;
      background: #3d2418;
      color: #ff8a8a;
      border: 1px solid #ff0000;
      white-space: nowrap;
    }
    .yt-reserve-meta {
      color: #ff8a8a;
      font-size: .78rem;
      margin-top: 2px;
    }
    .yt-upload-panel {
      margin-top: 14px; padding: 14px 16px; border-radius: 14px;
      border: 1px solid var(--line); background: #151c24;
      display: grid; gap: 10px;
    }
    .yt-upload-panel[hidden] { display: none !important; }
    .yt-upload-panel h3 {
      margin: 0; font-size: .95rem; font-weight: 700; color: var(--text);
      display: flex; align-items: center; gap: 8px;
    }
    .yt-upload-row {
      display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
    }
    .yt-upload-row label.check {
      display: flex; gap: 8px; align-items: center; margin: 0;
      color: var(--text); font-weight: 600; font-size: .9rem; cursor: pointer;
    }
    .yt-upload-row label.check input { width: auto; margin: 0; }
    .yt-upload-status { font-size: .82rem; color: var(--muted); min-height: 1.2em; }
    .yt-upload-status.ok { color: var(--accent); }
    .yt-upload-status.warn { color: var(--accent2); }
    label.field { display: grid; gap: 4px; margin-bottom: 10px; font-size: .86rem; color: var(--muted); }
    input, select, textarea {
      width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
      background: #121820; color: var(--text); font: inherit;
    }
    input[type="checkbox"],
    input[type="radio"] {
      width: auto; flex: 0 0 auto; margin: 0; padding: 0; border-radius: 4px;
    }
    textarea { min-height: 88px; resize: vertical; }
    .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .row-tts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
    @media (max-width: 860px) { .row2 { grid-template-columns: 1fr; } }
    .stories-head {
      display: flex; justify-content: space-between; align-items: flex-start;
      gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
    }
    .stories-head h2 { margin: 0 0 6px; }
    .stories-head-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
    .stories-list-head {
      display: flex; justify-content: space-between; align-items: center;
      gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
    }
    .stories-list-head h2 { margin: 0; }
    .stories-list-filter { margin: 0; min-width: 160px; }
    .stories-list-check {
      display: flex; align-items: center; gap: 8px; margin: 0;
      color: var(--muted); font-size: .86rem; font-weight: 600;
      white-space: nowrap; cursor: pointer;
    }
    .stories-list-check input { width: auto; margin: 0; }
    .job-list-filters {
      display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
      margin: 0 0 14px;
    }
    .job-list-filters .field { margin: 0; min-width: 160px; }
    .job-card-tags {
      display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px;
    }
    .job-card-tags span {
      display: inline-block; padding: 1px 7px; border-radius: 999px;
      font-size: .72rem; font-weight: 700; background: #16352e; color: var(--accent);
    }
    .job-card-tags .topic-tag { background: #1a2a3d; color: #8ab4ff; }
    .steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
    .steps button { background: #243040; color: var(--muted); }
    .steps button.on { background: var(--accent); color: #06251c; }
    .log {
      font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem;
      background: #0c1117; border: 1px solid var(--line); border-radius: 12px;
      padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap;
      color: #b7c6d6;
    }
    .lines-edit { display: grid; gap: 6px; }
    .line-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: start; }
    .pager {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin: 12px 0 4px;
    }
    .pager button { padding: 8px 12px; font-size: .85rem; }
    .pager button.on { background: var(--accent); color: #06251c; }
    .pager .page-meta { color: var(--muted); font-size: .85rem; margin: 0 4px; }
    .modal-bg {
      position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 40; padding: 20px;
    }
    .modal {
      width: min(520px, 100%); background: var(--panel); border: 1px solid var(--line);
      border-radius: 16px; padding: 16px; max-height: 90vh; overflow: auto;
    }
    .modal.story-gen-modal {
      width: min(920px, 100%);
    }
    .st-workflow-steps {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 12px 0;
    }
    .st-workflow-steps button.on {
      border-color: var(--accent);
      color: var(--accent);
    }
    #st-workflow-result {
      width: 100%;
      min-height: 220px;
      font-family: ui-monospace, Menlo, Consolas, monospace;
      font-size: .82rem;
      line-height: 1.45;
    }
    .modal.chat-modal { width: min(920px, 100%); padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: min(88vh, 820px); }
    .modal.cover-preview-modal {
      width: min(380px, 100%);
      padding: 14px 16px 16px;
    }
    body.sms-landscape .modal.cover-preview-modal {
      width: min(720px, 100%);
    }
    .cover-preview-modal h2 { margin: 0 0 6px; font-size: 1.05rem; }
    .cover-preview-modal .cover-preview-meta {
      color: var(--muted); font-size: .82rem; margin: 0 0 12px;
    }
    .cover-preview-frame {
      width: 100%;
      aspect-ratio: 9/16;
      border-radius: 12px;
      overflow: hidden;
      background: #0c1117;
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
    }
    body.sms-landscape .cover-preview-frame {
      aspect-ratio: 16/9;
    }
    .cover-preview-frame img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }
    .cover-preview-frame .cover-preview-loading {
      color: var(--muted); font-size: .86rem; padding: 16px; text-align: center;
    }
    .sync-renders {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-top: 10px;
    }
    .sync-render-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px;
      background: rgba(255,255,255,.02);
    }
    .sync-render-card.current {
      border-color: var(--accent);
    }
    .sync-render-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      font-size: .82rem;
      color: var(--muted);
    }
    .sync-render-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .sync-render-actions .btn {
      padding: 4px 8px;
      font-size: .75rem;
    }
    .sync-render-card video {
      width: 100%;
      max-width: 280px;
      border-radius: 8px;
      display: block;
    }
    .chat-modal-head {
      padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
      display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    }
    .chat-modal-head h2 { margin: 0 0 4px; font-size: 1.05rem; }
    .story-chat-title-ja-field {
      display: grid; gap: 4px; margin: 8px 0 0;
      font-size: .82rem; color: var(--muted); font-weight: 600;
    }
    .story-chat-title-ja-row {
      display: flex; gap: 8px; align-items: center;
    }
    .story-chat-title-ja-row input {
      flex: 1; min-width: 0; font-size: .95rem;
    }
    .story-chat-title-ja-row button {
      flex: 0 0 auto; margin: 0; padding: 7px 12px; font-size: .82rem;
    }
    .story-chat-title-ja-status {
      font-size: .78rem; color: var(--muted); min-height: 1.1em;
    }
    .story-chat-title-ja-status.ok { color: var(--accent); }
    .chat-modal-head-main { flex: 1; min-width: 0; }
    .chat-modal-head-actions {
      display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    }
    .shorts-done-check {
      display: flex; align-items: center; gap: 6px; margin: 0;
      color: var(--text); font-weight: 600; font-size: .86rem; cursor: pointer;
      white-space: nowrap;
    }
    .shorts-done-check input { width: auto; margin: 0; }
    .badge-shorts-done {
      display: inline-block; padding: 2px 8px; border-radius: 999px;
      font-size: .72rem; font-weight: 700;
      background: #1a3d34; color: var(--accent); margin: 0 0 4px;
    }
    .badge-story-aspect {
      display: inline-block; padding: 2px 8px; border-radius: 999px;
      font-size: .72rem; font-weight: 700; margin: 0 6px 4px 0;
    }
    .badge-story-aspect.short {
      background: #243040; color: #9ecbff;
    }
    .badge-story-aspect.long {
      background: #2a2438; color: #c4b5fd;
    }
    .badge-story-cat {
      display: inline-block; padding: 2px 8px; border-radius: 999px;
      font-size: .72rem; font-weight: 700; margin: 0 6px 4px 0;
      background: #16352e; color: var(--accent);
    }
    .story-card-title-row {
      display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
    }
    .story-card-rate-row {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      margin: 2px 0 4px;
    }
    .story-card-rate-row .btn-make-shorts {
      padding: 4px 10px; font-size: .75rem; border-radius: 999px;
    }
    .story-stars {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      line-height: 1;
      vertical-align: middle;
    }
    .story-stars .star-slot {
      position: relative;
      width: 1.15em;
      height: 1.15em;
      font-size: 1.15rem;
      color: #3a4654;
      display: inline-grid;
      place-items: center;
      user-select: none;
    }
    .story-stars .star-slot .star-bg,
    .story-stars .star-slot .star-fg {
      grid-area: 1 / 1;
      font-style: normal;
    }
    .story-stars .star-slot .star-bg { color: #3a4654; }
    .story-stars .star-slot .star-fg {
      color: #f5c542;
      overflow: hidden;
      width: 0;
      justify-self: start;
      display: block;
      white-space: nowrap;
    }
    .story-stars .star-slot[data-fill="full"] .star-fg { width: 100%; }
    .story-stars .star-slot[data-fill="half"] .star-fg { width: 50%; }
    .story-stars.interactive .star-slot {
      cursor: pointer;
    }
    .story-stars.interactive .star-hit {
      position: absolute;
      inset: 0;
      display: grid;
      grid-template-columns: 1fr 1fr;
      z-index: 1;
    }
    .story-stars.interactive .star-hit button {
      padding: 0;
      margin: 0;
      border: 0;
      background: transparent;
      border-radius: 0;
      min-width: 0;
      box-shadow: none;
      opacity: 0;
    }
    .story-stars .star-clear {
      margin-left: 6px;
      font-size: .72rem;
      padding: 2px 8px;
    }
    .story-card-stars {
      margin: 0;
    }
    .chat-modal-rating {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 6px;
      flex-wrap: wrap;
    }
    .chat-modal-rating .meta { margin: 0; }
    .bilingual {
      flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
      border-bottom: 1px solid var(--line);
    }
    @media (max-width: 720px) {
      .bilingual { grid-template-columns: 1fr; }
    }
    .bilingual-pane {
      display: flex; flex-direction: column; min-height: 0; min-width: 0;
      border-right: 1px solid var(--line);
    }
    .bilingual-pane:last-child { border-right: 0; }
    .bilingual-pane .pane-h {
      padding: 8px 14px; font-size: .8rem; font-weight: 700; color: var(--muted);
      border-bottom: 1px solid var(--line); background: #121820;
    }
    .chat-phone {
      flex: 1; min-height: 0; overflow: hidden;
      background: #000;
      display: flex; flex-direction: column;
    }
    .chat-phone .chat-header {
      flex-shrink: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      background: #000;
      color: #fff;
    }
    .chat-phone .chat-header .side {
      font-size: .82rem; font-weight: 800;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chat-phone .chat-header .side.left { text-align: left; }
    .chat-phone .chat-header .side.right { text-align: right; }
    .chat-phone .chat-header .title {
      text-align: center; color: #ffe100; font-size: .9rem; font-weight: 900;
      line-height: 1.25; overflow: hidden; word-break: break-word;
    }
    .chat-phone .board-scroll {
      flex: 1; min-height: 0; overflow: auto;
      background: #b8bdd8;
    }
    .chat-phone .board {
      min-height: 100%; background: transparent;
      padding: 14px 12px; display: flex; flex-direction: column; gap: 12px;
    }
    .chat-phone .row { display: flex; width: 100%; }
    .chat-phone .row.me { justify-content: flex-end; }
    .chat-phone .row.them { justify-content: flex-start; }
    .chat-phone .bundle { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
    .chat-phone .bubble {
      position: relative;
      padding: 9px 12px; border-radius: 12px;
      font-size: .92rem; line-height: 1.4; font-weight: 600;
      word-break: break-word;
    }
    .chat-phone .them .bubble {
      background: #fff; color: #111; border-top-left-radius: 3px;
    }
    .chat-phone .them.c .bubble {
      background: #fff0b8; color: #111;
    }
    .chat-phone .me .bubble {
      background: #8de05f; color: #111; border-top-right-radius: 3px;
    }
    .chat-phone .stamp {
      font-size: .68rem; color: #4a5563; font-weight: 600;
      line-height: 1.2; white-space: nowrap; padding-bottom: 1px;
    }
    .chat-phone .stamp .read { display: block; margin-bottom: 1px; }
    .chat-modal-foot {
      padding: 12px 16px; border-top: 1px solid var(--line);
      display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    }
    .card.story-card { cursor: pointer; }
    .card.story-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
    .card.story-card.generation-failed {
      border-color: #dc5252;
      background: color-mix(in srgb, #dc5252 8%, var(--panel));
    }
    .badge-generation-failed {
      display: inline-flex;
      padding: 3px 8px;
      border-radius: 999px;
      background: #dc5252;
      color: #fff;
      font-size: 12px;
      font-weight: 800;
    }
    .generation-failed-message { color: #ff8d8d; }
    .card.story-card.workflow-draft {
      border-color: rgba(100, 180, 255, .35);
      background: rgba(100, 180, 255, .04);
    }
    .badge-workflow-draft {
      display: inline-block;
      font-size: .72rem;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(100, 180, 255, .18);
      color: #8ec8ff;
      margin-left: 6px;
    }
    .badge-workflow-draft.failed {
      background: rgba(255, 141, 141, .15);
      color: #ff8d8d;
    }
    .st-workflow-history {
      margin-top: 8px;
      font-size: .82rem;
      color: var(--muted);
    }
    .st-workflow-history details {
      margin-top: 6px;
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 8px;
      padding: 6px 10px;
      background: rgba(0,0,0,.15);
    }
    .st-workflow-history summary { cursor: pointer; }
    .st-workflow-history pre {
      margin: 8px 0 0;
      white-space: pre-wrap;
      word-break: break-word;
      font-size: .78rem;
      max-height: 240px;
      overflow: auto;
    }
    .card.in-progress {
      border-color: color-mix(in srgb, var(--accent2) 50%, var(--line));
      background: color-mix(in srgb, var(--accent2) 6%, var(--panel));
    }
    .progress-pill {
      display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 700;
      color: var(--accent2); background: color-mix(in srgb, var(--accent2) 14%, transparent);
      padding: 2px 8px; border-radius: 999px;
    }
    .bi-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: .8rem; color: var(--muted); }
    .bi-preview strong { color: var(--text); font-size: .75rem; display: block; margin-bottom: 2px; }
    .sync-layout {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      gap: 16px;
      align-items: start;
      margin-top: 12px;
    }
    body.sms-landscape .sync-layout {
      grid-template-columns: minmax(320px, 480px) minmax(0, 1fr);
    }
    @media (max-width: 900px) {
      .sync-layout { grid-template-columns: 1fr; }
      .sync-stage {
        width: min(280px, 100%);
        height: auto;
        aspect-ratio: 9 / 16;
        margin-inline: auto;
      }
      body.sms-landscape .sync-stage {
        width: min(480px, 100%);
        aspect-ratio: 16 / 9;
      }
    }
    .sync-toolbar {
      display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
      margin: 8px 0 4px;
    }
    .sync-toolbar .sync-typing-dots span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
    }
    .sync-toolbar .sync-typing-dots input {
      width: auto;
      margin: 0;
      cursor: pointer;
    }
    #tts-total-info {
      margin: 0;
      color: var(--accent);
      font-weight: 700;
      font-size: .92rem;
    }
    .modal.cover-title-modal {
      width: min(520px, 100%);
      padding: 14px 16px 16px;
    }
    body.sms-landscape .modal.cover-title-modal {
      width: min(760px, 100%);
    }
    .cover-title-modal h2 { margin: 0 0 6px; font-size: 1.05rem; }
    .cover-title-modal .cover-title-modal-body {
      display: grid;
      grid-template-columns: 1fr min(160px, 34vw);
      gap: 12px;
      align-items: start;
      margin-top: 10px;
    }
    body.sms-landscape .cover-title-modal .cover-title-modal-body {
      grid-template-columns: 1fr min(300px, 46vw);
    }
    @media (max-width: 560px) {
      .cover-title-modal .cover-title-modal-body { grid-template-columns: 1fr; }
    }
    .cover-title-modal textarea {
      width: 100%;
      min-height: 8em;
      resize: vertical;
      font-size: .92rem;
      line-height: 1.45;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--text);
      font-family: inherit;
    }
    .cover-title-modal .cover-title-font-row {
      margin-top: 10px;
      display: grid;
      gap: 6px;
    }
    .cover-title-modal .cover-title-font-row input[type="range"] {
      width: 100%;
    }
    .cover-title-modal .cover-title-font-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .cover-title-modal .cover-title-preview-wrap {
      aspect-ratio: 9/16;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #0c1117;
      display: grid;
      place-items: center;
    }
    body.sms-landscape .cover-title-modal .cover-title-preview-wrap {
      aspect-ratio: 16/9;
    }
    .cover-title-modal .cover-title-preview-wrap img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }
    .cover-title-modal .cover-title-preview-wrap .cover-preview-loading {
      color: var(--muted);
      font-size: .72rem;
      padding: 8px;
      text-align: center;
    }
    .sync-lines {
      display: grid; gap: 8px;
      max-height: min(70vh, 720px); overflow: auto;
      padding-right: 4px;
    }
    .sync-line {
      border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
      background: #151c24; display: grid; gap: 8px;
    }
    .sync-line.on { outline: 2px solid var(--accent); }
    .sync-line.err { border-color: #8a3a3a; }
    .sync-line.excluded {
      opacity: 0.72;
      border-style: dashed;
      background: #12171e;
    }
    .sync-line.excluded .sync-line-text {
      text-decoration: line-through;
      text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent);
    }
    .sync-line .badge-exclude {
      display: inline-block;
      font-size: .7rem;
      font-weight: 700;
      padding: 1px 7px;
      border-radius: 999px;
      margin-left: 6px;
      background: #3a2a1a;
      color: var(--accent2);
      vertical-align: middle;
    }
    .sync-line-actions label.exclude-toggle {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin: 0;
      font-size: .72rem;
      color: var(--muted);
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
    }
    .sync-line-actions label.exclude-toggle input { accent-color: var(--accent2); }
    .sync-line-top {
      display: flex; gap: 8px; align-items: flex-start; justify-content: space-between;
    }
    .sync-line-image {
      flex: 0 0 auto;
      position: relative;
      width: 48px;
      height: 48px;
      border-radius: 8px;
      border: 1px dashed var(--line);
      background: #121820;
      color: var(--muted);
      font-size: .68rem;
      line-height: 1.15;
      padding: 0;
      cursor: pointer;
      overflow: hidden;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
    .sync-line-image.add:hover { border-color: var(--accent); color: var(--accent); }
    .sync-line-image.has-image {
      border-style: solid;
      border-color: var(--line);
      padding: 0;
    }
    .sync-line-image.has-image img {
      width: 48px;
      height: 48px;
      object-fit: cover;
      display: block;
    }
    .sync-line-image-del {
      position: absolute;
      top: 0;
      right: 0;
      width: 18px;
      height: 18px;
      border: 0;
      border-radius: 0 0 0 6px;
      background: rgba(0,0,0,.72);
      color: #fff;
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
      padding: 0;
    }
    .sync-line-image-del:hover { background: #c44; }
    .sync-line-text {
      flex: 1; min-width: 0; font-size: .88rem; line-height: 1.4;
      cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px;
    }
    .sync-line-text:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
    .sync-line-text .who {
      display: inline-block; font-size: .72rem; font-weight: 700;
      padding: 1px 7px; border-radius: 999px; margin-right: 6px;
      background: #243040; color: var(--muted);
    }
    .sync-line-text .who.a { background: #1a3d34; color: var(--accent); }
    .sync-line-text .who.b { background: #3a2a1a; color: var(--accent2); }
    .sync-line-text .who.c { background: #3d3518; color: #f0d060; }
    .sync-line-text .line-ko {
      color: var(--muted);
      font-weight: 500;
    }
    .line-edit-modal { width: min(560px, 100%); }
    .line-edit-modal textarea {
      width: 100%; min-height: 96px; border: 1px solid var(--line); border-radius: 10px;
      padding: 9px 11px; background: #121820; color: var(--text); font: inherit; resize: vertical;
    }
    .line-edit-modal .line-edit-note { color: var(--accent2); font-size: .82rem; margin: 0 0 10px; min-height: 1.2em; }
    .sync-line-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); }
    .sync-line-meta label {
      display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--muted);
    }
    .sync-line-meta input[type="number"] {
      width: 72px; padding: 5px 7px; margin: 0;
    }
    .sync-line-meta input[data-speed],
    .sync-line-meta input[data-pitch] {
      width: 54px;
    }
    .sync-line.prosody-custom .sync-line-meta input[data-speed],
    .sync-line.prosody-custom .sync-line-meta input[data-pitch] {
      border-color: color-mix(in srgb, var(--accent2) 55%, var(--line));
    }
    .sync-line-actions { display: flex; flex-wrap: wrap; gap: 4px; }
    .sync-stage {
      position: sticky;
      top: 12px;
      z-index: 2;
      box-sizing: border-box;
      width: 280px;
      height: 497.78px; /* 280 * 16/9 — aspect-ratio만 쓰면 우측 목록 재렌더 시 축소되는 경우 있음 */
      max-width: 280px;
      flex-shrink: 0;
      align-self: start;
      justify-self: start;
      border-radius: 14px;
      overflow: hidden;
      background: #000;
      border: 1px solid var(--line);
      box-shadow: 0 10px 28px rgba(0,0,0,.28);
    }
    .sync-side {
      min-width: 0;
    }
    .sync-stage .sync-chat {
      position: absolute; inset: 0;
      z-index: 1;
      display: flex; flex-direction: column;
      background: #000;
    }
    .sync-stage .sync-header {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
      align-items: center;
      gap: 6px;
      padding: 10px 8px 8px;
      background: #000;
      color: #fff;
      min-height: 14%;
      box-sizing: border-box;
    }
    .sync-stage .sync-header .side {
      font-size: .72rem;
      font-weight: 800;
      letter-spacing: 0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sync-stage .sync-header .side.left { text-align: left; }
    .sync-stage .sync-header .side.right { text-align: right; }
    .sync-stage .sync-header .title {
      text-align: center;
      color: #ffe100;
      font-size: .78rem;
      font-weight: 900;
      letter-spacing: 0.02em;
      line-height: 1.25;
      overflow: hidden;
      word-break: break-word;
      max-height: 2.6em;
    }
    .sync-stage .sync-header .title span {
      display: block;
      white-space: pre-line;
      overflow: hidden;
      max-width: 100%;
      max-height: 100%;
    }
    .sync-stage .board {
      flex: 1; min-height: 0;
      background: #b8bdd8;
      padding: 10px 8px; display: flex; flex-direction: column; gap: 8px;
      overflow: hidden;
    }
    .sync-stage .row { display: flex; width: 100%; }
    .sync-stage .row.me { justify-content: flex-end; }
    .sync-stage .row.them { justify-content: flex-start; }
    .sync-stage .bundle { display: flex; align-items: flex-end; gap: 4px; max-width: 86%; }
    .sync-stage .bubble {
      position: relative;
      padding: 7px 9px; border-radius: 10px;
      font-size: .72rem; line-height: 1.35; font-weight: 600;
      word-break: break-word;
    }
    .sync-stage .bubble img.line-image {
      display: block;
      max-width: 70%;
      max-height: 120px;
      width: auto;
      height: auto;
      object-fit: contain;
      border-radius: 6px;
      margin: 0 0 6px;
    }
    .sms-landscape .sync-stage .bubble img.line-image {
      max-height: 72px;
    }
    .sync-stage .them .bubble { background: #fff; color: #111; border-top-left-radius: 2px; }
    .sync-stage .them.c .bubble { background: #fff0b8; color: #111; }
    .sync-stage .me .bubble { background: #8de05f; color: #111; border-top-right-radius: 2px; }
    .sync-stage .stamp {
      font-size: .58rem; color: #4a5563; font-weight: 600;
      line-height: 1.2; white-space: nowrap; padding-bottom: 1px;
    }
    .sync-stage .stamp .read { display: block; margin-bottom: 1px; }
    .sync-stage .bubble.dots {
      display: flex; gap: 5px; align-items: center; justify-content: center;
      min-width: 48px; padding: 10px 12px;
    }
    .sync-stage .bubble.dots span {
      width: 6px; height: 6px; border-radius: 50%;
      background: #666; opacity: .45;
      animation: syncBlink 1.1s infinite ease-in-out;
    }
    .sync-stage .bubble.dots span:nth-child(2) { animation-delay: .15s; }
    .sync-stage .bubble.dots span:nth-child(3) { animation-delay: .3s; }
    @keyframes syncBlink {
      0%, 80%, 100% { opacity: .25; transform: translateY(0); }
      40% { opacity: .9; transform: translateY(-2px); }
    }
    .sync-side .meta { margin-top: 4px; }
    .voice-pick {
      display: flex; gap: 8px; align-items: center;
    }
    .voice-pick select { flex: 1; min-width: 0; }
    .voice-pick button { flex: 0 0 auto; margin: 0; white-space: nowrap; }
    .tts-default-check {
      display: flex; align-items: center; gap: 8px;
      margin: 8px 0 2px; font-size: .86rem; color: var(--muted); cursor: pointer;
    }
    .tts-default-check input { width: auto; margin: 0; accent-color: var(--accent); }
    .tts-default-check span { color: var(--text); font-weight: 600; }
