/* 色と書体。差し替えるときはこの :root だけ。 */
:root {
  color-scheme: light;
  --accent: #1268bc;
  --on-accent: #ffffff;
  --photo: #51a8dd;
  --area: #eaf5fc;
  --bg: #ffffff;
  --text: #333333;
  --muted: #666666;
  --label-bg: #f2f2f2;
  --line: #d6d6d6;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --name-size: 36px;
  --heading-size: 20px;
  --body-size: 16px;
  --meta-size: 13px;
  --angle-size: 24px;
  --unknown-size: 14px;
  --control-height: 52px;
  --tap: 48px;
  --thumb: 56px;
  --row-photo: 72px;
  --radius: 8px;
  --pad: 16px;
  --card-gap: 8px;
  --section-gap: 32px;
  --label-col: 96px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--body-size);
  line-height: 1.6;
}

.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
}

.skip:focus { top: 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(64rem, 100%);
  margin: 0 auto;
  padding: 12px var(--pad) 48px;
}

a { color: var(--accent); }

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  margin: -12px calc(var(--pad) * -1) 16px;
  padding: 12px var(--pad);
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.brand a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
  background: var(--bg);
}

.site-mark {
  display: block;
  height: 57px;
  width: auto;
  background: var(--bg);
}

.crumb,
.crumb a {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--meta-size);
}

.crumb a {
  margin: 0;
  color: var(--accent);
}

h1, h2, h3 { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

.page-head h1 { margin: 16px 0 0; font-size: var(--heading-size); }

.lead { margin: 4px 0 0; color: var(--muted); font-size: var(--meta-size); }

.to-filter { margin: 8px 0 0; font-size: var(--meta-size); }

.search-heading {
  margin: 12px 0 8px;
  font-size: var(--heading-size);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--card-gap);
  align-items: center;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-height);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.search-icon { width: 20px; height: 20px; color: var(--muted); flex: none; }

.search-field input[type="search"] {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--body-size);
  color: inherit;
}

.search-field input:focus { outline: none; }

.search-field input::placeholder { color: var(--muted); opacity: 1; }

.search-field:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input, select, button { font: inherit; color: inherit; font-size: var(--body-size); }

input[type="number"],
select {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.button {
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  cursor: pointer;
}

.entrance-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
  margin-top: 12px;
}

.entrance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 84px;
  padding: 8px 4px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: var(--meta-size);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.entrance-card span {
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 374px) {
  .entrance-nav { gap: 4px; }
  .entrance-card {
    padding: 10px 1px;
    font-size: 11px;
    line-height: 1.2;
    gap: 4px;
  }
}

.nav-icon { width: 22px; height: 22px; flex: none; }

.entrance { margin-top: var(--section-gap); }

.entrance h2,
.basic h2,
.story .block h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: var(--heading-size);
}

.entrance h2::before,
.basic h2::before,
.story .block h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.maker-grid,
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--card-gap);
}

.maker-grid { grid-auto-rows: 72px; }

.maker-tile {
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
}

.maker-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
}

.logo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 22px;
  background: var(--bg);
}

.logo-slot img {
  width: 100%;
  height: 28px;
  object-fit: contain;
}

.logo-name,
.maker-label {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  text-align: center;
}

.logo-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.maker-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.maker-count {
  display: grid;
  place-items: center;
  flex: none;
  align-self: stretch;
  min-width: 46px;
  padding: 0 5px;
  border-left: 1px solid var(--line);
  color: var(--text);
  font-size: var(--meta-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.more-makers { margin-top: var(--card-gap); }

.more-makers summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.more-makers summary::-webkit-details-marker { display: none; }

.more-makers .maker-grid { margin-top: var(--card-gap); }

.cat-grid { align-items: stretch; }

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  text-decoration: none;
}

.cat-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cat-short {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

.cat-full {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.cat-count {
  flex: none;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--meta-size);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cat-row.is-disabled {
  color: var(--muted);
  background: var(--label-bg);
}

.filters {
  display: grid;
  gap: 12px;
}

.filter-field label {
  display: block;
  margin-bottom: 4px;
  font-size: var(--meta-size);
  font-weight: 700;
}

.loft-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.loft-pair span { color: var(--muted); }

.filter-note,
.hint,
.scroll-hint,
.table-note,
#search-status {
  color: var(--muted);
  font-size: var(--meta-size);
}

.filter-note { margin: 8px 0 0; }

.filter-actions { margin-top: 12px; }

.filter-actions .button { width: 100%; }

#count {
  margin: 16px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#no-hit,
.empty { margin-top: 16px; }

#makers,
#categories,
#filters,
#spec-heading,
#results { scroll-margin-top: 12px; }

.kana-index {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 16px 0 0;
  padding: 4px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.kana-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 6px;
  color: inherit;
  font-weight: 700;
  font-size: var(--body-size);
  text-decoration: none;
}

a.kana-tab:hover { color: var(--accent); }

.kana-tab[aria-disabled="true"] { color: color-mix(in srgb, var(--muted) 55%, var(--bg)); }

.kana-group { scroll-margin-top: 56px; }

.kana-group h2 {
  margin: 16px 0 4px;
  color: var(--accent);
  font-size: var(--body-size);
}

.kana-group h2::before { content: none; }

.model-list { list-style: none; margin: 0; padding: 0; }

.model-list a {
  display: grid;
  grid-template-columns: var(--row-photo) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.row-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: var(--row-photo);
  min-width: 0;
  height: var(--row-photo);
  overflow: hidden;
  background: var(--photo);
  color: var(--text);
  text-align: center;
}

.row-photo:has(img) { background: var(--bg); }

.row-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.club-icon {
  display: block;
  width: 56px;
  height: 56px;
  color: var(--text);
}

.row-photo .club-icon { width: 48px; height: 48px; }

.photo-empty .club-icon { width: 80px; height: 80px; }

.thumb .club-icon { width: 36px; height: 36px; }

.model-list .model-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  max-height: calc(1.35em * 2);
  word-break: keep-all;
  line-break: strict;
  text-wrap: balance;
  overflow-wrap: normal;
}

.row-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--meta-size);
}

