/* Hub navigation: guide index, sticky bar, drawer / sheet, where next, footer site map, read ticks.
   Markup from scripts/hubnav_sync.py (never hand-edit the generated blocks), behaviour in assets/hubnav.js.
   Lifted from new-page-docs/design-import/hubnav/hubnav.css and mapped to hn- names; site tokens only. */

/* ---------- Link styles in prose (spec 2): our guides get an accent underline and →, other sites a dotted
   underline and ↗. Buttons, cards, navs, heroes, header and footer keep their own look (they carry a class or sit
   in an excluded block). hubnav_sync.py strips the text arrows these links used to end with. */
body[data-hub] :is(p, li, td, dd) a:not([class]):is([href^="/"], [href^="#"], [href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *) {
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
body[data-hub] :is(p, li, td, dd) a:not([class]):is([href^="/"], [href^="#"], [href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *)::after {
  content: "→"; display: inline-block; margin-left: 2px; font-size: .8em; color: var(--accent); text-decoration: none;
}
body[data-hub] :is(p, li, td, dd) a:not([class]):is([href^="/"], [href^="#"], [href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *):hover {
  color: var(--accent-ink); text-decoration-color: currentColor;
}
body[data-hub] :is(p, li, td, dd) a:not([class])[href^="http"]:not([href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *) {
  color: var(--ink-2); font-weight: inherit;
  text-decoration: underline dotted var(--ink-4); text-underline-offset: 3px;
}
body[data-hub] :is(p, li, td, dd) a:not([class])[href^="http"]:not([href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *)::after {
  content: "↗"; display: inline-block; margin-left: 2px; font-size: .75em; color: var(--ink-4); text-decoration: none;
}
body[data-hub] :is(p, li, td, dd) a:not([class])[href^="http"]:not([href^="https://tabidachi.travel"]):not(:is(.tb-header, .tb-footer, nav, [class*="-hero"], .hn-index, .hn-next, .hn-dlg, .tb-season-band, .tb-stays, [class*="__item--link"], aside, figure, [class*="am__"]) *):hover {
  color: var(--ink); text-decoration-color: var(--ink-3);
}

/* ---------- Shared: clickable card (spec 2) ---------- */
.lc {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface);
  overflow: hidden; color: var(--ink); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.lc:hover { border-color: var(--ink); transform: translateY(-2px); }
.lc__img { position: relative; display: block; aspect-ratio: 3 / 1; background: var(--paper-3) center / cover no-repeat; }
.lc__b { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.lc__t { font-weight: 500; font-size: 15px; line-height: 1.25; }
.lc__m {
  font-size: 12.5px; line-height: 1.4; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc__go {
  margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--accent);
}
.lc__go > span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); white-space: nowrap; }
.lc__tick {
  position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--summer); color: var(--paper); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
}
.lc.is-read .lc__t { color: var(--ink-2); }
.hn-en {
  font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; font-weight: 500;
  border: 1px solid var(--rule-2); border-radius: 4px; padding: 0 4px; margin-left: 4px;
  color: var(--ink-3); vertical-align: 2px;
}

/* ---------- Hub facts become links (spec 3A) ---------- */
a.hn-fact { display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: background .2s; }
a.hn-fact:hover { background: var(--accent-soft); }
.hn-fact__go { margin-top: 8px; text-decoration: none; font-size: 12.5px; font-weight: 500; color: var(--accent); }

/* ---------- Hub hero (spec 3A, frame 01) ----------
   The nine hubs (.ito-hero, .kr-hero, .kz-hero, .sp-hero--card) get a 300px full-bleed hero on desktop: breadcrumb row
   (with "Where to stay" at the right), 72px title, a one-line lede, the photo caption bottom-right, and the four facts
   as a strip overlapping the hero bottom by 30px, each fact one row "label / value + link". The hero buttons are gone
   from the markup. Phones keep the card hero from the page templates; only the row and the clamps below apply. */
.hh-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; font-size: 12.5px; }
.hh-row nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-3); }
.hh-row nav a { color: inherit; text-decoration: none; }
.hh-row nav a:hover { color: var(--ink); text-decoration: underline; }
.hh-row nav a:last-of-type { color: var(--ink); font-weight: 500; }
.hh-row nav span { color: var(--ink-4); }
.hh-stay { color: var(--accent-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hh-stay::after { content: "→"; margin-left: 4px; }
.hh-stay:hover { text-decoration: underline; text-underline-offset: 3px; }
.hh-facts { padding: 16px var(--gutter) 0; }
.hh-facts .tb-fact-strip { max-width: var(--site-w); margin: 0 auto; }
.hh-facts[hidden] { display: none; }
@media (max-width: 900px) {
  :is(.ito-hero, .kr-hero, .kz-hero) :is(.ito-hero__lede, .kr-hero__lede, .kz-hero__lede),
  .sp-hero--card .sp-hero__lede { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  :is(.ito-hero, .kr-hero, .kz-hero) .tb-fact-strip { margin: 20px 16px 0; }
  .sp-hero--card ~ .sp-crumbs { border-bottom: 0; }
}
@media (min-width: 901px) {
  /* the slim season strip is replaced by the photo caption and the index's In-season line */
  body:has(.hn-index) .tb-season-band { display: none; }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .sp-hero--card) { padding: 0; background: none; }
  body[data-hub] :is(.ito-hero__inner, .kr-hero__inner, .kz-hero__inner) { max-width: none; margin: 0; padding: 0; }
  /* coordinates, population and the JR chip: kept for phones only */
  body[data-hub] :is(.ito-hero__topbar, .kr-hero__topbar, .kz-hero__topbar) { display: none; }
  body[data-hub] .sp-hero--card ~ .sp-crumbs { display: none; }

  body[data-hub] :is(.ito-hero__photo, .kr-hero__photo, .kz-hero__photo, .sp-hero--card .sp-hero__photo) {
    height: 300px; aspect-ratio: auto; max-width: none; margin: 0; border-radius: 0;
  }
  body[data-hub] :is(.ito-hero__shade, .kr-hero__shade, .kz-hero__shade, .sp-hero--card .sp-hero__shade) {
    background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.28) 40%, rgba(0,0,0,.66) 100%);
  }
  body[data-hub] :is(.ito-hero__title-block, .kr-hero__title-block, .kz-hero__title-block) {
    left: 50%; right: auto; bottom: 0; transform: translateX(-50%);
    width: min(var(--site-w), calc(100% - 2 * var(--gutter))); padding: 0 0 38px;
  }
  body[data-hub] .sp-hero--card .sp-hero__title-block { padding: 0 var(--gutter) 38px; }
  body[data-hub] .sp-hero--card .sp-hero__title-inner { max-width: var(--site-w); }
  body[data-hub] .hh-row { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
  body[data-hub] .hh-row nav { color: rgba(255,255,255,.85); }
  body[data-hub] .hh-row nav a:hover { color: #fff; }
  body[data-hub] .hh-row nav a:last-of-type { color: #fff; font-weight: 500; }
  body[data-hub] .hh-row nav span { color: rgba(255,255,255,.55); }
  body[data-hub] .hh-stay { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.7); }
  body[data-hub] :is(.ito-hero__pill, .kr-hero__pill) { margin: 0 0 10px; padding: 3px 10px; font-size: 11px; }
  body[data-hub] :is(.ito-hero__title, .kr-hero__title, .kz-hero__title, .sp-hero__title) { font-size: 72px; font-weight: 500; letter-spacing: -.035em; line-height: .95; }
  body[data-hub] :is(.ito-hero__title, .kr-hero__title, .kz-hero__title, .sp-hero__title) em { font-size: 30px; font-weight: 400; margin-left: 12px; }
  body[data-hub] :is(.ito-hero__lede, .kr-hero__lede, .kz-hero__lede, .sp-hero--card .sp-hero__lede) {
    font-size: 16px; line-height: 1.5; margin: 12px 0 0; max-width: min(800px, calc(100% - 360px)); opacity: .95;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  }
  body[data-hub] .sp-hero--card .sp-hero__eyebrow { display: none; }
  body[data-hub] .sp-hero--card .sp-hero__meta { margin-top: 10px; font-size: 12.5px; }
  body[data-hub] :is(.ito-hero__caption, .kr-hero__caption, .kz-hero__caption) {
    top: auto; left: auto; bottom: 36px; right: max(var(--gutter), calc((100% - var(--site-w)) / 2));
    padding: 0; background: none; border: 0; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
    font-family: var(--mono); font-size: 11px; letter-spacing: 0; opacity: .8; text-shadow: 0 1px 6px rgba(0,0,0,.5);
  }

  /* the facts: one overlapping strip, each fact one row */
  body[data-hub] :is(.ito-hero__inner, .kz-hero__inner, .kr-hero__inner, .hh-facts) .tb-fact-strip {
    position: relative; z-index: 2; width: min(var(--site-w), calc(100% - 2 * var(--gutter))); max-width: none;
    margin: -30px auto 0; border-radius: var(--r-card); box-shadow: 0 10px 28px -18px rgba(0,0,0,.35);
  }
  body[data-hub] .hh-facts { padding: 0; }
  body[data-hub] .hh-facts .tb-fact-strip { margin-top: -30px; }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) a.tb-fact {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; padding: 14px 20px; min-width: 0;
  }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) .tb-fact__label { grid-column: 1 / -1; margin-bottom: 4px; }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) .tb-fact__value { font-size: 24px; margin: 0; white-space: nowrap; }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) .tb-fact__note { display: none; }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) .hn-fact__go { margin: 0; grid-column: 2; text-align: right; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  /* narrow desktop: the link drops under the value so the two never touch */
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) a.tb-fact { grid-template-columns: minmax(0, 1fr); }
  body[data-hub] :is(.ito-hero, .kr-hero, .kz-hero, .hh-facts) .hn-fact__go { grid-column: 1; text-align: left; margin-top: 4px; }
}

