:root {
  color-scheme: light;
  --paper: #fbf8f0;
  --ink: #34271e;
  --muted: #66584b;
  --line: #dfd5c5;
  --accent: #794629;
  --olive: #404c36;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.site-header {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-decoration: none;
}
.brand img { border-radius: 9px; }
.site-header nav a, .site-footer a {
  font-size: .85rem;
  font-weight: 650;
  text-underline-offset: .35em;
}
.site-header nav a { color: var(--accent); text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; }
.site-header nav span { margin-left: .3em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 4.6vw, 72px);
  padding-block: 58px 54px;
}
.eyebrow {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  margin-bottom: 20px;
}
h1, .label-panel h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif CJK JP", serif;
  font-weight: 600;
}
h1 {
  font-size: clamp(2.3rem, 4.1vw, 4.35rem);
  line-height: 1.35;
  letter-spacing: .025em;
}
.intro {
  max-width: 28em;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(.95rem, 1.2vw, 1.0625rem);
  line-height: 1.95;
}
.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #e8d7b9;
  box-shadow: 0 15px 40px #62432317;
}
.hero-image { display: block; width: 100%; height: auto; }
.demo-scan-image, .demo-choice-image { position: absolute; inset: 0; height: 100%; opacity: 0; }
[data-stage="1"] .demo-scan-image, [data-stage="2"] .demo-choice-image { opacity: 1; }
.demo-scan-image { filter: brightness(1.006); }
.demo-choice-image { filter: brightness(.973); }
/* 最後の場面へのフェード中も、直前の絵を背景に残す。 */
[data-stage="2"] .demo-scan-image { opacity: 1; }
.demo-phone { display: none; }
.demo-ready .demo-phone {
  display: block;
  position: absolute;
  z-index: 1;
  top: 6%;
  right: 8%;
  height: 88%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: clamp(4px, .75vw, 8px) solid #292622;
  border-radius: 12% / 7%;
  background: #2c211a;
  box-shadow: 0 12px 32px #20150b68, 0 0 0 1px #fff5;
  container-type: inline-size;
}
[data-stage="0"] .demo-phone { opacity: 0; }
.demo-ready .hero-image {
  max-height: 64svh;
  object-fit: cover;
  object-position: left center;
}
.demo-camera, .demo-detail { position: absolute; inset: 0; }
.demo-camera {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #695142;
}
.demo-camera::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("scan-camera.webp") center / cover;
  transform: scale(var(--camera-scale, 1));
}
.demo-viewfinder {
  position: relative;
  width: 56%;
  aspect-ratio: 1;
  border: 2px solid #ffd097;
  border-radius: 12%;
  box-shadow: 0 0 0 100cqi #241a153f;
  overflow: hidden;
}
.demo-scanline {
  position: absolute;
  inset-inline: 4%;
  top: var(--scanline, 12%);
  height: 2px;
  background: #ffd097;
  box-shadow: 0 0 7px #fff0ac;
}
.demo-detected {
  position: absolute;
  bottom: 10%;
  padding: .42em .65em;
  border-radius: 1em;
  color: white;
  background: #2a4b36;
  font-size: 7.5cqi;
  font-weight: 700;
  opacity: 0;
}
[data-detected] .demo-viewfinder { border-color: #a1efb6; box-shadow: 0 0 0 100cqi #241a153f, inset 0 0 13px #a1efb6a0; }
[data-detected] .demo-scanline { opacity: 0; }
[data-detected] .demo-detected { opacity: 1; }
.demo-detail {
  padding: 10% 8%;
  background: #fff8ed;
  color: #34271e;
  font-size: 8cqi;
  line-height: 1.4;
  opacity: 0;
}
.demo-app-bar { display: block; margin-bottom: 12%; font-weight: 700; }
.demo-bean { display: grid; gap: .35em; margin-bottom: 11%; padding: 8%; border-radius: .6em; background: #78482f; color: #fff8ed; }
.demo-bean strong { font-size: 1.15em; }
.demo-detail p { margin-top: .25em; }
[data-stage="2"] .demo-detail { opacity: 1; }
.demo-story {
  display: grid;
  grid-template-areas: "caption";
  margin-top: 14px;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--olive);
  border-radius: 0 6px 6px 0;
  background: #eaece0;
  color: var(--olive);
  font-size: .88rem;
  line-height: 1.65;
}
.demo-story p { grid-area: caption; }
.demo-story p[hidden] { display: block !important; visibility: hidden; }
.demo-story strong { display: block; font-size: 1.1rem; }
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .8rem;
}
.demo-steps { display: flex; flex-wrap: wrap; gap: 5px; }
.demo-steps button {
  min-height: 36px;
  padding: .25em .75em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.demo-steps button[aria-pressed="true"] { background: var(--olive); color: white; border-color: var(--olive); }
.demo-steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.demo-hint { display: none; }

@media (prefers-reduced-motion: no-preference) and (min-height: 470px) {
  .hero:has(.demo-ready) { align-items: start; }
  .demo-ready::after { content: ""; display: block; height: clamp(320px, 58svh, 580px); }
  .demo-ready .demo-sticky { position: sticky; top: 20px; }
  .demo-hint { display: inline; }
  .demo-phone, .demo-scan-image, .demo-choice-image { transition: opacity .25s ease; }
  .demo-detail { transform: translateY(9%); transition: opacity .22s ease, transform .32s ease; }
  [data-stage="2"] .demo-detail { transform: translateY(0); }
  .demo-detected { transition: opacity .15s ease; }
}

@media (prefers-reduced-motion: no-preference) and (min-height: 470px) and (min-width: 721px) {
  .hero:has(.demo-ready) .hero-copy { position: sticky; top: 36px; padding-top: clamp(0px, 4vw, 55px); }
}
.stores { margin-top: 28px; }
.store-badges, .store-statuses { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.store-badges img { display: block; height: 44px; width: auto; }
.store-badges #google-play img { height: 65px; }
.store-statuses p {
  display: flex;
  align-items: baseline;
  gap: .5em;
  color: var(--muted);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: .74rem;
  line-height: 1.5;
}
.store-statuses strong { color: var(--ink); }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  padding-block: 30px;
}
.features > div { padding-inline: clamp(18px, 3vw, 44px); }
.features > div:first-child { padding-inline-start: 0; }
.features > div:last-child { padding-inline-end: 0; }
.features > div + div { border-inline-start: 1px solid var(--line); }
.features h2 { font-size: clamp(1rem, 1.55vw, 1.23rem); line-height: 1.6; }
.features p, .label-panel p { font-size: .92rem; line-height: 1.85; margin-top: 8px; }
.features p { color: var(--muted); }

.label-section { padding-block: 40px; }
.label-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 22px 40px;
  border-radius: 9px;
  padding: clamp(20px, 3.5vw, 44px);
  background: #eaece0;
  color: var(--olive);
}
.label-illustration { display: block; width: 100%; height: auto; border-radius: 6px; }
.label-panel h2 { font-size: clamp(1.35rem, 2.6vw, 2.15rem); line-height: 1.45; }
.paper-link { display: inline-block; text-underline-offset: .2em; }
.label-steps { margin: 15px 0 20px; padding-inline-start: 1.5em; font-size: .9rem; line-height: 1.7; }
.label-steps li + li { margin-top: .4em; }
.label-steps strong { margin-inline-end: .25em; }
.label-button {
  display: inline-flex;
  justify-content: center;
  gap: 1em;
  align-items: center;
  flex: none;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 5px;
  background: var(--olive);
  color: #fffdf4;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
}
.label-button:hover { background: #303c28; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  border-top: 1px solid var(--line);
  padding-block: 20px 30px;
}
.footer-brand { font-size: .92rem; font-weight: 700; }
.footer-brand span { margin-inline-start: .8em; font-size: .8rem; font-weight: 400; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 950px) {
  .shell { width: calc(100% - 64px); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 40px); }
  .site-header { min-height: 68px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 34px; gap: 25px; }
  .demo-ready .hero-image { aspect-ratio: 5 / 4; }
  .demo-ready .demo-phone { right: 6%; }
  .eyebrow { margin-bottom: 12px; }
  h1 { font-size: clamp(2.3rem, 8.5vw, 3.9rem); }
  .intro { margin-top: 15px; }
  .stores { margin-top: 19px; }
  .features { grid-template-columns: minmax(0, 1fr); padding-block: 0; }
  .features > div { padding: 17px 0; }
  .features > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .label-section { padding-block: 28px; }
  .label-panel { grid-template-columns: minmax(0, 1fr); }
}
