/* 下半分 (home-bottom.css) とクラス名がぶつからないよう、.ht の中に閉じる */
.ht [hidden] { display: none !important; }
.ht { color: var(--ink); font-family: var(--font-body); }
.ht :where(ol, ul) { list-style: none; }
.ht a { color: inherit; }
.ht :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ht .band :focus-visible { outline-color: var(--band-ink); }
.ht code { font-size: 0.875em; letter-spacing: 0; }
.ht .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ht .vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ht .h1 {
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 1.24;
  letter-spacing: -0.005em;
  font-feature-settings: "palt" 1;
}
.ht .h1 .ln { display: block; }
.ht .ph { display: inline-block; }
.ht .h2 {
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 1;
  text-wrap: balance;
  word-break: auto-phrase;
}
.ht .band h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.5; letter-spacing: 0.02em; }
.ht p { text-wrap: pretty; }

.ht .ht-btn {
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--fs-m);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.ht .ht-btn:active { transform: scale(0.97); }
.ht .arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.ht .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: var(--fs-m);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  min-height: 0;
  padding-bottom: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .ht .ht-btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
    .ht a:hover > .arrow, .ht button:hover > .arrow { transform: translateX(3px); }
}

.ht .ht-hero { padding-block: clamp(40px, 5cqi, 80px) clamp(40px, 4cqi, 64px); }
.ht .hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
  margin-top: clamp(20px, 2.4cqi, 32px);
}
.ht .lead { font-size: var(--fs-lead); line-height: 1.9; color: var(--ink-2); max-width: 36em; word-break: auto-phrase; }
.ht .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
@media (max-width: 899px) {
  .ht .hero-row { grid-template-columns: minmax(0, 1fr); }
}