/* ---------- Guide index (spec 3A) ---------- */
.hn-index { padding: 22px var(--gutter) 26px; background: var(--paper); }
.hn-index__in { max-width: var(--site-w); margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.hn-index__k { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.hn-index__h { margin: 4px 0 10px; font-size: 22px; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.hn-prog { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; }
.hn-prog__t { font-size: 13px; color: var(--ink-3); }
.hn-prog__t b { color: var(--summer); font-weight: 600; }
.hn-prog__bar { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--paper-3); overflow: hidden; }
.hn-prog__bar i { display: block; height: 100%; width: var(--hn-p, 0%); background: var(--summer); border-radius: 4px; transition: width .3s; }
.hn-tabs { display: flex; flex-direction: column; gap: 5px; }
.hn-tab {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 7px 12px; text-align: left;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; cursor: pointer; transition: border-color .2s;
}
.hn-tab:hover { border-color: var(--ink-3); }
.hn-tab__k { font-family: var(--jp); font-size: 20px; color: var(--ink-3); }
.hn-tab__t b { display: block; font-weight: 500; font-size: 15px; line-height: 1.2; }
.hn-tab__t small { display: block; font-size: 12px; color: var(--ink-3); }
.hn-tab em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.hn-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hn-tab[aria-selected="true"] .hn-tab__k,
.hn-tab[aria-selected="true"] small,
.hn-tab[aria-selected="true"] em { color: var(--ink-4); }
.hn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hn-panel[hidden] { display: none; }
.hn-also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.hn-also a {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.hn-also a:hover { color: var(--accent-ink); }
.hn-also__sep { color: var(--ink-4); }
.hn-also__season { display: none; margin-left: auto; align-items: center; flex-wrap: wrap; gap: 4px 6px; color: var(--ink-2); }
body[data-season="spring"] .hn-also__season[data-season="spring"],
body[data-season="summer"] .hn-also__season[data-season="summer"],
body[data-season="autumn"] .hn-also__season[data-season="autumn"],
body[data-season="winter"] .hn-also__season[data-season="winter"] { display: inline-flex; }
.hn-sd { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
[data-season="spring"] > .hn-sd { background: var(--spring); }
[data-season="summer"] > .hn-sd { background: var(--summer); }
[data-season="autumn"] > .hn-sd { background: var(--autumn); }
[data-season="winter"] > .hn-sd { background: var(--winter); }

/* ---------- Sticky bar (spec 3B): the page's section nav plus the hub name and the All guides button ---------- */
[data-hn-bar] { position: sticky; }
.hn-bar__prog { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--accent); pointer-events: none; }
nav.hn-bar {
  top: 65px; z-index: 30; display: flex; align-items: center;
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.hn-bar__tabs { flex: 1; }
@media (min-width: 900px) {
  [data-hn-bar] {
    display: flex; align-items: center; height: 52px; box-sizing: border-box;
    padding: 0 max(var(--gutter), calc((100% - var(--site-w)) / 2 + var(--gutter)));
  }
  [data-hn-bar] > div {
    flex: 1; min-width: 0; max-width: none; margin: 0; padding: 0 8px !important;
    overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent);
  }
  [data-hn-bar] > div::-webkit-scrollbar { display: none; }
  [data-hn-bar] > div.is-end { -webkit-mask-image: none; mask-image: none; }
  .hn-bar__hub {
    display: flex; align-items: center; gap: 8px; height: 28px; flex: 0 0 auto;
    padding-right: 18px; margin-right: 4px; border-right: 1px solid var(--rule);
    font-weight: 600; font-size: 14px; white-space: nowrap;
  }
  .hn-bar__hub span { font-family: var(--jp); font-weight: 400; color: var(--ink-3); }
  .hn-bar__arr {
    flex: 0 0 28px; width: 28px; height: 28px; margin: 0 10px; display: grid; place-items: center;
    border: 1px solid var(--rule-2); border-radius: 50%; background: var(--surface);
    font-size: 15px; line-height: 1; color: var(--ink-2); cursor: pointer;
  }
  .hn-bar__arr.is-end { visibility: hidden; }
  [data-hn-bar] .hn-bar__all {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
    border: 0; border-radius: var(--r-control); background: var(--accent); color: var(--paper);
    font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  }
  [data-hn-bar] .hn-bar__all:hover { background: var(--accent-ink); }
  .hn-bar__all i { font-style: normal; font-family: var(--mono); font-size: 11px; background: var(--accent-ink); border-radius: 4px; padding: 1px 5px; }
}
@media (max-width: 899px) {
  .hn-bar__hub, .hn-bar__arr, .hn-bar__all { display: none; }
  nav.hn-bar { top: 56px; height: 4px; }
}

/* ---------- Where next (spec 3D) ---------- */
.hn-next { padding: 56px var(--gutter) 48px; border-top: 1px solid var(--rule); background: var(--paper); }
.hn-next__in { max-width: var(--site-w); margin: 0 auto; }
.hn-next__k, .hn-upnext__k, .hn-next__hk { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.hn-next__k { margin-bottom: 10px; }
.hn-upnext {
  display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden;
  border: 1px solid var(--ink); border-radius: var(--r-feature); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: transform .2s;
}
.hn-upnext:hover { transform: translateY(-2px); }
.hn-upnext__img { display: block; min-height: 250px; background: var(--paper-3) center / cover no-repeat; }
.hn-upnext__b { display: flex; flex-direction: column; gap: 8px; padding: 28px 30px; }
.hn-upnext__t { font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.hn-upnext__d { font-size: 14.5px; color: var(--ink-2); }
.hn-upnext__go { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--accent); }
.hn-upnext__go > span { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.hn-upnext.is-read .hn-upnext__t::after { content: " ✓"; color: var(--summer); font-size: .6em; }
.hn-next__h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 32px 0 12px; }
.hn-next__h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.hn-next__all { padding: 6px 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--accent); cursor: pointer; min-height: 32px; }
.hn-next__all:hover { color: var(--accent-ink); text-decoration: underline; }
.hn-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hn-row .lc__img { aspect-ratio: 16 / 10; }
.hn-line {
  position: relative; display: grid; grid-template-columns: repeat(var(--hn-st, 7), minmax(0, 1fr));
  padding: 22px 26px 18px; border: 1px solid var(--rule); border-radius: var(--r-card); background: var(--surface);
}
.hn-line::before {
  content: ""; position: absolute; top: 33px; height: 3px;
  left: calc(26px + (100% - 52px) / var(--hn-st, 7) / 2); right: calc(26px + (100% - 52px) / var(--hn-st, 7) / 2);
  background: linear-gradient(90deg, var(--hakutaka), var(--accent));
}
.hn-st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink); text-decoration: none; }
.hn-st i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); box-sizing: border-box; }
.hn-st--here i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.hn-st b { font-size: 14px; font-weight: 500; }
.hn-st small { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.hn-st u { text-decoration: none; font-size: 12px; color: var(--accent); }
a.hn-st:hover b { text-decoration: underline; }

/* ---------- Footer site map (spec 3D) ---------- */
.tb-footer__cols.hn-cols { grid-template-columns: minmax(220px, 1fr) 3fr; }
.hn-map { display: grid; grid-template-columns: repeat(var(--hn-cols, 4), minmax(0, 1fr)); gap: 24px; }
.hn-map h5 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.hn-map h5 em { font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-4); white-space: nowrap; }
.hn-map a { display: block; padding: 3px 0; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.hn-map a:hover { color: var(--ink); text-decoration: underline; }
.hn-map a.hn-map__sub { position: relative; padding-left: 16px; }
.hn-map a.hn-map__sub::before { content: "└"; position: absolute; left: 2px; color: var(--ink-4); font-size: 12px; }
.hn-map a.is-read { color: var(--ink-4); }
.hn-map a.is-read::after { content: " ✓"; color: var(--summer); }
.hn-sitelinks { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 0 18px; font-size: 13px; }
.hn-sitelinks a { color: var(--ink-2); text-decoration: none; }
.hn-sitelinks a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Drawer (>= 900px) and sheet (< 900px): one <dialog> (spec 3B, 3C) ---------- */
html.hn-lock { overflow: hidden; } /* phones only; never on body, which would unstick the header */
.hn-dlg {
  position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; overflow: clip; /* clip: showModal focus must not scroll it */
  --hn-in: .38s cubic-bezier(.2, .8, .2, 1); --hn-out: .26s cubic-bezier(.4, 0, .9, .4);
}
.hn-dlg:not([open]) { display: none; }
.hn-dlg::backdrop { background: transparent; }
/* desktop: the drawer docks under the header and sticky bar (frame 02); the page behind is veiled, not blacked out */
.hn-dlg__scrim { position: absolute; inset: 0; opacity: 0; transition: opacity var(--hn-out); }
.hn-dlg__scrim::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: var(--hn-top, 0);
  background: color-mix(in oklab, var(--paper) 55%, transparent);
}
.hn-dlg__panel {
  position: absolute; top: var(--hn-top, 0); right: 0; bottom: 0; width: 440px; max-width: 100%;
  display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--rule-2); box-shadow: var(--shadow-drawer);
  transform: translate3d(100%, 0, 0); transition: transform var(--hn-out); will-change: transform;
}
.hn-dlg.is-open .hn-dlg__scrim { opacity: 1; transition: opacity var(--hn-in); }
.hn-dlg.is-open .hn-dlg__panel { transform: none; transition: transform var(--hn-in); }
.hn-dlg.is-drag .hn-dlg__panel, .hn-dlg.is-drag .hn-dlg__scrim { transition: none; }
.hn-dlg__grab { display: none; }
.hn-dlg__h { padding: 20px 24px 14px; border-bottom: 1px solid var(--rule); }
.hn-dlg__title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.hn-dlg__close { width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; background: none; font: inherit; font-size: 24px; line-height: 1; color: var(--ink-3); cursor: pointer; border-radius: 8px; }
.hn-dlg__close:hover { color: var(--ink); background: var(--paper-2); }
.hn-dlg__count { display: block; margin: 2px 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.hn-dlg__count b { color: var(--summer); font-weight: 500; }
.hn-dlg__s { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: var(--r-control); color: var(--ink-4); }
.hn-dlg__s:focus-within { border-color: var(--accent); }
.hn-dlg__s input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.hn-dlg__f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hn-chip {
  min-height: 32px; padding: 5px 11px; border: 0; border-radius: 999px; background: var(--paper-3); color: var(--ink-2);
  font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
.hn-chip:hover { color: var(--ink); }
.hn-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hn-dlg__l { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 24px; }
.hn-dlg__g { padding-top: 16px; }
.hn-dlg__gk { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.hn-r {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 52px; padding: 7px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none;
}
.hn-r:hover b { text-decoration: underline; }
.hn-r__img { width: 52px; height: 38px; border-radius: 6px; background: var(--paper-3) center / cover no-repeat; }
.hn-r b { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; }
.hn-r small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-r em { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); white-space: nowrap; }
.hn-r.is-read em { color: var(--summer); }
.hn-r--sub { padding-left: 18px; grid-template-columns: 40px minmax(0, 1fr) auto; }
.hn-r--sub .hn-r__img { width: 40px; height: 30px; }
.hn-r[aria-current="page"] { margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; border-bottom-color: transparent; background: var(--accent-soft); }
.hn-r--sub[aria-current="page"] { padding-left: 28px; }
.hn-r--resume em { color: var(--accent); }
.hn-sec {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px;
  padding: 10px 0; border: 0; border-bottom: 1px solid var(--rule); background: none;
  font: inherit; font-size: 15px; text-align: left; color: var(--ink-2); cursor: pointer;
}
.hn-sec::after { content: "›"; color: var(--ink-4); }
.hn-sec[aria-current="true"] { color: var(--ink); font-weight: 500; }
.hn-sec[aria-current="true"]::after { content: "●"; font-size: 9px; color: var(--accent); }
.hn-r--offer { margin-top: 18px; border-top: 1px solid var(--rule); }
.hn-r--offer .hn-r__img { display: grid; place-items: center; background: var(--accent); color: var(--paper); font-size: 22px; }
.hn-r--offer em { color: var(--accent); }
.hn-empty { padding: 24px 0; color: var(--ink-3); font-size: 14px; }
@media (max-width: 899px) {
  .hn-dlg__panel {
    top: auto; left: 0; width: auto; height: min(86vh, 720px); height: min(86dvh, 720px);
    border-left: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -20px 40px -10px rgba(0, 0, 0, .25);
    transform: translate3d(0, 100%, 0); touch-action: pan-y;
  }
  .hn-dlg { --hn-in: .42s cubic-bezier(.2, .85, .25, 1); --hn-out: .28s cubic-bezier(.4, 0, .9, .4); }
  .hn-dlg__scrim::before { top: 0; background: rgba(17, 19, 18, .4); }
  .hn-dlg__grab { display: block; width: 40px; height: 4px; margin: 10px auto 2px; border-radius: 4px; background: var(--rule-2); }
  .hn-dlg__h { padding: 6px 16px 10px; }
  .hn-dlg__f { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px; }
  .hn-dlg__f::-webkit-scrollbar { display: none; }
  .hn-chip { min-height: 36px; padding: 7px 12px; }
  .hn-dlg__l { padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
  .hn-r { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 9px 0; }
  .hn-r__img { width: 56px; height: 44px; }
}

/* ---------- Mobile floating button and Up next card (spec 3C) ---------- */
.hn-fab, .hn-upfab { display: none; }
@media (max-width: 899px) {
  .hn-fab {
    position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
    transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
    max-width: calc(100% - 32px); min-height: 44px; padding: 11px 16px 11px 18px;
    border: 0; border-radius: 999px; background: var(--ink); color: var(--paper);
    font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); transition: opacity .2s, transform .2s;
  }
  .hn-fab i { font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 500; background: var(--ink-2); border-radius: 4px; padding: 1px 6px; }
  .hn-fab small { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid var(--ink-3); font-size: 12.5px; font-weight: 400; color: var(--rule-2); }
  .hn-fab small:empty { display: none; }
  .hn-upfab {
    position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60;
    display: grid; grid-template-columns: 54px minmax(0, 1fr) 34px; align-items: center; gap: 12px; padding: 8px;
    border: 1px solid var(--rule-2); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .3);
    opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .hn-upfab__img { height: 46px; border-radius: 8px; background: var(--paper-3) center / cover no-repeat; }
  .hn-upfab small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .hn-upfab b { display: block; font-size: 14px; font-weight: 500; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hn-upfab em { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--paper); display: grid; place-items: center; }
  body.hn-near-end .hn-upfab { opacity: 1; transform: none; pointer-events: auto; }
  body.hn-near-end .hn-fab { opacity: 0; pointer-events: none; transform: translate(-50%, 16px); }
  /* the page's own bottom-of-screen pieces sit above the floating button */
  body[data-hub] { padding-bottom: 72px; }
}

/* ---------- Read ticks (spec 4) ---------- */
.rt {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px;
  border: 1px solid var(--rule-2); border-radius: 999px; background: var(--surface);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.rt i { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--summer) var(--p, 0%), var(--paper-3) 0); }
.rt.is-read { color: var(--summer); }
.hn-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 12px;
  max-width: min(460px, calc(100% - 24px)); padding: 10px 16px 10px 10px; border-radius: 12px;
  background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .4);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.hn-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
