#map-header {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
  pointer-events: none;
}
#map-header [hidden] {
  display: none !important;
}
#map-header #pin-tray {
  position: relative;
  inset: auto;
  pointer-events: none;
}
#map-header .pin-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
}
#map-header .world-heading {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: none;
  pointer-events: none;
}
#map-header .world-heading h1 { margin: 0; }
#map-header .world-heading .cs-trace-chip {
  margin: 0;
}
#map-header .edit-pins {
  pointer-events: auto;
  gap: 5px;
  font-size: 10px;
}
#map-header .edit-pins svg {
  width: 12px;
  height: 12px;
}
#map-dates {
  width: fit-content;
  pointer-events: auto;
}
#map-dates .global-time {
  margin: 0;
}
#map-dates .date-button[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
#map-header:has(.date-pop:not([hidden])),
body.panel-open #map-header:has(.date-pop:not([hidden])) {
  z-index: 45;
}
#pin-tray .edit-pins,
#pin-tray .pin-wrapper,
#pin-tray .pin-first {
  pointer-events: auto;
}
#map-header #slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
:is(#map-header, .component-pin-example) .pin-slot {
  height: 66px;
  min-height: 0;
  min-width: 0;
  padding: 7px 11px;
  box-shadow: none;
  border-radius: 6px;
}
:is(#map-header, .component-pin-example) .slot-name {
  line-height: 15px;
  font-size: 11px;
  max-width: 100%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is(#map-header, .component-pin-example) .slot-name svg {
  width: 11px;
  height: 11px;
  vertical-align: -1px;
  margin-right: 6px;
}
:is(#map-header, .component-pin-example) .slot-value:where(:not([data-figure])) {
  font-size: 21px;
  line-height: 1.12;
  margin: 2px 0 1px;
  letter-spacing: -0.75px;
}
:is(#map-header, .component-pin-example) .slot-info {
  flex: 1;
  min-width: 0;
}
:is(#map-header, .component-pin-example) .slot-corner {
  top: 6px;
  right: 8px;
}
#map-header .pin-wrapper > .info-dot {
  top: 6px;
  right: 24px;
}
:is(#map-header, .component-pin-example) .spark:where(:not(.om-component-chart svg)) {
  margin-top: 9px;
  width: 28%;
  max-width: 96px;
  max-height: 25px;
  cursor: crosshair;
}
.pin-marker {
  stroke: #ecf3e0;
  stroke-dasharray: 2 1;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}
.slot-note.showing-point {
  color: #eaf5dd;
}
.pin-minitable {
  display: grid;
  gap: 1px;
  margin: 2px 0 1px;
}
.pin-minirow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  line-height: 12px;
}
.pin-minirow span,
.pin-minirow b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-minirow span {
  color: #b1c2b6;
}
.pin-minirow b {
  color: #e5eedf;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.pin-first {
  width: max-content;
  border: 1px dashed #526a57;
  border-radius: 4px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c2d1bb;
  font-size: 11px;
}
.pin-first svg {
  width: 12px;
  height: 12px;
}

