/* ============================================================
   Michi — the app's own look: washi paper and sumi ink, indigo
   dye (藍) as the accent, vermilion seal ink (朱) for stamps,
   the seigaiha wave on indigo cloth, and Mincho display type.
   Tokens mirror Theme.swift and the asset catalogue; small text
   always uses the *-text cuts, which pass WCAG AA.
   ============================================================ */

:root {
    --washi: #F5F0E6;
    --paper: #FFFCF6;
    --hairline: #E6DECF;
    --ink: #1C1A17;
    --muted: #8A8275;
    --muted-text: #6A6357;
    --indigo: #224F80;
    --indigo-text: #224F80;
    --indigo-tint: #E3EAF3;
    --cloth: #1B3F6B;
    --paper-white: #FFFAF2;
    --shu: #C73E2B;
    --shu-text: #B23322;
    --shu-tint: #F8E4DF;
    --listen: #14787A;
    --speak: #C2385A;
    --read: #9A6212;
    --write: #6F54A3;
    --read-text: #8A560C;
    --read-tint: #F6EBD3;
    --write-text: #6F54A3;
    --success-text: #2F7A45;
    --success-tint: #E0EFE3;
    --band: #EEE7D9;
    --shadow: 0 1px 2px rgba(28, 26, 23, .04), 0 10px 30px rgba(28, 26, 23, .07);
    --radius-card: 16px;
    --radius-tile: 10px;
    --serif: 'New York', ui-serif, 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
    --mincho: 'Hiragino Mincho ProN', 'Shippori Mincho', 'Yu Mincho', 'Noto Serif JP', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    /* Seigaiha: overlapping wave scales, drawn back to front on indigo cloth */
    --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 40 20'%3E%3Cdefs%3E%3Cg id='w' fill='%231B3F6B' stroke='%23FFFAF2' stroke-opacity='.13' stroke-width='.9'%3E%3Ccircle r='19.5'/%3E%3Ccircle r='13.5'/%3E%3Ccircle r='7.5'/%3E%3C/g%3E%3C/defs%3E%3Crect width='40' height='20' fill='%231B3F6B'/%3E%3Cuse href='%23w' x='0' y='-10'/%3E%3Cuse href='%23w' x='40' y='-10'/%3E%3Cuse href='%23w' x='20' y='0'/%3E%3Cuse href='%23w' x='0' y='10'/%3E%3Cuse href='%23w' x='40' y='10'/%3E%3Cuse href='%23w' x='20' y='20'/%3E%3Cuse href='%23w' x='0' y='30'/%3E%3Cuse href='%23w' x='40' y='30'/%3E%3Cuse href='%23w' x='20' y='40'/%3E%3C/svg%3E");
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --washi: #161513; --paper: #23211D; --hairline: #37332C; --ink: #F3EEE4;
        --muted: #958D80; --muted-text: #ABA395;
        --indigo: #8DB4E2; --indigo-text: #8DB4E2; --indigo-tint: #1D2B3D;
        --shu-text: #EE7C68; --shu-tint: #3A1E19;
        --read-text: #EDBC55; --read-tint: #33290F; --write-text: #B9A2E6;
        --success-text: #6CC08B; --success-tint: #17301F;
        --band: #1B1A17;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --washi: #161513; --paper: #23211D; --hairline: #37332C; --ink: #F3EEE4;
    --muted: #958D80; --muted-text: #ABA395;
    --indigo: #8DB4E2; --indigo-text: #8DB4E2; --indigo-tint: #1D2B3D;
    --shu-text: #EE7C68; --shu-tint: #3A1E19;
    --read-text: #EDBC55; --read-tint: #33290F; --write-text: #B9A2E6;
    --success-text: #6CC08B; --success-tint: #17301F;
    --band: #1B1A17;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 80px; }
body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    background: var(--washi);
    color: var(--ink);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, .logo-text, .numbers b { font-family: var(--serif); }
[lang="ja"] { font-family: var(--mincho); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--washi); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* === Nav === */
#navbar {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    transition: background .25s, box-shadow .25s, backdrop-filter .25s;
}
#navbar.scrolled {
    background: color-mix(in srgb, var(--washi) 82%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 1px 0 var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-left { display: flex; align-items: center; gap: 6px; }
.nav-back {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; color: var(--muted-text);
}
.nav-back:hover { background: var(--band); color: var(--ink); }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.nav-icon { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--hairline); }
.logo-text { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    font-weight: 600; font-size: .95rem; color: var(--muted-text);
    padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { background: var(--cloth); color: var(--paper-white); padding: 10px 18px; margin-left: 6px; }
.nav-links .nav-cta:hover { color: var(--paper-white); opacity: .9; }
.mobile-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; position: relative; }
.mobile-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.mobile-toggle span:nth-child(1) { top: 15px; }
.mobile-toggle span:nth-child(2) { top: 21px; }
.mobile-toggle span:nth-child(3) { top: 27px; }
.mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* === Shared pieces === */
.eyebrow, .section-tag {
    display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .8rem;
    letter-spacing: .16em; text-transform: uppercase; color: var(--indigo-text); margin-bottom: 14px;
}
.section-tag.red { color: var(--shu-text); }
.eyebrow { color: var(--muted-text); margin-bottom: 20px; }
.eyebrow-seal {
    width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
    background: var(--shu); color: var(--paper-white); font-size: 1.15rem; font-weight: 700;
    letter-spacing: 0; transform: rotate(-4deg);
}

