:root {
  --bg: #08090f;
  --panel: #10121c;
  --panel-2: #0b0e19;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8e9f0;
  --text-dim: #8b8fa3;
  --text-faint: #6b6f80;
  --sub: #a5a8b8;
  --purple: #8b5cf6;
  --purple-hover: #7c4df3;
  --purple-dim: #a78bfa;
  --purple-light: #c4b5fd;
  --purple-bg: rgba(139, 92, 246, 0.14);
  --purple-border: rgba(139, 92, 246, 0.3);
  --green: #5ee0a0;
  --orange: #f5a97f;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif-jp: "Noto Serif JP", serif;
  --sans: "Manrope", "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); overflow-x: hidden; }
a { color: var(--purple-dim); text-decoration: none; }
a:hover { color: var(--purple-light); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 34px; }
.wrap--narrow { max-width: 900px; }
.wrap--text { max-width: 800px; }
.wrap--cta { max-width: 700px; }
section { padding: 76px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }

.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--purple-dim); text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -0.03em; }
.section-title { font-size: 38px; font-weight: 800; margin-top: 14px; line-height: 1.08; text-wrap: pretty; }
.section-lead { font-size: 15.5px; color: var(--text-dim); margin-top: 12px; line-height: 1.6; text-wrap: pretty; }

