/* Kansei website. Colours, type and radii follow the iOS app's design tokens
   (KanseiColor, KanseiFont, KanseiMetrics, KanseiShadow). */

:root {
  --red: #E5383B; --deep-red: #C22B2E; --red-tint: #FCE6E0; --blush: #FFFAF8;
  --paper-top: #FEFCFA; --paper-bottom: #FAF8F4; --card: #ffffff; --chip: #F4F1EC; --sand: #ECE8E1;
  --ink: #1C1B19; --ink-soft: #3F3C38; --body: #5E5A54; --muted: #8E8A84; --faint: #A6A19A; --ghost: #B0AAA1;
  --hairline: #EEEAE3; --divider: #F1EDE6; --outline: #E6E1D9;
  --sage-fill: #EAF2E8; --sage: #3E7A4C; --sage-ring: #BFD8C2;
  --kanji-tile: #FCEFEC; --plan-selected: #FCECE7; --plan-line: #F6CFC7;
  --shadow-rgb: 90 65 30;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1120px;
  --radius: 26px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(180deg, var(--paper-top), var(--paper-bottom) 60%, var(--paper-bottom));
  color: var(--body); font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 8px; }
.ja { font-family: var(--font-ja); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgb(254 252 250 / 0.8);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-link { font-size: 15px; font-weight: 500; color: var(--body); transition: color 0.2s ease; }
.nav-link:hover { color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 0 1px rgb(60 45 25 / 0.05); }
.brand .wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1; }

/* ---------- Type ---------- */

