:root {
  color-scheme: light;
  --paper: #f5f8fd;
  --white: #fff;
  --ink: #112137;
  --muted: #4e6077;
  --line: #d7e2f0;
  --blue: #174dc3;
  --blue-dark: #123b94;
  --ice: #e4efff;
  --cyan: #95dcff;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", "Noto Sans CJK SC", Meiryo, sans-serif;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.24; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.05em; }
h2 { font-size: clamp(1.28rem, 3vw, 1.85rem); letter-spacing: -.025em; }
h3 { letter-spacing: -.018em; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--blue-dark); }
button, input, select { font: inherit; }
button, .button, input, select { min-height: 44px; border-radius: .55rem; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .55rem 1rem; border: 1px solid var(--blue); font-weight: 700;
  color: var(--white); background: var(--blue); cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { color: var(--white); background: var(--blue-dark); }
button:disabled { opacity: .48; cursor: default; }
.secondary { background: var(--white); border-color: var(--line); color: var(--blue); }
.secondary:hover { background: var(--ice); color: var(--blue-dark); }
input, select { border: 1px solid #b9cbe5; padding: .54rem .65rem; width: 100%; min-width: 0; background: var(--white); color: var(--ink); }
input::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 3px solid #b66a11; outline-offset: 3px; }
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; z-index: 2; top: .5rem; left: .5rem; padding: .5rem; background: var(--white); }
.site-header, .site-footer { background: var(--white); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font-weight: 850; letter-spacing: -.04em; color: var(--ink); text-decoration: none; font-size: 1.35rem; }
.site-header nav { display: flex; gap: clamp(.5rem, 3vw, 1.7rem); }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap;
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--blue); text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); font-size: .88rem; }

