/* ── base ── */
:root {
  --bg:        #0e0c0a;
  --bg2:       #1a1612;
  --bg3:       #26211a;
  --border:    #3d3228;
  --gold:      #c9a84c;
  --gold-dim:  #8a6f32;
  --red:       #a03030;
  --green:     #3a7a3a;
  --blue:      #2a5080;
  --purple:    #5a3080;
  --text:      #d4c9b8;
  --text-dim:  #8a7d6a;
  --radius:    8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #e8c060; }

/* ── navbar ── */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.nav-links { display: flex; gap: 1.25rem; }

.nav-link {
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--gold); }

/* link Accedi/Esci: spinto a destra su desktop, accento dorato */
.nav-auth { margin-left: auto; color: var(--gold); }
@media (max-width: 640px) { .nav-auth { margin-left: 0; } }

/* ── container ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* ── hero ── */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
  margin-bottom: 0.75rem;
}
.hero-subtitle {
  color: var(--text-dim);
  font-size: 1.15rem;
}

/* ── tool grid ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
}
.tool-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  color: var(--text);
}
.tool-icon { font-size: 2.5rem; }
.tool-card h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
}
.tool-card p { color: var(--text-dim); font-size: 1rem; flex: 1; }
.tool-card .btn { align-self: flex-start; margin-top: auto; }

/* ── buttons ── */
.btn {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--border); border-color: var(--gold); color: var(--gold); }

.btn-primary {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: #0e0c0a;
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold); color: #0e0c0a; }

.btn-secondary { background: var(--bg3); }

.btn-large { padding: 0.75rem 2rem; font-size: 1rem; }

/* ── AI / Claude ── */
.ai-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: #c9a0e0;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.ai-toggle input { accent-color: #8a4fbf; width: 1.05rem; height: 1.05rem; }

