:root {
  --ink: #28231f;
  --muted: #756d66;
  --paper: #fbfaf7;
  --warm: #f6f1eb;
  --accent: #ce713c;
  --accent-dark: #9a4d25;
  --accent-soft: #f7dfd2;
  --line: rgba(40, 35, 31, .12);
  --card: rgba(255, 255, 255, .88);
  --shadow: 0 22px 60px rgba(59, 44, 32, .12);
  --max: 1180px;
}

body.theme-wakunavi {
  --accent: #df6689;
  --accent-dark: #9f3658;
  --accent-soft: #fbe5ec;
}

body.theme-gincho {
  --ink: #163044;
  --muted: #5f6b72;
  --accent: #b18a2f;
  --accent-dark: #765915;
  --accent-soft: #f1e8ce;
  --warm: #f3f1e9;
  --line: rgba(22, 48, 68, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid rgba(206, 113, 60, .55); outline-offset: 4px; }
::selection { background: var(--accent-soft); }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, .9);
  backdrop-filter: blur(18px);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; color: #28231f; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 5px 14px rgba(40, 35, 31, .12); }
.header-nav { display: flex; align-items: center; gap: 26px; font-size: 13px; font-weight: 700; }
.header-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.header-nav a:hover { color: var(--accent-dark); }
.header-cta { padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff !important; }

.breadcrumb { padding-top: 28px; color: var(--muted); font-size: 12px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .55; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }

.app-hero { position: relative; padding: 34px 0 96px; overflow: hidden; isolation: isolate; }
.app-hero::before,
.app-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.app-hero::before { right: -110px; top: 5px; width: 360px; height: 360px; background: var(--accent-soft); opacity: .85; }
.app-hero::after { left: -90px; bottom: -60px; width: 220px; height: 220px; background: #e8efd8; opacity: .7; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(430px, 1.05fr); gap: clamp(40px, 7vw, 90px); align-items: center; }
.hero-copy { padding-block: 48px; }
.eyebrow { margin: 0 0 14px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.app-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.app-icon { width: 82px; height: 82px; flex: none; border-radius: 22px; box-shadow: 0 12px 28px rgba(40, 35, 31, .16); }
.app-name { margin: 0; font-size: clamp(34px, 4.5vw, 62px); line-height: 1.16; letter-spacing: -.055em; }
.app-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.hero-lead { margin: 0 0 28px; font-size: clamp(18px, 2vw, 24px); font-weight: 700; line-height: 1.7; letter-spacing: -.02em; }
.hero-summary { max-width: 560px; margin: 0 0 30px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 14px; padding: 0 26px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(40, 35, 31, .16); }
.button--outline { border-color: var(--accent); background: rgba(255, 255, 255, .76); color: var(--accent-dark); }
.fact-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.fact { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .66); color: var(--muted); font-size: 12px; font-weight: 700; }

.hero-visual { position: relative; min-height: 570px; }
.visual-backdrop { position: absolute; inset: 35px 0 20px 40px; border-radius: 38px; background: linear-gradient(145deg, var(--accent-soft), rgba(255,255,255,.9)); box-shadow: var(--shadow); }
.hero-shot { position: absolute; overflow: hidden; border: 8px solid var(--ink); background: #fff; box-shadow: 0 24px 45px rgba(40, 35, 31, .2); }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; }
.hero-shot--wide { left: 0; top: 112px; width: 91%; border-radius: 25px; transform: rotate(-2deg); }
.hero-shot--phone { right: 3%; top: 5px; width: 245px; height: 530px; border-radius: 38px; transform: rotate(3deg); }
.hero-shot--phone img { object-position: top; }
.hero-shot--phone-secondary { left: 2%; top: 72px; width: 220px; height: 478px; border-radius: 34px; transform: rotate(-4deg); }
.hero-shot--phone-secondary img { object-position: top; }
.visual-label { position: absolute; right: 8%; bottom: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: 0 8px 22px rgba(40, 35, 31, .12); color: var(--accent-dark); font-size: 12px; font-weight: 800; }

.section { padding: 92px 0; }
.section--warm { background: var(--warm); }
.section-heading { max-width: 720px; margin-bottom: 38px; }
.section-title { margin: 0; font-size: clamp(30px, 3.3vw, 46px); line-height: 1.35; letter-spacing: -.045em; }
.section-intro { margin: 16px 0 0; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { min-height: 230px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: 0 14px 35px rgba(40, 35, 31, .055); }
.feature-number { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; margin-bottom: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 900; }
.feature-card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.5; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; }
.gallery figure { margin: 0; }
.gallery-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.gallery-frame--phone { aspect-ratio: 1290 / 2796; }
.gallery-frame--wide { aspect-ratio: 844 / 390; }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gallery figcaption { padding: 14px 5px 0; color: var(--muted); font-size: 13px; }
.gallery--wakunavi { grid-template-columns: repeat(2, 1fr); }
.gallery--wakunavi figure:first-child { grid-column: 1 / -1; }

.detail-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 7vw, 90px); align-items: start; }
.detail-sticky { position: sticky; top: 110px; }
.check-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.check-list li { position: relative; padding: 22px 0 22px 44px; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "✓"; position: absolute; left: 4px; top: 21px; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; font-weight: 900; }
.check-list strong { display: block; margin-bottom: 4px; font-size: 16px; }
.check-list span { color: var(--muted); font-size: 14px; }
.note-box { margin-top: 26px; padding: 22px 24px; border-left: 4px solid var(--accent); border-radius: 0 16px 16px 0; background: var(--accent-soft); font-size: 13px; }

