/* The board of charts at the top of the top page (board.js): the six blocks as tiles, the block
   picked among them as one large chart, and that block's areas as tiles of their own.
   Red is a rise and blue a fall, as on the map's week-on-week colours; every figure also carries
   its sign, so the colour is never the only word. The two are a pair checked for colour-blind
   readers on each ground (light #ad3d2b / #2d659b, dark #e2695c / #5a9ad6). */
.board { --b-up: #ad3d2b; --b-down: #2d659b; --b-flat: #8a9792; --b-quiet: #b9c6c3; --b-bar: #d5dedc; --b-bar-on: #9aaba8;
  --b-grid: #e3eae6; --b-rule: #c9d5d3; --b-axis: #6d837b; --b-ink: #173839; --b-sub: #607777; --b-card: #fff; --b-line: #d9e3e2;
  --b-soft: #e6edec; --b-seg-on: #fff; --b-side: #fbfcfc; --b-pill-ink: #fff; --b-accent: #087c6a; --b-way: var(--b-flat);
  margin-bottom: 48px; }
.board[hidden] { display: none; }
:root[data-theme="dark"] .board { --b-up: #e2695c; --b-down: #5a9ad6; --b-flat: #7d928c; --b-quiet: #4a5f59; --b-bar: #2c403a; --b-bar-on: #56706a;
  --b-grid: #24362f; --b-rule: #34493f; --b-axis: #9db3ad; --b-ink: #e5efec; --b-sub: #9db3ad; --b-card: #15241f; --b-line: #2a3d38;
  --b-soft: #1b2d28; --b-seg-on: #34493f; --b-side: #13211d; --b-pill-ink: #0f1b19; --b-accent: #3fb59d; }
.board .is-up { --b-way: var(--b-up); }
.board .is-down { --b-way: var(--b-down); }
.board .is-flat, .board .is-none { --b-way: var(--b-flat); }

/* The board is drawn once data.js has been read, a moment after the page itself. Until then its
   room is kept, so that the map and the tables below are not drawn first and pushed down when it
   arrives: the height it had last time in a window this wide where the page knows one (the script
   beside the board in index.html), or else these, measured for the opening board (23区, 13 weeks)
   on 2026-11-21. Measure them again when the board's layout changes, and give the height kept in
   the browser a new name (souba-board-box-2, in board.js and in index.html), so that one kept
   for the old layout is not used for the new. */
#boardBody:empty { min-height: 1323px; }
#boardBody:empty::before { content: "チャートを読み込んでいます"; display: block; padding-top: 4px; color: var(--b-sub); font-size: 13px; }
@media (pointer: coarse) { #boardBody:empty { min-height: 1374px; } }
@media (max-width: 1100px) { #boardBody:empty { min-height: 2028px; } }
@media (max-width: 1100px) and (pointer: coarse) { #boardBody:empty { min-height: 2066px; } }
@media (max-width: 780px) { #boardBody:empty { min-height: 2251px; } }
@media (max-width: 780px) and (pointer: coarse) { #boardBody:empty { min-height: 2289px; } }
/* A phone 360 to 430px wide; what is pressed is taller for a finger. */
@media (max-width: 560px) { #boardBody:empty { min-height: 3074px; } }
@media (max-width: 560px) and (pointer: coarse) { #boardBody:empty { min-height: 3142px; } }

.board-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "lead date map" "title date map"; align-items: end; column-gap: 16px; margin-bottom: 16px; }
.board-heading .eyebrow { grid-area: lead; }
.board-heading h2 { grid-area: title; margin: 0; color: var(--b-ink); font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
/* The date is written by board.js; its line is there from the start, so that writing it moves nothing. */
.board-heading .snapshot-date { grid-area: date; min-height: 1.6em; }
/* The way to the map, which stands below the board on the same page (#map): a button at the top
   of the page, so that the map is known to be there before the board has been scrolled past. */
.board-map { grid-area: map; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 10px; color: #fff; background: #087c6a; font-size: 14px; font-weight: 700; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.board-map:hover { background: #066857; }
.board-map svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board-map span { font-weight: 500; }
@media (pointer: coarse) { .board-map { min-height: 44px; } }
/* Where it arrives: the map's own heading a little under the top of the screen. */
#map { scroll-margin-top: 16px; }
.board-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.board-controls-note { color: var(--b-sub); font-size: 13px; }

/* A choice among a few: the period the change is measured over, and the order of the areas. */
.b-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--b-soft); }
.b-seg button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; color: var(--b-sub); background: none; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.b-seg button:hover { color: var(--b-ink); }
.b-seg button[aria-pressed="true"] { color: var(--b-ink); background: var(--b-seg-on); font-weight: 700; box-shadow: 0 1px 2px rgba(23,56,57,.14); }
:is(.b-seg button, .b-tile, .b-map-link, .b-town-link, .b-mover, .b-hero-up, .b-chart, .board-map, .b-hero-top h3):focus-visible { outline: 2px solid var(--b-accent); outline-offset: 2px; }
@media (pointer: coarse) { .b-seg button { min-height: 40px; } }

/* The change over the period, on its direction's colour. */
.b-pill { flex: none; display: inline-block; min-width: 58px; padding: 0 7px; border-radius: 7px; color: var(--b-pill-ink); background: var(--b-way); font-size: 13px; font-weight: 700; line-height: 23px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-pill.is-flat, .b-pill.is-none { color: var(--b-sub); background: var(--b-soft); }

.b-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.b-blocks { margin-bottom: 14px; }
.b-tile { display: block; min-width: 0; width: 100%; padding: 12px 12px 10px; border: 1px solid var(--b-line); border-radius: 12px; color: var(--b-ink); background: var(--b-card); font: inherit; line-height: 1.6; text-align: left; text-decoration: none; cursor: pointer; }
.b-tile > span { display: block; }
.b-tile:hover { border-color: #9fc2bb; }
.b-tile[aria-pressed="true"] { border-color: var(--b-accent); box-shadow: inset 0 0 0 1px var(--b-accent); }
/* An area with neither a line to chart nor a town map: its tile is not for pressing. */
.b-tile.is-still { cursor: default; }
.b-tile.is-still:hover { border-color: var(--b-line); }
:root[data-theme="dark"] .b-tile:hover { border-color: #3f6259; }
:root[data-theme="dark"] .b-tile[aria-pressed="true"] { border-color: var(--b-accent); }
:root[data-theme="dark"] .b-tile.is-still:hover { border-color: var(--b-line); }
.b-tile .b-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
/* A ward of a city is written after its city, set small (横浜市 港北区). Where the two do not fit, the
   city goes and the ward's own name stays whole: the name is laid out first, from the right, so
   it is the city that wraps onto a second line, and the box shows one line. */
.b-name { display: flex; flex-flow: row-reverse wrap; justify-content: flex-end; align-items: baseline; align-content: flex-start; column-gap: 3px; min-width: 0; height: 22px; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 22px; letter-spacing: -.01em; white-space: nowrap; }
.b-name small { color: var(--b-sub); font-size: 11px; font-weight: 500; }
.b-name b { order: -1; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.b-tile .b-tile-value { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; white-space: nowrap; }
.b-tile-value strong { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.b-tile-value span { color: var(--b-sub); font-size: 11px; }
.b-tile-value em { margin-left: auto; color: var(--b-sub); font-size: 11px; font-style: normal; font-variant-numeric: tabular-nums; }
.b-blocks .b-pill { min-width: 62px; font-size: 14px; line-height: 25px; }
.b-areas .b-tile { padding: 10px 11px 8px; }
.b-areas .b-tile-value strong { font-size: 19px; }

/* A tile's line: every week in grey, and the period picked in its direction's colour. The drawing
   stretches to the tile and its strokes keep their width; the end dot is laid over it. */
.b-tile .b-spark { position: relative; height: 46px; margin: 2px 5px 0; }
.b-areas .b-spark { height: 38px; }
.b-spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.b-spark path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.b-spark .b-all { stroke: var(--b-quiet); stroke-width: 1.5px; }
.b-spark .b-on { stroke: var(--b-way); stroke-width: 2px; }
.b-spark .b-wash { fill: var(--b-way); stroke: none; opacity: .1; }
.b-spark .b-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 2px solid var(--b-card); border-radius: 50%; background: var(--b-way); }

/* How many of a block's areas rose and fell over the period. */
.b-tile .b-breadth { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--b-sub); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-breadth-bar { flex: 1; display: flex; gap: 2px; min-width: 30px; height: 6px; }
.b-breadth-bar i { display: block; height: 100%; border-radius: 3px; background: var(--b-way); }
.b-breadth-bar .is-flat { background: var(--b-bar); }

/* The large chart, of the block picked or of one of its areas, and beside it the block's areas that moved most. */
.b-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; margin-bottom: 34px; border: 1px solid var(--b-line); border-radius: 12px; background: var(--b-card); overflow: hidden; }
.b-hero-main { min-width: 0; padding: 18px 20px 12px; }
/* With an area in the chart, the way back to its block's chart stands at the end of the heading's
   line, where it takes no room of its own; on a phone it has a line to itself, above the name. */
.b-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; }
.b-hero-up { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 1px solid var(--b-line); border-radius: 8px; color: var(--b-ink); background: var(--b-card); font: inherit; font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; cursor: pointer; }
.b-hero-up:hover { border-color: #9fc2bb; }
:root[data-theme="dark"] .b-hero-up:hover { border-color: #3f6259; }
@media (pointer: coarse) { .b-hero-up { min-height: 40px; } }
.b-hero-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.b-hero-top h3 { margin: 0; color: var(--b-ink); font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.b-hero-figure { display: flex; align-items: baseline; gap: 5px; margin: 0; }
.b-hero-figure strong { font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.b-hero-figure span { color: var(--b-sub); font-size: 13px; }
.b-hero-top .b-pill { align-self: center; padding: 0 10px; font-size: 14px; line-height: 26px; }
.b-hero-sub { margin: 2px 0 8px; color: var(--b-sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.b-chart { position: relative; touch-action: pan-y; }
.b-chart svg { display: block; overflow: visible; }
.b-chart text { fill: var(--b-axis); font-family: "Noto Sans JP", sans-serif; font-size: 11px; font-variant-numeric: tabular-nums; }
.b-chart .b-grid { stroke: var(--b-grid); }
.b-chart .b-rule { stroke: var(--b-rule); }
.b-chart .b-ref { stroke: var(--b-flat); }
.b-chart path { stroke-linejoin: round; stroke-linecap: round; }
.b-chart .b-all { fill: none; stroke: var(--b-quiet); stroke-width: 2; }
.b-chart .b-on { fill: none; stroke: var(--b-way); stroke-width: 2.5; }
.b-chart .b-wash { fill: var(--b-way); opacity: .1; }
.b-chart .b-start { fill: var(--b-card); stroke: var(--b-way); stroke-width: 2; }
.b-chart .b-end { fill: var(--b-way); stroke: var(--b-card); stroke-width: 2; }
.b-chart .b-end-value { fill: var(--b-ink); font-size: 12px; font-weight: 700; }
.b-chart .b-bar { fill: var(--b-bar); }
.b-chart .b-bar.is-on { fill: var(--b-bar-on); }
/* The week under the cursor or the finger: a line down both panes, a ring on the price, and its figures. */
.b-chart .b-cross { stroke: var(--b-axis); stroke-dasharray: 2 3; }
.b-chart .b-focus { fill: var(--b-card); stroke: var(--b-ink); stroke-width: 2; }
.b-chart [hidden] { display: none; }
.b-tip { position: absolute; left: 0; top: 0; z-index: 2; padding: 7px 10px; border-radius: 8px; color: #fff; background: #183c33; box-shadow: 0 6px 20px rgba(15,40,32,.2); font-size: 12px; line-height: 1.5; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.b-tip[hidden] { display: none; }
.b-tip b { display: block; font-weight: 500; opacity: .85; }
.b-tip strong { font-size: 15px; font-weight: 600; }
.b-tip span { display: block; }
.b-tip small { font-size: 11px; opacity: .8; }
:root[data-theme="dark"] .b-tip { color: #102420; background: #e5efec; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.b-chart-empty { margin: 24px 0; color: var(--b-sub); font-size: 13px; }

/* The same weeks as a table, for a reader who wants the figures or cannot use the chart. */
.b-hero-foot { position: relative; margin-top: 6px; }
.b-table { color: var(--b-sub); font-size: 12px; }
.b-table summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; }
/* With an area in the chart, the way on to its town map: at the end of the table's line, which is
   as tall with it as without, so the chart's box keeps its height. */
.b-town-link { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 8px; color: #fff; background: #087c6a; font-size: 13px; font-weight: 700; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.b-town-link:hover { background: #066857; }
.b-town-link span { transition: transform .12s ease; }
.b-town-link:hover span { transform: translateX(2px); }
@media (pointer: coarse) { .b-table summary, .b-town-link { min-height: 40px; } }
.b-table-scroll { max-height: 264px; margin-top: 6px; overflow: auto; border: 1px solid var(--b-line); border-radius: 8px; }
.board .b-table table { width: 100%; border-collapse: collapse; color: var(--b-ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.board .b-table :is(th, td) { padding: 6px 12px; border-bottom: 1px solid var(--b-grid); background: none; text-align: right; white-space: nowrap; letter-spacing: 0; }
.board .b-table thead th { position: sticky; top: 0; color: var(--b-sub); background: var(--b-card); font-size: 12px; font-weight: 500; }
.board .b-table :is(th, td):first-child { text-align: left; font-weight: 400; }
.board .b-table tbody tr { cursor: auto; }
.board .b-table tbody tr:hover > * { background: none; }
.board .b-table tbody tr:last-child > * { border-bottom: 0; }

.b-hero-side { padding: 16px 18px 14px; border-left: 1px solid var(--b-line); background: var(--b-side); }
.b-hero-side h4 { margin: 0 0 2px; color: var(--b-ink); font-size: 13px; font-weight: 700; }
.b-hero-side > p { margin: 0 0 8px; color: var(--b-sub); font-size: 12px; }
.b-movers-pair { display: grid; gap: 0 28px; }
.b-movers-head { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--b-sub); font-size: 12px; font-weight: 700; }
.b-movers-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--b-way); }
.b-movers { margin: 0 0 12px; padding: 0; list-style: none; }
.b-movers li { border-top: 1px solid var(--b-grid); }
.b-movers li:first-child { border-top: 0; }
.b-mover { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 5px 0; border: 0; color: var(--b-ink); background: none; font: inherit; text-align: left; font-variant-numeric: tabular-nums; cursor: pointer; }
.b-mover:hover .b-mover-name { text-decoration: underline; text-underline-offset: 3px; }
/* The one that stands in the chart. */
.b-mover[aria-pressed="true"] .b-mover-name { color: var(--b-accent); font-weight: 700; }
@media (pointer: coarse) { .b-mover { padding: 8px 0; } }
.b-mover-name { overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.b-mover-value { color: var(--b-sub); font-size: 12px; }
.b-movers-none { margin: 4px 0 12px; color: var(--b-sub); font-size: 12px; }
.b-map-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 4px; padding: 0 14px; border-radius: 10px; color: #fff; background: #087c6a; font-size: 14px; font-weight: 700; text-decoration: none; }
.b-map-link:hover { background: #066857; }
.b-map-link span { transition: transform .12s ease; }
.b-map-link:hover span { transform: translateX(2px); }

.board-subhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 16px; margin: 0 0 12px; }
.board-subhead h3 { margin: 0; color: var(--b-ink); font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.board-note { margin-top: 14px; color: #647973; font-size: 12px; }
.board-note p { margin: 0; }
.board-note details { margin-top: 6px; }
.board-note summary { display: inline-block; cursor: pointer; }
.board-note details p { max-width: 760px; margin-top: 6px; line-height: 1.8; }
:root[data-theme="dark"] .board-note { color: #9db3ad; }

@media (max-width: 1100px) {
  .b-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-areas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .b-hero { grid-template-columns: 1fr; }
  .b-hero-side { border-left: 0; border-top: 1px solid var(--b-line); }
  .b-movers-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .board { margin-bottom: 36px; }
  /* The button beside the heading, and the date on a line of its own under them. */
  .board-heading { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lead lead" "title map" "date date"; align-items: center; column-gap: 12px; margin-bottom: 14px; }
  .board-heading h2 { font-size: 20px; }
  .board-heading .snapshot-date { margin-top: 4px; }
  .b-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-hero { margin-bottom: 28px; }
  .b-hero-main { padding: 14px 14px 8px; }
  .b-hero-side { padding: 14px; }
}
@media (max-width: 560px) {
  .board-controls-note { display: none; }
  .board-controls .b-seg { width: 100%; }
  .b-seg button { flex: 1; padding: 0 6px; }
  .b-hero-head { flex-direction: column-reverse; align-items: flex-start; }
  .b-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .b-hero-figure strong { font-size: 30px; }
  .b-movers-pair { grid-template-columns: 1fr; }
  .board-subhead { flex-direction: column; align-items: flex-start; }
  .board-subhead .b-seg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .b-map-link span, .b-town-link span { transition: none; }
}
