:root {
  --ink: #333333;
  --muted-ink: #5f6368;
  --paper: #ffffff;
  --soft: #f2f2f2;
  --line: #949494;
  --forest: #00118f;
  --leaf: #2f62d6;
  --berry: #00118f;
  --gold: #00118f;
  --white: #ffffff;
  --shadow: 0 2px 8px 1px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.3);
  color-scheme: light;
  font-family:
    "Noto Sans JP", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset, 118px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
}

.skip-link:focus {
  top: 16px;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(16px, 5vw, 64px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-grid;
  gap: 5px;
  align-items: start;
  min-width: 190px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo-space {
  display: flex;
  width: 190px;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.brand-logo-space img {
  display: block;
  width: 100%;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-name {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.site-nav a {
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 1.41rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(0, 17, 143, 0.08);
  color: var(--forest);
}

.site-nav a[aria-current="page"] {
  background: rgba(0, 17, 143, 0.1);
  color: var(--forest);
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 88px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.language-switch button,
.nav-toggle {
  border: 0;
  background: transparent;
  color: var(--muted-ink);
  cursor: pointer;
}

.language-switch button {
  min-height: 30px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"] {
  background: var(--forest);
  color: var(--white);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: auto;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  padding: clamp(72px, 9vw, 112px) clamp(20px, 6vw, 72px);
  color: var(--ink);
  background: var(--white);
  text-align: center;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  display: none;
}

.hero-overlay {
  display: none;
}

.hero-inner {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: none;
  font-size: clamp(2.25rem, 7vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.hero-lead {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(1rem, 2.2vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  justify-content: center;
}

.home-menu {
  background: var(--soft);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-card {
  display: grid;
  min-height: 236px;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 24px;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.home-card:hover {
  border-color: rgba(0, 17, 143, 0.34);
  box-shadow: 0 16px 34px rgba(22, 28, 45, 0.1);
  transform: translateY(-2px);
}

.home-card span {
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 900;
}

.home-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.home-card p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  border-radius: 8px;
  background: var(--forest);
  color: var(--white);
  padding: 10px 18px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  border-color: var(--forest);
  background: var(--white);
  color: var(--forest);
}

.admin-shell .button.secondary,
.section .button.secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
}

.stat-item {
  padding: 28px clamp(20px, 5vw, 56px);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-item strong {
  display: block;
  font-size: clamp(1.7rem, 2.4rem, 2.4rem);
  line-height: 1;
}

.stat-item span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.section {
  padding: clamp(56px, 7vw, 80px) clamp(20px, 6vw, 72px);
}

.page-hero {
  min-height: calc(100vh - var(--header-offset, 118px) - 180px);
}

.section.muted {
  background: var(--soft);
}

.two-column,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading.compact {
  grid-template-columns: 1fr;
}

.section-heading p,
.section-lead {
  margin: 0;
  color: var(--muted-ink);
  font-size: 1.08rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.make-section {
  background: var(--soft);
}

.make-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.make-card {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 28px;
  box-shadow: var(--shadow);
}

.make-card span {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 17, 143, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 900;
}

.make-card p {
  margin: 12px 0 0;
  color: var(--muted-ink);
}

.company-grid {
  display: block;
  max-width: 920px;
}

.company-list {
  display: grid;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.company-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-bottom: 1px solid var(--line);
}

.company-row dt {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
  padding: 18px 24px;
}

.company-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  padding: 18px 24px;
}

.company-row:last-child {
  border-bottom: 0;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(22, 28, 45, 0.06);
}

.product-photo-slot {
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 17, 143, 0.06), rgba(255, 255, 255, 0.7)),
    var(--soft);
  color: var(--muted-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.product-photo-slot img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  object-position: center;
}

.product-photo-slot span {
  padding: 18px;
  text-align: center;
  white-space: pre-line;
}

.product-intro {
  display: grid;
  gap: 5px;
  max-width: 920px;
  margin: -12px 0 24px;
  padding-left: 1.2rem;
  color: var(--muted-ink);
  line-height: 1.45;
}

.product-category {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  text-align: center;
}

.product-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--soft);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 180ms ease;
}

.product-image:hover img {
  transform: scale(1.03);
}

.product-body {
  padding: 18px;
}

.product-body p {
  margin: 8px 0 0;
  color: var(--muted-ink);
  font-size: 0.94rem;
  line-height: 1.45;
}

.product-body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.product-body li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-body dl {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.product-body dl div {
  display: grid;
  grid-template-columns: 7.4rem 1fr;
  gap: 8px;
}

.product-body dt {
  color: var(--ink);
  font-weight: 900;
}

.product-body dd {
  margin: 0;
  color: var(--muted-ink);
}

.cta-section {
  padding: clamp(72px, 8vw, 112px) clamp(20px, 6vw, 72px);
  background: var(--soft);
  color: var(--ink);
}

.contact-page {
  display: grid;
  min-height: calc(100vh - var(--header-offset, 118px) - 180px);
  align-items: center;
}

.cta-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(0, 17, 143, 0.22);
  border-radius: 8px;
  background: var(--white);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: 0 18px 44px rgba(22, 28, 45, 0.08);
  text-align: center;
}

.cta-inner p:not(.eyebrow) {
  color: var(--muted-ink);
  font-size: 1.08rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 40px clamp(20px, 6vw, 72px);
  background: var(--ink);
  color: var(--white);
}

.site-footer .brand-logo-space {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 236, 245, 0.78)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  padding: 7px 0;
}

.site-footer .brand-name {
  color: var(--white);
  transform: translateX(1px);
}

.site-footer p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links:empty {
  display: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
  text-decoration: none;
}

.floating-top-button {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 30;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(0, 17, 143, 0.28);
  text-decoration: none;
}

.floating-top-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

section[id],
.hero {
  scroll-margin-top: var(--header-offset, 118px);
}

.site-error {
  position: fixed;
  inset: 12px 12px auto;
  z-index: 99;
  border: 1px solid #f0b4aa;
  border-radius: 8px;
  background: #fff4f2;
  color: #84251d;
  padding: 12px;
}

.admin-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.admin-header,
.admin-toolbar,
.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-header {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 24px;
}

.admin-header h1 {
  color: var(--ink);
  font-size: clamp(2rem, 3rem, 3rem);
}

.admin-toolbar {
  grid-template-columns: repeat(3, max-content) 1fr;
  align-items: center;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 12;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
}

.admin-status {
  color: var(--muted-ink);
  font-size: 0.92rem;
}

.admin-grid {
  grid-template-columns: 220px minmax(0, 1fr) minmax(360px, 0.58fr);
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}

.admin-sidebar h2 {
  margin: 0;
  font-size: 1rem;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar a {
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 10px;
  text-decoration: none;
}

.admin-sidebar a:hover {
  background: var(--soft);
  color: var(--forest);
}

.editor-form,
.json-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.editor-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.editor-form fieldset {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  scroll-margin-top: 96px;
}

.editor-form legend,
.json-panel h2 {
  color: var(--ink);
  font-weight: 900;
  padding: 0 8px;
}

.editor-field {
  display: grid;
  gap: 8px;
}

.editor-field span {
  color: var(--muted-ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.editor-field input,
.editor-field textarea,
.json-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
}

.product-editor {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.product-editor:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.image-path-hint {
  margin: -4px 0 8px;
  color: var(--muted-ink);
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.nested-editor {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.nested-editor h4 {
  margin: 0;
}

.json-panel {
  position: sticky;
  top: 24px;
  overflow: hidden;
}

.json-panel-header {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.json-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.json-panel-header p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.86rem;
}

.json-panel textarea {
  min-height: 720px;
  border: 0;
  border-radius: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto 1fr;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .nav-toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .language-switch {
    justify-self: end;
  }

  h1 {
    font-size: clamp(2.45rem, 10vw, 3.2rem);
    max-width: none;
  }

  h2 {
    font-size: clamp(2rem, 8vw, 2.35rem);
  }

  .stats-band,
  .two-column,
  .section-heading,
  .home-grid,
  .make-grid,
  .company-grid,
  .company-row,
  .product-grid,
  .site-footer,
  .admin-header,
  .admin-toolbar,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .stat-item:last-child {
    border-bottom: 0;
  }

  .product-body dl div {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    align-items: stretch;
  }

  .json-panel {
    position: static;
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand {
    min-width: 150px;
  }

  .brand-logo-space {
    width: 150px;
    min-height: 42px;
  }

  .brand-name {
    font-size: 0.74rem;
  }

  .brand-logo-space img {
    max-height: 32px;
  }

  .hero {
    min-height: auto;
    padding: 64px 18px;
  }

  .button {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
