:root {
  --bg: #fdf6ef;
  --card: #f7ebdd;
  --card2: #f0dcc8;
  --ink: #292421;
  --ink2: #736b66;
  --accent: #c25b5b;
  --accent-dark: #9e4444;
  --gold: #eeb84d;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1a18; --card: #2b2725; --card2: #3d3633; --ink: #f2ede6; --ink2: #aea69e; --accent: #db7873; --accent-dark: #c25b5b; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 56px); margin: 16px 0; font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; font-weight: 800; }
h3 { font-size: 19px; margin: 12px 0 6px; }
.small, small { color: var(--ink2); font-size: 14px; }

/* nav */
.nav, header {
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--max); margin: 0 auto; padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 9px; }
header nav a { margin-left: 22px; color: var(--ink2); text-decoration: none; font-weight: 500; }
header nav a:hover, header nav a[aria-current] { color: var(--ink); }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 40px 24px 80px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center;
}
.pill { display: inline-block; background: var(--card); color: var(--accent-dark); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; }
.lede { font-size: 20px; color: var(--ink2); max-width: 34em; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 14px; line-height: 1.1;
}
@media (prefers-color-scheme: dark) { .store { background: #f2ede6; color: #1c1a18; } }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 20px; }
.store small { font-size: 11px; font-weight: 500; opacity: .8; color: inherit; }
.note { color: var(--ink2); font-size: 14px; }
.hero-facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 28px; flex-wrap: wrap; color: var(--ink2); }
.hero-facts b { display: block; color: var(--ink); font-size: 26px; line-height: 1; }

/* phones */
.hero-art { position: relative; height: 620px; }
.phone {
  position: absolute; width: 270px; height: 570px; border-radius: 44px;
  background: #1a1614; padding: 12px; box-shadow: 0 30px 60px -20px rgba(60, 30, 20, .45), 0 0 0 1px rgba(0,0,0,.25);
}
.phone .screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; position: relative; }
.phone.lock { left: 6%; top: 40px; transform: rotate(-6deg); z-index: 1; }
.phone.app { right: 2%; top: 0; transform: rotate(5deg); z-index: 2; }
.phone.lock .screen { background: linear-gradient(160deg, #8f3f3b 0%, #c25b5b 45%, #e2957a 100%); color: #fff; text-align: center; padding: 56px 16px 0; }
.ls-date { font-size: 13px; opacity: .9; }
.ls-time { font-size: 68px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; margin: 2px 0 18px; }
.ls-widget { background: rgba(255,255,255,.18); backdrop-filter: blur(6px); border-radius: 18px; padding: 10px 12px; margin: 0 auto 10px; width: 150px; text-align: left; overflow: hidden; }
.ls-widget.wide { width: 100%; }
.ls-hanzi { font-size: 26px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.ls-py { font-size: 12px; opacity: .85; font-weight: 400; }
.ls-meaning { font-size: 12px; opacity: .85; }
.ls-sent { font-size: 17px; font-weight: 500; }
.ls-sent-en { font-size: 11px; opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-bottom { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 28px; }
.ls-bottom span { width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.3); }

.phone.app .screen { background: #fdf6ef; color: #292421; padding: 46px 14px 0; font-size: 12px; }
.app-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.streak, .gear { background: #f7ebdd; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 600; color: #9e4444; }
.app-greet { font-size: 24px; font-weight: 600; margin: 2px 0 8px; }
.goal { display: flex; gap: 10px; align-items: center; background: #f7ebdd; border-radius: 16px; padding: 10px; margin-bottom: 12px; }
.goal b { display: block; font-size: 13px; }
.goal small { color: #736b66; font-size: 11px; }
.ring { width: 44px; height: 44px; border-radius: 50%; border: 5px solid #c25b5b; border-right-color: #ecd7c6; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.card { background: #f7ebdd; border-radius: 20px; padding: 12px; text-align: center; }
.card-row { display: flex; justify-content: space-between; }
.lvl { background: #5b8bb3; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 700; }
.tag { background: #fbe7bf; color: #9a6a12; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 600; }
.card-hanzi { font-size: 42px; font-weight: 600; margin-top: 10px; line-height: 1.1; }
.card-py { color: #c25b5b; font-size: 16px; }
.card-en { color: #736b66; font-size: 12px; margin-bottom: 8px; }
.card-sent { font-size: 15px; }
.card-sent-en { color: #736b66; font-size: 11px; margin-bottom: 10px; }
.card-actions { display: flex; justify-content: center; gap: 10px; }
.card-actions span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fdf6ef; font-size: 11px; font-weight: 700; color: #736b66; }
.card-actions .speak { background: #c25b5b; color: #fff; font-size: 14px; }
.tabs { position: absolute; left: 12px; right: 12px; bottom: 14px; background: #fff; border-radius: 999px; padding: 10px 6px; display: flex; justify-content: space-around; font-size: 9px; color: #736b66; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.tabs .on { color: #c25b5b; }

/* features */
.features { max-width: var(--max); margin: 0 auto; padding: 40px 24px; text-align: center; }
.sub { color: var(--ink2); max-width: 40em; margin: 0 auto 36px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.grid article { background: var(--card); border-radius: 22px; padding: 24px; }
.grid p { margin: 0; color: var(--ink2); font-size: 15px; }
.ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; }

/* method */
.method { max-width: var(--max); margin: 40px auto; padding: 0 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.method ul { padding-left: 20px; }
.method li { margin: 8px 0; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.levels div { background: var(--card); border-radius: 18px; padding: 16px 14px; text-align: center; color: var(--ink2); font-size: 13px; }
.levels span { display: block; font-weight: 700; color: var(--accent-dark); }
.levels b { display: block; font-size: 24px; color: var(--ink); line-height: 1.2; }
.levels div:nth-child(n+4) { background: var(--card2); }

/* closing */
.closing { text-align: center; padding: 60px 24px 80px; }
.closing .store { margin-top: 16px; }

/* text pages */
main.doc { max-width: 720px; margin: 0 auto; padding: 8px 24px 64px; }
main.doc h1 { font-size: 36px; }
main.doc h2 { font-size: 22px; margin: 36px 0 8px; }
main.doc h3 { font-size: 17px; margin: 24px 0 4px; }
.meta { color: var(--ink2); margin-top: 0; }
main.doc ul { padding-left: 22px; }
main.doc li { margin: 6px 0; }

footer {
  max-width: var(--max); margin: 0 auto; padding: 24px; color: var(--ink2); font-size: 14px;
  border-top: 1px solid var(--card2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
footer nav a { margin-left: 18px; color: var(--ink2); text-decoration: none; }
footer nav a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 40px; }
  .hero-art { height: 560px; max-width: 520px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: 1fr 1fr; }
  .method { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-art { height: 500px; }
  .phone.lock { left: -6%; top: 30px; transform: rotate(-7deg) scale(.74); transform-origin: top left; }
  .phone.app { right: -6%; top: 0; transform: rotate(6deg) scale(.74); transform-origin: top right; }
  .hero-facts { gap: 20px; }
  .grid { grid-template-columns: 1fr; }
  header nav a { margin-left: 14px; font-size: 15px; }
}
