/* DESIGN RULE (owner, 2026-12-04): ALL added colours must be PASTEL tones matching the logo CI.
   Pastel fill + dark same-hue text (keeps contrast readable). Strong brand red only for the logo word "grow". */
/* Nihongrow LIFF — mobile first. Big kana, big buttons, one thing per screen. System fonts only (fast). */
/* Prompt font (Cadson Demak, SIL OFL 1.1 — free for commercial use), self-hosted: fast, no third-party requests. */
@font-face{font-family:Prompt;font-style:normal;font-weight:400;font-display:swap;src:url(fonts/prompt-thai-400-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:Prompt;font-style:normal;font-weight:400;font-display:swap;src:url(fonts/prompt-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Prompt;font-style:normal;font-weight:600;font-display:swap;src:url(fonts/prompt-thai-600-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:Prompt;font-style:normal;font-weight:600;font-display:swap;src:url(fonts/prompt-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Prompt;font-style:normal;font-weight:700;font-display:swap;src:url(fonts/prompt-thai-700-normal.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:Prompt;font-style:normal;font-weight:700;font-display:swap;src:url(fonts/prompt-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root {
  /* Nihongrow CI (from logo): charcoal "Nihon", sun red "grow", sakura pink, Fuji sky blue, white */
  --bg: #FFFFFF; --card: #FFFFFF; --ink: #35353B; --muted: #707078; --line: #ECE7EA;
  --brand: #F04A4C; --brand-dark: #A8323A; --brand-soft: #FFE9EA; --coral: #FFC4C5; --coral-press: #FFB0B2;
  --sakura: #F7A8B8; --sakura-soft: #FDEEF1; --sky: #2C6FA8; --sky-soft: #E3F0FB; --sky-fill: #CDE4F7;
  --green: #2F7D48; --green-soft: #DDF3E3; --green-line: #9AD7AE; --teal: var(--sky); --teal-soft: var(--sky-soft);
  --purple: #5E35B1; --orange: var(--brand); --orange-soft: var(--sakura-soft); --red: #B23A3C; --red-soft: #FFE3E3; --red-line: #F4A9AA;
  --radius: 22px; --shadow: 0 6px 18px rgba(53, 53, 59, .08);
  --tap: 64px; --font: Prompt, system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --jp: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 19px; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background-image: radial-gradient(circle at 94% 4%, var(--sakura-soft) 0 52px, transparent 53px), linear-gradient(180deg, transparent 78%, var(--sakura-soft) 90%, var(--sky-soft) 100%);
  background-attachment: fixed;
}
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; min-height: 56px; }
.brand { font-weight: 700; font-size: 22px; flex: 1; letter-spacing: -.2px; }
.brand .b1 { color: var(--ink); } .brand .b2 { color: var(--brand); }
.streak { background: var(--orange-soft); color: var(--orange); border-radius: 999px; padding: 4px 12px; font-size: 17px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow);
  font-size: 30px; line-height: 1; color: var(--ink); cursor: pointer; }
main { flex: 1; display: flex; flex-direction: column; padding: 8px 16px 20px; max-width: 560px; width: 100%; margin: 0 auto; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: in .18s ease-out; }
.screen.center { align-items: center; justify-content: center; text-align: center; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.lead { font-size: 21px; font-weight: 600; margin: 0; }
h1 { font-size: 26px; margin: 4px 0 0; line-height: 1.3; }
h2 { font-size: 21px; margin: 0; }
.big-emoji { font-size: 72px; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.hello { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #FAD0D9, #F7A8B8); border-radius: 999px; transition: width .4s; }
.stat-row { display: flex; justify-content: space-between; font-size: 17px; color: var(--muted); }

/* Buttons — thumb sized */
.btn { width: 100%; min-height: var(--tap); border: 0; border-radius: 18px; font: inherit; font-size: 21px; font-weight: 700;
  padding: 14px 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .06s; touch-action: manipulation; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--coral); color: var(--brand-dark); box-shadow: 0 6px 14px rgba(240, 74, 76, .16); }
.btn.primary:active { background: var(--coral-press); }
.btn.teal { background: var(--sky-fill); color: var(--sky); }
.btn.soft { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.big { min-height: 84px; font-size: 23px; flex-direction: column; gap: 2px; }
.btn.big small { font-size: 16px; font-weight: 500; opacity: .9; }
.btn[disabled] { opacity: .55; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }

/* Kana flash card */
.kana-card { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 18px 12px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px; border: 3px solid transparent; cursor: pointer; user-select: none; }
.kana-card:active { border-color: var(--sakura); }
.kana { font-family: var(--jp); font-size: clamp(132px, 46vw, 230px); line-height: 1.05; font-weight: 600; color: var(--ink); }
.romaji { font-size: 40px; font-weight: 700; color: #E06466; letter-spacing: .5px; }
.thai { font-size: 26px; color: var(--muted); }
.speak { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; background: var(--sky-soft); color: var(--sky);
  border-radius: 999px; padding: 8px 18px; font-size: 19px; font-weight: 700; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--sakura); }
.note { font-size: 15px; color: var(--muted); text-align: center; }

/* Question */
.qhead { display: flex; align-items: center; gap: 12px; }
.qhead .bar { flex: 1; }
.qhead b { font-size: 17px; color: var(--muted); min-width: 52px; text-align: right; }
.prompt { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); text-align: center; padding: 12px 10px 18px; }
.prompt .kana { font-size: clamp(120px, 42vw, 210px); }
.prompt .ask { font-size: 20px; color: var(--muted); }
.prompt .romaji-big { font-size: clamp(64px, 22vw, 104px); font-weight: 700; color: #E06466; line-height: 1.15; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { min-height: 92px; border-radius: 20px; border: 3px solid var(--line); background: var(--card); font: inherit; cursor: pointer;
  font-size: 34px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow); touch-action: manipulation; position: relative; }
.opt.jp { font-family: var(--jp); font-size: 52px; font-weight: 600; }
.opt.right { border-color: var(--green-line); background: var(--green-soft); color: var(--green); }
.opt.wrong { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
.opt.right::after { content: "✓"; position: absolute; top: 6px; right: 12px; font-size: 22px; color: var(--green); }
.opt.wrong::after { content: "✗"; position: absolute; top: 6px; right: 12px; font-size: 22px; color: var(--red); }
.feedback { border-radius: 18px; padding: 12px 16px; font-size: 20px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.feedback small { flex-basis: 100%; }
.feedback.ok { background: var(--green-soft); color: var(--green); }
.feedback.no { background: var(--red-soft); color: var(--red); }
.feedback small { display: block; font-weight: 500; font-size: 17px; color: var(--ink); }

/* Done + progress */
.done { text-align: center; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { background: var(--card); box-shadow: var(--shadow); border-radius: 16px; padding: 10px 14px; font-size: 18px; font-weight: 700; }
.grid-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; }
.tile b { display: block; font-size: 32px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 16px; }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--sakura-soft); border-top-color: var(--sakura); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
