/* The Settings panel (settings.js): a side panel over the right of the page, under the walkthrough (sheet.css's .tour,
   z-index 50) and over the top bar (20) and the steps' bar (15). The folds in it keep the page's own styles. */
dialog.settings{
  position:fixed; inset:0 0 0 auto; z-index:40; margin:0; width:min(620px, 100vw); height:100vh; height:100dvh;
  max-width:100vw; max-height:none; overflow:auto; overscroll-behavior:contain;
  background:var(--cell); color:var(--text); border:0; border-left:1px solid var(--border);
  box-shadow:-24px 0 48px rgba(0,0,0,.45); padding:0 26px 40px;
}
dialog.settings:not([open]){display:none;}
.settings-head{
  position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:0 -26px 6px; padding:16px 26px 12px; background:var(--cell); border-bottom:1px solid var(--border-soft);
}
.settings-head h2{font-family:var(--font-display); font-size:24px; font-weight:500; margin:0;}
.settings-close{
  width:40px; height:40px; flex:none; border-radius:50%; border:1px solid var(--border); background:transparent;
  color:var(--text-dim); font-size:22px; line-height:1; cursor:pointer;
}
.settings-close:hover{color:var(--teal); border-color:var(--teal-dim);}
dialog.settings > .hint{margin:10px 0 4px;}
dialog.settings details.setup{border-top:1px solid var(--border-soft); padding-top:16px; margin-top:16px;}
dialog.settings details.setup > summary{font-size:13px; min-height:24px;}

/* the button in the top bar */
.settings-btn{
  font-family:var(--font-mono); font-size:12px; color:var(--text-dim); background:transparent; cursor:pointer;
  border:1px solid var(--border); border-radius:6px; padding:5px 11px; margin:0 8px 0 4px; min-height:30px;
}
.settings-btn:hover, .settings-btn[aria-expanded="true"]{color:var(--teal); border-color:var(--teal-dim);}
.settings-btn .gear{margin-right:6px; font-size:13px;}

/* where a fold was, in its step: the line that opens the panel on it */
.to-settings{margin-top:14px;}
.to-settings .link{margin-top:0;}

@media (max-width:640px){
  dialog.settings{padding:0 16px 32px;}
  .settings-head{margin:0 -16px 6px; padding:12px 16px 10px;}
  .settings-btn{margin:0 4px 0 2px; padding:4px 0; width:34px; min-height:34px;}
  .settings-btn .gear{margin:0; font-size:16px;}
  .settings-btn .settings-word{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}   /* said, not shown */
}
@media (forced-colors:active){
  dialog.settings{border-left:1px solid CanvasText;}
}
