
* { 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-ch7-ch7-3-root { padding: 16px; overflow-wrap: anywhere; }
      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-ch7-ch7-3-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-ch7-ch7-3-step,
      .react-ch7-ch7-3-phase,
      .react-ch7-ch7-3-panel {
        min-width: 0;
        border: 1px solid var(--line);
        border-radius:8px;
        background: var(--panel);
        padding: 10px;
      }
      .react-ch7-ch7-3-step span,
      .react-ch7-ch7-3-phase span,
      .react-ch7-ch7-3-panel strong,
      .react-ch7-ch7-3-node {
        display: block;
        color: var(--accent);
        font-size:12px;
        font-weight: 800;
        line-height: 1.3;
      }
      .react-ch7-ch7-3-step strong,
      .react-ch7-ch7-3-phase strong {
        display: block;
        margin-top: 5px;
        color: var(--ink);
        font-size:15px;
        line-height: 1.35;
      }
      .react-ch7-ch7-3-step em,
      .react-ch7-ch7-3-phase em,
      .react-ch7-ch7-3-panel span,
      .react-ch7-ch7-3-desc {
        display: block;
        margin-top: 4px;
        color: var(--muted);
        font-size:12px;
        font-style: normal;
        line-height: 1.45;
      }
      .react-ch7-ch7-3-arrow { display: flex; align-items: center; justify-content: center; color: var(--track-strong); font-size:18px; font-weight: 800; }
      .react-ch7-ch7-3-split,
      .react-ch7-ch7-3-cycle {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
      }
      .react-ch7-ch7-3-tree {
        display: grid;
        margin-top: 14px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius:8px;
        background: var(--panel);
      }
      .react-ch7-ch7-3-branch {
        display: grid;
        grid-template-columns: auto 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);
      }
      .react-ch7-ch7-3-branch:first-child { border-top: 0; }
      .react-ch7-ch7-3-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-ch7-ch7-3-matrix {
        margin-top: 10px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius:8px;
      }
      .react-ch7-ch7-3-row { display: grid; grid-template-columns: 120px 1fr 1fr; }
      .react-ch7-ch7-3-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-ch7-ch7-3-row > div:first-child { border-left: 0; color: var(--accent); font-weight: 800; }
      .react-ch7-ch7-3-head > div { border-top: 0; background: var(--head); color: var(--ink); font-weight: 800; }
      .react-ch7-ch7-3-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-ch7-ch7-3-note b { color: var(--accent); }
      @media (max-width: 640px) {
        .react-ch7-ch7-3-root { padding: 13px; }
        h1 { font-size:21px; line-height: 1.28; }
        p { font-size:13px; line-height: 1.58; }
        .react-ch7-ch7-3-path,
        .react-ch7-ch7-3-split,
        .react-ch7-ch7-3-cycle { grid-template-columns: 1fr; gap: 6px; }
        .react-ch7-ch7-3-arrow { min-height: 14px; transform: rotate(90deg); font-size:15px; }
        .react-ch7-ch7-3-step,
        .react-ch7-ch7-3-phase,
        .react-ch7-ch7-3-panel { padding: 9px; }
        .react-ch7-ch7-3-branch {
          margin-left: calc(var(--depth) * 12px);
          grid-template-columns: auto minmax(92px, 0.6fr) minmax(0, 1fr);
          gap: 7px;
        }
        .react-ch7-ch7-3-branch::before {
          width: calc(var(--depth) * 8px);
          max-width: 24px;
          margin-left: calc(var(--depth) * -8px);
        }
        .react-ch7-ch7-3-row { grid-template-columns: 96px 1fr 1fr; }
        .react-ch7-ch7-3-row > div { padding: 8px 7px; font-size:12px; line-height: 1.45; }
      }
      @media (max-width: 360px) {
        .react-ch7-ch7-3-root { padding: 10px; }
        h1 { font-size:19px; }
        .react-ch7-ch7-3-row { grid-template-columns: 88px 1fr 1fr; }
        .react-ch7-ch7-3-row > div { padding: 7px 4px; font-size:12px; }
        .react-ch7-ch7-3-branch {
          margin-left: calc(var(--depth) * 8px);
          grid-template-columns: auto minmax(82px, 0.55fr) minmax(0, 1fr);
        }
        .react-ch7-ch7-3-branch::before {
          width: calc(var(--depth) * 6px);
          max-width: 18px;
          margin-left: calc(var(--depth) * -6px);
        }
      }