.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2, .path-copy h2, .panel h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.14; letter-spacing: -.02em; font-weight: 700;
    margin-bottom: 14px; text-wrap: balance;
}
.section-head p:not(.section-tag) { color: var(--muted-text); font-size: 1.08rem; text-wrap: pretty; }

.store-badge { display: inline-flex; min-height: 44px; border-radius: 12px; transition: transform .15s, opacity .15s; }
.store-badge img { height: 56px; width: auto; }
.store-badge:hover { opacity: .88; }
.store-badge:active { transform: scale(.98); }

section { padding: 96px 0; }

/* === Hero === */
.hero { padding: 132px 0 72px; position: relative; overflow: hidden; }
.hero::before {
    content: '道'; position: absolute; right: -3%; top: 24px; z-index: 0;
    font: 500 min(54vw, 640px)/1 var(--mincho);
    color: var(--ink); opacity: .04; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.3rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 700;
    margin-bottom: 22px; text-wrap: balance;
}
.hero h1 .hl { color: var(--indigo-text); }
.hero-sub { font-size: 1.2rem; color: var(--muted-text); max-width: 34em; margin-bottom: 32px; text-wrap: pretty; }
.hero-sub [lang="ja"] { color: var(--ink); }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta-note { font-size: .95rem; color: var(--muted-text); font-weight: 600; }

