/* The area editor shares editor.css's palette and chrome; this is only what it adds. */
.sub-topbar { color: var(--panel-text); opacity: 0.8; font-size: 13px; }
.rail-gap { flex: 1; }
.rail-label { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); text-align: center; }
.sizes { display: flex; flex-direction: column; gap: 4px; }
.sizes button {
  font: inherit; padding: 4px 0; border: 2px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); cursor: pointer;
}
.sizes button[aria-pressed='true'] { border-color: var(--gold-outline); background: var(--gold); }
.canvas-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 14px; background: var(--cream); }
#canvas { flex: none; image-rendering: pixelated; border: 3px solid var(--gold-outline); border-radius: 6px; background: var(--card); cursor: crosshair; touch-action: none; }
.statusline { padding: 4px 14px; font-size: 12.5px; color: var(--ink-soft); border-top: 2px solid var(--line); background: var(--card); min-height: 24px; }
.tray:empty::after { content: 'No loose ends — every door can be reached and nothing impassable sits on one.'; }
.warn[data-kind='resized'] i { background: var(--pink); }
.warn[data-kind='ramp'] i { background: var(--gold); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.swatch {
  font: inherit; font-size: 12px; padding: 6px 4px; border: 2px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.swatch i { display: block; width: 100%; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.15); }
/* "This ground type generates this element" (building-the-game/007) — a gear glyph plus a
   couple of dirt-coloured crumbs, pinned to the swatch's colour chip so it reads as "the
   ground makes this" rather than a generic corner badge. */
.swatch .generator-badge {
  position: absolute; top: 4px; right: 4px;
  display: flex; align-items: center; gap: 2px;
  background: rgba(253, 246, 230, 0.92); border: 1px solid var(--gold-outline); border-radius: 999px;
  padding: 1px 4px; font-size: 9px; line-height: 1.4; color: var(--ink);
  pointer-events: none;
}
.swatch .generator-badge .dirt-dot { width: 5px; height: 5px; border-radius: 50%; background: #6b5334; display: inline-block; }
.swatch .generator-badge .dirt-dot + .dirt-dot { margin-left: -2px; background: #8b6f47; }
.swatch[aria-pressed='true'] { border-color: var(--gold-outline); background: var(--gold); }
.swatch small { color: var(--ink-soft); font-size: 10.5px; }
.swatch.wide { grid-column: span 2; }
/* A flavour with a MEANING (a level, a ramp, a shape) says so on its chip; a flavour drawn as its
   flat colour (no tile — TBD) shows a dashed edge. */
.swatch em { display: block; font-style: normal; font-size: 10px; line-height: 1.25; color: var(--ink); margin-top: 3px; }
.swatch.meaning { border-color: #a62b1f; }
.swatch.meaning em { color: #a62b1f; font-weight: 600; }
.swatch.flat i { border: 1px dashed rgba(0,0,0,0.45); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 4px, transparent 4px 8px); }
.painting { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 8px; background: var(--cream); }
.painting i { display: block; width: 36px; height: 36px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.2); flex: none; }
.legend div { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.mark { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.mark.portal { border: 3px solid var(--gold); background: transparent; }
.mark.entry { background: var(--sky); }
.mark.spawn { background: var(--pink); }
code { font-size: 12px; background: var(--cream); padding: 1px 4px; border-radius: 4px; }

/* Place things (the first mini-game, 2026-09-08): the mode switch at the top of the inspector,
   the three tabs, the palette of things, and the marks the map draws for them. */
.mode-switch { margin-bottom: 12px; }
.mode-switch button, #place-tabs button { flex: 1; }
.place-swatches { grid-template-columns: repeat(3, 1fr); }
.place-swatches .swatch .glyph { display: block; width: 100%; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.place-swatches .swatch .glyph.scroll { background: #fdf6e6; }
.place-swatches .swatch .glyph.object { background: #a62b1f; color: #fdf6e6; }
/* The stills (2026-09-15): where the thing has a picture — tools/stills/make-stills.sh renders
   one per model — the chip IS the picture, on a quiet ground so a pale scroll still reads.
   `contain` so nothing is ever cropped; each property on its own so the inline background-image
   the chip carries is never shorthand-wiped. Taller than a colour block in the palette; in the
   "placing" summary the .painting rule's 36px square wins on specificity and it stays square. */
i.still {
  height: 44px;
  background-color: #efe6d2;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
i.still.scroll { background-color: #e9dcc0; }
i.still.object { background-color: #e7dcc4; }
#place-count-row { margin-top: 10px; }
#place-count-row input { width: 100%; box-sizing: border-box; font: inherit; padding: 6px 8px; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.mark.element { background: #7a4a0e; border: 2px solid #2c2115; box-sizing: border-box; }
.mark.scroll { background: #fdf6e6; border: 2px solid #7a4a0e; box-sizing: border-box; border-radius: 3px; }
.mark.object { background: #a62b1f; border: 2px solid #2c2115; box-sizing: border-box; border-radius: 3px; }
.warn[data-kind='placed'] i { background: #a62b1f; }

/* The area name in the topbar is a picker (Kris, 2026-09-14): the same pill it always was,
   with the world's other areas under it. Unsaved paint is still guarded — switching is a
   navigation, so beforeunload asks first. */
.area-picker {
  font: inherit; font-size: 15px; background: var(--plum-deep); cursor: pointer;
  max-width: 32ch; appearance: none;
  padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% + 1px), calc(100% - 9px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.area-picker:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