.btn { display: inline-grid; place-items: center; height: 52px; padding: 0 26px; border-radius: 13px; background: var(--purple); color: #fff; font-size: 15.5px; font-weight: 700; border: 0; cursor: pointer; box-shadow: 0 14px 40px rgba(139, 92, 246, 0.3); }
.btn:hover { background: var(--purple-hover); color: #fff; }
.btn--outline { background: transparent; color: var(--purple-light); border: 1px solid var(--purple-border); box-shadow: none; }
.btn--outline:hover { background: rgba(139, 92, 246, 0.12); color: var(--purple-light); }
.btn--sm { height: 38px; padding: 0 17px; border-radius: 10px; font-size: 13.5px; box-shadow: none; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(8, 9, 15, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav__row { display: flex; align-items: center; gap: 26px; padding: 14px 34px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand__name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 22px; margin-left: 14px; }
.nav__links a { font-size: 13.5px; color: var(--text-dim); font-weight: 600; }
.nav__links a:hover { color: var(--text); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav__signin { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }

/* ---- Hero ---- */
.hero { padding: 92px 0 80px; background: radial-gradient(1100px 560px at 72% -8%, rgba(99, 102, 241, 0.2), transparent 62%), radial-gradient(700px 420px at 12% 8%, rgba(139, 92, 246, 0.14), transparent 60%); border-top: 0; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 54px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 13px; border-radius: 8px; background: var(--purple-bg); border: 1px solid var(--purple-border); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--purple-light); }
.hero h1 { font-size: 60px; font-weight: 800; line-height: 1.02; margin-top: 22px; text-wrap: pretty; }
.hero__lead { font-size: 17.5px; color: var(--sub); margin-top: 22px; line-height: 1.55; max-width: 500px; text-wrap: pretty; }
.hero__actions { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero__fine { display: flex; align-items: center; gap: 22px; margin-top: 26px; font-size: 12.5px; color: var(--text-faint); flex-wrap: wrap; }

.browser { border-radius: 18px; background: var(--panel); border: 1px solid rgba(139, 92, 246, 0.26); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.browser__dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3d4d; }
.browser__url { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.browser__body { padding: 22px; }
.capture { margin-top: 14px; padding: 15px 16px; border-radius: 11px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, 0.1); font-family: var(--serif-jp); font-size: 19px; line-height: 1.6; }
.capture__en { font-size: 13.5px; color: var(--sub); margin-top: 12px; line-height: 1.5; }

.word-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.word-card { padding: 12px 13px; border-radius: 10px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, 0.1); }
.word-card.is-saved { border-color: rgba(94, 224, 160, 0.35); }
.word-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.word-card__jp { font-family: var(--serif-jp); font-size: 19px; color: var(--purple-light); }
.word-card__save { height: 24px; padding: 0 9px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap; background: var(--purple-bg); color: var(--purple-light); border: 1px solid var(--purple-border); }
.word-card.is-saved .word-card__save { background: rgba(94, 224, 160, 0.14); color: var(--green); border-color: rgba(94, 224, 160, 0.4); }
.word-card__reading { font-size: 11px; font-family: var(--mono); color: var(--text-dim); margin-top: 7px; }
.word-card__gloss { font-size: 12px; color: var(--sub); margin-top: 5px; }
.hero__footer { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }

/* ---- Metrics ---- */
.metrics { padding: 0 0 76px; border-top: 0; }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { border-radius: 15px; background: var(--panel); border: 1px solid var(--border); padding: 22px; }
.metric__value { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.metric__label { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; line-height: 1.45; }

/* ---- Cards / steps ---- */
.card { border-radius: 18px; background: var(--panel); border: 1px solid var(--border); padding: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 42px; }
.step { display: flex; flex-direction: column; gap: 16px; }
.step__head { display: flex; align-items: center; gap: 12px; }
.step__n { width: 28px; height: 28px; border-radius: 9px; background: var(--purple-bg); border: 1px solid var(--purple-border); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--purple-light); }
.step__tag { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.step__title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.step__body { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; text-wrap: pretty; }
.step__glyph { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); font-family: var(--serif-jp); font-size: 30px; color: var(--purple-dim); }

/* ---- Study home showcase ---- */
.study { background: radial-gradient(900px 500px at 22% 0%, rgba(139, 92, 246, 0.12), transparent 60%); }
.study__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: center; }
.check-list { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; }
.check-item__mark { color: var(--green); font-size: 14px; flex: none; margin-top: 1px; }
.check-item__title { font-size: 14.5px; font-weight: 700; }
.check-item__body { font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.55; }
.check-item--plain .check-item__body { font-size: 13.5px; color: var(--sub); margin-top: 0; line-height: 1.55; }

.demo-panel { border-radius: 18px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); padding: 26px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); }
.demo-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.demo-panel__title { font-size: 19px; font-weight: 800; }
.demo-panel__sub { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }
.demo-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 22px; }
.tile { aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09); }
.tile__glyph { font-family: var(--serif-jp); font-size: 21px; line-height: 1; color: var(--text-dim); }
.tile__rate { font-size: 8px; font-family: var(--mono); color: var(--text-faint); }
.tile.mast { background: rgba(94, 224, 160, 0.12); border-color: rgba(94, 224, 160, 0.3); }
.tile.mast .tile__glyph { color: var(--green); }
.tile.solid { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.32); }
.tile.solid .tile__glyph { color: var(--purple-dim); }
.tile.shaky { background: rgba(245, 169, 127, 0.1); border-color: rgba(245, 169, 127, 0.28); }
.tile.shaky .tile__glyph { color: var(--orange); }
.legend { display: flex; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-dim); flex-wrap: wrap; }
.legend__item { display: flex; align-items: center; gap: 6px; }
.legend__dot { width: 8px; height: 8px; border-radius: 3px; }