.hero-art { position: relative; justify-self: center; width: min(100%, 340px); }
.device {
    border-radius: 48px; padding: 10px; background: #1C1A17;
    box-shadow: 0 30px 60px -20px rgba(28, 26, 23, .4), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.device img { border-radius: 38px; width: 100%; height: auto; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .device { box-shadow: 0 0 0 1px #3F3B34, 0 30px 60px -20px rgba(0, 0, 0, .6); }
}
:root[data-theme="dark"] .device { box-shadow: 0 0 0 1px #3F3B34, 0 30px 60px -20px rgba(0, 0, 0, .6); }
.float-word {
    position: absolute; left: -72px; bottom: 104px;
    display: flex; align-items: flex-end; gap: 12px;
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card);
    padding: 12px 18px 12px 16px; box-shadow: var(--shadow);
}
.float-word ruby { font-size: 2.6rem; line-height: 1; font-weight: 700; color: var(--ink); }
.float-word rt { font-size: .8rem; font-weight: 500; color: var(--shu-text); letter-spacing: .2em; padding-bottom: 3px; }
.float-word span { font: 600 .95rem var(--sans); color: var(--muted-text); padding-bottom: 5px; }
.float-seal {
    position: absolute; right: -26px; top: 70px;
    width: 64px; padding: 14px 0; border-radius: 14px; text-align: center;
    writing-mode: vertical-rl; text-orientation: upright; display: grid; place-items: center;
    background: var(--shu); color: var(--paper-white); font-size: 1.7rem; font-weight: 700; letter-spacing: .08em;
    transform: rotate(5deg);
    box-shadow: 0 14px 30px -8px rgba(199, 62, 43, .55);
}

@media (prefers-reduced-motion: no-preference) {
    .float-seal { animation: stamp 1s cubic-bezier(.2, .9, .3, 1.3) .5s both; }
    .float-word { animation: rise .8s ease .25s both; }
}
@keyframes stamp { 0% { transform: rotate(5deg) scale(1.5); opacity: 0; } 60% { transform: rotate(5deg) scale(.94); opacity: 1; } 100% { transform: rotate(5deg); opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* === Numbers === */
.numbers { padding: 0 0 24px; }
.numbers-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card);
    overflow: hidden; position: relative; padding-top: 10px;
}
.numbers-grid::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 10px;
    background: var(--cloth) var(--seigaiha) center top / 24px 12px;
}
.numbers-grid li { padding: 26px 14px 22px; text-align: center; border-left: 1px solid var(--hairline); }
.numbers-grid li:first-child { border-left: 0; }
.numbers b { display: block; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.numbers span { display: block; font-size: .9rem; color: var(--muted-text); margin-top: 4px; line-height: 1.35; }

/* === Path === */
.path-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.path-copy { position: sticky; top: 104px; }
.path-copy p:not(.section-tag) { color: var(--muted-text); font-size: 1.08rem; margin-bottom: 14px; text-wrap: pretty; }
.path-copy p [lang="ja"] { color: var(--shu-text); font-weight: 700; }
.path-copy .path-note { font-size: 1rem; padding-top: 14px; border-top: 1px solid var(--hairline); }
.stages { display: grid; gap: 14px; position: relative; }
.stages::before {
    content: ''; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
    background: repeating-linear-gradient(var(--hairline) 0 8px, transparent 8px 14px);
}
.stages li { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center; position: relative; }
.stages li > div {
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card);
    padding: 16px 20px; grid-column: 2 / 4; grid-row: 1; padding-right: 120px;
}
.stages .chip { grid-column: 3; grid-row: 1; margin-right: 18px; z-index: 1; }
.stone {
    width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
    background: var(--shu); color: var(--paper-white); font-size: 1.9rem; font-weight: 700; line-height: 1;
    box-shadow: 0 8px 18px -8px rgba(199, 62, 43, .6); transform: rotate(-3deg);
}
.stages li:nth-child(even) .stone { transform: rotate(2.5deg); }
.stages h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.stages p { font-size: 1rem; color: var(--ink); line-height: 1.4; }
.stages small { display: block; font-size: .88rem; color: var(--muted-text); margin-top: 4px; }
.chip {
    font-size: .78rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--hairline); color: var(--muted-text); background: var(--washi);
}
.chip.solid { background: var(--success-tint); color: var(--success-text); border-color: transparent; }

/* === Four skills === */
.skills { background: var(--band); }
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill {
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card);
    padding: 24px; position: relative; overflow: hidden;
}
.skill::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--skill); }
.skill.listen { --skill: var(--listen); }
.skill.speak { --skill: var(--speak); }
.skill.read { --skill: var(--read); }
.skill.write { --skill: var(--write); }
.skill-seal {
    width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
    background: var(--skill); color: #FFFFFF; font-size: 1.6rem; font-weight: 700; line-height: 1;
}
.skill h3 { font-size: 1.3rem; font-weight: 700; margin: 16px 0 6px; }
.skill p { color: var(--muted-text); font-size: 1rem; text-wrap: pretty; }

