.section-toc-trigger[hidden] { display: none; }
.section-toc-sheet { border: 0; padding: 0; }

@media (max-width: 600px) {
  .section-toc-trigger:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    padding: 11px 18px;
    margin-bottom: 20px;
    border: 0;
    border-radius: 30px;
    background: #eaf0ed;
    color: #315c58;
    font: 500 13px/1.5 var(--body, inherit);
    cursor: pointer;
  }
  .section-toc-trigger .bi { font-size: 18px; }

  .section-toc-sheet {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 80dvh;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 30px 18px max(22px, env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px 18px 0 0;
    color: #24564e;
  }
  .section-toc-sheet::backdrop { background: #12201e80; }
  .section-toc-sheet::before {
    content: "";
    position: absolute;
    top: 8px;
    left: calc(50% - 18px);
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: #d3d8d5;
  }
  .section-toc-sheet .section-toc-close {
    position: absolute;
    left: 8px;
    top: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #71807f;
    font-size: 28px;
    cursor: pointer;
  }
  .section-toc-sheet h2 {
    margin: 0 0 18px;
    padding-inline-end: 40px;
    font-size: 18px;
  }
  .section-toc-sheet h2::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    background: #cba569;
    margin-top: 10px;
    border-radius: 2px;
  }
  .section-toc-sheet .sub-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
  }
  .section-toc-sheet .sub-links a {
    display: block;
    padding: 13px 10px;
    border: 0;
    border-bottom: 1px solid #edf0ee;
    border-radius: 0;
    font-size: 14px;
  }
  .section-toc-sheet .sub-links a.is-on {
    color: #24564e;
    background: #eaf1ed;
    border-radius: 6px;
    font-weight: 700;
  }
  body.section-toc-open { overflow: hidden; }
}