#lower-hud {
  display: flex;
  flex-direction: column;
  gap: 8px;
  bottom: 12px;
}
#lower-hud .world-tools {
  margin-bottom: 0;
}
#world-context {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  pointer-events: none;
  border-top: 1px solid #52685655;
  padding-top: 7px;
}
#world-context > * {
  position: relative;
  inset: auto;
  transform: none;
  min-width: 0;
  pointer-events: auto;
}
#world-context .canvas-wordmark {
  flex: none;
  margin-inline-end: auto;
  color: #b6b6b6;
  font: 500 16px/1 var(--ui);
  letter-spacing: -.045em;
  user-select: none;
  pointer-events: none;
}
.canvas-wordmark .wordmark-metrics {
  color: #858585;
  font-weight: 650;
}
#world-context .order-slip {
  flex: 0 1 auto;
  order: 1;
  height: 26px;
  margin: 0 0 0 auto;
  padding: 3px 7px;
  border-radius: 5px;
}
#world-context .slip-main {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #bdcbbd;
  font-size: 10px;
}
#world-context .slip-main b {
  color: #d6e6cb;
  font: 500 10px var(--mono);
}
#world-context .slip-main svg {
  width: 9px;
  height: 9px;
}
#world-context .signal-beacon {
  flex: none;
  order: 2;
  margin: 0;
}
#world-context .signal-beacon > button {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: auto;
  height: 26px;
  min-height: 0;
  padding: 3px 7px;
  border-radius: 5px;
}
#world-context .beacon-icon {
  height: 16px;
  width: 16px;
  background: transparent;
}
#world-context .beacon-icon svg {
  height: 12px;
  width: 12px;
}
#world-context .beacon-info b {
  font: 500 9px var(--mono);
  letter-spacing: 0.3px;
}
#world-context .beacon-info strong {
  display: none;
}
#world-context .signal-beacon svg:last-child {
  width: 10px;
  height: 10px;
}
#world-context .world-corner {
  order: 3;
  flex: none;
  gap: 5px;
}
#world-context .world-corner .clock,
#world-context .settings-button {
  height: 26px;
  min-height: 0;
  border-radius: 5px;
}
#world-context .settings-button {
  width: 26px;
}
@media (min-width: 751px) {
  body.panel-open #map-header {
    z-index: 6;
  }
  #drawer:not([hidden]) {
    top: max(12px, calc(var(--pin-edge, 91px) + 8px));
    bottom: max(10px, calc(var(--control-edge, 80px) + 8px));
  }
}
@media (max-width: 700px) {
  #map-header {
    top: 8px;
    gap: 4px;
  }
  #map-header #slots {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(145px, 42%);
    grid-template-rows: repeat(var(--pin-rows, 1), 54px);
    gap: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  #map-header .pin-wrapper {
    min-width: 0;
  }
  :is(#map-header, .component-pin-example) .pin-slot {
    height: 54px;
    padding: 5px 7px;
  }
  :is(#map-header, .component-pin-example) .slot-name {
    font-size: 10px;
    line-height: 11px;
  }
  :is(#map-header, .component-pin-example) .slot-value {
    font-size: 16px;
  }
  :is(#map-header, .component-pin-example) .slot-note {
    font-size: 8px;
  }
  #map-header .pin-wrapper > .info-dot {
    display: none;
  }
  :is(#map-header, .component-pin-example) .pin-minirow {
    font-size: 9px;
    line-height: 10px;
  }
  #world-context {
    gap: 5px;
  }
  #world-context .order-slip {
    display: none;
  }
  #map-header .world-heading h1 {
    font-size: 14px;
  }
}
@media (max-width: 500px) {
  #lower-hud {
    gap: 6px;
  }
}

@media (max-height: 750px) and (min-width: 701px) {
  #map-header {
    top: 8px;
  }
  :is(#map-header, .component-pin-example) .pin-slot {
    height: 57px;
    padding: 5px 10px;
  }
  :is(#map-header, .component-pin-example) .slot-value {
    font-size: 18px;
  }
}
.pin-minirow[data-mini-row]:hover {
  color: #edf7e9;
  text-decoration: underline;
}