.ht .wave-fig { margin-top: clamp(36px, 4.4cqi, 64px); position: relative; }
.ht .wave-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 14px; }
.ht .wave-title { font-size: var(--fs-s); font-weight: 700; letter-spacing: 0.04em; }
.ht .wave-title .mono { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.ht .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-xs); color: var(--ink-2); }
.ht .legend span { display: inline-flex; align-items: center; gap: 6px; }
.ht .sw { width: 10px; height: 10px; display: inline-block; }
.ht .sw-shu { background: var(--c-shu); }
.ht .sw-san { background: var(--c-san); }
.ht .sw-loc { background: var(--c-loc); }
.ht .wave {
  position: relative;
  margin-top: 34px;
  height: clamp(168px, 9.5cqi + 90px, 248px);
  touch-action: pan-y;
  cursor: crosshair;
  outline-offset: 6px;
}
.ht .wave-layer { position: absolute; inset: 0; }
.ht .wave-layer svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ht .wave-base rect { fill: var(--c-pre); }
.ht .wave-ink { clip-path: inset(0 0 0 0); animation: wave-sweep 1400ms var(--ease-in-out) 250ms both; }
.ht .r-shu { fill: var(--c-shu); }
.ht .r-san { fill: var(--c-san); }
.ht .r-loc { fill: var(--c-loc); }
.ht .r-part { fill-opacity: 0.55; }
@keyframes wave-sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ht .wave-axis { position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); }
.ht .ph-track { position: absolute; top: -10px; bottom: -10px; left: 0; pointer-events: none; }
.ht .phead {
  position: absolute; inset: 0;
  border-right: 1px solid var(--ink);
  animation: ph-run 1400ms var(--ease-in-out) 250ms both;
}
@keyframes ph-run { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.ht .wl {
  position: absolute;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--ink-2);
  white-space: nowrap;
  pointer-events: none;
}
.ht .wl b { font-weight: 400; color: var(--ink); }
.ht .wl::before { content: ""; position: absolute; width: 1px; background: var(--ink-3); }
.ht .wl-top { transform: translateY(-100%); padding-left: 8px; }
.ht .wl-top::before { left: 0; top: 4px; height: calc(100% + 6px); }
.ht .wl-now { text-align: right; transform: translate(-100%, -100%); padding-right: 8px; color: var(--ink); }
.ht .wl-now::before { display: none; }
.ht .wave-guide { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--ink); pointer-events: none; }
.ht .wave-tip {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 188px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--ink);
  font-size: var(--fs-xs);
  line-height: 1.6;
  pointer-events: none;
  z-index: 3;
  transition: opacity 150ms var(--ease-out);
}
.ht .wave-tip[data-in="0"] { opacity: 0; }
.ht .wave-tip .t-y { font-family: var(--font-mono); font-size: var(--fs-m); display: block; margin-bottom: 4px; }
.ht .wave-tip .t-u { font-family: var(--font-body); font-size: var(--fs-xs); margin-left: 6px; }
.ht .wave-tip dl { display: grid; grid-template-columns: auto auto; gap: 0 16px; }
.ht .wave-tip dd { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ht .wave-tip .t-sum { border-top: 1px solid var(--rule); margin-top: 4px; padding-top: 4px; }
.ht .wave-years { position: relative; height: 22px; margin-top: 12px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); }
.ht .wave-years span { position: absolute; top: 0; transform: translateX(-50%); }
.ht .wave-years span:first-child { transform: none; }
.ht .wave-years span:last-child { transform: translateX(-100%); }
.ht .wave-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; margin-top: 10px; font-size: var(--fs-s); color: var(--ink-3); }
.ht .wave-foot a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--ink); }
.ht .wave-kbd { display: none; color: var(--ink); }
.js .ht .wave-fig:has(.wave:focus-visible) .wave-kbd { display: inline; }
.js .ht .wave-fig:has(.wave:focus-visible) .wave-note { display: none; }
.ht .wave-table { margin-top: 14px; font-size: var(--fs-s); }
.ht .wave-table summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); list-style: none; }
.ht .wave-table summary::-webkit-details-marker { display: none; }
.ht .wave-table summary::before { content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform 160ms var(--ease-out); }
.ht .wave-table[open] summary::before { transform: rotate(90deg); }
.ht .wt-scroll { margin-top: 10px; max-height: 20rem; overflow: auto; border: 1px solid var(--rule); background: var(--surface); }
.ht .wt-scroll table { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
.ht .wt-scroll th, .ht .wt-scroll td { padding: 6px 12px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ht .wt-scroll thead th { position: sticky; top: 0; background: var(--surface); font-family: var(--font-body); font-weight: 700; color: var(--ink-3); }
.ht .wt-scroll tbody th { text-align: left; font-weight: 400; }
.ht .wt-scroll small { font-family: var(--font-body); color: var(--ink-3); margin-left: 6px; font-size: 1em; }
@media (max-width: 719px) {
  .ht .wl-peak, .ht .yr-mid { display: none; }
}

.ht .band { background: var(--band); color: var(--band-ink); padding-block: clamp(48px, 6cqi, 88px); border-block: 1px solid var(--band-rule); }
.ht .band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: clamp(24px, 3cqi, 40px); }
.ht .band-lead { color: var(--band-ink-2); font-size: var(--fs-m); }
.ht .ledger { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; border-top: 1px solid var(--band-rule); }
.ht .panel { padding-top: 24px; min-width: 0; }
.ht .panel.pub { padding-right: clamp(24px, 3.2cqi, 48px); border-right: 1px solid var(--band-rule); }
.ht .panel.night { padding-left: clamp(24px, 3.2cqi, 48px); }
.ht .panel-hd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ht .panel-hd h3 { font-size: var(--fs-m); letter-spacing: 0.08em; }
.ht .panel-hd time { font-size: var(--fs-xs); color: var(--band-ink-2); }
.ht .panel-sub { font-size: var(--fs-s); color: var(--band-ink-2); margin-top: 4px; }
.ht .kpi-note { font-size: var(--fs-xs); color: var(--band-ink-2); margin-top: 12px; }
.ht .kpi-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--band-rule); }
.ht .kpi-main .k-label { width: 100%; font-size: var(--fs-s); color: var(--band-ink-2); letter-spacing: 0.06em; }
.ht .k-num { font-size: var(--fs-num-xl); line-height: 1.05; letter-spacing: -0.02em; }
.ht .k-unit { font-size: var(--fs-m); color: var(--band-ink-2); }
.ht .k-delta { font-size: var(--fs-m); margin-left: auto; }
.ht .k-delta small { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--band-ink-2); margin-left: 6px; }
.ht .kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 3cqi, 40px); }
.ht .kpi-grid > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--band-rule); }
.ht .kpi-grid dt { font-size: var(--fs-s); color: var(--band-ink-2); }
.ht .kpi-grid dd { text-align: right; font-size: var(--fs-num-l); font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1.3; }
.ht .kpi-grid .d { grid-column: 2; text-align: right; font-size: var(--fs-s); font-family: var(--font-mono); color: var(--band-ink); }
.ht .kpi-grid .of { font-size: var(--fs-s); color: var(--band-ink-2); margin-left: 6px; }
.ht .status { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: var(--fs-m); font-weight: 700; }
.ht .night-grid { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px clamp(20px, 2.4cqi, 32px); margin-top: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--band-rule); }
.ht .night-grid dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-num-m); line-height: 1.2; }
.ht .night-grid dt { font-size: var(--fs-xs); color: var(--band-ink-2); margin-top: 2px; }
.ht .night-grid div { display: flex; flex-direction: column-reverse; }
.ht .src { font-size: var(--fs-s); color: var(--band-ink-2); margin-top: 14px; }
.ht .src .mono { color: var(--band-ink); }
.ht .nights { margin-top: 18px; }
.ht .nights-hd { font-size: var(--fs-xs); color: var(--band-ink-2); margin-bottom: 8px; }
.ht .nights ol { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 6px; align-items: end; }
.ht .nights li { display: grid; grid-template-rows: auto 64px auto; gap: 4px; text-align: center; min-width: 0; }
.ht .nv { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--band-ink-2); white-space: nowrap; }
.ht .nb { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.ht .nb i { display: block; width: 100%; max-width: 34px; background: var(--band-ink-2); min-height: 1px; }
.ht .nights li.is-last .nb i { background: var(--band-ink); }
.ht .nights li.is-last .nv { color: var(--band-ink); }
.ht .nb.none i { background: transparent; border-top: 1px dashed var(--band-ink-2); height: 0; min-height: 0; }
.ht .nd { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--band-ink-2); line-height: 1.3; }
.ht .nights-note { font-size: var(--fs-xs); color: var(--band-ink-2); margin-top: 8px; }
.ht .nd span { display: block; font-family: var(--font-body); }
.ht .panel-foot { font-size: var(--fs-s); color: var(--band-ink-2); margin-top: 16px; }
@media (max-width: 899px) {
  .ht .ledger { grid-template-columns: minmax(0, 1fr); }
  .ht .panel.pub { padding-right: 0; border-right: 0; padding-bottom: 32px; }
  .ht .panel.night { padding-left: 0; border-top: 1px solid var(--band-rule); }
}
@media (max-width: 479px) {
  .ht .kpi-grid > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ht .kpi-grid dd, .ht .kpi-grid .d { text-align: left; grid-column: 1; }
  .ht .night-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht .k-delta { margin-left: 0; }
}

