:root {
  --primary: #e63946;
  --primary-strong: #9a1f2d;
  --accent-text: #9f1d2c;
  --accent-fill: #a5232f;
  --primary-muted: #fce6eb;
  --background: #f1faee;
  --surface: #ffffff;
  --surface-subtle: #e8f4f8;
  --text: #264653;
  --text-muted: #6b7280;
  --text-tertiary: #9ca3af;
  --divider: rgba(38, 70, 83, 0.16);
  --shadow: rgba(38, 70, 83, 0.14);
  --shadow-soft: rgba(38, 70, 83, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a1a;
    --surface: #262626;
    --surface-subtle: #333333;
    --text: #ffffff;
    --text-muted: #d1d5db;
    --text-tertiary: #9ca3af;
    --accent-text: #ff8a93;
    --accent-fill: #b42335;
    --primary-muted: #4a111a;
    --divider: rgba(255, 255, 255, 0.15);
    --shadow: rgba(0, 0, 0, 0.45);
    --shadow-soft: rgba(0, 0, 0, 0.28);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Noto Sans TC", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--background) 88%, transparent);
  border-bottom: 1px solid var(--divider); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand__icon { width: 40px; height: 40px; border-radius: var(--radius-md); }
.brand__name, .brand__label { display: block; }
.brand__name { font-family: "Noto Sans JP", "Noto Sans TC", sans-serif; font-size: 16px; font-weight: 700; line-height: 1.2; }
.brand__label { color: var(--text-muted); font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a { border-radius: 999px; color: var(--text-muted); font-size: 14px; padding: 7px 12px; }
.site-nav a:hover, .site-nav a:focus-visible { background: var(--primary-muted); color: var(--accent-text); }
.hero, .section { margin: 0 auto; max-width: var(--max-width); padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 48px); }
.hero { display: grid; grid-template-columns: minmax(0, .88fr) minmax(320px, 1.12fr); gap: clamp(40px, 7vw, 84px); min-height: calc(100svh - 69px); align-items: center; }
.eyebrow { color: var(--accent-text); font-size: 13px; font-weight: 700; margin: 0 0 12px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Noto Sans JP", "Noto Sans TC", sans-serif; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin-bottom: 20px; max-width: 8em; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin-bottom: 14px; }
h3 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.25; margin-bottom: 10px; }
.hero__lead { color: var(--text-muted); font-size: clamp(17px, 1.8vw, 20px); max-width: 35rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { align-items: center; border: 1px solid var(--divider); border-radius: var(--radius-md); display: inline-flex; font-weight: 700; min-height: 48px; padding: 0 18px; transition: background 180ms ease, border-color 180ms ease, transform 180ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.button--primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.button--primary:hover, .button--primary:focus-visible { background: var(--primary-strong); }
.button--secondary { background: var(--surface); color: var(--text); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
.hero__visual { min-height: 620px; position: relative; }
.phone, .screenshot { background: var(--surface); border: 1px solid var(--divider); box-shadow: 0 20px 48px var(--shadow); overflow: hidden; }
.phone { border-radius: 34px; padding: 10px; position: absolute; }
.phone img, .screenshot img { border-radius: inherit; height: auto; width: 100%; }
.phone--front { left: 0; max-width: 330px; top: 0; z-index: 2; }
.phone--back { bottom: 0; max-width: 380px; right: 0; z-index: 1; }
.intro-strip { border-bottom: 1px solid var(--divider); border-top: 1px solid var(--divider); display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 28px; padding-top: 28px; }
.intro-strip div { align-items: baseline; display: grid; gap: 10px; grid-template-columns: auto 1fr; }
.intro-strip p { color: var(--text-muted); margin: 0; }
.metric { color: var(--accent-text); font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 700; }
.section__header { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__header--wide { max-width: 780px; }
.mode-section { padding-top: 28px; }
.mode-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-lg); box-shadow: 0 12px 30px var(--shadow-soft); display: flex; flex-direction: column; min-height: 230px; padding: 26px; }
.mode-card--active { border-color: var(--accent-fill); box-shadow: 0 14px 36px var(--shadow); }
.mode-card__label { color: var(--accent-text); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.mode-card h3 { margin-bottom: 12px; }
.mode-card h3 a, .notes a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mode-card h3 a:hover, .mode-card h3 a:focus-visible, .notes a:hover, .notes a:focus-visible { color: var(--accent-text); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.mode-card > p:not(.mode-card__label) { color: var(--text-muted); margin-bottom: 20px; }
.mode-card__link { color: var(--accent-text); font-weight: 700; margin-top: auto; }
.mode-card__link:hover, .mode-card__link:focus-visible { text-decoration: underline; }
.section__header p:not(.eyebrow), .step__copy p, .notes p { color: var(--text-muted); }
.walkthrough { display: grid; gap: clamp(48px, 7vw, 88px); }
.step { align-items: center; display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(260px, .74fr) minmax(280px, 1fr); }
.step--reverse { grid-template-columns: minmax(280px, 1fr) minmax(260px, .74fr); }
.step--reverse .step__copy { order: 2; }
.step__copy { max-width: 420px; }
.step__number { align-items: center; background: var(--accent-fill); border-radius: 999px; color: #fff; display: inline-flex; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 700; height: 36px; justify-content: center; margin-bottom: 18px; width: 36px; }
.screenshot { border-radius: var(--radius-xl); padding: 10px; min-width: 0; }
.notes { align-items: start; border-top: 1px solid var(--divider); display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(260px, .7fr) minmax(280px, 1fr); }
.note-list { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.note-list li { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-md); box-shadow: 0 8px 24px var(--shadow-soft); color: var(--text-muted); padding: 16px 18px; }

@media (max-width: 900px) {
  .mode-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .hero__visual { min-height: 760px; }
  .phone--front { max-width: min(68vw, 310px); }
  .phone--back { max-width: min(74vw, 340px); }
  .intro-strip, .step, .step--reverse, .notes { grid-template-columns: 1fr; }
  .step--reverse .step__copy { order: 0; }
}
@media (max-width: 560px) {
  .site-header { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 42px; }
  .hero, .section { padding-left: 16px; padding-right: 16px; }
  .hero__visual { min-height: 560px; }
  .phone { border-radius: 26px; padding: 7px; }
  .phone--front { max-width: 62vw; }
  .phone--back { max-width: 70vw; }
  .button { justify-content: center; width: 100%; }
  .screenshot { border-radius: var(--radius-lg); padding: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