.hero {
  background-color: #0b1935;
  background-image:
    radial-gradient(ellipse at 80% 15%, #1b55b978, transparent 67%),
    linear-gradient(#a0c7ff13 1px, transparent 1px),
    linear-gradient(90deg, #a0c7ff13 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
  color: var(--white);
}
.hero-inner { padding-block: clamp(2.1rem, 6vw, 5rem); display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: clamp(1.05rem, 6vw, 5rem); }
.hero-name { color: var(--cyan); font-size: clamp(1.12rem, 2.7vw, 1.65rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .25rem; }
.hero h1 { font-size: clamp(2rem, 7vw, 4.65rem); line-height: 1.13; letter-spacing: -.035em; }
.hero-intro { margin-top: 1.15rem; max-width: 35em; color: #e1ebfb; }
.hero-search { display: flex; gap: .45rem; padding: .34rem; background: var(--white); border-radius: .72rem; margin-top: 1.55rem; max-width: 34rem; }
.hero-search input { border-color: transparent; flex: 1; }
.hero-search button { flex: none; }
.feature {
  border: 1px solid #6c98df; border-radius: 1rem; padding: clamp(.9rem, 3vw, 1.6rem);
  background: linear-gradient(135deg, #1d3d76, #13294d);
  min-width: 0; box-shadow: 0 1rem 2.75rem #0613305e, inset 0 1px #a9d8ff28;
}
.feature-top { display: flex; justify-content: space-between; gap: .5rem; color: #cce1ff; font-size: .82rem; font-weight: 650; }
.feature-date { display: flex; align-items: baseline; gap: .55rem; color: var(--cyan); margin: .65rem 0; font-variant-numeric: tabular-nums; }
.feature-date span { font-size: clamp(2.7rem, 7vw, 5.25rem); font-weight: 850; line-height: 1; letter-spacing: -.09em; }
.feature-date small { font-size: clamp(.92rem, 2vw, 1.35rem); }
.feature-model { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; padding-top: .65rem; border-top: 1px solid #5979a9; }
.feature-model a { color: #d1e8ff; font-size: .82rem; display: inline-flex; align-items: center; min-height: 44px; gap: .3rem; }
.feature-model a:first-child { font-size: 1.2rem; text-decoration: none; color: var(--white); font-weight: 750; }
.feature-with-reference { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .65fr); gap: .65rem; align-items: center; margin-block: .65rem; }
.reference-hero { display: block; width: 100%; }
.reference-hero img { display: block; width: 100%; height: auto; max-height: 136px; object-fit: contain; }
.feature-with-reference .feature-date span { font-size: clamp(2.45rem, 5vw, 4.1rem); }

.home-content { padding-block: clamp(1.65rem, 4.5vw, 3.2rem); display: grid; gap: clamp(1.5rem, 4vw, 3.25rem); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.text-link { font-weight: 700; text-decoration: none; font-size: .9rem; }
.text-link:hover { text-decoration: underline; }
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.model-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; min-width: 0; }
.model-top, .model-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .45rem; }
.model-brand { color: var(--blue); font-weight: 760; }
.card-date, .model-code { color: var(--muted); font-size: .8rem; }
.card-date { font-variant-numeric: tabular-nums; }
.model-name { margin: .55rem 0 .3rem; font-size: 1.2rem; }
.model-name a { color: var(--ink); text-decoration: none; }
.model-name a:hover { text-decoration: underline; }
.model-code { margin-bottom: .65rem; }
.model-bottom { margin-top: auto; border-top: 1px solid var(--line); font-weight: 750; font-size: .87rem; align-items: center; }
.model-bottom a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .78rem; }
.model-bottom small { font-weight: 600; color: var(--muted); }
.card-price > span { white-space: nowrap; }
.calendar-callout, .compare-callout { display: flex; justify-content: space-between; align-items: center; gap: .9rem 1.5rem; flex-wrap: wrap; padding: clamp(1rem, 3.2vw, 1.85rem); border-radius: .9rem; }
.calendar-callout { background: #e9f2ff; border: 1px solid #ccdef8; }
.compare-callout, .gallery-panel { background: var(--white); border: 1px solid var(--line); }
.calendar-callout p, .compare-callout p, .home-about p { margin-top: .45rem; color: var(--muted); }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.brand-grid a { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .2rem .5rem; min-height: 54px; padding: .7rem .9rem; background: var(--white); border: 1px solid var(--line); border-radius: .6rem; text-decoration: none; }
.brand-grid strong { color: var(--ink); }
.brand-grid span { font-size: .85rem; }
.home-about .text-link { display: inline-block; margin-top: .65rem; }

.interior { padding-block: clamp(1.35rem, 5vw, 3.5rem); }
.page-title { margin-bottom: 1.45rem; }
.page-title p { color: var(--muted); margin-top: .6rem; }
.filters, .calendar-controls, .compare-select {
  display: grid; gap: .85rem; padding: clamp(.75rem, 3vw, 1.2rem);
  border: 1px solid var(--line); border-radius: .85rem; background: var(--white);
}
.filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters label, .calendar-controls label, .compare-select label { display: grid; align-content: start; gap: .32rem; font-size: .9rem; font-weight: 700; }
.search-wide, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.result-status { margin: 1.15rem 0 .6rem; font-weight: 700; }
.empty { padding: .8rem 1rem; border: 1px dashed #a7bbd6; border-radius: .6rem; color: var(--muted); font-weight: 650; margin: 1rem 0; }
.calendar-controls { grid-template-columns: minmax(0, max-content) minmax(0, 12rem); align-items: end; }
.month-controls { display: flex; gap: .35rem; }
.month-controls button { min-width: 44px; padding-inline: .45rem; }
.month-controls label { flex: 1; }
.event-list, .price-list, .sources-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.event-row, .price-row { display: grid; align-items: center; gap: .6rem; padding: .75rem .55rem; border-bottom: 1px solid var(--line); }
.event-row { grid-template-columns: minmax(6rem, .75fr) minmax(0, 2fr) max-content; }
.event-row small, .price-row small { display: block; color: var(--muted); }
.event-row a { display: inline-flex; min-height: 32px; align-items: center; font-weight: 720; }
.event-row time { font-variant-numeric: tabular-nums; font-size: .85rem; }
.event-chip { border-radius: .4rem; font-size: .75rem; padding: .14rem .47rem; font-weight: 700; background: #ecf0f6; }
.event-chip[data-type="preorder"] { background: #efeaff; }
.event-chip[data-type="release"] { background: var(--ice); color: var(--blue-dark); }
.compare-select { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compare-result { margin-top: 1.15rem; }
.compare-result table { border-collapse: collapse; table-layout: fixed; width: 100%; background: var(--white); }
.compare-result th, .compare-result td { padding: .65rem .5rem; border: 1px solid var(--line); overflow-wrap: anywhere; text-align: start; vertical-align: top; }
.compare-result th { background: #edf4ff; }
.breadcrumb { margin-bottom: .55rem; }
.detail-summary { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1rem; flex-wrap: wrap; border-block: 1px solid var(--line); padding-block: .85rem; }
.detail-summary strong { display: block; font-size: 1.24rem; }
.detail-summary > div > span, .fine-print { color: var(--muted); font-size: .86rem; }
.detail section { margin-top: clamp(1.5rem, 4.5vw, 2.8rem); }
.gallery-panel { padding: 1rem; border-radius: .8rem; }
.gallery-panel p, .fine-print { margin-top: .5rem; }
.gallery-panel a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 700; }
.gallery-links { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
.reference-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .75rem; }
.reference-images figure { min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); }
.reference-images img { display: block; width: 100%; object-fit: contain; }
.reference-images :where(img, .m51g-photo) { height: clamp(8rem, 33vw, 16rem); }
.reference-images figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 .65rem; margin-top: .45rem; }
.reference-images figcaption a { font-size: .83rem; }
.appearance-entry { margin: -.35rem 0 1rem; }
.appearance-card { display: grid; gap: .55rem; align-content: start; min-width: 0; border: 1px solid var(--line); border-radius: .8rem; padding: .7rem; background: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.appearance-card img { display: block; width: 100%; object-fit: contain; }
.appearance-card :where(img, .m51g-photo) { height: clamp(110px, 14vw, 200px); }
.appearance-card strong { color: var(--ink); text-align: center; }
/* The M-51G source image's printed color label starts at row 436 of 502. */
.m51g-photo { display: grid; place-items: center; container-type: size; }
.m51g-photo > span { width: min(100cqw, calc(100cqh * 720 / 425)); aspect-ratio: 720 / 425; overflow: hidden; }
.m51g-photo > span > img { height: auto; }
.selected-photos:has(figure:only-child) { grid-template-columns: minmax(0, 36rem); }
.gallery-panel .selected-photo-image { display: block; cursor: zoom-in; }
.selected-photos figcaption a { min-height: 44px; }
.variant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .65rem; }
.variant { border: 1px solid var(--line); border-radius: .7rem; background: var(--white); padding: .9rem; }
.variant p { color: var(--muted); margin: .3rem 0; font-size: .85rem; }
.facts div { display: grid; grid-template-columns: minmax(7rem, .9fr) minmax(0, 1.2fr); gap: .4rem; border-bottom: 1px solid var(--line); padding: .45rem .25rem; }
.facts dt { color: var(--muted); font-weight: 650; }
.facts dd { overflow-wrap: anywhere; }
.spec-table { margin-top: .55rem; }
.evidence { display: inline-flex; margin-inline-start: .24em; align-items: center; justify-content: center; min-width: 1.2em; font-weight: 700; text-decoration: none; font-size: .85em; }
.price-row { grid-template-columns: 1fr .6fr 1.4fr; }
.sources-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; padding: .45rem .25rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.sources-list li:target { background: var(--ice); }
.sources-list span { color: var(--muted); font-size: .86rem; }
.prose li { margin-block: .6rem; }

@media (max-width: 54rem) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 1.5rem); }
  .header-inner { flex-wrap: wrap; justify-content: center; column-gap: .9rem; row-gap: 0; padding-top: .2rem; }
  .wordmark { min-height: 44px; }
  .site-header nav { justify-content: space-around; width: 100%; gap: .35rem; }
  .site-header nav a { font-size: .83rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-block: 1.25rem; }
  .hero-intro { margin-top: .65rem; }
  .hero-search { margin-top: .85rem; }
  .hero-search button { padding-inline: .75rem; }
  .feature { padding: .7rem .85rem; }
  .feature-date { margin: .28rem 0; }
  .feature-date span { font-size: 2.65rem; }
  .feature-with-reference { margin-block: .15rem; }
  .feature-with-reference .feature-date { margin: 0; }
  .reference-hero img { max-height: clamp(64px, 20vw, 88px); }
  .feature-model { padding-top: .13rem; }
  .feature-model a:first-child { font-size: 1.03rem; }
  .home-content { padding-top: 1.2rem; }
  .model-card { padding: .65rem; }
  .model-top { display: block; }
  .card-date { display: block; }
  .model-name { font-size: 1.05rem; }
  .model-bottom { font-size: .83rem; }
  .brand-grid a { display: block; padding: .55rem; }
  .brand-grid span { display: block; }
  .filters, .compare-select { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-select label:last-child { grid-column: 1 / -1; }
  .compare-result th, .compare-result td { padding: .45rem .28rem; font-size: .78rem; }
  .calendar-controls { grid-template-columns: minmax(0, 1fr); }
  .event-row { grid-template-columns: 4.85rem minmax(0, 1fr) max-content; gap: .35rem; padding-inline: .18rem; }
  .event-row time { font-size: .74rem; }
  .event-chip { font-size: .69rem; padding-inline: .21rem; }
  .variant-grid { grid-template-columns: minmax(0, 1fr); }
  .price-row { grid-template-columns: 1fr max-content; }
  .price-row div:last-child { grid-column: 1 / -1; font-size: .84rem; }
}
