/* Three-pane settings sheet: fixed close/header/footer, independent scrolling. */
#settings-dialog{width:100%!important;max-width:none!important}
#settings-dialog .settings-sheet{
  display:flex;flex-direction:column;overflow:hidden!important;
  max-height:min(93dvh,820px);max-width:470px!important;padding:0!important;
  background:#14364a!important;
}
.settings-top{flex:none;position:relative;z-index:2;padding:17px 18px 12px;
  gap:12px;background:#14364a;border-bottom:1px solid #ffffff18}
.settings-top h2{font:25px/1.14 Georgia,serif;margin:8px 0 0}
.settings-top .sheet-close{width:43px;height:43px;font-size:26px;flex:none}
.settings-tabs{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  padding:8px 12px 10px;gap:6px;background:#14364a;border-bottom:1px solid #ffffff1d}
.settings-tabs button{font-size:12px;font-weight:800;border:1px solid transparent;
  color:#bed5d6;background:#ffffff0a;padding:11px 5px;border-radius:10px;min-height:42px}
.settings-tabs button[aria-selected=true]{color:#142e40;background:#eed1a2;border-color:#eac48c}
.settings-tabs button:not([aria-selected=true]):hover{background:#ffffff22}
.settings-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;
  padding:15px 20px 17px;-webkit-overflow-scrolling:touch}
.settings-scroll >section[hidden]{display:none!important}
.settings-hint{font-size:12px!important;line-height:1.55!important;
  color:#b9d2d5!important;margin:0 0 19px}
.settings-scroll .field-label{margin:16px 0 7px}
.settings-scroll .note{margin:5px 0 12px;line-height:1.55}
.settings-scroll .theme-picker{margin-top:12px}
.settings-scroll .history-trigger{margin-top:11px}
.settings-footer{flex:none;padding:9px 15px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid #ffffff20;background:#14364a}
.settings-footer .sheet-primary{margin:0;min-height:49px}
.words-next-actions{display:grid;gap:7px;margin:13px 0}
.words-next-actions .sheet-primary{margin:0}
.words-next-actions .action{padding:10px}
@media(max-height:650px){
  .settings-top{padding-top:10px;padding-bottom:8px}
  .settings-top h2{font-size:21px;margin-top:3px}
  .settings-tabs{padding-top:5px;padding-bottom:6px}
  .settings-scroll{padding-top:10px}
}
