/* Glostala website — shared styles.
   Brand colors come from the launcher icon (green gradient, orange/mint arcs);
   the phone mockups use the app's own default palette (lib/theme/app_palettes.dart). */

:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-2: #eef3ec;
  --border: #dbe4d8;
  --text: #17231b;
  --body: #34423a;
  --muted: #5d6b62;
  --brand: #0a7d45;
  --brand-strong: #07633a;
  --brand-soft: #e2f2e7;
  --lime: #e6f46a;
  --orange: #f29a2e;
  --mint: #4fd1b0;
  --on-brand: #ffffff;
  --hero-from: #c9e86a;
  --hero-mid: #4fae55;
  --hero-to: #077a42;
  --shadow: 0 1px 2px rgba(20, 40, 25, .06), 0 8px 24px rgba(20, 40, 25, .08);

  /* app palette (light) */
  --app-primary: #3d4fa8;
  --app-secondary: #6f7fcc;
  --app-bg: #f8f9fe;
  --app-surface: #eceffb;
  --app-border: #d9def4;
  --app-text: #202439;
  --app-muted: #5f6480;
  --app-correct: #2a7047;
  --app-correct-surface: #e0ede5;
  --app-incorrect: #b93a32;
  --app-incorrect-surface: #f6e3e2;
  --app-reward: #ffb800;
  --app-reward-surface: #fff4d6;
  --app-reward-text: #8a5d00;
  --app-streak: #ff8a00;
  --mode-words: #3d4fa8;
  --mode-idiom: #775a8c;
  --mode-grammar: #46697c;
  --mode-listening: #a15a3c;
  --mode-speaking: #33736a;

  --radius: 20px;
  --font: "Outfit", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1612;
    --surface: #17211b;
    --surface-2: #1d2a22;
    --border: #2a3a30;
    --text: #eef4ef;
    --body: #cbd6ce;
    --muted: #93a39a;
    --brand: #4cc47e;
    --brand-strong: #6fd597;
    --brand-soft: #1c3426;
    --on-brand: #06200f;
    --hero-from: #2f5b1f;
    --hero-mid: #1d6a3a;
    --hero-to: #0b3d24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);

    --app-primary: #9aa8ef;
    --app-secondary: #7c8bd6;
    --app-bg: #13151f;
    --app-surface: #1d2030;
    --app-border: #2c3047;
    --app-text: #e7e9f4;
    --app-muted: #9aa2b0;
    --app-correct: #7ccb97;
    --app-correct-surface: #1f3328;
    --app-incorrect: #f07070;
    --app-incorrect-surface: #3a2224;
    --app-reward: #ffc233;
    --app-reward-surface: #332a14;
    --app-reward-text: #ffce5c;
    --app-streak: #ff9a2e;
    --mode-words: #9aa8ef;
    --mode-idiom: #b79ccb;
    --mode-grammar: #8db3c7;
    --mode-listening: #e5a07f;
    --mode-speaking: #7cc1b7;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1612;
  --surface: #17211b;
  --surface-2: #1d2a22;
  --border: #2a3a30;
  --text: #eef4ef;
  --body: #cbd6ce;
  --muted: #93a39a;
  --brand: #4cc47e;
  --brand-strong: #6fd597;
  --brand-soft: #1c3426;
  --on-brand: #06200f;
  --hero-from: #2f5b1f;
  --hero-mid: #1d6a3a;
  --hero-to: #0b3d24;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --app-primary: #9aa8ef;
  --app-secondary: #7c8bd6;
  --app-bg: #13151f;
  --app-surface: #1d2030;
  --app-border: #2c3047;
  --app-text: #e7e9f4;
  --app-muted: #9aa2b0;
  --app-correct: #7ccb97;
  --app-correct-surface: #1f3328;
  --app-incorrect: #f07070;
  --app-incorrect-surface: #3a2224;
  --app-reward: #ffc233;
  --app-reward-surface: #332a14;
  --app-reward-text: #ffce5c;
  --app-streak: #ff9a2e;
  --mode-words: #9aa8ef;
  --mode-idiom: #b79ccb;
  --mode-grammar: #8db3c7;
  --mode-listening: #e5a07f;
  --mode-speaking: #7cc1b7;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

:lang(en) body, body:lang(en) { line-height: 1.6; }

