:root{
  --bg:#f5f4f0; --surface:#fbfbf9; --panel:#ffffff; --panel-soft:#f7f6f2;
  --ink:#1c1c1a; --ink-hover:#3a3935; --ink-2:#55534d; --sub:#7a776f; --muted:#8a877f;
  --line:#e3e1db; --line-2:#dcdad3; --line-3:#efeee9; --hover:#efeee9; --soft:#f3f2ee; --track:#ebe9e3;
  --accent:#2f4bd8; /* 이력서 코발트 */
  --desk:#e7e4dc;
  --font:"IBM Plex Sans KR",sans-serif; --mono:"JetBrains Mono",monospace;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit}
.mono-label{font-family:var(--mono);font-size:11px;letter-spacing:.12em;color:var(--muted)}
.app{min-height:100vh;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 28px;border-bottom:1px solid var(--line);background:var(--surface);flex-wrap:wrap}
.brand{display:flex;align-items:baseline;gap:14px;min-width:0;flex-wrap:wrap}
.brand-title{font-size:17px;font-weight:700;letter-spacing:-.01em}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.btn{height:36px;padding:0 14px;background:transparent;border:1px solid var(--line-2);border-radius:999px;font-size:13px;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--hover)}
.btn--solid{background:var(--ink);color:#fff;border:none;font-weight:500}
.btn--solid:hover{background:var(--ink-hover)}
.text-input{height:40px;padding:0 12px;background:var(--surface);border:1px solid var(--line-2);border-radius:8px;font:inherit;font-size:14px;color:var(--ink);width:100%;min-width:0}
.text-input:focus{outline:none;border-color:var(--ink);background:#fff}
select.text-input{padding-right:8px}
textarea.text-input{height:auto;padding:9px 12px;line-height:1.55;resize:vertical}
textarea.tall{min-height:140px}

/* ---------- 레이아웃 ---------- */
.mtabs{display:none}
.studio{flex:1;display:grid;grid-template-columns:minmax(360px,440px) minmax(0,1fr);align-items:start}
.panel{padding:22px 22px 40px;display:flex;flex-direction:column;gap:14px;border-right:1px solid var(--line);background:var(--bg);min-width:0}
.stage{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;background:var(--desk);min-width:0;
  background-image:radial-gradient(rgba(0,0,0,.07) 1px,transparent 1.2px);background-size:16px 16px}
.stage-bar{display:flex;align-items:center;gap:14px;padding:12px 20px;border-bottom:1px solid rgba(0,0,0,.06);background:rgba(251,251,249,.75);backdrop-filter:blur(6px)}
.pages{font-size:12.5px;color:var(--ink-2);font-weight:500}
.zoom{margin-left:auto;display:flex;gap:2px;background:var(--soft);border:1px solid var(--line);border-radius:999px;padding:2px}
.zbtn{height:26px;padding:0 10px;border:none;background:transparent;border-radius:999px;font-size:12px;cursor:pointer;color:var(--ink-2)}
.zbtn.is-on{background:var(--ink);color:#fff}
.stage-scroll{flex:1;overflow:auto;padding:28px 20px 60px}
.paper-wrap{position:relative;margin:0 auto}
.paper-scale{position:absolute;left:0;top:0;width:210mm;transform-origin:0 0}
.sheet{box-shadow:0 1px 2px rgba(0,0,0,.06),0 24px 60px rgba(40,30,10,.16)}
.breaks{position:absolute;inset:0;pointer-events:none}
.brk{position:absolute;left:-14px;right:-14px;height:0;border-top:1.5px dashed rgba(230,70,40,.75)}
.brk span{position:absolute;right:0;top:-22px;font-family:var(--mono);font-size:11px;letter-spacing:.1em;color:#c43d1f;background:var(--desk);padding:1px 6px;border-radius:4px}

/* ---------- 카드 ---------- */
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px}
.card-head{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.card-title{font-size:14.5px;font-weight:700}
.field{display:flex;flex-direction:column;gap:5px;min-width:0}
.field.wide{grid-column:1 / -1}
.field-label{font-size:12px;color:var(--ink-2);font-weight:500}
.field-label b{font-family:var(--mono);font-weight:500;color:var(--muted);font-size:11px;margin-left:4px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.check{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--ink-2);margin-top:12px;line-height:1.5;cursor:pointer}
.check input{margin-top:2px;accent-color:var(--ink)}

/* 템플릿 고르기 */
.tpl-grid{--ac:#2f4bd8;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.tpl{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:6px 6px 8px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;text-align:left;transition:border-color .15s,transform .15s}
.tpl:hover{border-color:var(--line-2);transform:translateY(-1px)}
.tpl.is-on{border-color:var(--ink);background:#fff;box-shadow:0 0 0 3px rgba(28,28,26,.06)}
.tpl-name{font-size:12px;font-weight:700;margin-top:4px}
.tpl-desc{font-size:10.5px;color:var(--muted);line-height:1.3}
.th{display:flex;flex-direction:column;gap:3px;width:100%;aspect-ratio:210/297;background:#fff;border:1px solid var(--line-3);border-radius:4px;padding:7px 6px;overflow:hidden}
.th i{display:block;background:#d9d7d0;border-radius:1px;height:2px}
.th .l{height:2px}.th .l.s{width:62%}
.th-classic .t{width:40%;height:4px;margin:0 auto 3px;background:#3a3935}
.th-classic .row{display:flex;gap:4px}
.th-classic .ph{width:15px;height:20px;background:#ebe9e3;border:1px solid #d9d7d0}
.th-classic .tbl{flex:1;display:flex;flex-direction:column;gap:3px}
.th-classic .tbl.wide{flex:none}
.th-classic .tbl i{height:3px;background:#ebe9e3;border-left:4px solid #d0cec6}
.th-classic .hd{width:26%;height:3px;background:var(--ac);margin-top:4px}
.th-modern{flex-direction:row;padding:0;gap:0}
.th-modern .sd{width:36%;background:color-mix(in srgb,var(--ac) 14%,#fff);padding:7px 4px;display:flex;flex-direction:column;gap:3px}
.th-modern .ph{width:16px;height:16px;border-radius:50%;background:#fff;margin-bottom:3px}
.th-modern .bar{height:2px;background:var(--ac);width:70%}
.th-modern .mn{flex:1;padding:7px 5px;display:flex;flex-direction:column;gap:3px}
.th-modern .nm{height:5px;width:70%;background:#2a2a28}
.th-modern .hd{height:2px;width:32%;background:var(--ac);margin-top:4px}
.th-minimal{padding:10px 8px;gap:4px}
.th-minimal .nm{height:5px;width:55%;background:#55534d}
.th-minimal .r{display:flex;gap:5px;margin-top:5px;padding-top:4px;border-top:1px solid #efeee9}
.th-minimal .r .k{width:12px;height:2px;background:var(--ac);flex:none}
.th-minimal .r span{flex:1;display:flex;flex-direction:column;gap:3px}
.th-designer{gap:4px}
.th-designer .top{display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:3px;border-bottom:2px solid #1c1c1a}
.th-designer .nm{height:8px;width:58%;background:#1c1c1a}
.th-designer .ph{width:12px;height:15px;background:var(--ac);box-shadow:-2px -2px 0 #ebe9e3 inset}
.th-designer .hl{height:3px;width:85%;background:#8a877f}
.th-designer .r{display:flex;align-items:center;gap:3px;margin-top:3px}
.th-designer .no{width:6px;height:5px;background:var(--ac);flex:none}
.th-designer .cards{display:grid;grid-template-columns:1fr 1fr;gap:3px}
.th-designer .cards i{height:12px;background:#f1f0ec;border-top:2px solid var(--ac)}
.th-designer .pl{display:flex;gap:2px}
.th-designer .pl i{width:14px;height:4px;border-radius:9px;border:1px solid #1c1c1a;background:none}

.design-row{display:flex;align-items:center;gap:10px;margin:16px 0 12px;flex-wrap:wrap}
.design-row .field-label{width:100%}
.swatches{display:flex;gap:6px;flex-wrap:wrap}
.sw{width:26px;height:26px;border-radius:50%;border:none;background:var(--c);cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);transition:transform .15s}
.sw:hover{transform:scale(1.1)}
.sw.is-on{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--c)}
.swatch-custom{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ink-2);cursor:pointer;padding:2px 10px 2px 3px;border:1px solid var(--line-2);border-radius:999px}
.swatch-custom input{width:22px;height:22px;border:none;padding:0;background:none;cursor:pointer;border-radius:50%}
.swatch-custom input::-webkit-color-swatch-wrapper{padding:0}
.swatch-custom input::-webkit-color-swatch{border:none;border-radius:50%}
.design-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
input[type=range]{width:100%;accent-color:var(--ink);height:40px;margin:0}

/* 인적사항 */
.profile-grid{display:grid;grid-template-columns:104px 1fr;gap:14px;align-items:start}
.photo-box{display:flex;flex-direction:column;gap:8px}
.photo-drop{position:relative;width:104px;aspect-ratio:3/4;border:1.5px dashed var(--line-2);border-radius:10px;background:var(--panel-soft);cursor:pointer;overflow:hidden;padding:0;display:grid;place-items:center}
.photo-drop:hover,.photo-drop.is-over{border-color:var(--ink);background:#fff}
.photo-drop img{width:100%;height:100%;object-fit:cover;display:block}
.photo-ph{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;color:var(--ink-2)}
.photo-ph b{font-size:22px;font-weight:300;line-height:1}
.photo-ph small{font-family:var(--mono);font-size:9.5px;color:var(--muted);letter-spacing:.08em}
.photo-acts{display:flex;align-items:center;justify-content:space-between;gap:4px}
.mini{height:26px;padding:0 10px;border:1px solid var(--line-2);border-radius:999px;background:transparent;font-size:11.5px;cursor:pointer}
.mini:hover{background:var(--hover)}
.mini-check{display:flex;align-items:center;gap:4px;font-size:11.5px;color:var(--ink-2);cursor:pointer}
.mini-check input{accent-color:var(--ink);margin:0}

/* 섹션 카드 */
.sec-hint{padding:8px 4px 0}
.sec-hint p{margin:4px 0 0;font-size:12px;color:var(--sub);line-height:1.5}
#sections{display:flex;flex-direction:column;gap:10px}
.sec-card{padding:0;overflow:hidden;transition:opacity .2s}
.sec-head{display:flex;align-items:center;gap:6px;padding:8px 8px 8px 6px;background:var(--surface);border-bottom:1px solid var(--line-3)}
.sec-card.is-collapsed .sec-head{border-bottom:none}
.sec-card.is-collapsed .sec-body{display:none}
.sec-card.is-collapsed .fold svg{transform:rotate(-90deg)}
.sec-card.is-hidden .sec-title,.sec-card.is-hidden .sec-count{opacity:.45;text-decoration:line-through}
.sec-title{flex:1;min-width:0;height:32px;border:1px solid transparent;border-radius:7px;background:transparent;font:inherit;font-size:14px;font-weight:700;padding:0 6px;color:var(--ink)}
.sec-title:hover{border-color:var(--line)}
.sec-title:focus{outline:none;border-color:var(--ink);background:#fff}
.sec-count{min-width:18px;text-align:center}
.sec-tools,.item-tools{display:flex;gap:2px}
.ibtn{width:30px;height:30px;display:grid;place-items:center;border:none;background:transparent;border-radius:8px;cursor:pointer;color:var(--ink-2);padding:0}
.ibtn svg{width:16px;height:16px;transition:transform .2s}
.ibtn:hover:not(:disabled){background:var(--hover);color:var(--ink)}
.ibtn:disabled{opacity:.28;cursor:default}
.ibtn.is-off{color:#c43d1f}
.ibtn.sm{width:26px;height:26px}
.ibtn.sm svg{width:14px;height:14px}
.sec-body{padding:12px;display:flex;flex-direction:column;gap:10px}
.item{border:1px solid var(--line-3);border-radius:10px;padding:8px 10px 12px;background:var(--panel-soft)}
.item-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.level{display:flex;align-items:center;gap:10px}
.level-txt{flex:none;width:34px;font-size:12px;font-weight:600}
.add{height:38px;border:1.5px dashed var(--line-2);border-radius:10px;background:transparent;font-size:13px;color:var(--ink-2);cursor:pointer}
.add:hover{border-color:var(--ink);color:var(--ink);background:#fff}
.hint{margin:0;font-size:11.5px;color:var(--muted)}
.panel-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}
.saved{margin-left:auto;font-family:var(--mono);font-size:11px;color:var(--muted)}
.saved.is-warn{color:#c43d1f;font-family:var(--font)}
.privacy{margin:0;font-size:12px;line-height:1.6;color:var(--sub);padding:12px 14px;border-radius:10px;background:var(--soft)}

/* 모달 · 토스트 */
.modal{position:fixed;inset:0;z-index:100;background:rgba(20,18,14,.42);display:grid;place-items:center;padding:16px;animation:fade .2s}
.modal-box{width:min(460px,100%);background:#fff;border-radius:18px;padding:24px;box-shadow:0 30px 80px rgba(0,0,0,.25)}
.modal-box h2{margin:6px 0 14px;font-size:19px;letter-spacing:-.01em}
.pm-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:14px;line-height:1.55;color:var(--ink-2)}
.pm-steps b{color:var(--ink)}
.pm-note{font-size:12.5px;color:var(--sub);line-height:1.55;margin:14px 0 18px;padding:10px 12px;background:var(--soft);border-radius:10px}
.modal-acts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.modal-acts .mini-check{margin-right:auto}
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:#fff;padding:10px 16px;border-radius:999px;font-size:13px;transition:.25s;z-index:120;max-width:calc(100% - 32px)}
.toast.is-on{opacity:1;transform:translate(-50%,0)}
@keyframes fade{from{opacity:0}}

/* ---------- 반응형 ---------- */
@media (max-width:900px){
  .mtabs{display:flex;position:sticky;top:0;z-index:20;gap:4px;padding:8px 16px;background:var(--surface);border-bottom:1px solid var(--line)}
  .mtab{flex:1;height:36px;border:1px solid var(--line-2);background:transparent;border-radius:999px;font-size:13.5px;cursor:pointer}
  .mtab.is-on{background:var(--ink);color:#fff;border-color:var(--ink)}
  .studio{grid-template-columns:minmax(0,1fr)}
  .studio[data-view="edit"] .stage{display:none}
  .studio[data-view="preview"] .panel{display:none}
  .panel{border-right:none;padding:16px 16px 32px}
  .stage{position:static;height:auto}
  .stage-scroll{overflow:visible;padding:20px 16px 40px}
}
@media (max-width:640px){
  .topbar{padding:14px 16px}
  .actions .btn{height:34px;padding:0 12px;font-size:12.5px}
  .tpl-grid{grid-template-columns:repeat(2,1fr)}
  .fields,.design-grid{grid-template-columns:minmax(0,1fr)}
  .profile-grid{grid-template-columns:minmax(0,1fr)}
  .photo-box{flex-direction:row;align-items:flex-end}
  .photo-acts{flex-direction:column;align-items:flex-start}
  .stage-bar{padding:10px 16px;gap:10px}
}
@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}

/* =====================================================================
   A4 시트 (미리보기 · 인쇄 공통)
   ===================================================================== */
.sheet{--ac:#2f4bd8;--rf:"Noto Sans KR",sans-serif;--fs:1;--tint:color-mix(in srgb,var(--ac) 8%,#fff);
  position:relative;width:210mm;min-height:297mm;background:#fff;color:#232323;font-family:var(--rf);
  font-size:calc(9.3pt * var(--fs));line-height:1.62;letter-spacing:-.005em;word-break:keep-all;overflow-wrap:anywhere;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.sheet h1,.sheet h2,.sheet h3,.sheet p,.sheet dl,.sheet dd{margin:0}
.sheet a{color:inherit;text-decoration:none}
.sheet ul{margin:.2em 0 0;padding-left:1.15em}
.sheet li{margin:.12em 0}
.sheet li::marker{color:var(--ac)}
.sheet .e-body p+p{margin-top:.35em}
.sheet h2{break-after:avoid}
.sheet .entry,.sheet tr,.sheet .pill,.sheet .c-q{break-inside:avoid}
.sheet .e-link{margin-top:.3em;font-size:.88em;color:var(--ac)}
.sheet .mono,.sheet .e-when{font-variant-numeric:tabular-nums}
.sheet .muted{color:#7a7a7a;font-size:.92em}
/* 사진 */
.sheet [class$="-photo"] img,.sheet .shape-rect img,.sheet .shape-round img,.sheet .shape-circle img{width:100%;height:100%;object-fit:cover;display:block}
.shape-rect{aspect-ratio:3/4}
.shape-round{aspect-ratio:3/4;border-radius:3mm;overflow:hidden}
.shape-circle{aspect-ratio:1/1;border-radius:50%;overflow:hidden}
.is-empty{display:grid;place-items:center;border:.3mm dashed #c9c9c9;background:#fafafa;color:#b5b5b5;font-size:8pt;letter-spacing:.2em}
/* 숙련도 */
.dots{display:inline-flex;gap:1.1mm}
.dots i{width:2.1mm;height:2.1mm;border-radius:50%;border:.3mm solid var(--ac)}
.dots i.on{background:var(--ac)}
.lvbar{display:block;height:1.3mm;border-radius:2mm;background:rgba(0,0,0,.08);overflow:hidden}
.lvbar i{display:block;height:100%;background:var(--ac);border-radius:2mm}
/* 서명란 */
.pledge{margin-top:12mm;text-align:center;font-size:1em;color:#333;break-inside:avoid}
.pledge-date{margin-top:5mm !important;letter-spacing:.06em}
.pledge-sign{margin-top:5mm !important;text-align:right}
.pledge-sign b{font-size:1.15em;margin:0 2mm;letter-spacing:.2em}
.seal{color:#9a9a9a}

/* ---------- 1. 클래식 ---------- */
.t-classic{padding:15mm 16mm 16mm}
.c-top{display:flex;align-items:baseline;justify-content:center;gap:4mm;padding-bottom:4mm;margin-bottom:6mm;border-bottom:.7mm solid #222;position:relative}
.c-top::after{content:"";position:absolute;left:0;right:0;bottom:-1.7mm;border-bottom:.25mm solid #222}
.c-doc{font-size:21pt;font-weight:700;letter-spacing:.7em;margin-right:-.7em !important}
.c-doc-en{position:absolute;right:0;bottom:3mm;font-size:7pt;letter-spacing:.35em;color:var(--ac);font-weight:600}
.c-id{display:grid;grid-template-columns:31mm 1fr;gap:5mm;align-items:start}
.c-id.no-photo{grid-template-columns:1fr}
.c-photo{width:31mm}
.c-info{width:100%;border-collapse:collapse;border-top:.5mm solid #222}
.c-info th,.c-info td{border-bottom:.25mm solid #d6d6d6;padding:1.55mm 3mm;text-align:left;vertical-align:middle}
.c-info th{width:25mm;background:var(--tint);font-weight:600;font-size:.9em;color:#333;letter-spacing:.05em}
.c-name{font-size:13.5pt;letter-spacing:.12em}
.c-en{margin-left:3mm;font-size:.85em;color:#888;letter-spacing:.14em}
.c-headline{margin-top:5mm !important;padding:3mm 4.5mm;border-left:1mm solid var(--ac);background:#f6f6f5;font-size:1.02em;line-height:1.65}
.c-sec{margin-top:7.5mm}
.c-sec h2{display:flex;align-items:center;gap:3mm;font-size:11.5pt;font-weight:700;color:#111;margin-bottom:2.6mm !important}
.c-sec h2::before{content:"";width:1.6mm;height:4.2mm;background:var(--ac)}
.c-table{width:100%;border-collapse:collapse;border-top:.5mm solid #222;font-size:.96em}
.c-table th{background:#f3f3f2;font-weight:600;font-size:.9em;color:#444;padding:1.6mm 2.5mm;border-bottom:.25mm solid #bdbdbd;text-align:left}
.c-table td{padding:2.1mm 2.5mm;border-bottom:.25mm solid #e1e1e1;vertical-align:top}
.c-table td.c,.c-table th.w-s{text-align:center}
.c-table .w-when{width:31mm}.c-table .w-org{width:44mm}.c-table .w-s{width:19mm}.c-table .w-m{width:26mm}
.c-table td.mono{color:#555;font-size:.92em}
.c-table .rich ul{margin-top:0}
.sheet .c-skills .skill-dots{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;column-gap:8mm;border-top:.5mm solid #222}
.skill-dots li{display:flex;align-items:center;justify-content:space-between;gap:3mm;padding:1.8mm 1mm;border-bottom:.25mm solid #e1e1e1;margin:0}
.c-intro .c-q{padding:3.5mm 0;border-bottom:.25mm solid #e1e1e1}
.c-intro .c-q:first-child{border-top:.5mm solid #222}
.c-q h3{font-size:1.06em;font-weight:700;margin-bottom:1.5mm;color:var(--ac)}
.c-q h3::before{content:"Q. ";color:#bbb;font-weight:500}

/* ---------- 2. 모던 2단 ---------- */
.t-modern{--side:color-mix(in srgb,var(--ac) 9%,#fff);background:linear-gradient(90deg,var(--side) 0 68mm,#fff 68mm)}
.m-grid{display:grid;grid-template-columns:68mm 1fr;min-height:297mm}
.m-side{padding:16mm 8mm 14mm 10mm;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.m-main{padding:17mm 15mm 14mm 11mm;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.m-photo{width:34mm;margin-bottom:8mm}
.m-photo.shape-rect{border-radius:1mm;overflow:hidden}
.m-side h2,.m-main h2{font-size:8.2pt;font-weight:700;letter-spacing:.2em;color:var(--ac);margin-bottom:3mm !important;display:flex;align-items:center;gap:2.5mm}
.m-main h2::after{content:"";flex:1;height:.25mm;background:color-mix(in srgb,var(--ac) 30%,#fff)}
.m-contact dl{display:flex;flex-direction:column;gap:2.4mm}
.m-contact dt{font-size:7pt;letter-spacing:.12em;color:#7d7d7d}
.m-contact dd{font-size:.94em;line-height:1.45;word-break:break-all}
.m-sec{margin-top:8mm}
.m-head h1{font-size:27pt;font-weight:800;letter-spacing:-.02em;line-height:1.12;color:#111}
.m-en{display:block;margin-top:1.2mm;font-size:8pt;letter-spacing:.3em;color:#9a9a9a}
.m-role{margin-top:3mm !important;font-size:11pt;font-weight:700;color:var(--ac)}
.m-headline{margin-top:4mm !important;padding-bottom:5mm;border-bottom:.3mm solid #e6e6e6;font-size:1.04em;color:#444;line-height:1.72}
.m-main .entry{margin-bottom:4.6mm}
.e-head{display:flex;justify-content:space-between;align-items:baseline;gap:3mm}
.e-title{font-weight:700;font-size:1.08em;color:#151515}
.e-when{font-size:.86em;color:#888;white-space:nowrap}
.e-sub{color:#666;font-size:.94em;margin-top:.3mm}
.e-body{margin-top:1.4mm;color:#333}
.m-main .e-sub{color:var(--ac);font-weight:500}
.m-side .entry{margin-bottom:3.4mm}
.m-side .e-head{display:block}
.m-side .e-title{font-size:1em}
.m-side .e-when{display:block;font-size:.84em;white-space:normal}
.m-side .e-sub{font-size:.88em}
.sheet .skill-bars{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:2.6mm}
.skill-bars li{margin:0;display:flex;flex-direction:column;gap:1.1mm;font-size:.94em}
.t-modern .lvbar{background:rgba(255,255,255,.95);box-shadow:inset 0 0 0 .2mm color-mix(in srgb,var(--ac) 25%,#fff)}

/* ---------- 3. 미니멀 ---------- */
.t-minimal{padding:20mm 20mm 18mm}
.n-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10mm}
.n-head h1{font-size:30pt;font-weight:300;letter-spacing:-.025em;line-height:1.08;color:#111}
.n-role{margin-top:2.5mm !important;font-size:11pt;color:#222;font-weight:500}
.n-role span{color:#a0a0a0;font-weight:400;letter-spacing:.12em;font-size:.82em}
.n-contact{margin-top:4.5mm !important;display:flex;flex-wrap:wrap;gap:1mm 5mm;font-size:.9em;color:#6d6d6d}
.n-contact span::before{content:"";display:inline-block;width:1mm;height:1mm;border-radius:50%;background:var(--ac);vertical-align:middle;margin:0 1.8mm .3mm 0}
.n-photo{width:25mm;flex:none}
.n-headline{margin-top:10mm !important;font-size:12pt;line-height:1.7;color:#1d1d1d;font-weight:400;max-width:150mm;letter-spacing:-.01em}
.n-sec{display:grid;grid-template-columns:28mm 1fr;gap:6mm;margin-top:9mm;padding-top:4.5mm;border-top:.25mm solid #e4e4e4}
.n-sec h2{font-size:8pt;font-weight:600;color:var(--ac);letter-spacing:.16em;padding-top:.6mm}
.n-sec .entry{margin-bottom:4.4mm}
.n-sec .entry:last-child{margin-bottom:0}
.n-sec .entry.wf{display:grid;grid-template-columns:27mm 1fr;gap:4mm}
.n-sec .entry.wf>.e-when{font-size:.84em;color:#9a9a9a;padding-top:.4mm;white-space:normal}
.n-sec .e-title{font-weight:600}
.skill-inline{display:flex;flex-wrap:wrap;gap:1.5mm 5mm}
.skill-inline small{color:#a0a0a0;font-size:.82em;margin-left:.6mm}

/* ---------- 4. 디자이너형 ---------- */
.t-designer{padding:15mm 15mm 15mm}
.d-head{display:grid;grid-template-columns:1fr auto;gap:8mm;align-items:end;padding-bottom:6mm;border-bottom:1.3mm solid #111}
.d-kicker{display:block;font-size:7.2pt;letter-spacing:.34em;color:var(--ac);font-weight:700}
.d-head h1{font-size:44pt;font-weight:900;letter-spacing:-.045em;line-height:1;margin-top:2.5mm !important;color:#111}
.d-en{display:block;margin-top:2.5mm;font-size:8.5pt;letter-spacing:.36em;color:#9a9a9a}
.d-role{display:inline-block;margin-top:4mm !important;background:var(--ac);color:#fff;padding:1.1mm 3.2mm;font-size:9.5pt;font-weight:700;letter-spacing:.02em}
.d-photo{width:33mm;position:relative;margin:0 3mm 3mm 0}
.d-photo::before{content:"";position:absolute;inset:3mm -3mm -3mm 3mm;background:var(--ac);border-radius:inherit;z-index:0}
.d-photo img{position:relative;z-index:1;border-radius:inherit}
.d-photo.shape-round,.d-photo.shape-circle{overflow:visible}
.d-photo.shape-round img{border-radius:3mm}.d-photo.shape-circle img{border-radius:50%}
.d-photo.is-empty::before{display:none}
.d-headline{margin-top:6mm !important;font-size:13.5pt;font-weight:500;line-height:1.55;letter-spacing:-.015em;color:#111}
.d-contact{display:grid;grid-template-columns:repeat(auto-fit,minmax(34mm,1fr));gap:3mm 4mm;margin-top:6mm !important;padding:3.5mm 0;border-top:.3mm solid #dcdcdc;border-bottom:.3mm solid #dcdcdc}
.d-contact dt{font-size:6.5pt;letter-spacing:.22em;color:var(--ac);font-weight:700}
.d-contact dd{font-size:.92em;margin-top:.6mm;word-break:break-all;line-height:1.4}
.d-sec{margin-top:8.5mm}
.d-sec h2{display:flex;align-items:baseline;gap:3mm;font-size:13pt;font-weight:800;letter-spacing:-.01em;margin-bottom:4.5mm !important;color:#111}
.d-no{font-size:22pt;font-weight:900;color:var(--ac);line-height:.9;letter-spacing:-.04em}
.d-sec-en{margin-left:auto;font-size:6.8pt;letter-spacing:.32em;color:#b0b0b0;font-weight:500}
.d-timeline .entry{display:grid;grid-template-columns:30mm 1fr;gap:0}
.d-timeline .entry>.e-when{font-size:.86em;font-weight:700;color:#111;white-space:normal;padding-top:.3mm;padding-right:4mm}
.d-timeline .e-main{position:relative;border-left:.4mm solid #e2e2e2;padding:0 0 5mm 6mm}
.d-timeline .entry:last-child .e-main{padding-bottom:1mm}
.d-timeline .e-main::before{content:"";position:absolute;left:-1.75mm;top:1.3mm;width:2.3mm;height:2.3mm;border-radius:50%;background:#fff;border:.7mm solid var(--ac)}
.d-timeline .e-sub{color:var(--ac);font-weight:500}
.d-cards{display:grid;grid-template-columns:1fr 1fr;gap:4mm}
.d-cards .entry{background:#f5f5f3;border-top:1mm solid var(--ac);padding:4mm 4.2mm 4.4mm}
.d-cards .e-head{display:block}
.d-cards .e-when{display:block;margin-top:.6mm;white-space:normal}
.d-cards .e-sub{margin-top:1mm;font-weight:500;color:#333}
.pills{display:flex;flex-wrap:wrap;gap:2.2mm}
.pill{display:inline-flex;align-items:center;gap:2.6mm;border:.3mm solid #1a1a1a;border-radius:99mm;padding:1.3mm 3.6mm 1.3mm 3.8mm;font-size:.95em}
.pill b{font-weight:600}
.pill .lvbar{width:10mm}
.d-intro .entry{margin-bottom:4.5mm}
.d-intro .e-title{display:inline-block;font-size:1.08em;border-bottom:.6mm solid var(--ac);padding-bottom:.4mm}
.d-certs .entry,.d-skills+.d-certs .entry{padding:2mm 0;border-bottom:.25mm solid #e6e6e6}
.d-certs .e-head{align-items:center}

/* =====================================================================
   인쇄: 시트만 A4로
   ===================================================================== */
@page{size:A4;margin:0}
@media print{
  html,body{background:#fff !important;margin:0 !important}
  body>:not(.app){display:none !important}
  .app{display:block;min-height:0 !important}
  .topbar,.mtabs,.panel,.stage-bar,.breaks,.toast,.modal{display:none !important}
  .studio{display:block !important}
  .studio .stage{display:block !important;position:static !important;height:auto !important;background:none !important}
  .stage-scroll{padding:0 !important;overflow:visible !important}
  .paper-wrap{width:auto !important;height:auto !important}
  .paper-scale{position:static !important;transform:none !important}
  .sheet{box-shadow:none !important;min-height:297mm !important;margin:0 !important}
  .is-empty{visibility:hidden}
  .t-modern .is-empty,.t-minimal .is-empty,.t-designer .is-empty{display:none}
  .m-grid{min-height:297mm}
  /* 모던 2단: 왼쪽 단 배경을 모든 쪽에 이어지게 (문서 배경은 쪽마다 칠해짐) */
  html.rb-modern{background:linear-gradient(90deg,color-mix(in srgb,var(--rb-ac,#2f4bd8) 9%,#fff) 0 68mm,#fff 68mm) !important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  html.rb-modern body,html.rb-modern .t-modern{background:transparent !important}
}

/* 글자 크기 직접 입력칸 */
.field-label--num{display:flex;justify-content:space-between;align-items:center;gap:8px}
.field-label--num .tb-num{height:26px;font-size:12px}
.field .tb-presets{margin-top:2px}
.tb-num-wrap .tb-num{color:var(--ink)}

/* 다크 모드 (인쇄는 라이트 그대로): A4 시트 미리보기와 템플릿 썸네일은 종이라서 흰색 유지 */
@media screen{
  :root[data-theme="dark"]{
    color-scheme:dark;
    --bg:#141318; --surface:#1a1920; --panel:#1f1e26; --panel-soft:#24232c;
    --ink:#ecebf0; --ink-hover:#ffffff; --ink-2:#c9c7d1; --sub:#a09eab; --muted:#8a8895;
    --line:#2e2d36; --line-2:#393843; --line-3:#26252d; --hover:#2a2932; --soft:#26252d; --track:#34333d;
    --accent:#7b8fff; --desk:#18171d;
  }
  :root[data-theme="dark"] .btn--solid,:root[data-theme="dark"] .zbtn.is-on,:root[data-theme="dark"] .mtab.is-on,:root[data-theme="dark"] .toast{color:var(--bg)}
  :root[data-theme="dark"] .text-input:focus,:root[data-theme="dark"] .sec-title:focus{background:var(--panel)}
  :root[data-theme="dark"] .stage{background-image:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1.2px)}
  :root[data-theme="dark"] .stage-bar{border-bottom-color:var(--line);background:rgba(26,25,32,.8)}
  :root[data-theme="dark"] .sheet{box-shadow:0 1px 2px rgba(0,0,0,.3),0 24px 60px rgba(0,0,0,.5)}
  :root[data-theme="dark"] .brk{border-top-color:rgba(255,122,92,.8)}
  :root[data-theme="dark"] .brk span{color:#ff8a6e}
  :root[data-theme="dark"] .tpl.is-on{background:var(--hover);box-shadow:0 0 0 3px rgba(255,255,255,.06)}
  :root[data-theme="dark"] .sw{box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
  :root[data-theme="dark"] .sw.is-on{box-shadow:0 0 0 2px var(--panel),0 0 0 4px var(--c)}
  :root[data-theme="dark"] .photo-drop:hover,:root[data-theme="dark"] .photo-drop.is-over,:root[data-theme="dark"] .add:hover{background:var(--hover)}
  :root[data-theme="dark"] .ibtn.is-off,:root[data-theme="dark"] .saved.is-warn{color:#ff8a6e}
  :root[data-theme="dark"] .tb-presets button[aria-pressed="true"]{color:var(--bg)}
  :root[data-theme="dark"] .modal{background:rgba(0,0,0,.6)}
  :root[data-theme="dark"] .modal-box{background:var(--panel);box-shadow:0 0 0 1px var(--line),0 30px 80px rgba(0,0,0,.5)}
}

/* 영어판 전용 (lang="en"에서만 붙는 클래스): US Letter 용지 · 영어식 클래식 머리말 */
.paper-scale.paper-letter,.sheet.paper-letter{width:215.9mm}
.sheet.paper-letter{min-height:279.4mm}
.paper-letter .m-grid{min-height:279.4mm}
@media print{
  .sheet.paper-letter{min-height:279.4mm !important}
  .paper-letter .m-grid{min-height:279.4mm}
}
.c-top.en-top{flex-direction:column;align-items:center;gap:1.4mm;padding-bottom:4.5mm}
.c-doc.en-name{font-size:20pt;letter-spacing:.03em;margin-right:0 !important;text-align:center}
.en-role{font-size:1.08em;font-weight:600;color:var(--ac);letter-spacing:.02em;text-align:center}
.en-contact{display:flex;flex-wrap:wrap;justify-content:center;gap:.6mm 0;color:#444;font-size:.94em;margin-top:.6mm !important}
.en-contact span+span::before{content:"·";margin:0 2.4mm;color:#aaa}
.c-sec.en-sec h2{padding-bottom:1.3mm;border-bottom:.3mm solid #cfcfcf}
.c-sec.en-sec .entry{margin-bottom:3.4mm}
.c-sec.en-sec .entry:last-child{margin-bottom:0}