.demo-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 16px; }
.demo {
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card);
    padding: 26px; display: flex; flex-direction: column;
}
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.demo-kicker {
    display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 6px;
}
.dot {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    color: #FFFFFF; font-size: .8rem; font-weight: 700; letter-spacing: 0;
}
.dot.read { background: var(--read); }
.dot.write { background: var(--write); }
.demo h3 { font-size: 1.35rem; font-weight: 700; }
.demo-foot { margin-top: auto; padding-top: 16px; font-size: .88rem; color: var(--muted-text); }
.demo-foot a { text-decoration: underline; text-underline-offset: 3px; }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: .95rem; color: var(--muted-text); }
.switch-track { width: 46px; height: 28px; border-radius: 999px; background: var(--muted); position: relative; transition: background .2s; flex: none; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch[aria-pressed="true"] { color: var(--ink); }
.switch[aria-pressed="true"] .switch-track { background: var(--read); }
.switch[aria-pressed="true"] .switch-thumb { transform: translateX(18px); }

.passage {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 2.5; font-weight: 500;
    padding: 14px 4px 4px; word-break: keep-all; overflow-wrap: anywhere;
}
.passage .nb { white-space: nowrap; }
.passage .w {
    font: inherit; padding: 2px 3px; margin: 0 1px; border-radius: 8px; line-height: 1.3;
    border-bottom: 2px dotted var(--read); transition: background .15s;
}
.passage .w:hover { background: var(--read-tint); }
.passage .w[aria-pressed="true"] { background: var(--read-tint); border-bottom-style: solid; }
.passage rt { font-size: .42em; color: var(--read-text); font-weight: 500; letter-spacing: .04em; transition: opacity .2s; }
.passage.no-furigana rt { opacity: 0; }
.lookup {
    min-height: 60px; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-tile);
    background: var(--washi); border: 1px solid var(--hairline);
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
}
.lookup-hint { color: var(--muted-text); font-size: .98rem; }
.lookup b { font: 700 1.4rem var(--mincho); }
.lookup i { font: 500 1.05rem var(--mincho); color: var(--read-text); font-style: normal; }
.lookup span.gloss { font-weight: 600; }

.pill-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
    background: var(--washi); border: 1px solid var(--hairline); color: var(--write-text); font-weight: 600; font-size: .95rem;
    white-space: nowrap;
}
.pill-btn:hover { background: var(--band); }
.pad {
    align-self: center; width: min(100%, 300px); aspect-ratio: 1; border-radius: var(--radius-tile);
    background: var(--washi); border: 1.5px solid color-mix(in srgb, var(--shu) 55%, transparent);
}
.pad svg { width: 100%; height: 100%; display: block; }
.pad .guide { stroke: var(--shu); stroke-opacity: .4; stroke-width: .5; stroke-dasharray: 2.4 2.4; }
.pad polyline { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.pad .ghost polyline { stroke: var(--muted); stroke-opacity: .22; }
.pad .ink polyline { stroke: var(--indigo); }
.pad text { font: 700 4px var(--sans); fill: var(--write-text); text-anchor: middle; dominant-baseline: central; }

/* === Features === */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
    background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 26px;
}
.feature h3 { font-size: 1.25rem; font-weight: 700; margin: 16px 0 8px; letter-spacing: -.01em; }
.feature p { color: var(--muted-text); font-size: 1rem; text-wrap: pretty; }
.ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.ico svg { width: 24px; height: 24px; }
.ico.indigo { background: var(--indigo-tint); color: var(--indigo-text); }
.ico.shu { background: var(--shu-tint); color: var(--shu-text); }
.ico.gold { background: var(--read-tint); color: var(--read-text); }
.ico.green { background: var(--success-tint); color: var(--success-text); }

.habit {
    margin-top: 16px; display: grid; grid-template-columns: 1fr minmax(0, 400px); gap: 32px; align-items: center;
    background: var(--cloth) var(--seigaiha); color: var(--paper-white);
    border-radius: var(--radius-card); padding: 30px 32px;
}
.habit h3 { font-size: 1.45rem; font-weight: 700; margin-bottom: 6px; }
.habit p { color: rgba(255, 250, 242, .88); max-width: 32em; }
.notice {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px;
    background: rgba(255, 250, 242, .94); color: #1C1A17; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
}
.notice img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.notice b { display: block; font-size: .98rem; line-height: 1.3; }
.notice span { font-size: .95rem; line-height: 1.4; }
.notice [lang="ja"] { font-family: var(--sans); }