.ht .kpi-grid > div.full { grid-column: 1 / -1; }
.ht .week-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--band-ink); }
.ht .week-hd h3 { font-size: var(--fs-m); letter-spacing: 0.08em; }
.ht .week-hd .mono { font-size: var(--fs-xs); color: var(--band-ink-2); }
.ht .week-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3.2cqi, 48px); }
.ht .week-list li { display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--band-rule); font-size: var(--fs-m); }
.ht .wk-meta { display: flex; align-items: baseline; gap: 12px; }
.ht .week-list time { font-size: var(--fs-s); color: var(--band-ink-2); }
.ht .week-list .kind { padding: 0 6px; border: 1px solid var(--band-ink-2); font-size: var(--fs-xs); font-weight: 700; line-height: 1.7; white-space: nowrap; }
.ht .week-list p { color: var(--band-ink); }
@media (max-width: 719px) {
  .ht .week-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559px) {
  .ht .week-list li { grid-template-columns: minmax(0, 1fr); }
}
.ht .wl-side { left: 0.6%; padding-left: 0; color: var(--ink-3); }
.ht .wl-side b { display: block; font-weight: 700; color: var(--ink-2); font-family: var(--font-body); }
.ht .band code { color: var(--band-ink); }

.ht .g { display: inline-block; width: 12px; height: 12px; flex: none; position: relative; }
.ht .g-ok { border-radius: 50%; background: currentColor; }
.ht .g-warn { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid currentColor; }
.ht .g-bad::before, .ht .g-bad::after { content: ""; position: absolute; left: 50%; top: -1px; width: 2px; height: 14px; background: currentColor; }
.ht .g-bad::before { transform: translateX(-50%) rotate(45deg); }
.ht .g-bad::after { transform: translateX(-50%) rotate(-45deg); }

.ht .week { margin-top: clamp(40px, 4.4cqi, 64px); }
.ht .is-stale { display: inline-flex; align-items: center; gap: 6px; color: var(--band-ink); border-bottom: 1px solid var(--band-ink); }
.ht time:not(.is-stale) > .g, .ht time:not(.is-stale) > .stale-note { display: none; }
.ht .is-stale .g { width: 0; height: 0; border-left-width: 5px; border-right-width: 5px; border-bottom-width: 9px; }

@media (prefers-reduced-motion: reduce) {
  .ht .wave-ink, .ht .phead { animation: none; }
  .ht .ht-btn { transition: background-color 160ms linear, color 160ms linear; }
  .ht .ht-btn:active { transform: none; }
  .ht .arrow, .ht .wave-table summary::before { transition: none; }
}
