#app, #app > *, .stack > *, .grid2 > *, .ents > *, .panel, .scene, .entity, .row > *, .toolbar > *, .dialog > * { min-width: 0; }
.btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; padding-block: 7px; }
.btn > svg { flex-shrink: 0; }
.input, .edit-area { max-width: 100%; min-width: 0; }
.plus-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.plus-stats strong {font-size:1.35rem;}
@media(max-width: 720px) {
  .grid2, .ents {grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));}
  .stack,.panel,.dialog {grid-template-columns:minmax(0,1fr);}
  .choice, .choice.modes {grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));}
  .toolbar .btn { flex-shrink:1; }
  .row .btn { min-width:0; }
  .scene, .entity, .box, .panel, .handout-card {overflow-wrap:anywhere;}
  .nav button {min-width:0; padding-inline:5px;}
  .dialog {padding:14px;}
  .toc {max-width:100%; overflow-x:auto;}
}
@media print {
  .top,.nav,.toolbar,.toc,.overlay,.editbar,.btn,.menu,.toast,.cover-bg {display:none !important;}
  html,body {background:#fff !important;color:#111 !important;}
  body {--bg:#fff;--surface:#fff;--raise:#eee;--fg:#111;--muted:#555;--gold:#333;--line:#bbb;}
  main {max-width:none;padding:0;}
  .cover,.scene,.entity,.panel,.box {box-shadow:none !important;}
  .cover {break-after:page;}
  h1,h2,h3,h4 {break-after:avoid;}
}