/* === Screens === */
.gallery-wrap { position: relative; }
.gallery {
    display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px 4px 20px; scrollbar-width: thin; scrollbar-color: var(--hairline) transparent;
}
.shot { flex: 0 0 248px; scroll-snap-align: start; }
.shot img {
    width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--hairline);
    box-shadow: var(--shadow); background: var(--cloth);
}
.scroll-btn {
    position: absolute; top: 44%; z-index: 2; width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center; background: var(--paper); border: 1px solid var(--hairline);
    box-shadow: var(--shadow); transition: opacity .2s;
}
.scroll-btn.prev { left: -20px; }
.scroll-btn.next { right: -20px; }
.scroll-btn[disabled] { opacity: 0; pointer-events: none; }

/* === Languages + privacy === */
.twin { background: var(--band); }
.twin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--paper); border: 1px solid var(--hairline); border-radius: 22px; padding: 34px; }
.panel h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.panel > p:not(.section-tag) { color: var(--muted-text); margin-bottom: 20px; }
.langs { display: flex; flex-wrap: wrap; gap: 10px; }
.langs li {
    padding: 9px 16px; border-radius: 999px; background: var(--washi); border: 1px solid var(--hairline);
    font-weight: 600; font-size: .98rem; font-family: var(--sans);
}
.checks { display: grid; gap: 14px; margin: 6px 0 22px; }
.checks li { position: relative; padding-left: 34px; color: var(--muted-text); }
.checks li b { color: var(--ink); font-weight: 700; }
.checks li::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 7px;
    background: var(--success-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C8F55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.text-link { font-weight: 700; color: var(--indigo-text); display: inline-flex; min-height: 44px; align-items: center; }
.text-link:hover { text-decoration: underline; }

/* === Premium === */
.compare {
    max-width: 760px; margin: 0 auto; background: var(--paper); border: 1px solid var(--hairline);
    border-radius: var(--radius-card); overflow: hidden;
}
.compare-head, .compare tr { display: grid; grid-template-columns: 1fr 110px 110px; align-items: center; }
.compare-head { padding: 16px 22px; border-bottom: 1px solid var(--hairline); font: 700 1rem var(--serif); }
.compare-head span { text-align: center; }
.compare-head span:last-child { color: var(--indigo-text); }
.compare table { width: 100%; border-collapse: collapse; display: block; }
.compare tbody { display: block; }
.compare tr { padding: 14px 22px; border-bottom: 1px solid var(--hairline); }
.compare tr:last-child { border-bottom: 0; }
.compare th { text-align: left; font-weight: 600; font-size: 1rem; }
.compare td { text-align: center; font-size: 0; }
.yes, .no { display: inline-flex; align-items: center; justify-content: center; font-size: 0; }
.yes::before, .no::before { content: ''; }
.yes::before {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--success-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C8F55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.no::before { width: 14px; height: 2px; border-radius: 2px; background: var(--muted); }
.plans { max-width: 640px; margin: 22px auto 0; text-align: center; color: var(--muted-text); font-size: .98rem; text-wrap: pretty; }

/* === CTA === */
.cta { background: var(--cloth) var(--seigaiha); color: var(--paper-white); text-align: center; position: relative; overflow: hidden; }
.cta::before {
    content: '道'; position: absolute; right: -2%; bottom: -24%;
    font: 500 min(60vw, 520px)/1 var(--mincho); color: var(--paper-white); opacity: .07;
}
.cta .wrap { position: relative; }
.cta-icon { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 250, 242, .18); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.02em; line-height: 1.14; margin-bottom: 12px; text-wrap: balance; }
.cta p { font-size: 1.12rem; max-width: 34em; margin: 0 auto 28px; color: var(--paper-white); }
.cta-row { display: flex; justify-content: center; }

/* === Footer === */
footer { padding: 40px 0; border-top: 1px solid var(--hairline); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font: 700 1.05rem var(--serif); }
.footer-logo img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px var(--hairline); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--muted-text); font-weight: 600; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { width: 100%; color: var(--muted-text); font-size: .88rem; }
.footer-copy a { text-decoration: underline; }

