.ztoc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ztoc-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 1.15rem 0 1rem;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(240, 193, 75, 0.62);
  background:
    linear-gradient(100deg, rgba(240, 193, 75, 0.2), rgba(227, 27, 46, 0.1) 46%, rgba(0, 0, 0, 0.15));
  box-shadow: 0 0 22px rgba(240, 193, 75, 0.12);
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

.ztoc-note__mark {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe56a, #e39a12);
  color: #3a1608;
  font-weight: 800;
  line-height: 1;
}

.ztoc-note p {
  margin: 0;
  color: #f7f2ea;
  font-weight: 700;
  line-height: 1.55;
}

.ztoc-note a {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 9px 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe56a, #e39a12);
  color: #3a1608;
  font-weight: 800;
  text-decoration: none;
}

.ztoc-note a:hover { filter: brightness(1.06); color: #3a1608; }

.ztoc {
  display: table;
  width: auto;
  max-width: 100%;
  margin: 1.35rem 0 1.75rem;
  padding: 12px 18px 10px 16px;
  background: #07060c;
  border: 1px solid rgba(240, 193, 75, 0.42);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

.ztoc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 240px;
}

.ztoc__title {
  margin: 0;
  color: #f0c14b;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ztoc__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 30px;
  margin-left: 12px;
  border: 1px solid rgba(240, 193, 75, 0.55);
  border-radius: 6px;
  color: #f0c14b;
  background: rgba(240, 193, 75, 0.06);
  cursor: pointer;
}

.ztoc__toggle:hover { background: rgba(240, 193, 75, 0.16); }

.ztoc__switch {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ztoc__list,
.ztoc__list ol {
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
  counter-reset: ztoc;
}

.ztoc__list ol { margin: 2px 0 4px 1.35rem; }

.ztoc li {
  margin: 0;
  line-height: 1.7;
  counter-increment: ztoc;
}

.ztoc li > a {
  color: #f7f2ea;
  font-weight: 500;
  text-decoration: none;
}

.ztoc li > a::before {
  content: counters(ztoc, ".") ". ";
  color: #f0c14b;
  font-weight: 700;
}

.ztoc li > a:hover,
.ztoc li > a:focus-visible {
  color: #ffe3a3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ztoc__switch:not(:checked) ~ .ztoc__list { display: none; }

@media (max-width: 640px) {
  .ztoc { display: block; width: 100%; }
}
