/* ROBERIN The New — DOCX JPG 변환기 (docx-to-jpg-converter) 20261005a
 * Upload-canvas family (hwp-to-jpg와 같은 팔레트). Numeric family/weight is owned by the shared numerals CSS.
 */
.tn-docx-page{--docx-paper:#faf6ee;--docx-ink:#1a1208;--docx-muted:#5a4a30;--docx-line:#b8a888;--docx-soft:#ddd4be;--docx-surface:#fffaf0;--docx-wash:#f5efdf;--docx-accent:#c44a00;--docx-good:#2f7d54;--docx-primary:#1a1208;--docx-primary-text:#faf6ee;--docx-secondary:#ede6d4;max-width:1180px;margin:0 auto;color:var(--docx-ink)}

.tn-docx-tool,.tn-docx-tool *{box-sizing:border-box}
.tn-docx-tool{display:grid;border:1px solid var(--docx-line);background:var(--docx-paper);color:var(--docx-ink)}
.tn-docx-tool :is(ul,ol,li){margin:0;padding:0;list-style:none}
.tn-docx-tool p{margin:0}

.tn-docx-stage{display:grid;gap:12px;padding:18px}
.tn-docx-label{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--docx-muted)}

.tn-docx-drop{display:grid;justify-items:center;align-content:center;gap:10px;min-height:200px;padding:22px 18px;border:1px dashed var(--docx-line);background:var(--docx-surface);text-align:center;cursor:pointer;outline:0}
.tn-docx-drop.is-over{border-color:var(--docx-accent);background:var(--docx-wash)}
.tn-docx-drop:focus-visible{outline:2px solid var(--docx-accent);outline-offset:2px}
.tn-docx-drop__title{font-size:15px;font-weight:800}
.tn-docx-drop__hint{font-size:12px;line-height:1.6;color:var(--docx-muted)}

.tn-docx-btn{display:inline-grid;place-items:center;min-height:36px;padding:0 16px;border:1px solid var(--docx-line);background:var(--docx-secondary);color:var(--docx-ink);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;font-weight:900;line-height:1;text-decoration:none;border-radius:0;cursor:pointer;outline:0}
.tn-docx-btn--primary{background:var(--docx-primary);border-color:var(--docx-primary);color:var(--docx-primary-text)}
.tn-docx-btn:hover{border-color:var(--docx-accent)}
.tn-docx-btn:focus-visible{outline:2px solid var(--docx-accent);outline-offset:2px}
.tn-docx-btn:disabled{opacity:.55;cursor:default}
.tn-docx-btn[hidden]{display:none}

.tn-docx-status{padding:10px 12px;border:1px solid var(--docx-soft);background:var(--docx-surface);font-size:12px;line-height:1.6;color:var(--docx-muted)}
.tn-docx-status[data-state=busy]{border-color:var(--docx-accent)}
.tn-docx-status[data-state=success]{color:var(--docx-good)}
.tn-docx-status[data-state=error]{border-color:var(--docx-accent);color:var(--docx-accent)}

