:root {
  --blue: #0057b7;
  --blue-2: #1d6fd6;
  --blue-soft: #e6effb;
  --yellow: #ffd500;
  --yellow-soft: #fff6c7;
  --green: #18a058;
  --green-soft: #e3f6ea;
  --red: #d93a3a;
  --red-soft: #fde8e8;
  --orange: #f08c00;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #17202e;
  --muted: #66708a;
  --line: #e3e7ef;
  --chip: #eef1f7;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #4b9bff; --blue-2: #6aaeff; --blue-soft: #1b2b45; --yellow: #ffd84d; --yellow-soft: #3a3418;
    --green: #3ccf7f; --green-soft: #173527; --red: #ff6b6b; --red-soft: #3c1d1f; --orange: #ffa94d;
    --bg: #0f141c; --card: #18202c; --text: #e8edf5; --muted: #95a1b6; --line: #29344a; --chip: #222c3b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #4b9bff; --blue-2: #6aaeff; --blue-soft: #1b2b45; --yellow: #ffd84d; --yellow-soft: #3a3418;
  --green: #3ccf7f; --green-soft: #173527; --red: #ff6b6b; --red-soft: #3c1d1f; --orange: #ffa94d;
  --bg: #0f141c; --card: #18202c; --text: #e8edf5; --muted: #95a1b6; --line: #29344a; --chip: #222c3b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
.uk { font-family: "Noto Sans", Roboto, system-ui, sans-serif; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

#app { min-height: 100vh; }
.page { max-width: 680px; margin: 0 auto; padding: calc(16px + var(--safe-top)) 16px calc(96px + var(--safe-bottom)); }
.page.full { padding-bottom: calc(24px + var(--safe-bottom)); }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; border: 1px solid transparent;
}
.card.flat { box-shadow: none; border-color: var(--line); }
.card.hero { background: linear-gradient(135deg, var(--blue) 0%, #0a3d91 100%); color: #fff; }
.card.hero .muted { color: rgba(255,255,255,.78); }
.card h2 { margin-bottom: 4px; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 4px 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  border-radius: 14px; padding: 12px 18px; font-weight: 650; background: var(--chip); color: var(--text);
  transition: transform .08s ease, filter .15s; text-decoration: none; min-height: 46px; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #003d82; }
.btn.yellow { background: var(--yellow); color: #1c1600; box-shadow: 0 3px 0 #c8a500; }
.btn.green { background: var(--green); color: #fff; box-shadow: 0 3px 0 #0e7a41; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; color: var(--blue); padding: 8px 10px; min-height: 0; }
.btn.block { display: flex; width: 100%; }
.btn.big { padding: 16px 22px; font-size: 18px; border-radius: 16px; }
.btn.small { padding: 7px 12px; min-height: 34px; font-size: 14px; border-radius: 11px; }
.icon-btn {
  border: 0; background: var(--chip); color: var(--text); width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 19px; flex: none;
}
.icon-btn.big { width: 76px; height: 76px; font-size: 34px; background: var(--blue); color: #fff; box-shadow: 0 4px 0 #003d82; }
.icon-btn.speaking { animation: pulse 1s infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--chip);
  font-size: 13px; font-weight: 600; white-space: nowrap; border: 0; cursor: default; color: var(--text);
}
button.chip { cursor: pointer; }
.chip.active { background: var(--blue); color: #fff; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.yellow { background: var(--yellow-soft); color: #8a6d00; }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

input.field, select.field, textarea.field {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px;
  outline: none; min-height: 48px;
}
input.field:focus, textarea.field:focus, select.field:focus { border-color: var(--blue); }
.search { position: relative; }
.search input { padding-right: 48px; }
.search .icon-btn { position: absolute; right: 4px; top: 3px; }

/* bottom navigation */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 6px 4px calc(6px + var(--safe-bottom));
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
  color: var(--muted); font-size: 11px; font-weight: 650; padding: 4px 0; border-radius: 12px;
}
.nav a .ico { font-size: 22px; line-height: 1.1; filter: grayscale(1); opacity: .75; }
.nav a.on { color: var(--blue); }
.nav a.on .ico { filter: none; opacity: 1; transform: translateY(-1px); }

/* home */
.hello { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hello h1 { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--card); box-shadow: var(--shadow);
  padding: 6px 12px; border-radius: 999px; font-weight: 750; font-size: 15px; }
.pill.fire { color: var(--orange); }
.plan { display: flex; gap: 16px; align-items: center; }
.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.ring .lbl small { font-size: 11px; font-weight: 600; opacity: .8; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode {
  background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px; border: 0; text-align: left;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 96px; color: var(--text);
}
.mode .e { font-size: 28px; }
.mode b { font-size: 15px; }
.mode span { font-size: 12.5px; color: var(--muted); }
.lesson-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.lesson-row:last-child { border-bottom: 0; }
.code { font-weight: 800; font-size: 12.5px; color: var(--blue); background: var(--blue-soft); border-radius: 10px; padding: 6px 8px; min-width: 54px; text-align: center; flex: none; }
.bar { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: 99px; transition: width .4s ease; }
.bar.green > i { background: var(--green); }
.bar.yellow > i { background: var(--yellow); }
.steps { display: flex; gap: 6px; margin-top: 8px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--chip); }
.steps i.on { background: var(--blue); }
.steps i.now { background: var(--yellow); animation: pulse 1.2s infinite; }

/* word list */
.word { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.word:last-child { border-bottom: 0; }
.word .uk { font-size: 18px; font-weight: 650; }
.word .cs { color: var(--muted); font-size: 14px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--chip); }
.dots i.on { background: var(--green); }
.dots.l5 i.on { background: var(--yellow); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 44px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; min-width: 200px; overflow: hidden; border: 1px solid var(--line); }
.menu-pop button { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: transparent; cursor: pointer; }
.menu-pop button:hover { background: var(--chip); }

/* dictionary entries */
.entry .head { display: flex; align-items: flex-start; gap: 10px; }
.entry .uk-big { font-size: 26px; font-weight: 750; }
.forms { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 10px 0; }
.forms dt { color: var(--muted); }
.forms dd { margin: 0; font-weight: 600; }
.example { padding: 8px 12px; background: var(--chip); border-radius: 12px; margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.example .t { flex: 1; }
.hook { background: var(--yellow-soft); border-radius: 12px; padding: 9px 12px; margin-top: 10px; font-size: 14px; }
.tabs { display: flex; background: var(--chip); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 4px; border-radius: 11px; font-weight: 650; cursor: pointer; color: var(--muted); font-size: 14px; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* session */
.session { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: calc(12px + var(--safe-top)) 16px 0; }
.s-top { display: flex; align-items: center; gap: 12px; }
.s-top .bar { flex: 1; height: 12px; }
.combo { font-weight: 800; color: var(--orange); min-width: 46px; text-align: right; }
.combo.pop { animation: pop .35s ease; }
.s-body { flex: 1; display: flex; flex-direction: column; padding: 18px 0 12px; }
.prompt-label { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.prompt-big { font-size: 30px; font-weight: 750; margin: 6px 0 4px; word-break: break-word; }
.prompt-cs { font-size: 24px; font-weight: 700; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.opt {
  border: 2px solid var(--line); background: var(--card); border-radius: 16px; padding: 15px 16px; text-align: left; cursor: pointer;
  font-size: 18px; font-weight: 600; box-shadow: 0 2px 0 var(--line); transition: background .15s, border-color .15s; color: var(--text);
}
.opt:active { transform: translateY(1px); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); animation: shake .35s; }
.opt.dim { opacity: .55; }
.intro-card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 22px 18px; text-align: center; }
.intro-card .uk-word { font-size: 38px; font-weight: 800; margin: 8px 0; }
.intro-card .cs-word { font-size: 21px; font-weight: 650; color: var(--blue); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--chip); padding: 3px 9px; border-radius: 999px; margin: 0 3px; }
.answer-box {
  min-height: 60px; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: 24px; font-weight: 650;
  background: var(--card); display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 16px;
}
.answer-box.ok { border-color: var(--green); background: var(--green-soft); }
.answer-box.bad { border-color: var(--red); background: var(--red-soft); }
.caret { display: inline-block; width: 2px; height: 28px; background: var(--blue); animation: blink 1s steps(1) infinite; margin-left: 1px; }
.placeholder { color: var(--muted); font-size: 16px; font-weight: 500; }
.cloze { font-size: 22px; line-height: 1.7; }
.gap { display: inline-block; min-width: 80px; border-bottom: 3px solid var(--blue); text-align: center; color: var(--blue); font-weight: 750; padding: 0 4px; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.tile {
  min-width: 46px; height: 50px; padding: 0 12px; border-radius: 13px; border: 2px solid var(--line); background: var(--card);
  font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 var(--line); color: var(--text);
}
.tile.used { visibility: hidden; }
.tile.word { font-size: 18px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; min-height: 62px; padding: 6px; border-bottom: 2px dashed var(--line); margin-top: 16px; align-items: center; justify-content: center; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.match .opt { font-size: 16px; padding: 13px 10px; text-align: center; min-height: 56px; }
.match .opt.sel { border-color: var(--blue); background: var(--blue-soft); }
.match .opt.done { visibility: hidden; }
.feedback {
  position: sticky; bottom: 0; margin: 0 -16px; padding: 16px 16px calc(16px + var(--safe-bottom)); border-radius: 22px 22px 0 0;
  animation: slideup .22s ease;
}
.feedback.ok { background: var(--green-soft); }
.feedback.bad { background: var(--red-soft); }
.feedback h3 { margin: 0 0 6px; font-size: 21px; }
.feedback.ok h3 { color: var(--green); }
.feedback.bad h3 { color: var(--red); }
.s-actions { position: sticky; bottom: 0; padding: 12px 0 calc(14px + var(--safe-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.levelup { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); color: #1c1600; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; animation: pop .4s ease; }
.ai-box { background: var(--card); border-radius: 14px; padding: 12px; margin-top: 10px; font-size: 15px; }

/* keyboard */
.kb { margin: 12px -10px 0; padding: 6px 4px; background: var(--chip); border-radius: 16px; user-select: none; }
.kb-row { display: flex; gap: 4px; margin: 4px 0; justify-content: center; }
.kb button {
  flex: 1; max-width: 46px; height: 46px; border: 0; border-radius: 9px; background: var(--card); font-size: 19px; font-weight: 600;
  box-shadow: 0 1.5px 0 rgba(0,0,0,.18); cursor: pointer; padding: 0; color: var(--text);
}
.kb button:active { background: var(--blue-soft); }
.kb button.wide { max-width: none; flex: 3; font-size: 15px; }
.kb button.enter { background: var(--blue); color: #fff; flex: 2; max-width: none; font-size: 15px; }
.kb button.fn { background: var(--line); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 18px; font-size: 16px; }
.msg.ai { background: var(--card); box-shadow: var(--shadow); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.user { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg .tr { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.msg.user .fix { background: rgba(255,255,255,.16); border-radius: 10px; padding: 6px 9px; margin-top: 6px; font-size: 13.5px; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 calc(10px + var(--safe-bottom)); }

/* stats */
.heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; overflow-x: auto; }
.heat i { border-radius: 3px; background: var(--chip); }
.heat i.l1 { background: #b9d3f5; } .heat i.l2 { background: #6fa4e8; } .heat i.l3 { background: var(--blue); } .heat i.l4 { background: #003d82; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 11px; color: var(--muted); }
.bars .b i { width: 100%; background: var(--blue); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .b b { color: var(--text); font-size: 12px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--chip); font-size: 12px; }
.badge .e { font-size: 30px; display: block; }
.badge.off { opacity: .38; filter: grayscale(1); }
.lv-bars { display: grid; gap: 8px; }
.lv-bars .r { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; }

/* misc */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(84px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; padding: 0 16px; }
.toast { background: #1d2534; color: #fff; padding: 11px 16px; border-radius: 14px; box-shadow: var(--shadow); animation: slideup .2s ease; max-width: 520px; font-size: 15px; }
.toast.err { background: var(--red); }
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--muted); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--chip); border-top-color: var(--blue); animation: spin .8s linear infinite; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .e { font-size: 44px; display: block; margin-bottom: 6px; }
details summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .t b { display: block; font-weight: 650; }
.kv .t span { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 30px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper b { min-width: 32px; text-align: center; }
.transcript { white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-height: 60vh; overflow: auto; }
pre.log { white-space: pre-wrap; font-size: 12px; max-height: 300px; overflow: auto; background: var(--chip); padding: 10px; border-radius: 10px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.big-emoji { font-size: 64px; text-align: center; animation: pop .5s ease; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.result-grid .card { text-align: center; margin: 0; padding: 12px 6px; }
.result-grid b { display: block; font-size: 22px; }
.timer { font-weight: 800; font-size: 20px; color: var(--orange); min-width: 46px; text-align: right; }
.update-banner { position: fixed; top: calc(8px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 99; }

/* songs */
.cover { border-radius: 10px; object-fit: cover; flex: none; background: var(--chip); }
.cover.ph { display: grid; place-items: center; font-size: 22px; }
.now-playing { cursor: pointer; border-color: var(--green); background: linear-gradient(135deg, var(--green-soft), var(--card) 70%); }
.now-playing .eq { color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bars-anim { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars-anim i { width: 3px; background: var(--green); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.bars-anim i:nth-child(2) { animation-delay: .2s; } .bars-anim i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.lyrics { padding: 6px 8px; }
.lyric { padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.lyric + .lyric { border-top: 1px solid var(--line); }
.lyric .uk { font-size: 18px; font-weight: 600; }
.lyric .cs { color: var(--muted); font-size: 15px; margin-top: 2px; }
.lyric .hidden-cs { letter-spacing: 3px; opacity: .5; }
.lyric.open { background: var(--blue-soft); }
.lyric-more { cursor: default; margin-top: 6px; }
.karaoke { text-align: center; padding: 18px 4px 6px; }
.kline { min-height: 26px; font-size: 16px; padding: 6px 0; }
.kline.dim { color: var(--muted); opacity: .7; }
.kline.cur { font-size: 25px; font-weight: 750; line-height: 1.35; padding: 14px 0; min-height: 90px; }
.kline.cur .cs { font-size: 16px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.options.two { grid-template-columns: 1fr 1fr; }
.gap.ok { color: var(--green); border-color: var(--green); }
.gap.bad { color: var(--red); border-color: var(--red); }
textarea.field { width: 100%; resize: vertical; font-size: 16px; line-height: 1.5; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (min-width: 720px) {
  .page { padding-top: 28px; }
  .nav { left: 50%; transform: translateX(-50%); max-width: 560px; bottom: 12px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
}
@media (max-width: 360px) {
  .kb button { height: 42px; font-size: 17px; }
  .prompt-big { font-size: 26px; }
}
