:root {
  --ink: #172026;
  --muted: #5e6a72;
  --line: #d9e2e7;
  --surface: #ffffff;
  --soft: #f4f7f6;
  --teal: #006d75;
  --teal-dark: #064d52;
  --amber: #f2a900;
  --coral: #d85b48;
  --shadow: 0 16px 44px rgba(23, 32, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 19px;
  font-weight: 800;
  color: var(--teal-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.site-nav button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.65;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav button:hover,
.site-nav button:focus-visible {
  color: var(--teal);
}

.nav-logout-form {
  margin: 0;
}

.admin-site-nav a[aria-current="page"] {
  color: var(--teal-dark);
  background: var(--soft);
  border-radius: 8px;
}

.admin-nav-drawer {
  display: block;
  flex: 1 1 0;
  min-width: 0;
}

.admin-nav-drawer > summary {
  display: none;
}

.admin-site-nav {
  align-items: flex-start;
  width: 100%;
  flex-wrap: wrap;
  max-width: none;
  justify-content: flex-end;
  overflow: visible;
}

.admin-site-nav a,
.admin-site-nav button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-nav-group {
  position: relative;
  flex: 0 0 auto;
}

.admin-nav-group > summary {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.admin-nav-group > summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group > summary::after {
  display: inline-block;
  margin-left: 6px;
  color: currentColor;
  content: "⌄";
  font-size: 12px;
  transform: translateY(-1px);
}

.admin-nav-group > summary:hover,
.admin-nav-group > summary:focus-visible,
.admin-nav-group.is-current > summary {
  color: var(--teal-dark);
}

.admin-nav-group.is-current > summary {
  background: var(--soft);
  border-radius: 8px;
}

.admin-nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.admin-nav-menu a {
  display: block;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 7px;
}

.admin-nav-menu a:hover,
.admin-nav-menu a:focus-visible {
  background: var(--soft);
}

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 72px 24px 96px;
  color: #fff;
  background-color: #12343a;
  background-image:
    linear-gradient(90deg, rgba(8, 30, 36, 0.92), rgba(8, 30, 36, 0.52), rgba(8, 30, 36, 0.18)),
    var(--storefront-hero-image, linear-gradient(135deg, #164c52, #0c2e33));
  background-position: center;
  background-size: cover;
}

.hero-content {
  width: min(720px, 100%);
  margin-left: max(0px, calc((100vw - 1120px) / 2));
}

.lp-hero {
  min-height: calc(92vh - 64px);
  display: flex;
  align-items: center;
  padding: 72px 24px 88px;
  color: #fff;
  background-color: #12343a;
  background-image:
    linear-gradient(90deg, rgba(7, 23, 27, 0.94), rgba(7, 23, 27, 0.58), rgba(7, 23, 27, 0.16)),
    var(--storefront-hero-image, linear-gradient(135deg, #164c52, #0c2e33));
  background-position: center;
  background-size: cover;
}

.storefront-product-hero,
.storefront-hero {
  background-position: center;
}

.lp-hero-content {
  width: min(700px, 100%);
  margin-left: max(0px, calc((100vw - 1120px) / 2));
}

.lp-hero h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 10vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  width: min(600px, 100%);
  margin: 22px 0 0;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.button-primary {
  color: #fff;
  background: var(--teal);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--teal-dark);
}

.button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
}

.button-small {
  min-height: 38px;
  padding: 8px 12px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
}

.button-disabled {
  color: var(--muted);
  background: #e7ecef;
  cursor: not-allowed;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.metric-strip > div {
  min-height: 118px;
  padding: 24px;
  background: var(--soft);
}

.metric-value {
  display: block;
  color: var(--teal);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section.band {
  width: 100%;
  padding-inline: max(16px, calc((100vw - 1120px) / 2));
  background: var(--soft);
}

.section.compact {
  padding-top: 56px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

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

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

.component-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
}

.component-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.component-card > div {
  padding: 20px;
}

.component-card h3,
.component-card p {
  margin-top: 0;
}

.component-card p:last-child {
  margin-bottom: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #e8f4f2;
  font-size: 13px;
  font-weight: 800;
}

.product-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.product-body {
  padding: 18px;
}

.tag {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #dcefee;
  font-size: 12px;
  font-weight: 800;
}

.product-body h3,
.set-row h3,
.rule-grid h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.product-body p,
.set-row p,
.rule-grid p {
  margin: 8px 0 0;
  color: var(--muted);
}

.product-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-status span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.product-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price {
  font-size: 15px;
  font-weight: 900;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.set-list {
  display: grid;
  gap: 12px;
}

.set-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.set-price {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.set-price span {
  font-weight: 900;
}

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

.rule-grid > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--teal);
  border-radius: 8px;
  background: #fff;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.checkout-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
}

.checkout-copy p:last-child {
  margin-bottom: 0;
}

.checkout-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.checkout-panel strong {
  display: block;
  font-size: 34px;
  line-height: 1.1;
}

.checkout-label,
.checkout-note {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.checkout-note {
  margin-top: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

.section-heading h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.legal-list {
  display: grid;
  gap: 12px;
}

.legal-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.legal-row h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.legal-row p {
  margin: 0;
  color: var(--muted);
}
.admin-page {
  background: var(--soft);
}

.admin-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.admin-shell.wide {
  min-height: calc(100vh - 64px);
}

.admin-panel {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-panel h1 {
  margin: 0 0 20px;
  font-size: 32px;
  line-height: 1.2;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.form-stack input {
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.notice,
.error {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
}

.notice {
  color: #5f4300;
  background: #fff2c8;
}

.error {
  color: #7a1d10;
  background: #ffe0db;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.check-row strong {
  white-space: nowrap;
}

.ok {
  color: var(--teal);
}

.ng {
  color: var(--coral);
}

@media (max-width: 820px) {
  .site-header {
    padding: 0 16px;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding-inline: 8px;
  }

  .admin-site-header {
    align-items: center;
    flex-direction: row;
    z-index: 100;
    min-height: 56px;
    padding: 6px 16px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .admin-site-header .brand {
    font-size: 18px;
  }

  .admin-nav-drawer {
    display: block;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .admin-nav-drawer > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--teal-dark);
    background: var(--surface);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }

  .admin-nav-drawer > summary::-webkit-details-marker {
    display: none;
  }

  .admin-nav-drawer > summary::after {
    margin-left: 7px;
    content: "開く";
    color: var(--muted);
    font-size: 11px;
  }

  .admin-nav-drawer[open] > summary::after {
    content: "閉じる";
  }

  .admin-site-nav {
    position: fixed;
    inset: 56px 0 0;
    z-index: 100;
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 6px;
    justify-content: stretch;
    padding: 14px 16px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body:has(.admin-nav-drawer[open]) {
    overflow: hidden;
  }

  .admin-nav-group {
    width: 100%;
  }

  .admin-nav-group > summary {
    padding-inline: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .admin-nav-menu {
    position: static;
    min-width: 0;
    margin-top: 4px;
    box-shadow: none;
  }

  .admin-site-nav > a,
  .admin-site-nav > .nav-logout-form {
    align-self: stretch;
  }

  .admin-site-nav > a,
  .admin-site-nav > .nav-logout-form button {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
    text-align: left;
  }

  .hero {
    align-items: end;
    min-height: 82vh;
    padding: 56px 16px 48px;
    background-position: 60% center;
  }

  .metric-strip,
  .product-grid,
  .component-grid,
  .checkout-section,
  .split-band,
  .rule-grid {
    grid-template-columns: 1fr;
  }

  .lp-hero {
    align-items: end;
    min-height: 82vh;
    padding: 56px 16px 48px;
  }

  .engineer-hero {
    background-position: 58% center;
  }

  .checkout-panel {
    padding: 18px;
  }

  .metric-strip > div {
    min-height: 92px;
  }

  .set-row {
    grid-template-columns: 1fr;
  }

  .set-price {
    justify-content: space-between;
    white-space: normal;
  }

  .legal-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .site-header:not(.admin-site-header) {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding-block: 8px;
  }

  .site-nav:not(.admin-site-nav) {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .site-nav:not(.admin-site-nav) a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

.hero-price {
  margin: 18px 0 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 900;
}

.section-action { margin: 28px 0 0; }
.empty-catalog { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.category-intro > p { max-width: 760px; color: var(--muted); font-size: 18px; }
.spec-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.spec-row { display: flex; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row span { color: var(--muted); }
.checkout-status { margin: 10px 0 0; color: #7a1d10; font-weight: 700; }

.internal-links { display: flex; flex-wrap: wrap; gap: 10px; }
.internal-links a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--teal-dark); background: var(--soft); font-weight: 800; }

.diagnosis-intro { padding-bottom: 32px; }
.diagnosis-intro > p { max-width: 760px; color: var(--muted); font-size: 18px; }

.diagnosis-form {
  display: grid;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

.diagnosis-form fieldset {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
}

.diagnosis-form legend {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

.diagnosis-option {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.diagnosis-option:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 109, 117, 0.12);
}

.diagnosis-option input {
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
}

.diagnosis-option span { display: grid; gap: 2px; }
.diagnosis-option small { color: var(--muted); }
.diagnosis-result h3 { margin: 0; font-size: clamp(28px, 5vw, 44px); }

[hidden] { display: none !important; }

.blog-index .set-row h2 a { color: var(--ink); text-decoration: none; }
.blog-index .set-row h2 a:hover { color: var(--teal); }
.blog-article { max-width: 920px; margin: 0 auto; }
.blog-article .section-heading { max-width: 780px; }
.blog-body { max-width: 780px; font-size: 17px; line-height: 1.9; }
.blog-body h2 { margin-top: 48px; font-size: clamp(26px, 4vw, 36px); }
.blog-body h3 { margin-top: 36px; font-size: 24px; }
.blog-body p, .blog-body li { color: #243840; }
.blog-body li + li { margin-top: 8px; }
.blog-body a { color: var(--teal-dark); font-weight: 800; }
.blog-article .recommendation { margin: 48px 0; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.blog-article .recommendation h2 { margin-top: 0; }