.hn-toast__k { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--summer); display: grid; place-items: center; font-weight: 600; }
.hn-toast b { display: block; font-size: 14px; font-weight: 500; }
.hn-toast small { display: block; font-size: 12px; color: var(--rule-2); }
.hn-toast a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .hn-index { padding: 20px 16px 24px; }
  .hn-index__in { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hn-index__side, .hn-index__main { min-width: 0; }
  .hn-index__h { font-size: 20px; }
  .hn-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .hn-tabs::-webkit-scrollbar { display: none; }
  .hn-tab { flex: 0 0 auto; grid-template-columns: auto auto auto; gap: 8px; padding: 7px 12px; }
  .hn-tab__k { font-size: 17px; }
  .hn-tab__t small { display: none; }
  .hn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hn-also__season { margin-left: 0; }
  .hn-next { padding: 40px 16px 36px; }
  .hn-upnext { grid-template-columns: 1fr; }
  .hn-upnext__img { min-height: 170px; }
  .hn-upnext__b { padding: 18px 18px 20px; }
  .hn-upnext__t { font-size: 24px; }
  .hn-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tb-footer__cols.hn-cols { grid-template-columns: 1fr; }
  .hn-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; padding-top: 18px; }
  .hn-map a { padding: 6px 0; }
}
@media (max-width: 700px) {
  .hn-line { grid-template-columns: 1fr; padding: 8px 16px; }
  .hn-line::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 3px; height: auto; background: linear-gradient(180deg, var(--hakutaka), var(--accent)); }
  .hn-st { flex-direction: row; gap: 12px; min-height: 44px; text-align: left; }
  .hn-st i { flex: 0 0 14px; }
  .hn-st small { margin-left: auto; }
  .hn-st u { min-width: 52px; text-align: right; }
  .hn-st--here small { margin-right: 64px; }
}
@media (max-width: 560px) {
  .hn-grid { grid-template-columns: 1fr; }
  .hn-row .lc__m { -webkit-line-clamp: 3; }
}
@media (max-width: 899px) {
  .hn-toast { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lc, .hn-upnext, .hn-dlg__panel, .hn-dlg__scrim, .hn-toast, .hn-fab, .hn-upfab { transition: none !important; animation: none; }
}
