/* The town picture with a data panel under each row of buildings. Tokens from ui/theme.css. */
:root { --panel: var(--primary); }
.town { margin-bottom: 40px; }
.town-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.town-head h2 { margin: 0; }
.town-head .legend { margin: 0; }
.town-art { position: relative; container-type: inline-size; border-radius: var(--r-lg); overflow: hidden; background: var(--blush); }
.town-pic { position: relative; }
.town-art img { display: block; width: 100%; height: auto; }
.tpanel { position: absolute; left: var(--l); width: var(--w); top: var(--t); height: var(--h); background: var(--panel); color: #fff;
  font-size: clamp(9px, 0.95cqw, 13px); line-height: 1.3; }
.tpanel.sub { color: #fff; margin: 0; font-size: clamp(9px, 0.95cqw, 13px); left: 2.6%; width: 17%; top: 61%; height: 19%; border-radius: var(--r-sm); padding: 0.9cqw 1cqw; display: flex; flex-direction: column; gap: 0.15cqw; }
.tpanel.sub.down { background: #7A2A35; }
.tcell { position: absolute; top: 0; bottom: 0; left: var(--x); width: 11cqw; transform: translateX(-50%); padding: 0.8cqw 0.4cqw;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.15cqw; cursor: default; }
.c-name { font-weight: 700; font-size: 1.05em; white-space: nowrap; }
.c-kw { font-weight: 700; font-variant-numeric: tabular-nums; }
.c-sub { opacity: 0.82; font-size: 0.9em; }
.c-sub.warn { opacity: 1; color: #FFD27A; font-weight: 600; }
.c-pill { align-self: center; font-size: 0.85em; font-weight: 700; padding: 0.1em 0.75em; border-radius: var(--r-pill); background: #fff; color: var(--panel); }
.tpanel.sub .c-pill, .tpanel.sub .c-name { align-self: flex-start; }
.c-pill.trim { background: #FFE3A1; color: var(--s-trim-ink); }
.c-pill.local { background: #FFD1AE; color: var(--s-backup-ink); }
.c-pill.off { background: #FFC9CC; color: var(--s-off-ink); }
.c-pill.switch { background: #E6E3EE; color: var(--ink); }
.bmark { position: absolute; pointer-events: none; border-radius: 6px; }
.bmark i { position: absolute; top: -0.4cqw; right: -0.4cqw; width: 1.3cqw; height: 1.3cqw; min-width: 9px; min-height: 9px; border-radius: 50%;
  border: 2px solid var(--blush); background: var(--s-grid); }
.bmark.trim i { background: var(--s-trim); }
.bmark.local i { background: var(--s-backup); }
.bmark.switch i { background: var(--muted); }
.bmark.off i { background: var(--s-off); }
.bmark::before { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  backdrop-filter: grayscale(1) brightness(0.75); -webkit-backdrop-filter: grayscale(1) brightness(0.75); }
.bmark.off::before { opacity: 1; }
.bmark.local { box-shadow: 0 0 0 2px color-mix(in srgb, var(--s-backup) 70%, transparent); }
.town-note { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--muted); }

@media (max-width: 700px) {
  .town-art { overflow: visible; background: none; }
  .town-art img { border-radius: var(--r-md); background: var(--blush); }
  .tpanel, .tpanel.sub { position: static; width: auto; height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    background: none; color: var(--ink); font-size: var(--fs-xs); margin-top: 8px; padding: 0; }
  .tpanel.sub { display: flex; background: var(--panel); color: #fff; padding: 10px 12px; }
  .tpanel.sub.down { background: #7A2A35; }
  .tcell { position: static; transform: none; width: auto; background: var(--panel); color: #fff; padding: 10px 8px; border-radius: var(--r-sm); gap: 2px; }
}
.town-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 12px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.town-legend li { display: flex; align-items: center; gap: 7px; }
.town-legend .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
