:root {
  color-scheme: light;
  --canvas: #f4f6f8;
  --surface: #fff;
  --surface-subtle: #edf1f4;
  --ink: #18222c;
  --ink-muted: #586574;
  --border: #c8d0d8;
  --border-strong: #8793a1;
  --accent: #0b6655;
  --accent-hover: #084f42;
  --accent-active: #063e34;
  --accent-ink: #fff;
  --warning-bg: #fff5da;
  --warning-ink: #714c00;
  --error-bg: #fff0ef;
  --error-ink: #8c281f;
  --success-bg: #e9f7f1;
  --success-ink: #155d49;
  --focus: #9a5200;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-width: 320px; }
body { margin: 0; line-height: 1.55; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 14px; background: var(--ink); color: white; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 32px 24px 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.step-label { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.18; letter-spacing: -.025em; }
.brand-heading { display: flex; align-items: center; gap: 8px; }
.brand-symbol { display: block; flex: 0 0 auto; width: 48px; height: 46px; }
.brand-page { fill: var(--surface-subtle); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.brand-fold { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.brand-number { fill: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 53px; font-weight: 700; letter-spacing: -4px; }
.brand-arrow { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.brand-word { font-weight: 700; }
.lede { margin: 8px 0 0; color: var(--ink-muted); font-size: 16px; }
main { max-width: 1120px; margin: 0 auto; padding: 24px; }
.stage-rail { margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.stage-rail li { min-width: 0; padding: 14px 16px; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; border-left: 1px solid var(--border); }
.stage-rail li:first-child { border-left: 0; }
.stage-rail span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 13px; font-weight: 700; }
.stage-rail strong { font-size: 14px; }
.stage-rail small { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-rail .current { background: #f0f8f5; }
.stage-rail .current span { border-color: var(--accent); background: var(--accent); color: white; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.editor-column { min-width: 0; }
.panel { margin: 0 0 24px; padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.transfer-panel { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; box-shadow: 0 8px 24px rgb(24 34 44 / 8%); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .transfer-panel h2 { margin: 0; font-size: 20px; line-height: 1.18; }
.section-heading > p { margin: 3px 0 0; color: var(--ink-muted); font-size: 13px; text-align: right; }
label:not(.acknowledgement) { display: block; margin: 16px 0 7px; font-size: 14px; font-weight: 650; }
label span { color: var(--ink-muted); font-weight: 400; }
input:not([type="checkbox"]), textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: white; color: var(--ink); transition: border-color 120ms, box-shadow 120ms; }
textarea { resize: vertical; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55; tab-size: 2; }
input:hover, textarea:hover { border-color: #657281; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 42%, transparent); outline-offset: 2px; border-color: var(--focus); }
input[type="file"] { padding: 7px; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-subtle); color: var(--ink); font-weight: 600; }
.hint { margin: 6px 0 0; color: var(--ink-muted); font-size: 12px; }
.native-import { padding: 16px; border: 1px solid #b7d9ce; border-radius: 8px; background: #f0f8f5; }
.native-import h3 { margin: 0; font-size: 17px; }
.native-import > p:not(.step-label) { margin: 5px 0 0; color: var(--ink-muted); font-size: 13px; }
.native-import label { margin-top: 13px; }
.native-import .secondary { background: var(--surface); }
.native-import .import-status { margin: 10px 0 0; padding: 9px 10px; border-radius: 5px; font-size: 13px; }
.native-import .import-status.success { background: var(--success-bg); color: var(--success-ink); }
.native-import .import-status.warning { background: var(--warning-bg); color: var(--warning-ink); }
.native-import .import-status.error { background: var(--error-bg); color: var(--error-ink); }
.choice-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: var(--ink-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.choice-divider::before, .choice-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.field-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 16px; }
button { min-height: 44px; padding: 10px 14px; border-radius: 6px; font-weight: 650; cursor: pointer; transition: background 120ms, border-color 120ms, transform 120ms; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .55; }
.primary { margin-top: 20px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); }
.primary:active { background: var(--accent-active); }
.secondary { margin-top: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); }
.secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: #f0f8f5; }
.status { margin: 0 0 16px; padding: 11px 12px; border-radius: 6px; font-size: 14px; }
.status.neutral { background: var(--surface-subtle); color: var(--ink-muted); }
.status.warning { background: var(--warning-bg); color: var(--warning-ink); }
.status.error { background: var(--error-bg); color: var(--error-ink); }
.status.success { background: var(--success-bg); color: var(--success-ink); }
.issues { margin: 0 0 14px; padding: 0; list-style: none; }
.issues li { margin-top: 8px; padding: 10px 12px 10px 34px; border-left: 3px solid #c88500; background: var(--warning-bg); color: var(--warning-ink); position: relative; font-size: 14px; }
.issues li::before { content: "!"; position: absolute; left: 12px; font-weight: 800; }
.acknowledgement { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 18px; font-size: 14px; font-weight: 600; }
.acknowledgement input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.preview { padding-top: 20px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.preview.empty { color: var(--ink-muted); }
.preview h2 { margin: 28px 0 10px; font-size: 20px; }
.preview h3 { margin: 22px 0 8px; font-size: 17px; }
.preview [data-image-placeholder] { margin: 24px 0 16px; color: var(--error-ink); }
.preview p, .preview blockquote, .preview ul, .preview ol { margin: 0 0 16px; }
.preview blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--border-strong); color: var(--ink-muted); }
.preview pre, #codes pre { max-width: 100%; padding: 14px; overflow: auto; border-radius: 6px; background: #18222c; color: #f1f4f7; white-space: pre; font: 13px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.preview code:not(pre code) { padding: 2px 4px; border-radius: 4px; background: var(--surface-subtle); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; }
.image-placeholder { display: block; margin: 0 0 16px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--surface-subtle); color: var(--ink-muted); font: 13px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.preview-image { display: block; max-width: 100%; height: auto; margin: 0 auto 16px; border-radius: 6px; }
.code-panel > p { color: var(--ink-muted); }
#codes details { margin-top: 10px; border: 1px solid var(--border); border-radius: 6px; }
#codes summary { padding: 10px 12px; cursor: pointer; font-weight: 650; }
#codes pre { margin: 0 12px; }
#codes button { margin: 10px 12px 12px; }
.transfer-note { margin: 10px 0 18px; color: var(--ink-muted); font-size: 14px; }
.transfer-list { margin: 0; padding: 0; list-style: none; }
.transfer-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); }
.transfer-list li > div { min-width: 0; }
.transfer-list .number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-subtle); color: var(--ink-muted); font-size: 12px; font-weight: 700; }
.transfer-list strong { font-size: 14px; }
.transfer-list p { margin: 3px 0 0; color: var(--ink-muted); font-size: 13px; overflow-wrap: anywhere; }
.table-image-card { width: 100%; min-width: 0; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.table-image-card h3 { margin: 0 0 8px; font-size: 14px; }
.table-canvas-viewport { max-width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 5px; background: white; }
.table-canvas-viewport canvas { display: block; max-width: none; }
.table-image-card button { width: 100%; }
.hero-image-card { width: 100%; min-width: 0; margin-top: 12px; }
.hero-image-card img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; border: 1px solid var(--border); border-radius: 5px; background: white; }
.hero-image-card button { width: 100%; }
.medium-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 14px; padding: 10px 13px; border-radius: 6px; background: var(--accent); color: white; font-weight: 650; text-decoration: none; }
.medium-link:hover { background: var(--accent-hover); }
.canonical-guide { margin-top: 16px; padding: 13px; border: 1px solid #dfc27d; border-radius: 6px; background: var(--warning-bg); color: var(--warning-ink); font-size: 13px; }
.canonical-guide p { margin: 5px 0 0; }
.fine-print { color: var(--ink-muted); font-size: 12px; }
.about-panel h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.18; }
.about-panel h3 { margin: 18px 0 6px; font-size: 16px; line-height: 1.3; }
.about-panel p { margin: 0 0 12px; color: var(--ink-muted); }
.about-panel ol { margin: 0; padding-left: 24px; }
.about-panel li { padding-left: 4px; }
.about-panel li + li { margin-top: 6px; }
.about-panel .about-limits { margin-bottom: 0; }
@media (max-width: 959px) {
  .workspace { grid-template-columns: 1fr; }
  .transfer-panel { position: static; max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .panel { padding: 20px; }
}
@media (max-width: 719px) {
  .header-inner { padding: 24px 16px; }
  main { padding: 16px; }
  .stage-rail { grid-template-columns: 1fr; }
  .stage-rail li { border-left: 0; border-top: 1px solid var(--border); }
  .stage-rail li:first-child { border-top: 0; }
  .workspace { grid-template-columns: 1fr; }
  .transfer-panel { position: static; order: 2; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 6px; text-align: left; }
  .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