h1, h2, h3 { color: var(--text); line-height: 1.3; margin: 0; }
p { margin: 0; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.lang-switch {
  font-size: 14px; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.lang-switch:hover { border-color: var(--brand); }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 45%, var(--hero-to) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  /* the orange arc from the icon, as a quiet echo */
  content: ""; position: absolute; right: -180px; top: -120px; width: 520px; height: 520px;
  border-radius: 50%; border: 28px solid rgba(242, 154, 46, .35); border-left-color: transparent; border-bottom-color: transparent;
  transform: rotate(20deg); pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 72px 80px; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: .01em; }
.hero .lead { margin-top: 20px; font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.92); max-width: 34em; }
.hero .cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .note { font-size: 14px; color: rgba(255,255,255,.8); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: .04em; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 48px 56px; gap: 40px; }
  .hero .phone { margin-inline: auto; }
}

.play-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; text-decoration: none;
  border-radius: 12px; padding: 10px 20px 10px 16px; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.play-badge svg { width: 26px; height: 26px; flex: none; }
.play-badge small { display: block; font-size: 11px; line-height: 1.2; opacity: .85; letter-spacing: .04em; }
.play-badge strong { display: block; font-size: 19px; line-height: 1.2; font-weight: 600; }

/* ---------- stats ---------- */

.stats { margin-top: -36px; position: relative; z-index: 2; }
.stats ul {
  list-style: none; margin: 0; padding: 22px 12px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats li { text-align: center; padding: 6px 8px; }
.stats li + li { border-left: 1px solid var(--border); }
.stats b { display: block; font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--brand); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 760px) {
  .stats ul { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .stats li + li { border-left: 0; }
  .stats li:last-child { grid-column: 1 / -1; }
}

/* ---------- sections ---------- */

section { padding-block: 88px; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
@media (max-width: 760px) { section { padding-block: 64px; } }

/* languages */
.langs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.langs li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px; font-size: 16px; color: var(--text); }

/* feature cards */
.modes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.modes > * { grid-column: span 2; }
.modes > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 960px) {
  .modes { grid-template-columns: repeat(2, 1fr); }
  .modes > *, .modes > :nth-child(n+4) { grid-column: auto; }
  .modes > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .modes { grid-template-columns: 1fr; }
}
.mode {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 12px;
}
.mode .ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
}
.mode .ic svg { width: 26px; height: 26px; }
.mode h3 { font-size: 20px; }
.mode p { color: var(--body); font-size: 16px; }
.mode ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.mode ul li { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 2px 10px; }

/* showcase rows */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.show + .show { margin-top: 96px; }
.show.flip .show-text { order: 2; }
.show-text h3 { font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 16px; }
.show-text p + p { margin-top: 12px; }
.show-text .points { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.show-text .points li { display: flex; gap: 10px; align-items: flex-start; }
.show-text .points li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7d45' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.show .phone { justify-self: center; }
@media (max-width: 860px) {
  .show { grid-template-columns: 1fr; gap: 36px; }
  .show.flip .show-text { order: 0; }
}

/* habit grid */
.habits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .habits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .habits { grid-template-columns: 1fr; } }
.habit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.habit h3 { font-size: 18px; margin: 12px 0 8px; }
.habit p { font-size: 15px; color: var(--body); }
.habit .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.habit .ic svg { width: 22px; height: 22px; }

/* trust */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust > div { border-top: 3px solid var(--brand); padding-top: 18px; }
.trust h3 { font-size: 19px; margin-bottom: 8px; }
.trust p { font-size: 15px; }
.trust-more { margin-top: 32px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin-inline: auto; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.plan.premium { border: 2px solid var(--app-reward); background: linear-gradient(180deg, var(--app-reward-surface), var(--surface) 55%); }
.plan h3 { font-size: 22px; }
.plan .price { margin-top: 10px; font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.3; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plan ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; }
.plan ul li { display: flex; gap: 10px; }
.plan ul li::before { content: "•"; color: var(--brand); font-weight: 700; }
.plan.premium ul li::before { content: "★"; color: var(--app-reward); }
.plans-note { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; font-size: 16px; }

/* closing cta */
.closing { text-align: center; }
.closing .box {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 45%, var(--hero-to) 100%);
  border-radius: 28px; padding: 56px 24px; color: #fff;
}
.closing h2 { color: #fff; font-size: clamp(24px, 3.4vw, 34px); }
.closing p { margin-top: 12px; color: rgba(255,255,255,.9); }
.closing .play-badge { margin-top: 28px; }
.closing img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 20px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 36px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); }
.site-footer .copy { margin-left: auto; }
@media (max-width: 760px) { .site-footer .copy { margin-left: 0; width: 100%; } }

