/* DAXIANG Academy Question Studio v0.4.8.0: independent scroll regions.
   No global position:fixed headers: only question-bank screens are affected. */
@media (min-width: 881px) {
  body:has(.bank-v0480-root) { height:100dvh; overflow:hidden; }
  body:has(.bank-v0480-root) .shell { height:100dvh; display:flex; flex-direction:column; min-height:0; }
  body:has(.bank-v0480-root) .shell > .topbar {flex:0 0 auto;}
  body:has(.bank-v0480-root) .shell > main { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; padding-top:16px; padding-bottom:12px; }
  body:has(.bank-v0480-root) .shell > footer {display:none;}
  body:has(.bank-v0480-root) .public-bank-main { height:calc(100dvh - 58px); min-height:0; overflow:hidden; display:flex; flex-direction:column; padding-top:14px; padding-bottom:12px; }
  body:has(.bank-v0480-root) .public-bank-top {min-height:58px;}
  body:has(.bank-v0480-root) .bank-studio-header { position:relative; flex:0 0 auto; z-index:2; margin-bottom:14px; }
  body:has(.bank-v0480-root) .bank-studio-shell { flex:1 1 auto; min-height:0; height:auto; align-items:stretch; overflow:hidden; }
  body:has(.bank-v0480-root) .bank-tree-panel { position:relative; top:auto; align-self:stretch; height:100%; min-height:0; max-height:none; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
  body:has(.bank-v0480-root) .bank-studio-main { align-self:stretch; height:100%; min-height:0; overflow-x:auto; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
  /* Independent guest question bank: header and notice remain outside both scrollers. */
  body.pub-body:has(.pb-shell) {height:100dvh; display:flex; flex-direction:column; overflow:hidden;}
  body.pub-body:has(.pb-shell) .pub-nav {flex:0 0 auto;}
  body.pub-body:has(.pb-shell) .pub-main {flex:1 1 auto; min-height:0; display:flex; flex-direction:column; overflow:hidden;}
  body.pub-body:has(.pb-shell) .pub-footer {display:none;}
  body.pub-body:has(.pb-shell) .pb-head, body.pub-body:has(.pb-shell) .pub-notice {flex:0 0 auto;}
  body.pub-body:has(.pb-shell) .pb-shell {flex:1 1 auto; min-height:0; height:auto; align-items:stretch; overflow:hidden;}
  body.pub-body:has(.pb-shell) .pb-tree-panel {position:relative; top:auto; height:100%; min-height:0; max-height:none; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable;}
  body.pub-body:has(.pb-shell) .pb-results {height:100%; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-gutter:stable;}
}
.bank-v0480-guest-note,.bank-v0480-self-target {background:#f2f9fd; border:1px solid #cbe4f2; border-radius:8px; padding:9px 12px; color:#295a75; font-size:12px;}
#basket-panel #exam-opts[hidden],#basket-panel #pdf-opts[hidden] {display:none!important;}
body:has(.bank-v0480-root) .bank-studio-shell > * { min-width:0; }
/* Preserve usable layout on touch screens; normal page scroll is the mobile fallback. */
@media (max-width:880px) {
  body:has(.bank-v0480-root) {overflow-y:auto;}
  body:has(.bank-v0480-root) .bank-tree-panel {max-height:36vh; overflow-y:auto; overscroll-behavior:contain;}
  body.pub-body:has(.pb-shell) .pb-tree-panel {max-height:36vh; overflow-y:auto; overscroll-behavior:contain;}
}
body.pub-body:has(.pb-shell) .pb-export select {display:block; min-height:38px; border:1px solid #cbdfeb; background:white; border-radius:8px; padding:7px 9px; margin-top:6px; max-width:100%;}
body.pub-body:has(.pb-shell) .pb-export > form {flex-wrap:wrap;}
body.pub-body:has(.pb-shell) .pb-export > form label {flex:1 1 150px; min-width:130px;}

/* v0.4.8.1: the entire selectors/header block is stationary inside the tree pane. */
body:has(.bank-v0480-root) .bank-tree-panel {
  display:flex!important; flex-direction:column; overflow:hidden!important;
  min-height:0; box-sizing:border-box;
}
body:has(.bank-v0480-root) .bank-tree-controls {
  flex:0 0 auto; min-height:0; background:#fff; padding-bottom:10px;
}
body:has(.bank-v0480-root) .bank-tree-scroll {
  flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
  overscroll-behavior:contain; scrollbar-gutter:stable; padding-right:2px;
}
body:has(.bank-v0480-root) .bank-v0481-guest-banner {
  flex:0 0 auto; background:#e8f6fc; border:1px solid #afd9ec;
  border-radius:9px; color:#225a79; padding:10px 14px;
  font-size:13px; margin:0 0 12px;
}
.bank-guest-practice { display:block; text-align:center; margin-top:9px; }
@media (max-width:880px){
  body:has(.bank-v0480-root) .bank-tree-panel{max-height:45vh;}
  body:has(.bank-v0480-root) .bank-tree-scroll{max-height:28vh;}
}