.ai-block {
  background: linear-gradient(135deg, #1a1228, #16121f);
  border: 1px solid #4a2f6a;
  border-left: 4px solid #8a4fbf;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.ai-block-inset { margin: 0; border-radius: 0; border-left-width: 4px; }
.ai-label {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #b98fe0;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.ai-content {
  color: #e6dcf2;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ai-warning {
  background: #2a1808;
  border: 1px solid #6a4010;
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.25rem;
  color: #e0a050;
  font-size: 0.92rem;
}
.ai-warning span { display: block; color: var(--text-dim); font-size: 0.78rem; margin-top: 0.2rem; }

/* ── forms ── */
.gen-form { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1rem; margin-bottom: 1.5rem; }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-row input,
.form-row select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  font-family: 'Crimson Text', serif;
  min-width: 100px;
  outline: none;
}
.form-row input:focus,
.form-row select:focus { border-color: var(--gold-dim); }

/* ── page title ── */
.page-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── result section ── */
.result-section { margin-top: 1rem; }

.dungeon-meta { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

/* ── tags ── */
.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.tag-easy   { border-color: var(--green); color: #6abf6a; }
.tag-medium { border-color: var(--gold-dim); color: var(--gold); }
.tag-hard   { border-color: var(--red); color: #d06060; }
.tag-level  { border-color: var(--blue); color: #70a0d0; }
.tag-align  { border-color: var(--purple); color: #b080e0; }
.tag-count  { border-color: var(--red); color: #d06060; }

/* ── SVG map ── */
.map-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  font-style: italic;
}
.map-wrapper {
  background: #0f0c08;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-bottom: 1rem;
  overflow: auto;
  max-height: 75vh;
  /* scorrimento fluido su touch */
  -webkit-overflow-scrolling: touch;
}

/* dimensione naturale: il testo resta leggibile, si scorre se serve */
#dungeon-map { display: block; }

.room-sel { transition: stroke 0.15s, stroke-width 0.15s; }

/* map legend */
.map-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.legend-item { display: flex; align-items: center; gap: 0.3rem; }

/* ── section titles ── */
.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ── corridor trap list ── */
.corridor-trap-list { display: flex; flex-direction: column; gap: 0.6rem; }
.ctrap-card {
  display: flex;
  gap: 0.75rem;
  background: #1c1408;
  border: 1px solid #5a3812;
  border-left: 4px solid #d07818;
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  align-items: flex-start;
}
.ctrap-card:target { border-color: var(--gold); background: #241a0a; }
.ctrap-num {
  flex-shrink: 0;
  background: #d07818;
  color: #1a1006;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.ctrap-body { display: flex; flex-direction: column; gap: 0.15rem; }
.ctrap-body strong { color: #f0b050; font-size: 1rem; }
.ctrap-between { font-size: 0.78rem; color: var(--text-dim); font-style: italic; }
.ctrap-body p { font-size: 0.92rem; color: var(--text); margin: 0; }

.shape-pill {
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 1.2rem; height: 1.2rem;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── room list ── */
.room-list { display: flex; flex-direction: column; gap: 1rem; }

.room-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.room-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.room-num { font-family: 'Cinzel', serif; font-size: 0.8rem; color: var(--text-dim); }
.room-type-badge { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--gold); }

.room-bg-entrance { border-left: 3px solid var(--green); }
.room-bg-treasure { border-left: 3px solid var(--gold); }
.room-bg-trap     { border-left: 3px solid #a06030; }
.room-bg-monster  { border-left: 3px solid var(--red); }
.room-bg-boss     { border-left: 3px solid #a030a0; }
.room-bg-shrine   { border-left: 3px solid var(--blue); }
.room-bg-corridor, .room-bg-chamber, .room-bg-library { border-left: 3px solid var(--border); }

.room-card-body { padding: 0.75rem 1rem; }
.room-desc { color: var(--text-dim); font-style: italic; margin-bottom: 0.75rem; }

.room-tags { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── detail blocks ── */
.detail-block {
  background: var(--bg3);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}
.detail-block strong { color: var(--text); display: block; margin-bottom: 0.2rem; }
.detail-block em     { color: var(--text-dim); font-size: 0.9rem; }
.detail-block p      { margin: 0; }

.detail-monster { border-left: 3px solid var(--red); }
.detail-trap    { border-left: 3px solid #a06030; }
.detail-loot    { border-left: 3px solid var(--gold-dim); }
.detail-secret  { border-left: 3px solid var(--purple); }

.detail-exits { font-size: 0.9rem; color: var(--text-dim); }

/* ── monster stat block (dungeon + encounter) ── */
.monster-meta {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-left: 0.35rem;
}

.monster-stat-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(160, 48, 48, 0.35);
}

.msb-item {
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
  font-size: 0.88rem;
}

.msb-full { width: 100%; }

.msb-label {
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.msb-value { color: var(--text); }

/* encounter monster stats section */
.encounter-monster-stats {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.ems-title {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d06060;
  margin-bottom: 0.6rem;
}

.ems-block {
  border-top-color: rgba(160, 48, 48, 0.25);
}

/* ── NPC card ── */
.npc-card {
  background: var(--bg2);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  overflow: hidden;
}
.npc-header {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.npc-name {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.npc-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.npc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.stat-block {
  flex: 1;
  min-width: 80px;
  padding: 0.75rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-block:last-child { border-right: none; }
.stat-label { display: block; font-family: 'Cinzel', serif; font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { display: block; font-size: 1.3rem; color: var(--gold); font-weight: 600; }

.npc-details { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }

/* ── encounter card ── */
.encounter-card {
  background: var(--bg2);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  overflow: hidden;
}
.encounter-header {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.encounter-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #d06060;
  margin-bottom: 0.5rem;
}
.encounter-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.encounter-desc {
  padding: 1rem 1.5rem;
  font-style: italic;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.encounter-stats {
  display: flex;
  flex-wrap: wrap;
}
.encounter-stats .stat-block { border-bottom: none; }

/* ── utility ── */
.center-action { text-align: center; }
.hidden { display: none; }

.room-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 2px solid var(--gold-dim);
  padding: 1.25rem;
  z-index: 200;
  max-height: 50vh;
  overflow-y: auto;
}
.panel-close {
  position: absolute;
  top: 0.75rem; right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
}

/* ── NPC attack row ── */
.npc-attack-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.65rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}
.npc-attack-label {
  flex-shrink: 0;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  white-space: nowrap;
}
.npc-attack-value { color: var(--text); }

/* ── location card ── */
.location-card {
  background: var(--bg2);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  overflow: hidden;
}
.location-header {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.location-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.location-name {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #70a0d0;
}
.location-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-danger-sicuro     { border-color: var(--green); color: #6abf6a; }
.tag-danger-teso       { border-color: var(--gold-dim); color: var(--gold); }
.tag-danger-pericoloso { border-color: var(--red); color: #d06060; }

.location-atmosphere {
  padding: 1rem 1.5rem;
  font-style: italic;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.location-atmosphere p { margin: 0; }

.location-body {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.location-section { }
.loc-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #70a0d0;
  margin-bottom: 0.35rem;
}
.loc-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.loc-feature-list li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
}
.loc-feature-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* ── magic item card ── */
.item-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.item-card.rarity-comune         { border-color: #555; }
.item-card.rarity-non-comune     { border-color: var(--green); }
.item-card.rarity-raro           { border-color: var(--blue); }
.item-card.rarity-molto-raro     { border-color: var(--purple); }
.item-card.rarity-leggendario    { border-color: var(--gold); }

.item-header {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.item-name {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.rarity-comune      .item-name { color: #aaa; }
.rarity-non-comune  .item-name { color: #6abf6a; }
.rarity-raro        .item-name { color: #70a0d0; }
.rarity-molto-raro  .item-name { color: #b080e0; }
.rarity-leggendario .item-name { color: var(--gold); }

.item-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rarity-tag-comune       { border-color: #555; color: #aaa; }
.rarity-tag-non-comune   { border-color: var(--green); color: #6abf6a; }
.rarity-tag-raro         { border-color: var(--blue); color: #70a0d0; }
.rarity-tag-molto-raro   { border-color: var(--purple); color: #b080e0; }
.rarity-tag-leggendario  { border-color: var(--gold); color: var(--gold); }

.item-body {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── hook card ── */
.hook-card {
  background: var(--bg2);
  border: 1px solid var(--purple);
  border-radius: var(--radius);
  overflow: hidden;
}
.hook-header {
  background: var(--bg3);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.hook-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.hook-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #b080e0;
}
.hook-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.urgency-bassa    { border-color: var(--green); color: #6abf6a; }
.urgency-media    { border-color: var(--gold-dim); color: var(--gold); }
.urgency-alta     { border-color: #a06030; color: #e08040; }
.urgency-critica  { border-color: var(--red); color: #d06060; }

.hook-body {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hook-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) { .hook-meta-grid { grid-template-columns: 1fr; } }

/* ── footer ── */
.footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── hamburger button (desktop: hidden) ── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--gold-dim); }

/* ── responsive ── */
@media (max-width: 640px) {

  /* navbar: hamburger menu */
  .nav-toggle { display: block; }

  .navbar {
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0;
    row-gap: 0;
  }

  .nav-brand { flex: 1; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 0.25rem;
  }

  .navbar.nav-open .nav-links { display: flex; }

  .nav-link {
    padding: 0.65rem 0.25rem;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-link:last-child { border-bottom: none; }

  /* container */
  .container { padding: 1.25rem 0.75rem; }

  /* forms */
  .form-row { flex-direction: column; }
  .form-row label { width: 100%; }
  .form-row input, .form-row select { width: 100%; }

  /* stat blocks: 3 per row max invece di 1 */
  .npc-stats { flex-wrap: wrap; }
  .stat-block {
    flex: 1 1 30%;
    min-width: 0;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0.5rem;
  }
  .npc-stats .stat-block:nth-child(3n) { border-right: none; }

  .encounter-stats { flex-wrap: wrap; }
  .encounter-stats .stat-block {
    flex: 1 1 45%;
    border-bottom: 1px solid var(--border);
  }

  /* card padding */
  .npc-header,
  .encounter-header,
  .item-header,
  .location-header,
  .hook-header   { padding: 1rem 1rem; }

  .npc-details,
  .item-body,
  .location-body,
  .hook-body     { padding: 0.75rem 1rem; }

  .encounter-desc,
  .encounter-monster-stats,
  .location-atmosphere { padding: 0.75rem 1rem; }

  .npc-attack-row { padding: 0.55rem 1rem; }

  .room-card-body { padding: 0.6rem 0.75rem; }

  /* ctrap cards */
  .ctrap-card { padding: 0.5rem 0.65rem; }

  /* hook meta grid: 1 col */
  .hook-meta-grid { grid-template-columns: 1fr; }

  /* location & hook title rows: stack */
  .location-title-row,
  .hook-title-row { flex-direction: column; gap: 0.4rem; }

  /* monster stat block: wrap bene */
  .monster-stat-block { gap: 0.2rem 0.8rem; }

  /* map legend: 2 col */
  .map-legend { gap: 0.5rem 1rem; }
  .legend-item { font-size: 0.8rem; }

  /* tool grid: 1 col */
  .tool-grid { grid-template-columns: 1fr; }
}
