@font-face {
    font-family: "Pretendard";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Pretendard";
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face { font-family: "Pretendard"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2") format("woff2"); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2") format("woff2"); font-style: normal; font-weight: 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.2.5/files/inter-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.2.5/files/inter-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.2.5/files/inter-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("https://cdn.jsdelivr.net/npm/@fontsource/inter@5.2.5/files/inter-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }

@view-transition {
    navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.01ms;
    }
}

:root {
    color-scheme: light;
    --bg: #f5f5f7;
    --panel: #ffffff;
    --panel-soft: #f9fafb;
    --text: #1d1d1f;
    --muted: rgba(29, 29, 31, 0.52);
    --line: #d2d2d7;
    --line-strong: #c4c4ca;
    --accent: #1d1d1f;
    --accent-contrast: #ffffff;
    --accent-soft: #f2f4f7;
    --sidebar-bg: rgba(255, 255, 255, 0.6);
    --header-bg: rgba(255, 255, 255, 0.7);
    --danger: #dc2626;
    --success: #15803d;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --radius: 12px;
}

html.dark {
    color-scheme: dark;
    --bg: #111214;
    --panel: #1c1d20;
    --panel-soft: #242529;
    --text: #f5f5f7;
    --muted: rgba(255, 255, 255, 0.55);
    --line: #34363b;
    --line-strong: #474950;
    --accent: #f5f5f7;
    --accent-contrast: #111214;
    --accent-soft: #282a2e;
    --sidebar-bg: rgba(28, 29, 32, 0.92);
    --header-bg: rgba(17, 18, 20, 0.92);
    --danger: #f87171;
    --success: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-weight: 400;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-sidebar,
.app-header,
.document-header,
.print-editor-toolbar {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:hover {
    background: #000;
    border-color: #000;
    opacity: 0.9;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.ghost-button {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.ghost-button:hover {
    background: #f5f5f7;
    border-color: #bfc0c6;
    color: var(--text);
    opacity: 1;
}

.ghost-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease;
}

.ghost-link:hover {
    background: #f5f5f7;
    border-color: #bfc0c6;
}

.theme-toggle {
    width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
}

.theme-toggle:hover {
    border: 0;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    opacity: 1;
}

.theme-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.theme-icon-sun,
html.dark .theme-icon-moon {
    display: none;
}

html.dark .theme-icon-sun {
    display: block;
}

html.dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

html.dark button.theme-toggle {
    color: var(--text);
}

html.dark button.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

html.dark button,
html.dark .home-primary-link,
html.dark .home-card a {
    color: #111214;
}

html.dark button:hover,
html.dark .home-primary-link:hover,
html.dark .home-card a:hover {
    border-color: #fff;
    background: #fff;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark .ghost-button,
html.dark .ghost-link {
    border-color: var(--line);
    background: var(--panel);
    color: var(--text);
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

html.dark .ghost-button:hover,
html.dark .ghost-link:hover {
    border-color: var(--line-strong);
    background: var(--panel-soft);
}

html.dark .app-sidebar {
    background: rgba(28, 29, 32, 0.82);
}

html.dark .app-header,
html.dark .document-header {
    background: rgba(17, 18, 20, 0.86);
}

html.dark .auth-status-pill,
html.dark .workflow-tabs,
html.dark .consent-summary {
    background: var(--panel-soft);
}

html.dark .topbar-search,
html.dark button.topbar-search,
html.dark .workflow-tabs,
html.dark .panel-toolbar {
    background: rgba(36, 37, 41, 0.9);
    color: var(--muted);
}

html.dark .workflow-tab {
    color: var(--muted);
}

html.dark .workflow-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

html.dark .workflow-tab.is-active,
html.dark .workflow-tab.is-active:hover,
html.dark .step-number {
    background: #f5f5f7;
    color: #111214;
}

html.dark .workflow-tab.is-active span {
    background: rgba(17, 18, 20, 0.12);
    color: #111214;
}

html.dark .header-menu-link:hover,
html.dark .header-menu-link.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

html.dark .editorial-lead,
html.dark .editorial-copy,
html.dark .legal-document section p,
html.dark .legal-document > p {
    color: rgba(255, 255, 255, 0.62);
}

html.dark .legal-table-wrap th {
    background: var(--panel-soft);
}

html.dark .legal-notice {
    border-color: #67552c;
    background: #292417;
    color: #e4cf99;
}

html.dark .copy-status.is-error,
html.dark .danger-button {
    border-color: #7f1d1d;
    background: #2b1719;
}

html.dark .muted-button {
    background: var(--panel-soft);
    color: var(--text);
}

html.dark .print-stage {
    background: #292b30;
}

html.dark .print-paper {
    background: #fff;
    color: var(--print-text-color, #1d1d1f);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    outline: none;
}

input,
select {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
}

textarea {
    padding: 12px;
    resize: vertical;
    line-height: 1.55;
    font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.18);
}

.app-shell {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.app-sidebar {
    width: 256px;
    flex: 0 0 256px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(32px);
    z-index: 30;
}

.sidebar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-icon svg,
.topbar-search svg {
    width: 18px;
    height: 18px;
}

.sidebar-label {
    margin: 22px 18px 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0 12px 18px;
    overflow-y: auto;
}

.header-menu.is-empty {
    display: none;
}

.header-menu-link {
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.header-menu-link:hover,
.header-menu-link.is-active {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
    opacity: 1;
    font-weight: 700;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--line);
}

[data-auth-user] {
    display: none !important;
}

body.is-authenticated [data-auth-guest] {
    display: none !important;
}

body.is-authenticated [data-auth-user] {
    display: flex !important;
}

.sidebar-guest-actions {
    display: grid;
    gap: 6px;
}

.sidebar-login-link,
.sidebar-register-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-login-link {
    background: var(--accent);
    color: var(--accent-contrast);
}

.sidebar-register-link {
    color: var(--muted);
}

.sidebar-register-link:hover {
    color: var(--text);
    background: var(--panel-soft);
}

.sidebar-profile {
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 5px 4px;
}

.sidebar-profile-link {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
}

.sidebar-profile-link:hover .sidebar-profile-copy strong {
    color: #3775fa;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #3775fa;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(55, 117, 250, 0.25);
}

.sidebar-profile-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-profile-copy strong,
.sidebar-profile-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-copy strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.sidebar-profile-copy small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.sidebar-logout {
    width: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
}

.sidebar-logout svg {
    width: 17px;
    height: 17px;
}

.sidebar-logout:hover {
    border: 0;
    background: var(--panel-soft);
    color: var(--text);
}

html.dark .sidebar-logout {
    color: var(--muted);
}

html.dark .sidebar-logout:hover {
    background: var(--panel-soft);
    color: var(--text);
}

.app-main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: auto;
    background: var(--bg);
}

.app-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
    font-weight: 400;
}

.page-heading {
    min-width: 180px;
}

.page-heading h1 {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

.page-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.topbar-search {
    width: min(100%, 420px);
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--muted);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    font-size: 13px;
    font-weight: 400;
}

button.topbar-search {
    border-color: transparent;
    color: var(--muted);
    background: var(--panel-soft);
}

button.topbar-search:hover {
    color: var(--text);
    background: var(--panel);
    box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08);
    opacity: 1;
}

.topbar-search-static {
    pointer-events: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.topbar-actions.theme-only {
    justify-content: flex-end;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.app-header .ghost-link,
.app-header .home-primary-link {
    font-weight: 400;
}

.guide-embed-shell {
    width: 100%;
    height: calc(100vh - 64px);
    min-height: 600px;
    overflow: hidden;
    background: var(--panel);
}

.guide-embed-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.home-shell {
    width: min(1024px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 40px;
}

.editorial-home {
    width: min(900px, calc(100% - 64px));
    margin: 0 auto;
    padding: 54px 0 64px;
}

.editorial-hero {
    padding: 8px 0 58px;
    border-bottom: 1px solid var(--line);
}

.editorial-label,
.legal-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.editorial-hero h2 {
    margin: 20px 0 0;
    font-size: 50px;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: 0;
}

.editorial-lead {
    max-width: 650px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.editorial-actions {
    display: flex;
    gap: 10px;
    margin-top: 32px;
}

.editorial-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 54px;
    padding: 54px 0;
    border-bottom: 1px solid var(--line);
}

.editorial-section h3,
.editorial-cta h3 {
    margin: 12px 0 0;
    font-size: 22px;
    line-height: 1.45;
    font-weight: 700;
}

.editorial-copy {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.editorial-copy p { margin: 0 0 16px; }
.editorial-copy p:last-child { margin-bottom: 0; }

.editorial-features article {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    padding: 30px 0;
    border-bottom: 1px solid var(--line);
}

.editorial-features article > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.editorial-features h3 { margin: 0; font-size: 18px; font-weight: 700; }
.editorial-features p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.editorial-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 54px;
}

.document-body { overflow: auto; }

.document-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(24px, calc((100% - 900px) / 2));
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
}

.document-header > a:first-child {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.legal-document {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding: 58px 0 80px;
}

.legal-document > h1 { margin: 14px 0 0; font-size: 34px; font-weight: 700; }
.legal-date { margin: 10px 0 36px; color: var(--muted); font-size: 12px; }
.legal-document section { padding: 24px 0; border-top: 1px solid var(--line); }
.legal-document section h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.legal-document section p,
.legal-document > p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.legal-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.legal-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.55; }
.legal-table-wrap th,
.legal-table-wrap td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table-wrap th { background: var(--panel-soft); }
.legal-notice { padding: 16px; border: 1px solid #f0dba8; border-radius: 8px; background: #fffaf0; color: #6b5423; font-size: 12px; line-height: 1.65; }
.agreement-row a,
.register-footer a { color: var(--text); font-weight: 700; }

.register-footer a.home-primary-link {
    color: var(--accent-contrast);
}

.home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.home-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

.home-head p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.home-primary-link,
.home-card a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-contrast);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    padding: 0 16px;
    transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.home-primary-link:hover,
.home-card a:hover {
    background: #000;
    border-color: #000;
    opacity: 0.9;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.home-card-kicker {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.home-card strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.home-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

.home-card a,
.home-card button {
    margin-top: auto;
}

.register-shell {
    width: min(1024px, calc(100% - 48px));
    margin: 0 auto;
    padding: 40px 0;
}

.register-panel {
    width: min(480px, 100%);
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.register-heading {
    margin-bottom: 26px;
}

.register-heading > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.register-heading h2 {
    margin: 8px 0 0;
    font-size: 24px;
    font-weight: 900;
}

.register-heading p,
.register-footer {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.account-shell {
    width: min(100% - 40px, 920px);
    margin: 0 auto;
    padding: 28px 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.account-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.account-card-heading {
    min-height: 48px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.account-card-heading span {
    color: #3775fa;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.account-card-heading h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 20px;
}

.account-card-heading .account-verified-badge {
    padding: 6px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
    font-size: 11px;
    letter-spacing: 0;
}

.account-card-heading .account-verified-badge.is-unverified {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
}

.account-consent-row {
    margin-top: 0;
    color: var(--text);
}

.account-consent-row span,
.account-consent-row small {
    display: block;
}

.account-consent-row small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 400;
}

.account-consent-summary {
    margin-left: 25px;
}

.account-danger-card {
    border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.account-danger-copy {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.account-danger-copy strong {
    color: var(--danger);
}

.password-check-list {
    margin: 2px 0 4px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    border-radius: 9px;
    background: var(--panel-soft);
    list-style: none;
}

.password-check-list li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.password-check-list li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-weight: 900;
}

.password-check-list li.is-valid {
    color: var(--success);
}

.password-check-list li.is-valid::before {
    content: '✓';
}

.password-check-list li.is-invalid {
    color: var(--danger);
}

.password-check-list li.is-invalid::before {
    content: '×';
}

@media (max-width: 760px) {
    .account-shell {
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
        padding-top: 18px;
    }

    .account-card {
        padding: 20px;
    }

    .password-check-list {
        grid-template-columns: 1fr;
    }
}

.admin-legal-fields {
    margin-top: 18px;
}

.admin-legal-fields .admin-wide-field {
    grid-column: 1 / -1;
}

.admin-legal-fields textarea {
    min-height: 96px;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.saved-page-shell {
    width: min(1024px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.saved-page-head,
.saved-filter-bar,
.saved-page-item,
.saved-page-actions,
.saved-pagination {
    display: flex;
    align-items: center;
}

.saved-page-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.saved-page-head h2 { margin: 0; font-size: 24px; }
.saved-page-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.saved-page-head > span { color: var(--muted); font-size: 12px; font-weight: 700; }

.saved-filter-bar {
    gap: 8px;
    margin-bottom: 14px;
}

.saved-search { flex: 1; }
.saved-filter-bar select { width: 150px; }
.saved-filter-bar button { flex: 0 0 auto; }

.saved-page-list { display: grid; gap: 10px; }
.saved-page-item {
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}
.saved-page-item-copy { min-width: 0; }
.saved-page-item h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.saved-page-item p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.saved-page-actions { gap: 7px; flex: 0 0 auto; }
.saved-page-actions .ghost-link,
.saved-page-actions .home-primary-link,
.saved-page-actions button { min-height: 36px; padding: 0 12px; }

.saved-pagination { justify-content: center; gap: 6px; margin-top: 20px; }
.saved-pagination button { min-width: 38px; min-height: 36px; padding: 0 10px; background: var(--panel); color: var(--text); border-color: var(--line); }
.saved-pagination button.is-active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.print-editor-body {
    min-height: 100vh;
    overflow: auto;
    background: #f5f5f7;
}

html.dark .print-editor-body {
    background: #292b30;
}

.print-editor-toolbar {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 100;
    width: max-content;
    max-width: calc(100% - 32px);
    transform: translateX(-50%);
    padding: 12px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
}

html.dark .print-editor-toolbar {
    border-color: #3f4249;
    background: rgba(35, 37, 42, 0.95);
}

.print-toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.print-toolbar-row + .print-toolbar-row {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}

.print-toolbar-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.print-toolbar-divider {
    width: 1px;
    height: 20px;
    flex: 0 0 1px;
    background: var(--line);
}

.print-toolbar-row input,
.print-toolbar-row select {
    width: auto;
    min-height: 32px;
    font-size: 11px;
}

.print-toolbar-row input[type="range"] { width: 86px; min-height: 0; padding: 0; }
.print-toolbar-row input[type="color"] { width: 30px; height: 30px; min-height: 30px; padding: 2px; }
.print-toolbar-row output { min-width: 34px; color: var(--text); }
.print-toolbar-row input[type="range"] { accent-color: #1d1d1f; }
.print-toolbar-row input[type="color"] { border-color: #d2d2d7; background: #fff; }
.print-toolbar-row select,
.print-toolbar-row input[type="text"] { border-color: #d2d2d7; color: #1d1d1f; background: #fff; }
.print-toolbar-details input { width: 96px; }
.print-toolbar-details label:first-child input { width: 112px; }
.print-toolbar-details label:nth-of-type(2) input { width: 132px; }
.print-toolbar-actions { justify-content: flex-end; }
.print-toolbar-primary > strong { white-space: nowrap; font-size: 14px; opacity: 0.82; }
.print-toolbar-primary > strong span { color: #2962ff; }

.output-toggle {
    min-height: 32px;
    padding: 0 10px;
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 11px;
}

.output-toggle.is-active,
#output-edit-mode.is-active {
    border-color: #1d1d1f;
    background: #1d1d1f;
    color: #fff;
}

.print-edit-actions { display: none; }
.edit-mode-active .print-edit-actions { display: flex; }
.print-edit-actions [hidden] { display: none !important; }

.color-swatch {
    width: 30px;
    min-height: 30px;
    padding: 0;
    border: 3px solid var(--panel);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--line);
}

.swatch-red { background: #dc2626; }
.swatch-black { background: #111827; }
.print-toolbar-actions .theme-toggle svg,
.print-toolbar-actions .icon-button svg { width: 18px; height: 18px; }
.icon-button {
    width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
}
.icon-button:hover { border: 0; background: var(--panel-soft); color: var(--text); }
html.dark button.icon-button,
html.dark button.icon-button:hover { color: var(--text); }
.print-toolbar-actions .topbar-actions { width: auto; flex: 0 0 auto; }
.print-editor-spacer { height: 154px; }
.print-editor-stage { padding: 16px 16px 48px; }
.print-toolbar-collapsed .toolbar-collapsible { display: none !important; }
.print-toolbar-collapsed .print-editor-spacer { height: 86px; }
.print-toolbar-collapsed #output-toolbar-collapse svg { transform: rotate(180deg); }

.print-page-container [hidden] { display: none !important; }
.print-page-container [contenteditable="true"] { outline: 1px dashed #f59e0b; outline-offset: 2px; border-radius: 4px; background: #fff7ed; }
.print-page-container .print-question:focus-within { background: #fffaf0; }

.print-page-container {
    --print-font-size: 13px;
    --print-line-height: 1.6;
    --print-text-color: #1d1d1f;
    --print-font-family: "Inter", "Pretendard", "Noto Sans KR", sans-serif;
    --print-header-scale: 1;
    color: var(--print-text-color);
    font-family: var(--print-font-family);
    font-size: var(--print-font-size);
    line-height: var(--print-line-height);
}

.print-a4-page {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 210mm;
    height: 297mm;
    margin: 32px auto;
    padding: 10mm;
    overflow: hidden;
    background: #fff;
    color: var(--print-text-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    page-break-after: always;
}

.print-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    margin-bottom: 8px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    color: #1d1d1f;
    line-height: 1.2;
    zoom: var(--print-header-scale);
}

.print-page-brand,
.print-page-heading,
.print-page-author { width: 33.333%; }
.print-page-brand,
.print-page-author { display: flex; flex-direction: column; }
.print-page-brand strong { font-size: 10px; font-weight: 900; letter-spacing: -0.02em; }
.print-page-brand span { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; }
.print-page-heading { text-align: center; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.print-page-author { text-align: right; }
.print-page-author strong { min-height: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.print-page-author span { min-height: 11px; font-size: 9px; font-weight: 600; opacity: 0.7; }

.print-page-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: 8mm;
    align-items: stretch;
    min-height: 0;
    margin-bottom: 6mm;
    overflow: hidden;
    flex: 1 1 auto;
}

.print-page-content.is-single { grid-template-columns: 1fr; }
.print-page-content.is-single .print-page-column-right { display: none; }
.print-page-column {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: auto;
    flex-direction: column;
    justify-content: space-between;
}
.print-page-column .print-question { margin-bottom: 32px; break-inside: avoid; page-break-inside: avoid; }
.print-page-column .print-question:last-child { margin-bottom: 0; }

.print-page-container .print-q-head .meta,
.print-page-container .print-choice-num { color: var(--print-text-color); }
.print-page-container .print-q-head,
.print-page-container .print-q-head > span:last-child,
.print-page-container .print-instruction,
.print-page-container .print-choice { color: var(--print-text-color); }
.print-page-container .print-choice { font-weight: 400; }
.print-page-container .print-passage,
.print-page-container .print-box,
.print-page-container .print-sequence-body,
.print-page-container .print-choice,
.print-page-container .print-choice-table td:not(.print-choice-num),
.print-page-container .print-choice-table th,
.print-page-container .print-inline-choices,
.print-page-container .answer-explain,
.print-page-container .is-ko,
.print-paper .print-passage,
.print-paper .print-box,
.print-paper .print-sequence-body,
.print-paper .print-choice,
.print-paper .print-choice-table td:not(.print-choice-num),
.print-paper .print-choice-table th,
.print-paper .print-inline-choices,
.print-paper .answer-explain,
.print-paper .is-ko {
    font-weight: 400;
}

:is(.print-page-container, .print-paper) .print-choice > span:last-child,
:is(.print-page-container, .print-paper) .print-choice > span:last-child *,
:is(.print-page-container, .print-paper) .print-choice-table td:not(.print-choice-num),
:is(.print-page-container, .print-paper) .print-choice-table td:not(.print-choice-num) *,
:is(.print-page-container, .print-paper) .print-choice-table th,
:is(.print-page-container, .print-paper) .print-choice-table th *,
:is(.print-page-container, .print-paper) .print-inline-choices .print-editable,
:is(.print-page-container, .print-paper) .print-inline-choices .print-editable * {
    font-weight: 400 !important;
}

:is(.print-page-container, .print-paper) .print-choice-num {
    min-width: 1.45em;
    font-size: 1.25em;
    font-weight: 400;
    line-height: 1.1;
}

:is(.print-page-container, .print-paper) .print-choice {
    align-items: center;
}

:is(.print-page-container, .print-paper) .print-choice > .print-choice-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

:is(.print-page-container, .print-paper) .print-choice-table td.print-choice-num {
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
}

:is(.print-page-container, .print-paper) .print-inline-choices .print-choice-num {
    font-weight: 400;
    vertical-align: middle;
}

.print-page-container .is-ko { color: inherit; font-size: inherit; }
.print-page-container .print-ko-glyph { font-size: calc(1em - 0.5px); }

:is(.print-page-container, .print-paper, .marker-editor) span[class$="-tag"]:not(.clause-tag),
:is(.print-page-container, .print-paper, .marker-editor) .star-tag,
:is(.print-page-container, .print-paper, .marker-editor) .blank-tag,
:is(.print-page-container, .print-paper, .marker-editor) .legacy-underline-tag {
    position: relative;
    display: inline-block;
    margin: 0 2px;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1.2;
    vertical-align: baseline;
}
:is(.print-page-container, .print-paper, .marker-editor) .g-tag { background-color: #d4edda; color: #155724; font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .y-tag { background-color: #fff38a; color: #1f2937; font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .gg-tag { background-color: #e2e3e5; color: #383d41; }
:is(.print-page-container, .print-paper, .marker-editor) .b-tag { background-color: #deeaf6; color: #5b9bd5; font-weight: 700; text-decoration: underline; }
:is(.print-page-container, .print-paper, .marker-editor) .o-tag { color: #ff9900; font-weight: 700; text-decoration: underline; }
:is(.print-page-container, .print-paper, .marker-editor) .star-tag { color: #111; font-weight: 700; text-decoration: underline; text-decoration-color: #111; text-decoration-thickness: 1.5px; }
:is(.print-page-container, .print-paper, .marker-editor) .blank-tag { color: #111827; font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .marker-red-blank { color: #ff0000; font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .legacy-underline-tag { text-decoration: underline; text-decoration-color: #111; text-decoration-thickness: 1.5px; }
:is(.print-page-container, .print-paper, .marker-editor) .box-tag { margin: 0 2px; padding: 0 5px; border: 1px dashed #6b7280; border-radius: 4px; background: rgba(255, 255, 255, 0.5); }
:is(.print-page-container, .print-paper, .marker-editor) .key-tag { display: block; margin: 6px 0; padding: 6px 8px; border-left: 4px solid #111827; background: rgba(17, 24, 39, 0.05); font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .clause-tag { position: relative; display: inline; margin: 0 2px; padding: 0 2px; border: 0; background: rgba(124, 58, 237, 0.04); }
:is(.print-page-container, .print-paper, .marker-editor) .clause-tag::before { content: "["; margin-right: 2px; color: #7c3aed; font-weight: 700; }
:is(.print-page-container, .print-paper, .marker-editor) .clause-tag::after { content: "]"; margin-left: 2px; color: #7c3aed; font-weight: 700; }

.print-page-footer {
    position: absolute;
    bottom: 10mm;
    left: 0;
    width: 100%;
    color: #1d1d1f;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.4;
}

.print-answer-page-body {
    box-sizing: border-box;
    min-height: 0;
    margin-bottom: 6mm;
    flex: 1 1 auto;
    padding-top: 4px;
    overflow: hidden;
}

.print-answer-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.print-answer-item {
    display: flex;
    min-height: 2.6em;
    padding: 5px 2px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
}
.print-answer-item:nth-child(10n) { border-right: 0; }
.print-answer-item:nth-child(n+11) { border-top: 1px solid #e5e7eb; }
.print-answer-item span { color: #888; font-size: 0.75em; font-weight: 600; }
.print-answer-item strong { color: var(--print-text-color); font-size: 1.05em; line-height: 1.2; }

.print-answer-explanation-list {
    display: flex;
    margin-top: 12px;
    flex-direction: column;
    gap: 8px;
}
.print-answer-explanation-list .answer-explain {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.print-loading {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    background: #fff;
    color: rgba(29, 29, 31, 0.65);
    font-size: 13px;
    letter-spacing: 0.08em;
}
.print-loading[hidden] { display: none; }
.print-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-bottom-color: #2962ff;
    border-radius: 50%;
    animation: print-spin 0.8s linear infinite;
}
@keyframes print-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .print-editor-toolbar {
        top: 8px;
        width: calc(100% - 16px);
        overflow-x: auto;
    }
    .print-toolbar-row { width: max-content; min-width: 100%; }
    .print-editor-spacer { height: 165px; }
    .print-editor-stage { min-width: calc(210mm + 32px); }
}

@media (max-width: 760px) {
    .saved-page-shell { width: calc(100% - 24px); padding-top: 18px; }
    .saved-filter-bar,
    .saved-page-item { align-items: stretch; flex-direction: column; }
    .saved-filter-bar select { width: 100%; }
    .saved-page-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .saved-page-actions .ghost-link,
    .saved-page-actions .home-primary-link,
    .saved-page-actions button { width: 100%; padding: 0 8px; }
}

.register-form {
    display: grid;
    gap: 9px;
}

.register-form > label:not(.agreement-row) {
    margin-top: 5px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.field-help {
    margin: -2px 0 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.field-help-link {
    text-align: right;
}

.field-help-link a {
    color: var(--text);
    font-weight: 700;
}

.agreement-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.agreement-group {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 4px 12px 10px;
}

.agreement-all {
    margin: 0 -4px 8px;
    border-bottom: 1px solid var(--line);
    padding: 11px 4px 12px;
    color: var(--text);
}

.agreement-all span,
.agreement-all small {
    display: block;
}

.agreement-all small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.agreement-group .consent-summary {
    margin-left: 25px;
    background: var(--panel);
}

.agreement-row input {
    width: 16px;
    min-height: 16px;
    margin: 1px 0 0;
    flex: 0 0 16px;
}

.consent-summary {
    margin: -3px 0 4px 25px;
    padding: 10px;
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.register-status {
    min-height: 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.register-status.is-error {
    color: var(--danger);
}

.register-status.is-success {
    color: var(--success);
}

.register-form > button {
    width: 100%;
    margin-top: 2px;
}

.register-footer {
    padding-top: 18px;
    border-top: 1px solid var(--line);
    margin-top: 22px;
    text-align: center;
}

.copy-status.is-error {
    border-color: #fecaca;
    background: #fff5f5;
    color: var(--danger);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 4px;
}

.workflow-shell {
    width: min(1024px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 40px;
}

.workflow-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workflow-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

.workflow-head p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.compact-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
}

.workflow-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.workflow-tab {
    min-height: 38px;
    flex: 1 1 0;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    font-weight: 800;
}

.workflow-tab:hover {
    border-color: transparent;
    background: var(--panel-soft);
    color: var(--text);
    opacity: 1;
}

.workflow-tab.is-active {
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.workflow-tab.is-active:hover {
    background: var(--accent);
    color: var(--accent-contrast);
}

.workflow-tab span {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(29, 29, 31, 0.1);
    color: currentColor;
    font-size: 11px;
    font-weight: 900;
}

.workflow-tab.is-active span {
    background: rgba(255, 255, 255, 0.18);
    color: var(--accent-contrast);
}

.workflow-panel {
    display: none;
}

.workflow-panel.is-active {
    display: block;
}

.output-staging-panel,
.output-staging-panel.is-active {
    display: none !important;
}

.workflow-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    max-width: 100%;
    margin: 0 auto;
}

.step-card {
    margin-bottom: 0;
    min-height: 0;
    border-radius: 16px;
    padding: 24px;
}

.step-title {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
}

.step-title strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.step-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.step-number {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 10px;
    font-weight: 900;
}

.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel-toolbar strong {
    display: block;
    font-size: 14px;
}

.panel-toolbar span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.panel-toolbar-actions {
    justify-content: flex-end;
}

.output-layout {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(520px, 1fr);
    gap: 16px;
    align-items: start;
}

.output-layout .copy-toolbar {
    position: sticky;
    top: 86px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(440px, 0.85fr);
    gap: 18px;
    padding: 18px;
    align-items: start;
}

.editor-pane,
.copy-pane {
    min-width: 0;
}

.copy-pane {
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 100px);
    overflow: auto;
}

.tool-panel,
.copy-toolbar,
.question-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.tool-panel,
.copy-toolbar {
    padding: 18px;
    margin-bottom: 16px;
}

.tool-panel.step-card {
    padding: 24px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-title strong {
    font-size: 14px;
    font-weight: 800;
}

.panel-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.code-row,
.button-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.code-row {
    margin: 0 0 10px 29px;
    width: calc(100% - 29px);
    max-width: 660px;
    flex-wrap: wrap;
}

.code-row input {
    flex: 1 1 220px;
    max-width: 280px;
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0;
}

.import-code-controls {
    align-items: flex-start;
    max-width: 820px;
}

.import-code-list {
    display: grid;
    gap: 8px;
    width: min(100%, 360px);
    flex: 1 1 300px;
}

.import-code-row,
.import-code-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-row .import-code-row input {
    width: 100%;
    max-width: none;
}

.import-code-remove {
    min-width: 52px;
    padding: 0 10px;
}

.import-code-actions {
    flex: 1 1 360px;
    flex-wrap: wrap;
}

.settings-grid,
.toolbar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-grid label,
.toolbar-grid label,
.copy-toolbar > label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.step-card .settings-grid {
    margin-left: 29px;
    width: calc(100% - 29px);
}

.step-card .settings-grid label:last-child {
    grid-column: 1 / -1;
}

.status-line,
.copy-status {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.admin-workspace {
    width: min(1040px, calc(100% - 32px));
    margin: 18px auto;
}

.admin-panel {
    box-shadow: var(--shadow);
}

.admin-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-access-grid fieldset {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 14px;
}

.admin-access-grid legend {
    padding: 0 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.admin-question-types-fieldset {
    grid-column: 1 / -1;
}

.admin-question-type-groups {
    display: grid;
    gap: 14px;
}

.admin-question-type-group {
    display: grid;
    gap: 8px;
}

.admin-question-type-group > strong {
    font-size: 13px;
}

.admin-question-type-group input:disabled + span {
    opacity: 0.5;
}

.admin-option-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-access-option {
    min-height: 38px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 8px 10px;
}

@media (max-width: 720px) {
    .admin-access-grid {
        grid-template-columns: 1fr;
    }
}

.admin-key-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.admin-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-menu-list {
    display: grid;
    gap: 10px;
}

.admin-menu-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 12px;
}

.account-panel {
    border-color: var(--line);
}

.auth-grid {
    margin-bottom: 10px;
}

.saved-user-row,
.saved-editor-row,
.saved-list-head,
.saved-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-user-row {
    justify-content: space-between;
    margin-bottom: 10px;
}

.saved-user-row strong {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.saved-editor-row {
    margin-bottom: 12px;
}

.saved-editor-row input {
    flex: 1;
    min-width: 160px;
}

.saved-list-head {
    justify-content: space-between;
    margin: 10px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.saved-list {
    display: grid;
    gap: 8px;
}

.saved-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 10px;
}

.saved-item.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.saved-item-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.saved-item-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.saved-item-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.saved-item-actions button,
.saved-list-head button,
.saved-user-row button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.switch-row input {
    width: auto;
    min-height: 0;
}

.admin-menu-fields {
    grid-template-columns: 1fr 2fr 110px 130px;
}

.empty-preview.compact {
    min-height: 90px;
}

.question-card {
    padding: 18px;
    margin-bottom: 16px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.card-head strong {
    color: var(--muted);
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.form-grid.full {
    grid-template-columns: 1fr;
}

.form-grid label,
.field-block {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.option-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    min-height: 38px;
}

.mini-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.mini-actions button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.danger-button {
    border-color: #fecaca;
    background: #fff5f5;
    color: var(--danger);
}

.muted-button {
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--text);
}

.hidden {
    display: none !important;
}

.dynamic-body {
    margin-top: 10px;
}

.option-details > summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.question-card .jq-eng {
    min-height: 240px;
}

.question-card .jq-explanation,
.question-card .jq-kor {
    min-height: 160px;
}

.marker-source {
    display: none !important;
}

.marker-editor-shell {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.marker-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 38px;
    padding: 5px 7px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.marker-editor-toolbar > span {
    margin-right: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.marker-editor-toolbar button {
    min-height: 26px;
    padding: 0 8px;
    border-color: var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.marker-editor-toolbar button:hover {
    border-color: var(--line-strong);
    background: var(--panel);
    color: var(--text);
}

.marker-editor {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 0;
    background: var(--panel);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

.marker-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(156, 163, 175, 0.35);
}

.marker-editor.is-multiline { min-height: 96px; }
.marker-editor.is-passage { min-height: 240px; }
.marker-editor.is-long { min-height: 160px; }
.edit-save-panel { margin-top: 18px; }

.option-row,
.grouped-option-row,
.textblock-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.grouped-option-row {
    align-items: flex-start;
}

.grouped-option-row > .answer-pill,
.grouped-option-row > .option-label {
    margin-top: 18px;
}

.option-label {
    width: 26px;
    flex: 0 0 26px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
}

.grouped-fields {
    display: grid;
    grid-template-columns: repeat(var(--grouped-columns, 2), minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.grouped-fields label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.answer-radio {
    width: auto;
    min-height: 0;
}

.answer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 9px;
    background: var(--panel-soft);
    white-space: nowrap;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.toggle-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.toggle-grid input {
    width: auto;
    min-height: 0;
}

.print-stage {
    background: #dfe3ea;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 16px;
    overflow: auto;
}

.print-paper {
    width: min(100%, 210mm);
    min-height: 297mm;
    margin: 0 auto;
    background: #fff;
    color: var(--print-text-color, #1d1d1f);
    padding: 34px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
    font-family: var(--print-font-family, "Pretendard", "Malgun Gothic", Arial, sans-serif);
    font-size: var(--print-font-size, 12px);
    line-height: var(--print-line-height, 1.6);
}

.empty-preview {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: #666;
    border: 1px dashed #bbb;
    border-radius: var(--radius);
}

.print-header {
    border-top: 3px solid #2962ff;
    border-bottom: 3px solid #2962ff;
    color: #2962ff;
    font-weight: 900;
    text-align: center;
    padding: 9px 0;
    margin-bottom: 18px;
}

.print-brand {
    color: #111827;
    font-size: 0.78em;
    letter-spacing: 0.08em;
}

.print-title {
    font-size: 1.05em;
}

.print-author-line {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    min-height: 1em;
    padding: 0 4px;
    color: #555;
    font-size: 0.8em;
}

.print-question-flow.columns-2 {
    column-count: 2;
    column-gap: 18px;
}

.print-question-flow.columns-1 {
    column-count: 1;
}

.print-question {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: var(--print-gap, 14px);
}

.print-q-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
    font-size: 0.9em;
    font-weight: 900;
    margin-bottom: 7px;
}

.print-q-head .meta {
    color: #2962ff;
}

.print-instruction {
    font-size: 0.95em;
    font-weight: 800;
    margin-bottom: 7px;
}

.print-passage {
    margin-bottom: 10px;
    text-align: left;
}

.print-box {
    border: 1px solid #777;
    padding: 9px;
    margin-bottom: 9px;
}

.print-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.print-choice-num {
    color: #2962ff;
    font-weight: 400;
    min-width: 20px;
}

.print-choice-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.print-choice-table td,
.print-choice-table th {
    padding: 3px 5px;
    vertical-align: top;
}

.print-sequence-box {
    border: 1px solid #777;
    border-bottom: 0;
    margin-bottom: 9px;
}

.print-sequence-row {
    display: flex;
    border-bottom: 1px solid #777;
}

.print-sequence-label {
    width: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-right: 1px solid #777;
    font-weight: 900;
}

.print-sequence-body {
    flex: 1;
    padding: 8px;
}

.print-inline-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.print-answer-section {
    margin-top: 28px;
    break-before: page;
    page-break-before: always;
}

.answer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.answer-table th,
.answer-table td {
    border: 1px solid #000;
    padding: 5px;
    text-align: center;
}

.answer-explain {
    break-inside: avoid;
    border-top: 1px solid #000;
    padding-top: 7px;
    margin-bottom: 12px;
}

.print-editable {
    min-width: 1em;
    display: inline;
    outline: 1px dashed transparent;
}

.edit-mode-active .print-editable {
    cursor: text;
}

.edit-mode-active .print-editable:focus {
    outline-color: #2962ff;
    background: #f0f6ff;
}

.is-ko {
    color: var(--print-ko-color, #555);
    font-size: 0.92em;
}

.print-footer {
    margin-top: 22px;
    text-align: center;
    color: #777;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.print-paper.hide-kor .is-ko,
.print-paper.hide-meta .print-q-head,
.print-paper.hide-answer .print-answer-section,
.print-paper.hide-footer .print-footer {
    display: none !important;
}

@media (max-width: 1180px) {
    .workflow-shell,
    .home-shell,
    .register-shell,
    .editorial-home {
        width: calc(100% - 24px);
    }

    .workflow-grid,
    .output-layout,
    .home-grid {
        grid-template-columns: 1fr;
    }

    .output-layout .copy-toolbar {
        position: static;
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .copy-pane {
        position: static;
        max-height: none;
    }
}

@media (max-width: 760px) {
    body {
        overflow: auto;
    }

    .app-shell {
        height: auto;
        min-height: 100vh;
        display: block;
        overflow: visible;
    }

    .app-sidebar {
        width: 100%;
        display: block;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-brand {
        height: 56px;
    }

    .sidebar-label {
        display: none;
    }

    .header-menu {
        flex-direction: row;
        gap: 8px;
        padding: 0 12px 12px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .header-menu-link {
        width: auto;
        flex: 0 0 auto;
        background: var(--panel);
        border: 1px solid var(--line);
    }

    .sidebar-footer {
        display: none;
    }

    .app-main {
        height: auto;
        overflow: visible;
    }

    .app-header {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
    }

    .guide-embed-shell {
        height: calc(100vh - 170px);
        min-height: 600px;
    }

    .topbar-search {
        width: 100%;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .workflow-shell,
    .home-shell,
    .register-shell {
        width: calc(100% - 24px);
        padding-top: 14px;
    }

    .editorial-home {
        width: calc(100% - 32px);
        padding: 28px 0 44px;
    }

    .editorial-hero {
        padding-bottom: 40px;
    }

    .editorial-hero h2 {
        font-size: 34px;
    }

    .editorial-section {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px 0;
    }

    .editorial-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .document-header {
        min-height: 56px;
        padding: 8px 16px;
    }

    .legal-document {
        width: calc(100% - 32px);
        padding-top: 40px;
    }

    .register-panel {
        padding: 22px 18px;
    }

    .workflow-head,
    .home-head {
        align-items: stretch;
        flex-direction: column;
    }

    .home-primary-link {
        width: 100%;
    }

    .workflow-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .code-row,
    .button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .tool-panel.step-card {
        padding: 18px;
    }

    .settings-grid,
    .code-row {
        margin-left: 0;
        width: 100%;
    }

    .workspace {
        padding: 12px;
    }

    .settings-grid,
    .toolbar-grid,
    .form-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .code-row input {
        max-width: none;
    }

    .import-code-list,
    .import-code-actions {
        width: 100%;
        flex-basis: auto;
    }

    .import-code-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .import-code-actions > button,
    .import-code-actions > a {
        width: 100%;
    }

    .admin-key-row,
    .admin-menu-fields,
    .saved-editor-row,
    .saved-item {
        grid-template-columns: 1fr;
    }

    .saved-editor-row {
        align-items: stretch;
        flex-direction: column;
    }

    .saved-item-actions {
        justify-content: flex-start;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        overflow: visible;
    }

    .app-sidebar,
    .app-header,
    .workflow-head,
    .workflow-tabs,
    .panel-toolbar,
    .editor-pane,
    .copy-toolbar {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .workflow-shell,
    .workflow-panel,
    .output-layout,
    .workspace,
    .copy-pane,
    .print-stage {
        display: block;
        padding: 0;
        margin: 0;
        width: auto;
        height: auto;
        max-height: none;
        overflow: visible;
        border: 0;
        background: #fff;
    }

    .print-paper {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .print-editor-stage {
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .print-page-container {
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .print-a4-page {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 10mm;
        box-shadow: none;
    }

    .print-page-content,
    .print-answer-page-body { min-height: 0; }

    @page {
        size: A4 portrait;
        margin: 0;
    }

    .print-question-flow.columns-2 {
        column-fill: auto;
    }
}
