
* { box-sizing: border-box; }
      .diagram,
      .diagram * {
        max-width: 100%;
      }
      html,
      body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: transparent;
      }
      body {
        color: var(--ink);
        font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
      }
      .diagram {
        width: 100%;
        max-width: 960px;
        margin: 0 auto;
        border: 1px solid var(--line);
        border-radius:8px;
        overflow: hidden;
        background: var(--paper);
        contain: layout paint;
      }
      .react-ch6-ch6-5-root {
        padding: 16px;
        overflow-wrap: anywhere;
      }
      .react-ch6-ch6-5-tag {
        display: inline-flex;
        align-items: center;
        border: 1px solid #a5f3fc;
        border-radius:6px;
        padding: 3px 9px;
        background: var(--track-tint);
        color: var(--accent);
        font-size:12px;
        font-weight: 800;
        line-height: 1.2;
      }
      h1 {
        margin: 10px 0 8px;
        color: var(--ink);
        font-size:24px;
        line-height: 1.25;
        letter-spacing: 0;
      }
      p {
        margin: 0;
        color: var(--muted);
        font-size:14px;
        line-height: 1.62;
      }
      .react-ch6-ch6-5-path {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
        align-items: stretch;
        gap: 8px;
        margin-top: 14px;
      }
      .react-ch6-ch6-5-step,
      .react-ch6-ch6-5-phase,
      .react-ch6-ch6-5-panel {
        min-width: 0;
        border: 1px solid var(--line);
        border-radius:8px;
        background: var(--panel);
      }
      .react-ch6-ch6-5-step,
      .react-ch6-ch6-5-phase,
      .react-ch6-ch6-5-panel {
        padding: 10px;
      }
      .react-ch6-ch6-5-step span,
      .react-ch6-ch6-5-phase span,
      .react-ch6-ch6-5-panel strong,
      .react-ch6-ch6-5-node {
        display: block;
        color: var(--accent);
        font-size:12px;
        font-weight: 800;
        line-height: 1.3;
      }
      .react-ch6-ch6-5-step strong,
      .react-ch6-ch6-5-phase strong {
        display: block;
        margin-top: 5px;
        color: var(--ink);
        font-size:15px;
        line-height: 1.35;
      }
      .react-ch6-ch6-5-step em,
      .react-ch6-ch6-5-phase em,
      .react-ch6-ch6-5-panel span,
      .react-ch6-ch6-5-desc {
        display: block;
        margin-top: 4px;
        color: var(--muted);
        font-size:12px;
        font-style: normal;
        line-height: 1.45;
      }
      .react-ch6-ch6-5-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--track-strong);
        font-size:18px;
        font-weight: 800;
      }
      .react-ch6-ch6-5-split,
      .react-ch6-ch6-5-cycle {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
      }
      .react-ch6-ch6-5-tree {
        display: grid;
        margin-top: 14px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius:8px;
        background: var(--panel);
      }
      .react-ch6-ch6-5-branch {
        display: grid;
        grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        min-width: 0;
        margin-left: calc(var(--depth) * 24px);
        padding: 9px 10px;
        border-top: 1px solid var(--line);
        background: transparent;
      }
      .react-ch6-ch6-5-branch:first-child { border-top: 0; }
      .react-ch6-ch6-5-branch::before {
        content: "";
        width: calc(var(--depth) * 14px);
        max-width: 42px;
        height: 1px;
        margin: 8px 0 0 calc(var(--depth) * -14px);
        background: var(--line);
      }
      .react-ch6-ch6-5-branch {
        grid-template-columns: auto minmax(110px, 0.7fr) minmax(0, 1fr);
      }
      .react-ch6-ch6-5-matrix {
        margin-top: 10px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius:8px;
      }
      .react-ch6-ch6-5-row {
        display: grid;
        grid-template-columns: 120px 1fr 1fr;
      }
      .react-ch6-ch6-5-row > div {
        min-width: 0;
        padding: 9px 10px;
        border-top: 1px solid var(--line);
        border-left: 1px solid var(--line);
        color: var(--muted);
        font-size:13px;
        line-height: 1.48;
      }
      .react-ch6-ch6-5-row > div:first-child {
        border-left: 0;
        color: var(--accent);
        font-weight: 800;
      }
      .react-ch6-ch6-5-head > div {
        border-top: 0;
        background: var(--head);
        color: var(--ink);
        font-weight: 800;
      }
      .react-ch6-ch6-5-note {
        margin-top: 10px;
        border: 1px solid var(--line);
        border-radius:8px;
        padding: 10px 12px;
        background: var(--panel);
        color: var(--muted);
        font-size:13px;
        line-height: 1.58;
      }
      .react-ch6-ch6-5-note b {
        color: var(--accent);
      }
      @media (max-width: 640px) {
        .react-ch6-ch6-5-root { padding: 13px; }
        h1 { font-size:21px; line-height: 1.28; }
        p { font-size:13px; line-height: 1.58; }
        .react-ch6-ch6-5-path,
        .react-ch6-ch6-5-split,
        .react-ch6-ch6-5-cycle {
          grid-template-columns: 1fr;
          gap: 6px;
        }
        .react-ch6-ch6-5-arrow {
          min-height: 14px;
          transform: rotate(90deg);
          font-size:15px;
        }
        .react-ch6-ch6-5-step,
        .react-ch6-ch6-5-phase,
        .react-ch6-ch6-5-panel { padding: 9px; }
        .react-ch6-ch6-5-branch {
          margin-left: calc(var(--depth) * 12px);
          grid-template-columns: auto minmax(92px, 0.6fr) minmax(0, 1fr);
          gap: 7px;
        }
        .react-ch6-ch6-5-branch::before {
          width: calc(var(--depth) * 8px);
          max-width: 24px;
          margin-left: calc(var(--depth) * -8px);
        }
        .react-ch6-ch6-5-row { grid-template-columns: 96px 1fr 1fr; }
        .react-ch6-ch6-5-row > div { padding: 8px 7px; font-size:12px; line-height: 1.45; }
      }
      @media (max-width: 360px) {
        .react-ch6-ch6-5-root { padding: 10px; }
        h1 { font-size:19px; }
        .react-ch6-ch6-5-row { grid-template-columns: 88px 1fr 1fr; }
        .react-ch6-ch6-5-row > div { padding: 7px 4px; font-size:12px; }
        .react-ch6-ch6-5-branch {
          margin-left: calc(var(--depth) * 8px);
          grid-template-columns: auto minmax(82px, 0.55fr) minmax(0, 1fr);
        }
        .react-ch6-ch6-5-branch::before {
          width: calc(var(--depth) * 6px);
          max-width: 18px;
          margin-left: calc(var(--depth) * -6px);
        }
      }