/* ================= phone mockups ================= */

.phone {
  width: 300px; max-width: 100%;
  border-radius: 44px; padding: 10px;
  background: #1b1d24;
  box-shadow: 0 30px 60px rgba(10, 30, 15, .28), inset 0 0 0 2px #33363f;
}
.screen {
  border-radius: 35px; overflow: hidden; background: var(--app-bg); color: var(--app-text);
  font-family: "Outfit", "Noto Sans JP", system-ui, sans-serif;
  aspect-ratio: 9 / 19; display: flex; flex-direction: column;
  font-size: 13px; line-height: 1.5;
}
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 4px; font-size: 11px; font-weight: 600; color: var(--app-text); }
.statusbar i { width: 70px; height: 18px; border-radius: 999px; background: #1b1d24; display: block; }
.appbar { display: flex; align-items: center; gap: 12px; padding: 8px 18px 10px; font-weight: 700; font-size: 16px; }
.appbar .x { font-size: 18px; color: var(--app-muted); font-weight: 400; }
.progress { margin: 0 18px 12px; height: 5px; border-radius: 999px; background: var(--app-surface); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--app-primary); border-radius: inherit; }
.scr-body { flex: 1; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }

/* flashcard */
.card {
  flex: 1; border: 1.5px solid var(--app-primary); border-radius: 22px; background: var(--app-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 16px; position: relative; gap: 6px;
}
.card .tag { position: absolute; top: 12px; left: 12px; font-size: 10px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--app-border); color: var(--app-muted); background: var(--app-bg); }
.card .count { position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--app-muted); }
.card .word { font-size: 26px; font-weight: 600; color: var(--app-text); }
.card .pos { font-size: 11px; color: var(--app-muted); }
.card .meaning { font-size: 18px; font-weight: 700; color: var(--app-primary); margin-top: 4px; }
.card .ex { margin-top: 12px; font-size: 12px; color: var(--app-text); background: var(--app-bg); border-radius: 12px; padding: 10px 12px; text-align: left; width: 100%; }
.card .ex span { display: block; color: var(--app-muted); font-size: 11px; margin-top: 2px; }
.card .cefr { font-size: 10px; font-weight: 700; color: var(--app-primary); border: 1px solid var(--app-primary); border-radius: 6px; padding: 0 6px; }
.rate { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate div { border-radius: 16px; padding: 12px 0; text-align: center; font-weight: 700; font-size: 14px; }
.rate .no { background: var(--app-incorrect-surface); color: var(--app-incorrect); border: 1.5px solid color-mix(in srgb, var(--app-incorrect) 45%, transparent); }
.rate .yes { background: var(--app-correct-surface); color: var(--app-correct); border: 1.5px solid color-mix(in srgb, var(--app-correct) 45%, transparent); }

/* quiz */
.q-label { font-size: 11px; color: var(--app-muted); font-weight: 600; letter-spacing: .04em; }
.q-sentence { background: var(--app-surface); border-radius: 18px; padding: 16px; font-size: 16px; font-weight: 600; line-height: 1.55; }
.q-sentence .blank { display: inline-block; min-width: 72px; border-bottom: 2px solid var(--app-primary); color: var(--app-correct); }
.q-sentence small { display: block; font-size: 11px; font-weight: 400; color: var(--app-muted); margin-top: 8px; }
.choices { display: grid; gap: 8px; }
.choices div { border: 1.5px solid var(--app-border); background: var(--app-bg); border-radius: 14px; padding: 10px 14px; font-weight: 500; font-size: 14px; }
.choices .ok { border-color: var(--app-correct); background: var(--app-correct-surface); color: var(--app-correct); font-weight: 700; }
.explain { border-radius: 14px; padding: 10px 12px; background: var(--app-correct-surface); font-size: 11.5px; color: var(--app-text); }
.explain b { color: var(--app-correct); }

/* conversation */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--app-surface); border: 1px solid var(--app-border); color: var(--app-muted); }
.chips span.on { background: var(--app-secondary); border-color: var(--app-secondary); color: #fff; }
.bubble { border-radius: 18px; padding: 10px 12px; max-width: 88%; font-size: 13px; font-weight: 600; border: 1px solid var(--app-border); }
.bubble span { display: block; font-weight: 400; color: var(--app-muted); font-size: 11px; margin-top: 4px; }
.bubble.a { background: var(--app-surface); align-self: flex-start; }
.bubble.b { background: var(--app-correct-surface); border-color: color-mix(in srgb, var(--app-correct) 30%, transparent); align-self: flex-end; }
.who { font-size: 10px; color: var(--app-muted); margin-bottom: -6px; }
.who.r { align-self: flex-end; }
.mic-row { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 6px; }
.speed { display: flex; gap: 6px; }
.speed span { font-size: 11px; border: 1px solid var(--app-border); border-radius: 10px; padding: 4px 8px; }
.speed span.on { border-color: var(--app-primary); color: var(--app-primary); font-weight: 700; }
.mic { width: 54px; height: 54px; border-radius: 50%; background: var(--mode-speaking); display: grid; place-items: center; color: #fff; }
.mic svg { width: 24px; height: 24px; }

/* home */
.home-greet { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 20px; padding: 14px; }
.home-greet b { font-size: 15px; display: block; }
.home-greet p { font-size: 11.5px; color: var(--app-muted); margin-top: 4px; }
.home-greet .btn { margin-top: 10px; background: var(--app-primary); color: #fff; text-align: center; border-radius: 12px; padding: 8px; font-weight: 700; font-size: 12.5px; }
.puzzle-card { background: var(--app-reward-surface); border: 1.5px solid var(--app-reward); border-radius: 20px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.puzzle-card b { font-size: 13px; display: block; }
.puzzle-card span { font-size: 11px; color: var(--app-reward-text); }
.puzzle-card .pc-ic { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--app-reward) 30%, transparent); display: grid; place-items: center; color: var(--app-reward-text); flex: none; }
.puzzle-card .pc-ic svg { width: 20px; height: 20px; }
.week { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 20px; padding: 12px; }
.week b { font-size: 13px; }
.week .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; text-align: center; font-size: 9.5px; color: var(--app-muted); }
.week .days i { display: block; width: 24px; height: 24px; border-radius: 50%; margin: 3px auto 0; background: var(--app-border); }
.week .days i.on { background: var(--app-streak); }
.week .days i.today { background: transparent; border: 2px solid var(--app-primary); }
.goal { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 20px; padding: 12px 14px; }
.goal div { display: flex; justify-content: space-between; font-size: 13px; }
.goal div span { color: var(--app-muted); font-size: 11.5px; }
.goal .progress { margin: 8px 0 0; height: 7px; }
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--app-border); padding: 8px 6px 14px; font-size: 9.5px; color: var(--app-muted); text-align: center; background: var(--app-surface); }
.tabbar .on { color: var(--app-primary); font-weight: 700; }
.tabbar i { display: block; width: 18px; height: 18px; margin: 0 auto 2px; border-radius: 5px; background: currentColor; opacity: .5; }
.tabbar .on i { opacity: 1; }

