:root {
  color-scheme: light dark;
  --background: #edf9e8;
  --surface: #fffdf5;
  --field: rgba(255, 255, 255, 0.72);
  --text: #243f33;
  --muted: rgba(36, 63, 51, 0.68);
  --primary: #9edc8c;
  --primary-strong: #3d8c72;
  --accent: #ff8a66;
  --line: rgba(80, 132, 94, 0.24);
  --shadow: rgba(0, 0, 0, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d1712;
    --surface: #1a2921;
    --field: rgba(38, 59, 49, 0.9);
    --text: #e6f7e8;
    --muted: rgba(230, 247, 232, 0.70);
    --primary: #8cd180;
    --primary-strong: #63b99f;
    --accent: #ffab7a;
    --line: rgba(140, 209, 128, 0.26);
    --shadow: rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--background) 0%, color-mix(in srgb, var(--surface) 72%, var(--background)) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Segoe UI", sans-serif;
  line-height: 1.75;
}

body.legal-page {
  background:
    linear-gradient(135deg, rgba(158, 220, 140, 0.34), transparent 34rem),
    linear-gradient(320deg, rgba(255, 138, 102, 0.16), transparent 30rem),
    linear-gradient(180deg, var(--background) 0%, color-mix(in srgb, var(--surface) 72%, var(--background)) 100%);
}

a {
  color: inherit;
}

.keep-together {
  white-space: nowrap;
}

.policy-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.08;
  vertical-align: middle;
}

.policy-stack.inline {
  display: inline;
  line-height: inherit;
}

.policy-stack.inline span + span::before {
  content: "";
}

.policy-stack.heading,
.policy-stack.title {
  display: flex;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--background) 84%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 8px 18px var(--shadow);
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 18px var(--shadow);
}

.mark::before {
  content: "";
  width: 15px;
  height: 18px;
  border: 2px solid #243f33;
  border-radius: 4px;
  background:
    linear-gradient(#243f33, #243f33) 4px 5px / 7px 2px no-repeat,
    linear-gradient(#243f33, #243f33) 4px 10px / 7px 2px no-repeat;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--field);
}

.nav-links .policy-stack {
  display: inline;
  line-height: inherit;
}

.nav-links .policy-stack span + span::before {
  content: "";
}

.hero-actions .button {
  background: var(--primary);
  color: #243f33;
  border-color: transparent;
}

.hero-actions .policy-stack {
  display: inline;
  line-height: inherit;
}

.hero-actions .policy-stack span + span::before {
  content: "";
}

.button.primary {
  background: var(--primary);
  color: #243f33;
  border-color: transparent;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrap {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.home-hero {
  min-height: min(740px, calc(100vh - 68px));
  display: flex;
  align-items: center;
  padding: 44px 0 24px;
  background:
    linear-gradient(135deg, rgba(158, 220, 140, 0.42), transparent 42%),
    linear-gradient(320deg, rgba(255, 138, 102, 0.20), transparent 44%);
  border-bottom: 1px solid var(--line);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 7vw, 76px);
}

.hero-copy {
  max-width: 620px;
}

.hero-copy h1,
.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead,
.hero p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.legal-hero {
  padding: clamp(38px, 8vw, 76px) 0 clamp(28px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(158, 220, 140, 0.34), transparent 42%),
    linear-gradient(320deg, rgba(255, 138, 102, 0.18), transparent 44%);
}

.legal-hero-inner {
  max-width: 820px;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.doc-shell {
  padding: 28px 0 56px;
}

.faq-shell {
  padding: 28px 0 56px;
}

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

.faq-section {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 18px;
  box-shadow: 0 8px 22px var(--shadow);
  padding: clamp(18px, 3vw, 26px);
}

.faq-section h2 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  color: color-mix(in srgb, var(--text) 88%, var(--primary-strong));
}

.faq-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.45;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.phone-preview {
  width: min(100%, 342px);
  justify-self: center;
  padding: 12px;
  border-radius: 38px;
  background: #243f33;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.24);
}

.phone-top {
  width: 74px;
  height: 5px;
  margin: 5px auto 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.phone-screen {
  min-height: 540px;
  padding: 20px;
  border-radius: 28px;
  background: var(--background);
  overflow: hidden;
}

.screen-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.screen-header span,
.balance-panel span,
.receipt-card span,
.expense-row small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.screen-header strong {
  font-size: 1.45rem;
}

.balance-panel,
.expense-row,
.receipt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px var(--shadow);
}

.balance-panel {
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
}

.balance-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
  line-height: 1.1;
}

.expense-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  margin-top: 10px;
}

.expense-row strong,
.expense-row small {
  display: block;
}

.expense-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #243f33;
  font-weight: 800;
}

.expense-icon.green {
  background: var(--primary);
}

.expense-icon.coral {
  background: var(--accent);
}

.receipt-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
}

.receipt-card strong {
  display: block;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 58%, var(--surface));
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 54px;
}

.card,
.doc {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 8px 22px var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.card {
  padding: 18px;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 34px 0 56px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.doc {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}

.doc-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 28px;
}

.doc-title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.12;
}

.meta {
  color: var(--muted);
  font-weight: 700;
}

.doc h2 {
  margin: 34px 0 10px;
  padding-top: 6px;
  font-size: 1.25rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text) 88%, var(--primary-strong));
}

.doc p {
  margin: 10px 0;
}

.doc ol,
.doc ul {
  padding-left: 1.5rem;
}

.doc li {
  margin: 6px 0;
}

.note {
  border-left: 5px solid var(--accent);
  background: var(--field);
  padding: 12px 14px;
  border-radius: 0 14px 14px 0;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

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

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

  .home-hero {
    min-height: 0;
  }

  .hero-layout,
  .feature-band,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .phone-preview {
    width: min(100%, 330px);
  }

  .phone-screen {
    min-height: 470px;
  }
}