/* Explicit cell spans preserve the same 4 × 3 tray when a reading grows. */
#map-header #slots {
  --pin-unit: 66px;
  grid-auto-rows: var(--pin-unit);
}
#map-header #slots:has(.pin-first) {
  grid-auto-rows: auto;
}
:is(#map-header, .component-pin-example) .pin-wrapper > .pin-slot {
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #53695785;
  cursor: pointer;
}
:is(#map-header, .component-pin-example) .pin-wrapper > .pin-slot:focus-visible,
.pin-minirow:focus-visible,
.pin-resize:focus-visible {
  outline: 2px solid #b6d6a6;
  outline-offset: -2px;
}
#map-header .pin-resize {
  position: absolute;
  z-index: 2;
  bottom: 1px;
  right: 1px;
  width: 20px;
  height: 20px;
  padding: 3px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #9daea0;
  border: none;
  border-radius: 4px;
  cursor: nwse-resize;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.12s;
}
#map-header .pin-wrapper:hover .pin-resize,
#map-header .pin-wrapper:focus-within .pin-resize,
body:has(#drawer:not([hidden]) .dashboard-editor) #map-header .pin-resize,
#map-header .pin-sizing .pin-resize {
  opacity: 1;
}
#map-header .pin-size-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  width: 160px;
  box-sizing: border-box;
  padding: 9px;
  background: #17241d;
  color: #dfebde;
  border: 1px solid #6b816e;
  border-radius: 7px;
  box-shadow: 0 8px 20px #07120c66;
  font-size: 11px;
}
#map-header:has(.pin-size-menu),
#slots:has(.pin-size-menu) {
  z-index: 45;
}
.pin-wrapper:has(.pin-size-menu) {
  z-index: 3;
}
.pin-size-menu > b {
  display: block;
  font-weight: 550;
  margin-bottom: 7px;
}
.pin-size-menu > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.pin-size-menu button {
  background: #27382c;
  border: 1px solid #405442;
  color: #d8e5d5;
  border-radius: 3px;
  font-size: 10px;
  padding: 4px;
}
.pin-size-menu button[aria-pressed="true"] {
  background: #496342;
  color: #fff;
}
.pin-size-menu button:disabled {
  opacity: 0.35;
}
.pin-size-menu .pin-undo {
  margin-top: 6px;
  width: 100%;
}
#map-header .pin-sizing {
  z-index: 5;
}
.pin-sizing > .pin-slot {
  outline: 2px solid #a0c995;
  outline-offset: -2px;
}
.pin-sizing.blocked > .pin-slot {
  outline-color: #dfab7e;
}
.pin-sizing::after {
  content: attr(data-preview);
  position: absolute;
  right: 21px;
  bottom: 4px;
  padding: 2px 5px;
  background: #b2d29f;
  color: #1a2c1f;
  border-radius: 4px;
  pointer-events: none;
  font: 10px var(--mono);
}
.pin-sizing.blocked::after {
  background: #e6bf97;
}
:is(#map-header, .component-pin-example) .enlarged > .pin-slot {
  align-items: stretch;
  padding-bottom: 7px;
  gap: 12px;
}
:is(#map-header, .component-pin-example) .enlarged > .pin-slot > .slot-info {
  align-self: flex-start;
  flex: 0 1 34%;
  max-width: 40%;
}
:is(#map-header, .component-pin-example) .enlarged.records > .pin-slot > .slot-info {
  flex: 1 1 100%;
  max-width: 100%;
}
:is(#map-header, .component-pin-example) .enlarged .slot-name {
  padding-right: 42px;
  box-sizing: border-box;
}
:is(#map-header, .component-pin-example) .enlarged.records .slot-note {
  padding-right: 94px;
}
:is(#map-header, .component-pin-example) .pin-plot {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 2px 32px 1px 0;
  gap: 1px;
}
:is(#map-header, .component-pin-example) .pin-plot .spark.pin-chart {
  max-width: none;
  max-height: none;
  margin: 0;
  flex: 1;
  min-height: 14px;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.pin-plot-axis {
  stroke: #52665a;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.pin-plot-key,
.pin-plot-range {
  display: flex;
  gap: 6px;
  color: #aec4b0;
  font-size: 9px;
  line-height: 1.1;
}
.pin-plot-key {
  flex-wrap: wrap;
}
.pin-plot-key i {
  display: inline-block;
  width: 8px;
  height: 2px;
  vertical-align: middle;
  margin-right: 3px;
}
.pin-plot-range {
  justify-content: space-between;
  color: #91a495;
  font-variant-numeric: tabular-nums;
}
:is(#map-header, .component-pin-example) .enlarged:not(.records)[data-span^="1x"] > .pin-slot {
  flex-direction: column;
  gap: 4px;
}
:is(#map-header, .component-pin-example) .enlarged:not(.records)[data-span^="1x"] .slot-info {
  max-width: 100%;
  flex: none;
  width: 100%;
}
:is(#map-header, .component-pin-example) .enlarged:not(.records)[data-span^="1x"] .pin-plot {
  padding-right: 14px;
}
.pin-minirow,
.pin-table-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(
      var(--read-cols, 1),
      minmax(0, 1fr)
    );
  gap: 5px;
}
.pin-minirow {
  cursor: pointer;
}
.pin-minirow > b,
.pin-table-head > span:not(:first-child) {
  text-align: right;
}
.pin-minirow > *:not(i) {
  position: relative;
}
.pin-record-bar {
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 0;
  background: #a6ce9c24;
  border-left: 2px solid #98c58b;
}
.pin-table-head {
  font-size: 8px;
  letter-spacing: 0.02em;
  color: #9fb2a3;
  line-height: 10px;
  border-bottom: 1px solid #54675b;
}
.pin-table-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-wrapper.enlarged .pin-minitable {
  margin-top: 4px;
}
.pin-wrapper.enlarged .pin-minirow {
  line-height: 14px;
  min-height: 14px;
}
.pin-pages {
  position: absolute;
  bottom: 4px;
  right: 22px;
  display: flex;
  gap: 4px;
  align-items: center;
  color: #afc3b2;
  font: 9px var(--mono);
}
.pin-pages button {
  border: 0;
  display: grid;
  place-items: center;
  line-height: 13px;
  min-width: 18px;
  padding: 0 3px;
  background: #314137;
  color: #e3efda;
  border-radius: 3px;
  cursor: pointer;
}
.pin-pages button:disabled {
  opacity: 0.38;
  cursor: default;
}
@media (max-height: 750px) and (min-width: 701px) {
  #map-header #slots {
    --pin-unit: 57px;
  }
  .pin-wrapper.enlarged .pin-minirow {
    min-height: 12px;
    line-height: 12px;
  }
  :is(#map-header, .component-pin-example) .enlarged .slot-info {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  #map-header #slots {
    --pin-unit: 54px;
    grid-auto-flow: row;
    grid-template-rows: repeat(var(--pin-rows, 1), var(--pin-unit));
    grid-auto-columns: minmax(145px, 42%);
  }
  #map-header .pin-size-menu {
    position: fixed;
    right: var(--pad);
    top: calc(var(--pin-edge, 95px) + 3px);
  }
  .pin-wrapper.enlarged .pin-minirow {
    min-height: 11px;
    line-height: 11px;
  }
  :is(#map-header, .component-pin-example) .pin-plot-key {
    font-size: 8px;
  }
}
:is(#map-header, .component-pin-example) .enlarged:not(.records):not([data-span^="1x"]) .slot-name {
  padding-right: 0;
}
:is(#map-header, .component-pin-example) .enlarged .slot-note.showing-point {
  position: absolute;
  bottom: 2px;
  left: 7px;
  right: 16px;
  padding: 2px 3px;
  background: #1a281f;
  color: #dfefdd;
  border-radius: 3px;
  z-index: 1;
  font-size: 10px;
  white-space: normal;
  text-wrap: pretty;
  line-height: 1.2;
}
#map-header .pin-size-menu.at-pointer {position:fixed;right:auto;bottom:auto;margin:0;max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);overflow:auto}
.pin-flow {display:grid;grid-template-columns:minmax(0,1.55fr) minmax(36px,1.3fr) minmax(0,1fr);min-width:0;gap:5px}
.pin-flow-sources {display:grid;align-content:start;grid-auto-rows:14px;min-width:0}
.pin-flow-source {display:flex;gap:4px;align-items:center;cursor:pointer;color:#d8e7d6;font-size:10px;min-width:0}
.pin-flow-source>span,.pin-flow-outcomes>span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.pin-flow-source i {width:5px;height:5px;border-radius:50%;flex:none}
.pin-flow-source b {margin-left:auto;font-variant-numeric:tabular-nums;font-weight:550}
.pin-flow svg {height:100%;width:100%;min-height:0;overflow:visible}
.pin-flow svg g {cursor:pointer}
.pin-flow-outcomes {position:relative;color:#d5e3d4;font-size:10px}
.pin-flow-outcomes>span {position:absolute;left:0;right:0;transform:translateY(-50%);border-left:3px solid #a7c29d;padding-left:5px}
.pin-flow {--edge-line:14px;height:calc(var(--edge-count) * var(--edge-line));grid-template-rows:minmax(0,1fr);align-items:stretch}
.pin-flow-sources {grid-template-rows:repeat(var(--edge-count),minmax(0,1fr));grid-auto-rows:auto}
.pin-flow svg {align-self:stretch;min-width:0}
@media (max-height:750px),(max-width:700px){.pin-flow {--edge-line:12px}}

/* The same pinned readings supply the tray and the resizable dashboard wells. */
html[data-frame="v2"] {
  #map-header {
    position: absolute; inset: var(--frame-top) var(--gutter) auto;
    display: flex; flex-direction: column; gap: 0; z-index: var(--z-frame);
    pointer-events: none; font-family: var(--font-ui);
  }
  &[data-window="windowed"]:not([data-uniform-margin]) #map-header { top: var(--frame-top-windowed); }
  #map-header #pin-tray {
    position: relative; inset: auto; width: 100%; padding: 0; margin: 0; pointer-events: auto;
    border: 0; border-radius: var(--radius-sheet); overflow: clip;
    background: color-mix(in srgb, var(--table) var(--tray-alpha), transparent);
    box-shadow: var(--sheet-edge), var(--raise-1);
  }
  #map-header #slots {
    display: grid; gap: 0; width: 100%; min-width: 0; min-height: 0; padding: 0;
    --pin-unit: var(--tray-height); grid-auto-rows: var(--tray-height);
  }
  #map-header #slots .pin-wrapper {
    position: relative; min-width: 0; height: var(--tray-height); overflow: hidden;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; pointer-events: auto;
  }
  #map-header #slots .pin-wrapper + .pin-wrapper { border-inline-start: 1px solid var(--rule); }
  #map-header .om-pin-content { height: 100%; min-width: 0; }
  #map-header .om-pin-content > .om-component {
    width: 100%; max-width: none; min-width: 0; margin: 0; border: 0; border-radius: 0;
    box-shadow: none; background: transparent; color: var(--paper);
    font-family: var(--font-ui); font-variant-numeric: tabular-nums;
  }
  #slots .om-pin-content > [data-size="tile"] {
    display: grid; align-content: center;
    height: 100%; padding: var(--space-2) var(--space-4); text-align: start;
  }
  #slots .om-component .slot-value {
    margin: 0; color: var(--paper);
    font: var(--weight-medium) var(--figure-medium)/var(--leading-tight) var(--font-figure);
    letter-spacing: var(--tracking-figure);
  }
  /* D7: the lead steps down only on a page with a reading of its own; the full dashboard keeps it (D66: the tiles do not move). */
  &:is(:not([data-page]), [data-page="dashboard"]) #slots .om-component[data-lead] .slot-value { font-size: var(--figure-lead); }
  #slots .om-component-chart .spark { margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; }
  #map-header #slots .om-pin-content button:focus-visible { outline: 2px solid var(--lamp-ink); outline-offset: -3px; }
  #map-header .pin-titlebar {
    display: flex; align-items: center; justify-content: start; gap: var(--space-3);
    min-width: 0; min-height: var(--line-height); margin: var(--line-gap) 0 0 var(--space-1);
    padding: 0; padding-inline-end: 145px; pointer-events: none;
  }
  #map-header .pin-titlebar > * { pointer-events: auto; }
  #map-header .world-heading { position: static; display: flex; align-items: center; margin: 0; min-width: 0; }
  #map-header .world-heading h1 { font: var(--weight-strong) var(--text-note)/var(--leading-ui) var(--font-ui); color: var(--paper); letter-spacing: normal; }
  #map-header .ws-current {
    display: inline-flex; align-items: center; gap: var(--space-1); padding: 0; min-height: var(--control-m);
    border: 0; border-radius: var(--radius-control); background: transparent; box-shadow: none;
    color: var(--paper); font: inherit;
  }
  #map-header .ws-current svg { color: var(--paper-3); }
  #map-header .ws-kind { color: var(--paper-3); padding: 0 var(--space-1); border: 1px solid var(--rule-strong); font: var(--text-small)/var(--leading-ui) var(--font-ui); text-transform: none; letter-spacing: normal; }
  &[data-theme="light"] #map-header .ws-kind { color: var(--paper-2); }
  #map-dates { position: relative; }
  #map-header #map-dates .date-button {
    min-height: var(--control-s); gap: var(--space-2); padding: 0 var(--space-2);
    border: 1px solid var(--rule-strong); border-radius: var(--radius-control); box-shadow: none;
    background: var(--table); color: var(--paper-2); font: var(--weight-medium) var(--text-small)/var(--leading-ui) var(--font-ui);
  }
  #map-header #map-dates .date-button svg { color: var(--lamp-ink); }
  #map-header #map-dates .date-button svg:last-child { color: var(--paper-3); }
  #map-header #map-dates .date-button:is(:hover,[aria-expanded="true"]) { background: var(--well); color: var(--paper); }
  #map-header :is(.date-button,.ws-current,.edit-pins,#frame-tab):focus-visible { outline: 0; box-shadow: var(--focus-ring); }
  .frame-tab-row { position: absolute; top: calc(var(--tray-height) - 1px); inset-inline-end: var(--space-4); z-index: 1; display: flex; align-items: start; gap: var(--space-2); pointer-events: auto; }
  #frame-tab { position: static; white-space: nowrap; box-shadow: var(--raise-1); }
  #frame-tab::after { content: ""; display: inline-block; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); margin: 0 var(--space-1) 3px var(--space-2); }
  #frame-tab::after { transition: transform var(--dur-move) var(--ease-out); }
  &[data-page]:not([data-folding]) #frame-tab::after { transform: rotate(225deg); margin-bottom: 0; }
  #map-header .edit-pins { display: none; }
  &[data-page] #map-header .edit-pins { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-s); padding: 0 var(--space-2); color: var(--paper-2); font: var(--text-small)/var(--leading-ui) var(--font-ui); background: var(--table); border-radius: var(--radius-control); }
  /* D66: the full dashboard is the band's own sheet grown down to just above the footer, with
     room under its lower edge for the tab row, which rides that edge: "Edit dashboard" and "Back
     to canvas" hang together at its lower right. The tiles and the quiet line stay where they are. */
  &[data-page="dashboard"] {
    --dash-top: calc(var(--frame-top) + var(--tray-height));
    /* om-okzk7 (3): the sheet runs down to just above the dock and the tab row sits INSIDE its lower right corner (the
       body keeps that room free), never hanging below the edge. */
    --dash-bottom: calc(var(--frame-bottom) + var(--dock-height) + var(--space-2));
    --dash-tabs: calc(25px + var(--space-2));
  }
  &[data-page="dashboard"][data-window="windowed"]:not([data-uniform-margin]) { --dash-top: calc(var(--frame-top-windowed) + var(--tray-height)); }
  &[data-page="dashboard"] #map-header #pin-tray { background: var(--table); }
  &[data-page="dashboard"] #map-header .pin-titlebar { position: relative; z-index: 1; }
  &[data-page="dashboard"] .frame-tab-row {
    position: fixed; top: calc(100dvh - var(--dash-bottom) - var(--dash-tabs)); inset-inline-end: calc(var(--gutter) + var(--sheet-inset));
  }
  &[data-page="dashboard"] #map-header .edit-pins {
    min-height: 25px; padding: 0 var(--space-3); border: 1px solid var(--rule); border-top: 0;
    border-top: 1px solid var(--rule); border-radius: var(--radius-control); font-weight: var(--weight-medium); box-shadow: var(--raise-1);
  }
  &[data-page="dashboard"] #map-header .edit-pins:hover, &[data-page="dashboard"] #frame-tab:hover { color: var(--paper); }
  &[data-page="dashboard"] #frame-page {
    inset: var(--dash-top) var(--gutter) var(--dash-bottom); box-shadow: var(--raise-2), inset 0 1px 0 var(--rule);
  }
  &[data-page="dashboard"] #frame-page > .om-sheet { padding-top: calc(var(--line-gap) + var(--line-height)); background: transparent; }
  &[data-page="dashboard"] #frame-page .om-sheet-body { padding: var(--space-2) var(--sheet-inset) var(--sheet-inset); margin-block-end: var(--dash-tabs); }
  &[data-page="dashboard"] #frame-page .om-dashboard-wells {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    --pin-unit: max(200px, calc((100dvh - var(--dash-top) - var(--dash-bottom) - var(--line-gap) - var(--line-height) - var(--space-2) - var(--space-3) - 2 * var(--space-2)) / 3));
  }
  /* The canvas behind stops taking the pointer from the click, not when the edge has passed. */
  &[data-page="dashboard"] :is(#scene, #world-cards) { pointer-events: none; }
  /* om-ne5d7 (5): once the sheet is down the canvas behind it is hidden, so none of it shows under the sheet's lower edge
     (it rests there anyway: scene.js setCovered); it shows again at once as the sheet folds. */
  &[data-page="dashboard"]:not([data-folding]) :is(#scene, #world-cards) { visibility: hidden; transition: visibility 0s linear var(--dur-move, 240ms); }
  #frame-page {
    position: fixed; inset: calc(var(--pin-edge) + var(--space-1)) var(--gutter) calc(var(--frame-bottom) + var(--dock-height) + var(--dock-near));
    min-height: 0; pointer-events: auto; background: var(--table); border-radius: 0 0 var(--radius-sheet) var(--radius-sheet);
    box-shadow: var(--raise-2); overflow: hidden;
  }
  #frame-page > .om-sheet { min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  #frame-page .om-sheet-head { flex: none; }
  #frame-page .om-sheet-body { overflow: auto; }
  #frame-page:has(.om-dashboard-wells) .om-sheet-head {
    position: absolute; width: 1px; height: 1px; min-height: 0; clip-path: inset(50%); overflow: hidden;
  }
  #frame-page:has(.om-dashboard-wells) .om-sheet-head button { display: none; }
  #frame-page .om-dashboard-wells {
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-2);
    align-content: start; --pin-unit: max(224px, calc((100dvh - var(--pin-edge) - var(--dock-height) - var(--space-10) - var(--space-8)) / 3));
  }
  #frame-page .om-dashboard-wells > .pin-wrapper { position: relative; min-width: 0; overflow: visible; background: var(--well); border: 1px solid var(--rule); border-radius: var(--radius-well); }
  #frame-page .om-pin-content { overflow: hidden; border-radius: inherit; }
  #frame-page .om-pin-content > .om-component { height: 100%; min-height: 0; max-height: none; padding: var(--space-3); }
  #frame-page .pin-handle { z-index: 1; }
  #frame-page .pin-size-menu { z-index: var(--z-tip); }
  #frame-page .pin-wrapper:has(.pin-size-menu) { z-index: 2; }
  &[data-page] #pin-tray { border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; }
  &[data-page]:not([data-page="dashboard"]) #map-header .pin-titlebar { background: var(--table); margin-left: 0; margin-top: 0; padding: var(--space-1) var(--space-3); }
}

