.tool form { display: grid; gap: 0.75rem; }
.tool label { font-weight: 600; }
.tool textarea, .tool input, .tool select { width: 100%; box-sizing: border-box; padding: 0.5rem; font: inherit; border: 1px solid #9aa3ad; border-radius: 6px; background: #fff; color: #111; }
.tool textarea { min-height: 7.5rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.tool .row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.tool .hint { font-size: 0.9rem; color: #555; margin: 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.buttons button { padding: 0.55rem 1rem; font: inherit; border-radius: 6px; border: 1px solid #1f4e79; background: #1f4e79; color: #fff; cursor: pointer; }
.buttons button.secondary { background: #fff; color: #1f4e79; }
.buttons button:focus-visible { outline: 3px solid #f0b400; outline-offset: 2px; }
.output { margin-top: 1rem; }
.output .msg-error { color: #9b1c1c; font-weight: 600; }
.output .msg-warn { color: #7a4b00; }
.stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0; padding: 0; list-style: none; }
.stats li { border: 1px solid #c8ced6; border-radius: 6px; padding: 0.4rem 0.7rem; background: #f6f8fa; color: #111; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table.data { border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.92rem; }
table.data th, table.data td { border: 1px solid #b8c0c8; padding: 0.3rem 0.5rem; text-align: center; color: #111; background: #fff; }
table.data th { background: #eef2f6; }
table.data td.left, table.data th.left { text-align: left; }
.flag { color: #9b1c1c; font-weight: 600; }
.g0 { background: #e8f1fb !important; }
.g1 { background: #fdf2e3 !important; }
.g2 { background: #e9f7ec !important; }
.g3 { background: #f6e9f7 !important; }
.g4 { background: #fbfbe3 !important; }
.g5 { background: #e6f6f6 !important; }
td.empty { color: #888; }
.room-block { break-inside: avoid; page-break-inside: avoid; margin-bottom: 1.25rem; }
.board { display: inline-block; padding: 0.15rem 1rem; border: 1px solid #555; margin: 0.25rem 0; font-size: 0.85rem; color: #111; background: #fff; }
.example-box { border-left: 4px solid #1f4e79; padding: 0.5rem 1rem; background: #f6f8fa; color: #111; }
.example-box pre { white-space: pre-wrap; margin: 0.25rem 0; }
@media print {
  header, nav, footer, .crumbs, .app-hero .meta, .buttons, .tool form, .no-print, section:not(#tool) { display: none !important; }
  .room-block { page-break-after: always; }
  table.data td, table.data th { font-size: 11pt; }
}
