.kb00-wrap { width: min(980px, calc(100% - 32px)); }

.kb00-hero { margin: 18px 0 14px; padding: 8px 4px 0; }

.kb00-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; }

.kb00-rule {
  max-width: 48rem;
  margin: 12px 0 0;
  color: #e9ddbd;
  font-size: 0.82rem;
  line-height: 1.65;
}

.kb00-gate { padding: 18px 20px 20px; }

.kb00-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.kb00-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 52px;
  padding: 8px 12px;
  border: 2px solid var(--gold);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  text-align: left;
}

.kb00-tab b { font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif; font-size: 1rem; }
.kb00-tab span { color: var(--bark); font-size: 0.76rem; }
.kb00-tab.on { background: var(--moss); color: #f7eed4; }
.kb00-tab.on span { color: #ffe6a8; }
.kb00-tab.passed { border-color: #3a6b45; }

.kb00-progressline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 10px;
  color: var(--bark);
  font-size: 0.82rem;
}
.kb00-progressline p { margin: 0; }

.kb00-question h2 {
  margin: 8px 0 12px;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
}

.mini-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 14px;
}

.mini-pillar {
  padding: 8px 4px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: #fffdf8;
  text-align: center;
  transition: background 0.15s ease;
}

.mini-pillar .m-label { display: block; color: var(--bark); font-size: 0.7rem; }
.mini-pillar .m-stem, .mini-pillar .m-branch {
  display: block;
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: 1.7rem;
  line-height: 1.15;
}
.mini-pillar .m-god { display: block; min-height: 1.1em; color: #6a4a2a; font-size: 0.7rem; }
.mini-pillar.target { background: #fff0c7; border-color: #b9862b; box-shadow: 0 0 0 3px rgba(216, 181, 106, 0.35); }

.el-木 { color: #2f6b3d; }
.el-火 { color: #a3341f; }
.el-土 { color: #7b5320; }
.el-金 { color: #8a6b12; }
.el-水 { color: #1f4f76; }

.branch-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 14px;
  padding: 12px;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  background: #fffdf8;
}
.branch-card .b-label { color: var(--bark); font-size: 0.78rem; }
.branch-card .b-char { font-family: "ZCOOL KuaiLe", sans-serif; font-size: 2.6rem; line-height: 1; }
.branch-card .b-hidden { color: #5c4430; font-size: 0.82rem; }

.kb00-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kb00-option {
  min-height: 48px;
  padding: 9px 12px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  text-align: left;
}

.kb00-option:hover:not(:disabled) { background: #fff1cc; filter: none; }
.kb00-option:disabled { cursor: default; opacity: 0.86; }
.kb00-option.correct { background: #d9ead6; border-color: #3a6b45; }
.kb00-option.wrong { background: #f3d4cc; border-color: #a3341f; }

.kb00-feedback {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbf3df;
  line-height: 1.7;
  font-size: 0.9rem;
}
.kb00-feedback.ok { background: #e3efdf; }
.kb00-feedback.bad { background: #f6e0da; }
.kb00-feedback b { color: #5a3a20; }
.kb00-feedback .god-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(122, 74, 40, 0.22);
  color: #5c4430;
  font-size: 0.82rem;
}

.kb00-next {
  margin-top: 12px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: var(--moss);
  color: #f7eed4;
}

.kb00-pass {
  margin: 10px 0 0;
  padding: 14px;
  border: 2px solid #3a6b45;
  border-radius: 14px;
  background: #e3efdf;
}
.kb00-pass h2 { margin: 0 0 6px; font-family: "ZCOOL KuaiLe", sans-serif; font-size: 1.2rem; }
.kb00-pass p { margin: 6px 0; line-height: 1.65; }
.kb00-pass .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kb00-pass .actions a, .kb00-pass .actions button {
  min-height: 42px;
  padding: 8px 14px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: var(--moss);
  color: #f7eed4;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}
.kb00-pass .actions .ghost { background: #fffdf8; color: var(--ink); }

.kb00-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}
.kb00-actions button, .kb00-actions .pill { min-height: 40px; padding: 7px 12px; border-width: 2px; border-radius: 12px; font-size: 0.84rem; }
.kb00-actions .ghost { background: #fffdf8; }

.kb00-note { margin-top: 16px; padding: 18px 20px; }
.kb00-note h2 { margin: 0 0 8px; font-family: "ZCOOL KuaiLe", sans-serif; font-size: 1.25rem; }
.kb00-note p, .kb00-note li { line-height: 1.75; }
.kb00-note ul { padding-left: 22px; }
.kb00-note b { color: #5a3a20; }

@media (max-width: 620px) {
  .kb00-wrap { width: calc(100% - 20px); }
  .kb00-gate { padding: 14px; }
  .kb00-options { grid-template-columns: 1fr; }
  .kb00-tabs { grid-template-columns: 1fr; }
  .mini-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb00-actions .pill { flex: 1 1 45%; }
}


.kb00-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.chart-drill { margin-top: 4px; }
.chart-tip { margin: 0 0 10px; color: var(--bark); font-size: 0.86rem; line-height: 1.65; }
.write-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.write-card {
  min-width: 0;
  padding: 9px 8px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: #fffdf8;
}
.write-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
}
.write-head .w-label { color: var(--bark); font-size: 0.68rem; }
.write-head .w-char {
  font-family: "ZCOOL KuaiLe", "PingFang SC", sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}
.write-card label {
  display: block;
  margin: 7px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5a3a20;
}
.write-card select, .write-card input {
  width: 100%;
  min-height: 34px;
  margin-top: 3px;
  padding: 4px 6px;
  border-width: 1px;
  border-radius: 8px;
  font-size: 0.82rem;
}
.write-card .fixed {
  min-height: 34px;
  margin-top: 3px;
  padding: 6px;
  border: 1px dashed var(--kb-line);
  border-radius: 8px;
  text-align: center;
  font-size: 0.8rem;
  color: #5a3a20;
}
.write-card .row-ok input, .write-card .row-ok select { border-color: #3a6b45; background: #e3efdf; }
.write-card .row-bad input, .write-card .row-bad select { border-color: #a3341f; background: #f6e0da; }
.write-card .w-answer {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--kb-line);
  color: #5c4430;
  font-size: 0.7rem;
  line-height: 1.55;
}
.chart-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chart-actions button { min-height: 40px; border-width: 2px; border-radius: 12px; padding: 7px 14px; font-size: 0.88rem; }
.chart-actions #checkChart { background: var(--moss); color: #f7eed4; }
.chart-actions .ghost { background: #fffdf8; }
.chart-result { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fbf3df; font-size: 0.88rem; line-height: 1.65; }
.chart-result.ok { background: #e3efdf; }
.chart-result.bad { background: #f6e0da; }

@media (max-width: 760px) {
  .write-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .kb00-tabs { grid-template-columns: 1fr; }
  .write-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


.kb00-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 10px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: #fffdf8;
  color: #5a3a20;
  font-size: 0.78rem;
  cursor: pointer;
}
.kb00-color input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--moss);
}

body.no-el-color .el-木,
body.no-el-color .el-火,
body.no-el-color .el-土,
body.no-el-color .el-金,
body.no-el-color .el-水 { color: var(--ink); }
