:root {
  --ink: #111827;
  --paper: #fffdfb;
  --paper-soft: #f8f6f0;
  --line: rgba(18, 35, 58, 0.14);
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.1);
  --accent: #e7352a;
  --accent-dark: #b81f18;
  --accent-soft: #fff0ec;
  --font-ja: "Noto Sans JP", system-ui, sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ja);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 252, 0.74)),
    radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    #f4f6f8;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

.theme-red {
  --accent: #e7352a;
  --accent-dark: #b82017;
  --accent-soft: #fff0ec;
}

.theme-teal {
  --accent: #008a9a;
  --accent-dark: #006878;
  --accent-soft: #eefbfc;
}

.theme-blue {
  --accent: #053aa3;
  --accent-dark: #062668;
  --accent-soft: #edf3ff;
}

.sample-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--accent-dark);
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 8px;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.back-link {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.page {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 34px 24px 52px;
}

.lead {
  max-width: 940px;
  min-width: 0;
  margin: 0 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 900;
}

.lead h1 {
  margin: 0;
  color: var(--ink);
  font-size: 38px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.lead p {
  margin: 14px 0 0;
  color: #31435b;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 600;
}

.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.html-poster,
.reference {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.html-poster {
  overflow: hidden;
}

.service-poster {
  background:
    linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.95) 70%),
    var(--paper);
}

.poster-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(28px, 3vw, 42px);
  align-items: center;
  min-height: 0;
  padding: clamp(26px, 3vw, 34px) clamp(28px, 4.5vw, 46px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.96) 58%, color-mix(in srgb, var(--accent-soft) 52%, #fff) 100%),
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 32%),
    #fff;
  border-bottom: 1px solid rgba(18, 35, 58, 0.1);
}

.poster-hero::after {
  display: none;
}

.poster-title {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 560px;
}

.poster-title .kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding-bottom: 9px;
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.poster-title .sub-kicker {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 23px;
  line-height: 1.45;
  font-weight: 900;
}

.poster-title h2 {
  margin: 0 0 24px;
  color: var(--accent);
  font-size: clamp(46px, 4.8vw, 68px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.poster-title h2.long-title {
  font-size: clamp(42px, 4.1vw, 58px);
}

.poster-title h2.visual-title {
  font-size: clamp(40px, 3.7vw, 52px);
}

.poster-lead {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.75;
  font-weight: 900;
}

.poster-body {
  max-width: 520px;
  margin: 0;
  color: #182233;
  font-size: 15px;
  line-height: 1.9;
  font-weight: 700;
}

.hero-media {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 2 / 3;
  min-width: 0;
  margin: 0;
  justify-self: end;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(18, 35, 58, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f5f8fb);
  box-shadow: 0 18px 42px rgba(31, 52, 72, 0.12);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(var(--feature-count, 5), minmax(0, 1fr));
  gap: 10px;
  padding: 18px 28px 22px;
  background: #fff;
}

.feature-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  min-height: 330px;
  padding: 14px 12px 18px;
  border: 1px solid rgba(18, 35, 58, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.88));
  box-shadow: 0 10px 26px rgba(31, 52, 72, 0.08);
  text-align: center;
}

.feature-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 9px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 900;
}

.feature-card h3 {
  display: grid;
  place-items: center;
  min-height: 62px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 19px;
  line-height: 1.28;
  font-weight: 900;
}

.feature-visual {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 105px;
  margin: 0 0 14px;
  color: var(--accent);
}

.feature-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.feature-visual svg {
  width: 92px;
  height: 92px;
}

.feature-card p {
  margin: 0;
  color: #243244;
  font-size: 13px;
  line-height: 1.78;
  font-weight: 700;
  text-align: left;
}

.icon-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 2px 0 14px;
}

.icon-row span {
  display: grid;
  place-items: center;
  min-height: 34px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.icon-row svg {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
}

.hardware-strip {
  padding: 12px 30px 22px;
  background: #fff;
}

.hardware-strip h3 {
  margin: 0 0 10px;
  color: var(--accent);
  text-align: center;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 900;
}

.hardware-strip img {
  width: 100%;
  border-radius: 10px;
}

.process-band {
  margin: 0 28px 22px;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, var(--accent-soft));
  overflow: hidden;
}

