@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@600;700&display=swap");

:root {
  --bg: #f5f1e6;
  --ink: #1f2422;
  --muted: #626964;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(31, 36, 34, 0.12);
  --accent: #e07a2f;
  --green: #196b5a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f2e7 0%, #efe6d8 100%);
}
.bg { position: fixed; z-index: -1; border-radius: 999px; filter: blur(60px); opacity: .45; }
.bg-1 { width: 360px; height: 360px; top: -80px; left: -120px; background: #ffcc8f; }
.bg-2 { width: 420px; height: 420px; right: -140px; top: 20vh; background: #97c6b8; }

.hero { padding: 88px 8vw 36px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; color: #a6541e; text-transform: uppercase; }
h1, h2, h3, h4, h5 { margin: 0; font-family: "Noto Serif SC", serif; }
h1 { margin-top: 12px; font-size: clamp(34px,4vw,54px); }
h2 { margin-top: 8px; font-size: clamp(18px,2vw,26px); color: var(--muted); font-weight: 600; }

.container { padding: 0 8vw 72px; display: grid; gap: 24px; }
.board-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.board {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  padding: 16px;
}
.board-tab {
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.board-tab.active { border-color: var(--accent); background: rgba(224,122,47,.1); }
.board span { font-size: 12px; color: #a6541e; font-weight: 700; }
.board h3 { margin-top: 6px; font-size: 22px; }
.board p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 22px 45px rgba(34, 29, 18, 0.12);
}
.tab-panel { display: none; gap: 24px; }
.tab-panel.active { display: grid; }
.intro p { margin-top: 10px; line-height: 1.7; color: var(--muted); }
.chips { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.chips span {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(25,107,90,.12); color: var(--green);
}

.layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 18px; }
.panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.switcher { display: flex; gap: 8px; }
.switcher button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 12px; cursor: pointer;
}
.switcher button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.playback { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.playback button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.playback button#nextStep { background: var(--green); color: #fff; border-color: var(--green); }
.playback button.ghost { background: transparent; }
#stepInfo { font-size: 13px; color: var(--muted); }

#flow { width: 100%; height: auto; min-height: 760px; background: #f8f2e5; border: 1px dashed var(--line); border-radius: 16px; }
.legend { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.stage1 { background: var(--green); }
.dot.stage2 { background: var(--accent); }
.dot.branch { background: #f3c340; }
.dot.focus { background: #2c2f2c; box-shadow: 0 0 0 3px rgba(44,47,44,.2); }

ol { margin: 10px 0 0; padding-left: 18px; }
li { margin-bottom: 14px; }
li p { margin: 4px 0 0; color: var(--muted); }
.risk { margin-top: 12px; background: rgba(224,122,47,.08); border-radius: 14px; padding: 12px; }
.risk ul { margin: 8px 0 0; padding-left: 16px; color: var(--muted); }

.knowledge { display: grid; gap: 16px; }
.k-head p { margin-top: 8px; color: var(--muted); }
.k-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.k-main ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.k-side { display: grid; gap: 10px; }
.k-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.65); }
.k-box p { margin: 0; }
.k-box span { margin-top: 6px; display: block; color: var(--muted); font-size: 14px; line-height: 1.6; }
.k-result { border-radius: 14px; padding: 12px; background: rgba(25,107,90,.12); color: var(--green); font-weight: 600; }

.mxn-wrap { display: grid; grid-template-columns: .8fr 1.4fr .9fr; gap: 12px; }
.mxn-side, .mxn-main { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.62); }
.choice-list { display: grid; gap: 8px; margin-top: 10px; }
.choice-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff;
  cursor: pointer; font-size: 13px;
}
.choice-item.active { background: rgba(25,107,90,.12); border-color: rgba(25,107,90,.45); color: var(--green); font-weight: 600; }
.matrix { display: grid; gap: 8px; margin-top: 10px; }
.matrix-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.matrix-cell { border: 1px dashed var(--line); border-radius: 10px; padding: 9px 10px; font-size: 13px; color: var(--muted); background: #fff; }
.matrix-cell.hit { border-style: solid; border-color: rgba(224,122,47,.5); background: rgba(224,122,47,.1); color: #8d4619; font-weight: 600; }

@media (max-width: 1000px) {
  .board-nav, .layout, .k-grid, .mxn-wrap { grid-template-columns: 1fr; }
}