.tn-docx-result{display:grid;gap:12px;padding:18px;border-top:1px solid var(--docx-line)}
.tn-docx-result[hidden]{display:none}
.tn-docx-result__head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px}
.tn-docx-result__head b{margin-left:6px;font-size:14px;color:var(--docx-ink)}
.tn-docx-pages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tn-docx-pages>.tn-docx-sheet{display:grid;gap:8px;min-width:0;padding:10px;border:1px solid var(--docx-soft);background:var(--docx-surface)}
/* 미리보기 상자는 flex로 높이를 확정해야 img의 max-height:100%가 먹는다 (grid 중앙 배치에서는 세로 원본 쪽이 상자 밖으로 넘쳤다). */
.tn-docx-sheet__view{display:flex;align-items:center;justify-content:center;width:100%;height:220px;padding:6px;border:0;border-radius:0;background:var(--docx-wash);line-height:0;cursor:zoom-in;outline:0;-webkit-appearance:none;appearance:none}
.tn-docx-sheet__view:focus-visible{outline:2px solid var(--docx-accent);outline-offset:2px}
.tn-docx-sheet__view img{display:block;min-width:0;max-width:100%;max-height:100%;border:1px solid var(--docx-soft);background:#fff;object-fit:contain}

.tn-docx-gallery{width:min(96vw,1100px);max-width:none;height:94vh;max-height:none;padding:0;border:1px solid var(--docx-line);background:var(--docx-paper);color:var(--docx-ink)}
.tn-docx-gallery[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.tn-docx-gallery::backdrop{background:rgba(26,18,8,.72)}
.tn-docx-gallery__head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid var(--docx-soft)}
.tn-docx-gallery__count{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;font-weight:800;white-space:nowrap}
.tn-docx-gallery__actions{display:flex;gap:8px}
.tn-docx-gallery__stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:12px 60px;background:var(--docx-wash)}
.tn-docx-gallery__stage img{display:block;min-width:0;max-width:100%;max-height:100%;border:1px solid var(--docx-soft);background:#fff;object-fit:contain}
.tn-docx-gallery__nav{position:absolute;top:50%;width:42px;height:56px;margin-top:-28px;padding:0;border:1px solid var(--docx-line);border-radius:0;background:var(--docx-paper);color:var(--docx-ink);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:22px;font-weight:900;line-height:1;cursor:pointer;outline:0}
.tn-docx-gallery__nav--prev{left:9px}
.tn-docx-gallery__nav--next{right:9px}
.tn-docx-gallery__nav:hover{border-color:var(--docx-accent)}
.tn-docx-gallery__nav:focus-visible{outline:2px solid var(--docx-accent);outline-offset:2px}
.tn-docx-gallery__nav:disabled{opacity:.35;cursor:default}
.tn-docx-sheet__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.tn-docx-sheet__meta{display:grid;gap:2px;min-width:0;font-size:11px;line-height:1.4;color:var(--docx-muted)}
.tn-docx-sheet__meta b{font-size:13px;color:var(--docx-ink)}
.tn-docx-sheet__meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tn-docx-sheet__save{flex:0 0 auto;padding:0 12px}

body:is([data-scheme=dark],[data-scheme=inverse],[data-scheme=auto][data-l=dark],[data-scheme=auto][data-d=dark]) .tn-docx-page{--docx-paper:#241d12;--docx-ink:#efe6d2;--docx-muted:#c3b492;--docx-line:#6f6047;--docx-soft:#574a37;--docx-surface:#322a1a;--docx-wash:#2c2517;--docx-accent:#e8823f;--docx-good:#66a77f;--docx-primary:#4a3116;--docx-primary-text:#f7ead1;--docx-secondary:#2f2115}
body:is([data-scheme=dark],[data-scheme=inverse],[data-scheme=auto][data-l=dark],[data-scheme=auto][data-d=dark]) .tn-docx-tool :is(.tn-docx-btn,.tn-docx-gallery__nav){color:var(--docx-ink)!important;-webkit-text-fill-color:var(--docx-ink)!important}
body:is([data-scheme=dark],[data-scheme=inverse],[data-scheme=auto][data-l=dark],[data-scheme=auto][data-d=dark]) .tn-docx-btn--primary{border-color:var(--docx-accent)}

@media(prefers-color-scheme:dark){
body[data-scheme=auto]:not([data-l=light]) .tn-docx-page{--docx-paper:#241d12;--docx-ink:#efe6d2;--docx-muted:#c3b492;--docx-line:#6f6047;--docx-soft:#574a37;--docx-surface:#322a1a;--docx-wash:#2c2517;--docx-accent:#e8823f;--docx-good:#66a77f;--docx-primary:#4a3116;--docx-primary-text:#f7ead1;--docx-secondary:#2f2115}
body[data-scheme=auto]:not([data-l=light]) .tn-docx-tool :is(.tn-docx-btn,.tn-docx-gallery__nav){color:var(--docx-ink)!important;-webkit-text-fill-color:var(--docx-ink)!important}
body[data-scheme=auto]:not([data-l=light]) .tn-docx-btn--primary{border-color:var(--docx-accent)}
}

@media(max-width:900px){.tn-docx-pages{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){
.tn-docx-page{margin-inline:5px}
.tn-docx-stage,.tn-docx-result{padding:13px}
.tn-docx-drop{min-height:170px;padding:18px 12px}
.tn-docx-pages{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tn-docx-pages>.tn-docx-sheet{padding:8px}
.tn-docx-sheet__view{height:180px}
.tn-docx-gallery{width:100vw;height:100vh;height:100dvh;border:0}
.tn-docx-gallery__head{padding:8px}
.tn-docx-gallery__stage{padding:8px 44px}
.tn-docx-gallery__nav{width:34px;height:48px;margin-top:-24px}
.tn-docx-gallery__nav--prev{left:5px}
.tn-docx-gallery__nav--next{right:5px}
.tn-docx-sheet__foot{display:grid;justify-content:stretch}
.tn-docx-sheet__save{width:100%}
}