.display { font-weight: 800; font-size: clamp(44px, 8.4vw, 92px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); text-wrap: balance; }
.h2 { font-weight: 800; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.accent { color: var(--red); }
/* Red words lit like the AbsClub "Reveal.": a bright-to-deep vertical gradient with a faint glow */
.glow {
  display: inline-block; color: var(--red);
  background: linear-gradient(180deg, #EB4447 10%, #E0353A 50%, #CC2A2E 72%, #A81E23 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgb(200 36 42 / 0.22));
  padding-bottom: 0.08em; margin-bottom: -0.08em;
}
.dim { color: var(--faint); }
.nw { white-space: nowrap; }
.lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--body); line-height: 1.55; text-wrap: pretty; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 17px; letter-spacing: -0.2px; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-red { background: linear-gradient(135deg, #EE5052, #C9272A); color: #fff; box-shadow: 0 8px 22px rgb(229 56 59 / 0.22); }
.btn-red:hover { box-shadow: 0 12px 28px rgb(229 56 59 / 0.3); transform: translateY(-1px); }
.btn-outline { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--outline), 0 6px 16px rgb(var(--shadow-rgb) / 0.07); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px #DDD7CE, 0 10px 22px rgb(var(--shadow-rgb) / 0.1); }

.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px 0 24px; border-radius: 16px;
  background: linear-gradient(180deg, #2E2D2B, #1C1B19); color: #fff; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), 0 0 0 1px rgb(28 27 25 / 0.9), 0 12px 30px rgb(28 27 25 / 0.22);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.store:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 0 0 1px rgb(28 27 25 / 0.9), 0 18px 38px rgb(28 27 25 / 0.28); }
.store:active { transform: scale(0.97); }
.store svg { width: 24px; height: 24px; flex: none; margin-top: -3px; }
.store b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.store-note { font-size: 13.5px; color: var(--faint); margin-top: 14px; }

/* ---------- Motion ---------- */

.fade, .rise, .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.rise { transform: translateY(32px); }
html.no-js .fade, html.no-js .rise, html.no-js .reveal, .fade.is-in, .rise.is-in, .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade, .rise, .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 9vw, 112px) 0 0; text-align: center; }
.hero .display { max-width: 14ch; margin: 0 auto; }
.hero .lead { max-width: 44ch; margin: 22px auto 0; }
.hero .store { margin-top: 72px; }
.hero-visual { display: flex; flex-direction: column; align-items: center; margin-top: clamp(72px, 9vw, 112px); }
.feed-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.feed-controls .ctl { width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px var(--outline), 0 6px 16px rgb(var(--shadow-rgb) / 0.07); display: grid; place-items: center; color: var(--ink); transition: transform 0.2s var(--ease); }
.feed-controls .ctl:hover { transform: translateY(-1px); }
.feed-controls .ctl svg { width: 16px; height: 16px; }
.feed-controls .ctl-label { font-size: 13px; color: var(--muted); min-width: 110px; text-align: center; }

/* ---------- Phone mockup ---------- */

.device {
  position: relative; z-index: 1;
  width: 320px; aspect-ratio: 320 / 672; border-radius: 52px;
  background: linear-gradient(135deg, #55565A, #2B2B2E 30%, #1A1A1C 60%, #46474B);
  padding: 11px;
  box-shadow: 0 30px 50px rgb(50 35 20 / 0.28), 0 8px 16px rgb(50 35 20 / 0.14), inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.device::before { content: ""; position: absolute; inset: 1px; border-radius: 51px; box-shadow: inset 0 0 0 2px #3A3836; pointer-events: none; }
.device .screen {
  position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden;
  background: linear-gradient(180deg, var(--paper-top), var(--paper-bottom));
  color: var(--ink); font-size: 13px; line-height: 1.3; text-align: left;
}
.device .island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #0E0D0C; z-index: 5; }
.device-sm .island { width: 84px; height: 24px; top: 10px; }
.device .status { position: absolute; top: 16px; left: 28px; right: 28px; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; z-index: 4; }
.device .status i { display: inline-block; width: 22px; height: 11px; border-radius: 3.5px; border: 1.5px solid var(--ink); position: relative; opacity: 0.9; }
.device .status i::after { content: ""; position: absolute; inset: 1.5px; right: 3px; background: var(--ink); border-radius: 1.5px; }
.device .status i::before { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: var(--ink); border-radius: 0 1px 1px 0; }
.device .home { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 104px; height: 4px; border-radius: 4px; background: var(--ink); opacity: 0.6; z-index: 6; }
.device-sm { width: 280px; aspect-ratio: 280 / 588; border-radius: 46px; padding: 10px; }
.device-sm .screen { border-radius: 37px; }

/* Screen header, as in the app */
.scr-head { position: absolute; top: 58px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 3; }
.scr-title { font-weight: 800; font-size: 24px; letter-spacing: -0.6px; line-height: 1.1; color: var(--ink); }
.scr-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 4px 18px rgb(var(--shadow-rgb) / 0.08), 0 1px 2px rgb(var(--shadow-rgb) / 0.05); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.is-on { color: var(--red); }

/* Floating tab bar, as in the app: icon above label, selected tab red on blush */
.tabbar { position: absolute; left: 14px; right: 14px; bottom: 22px; height: 56px; display: flex; gap: 3px; padding: 5px; border-radius: 999px; background: #FDFBF8; box-shadow: 0 10px 34px rgb(var(--shadow-rgb) / 0.09), 0 1px 3px rgb(var(--shadow-rgb) / 0.05); z-index: 4; }
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 999px; color: var(--ink); }
.tabbar .tab svg { width: 20px; height: 20px; }
.tabbar .tab b { font-size: 11px; font-weight: 500; }
.tabbar .tab.on { color: var(--red); background: var(--red-tint); }
.device-sm .tabbar { height: 50px; bottom: 18px; }
.device-sm .tabbar .tab svg { width: 18px; height: 18px; }
.device-sm .tabbar .tab b { font-size: 10px; }

/* ----- Feed screen ----- */
.feed-pager { position: absolute; top: 112px; bottom: 80px; left: 0; right: 0; overflow: hidden; }
.feed-track { height: 100%; transition: transform 0.7s var(--ease); will-change: transform; }
.feed-card { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 34px 30px; }
.feed-art { width: 86px; height: 86px; border-radius: 18px; object-fit: cover; box-shadow: 0 8px 22px rgb(var(--shadow-rgb) / 0.14); margin-top: -34px; }
.feed-word { font-family: var(--font-ja); font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; margin-top: 30px; }
.feed-word.s1 { font-size: 56px; } .feed-word.s2 { font-size: 48px; } .feed-word.s3 { font-size: 42px; }
.feed-reading { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 8px; font-family: var(--font-ja); font-weight: 500; font-size: 21px; color: var(--muted); }
.feed-reading .speaker { position: absolute; left: calc(50% + 34px); top: 50%; transform: translateY(-50%); }
.speaker { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s ease; }
.speaker:active { transform: scale(0.88); }
.speaker svg { width: 20px; height: 20px; }
.speaker .bars path { transform-origin: 14px 12px; }
.speaker.is-playing { color: var(--red); }
.speaker.is-playing .bars path:nth-child(1) { animation: bar 0.9s ease-in-out infinite; }
.speaker.is-playing .bars path:nth-child(2) { animation: bar 0.9s ease-in-out 0.25s infinite; }
@keyframes bar { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.85); } }
.feed-romaji { font-size: 13.5px; font-weight: 500; letter-spacing: 0.4px; color: var(--ghost); margin-top: 4px; }
.feed-meaning { font-size: 21px; font-weight: 300; letter-spacing: -0.2px; color: var(--muted); margin-top: 8px; line-height: 1.25; transition: filter 0.35s ease; cursor: pointer; }
.feed-meaning.is-hidden { filter: blur(6px); }
.feed-hint { position: absolute; bottom: 88px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--faint); letter-spacing: 0.04em; transition: opacity 0.3s; }

.feed-index { position: absolute; top: 120px; bottom: 100px; left: 13px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, #ECE8E2 0 9px, transparent 9px 13px); z-index: 3; }
.feed-index .num { position: absolute; left: -1px; top: var(--y, 36%); width: 5px; height: 16px; border-radius: 3px; background: var(--red); box-shadow: 0 0 0 2px #FEFCFA; }
.feed-index .num::after { content: attr(data-n); position: absolute; left: 12px; top: 1px; font-size: 10px; font-weight: 600; color: var(--ink); white-space: nowrap; }

.feed-actions { position: absolute; right: 12px; top: 52%; display: flex; flex-direction: column; gap: 10px; z-index: 3; transition: opacity 0.25s; }
.feed-actions .icon-btn { width: 36px; height: 36px; }
.feed-actions .icon-btn svg { width: 16px; height: 16px; }

/* Checkpoint card */
.feed-card.checkpoint .cp-kanji { font-family: var(--font-ja); font-weight: 700; font-size: 50px; letter-spacing: -1px; color: var(--ink); line-height: 1.1; }
.feed-card.checkpoint .cp-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.feed-card.checkpoint .cp-sub .ja { font-family: var(--font-ja); }
.feed-card.checkpoint .cp-title { font-weight: 600; font-size: 20px; letter-spacing: -0.4px; margin-top: 26px; color: var(--ink); }
.feed-card.checkpoint p { font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 6px; max-width: 220px; }
.feed-card.checkpoint .cp-btn { margin-top: 22px; height: 44px; padding: 0 26px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; box-shadow: 0 8px 22px rgb(229 56 59 / 0.22); }
.feed-card.checkpoint .cp-skip { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }

/* Example sheet inside the phone */
.sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 8; background: var(--card); border-radius: 30px; padding: 16px 20px 20px; box-shadow: 0 -10px 40px rgb(60 40 20 / 0.12), 0 0 0 1px var(--hairline); transform: translateY(110%); transition: transform 0.5s var(--ease); }
.sheet.is-open { transform: none; }
.sheet .grab { width: 36px; height: 4px; border-radius: 4px; background: #DDD8D0; margin: 0 auto 12px; }
.sheet .cap { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; color: #B8B2A9; }
.sheet .ex-ja { font-family: var(--font-ja); font-weight: 500; font-size: 19px; color: var(--ink); margin-top: 8px; line-height: 1.5; }
.sheet .ex-ja mark { background: none; color: var(--red); font-weight: 700; }
.sheet .ex-ro { font-size: 12.5px; color: var(--ghost); margin-top: 4px; }
.sheet .ex-en { font-size: 14px; color: var(--body); margin-top: 8px; padding-top: 8px; border-top: 1px solid #EEEAE4; }
.sheet .ex-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.sheet .ex-row .hint { font-size: 11px; color: #B8B2A9; }
.sheet .close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; color: var(--ink); }
.sheet .close svg { width: 12px; height: 12px; }
.scrim { position: absolute; inset: 0; z-index: 7; background: rgb(40 28 14 / 0.22); opacity: 0; pointer-events: none; transition: opacity 0.4s; border-radius: 42px; }
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* Feed controls under the phone */
.feed-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.feed-controls .ctl { width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px var(--outline), 0 6px 16px rgb(var(--shadow-rgb) / 0.07); display: grid; place-items: center; color: var(--ink); transition: transform 0.2s var(--ease); }
.feed-controls .ctl:hover { transform: translateY(-1px); }
.feed-controls .ctl svg { width: 16px; height: 16px; }
.feed-controls .ctl-label { font-size: 13px; color: var(--muted); min-width: 110px; text-align: center; }

/* ----- Plan screen ----- */
.plan-body { position: absolute; top: 108px; left: 16px; right: 16px; bottom: 0; overflow: hidden; }
.plan-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(rgb(250 248 244 / 0), var(--paper-bottom)); pointer-events: none; }
.hero-card { background: var(--paper-top); border-radius: 24px; padding: 16px 16px 14px; box-shadow: 0 10px 34px rgb(var(--shadow-rgb) / 0.08), 0 1px 3px rgb(var(--shadow-rgb) / 0.04); }
.hero-card .row { display: flex; gap: 12px; align-items: flex-start; }
.hero-card .row > div { flex: 1; min-width: 0; }
.hero-card .kick { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--faint); }
.hero-card .big { font-weight: 800; font-size: 24px; letter-spacing: -0.6px; color: var(--ink); margin-top: 4px; }
.hero-card .big .of { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.hero-card .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.hero-card .art { width: 64px; height: 64px; border-radius: 17px; object-fit: cover; box-shadow: 0 8px 20px rgb(var(--shadow-rgb) / 0.14); flex: none; }
.segs { display: flex; gap: 4px; margin-top: 14px; }
.segs i { flex: 1; height: 4px; border-radius: 4px; background: var(--sand); }
.segs i.on { background: var(--red); }
.hero-card .count { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.mini-btn { margin-top: 14px; height: 42px; border-radius: 999px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 13.5px; box-shadow: 0 8px 22px rgb(229 56 59 / 0.22); }
.mini-btn svg { width: 14px; height: 14px; }
.plan-list { position: relative; margin-top: 14px; padding-left: 46px; display: grid; gap: 8px; }
.plan-list::before { content: ""; position: absolute; left: 18px; top: 14px; bottom: 14px; width: 2px; background: var(--sand); border-radius: 2px; }
.plan-list::after { content: ""; position: absolute; left: 18px; top: 14px; height: 52%; width: 2px; background: var(--plan-line); border-radius: 2px; }
.plan-list li { position: relative; }
.plan-list .num { position: absolute; left: -40px; z-index: 2; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--outline), 0 0 0 3px #FCFAF7; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink); z-index: 1; }
.plan-list li.done .num { background: var(--red-tint); box-shadow: 0 0 0 3px #FCFAF7; color: var(--red); }
.plan-list li.now .num { background: linear-gradient(135deg, #EE5052, #C9272A); color: #fff; font-size: 12px; box-shadow: 0 0 0 3px #FCFAF7, 0 0 0 6px rgb(229 56 59 / 0.16), 0 4px 10px rgb(201 39 42 / 0.3); }
.plan-list .lesson { position: relative; background: var(--card); border-radius: 16px; padding: 10px 40px 10px 14px; box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / 0.05), 0 0 0 1px var(--hairline); }
.plan-list li.now .lesson { background: var(--plan-selected); box-shadow: 0 0 0 1px rgb(229 56 59 / 0.12); }
.plan-list .lesson b { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink); }
.plan-list .lesson span { display: block; font-size: 9.5px; color: var(--body); margin-top: 1px; }
.plan-list .badge, .plan-list .chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; }
.plan-list .badge { width: 20px; height: 20px; border-radius: 50%; background: var(--red-tint); color: var(--red); }
.plan-list .badge svg { width: 10px; height: 10px; }
.plan-list .chev { width: 16px; height: 16px; color: var(--muted); }
.plan-list li.now .chev { color: var(--deep-red); }
.plan-list .chev svg { width: 14px; height: 14px; }

/* ----- Progress screen ----- */
.prog-body { position: absolute; top: 108px; left: 16px; right: 16px; bottom: 0; }
.bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.bar i::after { content: ""; display: block; height: 100%; width: var(--p, 10%); background: var(--red); border-radius: 4px; }
.bar b { font-size: 11px; font-weight: 600; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--card); border-radius: 16px; padding: 10px 9px 10px; box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / 0.05), 0 0 0 1px var(--hairline); text-align: left; }
.stat .ico { width: 24px; height: 24px; border-radius: 50%; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.stat .ico svg { width: 13px; height: 13px; }
.stat .lbl { display: block; font-size: 8.5px; color: var(--muted); margin-top: 12px; white-space: nowrap; }
.stat b { display: block; font-weight: 800; font-size: 17px; letter-spacing: -0.4px; color: var(--ink); line-height: 1.1; margin-top: 1px; }
.stat b small { font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.next-card { background: var(--card); border-radius: 22px; padding: 14px; margin-top: 12px; box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / 0.05), 0 0 0 1px var(--hairline); }
.next-card .kick { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--faint); }
.next-card .t { font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: -0.4px; }
.next-card .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.next-card .mini-btn { margin-top: 10px; height: 36px; font-size: 13px; }


/* Lesson screen */
.lesson-body { position: absolute; top: 60px; left: 18px; right: 18px; bottom: 0; color: var(--ink); }
.qbar { display: flex; align-items: center; gap: 4px; }
.qbar .x { width: 26px; height: 26px; border-radius: 50%; background: var(--card); box-shadow: 0 3px 12px rgb(var(--shadow-rgb) / 0.08); display: grid; place-items: center; font-size: 15px; color: var(--ink); margin-right: 6px; flex: none; }
.qbar i { flex: 1; height: 4px; border-radius: 4px; background: #E2DDD5; }
.qbar i.on { background: var(--red); }
.lesson-body .q { font-weight: 700; font-size: 19px; letter-spacing: -0.4px; line-height: 1.25; margin-top: 30px; }
.options { display: grid; gap: 9px; margin-top: 20px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 14px; font-weight: 500; }
.option small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.option .mark { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #DDD7CE; display: grid; place-items: center; flex: none; }
.option .mark svg { width: 10px; height: 10px; }
.option.correct { background: #EDF4EA; box-shadow: inset 0 0 0 1.5px #97C28E; color: #2E6A2A; }
.option.correct .mark { background: var(--sage); box-shadow: none; color: #fff; }
.option.dim { opacity: 0.55; }
.lesson-body .note { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--sage-fill); color: var(--sage); font-size: 12.5px; font-weight: 500; }
.lesson-body .mini-btn { position: absolute; left: 0; right: 0; bottom: 22px; }


/* ----- Plan and Progress: built at the app's 393×852pt size, then scaled into the frame ----- */
.device-sm .screen { container-type: inline-size; }
.app { position: absolute; top: 0; left: 0; width: 393px; height: 852px; transform: scale(calc(260 / 393)); transform-origin: top left;
  background: linear-gradient(180deg, var(--paper-top), var(--paper-bottom)); color: var(--ink); font-size: 15px; line-height: 1.3; text-align: left; }
.app h4, .app p, .app ol { margin: 0; }
.a-status { position: absolute; top: 18px; left: 44px; right: 32px; display: flex; justify-content: space-between; align-items: center; }
.a-status b { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.a-sig { display: flex; align-items: center; gap: 6px; }
.a-sig svg { width: 18px; height: 12px; }
.a-sig svg + svg { width: 16px; }
.a-batt { position: relative; width: 26px; height: 13px; border-radius: 4px; border: 1.5px solid rgb(28 27 25 / 0.35); }
.a-batt::after { content: ""; position: absolute; right: -4px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: rgb(28 27 25 / 0.35); }
.a-batt i { position: absolute; inset: 1.5px; border-radius: 2px; background: var(--ink); }
.a-head { position: absolute; top: 62px; left: 30px; right: 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.a-head h4 { font-size: 28px; font-weight: 800; letter-spacing: -0.7px; line-height: 1.1; }
.a-head p { font-size: 16px; color: var(--muted); margin-top: 4px; }
.a-iconbtn { width: 48px; height: 48px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 4px 18px rgb(var(--shadow-rgb) / 0.08), 0 1px 2px rgb(var(--shadow-rgb) / 0.05); margin-top: 4px; }
.a-iconbtn svg { width: 22px; height: 22px; }

.a-hero { position: absolute; top: 146px; left: 18px; right: 18px; padding: 22px 20px 20px; border-radius: 28px; background: var(--paper-top); box-shadow: 0 10px 34px rgb(var(--shadow-rgb) / 0.08), 0 1px 3px rgb(var(--shadow-rgb) / 0.04); }
.a-journey { top: 162px; }
.a-row { display: flex; gap: 14px; align-items: flex-start; }
.a-row > div { flex: 1; min-width: 0; }
.a-row small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--faint); }
.a-row strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; margin-top: 8px; }
.a-row strong span { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.a-row em { display: block; font-style: normal; font-size: 15px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.a-journey .a-row em { margin-top: 12px; }
.a-row img { width: 92px; height: 92px; border-radius: 22px; object-fit: cover; flex: none; box-shadow: 0 8px 20px rgb(var(--shadow-rgb) / 0.14); }
.a-segs { display: flex; gap: 5px; margin-top: 18px; }
.a-segs i { flex: 1; height: 4px; border-radius: 4px; background: var(--sand); }
.a-segs i.on { background: var(--red); }
.a-count { font-size: 14px; color: var(--muted); margin-top: 12px; }
.a-btn { margin-top: 20px; height: 56px; border-radius: 999px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.2px; box-shadow: 0 8px 22px rgb(229 56 59 / 0.22); }
.a-btn svg { width: 17px; height: 17px; }
.a-bar { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.a-bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.a-bar i::after { content: ""; display: block; height: 100%; width: var(--p); background: var(--red); border-radius: 4px; }
.a-bar b { font-size: 13px; font-weight: 600; color: var(--muted); }

.a-list { position: absolute; top: 427px; left: 18px; right: 18px; list-style: none; padding: 0 0 0 40px; display: grid; gap: 12px; }
.a-list::before { content: ""; position: absolute; left: 13px; top: 34px; bottom: -40px; width: 2px; background: var(--sand); }
.a-list::after { content: ""; position: absolute; left: 13px; top: 34px; height: 160px; width: 2px; background: var(--plan-line); }
.a-list li { position: relative; }
.a-num { position: absolute; left: -40px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--outline), 0 0 0 4px #FCFAF7; z-index: 1; }
.a-list li.done .a-num { background: var(--red-tint); color: #fff; box-shadow: 0 0 0 4px #FCFAF7; }
.a-list li.now .a-num { background: var(--red); color: #fff; box-shadow: 0 0 0 4px #FCFAF7, 0 0 0 9px rgb(229 56 59 / 0.12), 0 3px 8px rgb(201 39 42 / 0.3); }
.a-lesson { position: relative; min-height: 68px; padding: 13px 52px 13px 18px; border-radius: 22px; background: var(--card); box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / 0.05), 0 0 0 1px var(--hairline); display: flex; flex-direction: column; justify-content: center; }
.a-list li.now .a-lesson { background: var(--plan-selected); box-shadow: none; }
.a-lesson b { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
.a-lesson span { font-size: 15px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-badge, .a-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; }
.a-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--red-tint); color: var(--red); }
.a-badge svg { width: 12px; height: 12px; }
.a-chev { width: 18px; height: 18px; color: var(--ghost); right: 18px; }
.a-chev svg { width: 18px; height: 18px; }

.a-stats { position: absolute; top: 374px; left: 18px; right: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.a-stats > div { height: 110px; padding: 14px 12px; border-radius: 22px; background: var(--paper-top); box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / 0.05), 0 0 0 1px var(--hairline); display: flex; flex-direction: column; }
.a-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--red-tint); color: var(--red); display: grid; place-items: center; }
.a-ico svg { width: 15px; height: 15px; }
.a-stats small { font-size: 13px; color: var(--muted); margin-top: auto; white-space: nowrap; }
.a-stats b { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.15; }
.a-stats b span { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.a-next { position: absolute; top: 512px; left: 18px; right: 18px; padding: 22px 20px 20px; border-radius: 28px; background: var(--paper-top); box-shadow: 0 10px 34px rgb(var(--shadow-rgb) / 0.08), 0 1px 3px rgb(var(--shadow-rgb) / 0.04); }
.a-next strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.6px; }
.a-next p { font-size: 16px; color: var(--muted); margin-top: 8px; line-height: 1.4; max-width: 240px; }
.a-next .a-btn { margin-top: 20px; height: 54px; }

.a-tabbar { position: absolute; left: 16px; right: 16px; bottom: 30px; height: 72px; padding: 6px; display: flex; gap: 4px; border-radius: 999px; background: #FDFBF8; box-shadow: 0 10px 34px rgb(var(--shadow-rgb) / 0.09), 0 1px 3px rgb(var(--shadow-rgb) / 0.05); z-index: 3; }
.a-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 999px; color: var(--ink); }
.a-tab svg { width: 26px; height: 26px; }
.a-tab b { font-size: 15px; font-weight: 500; }
.a-tab.on { color: var(--red); background: var(--red-tint); }
.a-home { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); width: 136px; height: 5px; border-radius: 5px; background: var(--ink); z-index: 3; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--hairline); padding-top: 36px; }
.features li { padding-right: 16px; }
.features .n { font-family: var(--font-ja); font-weight: 700; font-size: 20px; color: var(--deep-red); width: 42px; height: 42px; border-radius: 13px; background: var(--kanji-tile); display: inline-grid; place-items: center; }
.features h3 { margin-top: 18px; font-size: 19px; font-weight: 700; letter-spacing: -0.3px; color: var(--ink); }
.features p { margin-top: 8px; font-size: 15.5px; color: var(--body); line-height: 1.55; }
@media (max-width: 880px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; gap: 28px; } .features li { padding-right: 0; } }

.gallery { display: flex; justify-content: center; gap: clamp(20px, 4vw, 56px); }
.gallery figure { flex: none; text-align: center; }
.gallery figcaption { margin-top: 20px; font-size: 14px; font-weight: 500; color: var(--muted); }
.dots { display: none; justify-content: center; gap: 7px; margin-top: 20px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--outline); transition: background 0.3s, transform 0.3s; }
.dots i.on { background: var(--red); transform: scale(1.25); }
@media (max-width: 960px) {
  .gallery { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 8px; margin: 0 calc(-1 * var(--gutter)); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery figure { scroll-snap-align: center; }
  .gallery figure:first-child { margin-left: auto; } .gallery figure:last-child { margin-right: auto; }
  .dots { display: flex; }
}

.cta { text-align: center; padding-bottom: clamp(80px, 10vw, 140px); }
.cta .h2 { max-width: 16ch; margin: 0 auto; }
.cta .store { margin-top: 32px; }

/* ---------- 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: 18px 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a { font-size: 14.5px; font-weight: 500; color: var(--body); transition: color 0.2s; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--ink); }
.footer-copy { font-size: 13.5px; color: var(--faint); width: 100%; }

/* ---------- Document pages (privacy, terms, support, 404), as on AbsClub ---------- */

.doc { padding: clamp(64px, 10vw, 120px) 0 clamp(80px, 12vw, 140px); }
.doc .wrap { max-width: 760px; }
.doc-head .h2 { font-size: clamp(42px, 7vw, 72px); }
.doc-head .lead { margin-top: 20px; max-width: 36ch; }
.doc-head .meta { margin-top: 18px; font-size: 14px; color: var(--faint); }
.doc .btn { margin-top: 32px; }
.doc .btn svg { width: 19px; height: 19px; }
.placeholder { background: #FFF3CD; color: #6B4E00; padding: 1px 6px; border-radius: 6px; font-weight: 600; }

.prose { margin-top: clamp(48px, 7vw, 72px); }
.prose section { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--hairline); }
.prose section:first-child { margin-top: 0; }
.prose h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.3; margin-bottom: 12px; }
.prose p, .prose li { color: var(--body); font-size: 16.5px; line-height: 1.7; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; list-style: disc; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--ink); font-weight: 600; }

.help { margin-top: clamp(64px, 9vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: 48px 56px; }
.help section { border-top: 1px solid var(--hairline); padding-top: 24px; }
.help h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.help p { margin-top: 10px; font-size: 15.5px; color: var(--body); }
.help a, .prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--outline); text-underline-offset: 3px; }
@media (max-width: 640px) { .help { grid-template-columns: 1fr; gap: 36px; } }
.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.doc-actions .btn { margin-top: 0; }
.legal-links { margin-top: clamp(56px, 8vw, 80px); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 15px; }
.legal-links a { color: var(--body); transition: color 0.2s ease; }
.legal-links a:hover { color: var(--ink); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); z-index: 60; box-shadow: 0 10px 28px rgb(28 27 25 / 0.3); max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
