/* MD Yohaku — introduction and support page. No external fonts, scripts, or trackers. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --grouped: #f2f2f7;
  --cell: #ffffff;
  --rule: #e5e5ea;
  --accent: #fcb827;
  --accent-text: #a87400;
  --shot-border: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f5f5f7;
    --secondary: #a1a1a6;
    --grouped: #1c1c1e;
    --cell: #2c2c2e;
    --rule: #38383a;
    --accent-text: #fcb827;
    --shot-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.85 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
  font-feature-settings: "palt" 0;
  overflow-wrap: anywhere;
}
:lang(ja) { word-break: auto-phrase; }
h1, h2, h3, .tagline, .lead, p { text-wrap: pretty; }
.nowrap { white-space: nowrap; }
:lang(en) body, body:lang(en) { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 0.2em; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.text { max-width: 640px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand img { width: 28px; height: 28px; filter: drop-shadow(0 0 1px rgba(0,0,0,0.25)); }
.site-header nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.site-header nav a { color: var(--secondary); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[lang] { color: var(--accent-text); }
@media (max-width: 600px) { .site-header nav .optional { display: none; } }

/* Hero */
.hero { text-align: center; padding: 96px 0 56px; }
.hero .icon { width: 128px; height: 128px; margin: 0 auto 28px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.08)) drop-shadow(0 8px 24px rgba(0,0,0,0.12)); }
.hero h1 { font-size: 44px; line-height: 1.2; margin: 0 0 12px; letter-spacing: 0.01em; }
.hero .tagline { font-size: 22px; margin: 0 0 12px; }
.hero .lead { color: var(--secondary); max-width: 34em; margin: 0 auto 36px; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
}
.button.soon { background: var(--grouped); color: var(--text); border: 1px solid var(--rule); cursor: default; }
.button .badge { font-size: 13px; font-weight: 600; background: var(--accent); color: #1d1d1f; border-radius: 999px; padding: 2px 10px; }
.cta .note { font-size: 14px; color: var(--secondary); margin: 0; }
.platforms { font-size: 14px; color: var(--secondary); margin: 20px 0 0; }
@media (max-width: 480px) {
  .hero { padding: 64px 0 40px; }
  .hero h1 { font-size: 36px; }
  .hero .tagline { font-size: 19px; }
}

/* Screenshots */
.shots { padding: 24px 0 24px; }
.mac-shot { border-radius: 12px; border: 1px solid var(--shot-border); box-shadow: var(--shadow); overflow: hidden; }
.phone-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 840px; margin: 0 auto; }
.phone-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
.phone-shot { border-radius: 9% / 4.2%; border: 1px solid var(--shot-border); box-shadow: var(--shadow); overflow: hidden; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--secondary); text-align: center; margin-top: 14px; line-height: 1.5; }
@media (max-width: 640px) {
  .phone-row { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 8px 4px 24px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .phone-row > figure { scroll-snap-align: center; }
  .phone-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin: 0 auto; padding: 0; gap: 16px; }
}

/* Sections */
section.block { padding: 96px 0; border-top: 1px solid var(--rule); }
section.block:first-of-type { border-top: 0; }
@media (max-width: 480px) { section.block { padding: 64px 0; } }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-text); letter-spacing: 0.06em; margin: 0 0 8px; }
h2 { font-size: 30px; line-height: 1.35; margin: 0 0 16px; }
h3 { font-size: 18px; line-height: 1.5; margin: 32px 0 8px; }
p { margin: 0 0 16px; }
.sub { color: var(--secondary); }
@media (max-width: 480px) { h2 { font-size: 25px; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split.wide-media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 800px) { .split, .split.wide-media { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Grouped list, like iOS Settings */
.grouped { list-style: none; margin: 24px 0 0; padding: 4px 0; background: var(--grouped); border-radius: 14px; }
.grouped li { padding: 12px 18px; margin: 0; line-height: 1.6; position: relative; }
.grouped li + li::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; border-top: 1px solid var(--rule); }
.grouped li small { display: block; color: var(--secondary); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.6; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-text); margin-left: 6px; white-space: nowrap; vertical-align: 0.1em; }

/* Character count sample */
.count-card { background: var(--grouped); border-radius: 18px; padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; text-align: center; }
.count-card div { background: var(--cell); border-radius: 12px; padding: 16px 8px; }
.count-card strong { display: block; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.count-card span { font-size: 14px; color: var(--secondary); }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--grouped); border-radius: 18px; padding: 24px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--secondary); font-size: 16px; }
@media (max-width: 800px) { .cards, .cards.two { grid-template-columns: minmax(0, 1fr); } }

code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--grouped); padding: 0.1em 0.35em; border-radius: 5px; }

/* Markdown source example */
.source-card { background: var(--grouped); border-radius: 18px; padding: 24px; }
.source-card .source-label { font-size: 14px; color: var(--secondary); margin: 0; }
.source-card pre { margin: 10px 0 14px; padding: 16px 18px; background: var(--cell); border-radius: 12px; overflow-x: auto; line-height: 1.7; }
.source-card pre code { background: none; padding: 0; font-size: 15px; white-space: pre; }
.source-card .math-render { margin: 10px 0 0; padding: 20px 18px; background: var(--cell); border-radius: 12px; text-align: center; }
.source-card .math-render img { display: inline-block; max-width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .source-card .math-render img { filter: invert(1); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.plan { border: 1px solid var(--rule); border-radius: 18px; padding: 28px; }
.plan.pro { border: 2px solid var(--accent); }
.plan h3 { margin: 0 0 4px; }
.plan .price { font-size: 30px; font-weight: 700; margin: 0 0 12px; }
.plan .price small { font-size: 15px; font-weight: 400; color: var(--secondary); }
.plan ul { margin: 0; padding-left: 1.2em; }
.plan li { margin: 0 0 6px; }
@media (max-width: 640px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 22px; color: var(--secondary); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 12px; }
.contact { margin-top: 48px; background: var(--grouped); border-radius: 18px; padding: 28px; }
.contact h3 { margin-top: 0; }
.contact .mail { font-size: 20px; font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: 14px; color: var(--secondary); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
footer a { color: var(--secondary); }

/* 短いコード（$…$ など）は途中で折り返さない */
p code, li code { white-space: nowrap; }
