/* header.css: Top bar: brand, header tools and the 表示 / 使い方 buttons. */
/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line-strong); transition: transform .22s var(--ease); }
/* Phones (and phones held sideways), scrolling down: the logo bar slides up out of view and the stuck ruler follows
   (see js/boot.js). */
@media (max-width: 600px), (max-height: 520px) {
  /* 6px of the bar stays, so the highlighted date doesn't touch the top edge. */
  :root[data-head-min] .top { transform: translateY(calc(6px - var(--bar-h, 0px))); }
  :root[data-head-min] .ruler { top: calc(var(--top-h, 1px) - var(--bar-h, 0px) + 6px - 1px); }
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 10px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { margin: 0; font-size: inherit; font-weight: inherit; }
/* Read by screen readers and search engines, not shown. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.brand .logo-mark { width: 28px; height: 28px; flex: none; }
/* はしご is the name; HASHIGO, smaller and paler, goes beside it. On a shared baseline the capitals look lower than
   the kana (which reach below it), so HASHIGO is lifted 1px. */
.brand .wm { display: flex; align-items: baseline; gap: 10px; }
.brand .ja { font-family: "Hashigo Wordmark", var(--font-kana), sans-serif; font-size: 22px; font-weight: 900; letter-spacing: .06em; line-height: 1; }
.brand .en { position: relative; top: -1px; font-family: "Familjen Grotesk", var(--font-title); font-size: 13px; font-weight: 700; letter-spacing: .14em;
  line-height: 1; color: var(--muted); }
.tools { display: flex; gap: 6px; flex: none; }
.theme { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer;
  font-family: var(--font-ja); font-size: 12px; color: var(--muted); }
.theme:hover { border-color: var(--line-strong); color: var(--ink); }
.theme:active, .chip:active { transform: translateY(1px); }
.theme[aria-pressed="true"] { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
/* The count sits on the button's corner so it appearing doesn't change the button's width. */
.theme .count { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 600 11px/18px var(--font-num); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.theme .count:empty { display: none; }
.theme svg { width: 14px; height: 14px; color: var(--ink); }