.popular {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 0.1em;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 12px;
}

.model-head h1 {
  margin: 0;
  font-size: var(--name-size);
  font-weight: 700;
  line-height: 1.2;
}

.to-spec {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--accent);
  font-size: var(--meta-size);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.model-sub { margin: 6px 0 0; font-size: var(--body-size); }

.market-badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 1px 6px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  color: var(--accent);
  font-size: var(--meta-size);
}

.counterparts { margin: 8px 0 0; font-size: var(--meta-size); }

.hero { margin: 16px 0 0; max-width: 100%; }

.photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--photo);
  color: var(--text);
  text-align: center;
}

.photo.has-image {
  display: block;
  max-width: 100%;
  background: var(--bg);
}

.photo.has-image + .photo.has-image { margin-top: 8px; }

.photo-empty {
  height: 132px;
  padding: 16px;
}

.photo img,
.thumb img { width: 100%; height: 100%; object-fit: contain; }

.photo.has-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.thumb {
  display: grid;
  place-items: center;
  width: var(--thumb);
  height: var(--thumb);
  min-width: var(--tap);
  min-height: var(--tap);
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 2px;
  background: var(--photo);
  color: var(--text);
}

.thumb:has(img) { background: var(--bg); }

.thumb.is-current { border-color: var(--accent); }

.thumb .image-icon { width: 22px; height: 22px; }

.basic { margin-top: var(--section-gap); }

.info-list { margin: 0; }

.info-list > div {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-height: var(--tap);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  margin: 0;
  color: var(--muted);
  font-size: var(--meta-size);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.info-list dd {
  margin: 0;
  min-width: 0;
}

.info-list .hint {
  display: block;
  margin: 0;
}

.story { margin-top: var(--section-gap); }

.story .block { margin-top: 16px; }

.story .block:first-child { margin-top: 0; }

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  border-bottom: 1px solid var(--line);
}

.compact-row h2 {
  margin: 0;
  font-size: var(--body-size);
}

.compact-row h2::before { content: none; }

.block { margin-top: var(--section-gap); }

.block h2 { margin: 0 0 8px; font-size: var(--heading-size); }

h2.band {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--heading-size);
  letter-spacing: 0.04em;
}

h2.band::before { content: none; }

.subhead {
  margin: 16px 0 6px;
  color: var(--accent);
  font-size: var(--meta-size);
  font-weight: 700;
  letter-spacing: 0.06em;
}

h2.band + .subhead { margin-top: 12px; }

.value { margin: 0; overflow-wrap: break-word; }

.semantic,
.shaft-name {
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
  line-height: 1.5;
}

.keep { white-space: nowrap; }

.muted,
.value.muted { color: var(--muted); }

.field-label { margin: 0 0 4px; color: var(--muted); font-size: var(--meta-size); }

.prose { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.hint { margin-left: 6px; color: var(--muted); font-size: var(--meta-size); }

.source {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--meta-size);
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
}

.source-when {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.points,
.plain-list { margin: 4px 0 0; padding-left: 1.2rem; }

.points li,
.plain-list li { padding: 4px 0; }

.scroll-hint { display: none; margin: 0 0 8px; }

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 76px;
}

.spec-matrix {
  display: flex;
  width: max-content;
  min-width: 100%;
}

.spec-col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.spec-col > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  line-height: 1.2;
  background: var(--bg);
}

.spec-col .colh { min-width: 72px; font-size: var(--body-size); font-weight: 700; }

.spec-col .num {
  min-width: 72px;
  font-size: var(--angle-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.spec-col .is-unknown {
  min-width: 72px;
  color: var(--muted);
  font-size: var(--unknown-size);
  font-weight: 400;
}

.pin-col {
  position: sticky;
  left: 0;
  z-index: 4;
  flex: none;
  width: 76px;
  background: var(--label-bg);
  box-shadow: 1px 0 0 var(--line);
  scroll-snap-align: none;
}

.pin-col > div {
  justify-content: flex-start;
  min-width: 72px;
  color: var(--text);
  font-size: var(--meta-size);
  font-weight: 700;
  background: var(--label-bg);
}

.spec-pairs {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.spec-pairs th,
.spec-pairs td {
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.spec-pairs td,
.spec-pairs .value,
.spec-pairs .semantic,
.spec-pairs .shaft-name,
.spec-pairs .keep,
.spec-pairs .shaft-line {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shaft-line { display: block; }

.spec-pairs th {
  width: var(--label-col);
  background: var(--label-bg);
  color: var(--text);
  font-size: var(--meta-size);
  font-weight: 700;
}

.needs-check,
.unknown { margin-top: 16px; font-size: var(--meta-size); }

.footnotes {
  margin-top: var(--section-gap);
  color: var(--muted);
  font-size: var(--meta-size);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footnotes p { margin: 0 0 8px; }

.fn {
  margin-left: 0.15em;
  font-size: 0.85em;
  white-space: nowrap;
}

.site-footer {
  margin-top: var(--section-gap);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--meta-size);
}

@media (min-width: 800px) {
  .filters { grid-template-columns: repeat(3, 1fr); align-items: end; }
  .filter-actions .button,
  .search-box .button { width: auto; min-width: 8rem; }
  .photo-empty { height: 180px; }
}

@media (max-width: 720px) {
  .scroll-hint { display: block; }
}