/* === Reveal === */
@media (prefers-reduced-motion: no-preference) {
    .js [data-animate] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
    .js [data-animate].visible { opacity: 1; transform: none; }
}

/* === Responsive === */
@media (max-width: 1000px) {
    .numbers-grid { grid-template-columns: repeat(3, 1fr); }
    .numbers-grid li:nth-child(4) { border-left: 0; }
    .numbers-grid li:nth-child(n+4) { border-top: 1px solid var(--hairline); }
    .skill-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .habit { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-links {
        position: absolute; top: 68px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 2px;
        background: color-mix(in srgb, var(--paper) 92%, transparent);
        -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
        border: 1px solid var(--hairline); border-radius: 20px; padding: 8px; box-shadow: var(--shadow);
        opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
    }
    .nav-links.open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: 12px 14px; font-size: 1.02rem; }
    .nav-links .nav-cta { margin: 6px 0 0; justify-content: center; }
    .mobile-toggle { display: block; }
    #navbar:has(.nav-links.open) { background: color-mix(in srgb, var(--washi) 82%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

    .hero { padding: 108px 0 56px; }
    .hero-grid, .path-grid, .twin-grid, .demo-grid { grid-template-columns: 1fr; }
    .hero-grid { gap: 48px; }
    .hero-art { width: min(78%, 300px); }
    .float-word { left: -16%; bottom: 80px; }
    .float-seal { right: -12%; }
    .path-grid { gap: 32px; }
    .path-copy { position: static; }
    section { padding: 72px 0; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .hero h1 { font-size: 2.45rem; }
    .hero-sub { font-size: 1.08rem; }
    .hero-cta-row { gap: 12px; }
    .cta-note { width: 100%; }
    .hero-art { width: 66%; }
    .float-word { left: -24%; bottom: 52px; padding: 8px 12px 8px 10px; gap: 8px; }
    .float-word ruby { font-size: 1.9rem; }
    .float-word span { font-size: .82rem; padding-bottom: 3px; }
    .float-seal { width: 48px; font-size: 1.25rem; padding: 10px 0; border-radius: 11px; right: -18%; top: 44px; }
    .numbers-grid { grid-template-columns: repeat(2, 1fr); }
    .numbers-grid li { border-left: 0; border-top: 1px solid var(--hairline); padding: 22px 12px 18px; }
    .numbers-grid li:nth-child(-n+2) { border-top: 0; }
    .numbers-grid li:nth-child(even) { border-left: 1px solid var(--hairline); }
    .numbers b { font-size: 1.7rem; }
    .stages li { grid-template-columns: 44px 1fr; gap: 12px; }
    .stages::before { left: 21px; }
    .stone { width: 44px; height: 44px; font-size: 1.45rem; border-radius: 11px; }
    .stages li > div { grid-column: 2; padding: 14px 16px 44px; }
    .stages .chip { grid-column: 2; justify-self: start; align-self: end; margin: 0 0 12px 16px; }
    .skill-grid, .feature-grid { grid-template-columns: 1fr; }
    .skill, .feature, .demo { padding: 22px; }
    .habit { padding: 24px 22px; }
    .demo-head { flex-wrap: wrap; }
    .passage { line-height: 2.7; }
    .shot { flex-basis: 70%; }
    .scroll-btn { display: none; }
    .panel { padding: 24px; }
    .compare-head, .compare tr { grid-template-columns: 1fr 60px 76px; padding-left: 16px; padding-right: 12px; }
    .compare th { font-size: .94rem; }
    .section-head { margin-bottom: 36px; }
}