.process-band h3 {
  margin: 0;
  padding: 18px 18px 14px;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  text-align: center;
  font-size: 27px;
  line-height: 1.35;
  font-weight: 900;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(var(--process-count, 5), minmax(0, 1fr));
}

.process-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  min-height: 138px;
  padding: 18px 16px;
  border-left: 1px dotted color-mix(in srgb, var(--accent) 48%, transparent);
}

.process-item:first-child {
  border-left: 0;
}

.process-icon {
  color: var(--accent);
}

.process-icon svg {
  width: 42px;
  height: 42px;
}

.process-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.process-item p {
  margin: 0;
  color: #253243;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 700;
}

.poster-cta {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 0 28px 28px;
  padding: 20px 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 16px;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 26%, transparent);
}

.cta-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
}

.cta-mark svg {
  width: 44px;
  height: 44px;
}

.poster-cta h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 900;
}

.poster-cta p {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 800;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 24px;
  color: var(--accent-dark);
  background: #fff;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

.cta-button svg {
  width: 28px;
  height: 28px;
}

.reference {
  position: sticky;
  top: 78px;
  padding: 14px;
}

.reference h2 {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 900;
}

.reference img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.note {
  margin: 14px 0 0;
  color: #53657a;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 600;
}

@media (max-width: 1260px) {
  .compare {
    grid-template-columns: 1fr;
  }

  .reference {
    position: static;
  }
}

@media (max-width: 920px) {
  .poster-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
    padding: 26px 22px;
  }

  .poster-hero::after {
    display: none;
  }

  .poster-title h2 {
    font-size: 42px;
  }

  .poster-lead {
    font-size: 18px;
  }

  .hero-media {
    width: 100%;
    max-width: 380px;
    margin: 0;
    justify-self: center;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-item {
    border-left: 0;
    border-top: 1px dotted color-mix(in srgb, var(--accent) 48%, transparent);
  }

  .process-item:first-child {
    border-top: 0;
  }

  .poster-cta {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .cta-button {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  html,
  body,
  .sample-header,
  .page,
  .lead,
  .compare,
  .html-poster,
  .reference,
  .service-poster,
  .poster-hero {
    width: 100%;
    max-width: 100vw;
  }

  .page,
  .lead,
  .compare,
  .html-poster,
  .reference,
  .poster-title,
  .poster-lead,
  .poster-body,
  .feature-card,
  .process-item,
  .poster-cta {
    min-width: 0;
    max-width: 100%;
  }

  .lead h1,
  .lead p,
  .poster-title h2,
  .poster-title .kicker,
  .poster-title .sub-kicker,
  .poster-lead,
  .poster-body,
  .feature-card h3,
  .feature-card p,
  .process-item strong,
  .process-item p,
  .poster-cta h3,
  .poster-cta p {
    overflow-wrap: anywhere;
    word-break: break-all;
    line-break: anywhere;
  }

  .sample-header {
    padding: 14px 18px;
  }

  .header-links {
    display: none;
  }

  .page {
    padding: 24px 14px 40px;
  }

  .lead h1 {
    font-size: 28px;
  }

  .lead p {
    font-size: 14px;
  }

  .poster-title .kicker {
    font-size: 15px;
  }

  .poster-title .sub-kicker {
    font-size: 17px;
  }

  .poster-title h2 {
    font-size: 34px;
    line-break: anywhere;
    word-break: break-all;
  }

  .poster-title h2.long-title,
  .poster-title h2.visual-title {
    font-size: 34px;
  }

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

  .feature-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .feature-card {
    min-height: 0;
  }

  .process-band {
    margin: 0 14px 14px;
  }

  .process-band h3 {
    font-size: 21px;
  }

  .poster-cta {
    margin: 0 14px 14px;
    padding: 18px;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .poster-cta h3 {
    font-size: 24px;
  }

  .cta-button {
    width: 100%;
    white-space: normal;
  }

  .hardware-strip {
    padding: 10px 14px 16px;
  }
}
