.mt-modes{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.mt-modes button{min-height:44px;padding:8px 16px;border:1px solid var(--line,#ddd);border-radius:999px;background:var(--bg,#fff);color:var(--tx,#171717);font:inherit;font-weight:700;cursor:pointer}
.mt-modes small{font-size:11px;margin-left:4px}
.mt-modes [aria-pressed=true]{background:var(--ac-tint,#edf5ff);border-color:var(--ac,#076bea);color:var(--ac-dark,#0757b7)}
.mt-modes button:disabled{opacity:.5;cursor:not-allowed}
.mt-active>.composer-bar,.mt-active>#topic-required-label,.mt-active>.writing-config-row,.mt-active>.composer-mode-row,.mt-active>#mcp-cap-row,.mt-active>#mcp-caps,.mt-active>.composer-ext-links{display:none!important}
.composer:has(.mt-active){flex:1;min-height:0;overflow-y:auto}
#view-proj:has(.mt-active)>.main-scroll{display:none}
.mt-active>.composer-actions,.mt-active>.sel-summary,.mt-active>.composer-fold-row{display:none!important}
#manual-threads[hidden]{display:none}

/* ★쓰레드·X 실제 작성 화면처럼(2026-10-02) — 공통 뼈대 + 플랫폼별 색·글꼴 */
#manual-threads{--mt-muted:#999;--mt-surface:#fff;--mt-ink:#000;--mt-line:#e5e5e5;--mt-soft:#f5f5f5;--mt-accent:#000;--mt-accent-ink:#fff;--mt-warn:#ffd400;--mt-over:#f4212e;
  color:var(--mt-ink);background:var(--mt-surface);border:1px solid var(--mt-line);border-radius:16px;margin:12px auto;max-width:640px;overflow:hidden;font-size:15px;box-shadow:0 10px 30px rgba(0,0,0,.07)}
#manual-threads.mt-skin-x{--mt-muted:#536471;--mt-line:#eff3f4;--mt-soft:#f7f9f9;--mt-ink:#0f1419;--mt-accent:#1d9bf0;--mt-accent-ink:#fff;max-width:600px}
#manual-threads button,#manual-threads select{font:inherit;cursor:pointer;color:inherit}
#manual-threads button:disabled{opacity:.45;cursor:default}
#manual-threads button:focus-visible,#manual-threads select:focus-visible,#manual-threads summary:focus-visible,.mt-modes button:focus-visible{outline:2px solid var(--ac,#076bea);outline-offset:2px}

/* 쓰레드 / X 고르기 */
.mt-plats{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--mt-line);background:var(--mt-soft)}
.mt-plats button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border:1px solid transparent;border-radius:999px;background:transparent;font-size:13.5px!important;font-weight:700!important;color:var(--mt-muted)!important}
.mt-plats button svg{width:16px!important;height:16px!important;margin:0!important;vertical-align:0!important}
.mt-plats button[aria-pressed=true]{background:var(--mt-surface);border-color:var(--mt-line);color:var(--mt-ink)!important;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.mt-plats small{margin-left:auto;font-size:11.5px;color:var(--mt-muted)}
/* 머리 — 쓰레드: 가운데 제목 / X: 왼쪽 로고 */
.mt-header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:16px 20px;border-bottom:1px solid var(--mt-line)}
.mt-header>div{display:flex;align-items:baseline;gap:8px;flex:1;min-width:0}
.mt-header strong{font-size:16px;font-weight:700;letter-spacing:-.2px}
.mt-header div span{font-size:11px;color:var(--mt-muted);border:1px solid var(--mt-line);border-radius:999px;padding:2px 8px;white-space:nowrap}
.mt-header p{flex-basis:100%;margin:0;color:var(--mt-muted);font-size:12.5px;line-height:1.55}
.mt-header p b{color:var(--mt-ink)}
.mt-logo{width:28px;height:28px;display:grid;place-items:center;flex:none}
.mt-logo svg{width:22px!important;height:22px!important;margin:0!important;vertical-align:0!important}
.mt-skin-threads .mt-header{justify-content:center}

.mt-fields{border:0;padding:0;margin:0;min-width:0}
.mt-language{padding:10px 20px 2px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;font-size:12.5px}
.mt-language label{font-weight:700;color:var(--mt-muted)}
.mt-language select{border:1px solid var(--mt-line);border-radius:999px;background:var(--mt-surface);padding:5px 10px;min-height:32px;max-width:100%;font-size:12.5px!important;font-weight:700}
/* X 계정 종류(일반·프리미엄) */
.mt-seg{display:inline-flex;margin-left:auto;border:1px solid var(--mt-line);border-radius:999px;padding:2px;background:var(--mt-soft)}
.mt-seg button{border:0;background:transparent;border-radius:999px;min-height:30px;padding:0 12px;font-size:12.5px!important;font-weight:700;color:var(--mt-muted)!important;white-space:nowrap}
.mt-seg button small{font-weight:600;font-size:11px;opacity:.85}
.mt-seg button[aria-pressed=true]{background:var(--mt-accent);color:var(--mt-accent-ink)!important}

/* 글 칸 — 아바타 + 세로 줄 + 테두리 없는 입력칸 */
.mt-posts{padding:12px 20px 4px}
.mt-post{display:flex;gap:12px}
.mt-rail{width:36px;flex:none;display:flex;flex-direction:column;align-items:center}
.mt-avatar{width:36px;height:36px;border-radius:50%;background:var(--mt-soft);border:1px solid var(--mt-line);color:var(--mt-ink);display:grid;place-items:center;font-size:15px;font-weight:700;flex:none}
.mt-skin-x .mt-rail{width:40px}.mt-skin-x .mt-avatar{width:40px;height:40px}
.mt-line{width:2px;background:var(--mt-line);flex:1;min-height:14px;margin:6px 0;border-radius:2px}
.mt-post-content{flex:1;min-width:0;padding:0 0 10px}
.mt-post-head{display:flex;align-items:center;gap:8px;min-height:22px}
.mt-post-head strong{font-size:15px;font-weight:600;overflow-wrap:anywhere}
.mt-post-head label{font-size:11.5px;color:var(--mt-muted)}
.mt-remove{margin-left:auto;border:0;background:none;width:30px;height:30px;border-radius:50%;font-size:20px!important;line-height:1;color:var(--mt-muted)!important}
.mt-remove:hover{background:var(--mt-soft)}
.mt-post textarea{display:block;box-sizing:border-box;resize:none;width:100%;border:0;outline:0;padding:2px 0 4px;margin:0;background:transparent;color:inherit;font:inherit;font-size:15px;line-height:1.45;min-height:26px;max-height:520px;overflow-y:auto;overflow-wrap:anywhere}
.mt-skin-x .mt-post textarea{font-size:20px;line-height:1.3;padding-top:6px}
.mt-skin-x .mt-post+.mt-post textarea{font-size:17px}
.mt-post textarea::placeholder{color:var(--mt-muted)}
.mt-post textarea:focus,.mt-post textarea:focus-visible{outline:0!important;box-shadow:none!important;border:0!important}
.mt-post:first-child textarea{min-height:48px}
.mt-photos{display:flex;gap:8px;overflow-x:auto;padding:2px 0}
.mt-photos:empty{display:none}
.mt-photos figure{margin:4px 0;position:relative;flex:none;width:148px;aspect-ratio:1;border:1px solid var(--mt-line);border-radius:12px;overflow:hidden;background:var(--mt-soft)}
.mt-skin-x .mt-photos figure{border-radius:16px}
.mt-photos img{width:100%;height:100%;object-fit:cover;display:block}
.mt-photos button{position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(15,20,25,.75);color:#fff!important;font-size:18px!important;line-height:1}
.mt-post-foot{display:flex;align-items:center;gap:8px;justify-content:space-between;min-height:36px;color:var(--mt-muted);font-size:12px}
.mt-icon{display:inline-flex;gap:6px;align-items:center;border:0;background:transparent;padding:6px 8px 6px 0;border-radius:999px;color:var(--mt-muted)!important}
.mt-icon svg{width:20px;height:20px}
.mt-icon small{font-size:11.5px}
.mt-skin-x .mt-icon{color:var(--mt-accent)!important}
.mt-count{font-size:12px;font-variant-numeric:tabular-nums}
.mt-foot-end{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.mt-split{border:1px solid var(--mt-over);border-radius:999px;background:transparent;color:var(--mt-over)!important;min-height:28px;padding:0 10px;font-size:11.5px!important;font-weight:700!important;white-space:nowrap}
.mt-split[hidden]{display:none}
/* 사진을 끌어다 놓을 칸 */
.mt-post.mt-drop{outline:2px dashed var(--mt-accent);outline-offset:4px;border-radius:12px;background:var(--mt-soft)}
.mt-copy{border:1px solid var(--mt-line);border-radius:999px;background:var(--mt-surface);min-height:26px;padding:0 10px;font-size:11.5px!important;font-weight:700!important}
/* X 글자 수 원형 게이지 */
.mt-ring{display:inline-flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums}
.mt-ring svg{width:24px;height:24px;transform:rotate(-90deg)}
.mt-ring circle{fill:none;stroke-width:2.2}
.mt-ring-bg{stroke:var(--mt-line)}
.mt-ring-fg{stroke:var(--mt-accent);stroke-linecap:round;transition:stroke-dashoffset .12s}
.mt-ring-warn .mt-ring-fg{stroke:var(--mt-warn)}
.mt-ring-over .mt-ring-fg{stroke:var(--mt-over)}
.mt-ring b{font-size:12px;font-weight:600;color:var(--mt-muted)}
.mt-ring-over b{color:var(--mt-over)}

/* 댓글(이어지는 게시글) 추가 — 실제 화면의 「스레드에 추가」 줄 */
.mt-add{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;padding:6px 0 12px;text-align:left;color:var(--mt-muted)!important;font-size:15px!important}
.mt-add small{font-size:11.5px;opacity:.8}
.mt-avatar-sm{width:20px;height:20px;margin:0 8px;font-size:10px;opacity:.6}
.mt-skin-x .mt-avatar-sm{width:24px;height:24px;margin:0 8px;border-color:#cfd9de;color:var(--mt-accent);background:#fff;opacity:1}
.mt-avatar-sm svg{width:14px;height:14px}
.mt-add:not(:disabled):hover span:nth-child(2){color:var(--mt-ink)}

/* 번역 언어 줄 */
.mt-langs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 20px;border-top:1px solid var(--mt-line);font-size:12.5px}
.mt-langs b{margin-right:2px}
.mt-langs small{color:var(--mt-muted);font-size:11.5px;line-height:1.5}
.mt-chip{border:1px solid var(--mt-line);border-radius:999px;padding:3px 9px;font-size:11.5px;font-weight:700;background:var(--mt-soft)}
button.mt-chip{cursor:pointer;min-height:30px;font-size:11.5px!important;font-weight:700!important;color:inherit}
button.mt-chip:hover{border-color:var(--mt-ink)}
.mt-chip-off{opacity:.55;text-decoration:line-through}
/* 번역 상태 — 준비됨·실패·번역 중 */
.mt-chip-ready{background:#e8f6ee;border-color:#b7e0c6;color:#17663a}
.mt-chip-failed{background:#fdecea;border-color:#f5c2bd;color:#b42318}
.mt-chip-working{border-style:dashed}
.mt-result{border-top:1px solid var(--mt-line);padding:6px 20px;font-size:12.5px}
.mt-result summary{cursor:pointer;min-height:36px;align-content:center;font-weight:700}
.mt-result ul{list-style:none;padding:0;margin:4px 0 8px;display:grid;gap:8px;max-height:560px;overflow-y:auto}
.mt-result li{border:1px solid var(--mt-line);border-radius:12px;padding:9px 11px;background:var(--mt-soft)}
.mt-res-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.mt-res-head span{color:var(--mt-muted);font-size:11.5px;overflow-wrap:anywhere}
.mt-res-head em{margin-left:auto;font-style:normal;font-size:11px;font-weight:700;color:var(--mt-muted)}
.mt-res-source{background:var(--mt-surface)!important;border-style:dashed!important}
.mt-res-note{color:var(--mt-muted);font-size:11.5px!important}
.mt-open{color:var(--ac,#076bea)!important}
.mt-res-flash{animation:mtResFlash 1.6s ease}
@keyframes mtResFlash{0%,100%{box-shadow:none}15%{box-shadow:0 0 0 3px var(--ac,#076bea)}}
@media(prefers-reduced-motion:reduce){.mt-res-flash{animation:none;outline:2px solid var(--ac,#076bea)}}
.mt-res-ready .mt-res-head em{color:#17663a}.mt-res-failed .mt-res-head em{color:#b42318}
.mt-result li p{margin:6px 0 0;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.mt-result li p small{display:block;color:var(--mt-muted);font-size:11px;font-weight:700}
.mt-recovery .mt-retry{background:var(--mt-accent);color:var(--mt-accent-ink)!important;border-color:var(--mt-accent)}

.mt-optimize{display:flex;gap:9px;align-items:flex-start;margin:0 20px 10px;padding:9px 11px;border:1px solid var(--mt-line);border-radius:12px;background:var(--mt-soft);cursor:pointer;font-size:12.5px;line-height:1.5}
.mt-optimize input{width:17px;height:17px;margin:1px 0 0;flex:none;accent-color:var(--mt-accent)}
.mt-optimize b{display:block;font-size:12.5px}
.mt-optimize small{display:block;color:var(--mt-muted);font-size:11.5px;margin-top:2px}
.mt-optimize:has(input){flex-wrap:wrap}.mt-optimize b{flex:1}.mt-optimize small{flex-basis:100%;padding-left:26px}

.mt-targets{border-top:1px solid var(--mt-line);padding:6px 20px;font-size:12.5px}
.mt-targets summary{cursor:pointer;min-height:36px;align-content:center;font-weight:700;color:var(--mt-muted)}
.mt-targets ul{padding-left:18px;margin:4px 0}
.mt-targets li{margin:6px 0;line-height:1.6;overflow-wrap:anywhere}
.mt-targets li span{display:block;color:var(--mt-muted)}
.mt-targets p{color:var(--mt-muted);line-height:1.5}

/* 맨 아래 — 실제 화면의 [게시] 자리 */
.mt-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center;padding:12px 20px;border-top:1px solid var(--mt-line)}
.mt-actions button{min-height:38px;border:1px solid var(--mt-line);border-radius:10px;padding:0 16px;background:var(--mt-surface);font-weight:700!important;font-size:14px!important}
.mt-actions .mt-primary{background:var(--mt-accent);color:var(--mt-accent-ink)!important;border-color:var(--mt-accent)}
.mt-skin-x .mt-actions button{border-radius:999px}
.mt-recovery button{min-height:34px;border:1px solid var(--mt-line);border-radius:999px;padding:0 12px;background:var(--mt-surface);font-weight:700!important;font-size:12px!important}
.mt-note{font-size:11.5px;line-height:1.6;color:var(--mt-muted);padding:0 20px;margin:0 0 10px;text-align:right}
.mt-error{color:#b42318!important}
#mt-status{margin:8px 20px;font-size:12.5px;line-height:1.6;white-space:pre-line}
#mt-status:empty{display:none}
.mt-recovery{padding:0 20px 16px;display:flex;flex-wrap:wrap;gap:6px}
.mt-recovery [hidden]{display:none}

@media(max-width:480px){
  #manual-threads{border-radius:14px}
  .mt-header,.mt-actions{padding-left:14px;padding-right:14px}
  .mt-language,.mt-posts,.mt-langs,.mt-targets,.mt-result{padding-left:14px;padding-right:14px}
  .mt-optimize{margin-left:14px;margin-right:14px}
  .mt-seg{margin-left:0}
  .mt-plats small{flex-basis:100%;margin-left:4px}
  .mt-post-foot{flex-wrap:wrap}
  .mt-post{gap:10px}
  .mt-photos figure{width:120px}
  .mt-actions{flex-wrap:wrap}.mt-actions button{flex:1;white-space:nowrap}
  .mt-note{padding:0 14px;text-align:left}
  #mt-status{margin:8px 14px}.mt-recovery{padding:0 14px 14px}
}
/* 휴대폰: 입력칸 글자가 16px 보다 작으면 누를 때 화면이 확대된다(iOS) */
@media(pointer:coarse){#manual-threads.mt-skin-threads .mt-post textarea{font-size:16px}.mt-plats small{display:none}}
html[data-theme=dark] #manual-threads,body.dark #manual-threads{--mt-muted:#8b8b8b;--mt-surface:#181818;--mt-ink:#f3f5f7;--mt-line:#2d2d2d;--mt-soft:#242424;--mt-accent:#fff;--mt-accent-ink:#000}
html[data-theme=dark] #manual-threads .mt-chip-ready,body.dark #manual-threads .mt-chip-ready{background:#12301f;border-color:#1f5a38;color:#7fd6a2}
html[data-theme=dark] #manual-threads .mt-chip-failed,body.dark #manual-threads .mt-chip-failed{background:#3a1512;border-color:#6b2420;color:#f3a29b}
html[data-theme=dark] #manual-threads.mt-skin-x,body.dark #manual-threads.mt-skin-x{--mt-muted:#71767b;--mt-surface:#000;--mt-ink:#e7e9ea;--mt-line:#2f3336;--mt-soft:#16181c;--mt-accent:#1d9bf0;--mt-accent-ink:#fff}
