.dungeon { margin-top: 1rem; }
.dungeon__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .6rem 0 1rem; }
.dungeon__legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lg { display: inline-block; width: 18px; height: 10px; border: 2px solid var(--ink); background: var(--surface); border-radius: 2px; }
.lg--locked { background: var(--ink); }
.lg--secret { border-style: dashed; background: transparent; }
.lg--arch { border-width: 0 2px; border-radius: 0; }
.lg--stairs { height: 14px; width: 14px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px); border: 0; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8rem; margin-top: .8rem; }
.room { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .85rem; background: var(--surface); break-inside: avoid; }
.room h4 { margin: 0 0 .25rem; font-size: 1rem; display: flex; gap: .5rem; align-items: baseline; }
.room h4 .n { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85rem; }
.room p { margin: .2rem 0; font-size: .93rem; }
.room .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-soft); }
.room--monster .tag { color: var(--crimson, #9c2a22); } .room--treasure .tag { color: #9a6b00; } .room--trap .tag { color: #8a4b00; }
@media print {
  .site-header, .site-footer, .breadcrumbs, .tool-head, .calc__bar, .calc__section, .tool-aside, .prose, .faq, .related, .ad, .gen-actions { display: none !important; }
  .calc { box-shadow: none; border: 0; padding: 0; } .calc::before { display: none; }
  .canvas-wrap { max-height: none; border: 0; }
  #dg-out { break-before: page; }
}
