/* 테마 공통 (스틸코디아식 6톤) — html[data-theme] */
:root, html[data-theme="emerald"] {
    --bg: #f2f5f4; --card: #fff; --line: #e0e6e4; --line2: #cbd4d1; --text: #15211f; --muted: #63706d;
    --accent: #0e7c66; --accent2: #e2f3ee; --accent3: #0a5a4a; --accent-soft: #9fd3c4;
    --side: #0c1f1c; --side2: #15302b; --side-text: #c3cecb; --side-muted: #5f7671; --side-hover: #163a33;
    --side-ico: #17332d; --side-ico-fg: #7fd6bf; --side-kbd: rgba(255,255,255,.06); --side-kbd-bd: rgba(255,255,255,.12);
    --side-on: #0e7c66; --side-line: #183630; --side-link: #7fd6bf; --side-badge: #e0592a;
    --top-bg: rgba(242,245,244,.92); --login-g1: #17725f; --login-g2: #0c3a32; --login-g3: #061210;
    --logo-a: #23a688; --logo-b: #0a5a4a; --hl-a: #0c3a32; --hl-b: #0e7c66; --hl-muted: #b4dcd1;
    --bar-a: #6cc9b1; --bar-b: #0e7c66; --table-head: #f4f7f6; --table-head2: #e9f0ee; --row-alt: #f7faf9; --row-hover: #f1f8f5; --row-sel: #e5f4ef;
    --calc-bg: #f6faf9; --calc-bd: #d4e8e2; --of-meta: #c8dfd7;
    --red: #d6342a; --red2: #fdecea; --green: #138a55; --green2: #e3f5ec;
    --amber: #b26a00; --amber2: #fff4dc; --blue: #1f5bb5; --blue2: #e6eefb; --violet: #7c4dda; --violet2: #f0eafc;
}
html[data-theme="navy"] {
    --bg: #f3f5f9; --card: #fff; --line: #e2e6ef; --line2: #c9d0de; --text: #141a28; --muted: #5f6b82;
    --accent: #3b6ef5; --accent2: #e8eefc; --accent3: #1e4ad0; --accent-soft: #9db4f8;
    --side: #0f172a; --side2: #1e293b; --side-text: #c7d2e5; --side-muted: #64748b; --side-hover: #243247;
    --side-ico: #243447; --side-ico-fg: #93c5fd; --side-kbd: rgba(255,255,255,.06); --side-kbd-bd: rgba(148,163,184,.28);
    --side-on: rgba(59,110,245,.28); --side-line: #243247; --side-link: #93c5fd; --side-badge: #64748b;
    --top-bg: rgba(243,245,249,.92); --login-g1: #3b6ef5; --login-g2: #1e3a8a; --login-g3: #0b1224;
    --logo-a: #60a5fa; --logo-b: #1d4ed8; --hl-a: #1e3a8a; --hl-b: #3b6ef5; --hl-muted: #bfdbfe;
    --bar-a: #93c5fd; --bar-b: #3b6ef5; --table-head: #f4f6fb; --table-head2: #e8edf8; --row-alt: #f6f8fc; --row-hover: #eef3ff; --row-sel: #e0e9ff;
    --calc-bg: #f5f7fc; --calc-bd: #d7dff0; --of-meta: #c5d0e6;
    --red: #dc2626; --red2: #fee2e2; --green: #059669; --green2: #d1fae5;
    --amber: #b45309; --amber2: #fef3c7; --blue: #2563eb; --blue2: #dbeafe; --violet: #7c3aed; --violet2: #ede9fe;
}
html[data-theme="slate"] {
    --bg: #f4f5f6; --card: #fff; --line: #e3e5e8; --line2: #c4c4c8; --text: #18181b; --muted: #71717a;
    --accent: #52525b; --accent2: #f4f4f5; --accent3: #3f3f46; --accent-soft: #a1a1aa;
    --side: #18181b; --side2: #27272a; --side-text: #d4d4d8; --side-muted: #71717a; --side-hover: #2e2e33;
    --side-ico: #3f3f46; --side-ico-fg: #a1a1aa; --side-kbd: rgba(255,255,255,.05); --side-kbd-bd: rgba(255,255,255,.12);
    --side-on: #3f3f46; --side-line: #2e2e33; --side-link: #a1a1aa; --side-badge: #71717a;
    --top-bg: rgba(244,245,246,.92); --login-g1: #52525b; --login-g2: #27272a; --login-g3: #09090b;
    --logo-a: #a1a1aa; --logo-b: #3f3f46; --hl-a: #27272a; --hl-b: #52525b; --hl-muted: #d4d4d8;
    --bar-a: #a1a1aa; --bar-b: #52525b; --table-head: #f4f4f5; --table-head2: #e4e4e7; --row-alt: #f7f7f8; --row-hover: #f4f4f5; --row-sel: #e4e4e7;
    --calc-bg: #fafafa; --calc-bd: #e4e4e7; --of-meta: #d4d4d8;
    --red: #dc2626; --red2: #fee2e2; --green: #16a34a; --green2: #dcfce7;
    --amber: #a16207; --amber2: #fef9c3; --blue: #2563eb; --blue2: #dbeafe; --violet: #7c3aed; --violet2: #ede9fe;
}
html[data-theme="violet"] {
    --bg: #f6f4fa; --card: #fff; --line: #e7e2ef; --line2: #d2c9e0; --text: #1c1528; --muted: #6b6280;
    --accent: #7c4dda; --accent2: #f0eafc; --accent3: #5b21b6; --accent-soft: #c4b5fd;
    --side: #1a1030; --side2: #2a1b4a; --side-text: #d8d0ec; --side-muted: #8b7eab; --side-hover: #32225a;
    --side-ico: #3b2a63; --side-ico-fg: #c4b5fd; --side-kbd: rgba(255,255,255,.06); --side-kbd-bd: rgba(196,181,253,.25);
    --side-on: rgba(124,77,218,.35); --side-line: #32225a; --side-link: #c4b5fd; --side-badge: #a78bfa;
    --top-bg: rgba(246,244,250,.92); --login-g1: #7c4dda; --login-g2: #4c1d95; --login-g3: #12081f;
    --logo-a: #a78bfa; --logo-b: #5b21b6; --hl-a: #4c1d95; --hl-b: #7c4dda; --hl-muted: #ddd6fe;
    --bar-a: #c4b5fd; --bar-b: #7c4dda; --table-head: #f6f3fb; --table-head2: #ebe4f7; --row-alt: #f8f6fb; --row-hover: #f3eeff; --row-sel: #ebe0ff;
    --calc-bg: #f7f4fc; --calc-bd: #ddd2f0; --of-meta: #d0c3e8;
    --red: #dc2626; --red2: #fee2e2; --green: #059669; --green2: #d1fae5;
    --amber: #b45309; --amber2: #fef3c7; --blue: #4f46e5; --blue2: #e0e7ff; --violet: #7c4dda; --violet2: #f0eafc;
}
html[data-theme="amber"] {
    --bg: #f7f4ef; --card: #fff; --line: #ebe3d6; --line2: #d9ccb8; --text: #1f1810; --muted: #7a6c59;
    --accent: #c27803; --accent2: #fff4dc; --accent3: #92400e; --accent-soft: #f0c674;
    --side: #1c150e; --side2: #2c2218; --side-text: #e4d7c5; --side-muted: #8a7a66; --side-hover: #3a2e20;
    --side-ico: #3f3224; --side-ico-fg: #f0c674; --side-kbd: rgba(255,255,255,.06); --side-kbd-bd: rgba(240,198,116,.25);
    --side-on: rgba(194,120,3,.38); --side-line: #3a2e20; --side-link: #f0c674; --side-badge: #d97706;
    --top-bg: rgba(247,244,239,.92); --login-g1: #d97706; --login-g2: #78350f; --login-g3: #140e08;
    --logo-a: #fbbf24; --logo-b: #92400e; --hl-a: #78350f; --hl-b: #c27803; --hl-muted: #fde68a;
    --bar-a: #f0c674; --bar-b: #c27803; --table-head: #f7f2ea; --table-head2: #efe5d6; --row-alt: #faf7f2; --row-hover: #faf4ea; --row-sel: #f3e8d4;
    --calc-bg: #faf6f0; --calc-bd: #e6d7c0; --of-meta: #d9c8ae;
    --red: #dc2626; --red2: #fee2e2; --green: #15803d; --green2: #dcfce7;
    --amber: #b45309; --amber2: #fef3c7; --blue: #1d4ed8; --blue2: #dbeafe; --violet: #7c3aed; --violet2: #ede9fe;
}
html[data-theme="rose"] {
    --bg: #f7f3f4; --card: #fff; --line: #ebe0e3; --line2: #d7c4ca; --text: #1f1418; --muted: #7a636b;
    --accent: #c2417a; --accent2: #fce7f0; --accent3: #9d174d; --accent-soft: #f0a8c4;
    --side: #1c1016; --side2: #2d1822; --side-text: #e4ced6; --side-muted: #8a6f78; --side-hover: #3a2230;
    --side-ico: #432633; --side-ico-fg: #f0a8c4; --side-kbd: rgba(255,255,255,.06); --side-kbd-bd: rgba(240,168,196,.25);
    --side-on: rgba(194,65,122,.35); --side-line: #3a2230; --side-link: #f0a8c4; --side-badge: #db2777;
    --top-bg: rgba(247,243,244,.92); --login-g1: #db2777; --login-g2: #9d174d; --login-g3: #14080d;
    --logo-a: #f472b6; --logo-b: #9d174d; --hl-a: #9d174d; --hl-b: #c2417a; --hl-muted: #fbcfe8;
    --bar-a: #f0a8c4; --bar-b: #c2417a; --table-head: #f8f2f4; --table-head2: #f0e4e9; --row-alt: #faf6f8; --row-hover: #faf0f4; --row-sel: #f5e4ec;
    --calc-bg: #faf5f7; --calc-bd: #e8d3db; --of-meta: #dbc4cd;
    --red: #dc2626; --red2: #fee2e2; --green: #059669; --green2: #d1fae5;
    --amber: #b45309; --amber2: #fef3c7; --blue: #2563eb; --blue2: #dbeafe; --violet: #c2417a; --violet2: #fce7f0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Pretendard', 'Malgun Gothic', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c { text-align: center; }
.mu { color: var(--muted); }
.red { color: var(--red); }
.blue { color: var(--blue); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.b { font-weight: 700; }
.sp { flex: 1; }

/* 로그인 */
#login { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 78% 18%, var(--login-g1) 0%, var(--login-g2) 45%, var(--login-g3) 100%); }
.lg-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lg-box { width: 100%; background: #fff; border-radius: 18px; padding: 34px 28px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.lg-mark { display: block; width: 168px; height: auto; margin: 0 auto 4px; object-fit: contain; }
.lg-box h1 { margin: 10px 0 4px; font-size: 1.22rem; text-align: center; }
.lg-box p { margin: 0 0 18px; color: var(--muted); font-size: 0.86rem; text-align: center; }
.lg-fld { margin-bottom: 10px; }
.lg-fld label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin: 0 0 6px 2px; }
.lg-box input[type=password], .lg-box input[type=text] { width: 100%; height: 45px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 14px; font-size: 0.98rem; outline: none; }
.lg-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent2); }
.lg-box > button[type=submit] { margin-top: 10px; width: 100%; height: 46px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }
.lg-box > button[type=submit]:hover { background: var(--accent3); }
.lg-box > button[type=submit]:disabled { opacity: 0.6; cursor: wait; }
.lg-err { color: var(--red); font-size: 0.84rem; min-height: 1.2em; margin-top: 10px; }
.lg-foot { margin-top: 16px; font-size: 0.74rem; color: #8c9895; text-align: center; line-height: 1.5; }
.lg-credit { color: rgba(255,255,255,.28); font-size: 0.68rem; letter-spacing: 0.02em; text-decoration: none; cursor: pointer; transition: color .15s, opacity .15s; }
.lg-credit:hover { color: rgba(255,255,255,.72); }
.acc-pick { display: grid; gap: 10px; }
.acc-g b { display: block; font-size: 0.68rem; font-weight: 800; color: #94a3b8; letter-spacing: 0.04em; margin: 0 0 6px 2px; }
.acc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.acc-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 0; padding: 8px 8px; border: 1px solid var(--line2); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; min-width: 0; }
.acc-chip strong { font-size: 0.82rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.acc-chip span { font-size: 0.68rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.acc-chip:hover { border-color: var(--accent-soft); background: color-mix(in srgb, var(--accent2) 45%, #fff); }
.acc-chip.on { border-color: var(--accent); background: var(--accent2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 80%, transparent); }
.acc-chip.bs.on { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.acc-chip.cur { opacity: 0.55; }
.acc-empty { font-size: 0.8rem; color: var(--muted); padding: 10px 4px; }
.mbox .acc-pick { margin: 4px 0 12px; }
.mbox .acc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 480px) { .acc-grid, .mbox .acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 레이아웃 */
#app { display: flex; min-height: 100%; }
#side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    z-index: 30;
    color: var(--side-text);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background:
        radial-gradient(ellipse 130% 55% at 8% -8%, color-mix(in srgb, var(--side-link) 16%, transparent), transparent 58%),
        radial-gradient(ellipse 70% 45% at 110% 92%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
        linear-gradient(165deg, color-mix(in srgb, var(--side) 82%, #fff) 0%, var(--side) 38%, color-mix(in srgb, var(--side) 88%, #000) 100%);
    border-right: 1px solid color-mix(in srgb, var(--side-line) 70%, transparent);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.035);
}
#side::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        repeating-linear-gradient(
            -18deg,
            transparent 0,
            transparent 28px,
            rgba(255, 255, 255, 0.016) 28px,
            rgba(255, 255, 255, 0.016) 29px
        ),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0, transparent 42%);
}
#side::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 6%, color-mix(in srgb, var(--side-link) 35%, transparent) 28%, rgba(255, 255, 255, 0.12) 52%, transparent 88%);
    opacity: 0.7;
}
#side > * { position: relative; z-index: 1; }
.brand { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px 12px; color: #fff; }
.brand-mark {
    position: relative;
    display: block;
    width: 158px;
    cursor: default;
    isolation: isolate;
    outline: none;
}
.brand-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}
/* 무빙월 3패널 — 호버 시 아래에서 조립 */
.brand-mw {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: -1px;
    height: 3px;
    z-index: 2;
    pointer-events: none;
    display: flex;
    gap: 3px;
    transform: skewX(-18deg);
    overflow: hidden;
}
.brand-mw i {
    flex: 1;
    display: block;
    border-radius: 1px;
    transform: translateX(-120%);
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}
.brand-mw i:nth-child(1) { background: #e52d27; transition-delay: 0s; }
.brand-mw i:nth-child(2) { background: #2b32b2; transition-delay: 0.07s; }
.brand-mw i:nth-child(3) { background: #7cc028; transition-delay: 0.14s; }
.brand-shine {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}
.brand-shine::before {
    content: "";
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: 0;
    width: 42%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 38%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 62%,
        transparent 100%
    );
    transform: translateX(-140%) skewX(-18deg);
    opacity: 0;
}
.brand-mark:hover .brand-logo,
.brand-mark:focus-visible .brand-logo {
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.07) contrast(1.03);
}
.brand-mark:hover .brand-mw i,
.brand-mark:focus-visible .brand-mw i {
    transform: translateX(0);
    opacity: 1;
}
.brand-mark:hover .brand-shine::before,
.brand-mark:focus-visible .brand-shine::before {
    opacity: 1;
    animation: brand-wall-sweep 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.brand:has(.brand-mark:hover) small,
.brand:has(.brand-mark:focus-visible) small {
    color: color-mix(in srgb, var(--side-link) 55%, var(--side-muted));
}
.brand small {
    display: block;
    font-size: 0.71rem;
    color: var(--side-muted);
    font-weight: 500;
    padding-left: 2px;
    transition: color 0.35s ease;
}
/* 로고 호버 · 시스템 크레딧 카드 (우측 메인 영역) */
.brand-tip {
    position: fixed;
    left: calc(248px + 12px);
    top: 18px;
    width: min(292px, calc(100vw - 280px));
    z-index: 45;
    padding: 13px 14px 12px;
    border-radius: 12px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, #f3f6f5 100%);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 18px 40px rgba(6, 18, 16, 0.22),
        0 2px 0 rgba(255, 255, 255, 0.85) inset,
        0 0 0 1px rgba(255, 255, 255, 0.35) inset;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-8px) scale(0.985);
    filter: blur(1px);
    transition:
        opacity 0.22s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.22s,
        filter 0.22s ease;
}
.brand-tip::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 22px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #fff 35%, #f3f6f5 100%);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    transform: rotate(45deg);
    border-radius: 2px;
}
/* 사이드 → 카드 사이 호버 브릿지 */
.brand-tip::after {
    content: "";
    position: absolute;
    right: 100%;
    top: -8px;
    bottom: -8px;
    width: 18px;
}
.brand-tip-rail {
    display: flex;
    gap: 3px;
    height: 2px;
    margin: 0 0 10px;
    transform: skewX(-16deg);
}
.brand-tip-rail i {
    flex: 1;
    display: block;
    border-radius: 1px;
    opacity: 0.92;
}
.brand-tip-rail i:nth-child(1) { background: #e52d27; }
.brand-tip-rail i:nth-child(2) { background: #2b32b2; }
.brand-tip-rail i:nth-child(3) { background: #7cc028; }
.brand-tip-name {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: #0b1220;
}
.brand-tip-name em {
    margin-left: 5px;
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    vertical-align: 1px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.brand-tip-des,
.brand-tip-by {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.45;
    color: #64748b;
    font-weight: 500;
}
.brand-tip-des {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}
.brand-tip-des a {
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    color: #0f172a;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size 0.25s ease, color 0.2s ease;
}
.brand-tip-des a:hover {
    color: var(--accent3, #0a5a4a);
    background-size: 100% 1px;
}
.brand-tip-by {
    margin-top: 3px;
    letter-spacing: 0.01em;
}
.brand:hover .brand-tip,
.brand:focus-within .brand-tip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    filter: none;
}
@keyframes brand-wall-sweep {
    from { transform: translateX(-140%) skewX(-18deg); }
    to { transform: translateX(280%) skewX(-18deg); }
}
@media (prefers-reduced-motion: reduce) {
    .brand-logo,
    .brand-mw i,
    .brand small,
    .brand-tip { transition: none; }
    .brand-mark:hover .brand-logo,
    .brand-mark:focus-visible .brand-logo { transform: none; filter: brightness(1.05); }
    .brand-mark:hover .brand-mw i,
    .brand-mark:focus-visible .brand-mw i { transform: none; opacity: 0.85; }
    .brand-mark:hover .brand-shine::before,
    .brand-mark:focus-visible .brand-shine::before { animation: none; opacity: 0; }
    .brand:hover .brand-tip,
    .brand:focus-within .brand-tip { filter: none; transform: none; }
}
.me {
    margin: 0 14px 6px;
    padding: 10px 11px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--side2) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--side-line) 75%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    color: var(--side-muted);
    backdrop-filter: blur(6px);
}
.me.switchable { cursor: pointer; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.me.switchable:hover { border-color: color-mix(in srgb, var(--side-link) 35%, transparent); background: color-mix(in srgb, var(--side2) 70%, var(--side-hover)); }
.me-top { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 0.86rem; font-weight: 700; margin-bottom: 3px; }
.me-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 6px; font-size: 0.68rem; font-weight: 700; background: color-mix(in srgb, var(--side-link) 22%, transparent); color: var(--side-link); flex: none; }
.me-badge.bs { background: rgba(96, 165, 250, 0.2); color: #93c5fd; }
.me-switch { margin-left: auto; flex: none; font-size: 0.68rem; font-weight: 700; color: var(--side-link); opacity: 0.85; text-decoration: underline; text-underline-offset: 2px; }
.me.switchable:hover .me-switch { opacity: 1; }
.me-sub { line-height: 1.35; }
.me select { width: 100%; margin-top: 6px; height: 29px; border-radius: 7px; border: 1px solid var(--side-line); background: var(--side); color: #fff; padding: 0 6px; font-size: 0.8rem; }
#nav { padding: 2px 10px 8px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.nav-ref {
    flex: none;
    margin-top: auto;
    padding: 8px 10px 4px;
    border-top: 1px solid color-mix(in srgb, var(--side-line) 80%, transparent);
}
.nav-ref .ref-fold {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: none;
    color: var(--side-muted);
    font: 700 0.72rem/1 Pretendard, "Malgun Gothic", sans-serif;
    letter-spacing: 0.06em;
    padding: 8px 10px 6px;
    cursor: default;
}
.nav-ref .ref-fold svg { width: 14px; height: 14px; opacity: 0.75; flex: none; }
.nav-ref .ref-grp {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 4px 18px;
    padding-left: 8px;
    border-left: 1px solid color-mix(in srgb, var(--side-link) 22%, transparent);
}
.nav-ref button.ref-item,
.nav-ref button.set-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--side-text);
    text-align: left;
    padding: 7px 10px;
    border-radius: 9px;
    font: 500 0.82rem/1.2 Pretendard, "Malgun Gothic", sans-serif;
    cursor: pointer;
    position: relative;
}
.nav-ref button.ref-item .nav-ico,
.nav-ref button.set-item .nav-ico {
    width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none;
    background: color-mix(in srgb, var(--side-ico) 72%, transparent);
    color: var(--side-ico-fg);
}
.nav-ref button.ref-item .nav-ico svg,
.nav-ref button.set-item .nav-ico svg { width: 14px; height: 14px; display: block; }
.nav-ref button.ref-item:hover,
.nav-ref button.set-item:hover { background: var(--side-hover); color: #fff; }
.nav-ref button.ref-item.on,
.nav-ref button.set-item.on {
    background: var(--side-on); color: #fff; font-weight: 600;
}
.nav-ref button.ref-item.on::before,
.nav-ref button.set-item.on::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--side-link);
}
.nav-ref button.set-item { margin-top: 4px; }
.nav-ref button.set-item kbd {
    flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
    border: 1px solid var(--side-kbd-bd); background: var(--side-kbd); color: var(--side-muted);
    font-family: inherit; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center;
}
.nav-ref button.set-item.on kbd { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.12); }
@media (max-width: 900px) { #status .st-sys { display: none; } }
#nav .grp { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: none; color: var(--side-muted); padding: 16px 10px 7px; opacity: 0.92; }
#nav button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: none;
    color: inherit;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    transition: background 0.18s ease, color 0.18s ease;
}
#nav button .nav-ico {
    width: 28px;
    height: 28px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--side-ico) 72%, transparent);
    color: var(--side-ico-fg);
    opacity: 0.88;
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
#nav button .nav-ico svg { width: 15px; height: 15px; display: block; }
#nav button .nav-lab { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nav button .nav-badge { flex: none; font-size: 0.68rem; font-weight: 700; background: var(--side-badge); color: #fff; border-radius: 9px; padding: 1px 6px; line-height: 1.35; }
#nav button kbd { flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--side-kbd-bd); background: var(--side-kbd); color: var(--side-muted); font-family: inherit; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; letter-spacing: 0; }
#nav button:hover { background: var(--side-hover); color: #fff; }
#nav button:hover .nav-ico {
    opacity: 1;
    color: #fff;
    background: color-mix(in srgb, var(--side-link) 22%, var(--side-ico));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--side-link) 18%, transparent);
}
#nav button:hover kbd { color: #fff; border-color: rgba(255,255,255,.22); }
#nav button.on { background: var(--side-on); color: #fff; font-weight: 600; }
#nav button.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--side-link);
    opacity: 0.9;
}
#nav button.on .nav-ico {
    opacity: 1;
    color: #fff;
    background: color-mix(in srgb, var(--side-link) 28%, var(--side-ico));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--side-link) 28%, transparent);
}
#nav button.on kbd { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.12); }
#nav button.on .nav-badge { background: rgba(255,255,255,.22); }
.side-online { margin: 0 14px 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.04); border: 1px solid var(--side-line); font-size: 0.72rem; color: var(--side-muted); }
.side-online b { display: flex; align-items: center; gap: 5px; color: var(--side-link); font-size: 0.73rem; margin-bottom: 4px; }
.side-online b i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 2px rgba(34,197,94,.25); }
.online-list { display: flex; flex-wrap: wrap; gap: 4px; }
.online-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 6px; background: var(--side2); color: var(--side-text); font-size: 0.7rem; }
.online-tag.bs { background: #172a45; color: #bfdbfe; }
.side-foot { padding: 10px 16px 8px; font-size: 0.72rem; color: var(--side-muted); border-top: 1px solid var(--side-line); line-height: 1.6; }
.side-foot button { border: 0; background: none; color: var(--side-link); cursor: pointer; padding: 0; text-decoration: underline; font-size: 0.74rem; margin-right: 10px; }
.side-ft {
    flex: none;
    padding: 8px 12px 14px;
    font: 600 10px/1 Pretendard, "Segoe UI", sans-serif;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    color: color-mix(in srgb, var(--side-muted) 85%, transparent);
}
.side-ft b { font-weight: 700; color: color-mix(in srgb, #fff 72%, var(--side-link)); }
.side-ft i { margin: 0 6px; font-style: normal; color: var(--side-link); opacity: 0.75; }
#status .st-sys { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
#status .st-sys b { color: var(--ink); font-weight: 700; }
#status .st-n {
    flex: none; width: 26px; height: 22px; margin: 0; padding: 0;
    border-radius: 7px; border: 1px solid var(--line); background: #fff;
    color: var(--muted); font: 800 11px/1 Pretendard, "Segoe UI", sans-serif;
    cursor: pointer; letter-spacing: 0.02em;
}
#status .st-n:hover { border-color: var(--accent); color: var(--accent3); }
#status .st-n.on {
    background: var(--accent3); border-color: var(--accent3); color: #fff;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}
#tip {
    position: fixed; right: 16px; bottom: 44px; z-index: 30000; pointer-events: none;
    padding: 5px 10px; border-radius: 7px; background: color-mix(in srgb, var(--side) 94%, #000);
    color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: 0; max-width: min(400px, calc(100vw - 32px));
}
#tip.wide { white-space: pre-line; text-align: left; line-height: 1.45; padding: 8px 12px; }
#tip.term {
    padding: 10px 12px 11px; border: 1px solid color-mix(in srgb, var(--side-link) 45%, transparent);
    border-radius: 10px; background: color-mix(in srgb, var(--accent3) 88%, #04221c);
    color: #f2fffb; white-space: normal; text-align: left; line-height: 1.45; font-weight: 600;
    box-shadow: 0 8px 22px rgba(8, 60, 55, .28);
}
#tip.term .tm-tip-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 0 0 6px; font: 800 13px/1.3 Pretendard, sans-serif; color: #fff; }
#tip.term .tm-tip-h i { font-style: normal; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.14); font: 700 11px/1.3 Pretendard, sans-serif; color: #b8ffe8; }
#tip.term .tm-tip-h span { color: #9fecd8; font-weight: 700; font-size: 12px; }
#tip.term p { margin: 0; font: 600 12.5px/1.5 Pretendard, "Malgun Gothic", sans-serif; color: #e7faf4; }
#tip.term .tm-tip-tag { display: inline-block; margin-bottom: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); font: 700 10.5px/1.3 Pretendard, sans-serif; letter-spacing: .04em; color: #b8ffe8; }
#tip.on { opacity: 1; }
@media print { #tip, #tipBtn { display: none !important; } }

/* Guide / reference pages */
.guide { max-width: 1080px; }
.guide-hero {
    padding: 8px 2px 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.guide-kicker {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent3); margin-bottom: 6px;
}
.guide-hero h1 { margin: 0 0 8px; font-size: 1.55rem; letter-spacing: -0.02em; }
.guide-hero p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 52rem; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.guide-toc a {
    text-decoration: none; color: var(--ink); font-size: 0.8rem; font-weight: 600;
    padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
}
.guide-toc a:hover { border-color: var(--accent); color: var(--accent3); }
.guide-stack { display: flex; flex-direction: column; gap: 12px; }
.guide-ul, .guide-ol { margin: 8px 0 0; padding-left: 1.2rem; line-height: 1.65; }
.guide-ul li, .guide-ol li { margin: 4px 0; }
.guide-lead { font-size: 0.95rem; line-height: 1.65; }
.guide-anchor { scroll-margin-top: 72px; }
/* 가이드·스튜디오 본문 링크 — 기본 파란 밑줄 대신 담백하게 */
.guide a:not(.btn):not(.guide-toc a),
.studio-page a:not(.btn):not(.studio-tab):not(.guide-toc a),
.card-b a:not(.btn),
.card-h a {
    color: var(--accent3);
    font-weight: inherit;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    padding-bottom: 1px;
    transition: color .15s ease, border-color .15s ease, opacity .15s ease;
}
.guide a:not(.btn):not(.guide-toc a):hover,
.studio-page a:not(.btn):not(.studio-tab):not(.guide-toc a):hover,
.card-b a:not(.btn):hover,
.card-h a:hover {
    color: var(--accent);
    border-bottom-color: color-mix(in srgb, var(--accent) 70%, transparent);
}
.card-h a {
    color: var(--text);
    border-bottom-color: transparent;
    font-weight: 800;
}
.card-h a:hover {
    color: var(--accent3);
    border-bottom-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.card-b a b { font-weight: 700; }
.term-tb td:first-child { white-space: nowrap; }
.proc-rail { display: flex; flex-direction: column; gap: 0; }
.proc-step {
    position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px;
    padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    margin-bottom: 10px;
}
.proc-n {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
    font-weight: 800; font-size: 0.85rem; color: var(--accent3);
    background: var(--accent2); letter-spacing: 0.04em;
}
.proc-body h3 { margin: 2px 0 6px; font-size: 1rem; }
.proc-body p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.9rem; }
.memo-list { display: flex; flex-direction: column; gap: 12px; }
.memo-card {
    border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 16px;
}
.memo-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.memo-card h3 { margin: 0; font-size: 1rem; }
.memo-meta { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.memo-body {
    margin: 0 0 10px; white-space: pre-wrap; font-family: inherit; font-size: 0.9rem; line-height: 1.55;
    color: var(--ink); background: transparent; border: 0; padding: 0;
}
.thanks { font-size: 1.02rem; font-weight: 600; line-height: 1.55; }
.thanks-sign { margin-top: 14px; font-weight: 700; color: var(--accent3); letter-spacing: 0.02em; }
.studio-hero { background:
    radial-gradient(ellipse 80% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%);
    border-radius: 12px; padding: 16px 16px 18px; border: 1px solid var(--line); }
.studio-page { position: relative; padding-top: 8px; }
.studio-tabs {
    position: absolute; top: 0; right: 0; z-index: 5;
    display: inline-flex; align-items: center; gap: 2px; padding: 3px;
    border-radius: 999px; background: color-mix(in srgb, var(--card) 92%, var(--bg));
    border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(10, 40, 34, 0.08);
}
.studio-tab {
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    font: 700 0.78rem/1 Pretendard, "Segoe UI", sans-serif; letter-spacing: 0.01em;
    padding: 8px 12px; border-radius: 999px;
}
.studio-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--accent2) 55%, #fff); }
.studio-tab.on { color: #fff; background: var(--accent3); }
.studio-body { padding-top: 44px; }
.studio-page .guide-hero { padding-right: 12px; }
.know-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 1100px) { .know-list { grid-template-columns: 1fr 1fr; } }
.know-item {
    display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: start;
    padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.know-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.know-item .no {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 28px;
    border-radius: 999px; background: var(--side); color: #fff;
    font: 800 12px/1 Pretendard, sans-serif; font-variant-numeric: tabular-nums;
}
.know-item h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.95rem; }
.know-tag { font-style: normal; padding: 2px 7px; border-radius: 999px; background: var(--accent2); color: var(--accent3); font: 800 10.5px/1.3 Pretendard, sans-serif; }
.know-keys { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.know-keys kbd, .know-item kbd {
    display: inline-block; margin: 0 1px; padding: 0 5px; border: 1px solid #c5cfdd; border-bottom-width: 2px;
    border-radius: 5px; background: #f6f8fb; color: var(--ink);
    font: 700 11.5px/1.65 Consolas, "Segoe UI", sans-serif;
}
.kbd-plus { margin: 0 2px; color: var(--muted); font-size: 0.75rem; }
.know-item p { margin: 0; color: #36404d; font-size: 0.84rem; line-height: 1.55; }
.know-by { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 0.82rem; }
.know-by b { color: var(--ink); }

/* Studio · 확장 로드맵 (한 단계씩) */
.studio-road {
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--card) 92%, var(--bg));
    overflow: hidden;
}
.studio-road-sum {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    font: inherit;
    color: inherit;
}
.studio-road.open .studio-road-sum {
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 120% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%);
}
.studio-road-sum-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.studio-road-sum-main b {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.studio-road-sum-main small {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}
.studio-road-sum-cta {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    font: 750 0.78rem/1 Pretendard, sans-serif;
    color: #fff;
    background: var(--accent3);
    letter-spacing: 0.02em;
}
.studio-road.open .studio-road-sum-cta {
    background: transparent;
    color: var(--accent3);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.studio-road-panel { padding: 18px 18px 22px; }
.studio-road-intro { margin-bottom: 14px; }
.studio-road-intro h2 {
    margin: 0 0 8px;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
    font-weight: 820;
}
.studio-road-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    max-width: 48rem;
    font-size: 0.9rem;
}
.road-step-card {
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    animation: roadIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes roadIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.road-step-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.road-no {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--side);
    color: #fff;
    font: 800 0.78rem/1 Pretendard, sans-serif;
    letter-spacing: 0.02em;
}
.road-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.road-tag {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent3);
    background: var(--accent2);
    padding: 3px 8px;
    border-radius: 999px;
}
.road-step-meta {
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--muted);
    letter-spacing: 0.04em;
}
.road-step-head h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.road-q-type {
    margin: 0;
    font-size: clamp(1.02rem, 2.4vw, 1.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.45;
    min-height: 2.9em;
    color: var(--ink);
}
.road-q-type:not(.done)::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.95em;
    margin-left: 3px;
    vertical-align: -0.08em;
    background: var(--accent3);
    animation: roadBlink 0.9s step-end infinite;
}
@keyframes roadBlink {
    50% { opacity: 0; }
}
.road-ask-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}
.road-answer {
    margin-top: 14px;
    animation: roadIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.road-answer-who {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.road-answer-who img,
.road-ceo-sm {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 14px rgba(12, 40, 34, 0.14);
    background: #dfe8e4;
}
.road-answer-who b {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
}
.road-answer-who span {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}
.road-answer-bubble {
    padding: 14px 15px 15px;
    border-radius: 4px 16px 16px 16px;
    background: color-mix(in srgb, var(--accent2) 42%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}
.road-answer-bubble p {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #2b463f;
}
.road-answer-bubble p:last-child { margin-bottom: 0; }
.road-answer-case {
    padding-top: 8px;
    border-top: 1px dashed color-mix(in srgb, var(--accent) 22%, var(--line));
}
.road-all { display: flex; flex-direction: column; gap: 14px; }
.road-all-item {
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
}
.road-q-static {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.road-q-static h3 {
    margin: 4px 0 0;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.4;
}
.road-why-ms {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
        #fff;
}
.road-why-ms-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}
.road-why-ms-head .road-ceo-sm { width: 52px; height: 52px; }
.road-why-ms-head h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    font-weight: 820;
    letter-spacing: -0.02em;
}
.road-why-ms-head p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--muted);
}
.road-why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.road-why-card {
    padding: 12px 12px 13px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 70%, #fff);
    border: 1px solid var(--line);
}
.road-why-n {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    color: var(--accent3);
}
.road-why-card h4 {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 800;
}
.road-why-card p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #36404d;
}
.road-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.road-dots { display: flex; align-items: center; gap: 7px; }
.road-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--muted) 35%, #fff);
    cursor: pointer;
}
.road-dot.done { background: color-mix(in srgb, var(--accent) 45%, #fff); }
.road-dot.on {
    width: 22px;
    border-radius: 99px;
    background: var(--accent3);
}
.road-nav-btns { display: flex; gap: 8px; margin-left: auto; }
.road-next-hint {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}
.road-close {
    margin-top: 16px;
    padding: 18px 16px 16px;
    border-radius: 14px;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 100% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
        color-mix(in srgb, var(--accent2) 35%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}
.road-close-lead {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}
.road-close-cta {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent3);
}
.road-close-tel {
    margin: 6px 0 4px;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}
.road-close-tel a { color: var(--ink); text-decoration: none; }
.road-close-tel a:hover { color: var(--accent3); }
.road-close-sub {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}
.road-close-links {
    margin: 12px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--muted);
}
.road-close-links a { font-weight: 700; }

@media (max-width: 720px) {
    .studio-tabs { position: static; width: 100%; justify-content: stretch; margin-bottom: 10px; }
    .studio-tab { flex: 1; text-align: center; padding: 8px 6px; font-size: 0.72rem; }
    .studio-body { padding-top: 0; }
    .studio-road-sum { padding: 14px; }
    .road-step-head { grid-template-columns: 36px minmax(0, 1fr); }
    .road-no { width: 34px; height: 34px; border-radius: 10px; font-size: 0.7rem; }
    .road-nav-btns { width: 100%; }
    .road-nav-btns .btn { flex: 1; }
    .road-why-grid { grid-template-columns: 1fr; }
    .road-why-ms-head { grid-template-columns: 44px minmax(0, 1fr); }
}
main { flex: 1; min-width: 0; margin-left: 248px; display: flex; flex-direction: column; min-height: 100vh; }
#top { position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--top-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex: none; }
#menuBtn { display: none; border: 0; background: none; padding: 6px; cursor: pointer; }
#menuBtn svg { width: 22px; height: 22px; }
#vTitle { font-size: 1.1rem; font-weight: 800; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topInfo { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
#sync { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); white-space: nowrap; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
#sync:hover { background: rgba(0,0,0,0.04); }
#sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
#sync.saving i { background: var(--amber); }
#sync.err i { background: var(--red); }
.top-links { flex: none; margin-left: 4px; display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.top-links a { color: var(--muted); text-decoration: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; }
.top-links a:hover { color: var(--accent); }
#view { padding: 20px 20px 28px; max-width: 1760px; flex: 1; }
#status { position: sticky; bottom: 0; z-index: 18; height: 34px; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 20px; background: color-mix(in srgb, var(--card) 88%, var(--bg)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; flex: none; backdrop-filter: blur(8px); }
#status .st-left { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#status .st-credit { flex: none; color: var(--muted); text-decoration: none; letter-spacing: 0.01em; opacity: 0.85; }
#status .st-credit:hover { color: var(--accent); opacity: 1; text-decoration: underline; }

/* 공통 카드 · 버튼 · 툴바 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 50px; }
.card-h h3 { margin: 0; font-size: 0.98rem; }
.card-h small { color: var(--muted); }
.card-b { padding: 16px 18px; }
.card-b.p0 { padding: 0; }
.desc { color: var(--muted); font-size: 0.84rem; margin: -2px 0 14px; line-height: 1.55; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--line2); background: #fff; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn:hover { background: #f6f8f7; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent3); }
.btn.dark { background: var(--side); border-color: var(--side); color: #fff; }
.btn.red { color: var(--red); border-color: #f1c6c2; }
.btn.red:hover { background: var(--red2); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 0.78rem; }
.amt-bar {
    position: relative;
    display: block;
    width: 100%;
    min-width: 7.2rem;
    box-sizing: border-box;
    text-align: right;
    padding: 2px 6px;
    border-radius: 5px;
    line-height: 1.3;
}
.amt-bar > i {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--p, 0%);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    border-radius: 5px;
    pointer-events: none;
}
.amt-bar > em { position: relative; font-style: normal; font-weight: inherit; }
.amt-bar-due > i { background: color-mix(in srgb, #dc2626 16%, transparent); }
.amt-bar-paid > i { background: color-mix(in srgb, #059669 16%, transparent); }
.amt-bar-warn > i { background: color-mix(in srgb, #d97706 16%, transparent); }
.rp td .amt-bar { min-width: 5.2rem; }
.rp tr.gt .amt-bar > i { display: none; }
.btn.xls-data { border-color: #94a3b8; color: #475569; background: #f8fafc; }
.btn.xls-data:hover { background: #eef2f7; border-color: #64748b; }
.btn.xls-data::before { content: '▦'; margin-right: 5px; opacity: .55; font-size: .85em; }
.btn.xls-form { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); }
.btn.xls-form:hover { background: color-mix(in srgb, var(--accent) 16%, #fff); }
.btn.xls-form::before { content: '▣'; margin-right: 5px; font-size: .9em; }
.xls-style-seg { margin-top: 2px; }
.btn.xs { height: 24px; padding: 0 7px; font-size: 0.74rem; border-radius: 6px; }
.btn.ghost { border-color: transparent; background: none; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select, .toolbar input { height: 34px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 9px; background: #fff; outline: none; font-size: 0.84rem; }
.toolbar input[type=search] { width: 220px; }
.toolbar .ttl { font-size: 1.05rem; font-weight: 800; padding: 0 6px; white-space: nowrap; }
.toolbar label.ck { display: inline-flex; align-items: center; gap: 5px; font-size: 0.84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.toolbar label.ck input { accent-color: var(--accent); width: auto; height: auto; }
.seg { display: inline-flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 11px; border-radius: 6px; cursor: pointer; font-size: 0.83rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--side); color: #fff; }
.chip { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 0.72rem; font-weight: 700; background: var(--accent2); color: var(--accent3); white-space: nowrap; }
.chip.gray { background: #eef1f0; color: var(--muted); }
.chip.red { background: var(--red2); color: var(--red); }
.chip.amber { background: var(--amber2); color: var(--amber); }
.chip.green { background: var(--green2); color: var(--green); }
.chip.blue { background: var(--blue2); color: var(--blue); }
.chip.violet { background: var(--violet2); color: var(--violet); }
.chip.dark { background: var(--side); color: #fff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.g21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.g12 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
.grid2 > .card, .grid3 > .card, .g21 > .card, .g12 > .card { margin-bottom: 0; }
.gap { height: 14px; }
.banner { padding: 10px 14px; border-radius: 10px; font-size: 0.84rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.banner.warn { background: var(--amber2); border: 1px solid #f0d08a; color: #7a4900; }
.banner.danger { background: var(--red2); border: 1px solid #f3b8b3; color: #8c1f18; }
.banner.info { background: var(--blue2); border: 1px solid #b8d0f5; color: #164080; }

/* 데이터 테이블 */
.tw { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tw.tall { max-height: calc(100vh - 255px); min-height: 300px; }
table.dt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.83rem; }
.dt th { position: sticky; top: 0; z-index: 2; background: var(--table-head); color: var(--muted); font-weight: 700; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt th.n { text-align: right; }
.dt th.c { text-align: center; }
.dt th.srt { cursor: pointer; user-select: none; }
.dt th.srt:hover { color: var(--accent); }
.dt th.srt.on { color: var(--accent3); }
.dt thead tr.gh th { top: 0; z-index: 3; background: var(--table-head2); color: var(--accent3); font-size: 0.72rem; padding: 4px 10px; text-align: center; border-right: 1px solid #fff; }
.dt thead tr.gh + tr th { top: 23px; }
.dt td {
    padding: 7px 10px;
    border-bottom: 1px solid #eef1f0;
    white-space: nowrap;
    background: #fff;
    transition: background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}
.dt tbody tr:nth-child(even) td { background: var(--row-alt); }
.dt td.wrap { white-space: normal; min-width: 180px; }
.dt td.ell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
/* calc = 계산열 표시용 클래스. 배경은 홀짝/호버와 통일 (별도 칠하지 않음) */
.dt tbody tr.click { cursor: pointer; }
.dt tbody tr:hover td {
    background: color-mix(in srgb, var(--accent) 7%, #fff);
}
.dt tbody tr:nth-child(even):hover td {
    background: color-mix(in srgb, var(--accent) 8.5%, var(--row-alt));
}
.dt tbody tr.click:hover td {
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent),
                inset 0 -1px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}
.dt tbody tr.sel td { background: var(--row-sel) !important; box-shadow: none; }
.dt tr.sub td { font-weight: 700; background: #f6f8f7; }
.dt tr.grand td { font-weight: 800; background: color-mix(in srgb, var(--accent) 8%, #f8fafb); color: var(--text); border-top: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); }
.dt tfoot td { position: sticky; bottom: 0; background: color-mix(in srgb, var(--accent) 7%, #f7f9f8); font-weight: 800; color: var(--text); border-top: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.03); }
.dt td input[type=text], .dt td select, .dt td input[type=number] { height: 30px; border: 1px solid var(--line2); border-radius: 7px; padding: 0 8px; background: #fff; outline: none; min-width: 0; }
.dt td input:focus, .dt td select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent2); }
.dt td input.n { text-align: right; }
.dt .stk { position: sticky; left: 0; z-index: 1; background: #fff; }
.dt tbody tr:nth-child(even) td.stk { background: var(--row-alt); }
.dt thead .stk { z-index: 4; background: var(--table-head); }
.dt tbody tr:hover td.stk {
    background: color-mix(in srgb, var(--accent) 7%, #fff);
    box-shadow: inset 3px 0 0 var(--accent);
}
.dt tbody tr:nth-child(even):hover td.stk {
    background: color-mix(in srgb, var(--accent) 8.5%, var(--row-alt));
    box-shadow: inset 3px 0 0 var(--accent);
}
.dt tbody tr.click:hover td.stk {
    box-shadow: inset 3px 0 0 var(--accent),
                inset 0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent),
                inset 0 -1px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}
.dt tbody tr.sel td.stk { background: var(--row-sel) !important; box-shadow: inset 3px 0 0 var(--accent3); }
.dt tbody tr.click:hover td.row-acts .btn {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line2));
}
.pager { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 10px; font-size: 0.82rem; color: var(--muted); }

/* 폼 */
.fld label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin: 0 0 4px 2px; }
.fld input, .fld select, .fld textarea { width: 100%; height: 36px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 10px; background: #fff; outline: none; min-width: 0; }
.fld textarea { height: 70px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent2); }
.fld input.n { text-align: right; font-variant-numeric: tabular-nums; }
.fld input.req { border-color: var(--accent-soft); background: color-mix(in srgb, var(--accent2) 55%, #fff); }
.fld input.bad { border-color: var(--red); background: var(--red2); }
.fld input[readonly], .fld select[disabled], .fld textarea[readonly] { background: #f4f7f6; color: #63706d; }
.fld .ro { height: 36px; border: 1px dashed var(--line2); border-radius: 8px; padding: 0 10px; display: flex; align-items: center; justify-content: flex-end; background: #f7faf9; font-weight: 700; font-variant-numeric: tabular-nums; }
.form-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.form-g.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-g.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-g.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-g.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.spanall { grid-column: 1 / -1; }
.sub-h { font-size: 0.8rem; font-weight: 800; color: var(--accent3); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.sub-h:first-child { margin-top: 0; }
.sub-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* KPI · 차트 · 리스트 */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; margin: 0; position: relative; overflow: hidden; }
.kpi.click { cursor: pointer; }
.kpi.click:hover { border-color: var(--accent-soft); }
.kpi small { display: block; color: var(--muted); font-size: 0.77rem; font-weight: 600; }
.kpi b { display: block; font-size: 1.42rem; font-weight: 800; margin-top: 5px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 0.75rem; color: var(--muted); }
.kpi.hl { background: linear-gradient(135deg, var(--hl-a), var(--hl-b)); border-color: var(--hl-a); color: #fff; }
.kpi.hl small, .kpi.hl span { color: var(--hl-muted); }
.kpi.warn b { color: var(--red); }
.delta { font-size: 0.74rem; font-weight: 700; margin-left: 4px; }
.delta.up { color: var(--red); }
.delta.dn { color: var(--blue); }
.kpi.hl .delta.up { color: #ffc2b5; }
.kpi.hl .delta.dn { color: #b9d6ff; }
.hbars div { display: grid; grid-template-columns: 112px 1fr 78px; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.82rem; }
.hbars div.click { cursor: pointer; }
.hbars div.click:hover span { color: var(--accent); }
.hbars em { height: 16px; background: #eef1f0; border-radius: 4px; overflow: hidden; position: relative; display: flex; }
.hbars em i { display: block; height: 100%; background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); will-change: width; }
.dash-stage:not(.dash-on) .hbars em i { width: 0 !important; }
.hbars.warn em i { background: linear-gradient(90deg, #f6b19a, #d6342a); }
.hbars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-row { display: flex; gap: 12px; font-size: 0.76rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
svg.chart { display: block; width: 100%; height: auto; }
svg.chart .ax { font-size: 10.5px; fill: #8a9693; }
svg.chart .vl { font-size: 10px; fill: #47524f; font-weight: 700; }
svg.chart.premium { border-radius: 14px; overflow: hidden; }
svg.chart.premium .ax { font-size: 11px; fill: #7b8694; letter-spacing: 0.01em; }
svg.chart.premium .ax-cat { fill: #5b6570; font-weight: 600; font-size: 11.5px; }
svg.chart.premium .vl { font-size: 11px; fill: #1f2937; font-weight: 700; font-variant-numeric: tabular-nums; }
svg.chart.premium .vl-peak { fill: #9a3412; font-size: 11.5px; font-weight: 800; }
svg.chart.premium .chart-break { font-size: 10px; fill: #94a3b8; font-weight: 600; }
.chart-card .card-h h3 { letter-spacing: -0.01em; }
.chart-panel { padding: 10px 8px 14px; background: linear-gradient(180deg, #fcfdfe 0%, #f5f7f9 100%); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8ecef; }
.chart-legend .leg {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 11px; border-radius: 999px;
    background: #fff; border: 1px solid #e5e9ee;
    font-size: 0.78rem; color: #44505c; font-weight: 600;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.chart-legend .leg i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chart-legend .leg-line i { width: 14px; height: 2px; border-radius: 1px; }
svg.chart.premium .vl { paint-order: stroke; }
.donut-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut-box ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; }
.donut-box li { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 0.8rem; border-bottom: 1px solid #f0f2f1; }
.donut-box li .t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-box li b, .donut-box li small { white-space: nowrap; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #eef1f0; font-size: 0.84rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list li .t small { color: var(--muted); margin-left: 4px; }
.mini-list li.click { cursor: pointer; }
.mini-list li.click:hover .t { color: var(--accent); }
.aging { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.aging > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.aging > div.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent2); }
.aging small { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 700; }
.aging b { display: block; font-size: 1.1rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.aging span { font-size: 0.74rem; color: var(--muted); }
.aging .w1 b { color: var(--amber); }
.aging .w2 b { color: var(--red); }
.tgl { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; }
.tgl button { border: 0; background: #fff; height: 24px; padding: 0 8px; font-size: 0.74rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tgl button.on { background: var(--red); color: #fff; }

/* 수주 입력 폼 */
.of-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 256px; gap: 18px; align-items: start; }
.of-calc { position: sticky; top: 0; background: var(--calc-bg); border: 1px solid var(--calc-bd); border-radius: 12px; padding: 14px; font-size: 0.82rem; }
.of-calc h4 { margin: 0 0 8px; font-size: 0.82rem; color: var(--accent3); }
.of-calc dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; }
.of-calc dt { color: var(--muted); }
.of-calc dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.of-calc dd.big { font-size: 1.05rem; color: var(--accent3); }
.of-calc hr { grid-column: 1 / -1; border: 0; border-top: 1px solid var(--calc-bd); margin: 4px 0; width: 100%; }
.of-meta { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--of-meta); font-size: 0.72rem; color: var(--muted); line-height: 1.5; }
.pay-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center; margin-bottom: 6px; }
.pay-row > span { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.pay-row input { height: 34px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 9px; outline: none; min-width: 0; width: 100%; }
.pay-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent2); }
.pay-row input.n { text-align: right; font-variant-numeric: tabular-nums; }
.ext-off { opacity: 0.4; pointer-events: none; }

/* 계약서 · 출력 */
.paper { overflow: hidden; }
.paper .page { transform-origin: 0 0; }
.pages { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.page { width: 794px; height: 1122px; background: #fff; padding: 46px 58px 40px; position: relative; color: #1b1f24; overflow: hidden; box-shadow: 0 4px 24px rgba(10, 40, 34, 0.12); border-radius: 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 13px; }
.ct-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--accent3); padding-bottom: 10px; }
.ct-top .bm { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--accent3); }
.ct-top .bm .ct-logo { width: 118px; height: auto; display: block; object-fit: contain; }
.ct-top .no { font-size: 11px; color: #6b7471; }
.ct-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 0.6em; margin: 20px 0 4px; padding-left: 0.6em; }
.ct-co { text-align: center; font-size: 15px; font-weight: 800; }
.ct-addr { text-align: center; font-size: 10.5px; color: #59625f; margin: 3px 0 16px; }
table.ct { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 12.5px; }
.ct th, .ct td { border: 1px solid #8c9794; padding: 6px 9px; height: 30px; }
.ct th.sec { width: 74px; background: var(--accent2); color: var(--accent3); font-size: 12.5px; letter-spacing: 0.04em; }
.ct th.k { width: 92px; background: #f6f8f7; font-weight: 700; text-align: center; letter-spacing: 0.12em; }
.ct td.amt { font-weight: 800; }
.ct td small { color: #6b7471; font-size: 11px; }
.ct-ok { text-align: center; font-size: 14px; font-weight: 700; margin: 16px 0 6px; }
.ct-date { text-align: center; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.ct-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.ct-sign h5 { margin: 0 0 6px; font-size: 13px; }
.ct-sign dl { margin: 0; display: grid; grid-template-columns: 80px 1fr; gap: 5px 4px; font-size: 12.5px; }
.ct-sign dt { letter-spacing: 0.1em; color: #444c49; }
.ct-sign dd { margin: 0; position: relative; }
.ct-sign .seal { position: absolute; right: 0; top: -8px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #c7473d; color: #c7473d; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
.ct-sign .seal-img { position: absolute; right: -4px; top: -18px; width: 54px; height: 54px; object-fit: contain; pointer-events: none; mix-blend-mode: multiply; }
.ct-foot { position: absolute; left: 58px; right: 58px; bottom: 28px; display: flex; justify-content: space-between; font-size: 10px; color: #8a9491; border-top: 1px solid #dfe5e3; padding-top: 6px; }
.page.attach { display: flex; flex-direction: column; }
.page.landscape {
    width: 1122px;
    height: 794px;
    padding: 36px 46px 32px;
}
.page.landscape .ct-foot { left: 46px; right: 46px; bottom: 22px; }
.page.attach .ct-top { flex: none; }
.row-acts { white-space: nowrap; width: 1%; }
.row-acts .btn { margin: 0 2px; vertical-align: middle; }
.btn.quote-on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent3); font-weight: 700; }
.pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--accent2);
    color: var(--accent3);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
}
.pill.ok { background: var(--green2); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, var(--line)); }
.ct-attach-title {
    flex: none;
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 12px 0 8px;
    padding-left: 0.18em;
    line-height: 1.3;
}
.ct-attach-img {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 0 36px;
}
.ct-attach-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
    background: #fff;
}
.ct-attach-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    place-items: center;
    color: #8a9491;
    font-size: 14px;
    border: 1px dashed #c9d2cf;
    border-radius: 10px;
    margin: 0 0 36px;
}
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.doc-slot { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfb; }
.doc-prev { height: 160px; border-radius: 10px; background: #fff; border: 1px solid #e5ebe8; display: grid; place-items: center; overflow: hidden; }
.doc-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-prev span { color: var(--muted); font-size: 0.82rem; }
.doc-meta b { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.doc-meta small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.fld label.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.fld label.chk input { width: 16px; height: 16px; }
@media (max-width: 980px) { .doc-grid { grid-template-columns: 1fr; } }
.terms h2 { text-align: center; font-size: 19px; margin: 6px 0 18px; letter-spacing: 0.06em; }
.terms ol { margin: 0; padding-left: 0; list-style: none; counter-reset: t; }
.terms li { counter-increment: t; margin-bottom: 11px; line-height: 1.68; padding-left: 28px; position: relative; font-size: 12.6px; white-space: pre-wrap; }
.terms li::before { content: counter(t) '.'; position: absolute; left: 0; font-weight: 800; }
.terms .end { margin-top: 20px; text-align: center; font-size: 12.8px; }
.terms .end b { display: block; font-size: 16px; margin-top: 18px; letter-spacing: 0.3em; }
.pl h2 { margin: 0 0 4px; font-size: 18px; }
.pl .meta { font-size: 11px; color: #59625f; margin-bottom: 10px; display: flex; justify-content: space-between; }
.pl table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.pl th, .pl td { border: 1px solid #b9c3c0; padding: 4px 5px; white-space: nowrap; }
.pl th { background: #e9f0ee; }
.pl tbody tr:nth-child(even) td { background: #f5f8f7; }
.pl td.n { text-align: right; }
.pl tr.tot td { font-weight: 800; background: #f4f7f6; }
.ct-pick { max-height: 520px; overflow: auto; }
.ct-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }

/* 리포트 표 */
table.rp { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.8rem; }
.rp th, .rp td { padding: 6px 8px; border-bottom: 1px solid #eef1f0; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.rp tbody tr td { background: #fff; }
.rp tbody tr:nth-child(even) td { background: var(--row-alt); }
.rp tbody tr:hover td { background: var(--row-hover); }
.rp thead th { position: sticky; top: 0; background: var(--table-head); color: #47524f; z-index: 2; text-align: center; }
.rp td.l, .rp th.l { text-align: left; }
.rp td.z { color: #c3cbc9; }
.rp tr.rail td.l { color: #1f5bb5; font-weight: 700; }
.rp tr.tot td { background: #fdf1ee; font-weight: 800; color: #9b2c22; }
.rp tr.ctot td { background: #fff7e6; font-weight: 800; color: #8a5300; }
.rp tr.mx td { background: #eef8f4; color: var(--accent3); font-weight: 700; }
.rp tr.gt td {
    background: color-mix(in srgb, var(--accent) 8%, #f8fafb) !important;
    color: var(--text);
    font-weight: 800;
    border-top: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-bottom: 0;
}
.rp tr.gt td.l { color: var(--accent3); letter-spacing: -0.01em; }
.rp tbody tr.gt:hover td { background: color-mix(in srgb, var(--accent) 11%, #f5f7f8) !important; }
.rp td.sum { background: color-mix(in srgb, var(--row-alt) 55%, #eef2f1); font-weight: 800; }
.rp tr.tot td.sum, .rp tr.ctot td.sum, .rp tr.gt td.sum, .rp tr.mx td.sum { background: inherit; }
.rp tr.gt td.sum { color: var(--accent3); }

/* 모달 · 토스트 */
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 18, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 3.5vh 16px 16px; overflow: auto; }
.mbox { width: 100%; max-width: 560px; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.mbox.wide { max-width: 860px; }
.mbox.xl { max-width: 1180px; }
.mbox header { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.mbox header h3 { margin: 0; font-size: 1.02rem; flex: 1; }
.mbox header button.x { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.mbody { padding: 18px 20px; line-height: 1.6; }
.mbox footer { display: flex; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); justify-content: flex-end; flex-wrap: wrap; align-items: center; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: 0.25s; z-index: 80; background: var(--side); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 0.88rem; pointer-events: none; max-width: 90vw; box-shadow: 0 10px 30px rgba(0,0,0,0.22); }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); }
#scrim { display: none; }
#printArea { display: none; }

/* 테마 선택 (스틸코디아식) */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-card { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.theme-card:hover { border-color: var(--accent-soft); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent2); }
.theme-swatch { height: 44px; border-radius: 8px; display: grid; grid-template-columns: 34% 1fr; overflow: hidden; border: 1px solid rgba(0,0,0,.06); }
.theme-swatch i { display: block; }
.theme-swatch b { display: block; position: relative; }
.theme-swatch b::after { content: ''; position: absolute; left: 10px; top: 14px; width: 42%; height: 8px; border-radius: 4px; background: var(--t-acc, #0e7c66); opacity: .9; }
.theme-card strong { font-size: 0.86rem; color: var(--text); }
.theme-card small { font-size: 0.72rem; color: var(--muted); line-height: 1.35; }
.theme-hint { margin: 8px 0 0; font-size: 0.78rem; color: var(--muted); }

@media (max-width: 1400px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .aging { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
    .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g21, .g12, .ct-wrap { grid-template-columns: minmax(0, 1fr); }
    .form-g, .form-g.c5, .form-g.c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .of-wrap { grid-template-columns: minmax(0, 1fr); }
    .of-calc { position: static; }
}
@media (max-width: 860px) {
    .brand-tip {
        left: calc(100% + 10px);
        top: 14px;
        width: min(280px, calc(100vw - 72px));
    }
    #side { transform: translateX(-100%); transition: transform 0.22s; }
    body.nav-open #side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.35); }
    body.nav-open #scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(8, 20, 18, 0.4); }
    main { margin-left: 0; }
    #menuBtn { display: block; }
    #top { padding: 0 12px; gap: 8px; height: 54px; }
    #topInfo, #sync span { display: none; }
    #view { padding: 14px 12px 20px; }
    #status { padding: 0 12px; height: 32px; font-size: 0.68rem; }
    #status .st-left { display: none; }
    .grid2, .grid3, .form-g, .form-g.c3, .form-g.c2, .form-g.c5, .form-g.c6 { grid-template-columns: minmax(0, 1fr); }
    .span2, .span3 { grid-column: auto; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi { padding: 12px; }
    .kpi b { font-size: 1.15rem; }
    .tw.tall { max-height: none; }
    .card-b { overflow-x: auto; }
    .hide-m { display: none !important; }
    .hbars div { grid-template-columns: 76px 1fr 62px; }
    .toolbar input[type=search] { width: 100%; }
    #modal { padding: 0; }
    .mbox { border-radius: 0; min-height: 100%; }
    .pay-row { grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr); }
}
@media print {
    @page { size: A4 portrait; margin: 0; }
    @page portrait-page { size: A4 portrait; margin: 0; }
    @page landscape-page { size: A4 landscape; margin: 0; }
    html, body { background: #fff; height: auto; }
    #app, #modal, #toast, #login, #status, #tip { display: none !important; }
    #printArea { display: block; }
    #printArea .page {
        box-shadow: none;
        border-radius: 0;
        break-after: page;
        page-break-after: always;
        margin: 0;
        page: portrait-page;
    }
    #printArea .page.landscape {
        width: 1122px;
        height: 794px;
        page: landscape-page;
    }
    #printArea .page:last-child { break-after: auto; page-break-after: auto; }
}
