:root {
  color-scheme: light;
  --ink: #17243b;
  --muted: #61708a;
  --line: #d6dfec;
  --soft-line: #e8eef6;
  --surface: #ffffff;
  --page: #f4f7fb;
  --blue: #1f63c6;
  --blue-dark: #154b9d;
  --blue-soft: #eaf2ff;
  --green: #138b67;
  --green-soft: #e7f7f1;
  --amber: #b97700;
  --amber-soft: #fff5d8;
  --red: #c6404b;
  --red-soft: #fff0f1;
  --shadow: 0 10px 30px rgba(34, 57, 91, .08);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
a { color: inherit; }

.content-width {
  width: min(1480px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  width: min(1480px, calc(100% - 40px));
  min-height: 64px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--blue);
  border-radius: 7px;
  font-size: 12px;
  letter-spacing: 0;
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #41516b; text-decoration: none; font-weight: 650; }
.site-nav a:hover { color: var(--blue); }

.intro-band {
  color: #fff;
  background: #173a70;
  border-bottom: 1px solid #102d59;
}

.intro-inner {
  min-height: 198px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.intro-band .eyebrow { color: #8bc8ff; }
.intro-band h1 { margin: 0; font-size: clamp(28px, 4vw, 46px); line-height: 1.25; letter-spacing: 0; }
.intro-band p:not(.eyebrow) { max-width: 760px; margin: 12px 0 0; color: #dbe8fa; font-size: 17px; }

.intro-link {
  flex: 0 0 auto;
  padding: 11px 18px;
  color: #fff;
  border: 1px solid #86b8ef;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 750;
}

.editor-section { padding-block: 22px 56px; scroll-margin-top: 58px; }

.editor-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.editor-heading h2, .prose-section h2 { margin: 0; font-size: 26px; line-height: 1.35; letter-spacing: 0; }
.editor-heading .eyebrow { display: none; }
.editor-heading p:not(.eyebrow) { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.document-name { width: min(330px, 100%); color: #52617a; font-size: 13px; font-weight: 750; }
.document-name input {
  width: 100%;
  height: 42px;
  margin-top: 5px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfcada;
  border-radius: 6px;
  outline: none;
}
.document-name input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 99, 198, .13); }

.editor-actions {
  position: sticky;
  top: 73px;
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  background: #eaf0f8;
  border: 1px solid #cdd8e7;
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(24, 47, 78, .1);
}

.action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.action-group + .action-group { padding-left: 10px; border-left: 1px solid #c3cede; }
.action-group-label { margin-right: 2px; color: #63738c; font-size: 12px; font-weight: 800; }
.save-indicator { align-self: center; padding: 4px 7px; color: #49627f; font-size: 11px; font-weight: 750; white-space: nowrap; }
.save-indicator[data-state="pending"] { color: #8a6100; }
.save-indicator[data-state="saved"] { color: #08745e; }
.save-indicator[data-state="error"] { color: #ad2e3b; }
.png-scale-label { display: flex; align-items: center; gap: 5px; color: #52617a; font-size: 11px; font-weight: 750; white-space: nowrap; }
.png-scale-label select { min-height: 34px; padding: 4px 24px 4px 7px; color: #243651; background: #fff; border: 1px solid #bcc9dc; border-radius: 6px; }

.button {
  min-height: 38px;
  padding: 7px 12px;
  color: #243651;
  background: #fff;
  border: 1px solid #bcc9dc;
  border-radius: 6px;
  font-weight: 720;
  white-space: nowrap;
}
.button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.button:focus-visible { outline: 3px solid rgba(31, 99, 198, .2); outline-offset: 1px; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover:not(:disabled) { color: #fff; background: var(--blue-dark); border-color: var(--blue-dark); }
.button.danger { color: var(--red); border-color: #e5abb0; }
.button.active { color: #fff; background: #344965; border-color: #344965; }

.editor-options { background: #fff; border: 1px solid #cdd8e7; border-radius: 8px; }
.editor-options > summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 13px; color: #294767; cursor: pointer; font-size: 13px; font-weight: 800; }
.editor-options > summary::marker { color: #176bd1; }
.editor-options > summary span { color: #718198; font-size: 12px; font-weight: 600; }
.editor-options[open] > summary { border-bottom: 1px solid #dbe4ef; }
.editor-options-content { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(0, 1.2fr); }
.template-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #fff;
  border: 0;
  border-right: 1px solid #dbe4ef;
  flex-wrap: wrap;
}
.template-bar label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; }
.template-bar select { min-height: 38px; padding: 0 30px 0 10px; border: 1px solid #bcc9dc; border-radius: 6px; background: #fff; }
.template-bar > span { color: var(--muted); font-size: 13px; }

.design-picker { padding: 10px 12px; background: #fff; border: 0; }
.design-picker-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.design-picker-heading strong { display: block; color: #234365; font-size: 13px; }
.design-picker-heading span { color: #67778d; font-size: 12px; }
.design-theme-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.design-theme-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; color: #30425b; text-align: left; background: #fff; border: 1px solid #ccd8e7; border-radius: 9px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.design-theme-card:hover { border-color: #7fa7df; transform: translateY(-1px); }
.design-theme-card.selected { border-color: #2f75d6; box-shadow: 0 0 0 2px rgba(47, 117, 214, .16); }
.design-theme-card > span:last-child { display: grid; gap: 2px; min-width: 0; }
.design-theme-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.design-theme-card small { color: #718198; font-size: 11px; }
.theme-preview { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 3px; flex: 0 0 44px; height: 38px; padding: 5px; overflow: hidden; border: 1px solid #d8e2ee; border-radius: 5px; background: radial-gradient(circle, #dce6f1 .7px, transparent .8px); background-size: 7px 7px; }
.theme-preview i { display: block; height: 9px; border: 1px solid; border-radius: 3px; }
.theme-preview i:nth-child(1) { grid-column: span 2; }
.theme-preview.modern i:nth-child(1) { background: #e5f8f2; border-color: #18a67c; }.theme-preview.modern i:nth-child(2) { background: #e9f2ff; border-color: #3f82db; }.theme-preview.modern i:nth-child(3) { background: #fff4d4; border-color: #dda01f; }
.theme-preview.classic { background: #fff; }.theme-preview.classic i { background: #fff; border-color: #252525; border-radius: 0; }.theme-preview.classic i:nth-child(1) { border-radius: 999px; }
.theme-preview.colorboard i:nth-child(1) { background: #075b13; border-color: #063e0d; }.theme-preview.colorboard i:nth-child(2) { background: #b7ead1; border-color: #19743b; }.theme-preview.colorboard i:nth-child(3) { background: #d8b8f5; border-color: #974af0; }
.theme-preview.pastel i:nth-child(1) { background: #d9f4e8; border-color: #39ae82; }.theme-preview.pastel i:nth-child(2) { background: #dfeaff; border-color: #5d92ec; }.theme-preview.pastel i:nth-child(3) { background: #f7ddff; border-color: #ce70db; }

.mobile-note { display: none; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 690px;
  background: #fff;
  border: 1px solid #cdd8e7;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.workspace.wide-canvas { position: relative; grid-template-columns: minmax(0, 1fr); }
.workspace.wide-canvas .inspector-panel { display: none; }
.workspace.wide-canvas.has-selection .inspector-panel {
  display: block;
  position: absolute;
  top: 118px;
  right: 14px;
  z-index: 20;
  width: min(320px, calc(100% - 28px));
  max-height: calc(100% - 132px);
  overflow-y: auto;
  border: 1px solid #b9c9dc;
  border-radius: 9px;
  box-shadow: 0 16px 36px rgba(28, 49, 79, .22);
}

.canvas-column { min-width: 0; border-right: 1px solid var(--line); }
.tool-toolbar {
  min-height: 72px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.tool-toolbar-copy { display: block; color: var(--muted); font-size: 12px; }
.node-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; min-height: 40px; padding: 7px 14px; color: #596983; background: #f8fafc; border-bottom: 1px solid var(--soft-line); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend-start { background: #29a67c; }
.legend-process { background: #2f75d6; }
.legend-decision { background: #e7a621; transform: rotate(45deg) scale(.78); }
.legend-ending { background: #e25b66; }
.legend-note { background: #8b97a8; }

.board-wrap {
  position: relative;
  height: clamp(720px, calc(100vh - 120px), 980px);
  overflow: hidden;
  background: #edf3fa;
  touch-action: none;
}

.canvas-stage { position: absolute; left: 0; top: 0; width: 1400px; height: 900px; transform-origin: 0 0; }
.board {
  position: relative;
  width: 1400px;
  height: 900px;
  overflow: hidden;
  background-color: #fbfdff;
  background-image:
    linear-gradient(#e0e8f2 1px, transparent 1px),
    linear-gradient(90deg, #e0e8f2 1px, transparent 1px);
  background-size: 30px 30px;
}

#wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#wires g:focus { outline: none; }
#wires g:focus .wire-line, #wires g.audit-highlight .wire-line { stroke: #e07816; stroke-width: 5; filter: drop-shadow(0 0 4px rgba(224, 120, 22, .6)); }
.wire-hit { stroke: transparent; stroke-width: 18; fill: none; cursor: pointer; pointer-events: stroke; }
.wire-line { stroke: #7183a0; stroke-width: 3; fill: none; pointer-events: none; }
.wire-line.arrow-filled { marker-end: url(#arrow-filled); }
.wire-line.arrow-open { marker-end: url(#arrow-open); }
.wire-line.arrow-dot { marker-end: url(#arrow-dot); }
.wire-line.arrow-diamond { marker-end: url(#arrow-diamond); }
.wire-line.selected { stroke: var(--blue); stroke-width: 5; filter: drop-shadow(0 0 3px rgba(31, 99, 198, .35)); }
.wire-label-bg { fill: #fff; stroke: #c2cede; stroke-width: 1; rx: 5; cursor: grab; pointer-events: all; }
.wire-label { fill: #35445b; font-size: 14px; font-weight: 750; text-anchor: middle; dominant-baseline: middle; cursor: grab; pointer-events: all; user-select: none; }
.wire-route-handle { fill: #fff; stroke: var(--blue); stroke-width: 3; cursor: ew-resize; pointer-events: all; }
.wire-route-handle.route-vertical { cursor: ns-resize; }
.field-hint { margin: -2px 0 2px; color: #63738c; font-size: 12px; line-height: 1.5; }

.node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 150px;
  height: 72px;
  padding: 12px;
  color: #1c2b43;
  border: 2px solid;
  border-radius: 7px;
  box-shadow: 0 4px 0 rgba(57, 74, 98, .08);
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  user-select: none;
  touch-action: none;
}
.node.start { background: var(--green-soft); border-color: #20a67e; }
.node.process { background: var(--blue-soft); border-color: #4b8fe5; }
.node.ending { background: var(--red-soft); border-color: #e05b67; }
.node.note { background: #fffbe9; border-color: #8996a8; border-style: dashed; font-weight: 650; }
.node.decision {
  width: 116px;
  height: 116px;
  padding: 23px;
  background: var(--amber-soft);
  border-color: #e3a01a;
  border-radius: 5px;
  transform: rotate(45deg);
}
.node.decision .node-text { transform: rotate(-45deg); }
.node.selected { outline: 4px solid rgba(31, 99, 198, .28); outline-offset: 3px; z-index: 4; }
.node.connect-source { outline: 4px solid rgba(19, 139, 103, .32); outline-offset: 3px; }
.node-text { width: 100%; max-height: 100%; overflow: hidden; overflow-wrap: anywhere; }

.canvas-controls {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #c3cede;
  border-radius: 7px;
  box-shadow: 0 7px 20px rgba(35, 55, 83, .12);
}
.canvas-controls .button { min-width: 38px; min-height: 34px; padding: 4px 9px; }
.zoom-label { min-width: 54px; text-align: center; font-size: 13px; font-weight: 800; }

.canvas-context-menu {
  position: fixed;
  z-index: 100;
  display: grid;
  min-width: 132px;
  padding: 5px;
  background: #fff;
  border: 1px solid #aebed2;
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(28, 49, 79, .2);
}
.canvas-context-menu[hidden] { display: none; }
.canvas-context-menu button {
  width: 100%;
  padding: 8px 10px;
  color: #20354f;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.canvas-context-menu button:hover { background: #eaf2ff; color: #1857ad; }
.canvas-context-menu button.danger { color: #b63845; }
.canvas-context-menu button.danger:hover { color: #a72535; background: #fff0f2; }

.inspector-panel { padding: 16px; min-width: 0; background: #fbfcfe; }
.inspector-panel h3 { margin: 18px 0 10px; font-size: 19px; }
.quick-help { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.quick-help summary { color: var(--blue); font-weight: 800; }
.quick-help ol { margin: 10px 0 0; padding-left: 22px; color: #53627a; font-size: 13px; }
.quick-help li + li { margin-top: 5px; }
.inspector-form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; color: #52617a; font-size: 13px; font-weight: 750; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcc9dc;
  border-radius: 6px;
  outline: none;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 99, 198, .12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.edge-list { display: grid; gap: 8px; }
.edge-item { padding: 9px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.edge-item strong { display: block; margin-bottom: 5px; font-size: 12px; }
.empty, .hint, .status { color: var(--muted); font-size: 13px; }
.status { min-height: 24px; color: var(--green); font-weight: 750; }

.content-band { background: #fff; border-block: 1px solid var(--soft-line); }
.prose-section { padding-block: 68px; }
.prose-section > p:not(.eyebrow) { max-width: 900px; color: #53627a; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; }
.feature-grid article { padding: 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 7px; }
.feature-grid h3 { margin: 0 0 7px; font-size: 18px; }
.feature-grid p { margin: 0; color: #586780; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.check-list { padding-left: 0; list-style: none; }
.check-list li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--soft-line); }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 900; }
.text-link { color: var(--blue); font-weight: 800; }
.faq-band { background: #f6f8fb; }
.faq-list { display: grid; gap: 8px; margin-top: 25px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.faq-list summary { padding: 15px 18px; font-weight: 800; }
.faq-list p { margin: 0; padding: 0 18px 16px; color: #56657d; }

.site-footer { padding: 32px 0; color: #c8d5e7; background: #16263d; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 5px 0 0; color: #9fb0c8; font-size: 13px; }
.footer-inner nav { display: flex; flex-wrap: wrap; align-items: start; gap: 17px; }
.footer-inner a { text-decoration: none; font-size: 13px; }
.footer-inner a:hover { color: #fff; }

.audit-dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 24px 80px rgba(20, 35, 57, .26); }
.audit-dialog::backdrop { background: rgba(17, 30, 49, .58); }
.audit-dialog form { padding: 20px; }
.audit-intro { margin: 4px 0 12px; color: #53657d; font-size: 13px; line-height: 1.55; }
.audit-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.audit-legend span, .audit-severity { padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.audit-legend [data-severity="error"], .audit-item[data-severity="error"] .audit-severity { color: #a92535; background: #fff0f2; }
.audit-legend [data-severity="warning"], .audit-item[data-severity="warning"] .audit-severity { color: #8a6100; background: #fff7d6; }
.audit-legend [data-severity="suggestion"], .audit-item[data-severity="suggestion"] .audit-severity { color: #155ca8; background: #eaf3ff; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 12px; }
.dialog-heading h2 { margin: 0; font-size: 22px; }
.dialog-close { border: 0; background: transparent; font-size: 26px; color: #61708a; }
.audit-list { margin: 0 0 18px; padding-left: 22px; }
.audit-list li + li { margin-top: 7px; }
.audit-pass { padding: 13px; color: #0f6f52; background: var(--green-soft); border: 1px solid #a9decf; border-radius: 6px; }
.audit-result-list { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.audit-item { width: 100%; padding: 10px; color: #263b56; text-align: left; background: #fff; border: 1px solid #cfdae7; border-radius: 7px; cursor: pointer; }
.audit-item:hover, .audit-item:focus-visible { border-color: #4a86d4; box-shadow: 0 0 0 3px rgba(74, 134, 212, .14); outline: none; }
.audit-item-row { display: flex; align-items: flex-start; gap: 8px; }
.audit-item-message { flex: 1; line-height: 1.5; }
.audit-action { display: block; margin: 5px 0 0 55px; color: #1763b9; font-size: 12px; font-weight: 750; }

.static-main { min-height: 70vh; background: #fff; }
.static-hero { padding: 58px 0 36px; border-bottom: 1px solid var(--line); background: #f2f6fc; }
.static-hero h1 { margin: 0; font-size: 38px; letter-spacing: 0; }
.static-hero p { max-width: 760px; margin: 10px 0 0; color: #56657d; }
.article-layout { display: grid; grid-template-columns: minmax(0, 800px) 240px; justify-content: space-between; gap: 60px; padding-block: 54px 80px; }
.article-body h2 { margin: 42px 0 10px; font-size: 25px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 27px 0 8px; }
.article-body p, .article-body li { color: #46566f; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.article-body th, .article-body td { padding: 11px; text-align: left; border: 1px solid var(--line); }
.article-body th { background: #f1f5fa; }
.article-body code { padding: 2px 5px; border-radius: 4px; background: #edf2f8; }
.article-nav { position: sticky; top: 86px; align-self: start; padding-left: 17px; border-left: 2px solid var(--line); }
.article-nav strong { display: block; margin-bottom: 8px; }
.article-nav a { display: block; padding: 5px 0; color: #53627a; text-decoration: none; font-size: 13px; }
.article-nav a:hover { color: var(--blue); }
.callout { padding: 15px; background: var(--blue-soft); border-left: 4px solid var(--blue); }
.contact-action { margin: 22px 0; padding: 20px; background: #f3f7fc; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 6px; }
.contact-action .intro-link { display: inline-block; color: #fff; background: var(--blue); border: 0; box-shadow: none; }
.contact-action p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.contact-form { display: grid; gap: 18px; margin: 24px 0 42px; padding: 24px; background: #f7faff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 8px; }
.contact-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .field { position: relative; display: grid; gap: 7px; color: #334a68; font-weight: 750; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid #b9c8da; border-radius: 6px; outline: none; }
.contact-form textarea { min-height: 190px; resize: vertical; line-height: 1.6; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 99, 198, .13); }
.contact-form .optional { color: var(--muted); font-size: 12px; font-weight: 500; }
.field-counter { justify-self: end; color: var(--muted); font-size: 12px; font-weight: 500; }
.contact-consent { display: flex; align-items: flex-start; gap: 9px; color: #465a75; font-size: 13px; }
.contact-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 3px; }
.contact-consent a { color: var(--blue); font-weight: 750; }
.contact-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.contact-status { min-height: 24px; margin: 0; color: var(--green); font-size: 13px; font-weight: 700; }

@media (max-width: 1100px) {
  .editor-options-content { grid-template-columns: 1fr; }
  .template-bar { border-right: 0; border-bottom: 1px solid #dbe4ef; }
  .design-theme-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  .workspace.wide-canvas { grid-template-columns: minmax(0, 1fr); }
  .tool-toolbar { align-items: flex-start; flex-direction: column; }
  .node-actions { justify-content: flex-start; }
  .board-wrap { height: clamp(680px, calc(100vh - 150px), 880px); }
}

@media (max-width: 760px) {
  .design-picker { padding-inline: 12px; }
  .design-theme-list { grid-template-columns: 1fr 1fr; gap: 7px; }
  .design-theme-card { padding: 7px; }
  .content-width, .site-header-inner { width: min(100% - 24px, 1480px); }
  .site-header-inner { min-height: 56px; }
  .brand-mark { width: 30px; height: 30px; }
  .site-nav { gap: 13px; }
  .site-nav a { font-size: 13px; }
  .site-nav a:first-child { display: none; }
  .intro-inner { min-height: 165px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 15px; padding-block: 24px; }
  .intro-band h1 { font-size: 29px; }
  .intro-band p:not(.eyebrow) { font-size: 15px; }
  .intro-link { padding: 8px 13px; }
  .editor-section { width: 100%; padding: 14px 0 40px; }
  .editor-heading { width: calc(100% - 24px); margin-inline: auto; align-items: stretch; flex-direction: column; }
  .editor-heading h2 { font-size: 23px; }
  .document-name { width: 100%; }
  .editor-actions { position: sticky; top: 60px; display: flex; flex-wrap: nowrap; padding: 8px; border-radius: 0; border-inline: 0; gap: 6px; overflow-x: auto; }
  .action-group { flex: 0 0 auto; flex-wrap: nowrap; }
  .action-group-label { display: none; }
  .editor-actions .button { min-width: max-content; padding-inline: 8px; font-size: 12px; }
  .action-group + .action-group { padding-left: 0; border-left: 0; }
  .save-indicator { display: none; }
  .editor-options { margin-inline: 8px; }
  .editor-options-content { display: block; }
  .template-bar { display: flex; align-items: stretch; flex-direction: column; }
  .template-bar label { align-items: stretch; flex-direction: column; }
  .template-bar > span { display: none; }
  .mobile-note { display: block; margin: 0; padding: 10px 14px; color: #4d5d75; background: #fff8db; border-bottom: 1px solid #ead58c; font-size: 12px; }
  .workspace { display: block; min-height: 0; border-inline: 0; box-shadow: none; }
  .canvas-column { border-right: 0; }
  .tool-toolbar { display: block; min-height: 0; padding: 8px; overflow-x: auto; }
  .tool-toolbar > div:first-child { display: none; }
  .node-actions { flex-wrap: nowrap; width: max-content; }
  .legend { display: none; }
  .board-wrap { height: 500px; border-bottom: 1px solid var(--line); }
  .canvas-controls { left: 10px; bottom: 10px; }
  .inspector-panel { display: block; padding: 12px; border-top: 1px solid #cbd7e5; }
  .quick-help, .tutorial-replay, .inspector-panel > .hint { display: none; }
  .inspector-panel h3 { margin-top: 2px; }
  .prose-section { padding-block: 48px; }
  .feature-grid, .two-column { grid-template-columns: 1fr; gap: 12px; }
  .two-column { gap: 38px; }
  .footer-inner { flex-direction: column; }
  .article-layout { display: block; padding-block: 38px 60px; }
  .article-nav { position: static; margin-bottom: 30px; }
  .static-hero { padding: 38px 0 28px; }
  .static-hero h1 { font-size: 30px; }
  .article-body table { display: block; overflow-x: auto; white-space: nowrap; }
  .contact-form { padding: 18px 14px; }
  .contact-form-grid { grid-template-columns: 1fr; }
}

/* Template library */
.template-hero { padding-block: 58px 52px; }
.template-hero h1 { max-width: 760px; margin-bottom: 12px; }
.template-hero p:not(.eyebrow) { max-width: 700px; }
.template-grid-section { padding-block: 46px 64px; }
.template-grid-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.template-grid-heading h2 { margin: 0; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.template-card { display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: #fff; border: 1px solid #d5e0ec; border-radius: 8px; box-shadow: 0 9px 24px rgba(32, 53, 80, .07); }
.template-card-preview { min-height: 196px; padding: 12px; background: #f4f8fc; border-bottom: 1px solid #d8e4ef; }
.template-card-preview svg, .template-preview svg { display: block; width: 100%; height: 100%; }
.template-card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.template-card-category, .template-meta { color: #0b8097; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.template-card h2 { margin: 7px 0; font-size: 21px; }
.template-card p { margin: 0 0 15px; color: #4a607b; font-size: 14px; line-height: 1.65; }
.template-card .text-link { margin-top: auto; }
.template-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 28px; padding-block: 46px 66px; }
.template-article { min-width: 0; }
.template-preview { min-height: 370px; padding: 22px; overflow: hidden; background-color: #f9fcff; background-image: linear-gradient(#dce7f2 1px, transparent 1px), linear-gradient(90deg, #dce7f2 1px, transparent 1px); background-size: 24px 24px; border: 1px solid #cbd9e8; border-radius: 8px; }
.preview-wires path { fill: none; stroke: #7183a0; stroke-width: 5; stroke-linecap: butt; }
.preview-arrow-head { fill: #7183a0; }
.preview-node { stroke-width: 2.4; }
.preview-node text { fill: #173252; stroke: none; font-family: "IBM Plex Sans KR", sans-serif; font-size: 23px; font-weight: 700; }
.preview-label-wrap rect { fill: #ffffff; stroke: #c3d1e3; stroke-width: 1.5; }
.preview-label { fill: #40546f; font-family: "IBM Plex Sans KR", sans-serif; font-size: 18px; font-weight: 700; }
.template-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 36px; }
.template-actions .button, .template-actions .intro-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; text-decoration: none; }
.template-actions .intro-link { background: #1763d8; border-left: 0; color: #fff; box-shadow: none; }
.template-article h2 { margin-top: 38px; color: #173a63; font-size: 25px; }
.template-article h3 { margin: 22px 0 7px; color: #23486e; font-size: 18px; }
.template-article p, .template-article li { color: #435975; line-height: 1.8; }
.template-article ol, .template-article ul { padding-left: 23px; }
.template-tip { padding: 15px 17px; background: #edf8fb; border-left: 4px solid #18a6b9; border-radius: 0 6px 6px 0; }
.template-aside { position: sticky; top: 92px; padding: 17px; background: #f6f9fc; border: 1px solid #d5e0ec; border-radius: 8px; }
.template-aside strong { display: block; color: #183a61; margin-bottom: 9px; }
.template-aside a { display: block; padding: 7px 0; color: #40617f; font-size: 14px; text-decoration: none; }
.template-aside a:hover { color: #1266c4; text-decoration: underline; }
.template-resource-band { padding-block: 38px; background: #eaf2f8; border-block: 1px solid #d8e3ee; }

@media (max-width: 900px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-layout { grid-template-columns: 1fr; }
  .template-aside { position: static; }
}

@media (max-width: 600px) {
  .template-hero { padding-block: 35px 31px; }
  .template-hero h1 { font-size: 31px; }
  .template-grid-section { padding-block: 30px 42px; }
  .template-grid-heading { display: block; }
  .template-grid-heading p { margin-top: 8px; }
  .template-grid { grid-template-columns: 1fr; gap: 14px; }
  .template-card-preview { min-height: 176px; }
  .template-layout { gap: 18px; padding-block: 30px 42px; }
  .template-preview { min-height: 250px; padding: 12px; }
  .template-article h2 { margin-top: 29px; font-size: 22px; }
  .template-actions { display: grid; grid-template-columns: 1fr; }
  .template-actions .button, .template-actions .intro-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* FlowCanvas brand refresh */
:root {
  --ink: #10213a;
  --muted: #607089;
  --line: #ced9e7;
  --soft-line: #e6edf5;
  --surface: #ffffff;
  --page: #eef3f8;
  --blue: #155bd7;
  --blue-dark: #0d42a5;
  --blue-soft: #e9f1ff;
  --navy: #10253f;
  --cyan: #14b8d4;
  --green: #079a73;
  font-family: "IBM Plex Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body { background: #eef3f8; }

.site-header {
  border-top: 3px solid var(--cyan);
  border-bottom-color: #d5dfeb;
  box-shadow: 0 3px 16px rgba(21, 45, 76, .05);
}

.site-header-inner { min-height: 70px; }

.brand { gap: 12px; }
.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 17px; letter-spacing: 0; }
.brand-copy small { margin-top: 4px; color: #7b8aa0; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.site-nav a { position: relative; padding-block: 22px; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 13px; height: 2px; background: var(--cyan); transition: right .18s ease; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

.intro-band {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #102b4b;
  border-bottom: 4px solid #19bad1;
}
.intro-inner { position: relative; min-height: 300px; }
.intro-copy { position: relative; z-index: 2; width: min(780px, 70%); padding-block: 48px; }
.intro-band .eyebrow { color: #66d8e7; letter-spacing: .08em; }
.intro-band h1 { max-width: 760px; font-size: clamp(36px, 5vw, 62px); font-weight: 700; line-height: 1.14; }
.intro-band p:not(.eyebrow) { max-width: 720px; color: #d7e3f1; font-size: 18px; }
.intro-brand-art {
  position: absolute;
  z-index: 1;
  right: -28px;
  bottom: -92px;
  width: 430px;
  height: 430px;
  object-fit: contain;
  opacity: .2;
  filter: saturate(.85) brightness(1.35);
  transform: rotate(-7deg);
  pointer-events: none;
}
.intro-link {
  position: relative;
  z-index: 3;
  color: #0d3767;
  background: #fff;
  border: 0;
  border-left: 5px solid var(--cyan);
  border-radius: 4px;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .18);
}
.intro-link:hover { color: var(--blue); transform: translateY(-1px); }
.intro-facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 22px; color: #d9e5f2; font-size: 13px; font-weight: 600; }
.intro-facts span { padding: 2px 16px; border-left: 1px solid #55718f; }
.intro-facts span:first-child { padding-left: 0; border-left: 0; }

.editor-section { padding-top: 54px; }
.editor-heading {
  align-items: center;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #d4deea;
  border-left: 5px solid var(--cyan);
  box-shadow: 0 10px 28px rgba(33, 55, 84, .06);
}
.editor-heading .eyebrow { color: #087f99; letter-spacing: .08em; }
.editor-heading h2 { font-weight: 700; }

.editor-actions {
  padding: 10px 12px;
  background: #122c49;
  border-color: #122c49;
}
.editor-actions .button { color: #eaf3ff; background: #1c3a5c; border-color: #46617e; }
.editor-actions .button:hover:not(:disabled) { color: #fff; background: #28517d; border-color: #62cde0; }
.editor-actions .button:disabled { color: #9eafc1; background: #203750; }
.action-group-label { color: #74d9e8; letter-spacing: .08em; }
.action-group + .action-group { border-left-color: #4b627b; }

.template-bar { background: #f8fbff; }
.workspace { border-color: #c9d6e5; box-shadow: 0 18px 50px rgba(25, 48, 79, .11); }
.tool-toolbar { background: #fff; }
.tool-toolbar strong { color: #183b62; }
.tool-toolbar-copy { margin-top: 2px; }
.node-actions .button.primary { background: #1763d8; border-color: #1763d8; }
.node-actions .button.primary:nth-of-type(2) { background: #087f99; border-color: #087f99; }
.node-actions .button.primary:nth-of-type(3) { color: #533700; background: #f4bf42; border-color: #dca527; }
.node-actions .button.primary:nth-of-type(4) { background: #c94b59; border-color: #c94b59; }
.node-actions .button.primary:nth-of-type(5) { color: #344054; background: #e6ebf1; border-color: #b9c4d1; }
.legend { background: #f4f7fb; }
.board-wrap { background: #dfe8f2; }
.board { background-color: #fbfdff; background-image: linear-gradient(#dce7f2 1px, transparent 1px), linear-gradient(90deg, #dce7f2 1px, transparent 1px); }
.inspector-panel { background: #f7f9fc; }
.quick-help { padding: 12px; background: #eaf4ff; border: 1px solid #c4daf1; border-radius: 6px; }
.quick-help summary { color: #0d5eb8; }
.tutorial-replay { width: 100%; margin: 10px 0 2px; color: #1a5f9e; background: #fff; border: 1px dashed #9bbddc; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 700; padding: 9px 10px; cursor: pointer; }
.tutorial-replay:hover { background: #edf7ff; border-style: solid; }
.tutorial-dialog { width: min(1040px, calc(100vw - 32px)); max-width: 1040px; padding: 0; color: #173252; background: transparent; border: 0; }
.tutorial-dialog::backdrop { background: rgba(9, 27, 49, .62); }
body:has(.tutorial-dialog[open]) { overflow: hidden; }
.tutorial-card { padding: 24px; background: #fff; border: 2px solid #18b6cb; border-radius: 8px; box-shadow: 0 20px 54px rgba(2, 18, 41, .42); }
.tutorial-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.tutorial-card .eyebrow { margin: 0 0 6px; color: #087f99; font-size: 12px; }
.tutorial-card h2 { margin: 0; font-size: 26px; }
.tutorial-close { flex: none; min-height: 36px; color: #536985; background: #f5f8fc; border: 1px solid #c8d8e8; border-radius: 5px; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 10px; cursor: pointer; }
.tutorial-close:hover { color: #174e86; background: #edf6ff; }
.tutorial-description { margin: 12px 0 18px; color: #4a607b; line-height: 1.7; }
.tutorial-practice { padding: 14px; background: #f5f9fd; border: 1px solid #cfddeb; border-radius: 7px; }
.tutorial-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tutorial-toolbar .button { min-height: 38px; }
.tutorial-toolbar .button:disabled { opacity: .44; cursor: not-allowed; }
.tutorial-board { position: relative; height: 276px; overflow: hidden; background-color: #fbfdff; background-image: linear-gradient(#dce7f2 1px, transparent 1px), linear-gradient(90deg, #dce7f2 1px, transparent 1px); background-size: 24px 24px; border: 1px solid #c7d8e9; border-radius: 5px; }
.tutorial-node { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; width: 154px; min-height: 66px; padding: 10px; color: #173252; background: #e9f2ff; border: 2px solid #3f82db; border-radius: 8px; font-size: 15px; font-weight: 700; text-align: center; cursor: pointer; }
.tutorial-node.start { background: #e5f8f2; border-color: #18a67c; border-radius: 999px; }
.tutorial-node.selected { outline: 3px solid #19bad1; outline-offset: 4px; }
.tutorial-node.connect-source { outline: 3px solid #e2a321; outline-offset: 4px; }
.tutorial-wire { position: absolute; z-index: 1; height: 3px; transform-origin: left center; background: #7183a0; }
.tutorial-wire::after { content: ""; position: absolute; top: 50%; right: -2px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #7183a0; transform: translateY(-50%); }
.tutorial-editor { display: flex; align-items: end; gap: 10px; margin-top: 12px; padding: 12px; background: #fff; border: 1px solid #d5e2ed; border-radius: 6px; }
.tutorial-editor[hidden] { display: none; }
.tutorial-editor label { flex: 1; color: #385571; font-size: 13px; font-weight: 700; }
.tutorial-editor input { display: block; width: 100%; margin-top: 5px; min-height: 38px; padding: 7px 10px; color: #173252; border: 1px solid #b9ccdf; border-radius: 5px; font: inherit; }
.tutorial-status { min-height: 22px; margin: 10px 1px 0; color: #087f68; font-size: 14px; font-weight: 700; }
.tutorial-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.tutorial-spacer { flex: 1; }

.content-band { border-block-color: #dce5ef; }
.feature-grid article { position: relative; overflow: hidden; background: #f8fbff; border-top: 3px solid #1e7ce6; }
.feature-grid article:nth-child(2) { border-top-color: #09a282; }
.feature-grid article:nth-child(3) { border-top-color: #e3a421; }
.feature-grid article:nth-child(4) { border-top-color: #8058d7; }
.faq-band { background: #eaf0f7; }
.site-footer { border-top: 4px solid #15b9d1; background: #102238; }

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.discovery-band { background: #f3f7fc; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.discovery-grid article {
  padding: 22px;
  background: #fff;
  border: 1px solid #d4e0ec;
  border-top: 3px solid #1f75d6;
  border-radius: 7px;
}
.discovery-grid article:nth-child(2) { border-top-color: #0b9c80; }
.discovery-grid article:nth-child(3) { border-top-color: #d49a1e; }
.discovery-grid h3 { margin: 7px 0 8px; font-size: 21px; }
.discovery-grid p { color: #55657d; }
.discovery-label { color: #60728d; font-size: 12px; font-weight: 750; }
.learning-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 24px;
  padding: 25px 28px;
  color: #e7f1fb;
  background: #102b4b;
  border-left: 5px solid #19bad1;
  border-radius: 6px;
}
.learning-strip h2 { color: #fff; }
.learning-strip p { max-width: 850px; margin-bottom: 0; color: #cfdeed; }
.learning-strip .eyebrow { color: #68d8e7; }
.learning-strip .intro-link { color: #12375f; background: #fff; }

.learning-section { padding-block: 52px 70px; }
.learning-intro { max-width: 880px; margin-bottom: 28px; }
.learning-intro h2 { margin: 0 0 8px; font-size: 28px; }
.learning-intro p { color: #52637b; }
.learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.learning-card {
  position: relative;
  min-width: 0;
  padding: 25px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d3dfeb;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(29, 51, 80, .06);
}
.learning-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #1f70d2; }
.learning-card:nth-child(2)::before { background: #0b9e83; }
.learning-card:nth-child(3)::before { background: #d79c20; }
.learning-card:nth-child(3n+1)::before { background: #1f70d2; }
.learning-card:nth-child(3n+2)::before { background: #0b9e83; }
.learning-card:nth-child(3n)::before { background: #d79c20; }
.learning-number { float: right; color: #dbe5f0; font-size: 34px; font-weight: 800; line-height: 1; }
.learning-card h2 { min-height: 60px; margin: 5px 0 8px; font-size: 22px; }
.learning-card p, .learning-card li { color: #52637b; }
.learning-card ul { min-height: 96px; padding-left: 20px; }
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.article-actions .intro-link { color: #fff; background: #155eaa; border-left-color: #19bad1; box-shadow: none; }

.template-picker { display: grid; grid-template-columns: minmax(0, .8fr) minmax(520px, 1.2fr); gap: 45px; padding-block: 46px 20px; }
.template-picker h2 { margin: 0 0 8px; }
.template-picker p { color: #52637b; }
.template-picker table { width: 100%; border-collapse: collapse; background: #fff; }
.template-picker th, .template-picker td { padding: 10px 12px; border: 1px solid #d5e0ec; text-align: left; font-size: 13px; }
.template-picker th { background: #eef4fa; }
.inline-links { display: flex; flex-wrap: wrap; gap: 22px; }
.template-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.template-filter button { min-height: 38px; padding: 8px 13px; color: #35516f; background: #fff; border: 1px solid #bfcfe0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.template-filter button:hover { border-color: #4f8ed1; }
.template-filter button[aria-pressed="true"] { color: #fff; background: #155eaa; border-color: #155eaa; }
.filter-status { margin: 0 0 18px; color: #60718a; font-size: 13px; }
.template-card[hidden] { display: none; }
.case-table-wrap { width: 100%; overflow-x: auto; margin: 14px 0 12px; }
.case-table { width: 100%; min-width: 590px; border-collapse: collapse; background: #fff; }
.case-table th, .case-table td { padding: 10px 12px; border: 1px solid #d2deea; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.55; }
.case-table th { color: #28496a; background: #edf4fb; }
.template-note { padding: 14px 16px; color: #3b5773; background: #f3f8fd; border-left: 4px solid #1d77ce; border-radius: 4px; }
.template-checklist { list-style: none; padding-left: 0; }
.template-checklist li { display: flex; align-items: flex-start; gap: 10px; margin: 9px 0; }
.template-checklist input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: #1670c8; }
.checklist-progress { margin: 12px 0 28px; color: #116a58; font-size: 14px; font-weight: 700; }

/* Smart layout and local recovery */
.layout-dialog { width: min(620px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(15, 38, 70, .28); }
.layout-dialog::backdrop { background: rgba(19, 38, 64, .48); }
.layout-dialog form { padding: 24px; }
.layout-dialog .dialog-heading { align-items: flex-start; }
.layout-dialog .dialog-heading h2 { margin: 2px 0 0; }
.layout-dialog-copy { margin: 8px 0 20px; color: #52657f; line-height: 1.65; }
.layout-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.layout-option-grid select { width: 100%; min-height: 42px; }
.layout-check { display: flex; align-items: center; gap: 9px; margin: 17px 0 4px; color: #344b68; font-size: 14px; font-weight: 700; }
.layout-check input { width: 18px; height: 18px; accent-color: #176bd1; }
.layout-preview-status { min-height: 24px; margin: 13px 0; color: #176458; font-size: 13px; font-weight: 700; }
.layout-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.draft-restore { color: #075f50; border-color: #79b9aa; background: #edfaf6; }
.visual-audit-list li::marker { color: #d28a05; }
.quick-add-connected { display: grid; gap: 8px; padding: 12px; background: #f3f8fd; border: 1px solid #d4e1ee; border-radius: 7px; }
.quick-add-connected strong { color: #304b6a; font-size: 13px; }
.quick-add-connected > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.quick-add-connected .button { min-width: 0; padding-inline: 6px; }
.board-wrap.space-panning { cursor: grab; }
.board-wrap.space-panning:active { cursor: grabbing; }

/* Local PNG editor */
.image-editor-dialog { width: min(1180px, calc(100vw - 24px)); max-width: none; height: min(820px, calc(100vh - 24px)); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 12px; box-shadow: 0 26px 80px rgba(10, 31, 60, .34); }
.image-editor-dialog::backdrop { background: rgba(13, 31, 55, .58); }
.image-editor-shell { display: flex; height: 100%; flex-direction: column; background: #f6f9fc; }
.image-editor-heading { flex: none; padding: 20px 24px 16px; background: #fff; border-bottom: 1px solid #d5e1ed; }
.image-editor-heading h2 { margin: 2px 0 0; }
.image-editor-heading p:not(.eyebrow) { margin: 7px 0 0; color: #5d6e84; font-size: 13px; }
.image-editor-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 0; flex: 1; }
.image-editor-tools { padding: 16px; overflow-y: auto; background: #fff; border-right: 1px solid #d5e1ed; }
.image-source-actions, .image-tool-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.image-source-actions .primary { grid-column: span 2; }
.image-editor-status { min-height: 38px; margin: 10px 0 4px; padding: 9px 10px; color: #405a77; background: #edf5fc; border-radius: 6px; font-size: 12px; line-height: 1.55; }
.image-editor-status[data-type="error"] { color: #8a2935; background: #fff0f2; }
.image-tool-section { display: grid; gap: 8px; padding: 13px 0; border-top: 1px solid #e2e9f1; }
.image-tool-section > strong { color: #193a61; font-size: 13px; }
.image-tool-section label { display: grid; gap: 5px; color: #4c5f77; font-size: 12px; font-weight: 700; }
.image-tool-section input, .image-tool-section select { width: 100%; min-width: 0; min-height: 37px; padding: 7px 8px; color: #233b58; background: #fff; border: 1px solid #bfcedd; border-radius: 5px; font: inherit; }
.image-tool-section input[type="range"] { min-height: 24px; padding: 0; accent-color: #176bd1; }
.image-tool-section .button { min-width: 0; padding-inline: 8px; }
.image-tool-buttons.four { grid-template-columns: repeat(4, 1fr); }
.image-size-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 7px; }
.image-size-row > span { padding-bottom: 10px; color: #748399; }
.image-crop-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.image-tool-note { margin: 0; color: #68798e; font-size: 11px; line-height: 1.45; }
.image-output-info { margin: 0; padding: 8px; color: #294b70; background: #eef5fc; border-radius: 5px; font-size: 12px; font-weight: 750; line-height: 1.45; }
.image-check { display: flex !important; align-items: center; grid-template-columns: auto 1fr; gap: 7px !important; }
.image-check input { width: 17px; min-height: 17px; accent-color: #176bd1; }
.image-download-section { position: sticky; bottom: -16px; margin-inline: -16px; padding: 14px 16px 16px; background: #fff; box-shadow: 0 -8px 18px rgba(21, 49, 80, .08); }
.image-editor-preview { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 28px; overflow: auto; background-color: #dce5ef; background-image: linear-gradient(45deg, #cbd6e2 25%, transparent 25%), linear-gradient(-45deg, #cbd6e2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cbd6e2 75%), linear-gradient(-45deg, transparent 75%, #cbd6e2 75%); background-position: 0 0, 0 10px, 10px -10px, -10px 0; background-size: 20px 20px; }
.image-canvas-shell { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; box-shadow: 0 8px 30px rgba(25, 45, 70, .2); }
.image-canvas-shell[hidden] { display: none; }
.image-editor-preview canvas { display: block; max-width: 100%; max-height: calc(100vh - 170px); background: transparent; image-rendering: auto; }
.image-crop-overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.image-crop-overlay[hidden] { display: none; }
.image-crop-overlay span { position: absolute; box-sizing: border-box; border: 3px solid #1672dc; outline: 1px solid #fff; box-shadow: 0 0 0 9999px rgba(8, 26, 49, .56); }
.image-empty { display: grid; gap: 7px; max-width: 360px; padding: 28px; color: #61738a; background: rgba(255, 255, 255, .86); border: 1px dashed #9eb1c6; border-radius: 9px; text-align: center; }
.image-empty[hidden] { display: none; }
.image-empty strong { color: #294b70; }

@media (max-width: 600px) {
  .layout-option-grid { grid-template-columns: 1fr; }
  .layout-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .layout-dialog-actions .primary { grid-column: span 2; }
  .image-editor-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .image-editor-layout { display: flex; flex-direction: column-reverse; overflow-y: auto; }
  .image-editor-tools { overflow: visible; border-right: 0; }
  .image-editor-preview { min-height: 340px; flex: none; }
  .image-download-section { position: static; margin-inline: 0; padding-inline: 0; box-shadow: none; }
}

/* Node roles control color; shape is selected independently. */
.node {
  --node-bg: #eaf2ff;
  --node-border: #4b8fe5;
  position: absolute;
  background: var(--node-bg);
  border-color: var(--node-border);
  border-radius: 7px;
  transform: none;
}
.node.start { --node-bg: #e5f8f2; --node-border: #18a67c; background: var(--node-bg); border-color: var(--node-border); }
.node.process { --node-bg: #e9f2ff; --node-border: #3f82db; background: var(--node-bg); border-color: var(--node-border); }
.node.decision { --node-bg: #fff4d4; --node-border: #dda01f; padding: 12px; background: var(--node-bg); border-color: var(--node-border); border-radius: 7px; transform: none; }
.node.ending { --node-bg: #fff0f2; --node-border: #db5663; background: var(--node-bg); border-color: var(--node-border); }
.node.note { --node-bg: #fffbe7; --node-border: #7f8c9e; background: var(--node-bg); border-color: var(--node-border); }
.node.decision .node-text { transform: none; }
.node.shape-rectangle { border-radius: 2px; }
.node.shape-rounded { border-radius: 9px; }
.node.shape-pill { border-radius: 999px; }
.node.shape-circle { border-radius: 50%; }
.node.shape-diamond {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--node-border);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.node.shape-diamond::before {
  content: "";
  position: absolute;
  inset: var(--node-stroke-width, 2px);
  z-index: 0;
  background: var(--node-bg);
  clip-path: inherit;
}
.node.shape-diamond .node-text {
  position: relative;
  z-index: 1;
  max-width: 60%;
  transform: none;
}
.node.shape-hexagon,
.node.shape-parallelogram {
  border: 0;
  border-radius: 0;
  background: var(--node-border);
  box-shadow: none;
}
.node.shape-hexagon { clip-path: polygon(22% 0, 78% 0, 100% 50%, 78% 100%, 22% 100%, 0 50%); }
.node.shape-parallelogram { clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%); }
.node.shape-hexagon::before,
.node.shape-parallelogram::before {
  content: "";
  position: absolute;
  inset: var(--node-stroke-width, 2px);
  z-index: 0;
  background: var(--node-bg);
  clip-path: inherit;
}
.node.shape-hexagon .node-text,
.node.shape-parallelogram .node-text { position: relative; z-index: 1; max-width: 78%; }
.node.shape-diamond.selected,
.node.shape-hexagon.selected,
.node.shape-parallelogram.selected { outline: 0; filter: drop-shadow(0 0 5px rgba(26, 100, 202, .65)); }
.node.shape-diamond.selected {
  background: #2678e8;
  filter: drop-shadow(0 0 0 rgba(38, 120, 232, .8)) drop-shadow(0 0 9px rgba(26, 100, 202, .7));
}
.node.shape-diamond.selected::before {
  inset: 6px;
  background: #eef6ff;
}
.node.shape-diamond.selected .node-text { color: #174c95; }

/* Editor/export parity. The values here mirror VISUAL_THEME in app.js. */
:root {
  --app-font: "IBM Plex Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-family: var(--app-font);
}
button, input, select, textarea, .wire-label, .node { font-family: var(--app-font); }
.board {
  background-color: #fbfdff;
  background-image: radial-gradient(circle, #e5edf6 .8px, transparent .9px);
  background-size: 30px 30px;
}
.board .wire-line { stroke: var(--wire-color, #6d819f); stroke-linecap: butt; }
.board .wire-line.selected { stroke: #236bd9; stroke-width: 4; filter: drop-shadow(0 0 3px rgba(35, 107, 217, .38)); }
.board .wire-arrow-head { fill: var(--wire-color, #6d819f); pointer-events: none; }
.board .wire-arrow-head.selected { fill: #236bd9; filter: drop-shadow(0 0 2px rgba(35, 107, 217, .28)); }
.board .wire-label-bg { fill: var(--wire-label-fill, #fff); stroke: var(--wire-label-border, #c8d4e2); rx: 6; }
.board .wire-label { fill: var(--wire-label-color, #35445b); font-family: var(--theme-font, var(--app-font)); font-weight: 700; }
.node {
  color: var(--node-text, #1d2d44);
  font-weight: 700;
  line-height: 1.25;
}
.node-text { white-space: pre-line; }
.node.selected {
  /* A separate sibling frame is used for selection so clipped shapes and
     regular nodes share one clear, non-overlapping selection treatment. */
  outline: none;
}
.node.connect-source { outline: 3px solid rgba(7, 154, 115, .28); }
.node.audit-highlight { animation: audit-node-pulse 1.4s ease-out 2; }
@keyframes audit-node-pulse { 0%, 100% { filter: none; } 40% { filter: drop-shadow(0 0 12px rgba(234, 131, 18, .95)); } }
.node-selection-frame {
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  pointer-events: none;
  border: 2px solid #3f82db;
  border-radius: 9px;
  outline: 3px solid rgba(63, 130, 219, .24);
  outline-offset: 5px;
  box-shadow: 0 2px 7px rgba(31, 99, 198, .14);
}
.node-multi-selection-frame {
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  pointer-events: none;
  border: 3px solid #176bd1;
  border-radius: 10px;
  outline: 4px solid rgba(23, 107, 209, .22);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .92), 0 5px 18px rgba(20, 76, 155, .28);
}
.node-selection-check {
  position: absolute;
  top: -15px;
  right: -15px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #176bd1;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(20, 76, 155, .34);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.canvas-selection-summary {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  pointer-events: none;
  color: #fff;
  background: rgba(18, 87, 173, .94);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(20, 57, 105, .25);
  font-size: 13px;
  font-weight: 800;
}
.node-resize-handle {
  position: absolute;
  z-index: 1;
  width: 12px;
  height: 12px;
  padding: 0;
  pointer-events: auto;
  background: #fff;
  border: 2px solid #256fda;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(20, 58, 111, .2);
  touch-action: none;
}
.node-resize-handle.nw { top: -7px; left: -7px; cursor: nwse-resize; }
.node-resize-handle.ne { top: -7px; right: -7px; cursor: nesw-resize; }
.node-resize-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.node-resize-handle.sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.node-quick-actions { position: absolute; right: -2px; bottom: calc(100% + 10px); z-index: 3; display: flex; gap: 4px; padding: 4px; pointer-events: auto; background: rgba(255, 255, 255, .98); border: 1px solid #aebfd4; border-radius: 7px; box-shadow: 0 5px 14px rgba(20, 52, 92, .18); }
.node-quick-actions button { min-height: 30px; padding: 3px 7px; color: #1c579f; background: #fff; border: 1px solid #bfd0e4; border-radius: 5px; font: inherit; font-size: 11px; font-weight: 800; white-space: nowrap; }
.node-quick-actions button:hover, .node-quick-actions button:focus-visible { color: #fff; background: #176bd1; border-color: #176bd1; outline: none; }
.diagnostics-panel { position: fixed; right: 12px; bottom: 12px; z-index: 200; display: flex; align-items: center; gap: 8px; padding: 8px; background: #fff; border: 2px solid #176bd1; border-radius: 8px; box-shadow: 0 8px 28px rgba(20, 50, 90, .24); }
.diagnostics-panel output { min-width: 38px; color: #08745e; font-size: 13px; font-weight: 800; }
.node.shape-diamond.selected,
.node.shape-hexagon.selected,
.node.shape-parallelogram.selected {
  background: var(--node-border);
  filter: drop-shadow(0 0 0 rgba(38, 120, 232, 0)) drop-shadow(0 0 5px rgba(21, 91, 215, .38));
}
.node.shape-diamond.selected::before { inset: var(--node-stroke-width, 2px); background: var(--node-bg); }
.node.shape-diamond.selected .node-text { color: #1d2d44; }
.node-style-fields {
  margin: 14px 0 2px;
  padding: 11px 10px 9px;
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  background: #f8fbff;
}
.node-style-fields legend { padding-inline: 5px; color: #34506e; font-size: 12px; font-weight: 700; }
.node-style-fields .field-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.node-style-fields input[type="color"] { width: 100%; min-height: 36px; padding: 3px; cursor: pointer; }
.text-button { margin-top: 8px; padding: 0; color: #1763d8; background: transparent; border: 0; font: inherit; font-size: 12px; font-weight: 700; }
.text-button:hover { color: #0d42a5; text-decoration: underline; }

.static-hero { position: relative; overflow: hidden; color: #fff; background: #102b4b; border-bottom: 4px solid #19bad1; }
.static-hero .eyebrow { color: #67dae9; }
.static-hero p { color: #d5e3f1; }

@media (max-width: 760px) {
  .site-header-inner { min-height: 60px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { display: none; }
  .site-nav a { padding-block: 17px; }
  .intro-inner { min-height: 246px; padding-block: 30px; }
  .intro-copy { width: 100%; padding: 0; }
  .intro-band h1 { max-width: 340px; font-size: 31px; word-break: keep-all; }
  .intro-band p:not(.eyebrow) { max-width: 330px; font-size: 14px; }
  .intro-brand-art { right: -68px; bottom: -54px; width: 250px; height: 250px; opacity: .13; }
  .intro-link { padding: 8px 12px; }
  .intro-facts { max-width: 290px; margin-top: 15px; font-size: 11px; }
  .intro-facts span { padding-inline: 9px; }
  .editor-heading { width: calc(100% - 24px); padding: 15px; }
  .editor-actions { background: #122c49; }
  .tutorial-dialog { width: min(100vw - 18px, 620px); }
  .tutorial-card { padding: 16px; }
  .tutorial-card h2 { font-size: 21px; }
  .tutorial-description { margin: 9px 0 13px; font-size: 14px; }
  .tutorial-practice { padding: 10px; }
  .tutorial-board { height: 220px; }
  .tutorial-node { width: 118px; min-height: 54px; padding: 7px; font-size: 13px; }
  .tutorial-editor { display: block; }
  .tutorial-editor .button { width: 100%; margin-top: 9px; }
  .section-heading-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .discovery-grid, .learning-grid { grid-template-columns: 1fr; }
  .learning-strip { align-items: flex-start; flex-direction: column; padding: 22px; }
  .learning-card h2, .learning-card ul { min-height: 0; }
  .template-picker { display: block; padding-block: 38px 8px; }
  .template-picker table { display: block; margin-top: 22px; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 520px) {
  .site-header-inner { width: calc(100% - 16px); gap: 8px; }
  .brand { flex: 0 0 auto; }
  .brand-copy { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .site-nav { flex: 1 1 auto; justify-content: flex-end; gap: 10px; }
  .site-nav a { padding-block: 18px; font-size: 12px; line-height: 1.2; white-space: nowrap; }
}

/* Fast find, text import, and multi-selection */
.search-dialog,
.text-flow-dialog { width: min(640px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); padding: 0; overflow: auto; border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(15, 38, 70, .28); }
.search-dialog::backdrop,
.text-flow-dialog::backdrop { background: rgba(19, 38, 64, .52); }
.search-dialog form,
.text-flow-dialog form { padding: 22px; }
.search-summary { margin: 10px 0; color: #53657d; font-size: 13px; }
.search-result-list { display: grid; gap: 7px; max-height: 390px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.search-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 9px; width: 100%; padding: 10px; color: #243a56; text-align: left; background: #fff; border: 1px solid #cfdae7; border-radius: 7px; cursor: pointer; }
.search-result:hover,
.search-result:focus-visible { border-color: #4a86d4; box-shadow: 0 0 0 3px rgba(74, 134, 212, .14); outline: none; }
.search-result-kind { grid-row: span 2; align-self: center; padding: 3px 6px; color: #155ca8; font-size: 11px; font-weight: 800; background: #eaf3ff; border-radius: 999px; }
.search-result strong,
.search-result small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { color: #687991; }
.text-flow-copy { margin: 6px 0 16px; color: #52657f; line-height: 1.6; }
.text-flow-options { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 10px 0 16px; }
.text-flow-options label { display: inline-flex; align-items: center; gap: 7px; color: #34506e; font-size: 13px; font-weight: 700; }
.text-flow-preview { min-height: 100px; max-height: 290px; margin-bottom: 18px; padding: 12px; overflow: auto; background: #f6f9fd; border: 1px solid #d3dfec; border-radius: 8px; }
.text-flow-preview > strong { display: block; margin-bottom: 8px; color: #294866; }
.text-flow-preview ol { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.text-flow-preview li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: center; }
.text-flow-preview li span { padding: 2px 5px; color: #1763b9; text-align: center; background: #e8f2ff; border-radius: 999px; font-size: 11px; font-weight: 800; }
.text-flow-preview li strong { overflow-wrap: anywhere; font-size: 13px; }
.text-flow-warning { margin: 0 0 9px; color: #a24b19; font-size: 13px; font-weight: 700; }
.selection-marquee { position: absolute; z-index: 7; pointer-events: none; background: rgba(39, 111, 210, .12); border: 1px solid #2770d2; }
.multi-selection-panel { padding: 12px; background: #eef5ff; border: 1px solid #b9d0ed; border-radius: 8px; }

@media (max-width: 600px) {
  .search-dialog,
  .text-flow-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .search-dialog form,
  .text-flow-dialog form { padding: 15px; }
  .text-flow-options { display: grid; }
}
