/* Base list */
.rstoc{border:1px solid var(--rstoc-bd,#e5e7eb);padding:1rem;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.rstoc__title{font-weight:600;margin-bottom:.5rem}
.rstoc__list{list-style:none;margin:0;padding:0}
.rstoc__item{margin:.25rem 0}
.rstoc__item--lvl2 a{font-weight:600}
.rstoc__item--lvl3{padding-left:.5rem}
.rstoc__item--lvl4{padding-left:1rem}
.rstoc a{text-decoration:none}
.rstoc a:hover{text-decoration:underline}

/* Manual cards grid (default list usage) */
.rstoc--manual .rstoc__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.75rem}
.rstoc__card{display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--rstoc-bd,#e5e7eb);border-radius:10px;padding:.75rem;text-align:center}
.rstoc__card img{max-width:100%;height:auto;border-radius:8px;margin-bottom:.5rem}

/* === Panel layout === */
.rstoc-panel{position:fixed;top:20%;right:24px;max-width:320px;width:320px;z-index:1000;     background: #ffffffa1;
    border-radius: 20px;
    padding: 10px;
    text-align: center;}
.rstoc-panel--left{left:24px;right:auto}
.rstoc-panel__box{max-height:70vh;overflow:auto}

/* Panel -> manual items stacked + image width 200px */
.rstoc-panel .rstoc{border:none;box-shadow:none;padding:0;background:transparent}
.rstoc-panel .rstoc__grid{display:block}
.rstoc-panel .rstoc__card{display:block;border:0;border-bottom:1px solid var(--rstoc-bd,#e5e7eb);border-radius:0;padding:.5rem 0;margin:0}
.rstoc-panel .rstoc__card img{width:200px;max-width:100%;height:auto;display:block;margin:0 auto .5rem auto}

/* Mobile sticky footer bar */
.rstoc-panel__toggle{display:none;position:fixed;left:0;right:0;bottom:0;margin:0;border:0;border-top:1px solid var(--rstoc-bd,#e5e7eb);background:#fff;padding:.75rem 1rem;font-weight:600;z-index:1001}

/* Mobile behavior */
@media (max-width: 768px){
  .rstoc-panel{left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;transform:translateY(100%);transition:transform .25s ease;}
  .rstoc-panel.is-open{transform:translateY(0)}
  .rstoc-panel__box{max-height:60vh;border-top-left-radius:12px;border-top-right-radius:12px;box-shadow:0 -8px 24px rgba(0,0,0,.08);background:#fff;padding:1rem}
  .rstoc-panel__toggle{display:block}
}