/* ---------- privacy page ---------- */

.doc { padding-block: 56px 88px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 18px; }
.doc h2 { font-size: 22px; margin: 44px 0 14px; padding-top: 12px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 4px; }
.doc li ul { margin: 6px 0 0; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0 0; }
.doc strong { color: var(--text); }
.doc .table-scroll { overflow-x: auto; margin: 0 0 14px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
.doc th, .doc td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); color: var(--text); }
.doc .back { display: inline-block; margin-bottom: 28px; font-size: 15px; text-decoration: none; }

/* ---- 2026-11 のアプリの画面に合わせた部品（ホーム・フラッシュカード・文法・会話） ---- */
.appbar.title-bar { justify-content: center; color: var(--app-primary); font-size: 21px; padding: 4px 18px 8px; }
.timer { display: flex; align-items: center; gap: 8px; margin: 0 18px 12px; font-size: 10.5px; color: var(--app-muted); }
.timer::before { content: ""; width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; flex: none; }
.timer .bar { flex: 1; height: 5px; border-radius: 999px; background: var(--app-surface); overflow: hidden; }
.timer .bar i { display: block; height: 100%; background: var(--app-primary); }
.puzzle-card .claim { margin-left: auto; flex: none; background: var(--app-primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 6px 12px; }
.quests { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 20px; padding: 12px 14px; }
.quests > b { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.quests > b::before { content: ""; width: 11px; height: 12px; background: var(--app-reward-text); clip-path: polygon(0 0, 100% 18%, 18% 50%, 18% 100%, 0 100%); }
.quests > small { display: block; font-size: 10.5px; color: var(--app-muted); margin-top: 2px; }
.quest { display: grid; grid-template-columns: 26px 1fr auto; gap: 9px; align-items: center; margin-top: 9px; }
.quest .qi { width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, transparent); position: relative; }
.quest .qi::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--c); opacity: .75; }
.quest b { font-size: 11px; font-weight: 600; display: block; line-height: 1.35; }
.quest .bar { height: 4px; border-radius: 999px; background: var(--app-border); margin-top: 4px; overflow: hidden; }
.quest .bar i { display: block; height: 100%; background: var(--app-reward); }
.quest span { font-size: 10.5px; color: var(--app-muted); }
.tabbar.five { grid-template-columns: repeat(5, 1fr); }
.tabbar .sound { color: var(--app-correct); font-weight: 700; }
.tabbar .sound i { opacity: 1; }
.pro-banner { display: flex; align-items: center; gap: 10px; background: var(--app-reward-surface); border-top: 1px solid var(--app-reward); padding: 8px 14px 12px; }
.pro-banner .pb-ic { width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--app-reward) 40%, transparent); flex: none; }
.pro-banner b { font-size: 12px; color: var(--app-reward-text); display: block; line-height: 1.3; }
.pro-banner span { font-size: 10px; color: var(--app-muted); }
.card .chip-row { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.card .chip { font-size: 10px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--app-border); color: var(--app-text); background: color-mix(in srgb, var(--app-secondary) 8%, var(--app-bg)); }
.card .chip.lv { color: var(--app-muted); }
.card .exbtn { margin-top: 14px; border: 1.5px solid var(--app-primary); color: var(--app-primary); border-radius: 999px; padding: 6px 22px; font-size: 12.5px; font-weight: 700; }
.rate-q { text-align: center; font-size: 11.5px; color: var(--app-muted); font-weight: 600; }
.q-instr { font-size: 11px; color: var(--app-muted); }
.choices.lettered div { display: flex; align-items: center; gap: 10px; }
.choices .ltr { width: 22px; height: 22px; border-radius: 50%; background: var(--app-surface); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--app-text); flex: none; }
.choices .ng { border-color: var(--app-incorrect); background: var(--app-incorrect-surface); }
.choices .ng .ltr { background: var(--app-incorrect); color: #fff; }
.choices .mark { margin-left: auto; font-weight: 700; }
.choices .ok .mark { color: var(--app-correct); }
.choices .ng .mark { color: var(--app-incorrect); }
.explain-card { border: 1.5px solid var(--app-border); border-radius: 14px; padding: 10px 12px; font-size: 11px; background: var(--app-surface); }
.explain-card b { display: block; font-size: 11.5px; margin-bottom: 3px; }
.next-btn { margin-top: auto; background: var(--app-primary); color: #fff; text-align: center; border-radius: 14px; padding: 10px; font-weight: 700; font-size: 13px; }
.turn { font-size: 11px; color: var(--app-text); background: color-mix(in srgb, var(--mode-speaking) 12%, var(--app-bg)); border-radius: 12px; padding: 8px 10px; text-align: center; }
.choices.lettered { gap: 6px; }
.choices.lettered div { padding: 7px 12px; font-size: 13px; }
.explain-card { font-size: 10.5px; padding: 8px 12px; }
.quest { margin-top: 7px; }
/* 公開前: リンクにしない「近日公開」。公開後は Google 公式のバッジ（リンク）に替える */
.play-badge.soon { cursor: default; }
.play-badge.soon:hover { transform: none; }
.closing .play-badge.soon { display: inline-flex; }
