/* A stable editor with independent scrolling and accessible controls. */
body.editor-open{overflow:hidden}
:focus-visible{outline:3px solid #b9842d;outline-offset:3px}
dialog#editor{width:min(1120px,96vw);max-height:94dvh;overflow:auto}
#editor .editor-top{position:sticky;top:0;background:white;z-index:4}
#editor .editor-body{grid-template-columns:minmax(245px,300px) minmax(0,1fr)}
#editor aside{min-width:0}
#editor .preview{min-width:0}
#editor .preview-label{position:sticky;top:0;background:#eaecea;padding:5px 0;z-index:2}
@media screen and (min-width:701px){
  #editor .editor-body{height:min(76dvh,800px);min-height:0;overflow:hidden}
  #editor aside,#editor .preview{overflow-y:auto;overscroll-behavior:contain}
}
#editor .paper{overflow-wrap:anywhere;min-width:0}
#editor .paper table{max-width:100%}
#editor input,#editor select,#editor textarea{min-height:42px;font-size:16px}
#editor .check input{min-height:0;width:18px;height:18px}
#editor .close{flex-shrink:0}
.settings-note{background:#fff4d8;padding:10px 12px;border-radius:6px;color:#795514;font-size:13px;margin:8px 0}
.needs-update{box-shadow:0 0 0 3px #f9df8a}
.card:focus-visible{outline-offset:4px}
@media(max-width:700px){
  dialog#editor{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;inset:0}
  #editor .editor-body{display:block}
  #editor aside{padding:16px}
  #editor .preview{padding:12px;overflow:auto}
  #editor .editor-top h2{font-size:21px}
  #editor .preview-label{position:static}
  #editor .paper{min-width:0;padding:12px}
  #editor .paper .wordgrid td{font-size:clamp(8px,2.5vw,12px);padding:1px}
  #editor .paper .wordgrid{table-layout:fixed;width:100%}
  #editor .paper .name{font-size:11px}
  #editor .paper .bingo div{min-width:0}
  .hero-art{max-width:100%;transform:scale(.78);transform-origin:center}
  header .brand{font-size:21px}
}
@media print{
  body.editor-open{overflow:visible!important}
  dialog#editor{height:auto!important;max-height:none!important;width:100%!important}
  #editor .editor-top,#editor .preview-label{display:none!important}
  #editor .editor-body{display:block!important}
  #editor .paper{padding:0!important;overflow:visible!important}
}
