/* Adaptive tiles (app/tiles.js). Loaded after theme.css by the desktop and the phone. Theme tokens only.
   A block is <div class="bt"> placed on the board grid; tiles.js renderBlock() fills it with the outline SVG and its parts. */
.bt, .bt * { box-sizing: border-box; }
.bt { position: relative; min-width: 0; pointer-events: none; }
.bt-outline { position: absolute; left: 0; top: 0; overflow: visible; }
.bt-outline path { fill: var(--tile); stroke: var(--line); stroke-width: 1; pointer-events: fill; cursor: pointer; transition: stroke .2s, fill .4s; }
.bt:hover .bt-outline path { stroke: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.bt:has(.r-hero) .bt-outline path { fill: var(--cover-solid); stroke: none; }
.bt-part { position: absolute; padding: 16px; overflow: hidden; pointer-events: auto; cursor: pointer; container-type: inline-size; color: var(--ink); font: 14px/1.45 var(--sans); }
.bt-part.r-list { padding-top: 4px; }
.bt-part.r-big { padding: 13px 16px; }
.bt [hidden] { display: none !important; }
/* moving a tile: it follows the pointer above the rest; the tile it would take the place of lights up */
.bt.dragging { z-index: 5; opacity: .85; user-select: none; }
.bt.dragging .bt-part, .bt.dragging .bt-outline path { pointer-events: none; cursor: grabbing; }
.bt.drop .bt-outline path { stroke: var(--accent); stroke-width: 2; }
.bt button { font: inherit; color: inherit; cursor: pointer; }

/* header, count, summary, spotlight */
.bt-h { margin: 0 0 4px; font: 600 12.5px var(--sans); color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; }
.bt-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-i { width: 14px; height: 14px; flex: none; color: var(--dim); }
.bt-sc { margin-left: auto; font: 500 10.5px var(--mono); color: var(--dim); opacity: 0; transition: opacity .2s; }
.bt:hover .bt-sc { opacity: 1; }
.bt-big { font: 800 42px/1 var(--display); color: var(--ink); }
.bt-one { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-hrow { display: flex; align-items: flex-start; gap: 14px; margin-top: 6px; }
.bt-hrow .bt-big { font-size: 40px; flex: none; }
.bt-desc { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bt-spot { flex: none; max-width: 48%; min-width: 0; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; font-size: 13px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--tile-2)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.bt-hrow .bt-spot { margin: 0 0 0 auto; }
.bt-part > .bt-spot { max-width: none; }
.bt-spot b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-spot span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* lists, events, "All N" */
.bt-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; min-width: 0; }
.bt-row b { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bt-row span { flex: none; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-brow { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; min-width: 0; }
.bt-ev { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.bt-ev > span { font: 500 12px var(--mono); color: var(--dim); }
.bt-ev > div { min-width: 0; }
.bt-ev.now > span { color: var(--accent); }
.bt-ev b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ev small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-more { display: flex; justify-content: flex-end; padding-top: 8px; }
.bt-all { font: 600 12px var(--sans); background: var(--tile-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.bt-all:hover { background: var(--tile-3); }

/* the summary strip at the top of an opened tile */
.bt-strip { display: flex; gap: 16px; align-items: center; margin: 16px 28px 0; padding: 14px 16px; background: var(--tile-2); border: 1px solid var(--line); border-radius: 18px; font: 14px/1.45 var(--sans); }
.bt-strip:empty { display: none; }
.bt-strip .bt-big { font-size: 46px; flex: none; }
.bt-strip .bt-spot { margin: 0; max-width: 46%; }
@media (max-width: 560px) { .bt-strip { flex-wrap: wrap; margin: 12px 16px 0; } .bt-strip .bt-desc { flex-basis: 60%; } .bt-strip .bt-spot { max-width: none; flex-basis: 100%; } }

/* small tiles */
.bt-dots { display: flex; gap: 4px; margin: 8px 0 4px; flex-wrap: wrap; }
.bt-dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--line); }
.bt-dots i.on { background: var(--good); }
.bt-clear { margin-top: 2px; font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--good); }
.bt-map { position: absolute; inset: 40px 14px 12px; display: flex; gap: 14px; }
.bt-mini { flex: 1.2; min-width: 0; height: 100%; }
.bt-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); overflow: hidden; }
.bt-legend div { display: flex; align-items: center; gap: 7px; white-space: nowrap; min-width: 0; }
.bt-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.bt-legend em { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bt-legend span { margin-left: auto; color: var(--dim); font: 500 11px var(--mono); }
.bt-legend small { margin-top: auto; color: var(--dim); }

/* hero: headline + side notes (right when wide, below when narrow), buttons bottom-left */
.bt-part.r-hero { padding: 26px; display: flex; flex-direction: column; color: var(--cover-ink); }
.bt-hmain { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4px 28px; }
.bt-hmain .bt-h { grid-column: 1 / -1; color: color-mix(in srgb, var(--cover-ink) 65%, transparent); }
.r-hero .bt-i, .r-hero .bt-sc { color: color-mix(in srgb, var(--cover-ink) 50%, transparent); }
.bt-hl { grid-column: 1; margin: 4px 0 0; font: 800 clamp(28px, 6cqi, 52px)/1 var(--display); letter-spacing: -.02em; color: var(--cover-ink); }
.bt-hl i { font-weight: 700; }
.bt-side { grid-column: 2; grid-row: 2 / span 2; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; font-size: 14px; color: color-mix(in srgb, var(--cover-ink) 82%, transparent); }
.bt-side div { border-top: 1px solid color-mix(in srgb, var(--cover-ink) 18%, transparent); padding-top: 5px; }
.bt-dek { grid-column: 1; margin: 8px 0 0; max-width: 52ch; color: color-mix(in srgb, var(--cover-ink) 80%, transparent); }
.bt-acts { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; }
.bt-btn { background: var(--cover-ink); color: var(--cover-solid) !important; border: 0; border-radius: 999px; padding: 6px 13px; font-weight: 600 !important; font-size: 12.5px !important; }
.bt-btn.ghost { background: transparent; color: var(--cover-ink) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cover-ink) 40%, transparent); }
@container (max-width: 560px) {
  .bt-hmain { grid-template-columns: 1fr; }
  .bt-side { grid-column: 1; grid-row: auto; }
}