.cta-section { padding: 78px 0; }
.cta-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 38px; align-items: center; padding: clamp(34px, 6vw, 64px); border-radius: 32px; background: var(--ink); color: #fff; }
.cta-card::after { content: ""; position: absolute; right: -65px; top: -85px; width: 250px; height: 250px; border-radius: 50%; background: var(--accent); opacity: .25; }
.cta-card .eyebrow { color: #f4d6bc; }
.cta-card h2 { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.4; }
.cta-card p { margin: 12px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }
.cta-card .button { position: relative; z-index: 1; width: 100%; border-color: #fff; background: #fff; color: var(--ink); white-space: nowrap; }
.download-panel { position: relative; z-index: 1; display: grid; grid-template-columns: 132px 190px; gap: 18px; align-items: center; }
.qr-code { width: 132px; height: 132px; padding: 8px; border-radius: 16px; background: #fff; }
.download-copy { display: grid; gap: 12px; }
.download-copy p { margin: 0; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.7; }

.related { padding: 10px 0 82px; }
.related-card { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fff; transition: transform .2s, box-shadow .2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.related-card img { width: 58px; height: 58px; border-radius: 16px; }
.related-card strong { display: block; }
.related-card span { color: var(--muted); font-size: 13px; }
.related-arrow { margin-left: auto; color: var(--accent-dark) !important; font-size: 20px !important; }

.site-footer { padding: 38px 0 calc(38px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { width: min(100%, 610px); margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sticky { position: static; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .site-header { height: calc(66px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .brand img { width: 30px; height: 30px; }
  .header-nav a:not(.header-cta) { display: none; }
  .header-cta { padding-inline: 16px; }
  .breadcrumb { padding-top: 22px; }
  .app-hero { padding: 20px 0 70px; }
  .hero-copy { padding-top: 30px; }
  .app-identity { gap: 14px; }
  .app-icon { width: 66px; height: 66px; border-radius: 18px; }
  .app-name { font-size: clamp(31px, 9vw, 42px); }
  .hero-lead { font-size: 18px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .hero-visual { min-height: 390px; }
  .visual-backdrop { inset: 24px 0 10px 18px; border-radius: 28px; }
  .hero-shot--wide { top: 96px; width: 96%; border-width: 6px; border-radius: 18px; }
  .hero-shot--phone { width: 160px; height: 346px; border-width: 6px; border-radius: 27px; }
  .hero-shot--phone-secondary { width: 145px; height: 315px; border-width: 6px; border-radius: 25px; }
  .visual-label { right: 4%; bottom: -2px; }
  .section { padding: 70px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .gallery--wakunavi { grid-template-columns: 1fr; }
  .gallery--wakunavi figure:first-child { grid-column: auto; }
  .cta-card { grid-template-columns: 1fr; padding: 32px 24px; }
  .download-panel { grid-template-columns: 116px minmax(0, 1fr); gap: 14px; }
  .qr-code { width: 116px; height: 116px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer-links { margin-left: 0; }
}

@media (max-width: 380px) {
  .brand span { font-size: 14px; }
  .header-cta { font-size: 12px; }
  .app-name { font-size: 29px; }
  .app-identity { align-items: flex-start; }
  .gallery { grid-template-columns: 1fr; }
  .download-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .download-copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