html[data-frame="v2"] #frame-page .slot-value { font-size: var(--figure-medium); }

/* om-2rhwo (4): the tiles the band cannot hold are on the Full dashboard; its tab says how many more ("+2"), after its
   words and before its chevron (::after). */
#frame-tab[data-more] { display: inline-flex; align-items: center; }
#frame-tab[data-more]::before {
  content: attr(data-more);
  order: 1;
  margin-inline-start: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-variant-numeric: tabular-nums;
}
#frame-tab[data-more]::after { order: 2; }

/* om-fvtqd.15: the Full dashboard's default sections (dashboard-page.js). Each section: its question with the sources it
   blends, over twelve columns of the components that answer it (the lead six columns by two rows). The row unit lets the
   first screen at 1440 by 900 hold the first section whole and the next section's question. Never the top row again. */
html[data-frame="v2"] #frame-page {
  .om-dashboard-section { display: grid; gap: var(--space-2); margin-block-end: var(--space-6); }
  .om-dashboard-section[data-dashboard-stats] { margin-block-end: var(--space-5); }
  .om-dashboard-section[hidden] { display: none; }
  .om-dashboard-heading { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; padding-inline: 2px; }
  .om-dashboard-heading .om-dashboard-question { margin: 0; font-size: var(--text-voice); line-height: 1.3; font-weight: var(--weight-medium); color: var(--paper); letter-spacing: 0; }
  .om-dashboard-sources { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); min-width: 0; color: var(--paper-3); font-size: var(--text-small); }
  .om-dashboard-source { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
  .om-dashboard-source + .om-dashboard-source::before { content: "·"; margin-inline-end: var(--space-2); opacity: .6; }
  /* om-75w8p (1, 4): each place is where the sizing rule puts it (readings/dashboard-defaults.js sectionLayout, drawn by
     dashboard-page.js): its first column and span of twelve, its top and its height, set on the card as --place-*. One
     gutter across and down (the grid's column-gap, which the layout reads), so every card sits on one grid at any width. */
  .om-dashboard-sections { display: block; --dashboard-gap: var(--space-3); }
  .om-dashboard-grid { position: relative; display: block; column-gap: var(--dashboard-gap); block-size: var(--grid-height, auto); }
  .om-dashboard-card {
    /* One part of the line and its gutter: a twelfth of the page (or, for a line of figures, one of --place-of parts). */
    --place-step: calc((100% + var(--dashboard-gap)) / var(--place-of, 12));
    position: absolute; box-sizing: border-box; min-width: 0; min-height: 0;
    inset-inline-start: calc(var(--place-step) * (var(--place-column, 1) - 1));
    inset-block-start: var(--place-top, 0px);
    inline-size: calc(var(--place-step) * var(--place-span, 12) - var(--dashboard-gap));
    block-size: var(--place-height, 296px);
    background: var(--well); border: 1px solid var(--rule); border-radius: var(--radius-well); overflow: hidden;
  }
  .om-dashboard-card-face { height: 100%; min-height: 0; }
  /* om-75w8p (3): a figure's quiet line keeps one line; its whole words are its hover (dashboard-page.js sets the title). */
  .om-dashboard-card[data-place="figure"] :is(.om-qualifier, .om-qualifier[data-leaves-out], .om-state-copy) { display: block; max-inline-size: 100%; overflow: hidden; white-space: nowrap; text-wrap: nowrap; text-overflow: ellipsis; }
  /* A figure whose quiet line names what it leaves out says it once: that line is the door to Costs (anatomy.js
     data-leaves-out), so the notice that says it again in a sentence is not drawn on a figure here (its panel keeps it). */
  .om-dashboard-card[data-place="figure"] .om-component:has(.om-qualifier[data-leaves-out]) .om-state-copy { display: none; }
  .om-dashboard-card-face > .om-component { border: 0; border-radius: inherit; box-shadow: none; }
  /* A card here is as wide and tall as its place: the canvas's hand-size bounds (tokens.css --card-min-* and --card-max-*,
     read by system/component.css) do not apply. Those names are tokens.css's alone (design-tokens.test.mjs), so the
     sizes they bound are set here instead. */
  .om-dashboard-card .om-component[data-size="card"] { min-inline-size: 0; min-block-size: 0; }
  .om-dashboard-card .om-component[data-size="card"][data-sized-width] { inline-size: var(--om-card-width); max-inline-size: none; }
  .om-dashboard-card .om-component[data-size="card"][data-sized-height] { block-size: var(--om-card-height); }
  .om-dashboard-card-remove {
    position: absolute; top: 8px; inset-inline-end: 34px; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px;
    border: 0; border-radius: 6px; background: transparent; color: var(--paper-3); opacity: 0; cursor: pointer;
  }
  .om-dashboard-card:is(:hover, :focus-within) .om-dashboard-card-remove { opacity: 1; }
  .om-dashboard-card-remove:hover { background: color-mix(in srgb, currentColor 12%, transparent); color: var(--paper); }
  .om-dashboard-more {
    display: block; margin: var(--space-1) 0 var(--space-2); padding: 0 2px; border: 0; background: none; color: var(--paper-3);
    font: inherit; font-size: var(--text-small, 12px); text-align: start; cursor: pointer;
  }
  .om-dashboard-more:hover { color: var(--paper); text-decoration: underline; }
  .om-dashboard-saved .om-dashboard-wells { margin: 0; }
  /* om-ne5d7 (2): a card is lifted by its head (dashboard-page.js); the other places light as targets, the one under the
     pointer in the lamp's edge and wash (the chosen item, tokens.css); a card let go elsewhere slides back to its place. */
  .om-dashboard-card .om-component-heading { cursor: grab; }
  .om-dashboard-sections[data-arranging], .om-dashboard-sections[data-arranging] * { cursor: grabbing; user-select: none; -webkit-user-select: none; }
  .om-dashboard-card[data-lifted] { z-index: 3; box-shadow: var(--raise-3); border-color: var(--rule-strong); opacity: .94; }
  .om-dashboard-card[data-drop-target] { outline: 1px dashed var(--rule-strong); outline-offset: -1px; }
  .om-dashboard-card[data-drop-over] { outline: 2px solid var(--lamp-edge); outline-offset: -2px; background: color-mix(in srgb, var(--lamp-wash) 60%, var(--well)); }
  .om-dashboard-card[data-returning] { transition: translate var(--dur-move, 240ms) var(--ease-out, ease-out); }
  /* (5) The card's 'Updating' and 'as of' badge sits on its top edge on the canvas; a place here clips its edge, so the
     badge sits just inside it, clear of the remove and open controls. */
  :is(.om-dashboard-card, .om-pin-content) .om-component[data-state="refreshing"]::after,
  :is(.om-dashboard-card, .om-pin-content) .om-last-shown { inset-block-start: 7px; inset-inline-end: 62px; translate: none; }
}
@media (prefers-reduced-motion: reduce) { html[data-frame="v2"] #frame-page .om-dashboard-card[data-returning] { transition: none; } }