/* ---- Quiz demo ---- */
.review__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.quiz-card { text-align: center; padding: 34px; }
.quiz-card__prompt { font-family: var(--serif-jp); font-weight: 500; margin-top: 20px; line-height: 1.15; }
.quiz-card__prompt.is-text { font-family: var(--sans); font-weight: 600; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.quiz-opt { min-height: 62px; border-radius: 12px; padding: 14px; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, 0.03); border: 1.5px solid rgba(255, 255, 255, 0.09); color: var(--text); font-weight: 600; }
.quiz-opt__kanji { font-family: var(--serif-jp); font-size: 30px; }
.quiz-opt__text { font-family: var(--sans); font-size: 14px; }
.quiz-opt.is-right { background: rgba(94, 224, 160, 0.14); border-color: rgba(94, 224, 160, 0.55); color: var(--green); }
.quiz-opt.is-wrong { background: rgba(245, 169, 127, 0.12); border-color: rgba(245, 169, 127, 0.55); color: var(--orange); }
.quiz-opt.is-dim { color: var(--text-faint); }
.quiz-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.quiz-card__feedback { font-size: 12.5px; color: var(--text-dim); text-align: left; }
.quiz-card__next { height: 36px; padding: 0 16px; border-radius: 9px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; background: rgba(255, 255, 255, 0.05); color: var(--text-faint); border: 0; }
.quiz-card__next.is-ready { background: var(--purple); color: #fff; }
.try-note { font-size: 12.5px; color: var(--text-faint); margin-top: 22px; font-family: var(--mono); }

/* ---- Pricing ---- */
.pricing { background: radial-gradient(900px 480px at 50% 0%, rgba(139, 92, 246, 0.16), transparent 62%); }
.pricing__head { text-align: center; }
.pricing__head .section-lead { max-width: 500px; margin-left: auto; margin-right: auto; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.plan-card { position: relative; border-radius: 16px; padding: 26px; background: rgba(255, 255, 255, 0.03); border: 1.5px solid rgba(255, 255, 255, 0.09); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.plan-card.is-selected { background: var(--purple-bg); border-color: var(--purple); }
.plan-card__label { font-size: 13px; font-weight: 700; color: var(--sub); }
.plan-card__price { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.plan-card__amount { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.plan-card__unit { font-size: 14px; color: var(--text-dim); }
.plan-card__note { font-size: 12.5px; color: var(--text-dim); margin-top: 12px; }
.plan-card__save { position: absolute; top: -11px; right: 18px; height: 22px; padding: 0 10px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; background: var(--green); color: #07130d; }
.pricing__cta { width: 100%; margin-top: 18px; }
.pricing__ctanote { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 12px; }

.plan-table { border-radius: 16px; background: var(--panel); border: 1px solid var(--border); overflow: hidden; margin-top: 32px; }
.plan-table__head, .plan-table__row { display: grid; grid-template-columns: 1fr 90px 90px; align-items: center; padding: 15px 22px; }
.plan-table__head { padding: 14px 22px; border-bottom: 1px solid var(--border); font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-dim); }
.plan-table__row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13.5px; }
.plan-table__row:last-child { border-bottom: 0; }
.plan-table__head > div:not(:first-child) { text-align: center; }
.plan-table__free { color: var(--text-dim); font-size: 13px; }
.plan-table__pro { color: var(--green); font-weight: 700; font-size: 13px; }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; margin-top: 30px; }
.faq-item { padding: 20px 0; border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; color: inherit; font: inherit; }
.faq-item__head { display: flex; align-items: center; gap: 16px; }
.faq-item__q { font-size: 15.5px; font-weight: 700; flex: 1; }
.faq-item__icon { font-size: 17px; color: var(--text-dim); flex: none; }
.faq-item__a { font-size: 14px; color: var(--text-dim); line-height: 1.65; margin-top: 12px; max-width: 660px; text-wrap: pretty; display: none; }
.faq-item.is-open .faq-item__a { display: block; }

/* ---- Final CTA + footer ---- */
.final-cta { padding: 80px 0; background: radial-gradient(800px 400px at 50% 100%, rgba(139, 92, 246, 0.18), transparent 62%); text-align: center; }
.final-cta__title { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; text-wrap: pretty; }
.final-cta__body { font-size: 16px; color: var(--text-dim); margin-top: 16px; }
.final-cta .btn { margin-top: 28px; }

.footer { padding: 34px 0; border-top: 1px solid var(--border); }
.footer__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__name { font-size: 13.5px; font-weight: 700; }
.footer__links { display: flex; gap: 20px; font-size: 12.5px; color: var(--text-faint); margin-left: 14px; flex-wrap: wrap; }
.footer__links a { color: var(--text-faint); }
.footer__copy { margin-left: auto; font-size: 12px; color: #4a4e60; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero__grid, .study__grid, .review__grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 42px; }
  .metrics__grid, .steps { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .metrics__grid, .steps, .word-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .footer__copy { margin-left: 0; }
}
