/* ==========================================================================
   English Дети — детский портал и кабинет ученика.
   Поверх brand.css: те же токены, «стикерный» стиль, крупные цели для пальцев.
   ========================================================================== */

:root {
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
}

body.pt {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(30, 27, 58, .07) 1.3px, transparent 1.4px);
  background-size: 24px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#app:focus, #app:focus-visible { outline: none; }

/* ---------------------------------------------------------------- Шапка */
.pt-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 236, .93);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: var(--bw) solid var(--ink);
}
.pt-top-in {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.pt-top .logo { flex: 0 0 auto; font-size: 18px; min-height: 44px; }
.pt-top .logo img { width: 42px; height: 42px; transition: transform .2s; }
.pt-top .logo:hover img { transform: rotate(-8deg) scale(1.05); }
.pt-nav { display: flex; gap: 6px; margin-left: auto; }
.pt-nav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 8px 14px;
  border-radius: 999px; border: 2px solid transparent; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.pt-nav a:hover { background: rgba(30, 27, 58, .06); }
.pt-nav a[aria-current="page"] { background: var(--paper); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.nav-emo { font-family: var(--emoji); }
.pt-tools { display: flex; align-items: center; gap: 8px; }
.pt-stars {
  display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 12px;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--yellow);
  font-weight: 900; box-shadow: 2px 2px 0 var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pt-stars > span[aria-hidden] { font-family: var(--emoji); }
.pt-stars.bump { animation: bump .5s ease; }
.pt-mute {
  width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--ink); background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink); font-size: 20px; display: grid; place-items: center; padding: 0;
  font-family: var(--emoji); transition: transform .12s;
}
.pt-mute:active { transform: translate(2px, 2px); box-shadow: none; }
.pt-mute[aria-pressed="false"] { background: #EEEAF4; }

@media (max-width: 600px) { .pt-top .logo span { display: none; } }
@media (max-width: 420px) {
  .pt-top-in { padding: 8px 12px; gap: 6px; }
  .pt-nav { gap: 2px; }
  .pt-nav a { padding: 8px 10px; }
  .pt-stars { display: none; }
}
@media (max-width: 350px) { .nav-emo { display: none; } }

/* ------------------------------------------------------------- Каркас */
.pt-main { flex: 1 0 auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: 22px 16px 64px; }
@media (min-width: 700px) { .pt-main { padding: 30px 24px 72px; } }
.pt-main h1 { font-size: clamp(28px, 5vw, 44px); }
.pt-main h2 { font-size: clamp(21px, 3.4vw, 28px); }
.pt-foot { border-top: 2px dashed rgba(30, 27, 58, .15); }
.pt-foot-in {
  max-width: 1120px; margin: 0 auto; padding: 18px 16px 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3); font-weight: 700;
}
.pt-foot a { color: var(--ink-2); }
.pt-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 50vh; font-weight: 800; color: var(--ink-2);
}
.state-card { max-width: 540px; margin: 30px auto; text-align: center; }
.state-card .fox { margin: 0 auto 10px; }
.center-row { justify-content: center; }
.w100 { width: 100%; }
.btn.btn-wrap { white-space: normal; text-align: center; }
.emo { font-family: var(--emoji); line-height: 1; font-style: normal; }
.h-card { font-size: 20px !important; margin: 0 0 12px; }
.sec-title { font-size: clamp(20px, 3.4vw, 26px) !important; margin: 22px 0 14px; }

/* Цвета уровней и игр: --c яркий, --cs мягкий, --ct текст на ярком */
.c-yellow { --c: var(--yellow); --cs: var(--yellow-soft); --ct: var(--ink); }
.c-mint { --c: var(--mint); --cs: var(--mint-soft); --ct: #fff; }
.c-blue { --c: var(--blue); --cs: var(--blue-soft); --ct: #fff; }
.c-purple { --c: var(--purple); --cs: var(--purple-soft); --ct: #fff; }
.c-orange { --c: var(--orange); --cs: var(--orange-soft); --ct: #fff; }
.c-pink { --c: var(--pink); --cs: var(--pink-soft); --ct: #fff; }

/* «Картинка» из перевода, когда у слова нет эмодзи */
.ru-pic {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  max-width: 100%; padding: .35em .6em; border-radius: 16px;
  background: var(--cs, var(--yellow-soft)); border: 2px dashed var(--ink);
  font-weight: 900; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- Фокси */
.fox { display: block; flex: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.fox-sm { width: 60px; height: 60px; }
.fox-md { width: 92px; height: 92px; }
.fox-xl { width: clamp(140px, 30vw, 250px); height: auto; }
.fox.fx-yes { animation: foxJump .7s cubic-bezier(.3, 1.5, .5, 1); }
.fox.fx-no { animation: foxShake .55s ease; }
.fox.fx-cheer { animation: foxCheer 1s ease-in-out infinite; }

.bubble {
  position: relative; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 18px;
  padding: 10px 16px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); line-height: 1.3;
  max-width: 100%; min-width: 0; overflow-wrap: anywhere;
}
.bubble small { display: block; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.bubble-left::before, .bubble-left::after {
  content: ''; position: absolute; top: 50%; width: 0; height: 0; border-style: solid; border-color: transparent;
}
.bubble-left::before { left: -14px; margin-top: -10px; border-width: 10px 14px 10px 0; border-right-color: var(--ink); }
.bubble-left::after { left: -9px; margin-top: -7px; border-width: 7px 10px 7px 0; border-right-color: var(--paper); }
.bubble.pop { animation: popIn .25s ease; }

/* ---------------------------------------------------------------- Вход */
.entry-hero { display: grid; gap: 14px; align-items: center; margin: 4px 0 26px; }
.entry-fox { display: flex; align-items: center; gap: 16px; }
.entry-fox .fox-xl { width: clamp(120px, 34vw, 240px); }
.entry-bubble { font-size: 20px; }
.entry-text h1 { font-size: clamp(32px, 6vw, 58px); margin-bottom: 12px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); font-weight: 600; max-width: 580px; margin: 0; }
@media (min-width: 860px) {
  .entry-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; }
  .entry-fox { flex-direction: column-reverse; align-items: center; }
  .entry-bubble.bubble-left::before { left: 50%; top: auto; bottom: -14px; margin: 0 0 0 -10px; border-width: 14px 10px 0 10px; border-color: var(--ink) transparent transparent; }
  .entry-bubble.bubble-left::after { left: 50%; top: auto; bottom: -9px; margin: 0 0 0 -7px; border-width: 10px 7px 0 7px; border-color: var(--paper) transparent transparent; }
}
.choice-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .choice-grid { grid-template-columns: 1.1fr 1fr; gap: 26px; } }
.choice { padding: 24px; border-radius: 28px; }
.choice-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.choice-head h2 { margin: 0 0 2px; }
.choice-head p { margin: 0; }
.choice-ico {
  font-family: var(--emoji); font-size: 30px; width: 60px; height: 60px; flex: none;
  display: grid; place-items: center; background: var(--orange-soft);
  border: var(--bw) solid var(--ink); border-radius: 18px; transform: rotate(-6deg);
}
.login-form { display: grid; gap: 14px; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 60px; }
.pw-eye {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 50px; height: 44px; border: 0; background: transparent; border-radius: 11px;
  font-size: 20px; font-family: var(--emoji); padding: 0;
}
.pw-eye:hover { background: rgba(30, 27, 58, .06); }
.form-err {
  background: var(--red-soft); color: #8C1D18; border: 2px solid var(--red); border-radius: 14px;
  padding: 10px 14px; font-weight: 700; font-size: 15px; animation: shake .4s;
}
.login-hint { margin: 16px 0 0; color: var(--ink-2); }
.login-hint a { font-weight: 800; color: #1D4FB8; }
.choice-play { background: var(--mint-soft); display: flex; flex-direction: column; align-items: flex-start; }
.choice-play p { font-weight: 600; font-size: 18px; }
.choice-play-emo { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.choice-play-emo span {
  font-family: var(--emoji); font-size: 28px; width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink);
  animation: floaty 4s ease-in-out infinite;
}
.choice-play-emo span:nth-child(1) { --rot: -6deg; }
.choice-play-emo span:nth-child(2) { --rot: 4deg; animation-delay: -.8s; }
.choice-play-emo span:nth-child(3) { --rot: -3deg; animation-delay: -1.6s; }
.choice-play-emo span:nth-child(4) { --rot: 6deg; animation-delay: -2.4s; }
.choice-play-emo span:nth-child(5) { --rot: -4deg; animation-delay: -3.2s; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.entry-foot { text-align: center; margin: 34px 0 0; font-size: 14px; }
.entry-foot a { color: var(--ink-3); font-weight: 700; }
/* Карточка «Кабинет для родителей — скоро» (пока вход по номеру телефона не готов) */
.choice-soon .choice-ico { background: var(--blue-soft); }
.soon-lead { margin: 0 0 14px; font-weight: 600; color: var(--ink-2); }
.soon-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.soon-list li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.soon-list li span {
  font-family: var(--emoji); font-size: 19px; width: 38px; height: 38px; flex: none;
  display: grid; place-items: center; background: var(--yellow-soft);
  border: 2px solid var(--ink); border-radius: 12px;
}
.soon-note { margin: 0; padding: 12px 14px; background: var(--mint-soft); border-radius: 16px; font-weight: 700; }
/* На телефоне сначала «Играть без входа», на широком экране — как раньше: слева карточка для родителей */
@media (max-width: 859px) { .choice-grid > .choice-soon + .choice-play { order: -1; } }
@media (max-width: 420px) {
  .choice { padding: 20px 16px; }
  .choice-play-emo span { width: 48px; height: 48px; font-size: 24px; }
  .entry-bubble { font-size: 17px; }
}

/* ------------------------------------------------------------- Кабинет */
.cab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cab-hi { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cab-title { font-size: clamp(26px, 5vw, 42px) !important; margin: 0 0 2px; overflow-wrap: anywhere; }
.cab-sub { margin: 0; font-weight: 700; color: var(--ink-2); }
.cab-tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.cab-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px;
  border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--paper);
  font-weight: 800; text-decoration: none; box-shadow: 2px 2px 0 var(--ink); text-align: center;
}
.cab-tab:hover { transform: translateY(-1px); }
.cab-tab.is-active { background: var(--ink); color: #fff; }
@media (max-width: 520px) {
  .cab-head { align-items: flex-start; }
  .cab-hi .fox { width: 62px; height: 62px; }
  .cab-tab { flex: 1 1 0; padding: 10px 8px; font-size: 15px; }
}
@media (max-width: 420px) {
  .cab-hi { gap: 10px; }
  .cab-hi .fox { width: 52px; height: 52px; }
  .cab-title { font-size: 24px !important; }
  .cab-sub { font-size: 14px; }
  .cab-head .btn-sm { padding: 8px 12px; }
}
.cab-grid { display: grid; gap: 18px; }
@media (min-width: 860px) { .cab-grid { grid-template-columns: 1fr 1fr; } }
.cab-sec { margin-top: 36px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-h h2 { margin: 0; }
.sec-p { margin: -8px 0 16px; }

.stars-card { background: var(--yellow-soft); display: flex; flex-direction: column; }
.stars-cta { margin-top: auto; padding-top: 16px; }
.stars-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.stars-big { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-weight: 800; font-size: clamp(44px, 9vw, 60px); line-height: 1; }
.stars-ico { font-family: var(--emoji); display: inline-block; animation: starSpin 4s ease-in-out infinite; }
.stars-txt { min-width: 0; flex: 1 1 160px; }
.stars-txt h2 { margin: 0 0 2px; font-size: 18px !important; }
.stars-txt p { margin: 0; }
.rank { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rank-sticker {
  font-family: var(--emoji); font-size: 32px; width: 58px; height: 58px; flex: none;
  display: grid; place-items: center; border-radius: 18px; background: var(--cs);
  border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg);
}
.rank-name { font-family: var(--f-head); font-weight: 700; font-size: 19px; line-height: 1.15; }
.rank-next { margin: 8px 0 0; }
.bar { height: 20px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.bar i {
  display: block; height: 100%; min-width: 8px;
  background: repeating-linear-gradient(45deg, var(--orange) 0 10px, #FF9152 10px 20px);
  border-right: var(--bw) solid var(--ink); border-radius: 999px; transition: width .6s ease;
}

.next-card { background: var(--blue-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transition: background .3s; }
.next-card.is-live { background: var(--orange-soft); }
.next-top { display: flex; gap: 8px; flex-wrap: wrap; }
.next-date { font-size: clamp(22px, 3.8vw, 28px) !important; margin: 4px 0 0; }
.next-meta { margin: 0; font-weight: 700; color: var(--ink-2); }
.next-count {
  font-weight: 900; font-size: 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px;
  padding: 8px 14px; font-variant-numeric: tabular-nums;
}
.next-count.is-live { background: var(--orange); color: #fff; }
.next-join { margin-top: 4px; }
.next-join.is-live { animation: pulseRing 1.5s infinite; }
.next-nolink { font-weight: 800; background: var(--paper); border: 2px dashed var(--ink-3); border-radius: 14px; padding: 10px 14px; margin: 4px 0 0; }
.next-note { margin: 6px 0 0; color: var(--ink-2); }

.hw-note {
  display: flex; gap: 12px; align-items: flex-start; background: var(--yellow-soft);
  border: var(--bw) solid var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow);
  transform: rotate(-.5deg); margin-bottom: 22px; font-weight: 700; font-size: 17px; overflow-wrap: anywhere;
}
.hw-pin { font-family: var(--emoji); font-size: 24px; line-height: 1; }

/* Плитки тем */
.u-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px 16px; padding-top: 6px; }
@media (max-width: 520px) { .u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }
.u-tile {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px; min-height: 176px;
  background: var(--cs); border: var(--bw) solid var(--ink); border-radius: 22px; box-shadow: var(--shadow);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .2s; min-width: 0;
}
.u-tile:hover { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: 6px 6px 0 var(--ink); }
.u-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.u-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.u-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: var(--ct);
  border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none;
}
.u-stars { font-weight: 900; font-size: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.u-emo { font-family: var(--emoji); font-size: 28px; letter-spacing: 2px; margin: 8px 0 4px; line-height: 1.1; transition: filter .2s, opacity .2s; }
.u-title { font-family: var(--f-head); font-weight: 700; font-size: 16px; line-height: 1.15; overflow-wrap: anywhere; }
.u-ru { font-size: 13.5px; color: var(--ink-2); font-weight: 700; line-height: 1.25; }
.u-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.u-dots { display: flex; gap: 4px; }
.u-dots i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); }
.u-dots i.on { background: var(--c); }
.u-new { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.u-flag {
  position: absolute; top: -13px; left: 10px; z-index: 1;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px;
  border-radius: 999px; transform: rotate(-3deg); white-space: nowrap; max-width: calc(100% - 16px);
  overflow: hidden; text-overflow: ellipsis;
}
.u-tile.is-new { background: #F4F0E8; }
.u-tile.is-new .u-emo { filter: grayscale(.85); opacity: .55; }
.u-tile.is-new:hover { background: var(--cs); }
.u-tile.is-new:hover .u-emo { filter: none; opacity: 1; }
.u-tile.is-cur { outline: 3px dashed var(--ink); outline-offset: 5px; }

/* Стикеры */
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .stickers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.sticker {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 14px 8px 10px; border-radius: 22px; border: var(--bw) solid var(--ink);
  background: var(--cs); box-shadow: var(--shadow); transform: rotate(var(--rot, 0deg));
}
.sticker.is-got:hover { transform: rotate(0) scale(1.05); transition: transform .2s; }
.st-emo { font-family: var(--emoji); font-size: 44px; line-height: 1.1; }
.st-name { font-weight: 800; font-size: 13px; line-height: 1.2; }
.st-need { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.sticker.is-locked { background: #F1EDE5; border-style: dashed; border-color: var(--ink-3); box-shadow: none; transform: none; }
.sticker.is-locked .st-emo { filter: grayscale(1) brightness(.3); opacity: .22; }
.sticker.is-locked .st-name { color: var(--ink-3); }

/* Родителям */
.kid-info { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.kid-info .chip { display: inline-block; white-space: normal; max-width: 100%; }
.par-grid { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 860px) { .par-grid { grid-template-columns: 1fr 1.25fr; align-items: start; } }
.par-sec, .teacher-card { margin-bottom: 18px; }
.bal-card { background: var(--mint-soft); }
.bal-card.is-debt { background: var(--red-soft); }
.bal-card.is-zero { background: var(--yellow-soft); }
.bal-label { font-weight: 800; }
.bal-big { font-family: var(--f-head); font-weight: 800; font-size: clamp(40px, 8vw, 58px); line-height: 1.05; margin: 6px 0 8px; }
.bal-big small { font-size: 20px; }
.is-debt .bal-big { color: var(--red); }
.bal-card p { margin: 0; }
.bal-dl { margin: 16px 0 0; display: grid; gap: 6px; border-top: 2px dashed rgba(30, 27, 58, .25); padding-top: 12px; }
.bal-dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.bal-dl dt { color: var(--ink-2); font-weight: 700; }
.bal-dl dd { margin: 0; font-weight: 900; white-space: nowrap; }
.pay-rows { display: grid; gap: 10px; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); }
.pay-k { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.pay-v { font-weight: 900; font-size: 17px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copy-btn { flex: none; min-height: 44px; }
.copy-btn.is-copied { --bg: var(--mint); --fg: #fff; }
.pay-note { margin: 12px 0 0; color: var(--ink-2); }
.pay-hint { background: var(--blue-soft); border-radius: 14px; padding: 12px 14px; font-weight: 700; margin: 14px 0 12px; }
@media (max-width: 440px) { .copy-btn span { display: none; } .copy-btn { width: 48px; padding: 0; } }
.ls-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.ls-item { border: 2px solid var(--ink); border-radius: 16px; padding: 14px; background: var(--cream); display: grid; gap: 8px; justify-items: start; min-width: 0; }
.ls-when { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ls-topic { font-weight: 800; }
.ls-comment { margin: 0; background: var(--paper); border-left: 5px solid var(--orange); border-radius: 10px; padding: 10px 12px; width: 100%; overflow-wrap: anywhere; }
.ls-cap { display: block; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 2px; }
.ls-hw { background: var(--yellow-soft); border-radius: 10px; padding: 8px 12px; width: 100%; overflow-wrap: anywhere; }
.ls-item p { margin: 0; }
.ls-item > .btn { max-width: 100%; }
.teacher-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--purple-soft); }
.teacher-card .h-card { margin-bottom: 4px; }
.teacher-card p { margin: 0; }
.par-sec a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------- Игровая зона */
.play-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.play-title { margin: 6px 0 18px; }
.hw-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px;
  background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 18px; margin: 0 0 24px;
}
.hw-strip-t { font-weight: 900; }
.chip-link { text-decoration: none; min-height: 40px; white-space: normal; box-shadow: 2px 2px 0 var(--ink); }
.chip-link:hover { background: var(--yellow); }

.lvl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 18px; padding-top: 6px; }
.lvl-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; min-height: 230px;
  background: var(--cs); border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; min-width: 0;
}
.lvl-card:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.lvl-card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.lvl-card:hover .lvl-emo { transform: rotate(6deg) scale(1.06); }
.lvl-emo {
  font-family: var(--emoji); font-size: 40px; width: 74px; height: 74px; display: grid; place-items: center;
  border-radius: 22px; background: var(--c); border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg); margin-bottom: 8px; transition: transform .2s;
}
.lvl-name { font-family: var(--f-head); font-weight: 800; font-size: 22px; line-height: 1.1; }
.lvl-nick { font-weight: 800; color: var(--ink-2); }
.lvl-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.lvl-meta .chip { font-size: 12.5px; padding: 3px 9px; }
.lvl-foot { margin-top: auto; padding-top: 6px; display: flex; gap: 12px; font-weight: 800; font-size: 14px; flex-wrap: wrap; }
.lvl-mine {
  position: absolute; top: -13px; right: 12px; z-index: 1; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; transform: rotate(3deg); white-space: nowrap;
}
.lvl-card.is-mine { box-shadow: var(--shadow-lg); }
@media (max-width: 520px) {
  .lvl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .lvl-card { padding: 14px 12px; min-height: 200px; border-radius: 22px; }
  .lvl-emo { width: 58px; height: 58px; font-size: 32px; border-radius: 18px; }
  .lvl-name { font-size: 18px; }
  .lvl-nick { font-size: 15px; }
}
.abc-banner {
  display: flex; align-items: center; gap: 16px; margin-top: 26px; padding: 16px 18px;
  background: var(--yellow); border: var(--bw) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow);
  text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.abc-banner:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.abc-banner-l {
  font-family: var(--f-head); font-weight: 800; font-size: 32px; width: 70px; height: 70px; flex: none;
  display: grid; place-items: center; background: var(--paper); border: var(--bw) solid var(--ink);
  border-radius: 20px; transform: rotate(-5deg);
}
.abc-banner b { display: block; font-family: var(--f-head); font-size: 20px; }
.abc-banner .grow > span { display: block; font-weight: 700; font-size: 15px; }
.abc-banner-go { font-size: 28px; font-weight: 900; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; margin-bottom: 14px;
  font-weight: 800; text-decoration: none; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--paper); box-shadow: 2px 2px 0 var(--ink);
}
.back-link:hover { transform: translateX(-2px); }
.lvl-head, .unit-head {
  display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--cs);
  border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.lvl-head h1, .unit-head h1 { font-size: clamp(24px, 4.6vw, 38px); margin: 0 0 4px; overflow-wrap: anywhere; }
.lvl-head p, .unit-head p { margin: 0; font-weight: 700; }
.lvl-head-nick { color: var(--ink-2); }
.lvl-head-emo {
  font-family: var(--emoji); font-size: 42px; width: 76px; height: 76px; flex: none; display: grid; place-items: center;
  background: var(--c); border: var(--bw) solid var(--ink); border-radius: 22px; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--ink);
}
.lvl-outcome { margin: 0 0 22px; }
.unit-emo {
  font-family: var(--emoji); font-size: 32px; flex: none; background: var(--paper); border: var(--bw) solid var(--ink);
  border-radius: 20px; padding: 10px 12px; transform: rotate(-3deg); line-height: 1; letter-spacing: 2px;
}
.unit-stars { font-weight: 900; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; flex: none; white-space: nowrap; }
@media (max-width: 560px) {
  .lvl-head, .unit-head { flex-wrap: wrap; padding: 14px; gap: 12px; }
  .lvl-head-emo { width: 60px; height: 60px; font-size: 32px; }
}

.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
@media (max-width: 520px) { .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.g-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 18px 12px 16px; min-height: 176px; background: var(--paper); border: var(--bw) solid var(--ink);
  border-radius: 24px; box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0;
}
.g-tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.g-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.g-emo {
  font-family: var(--emoji); font-size: 38px; width: 78px; height: 78px; display: grid; place-items: center;
  border-radius: 50%; background: var(--cs); border: var(--bw) solid var(--ink); margin-bottom: 6px; transition: transform .2s;
}
.g-tile:hover .g-emo { transform: rotate(-10deg) scale(1.08); }
.g-name { font-family: var(--f-head); font-weight: 700; font-size: 17px; line-height: 1.15; }
.g-desc { font-size: 13.5px; color: var(--ink-2); font-weight: 700; line-height: 1.25; }
.g-done {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--mint); color: #fff; border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900;
}
.words-card { margin-bottom: 18px; }
.say-hint { font-family: var(--f-body); font-size: 14px; font-weight: 700; color: var(--ink-3); }
.w-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.w-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 10px; max-width: 100%;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 2px 2px 0 var(--ink); text-align: left;
}
.w-chip:hover { background: var(--yellow-soft); }
.w-chip .emo { font-size: 24px; }
.w-chip b { font-size: 16px; }
.w-chip small { color: var(--ink-2); font-weight: 700; font-size: 13px; }
.w-chip.is-say { animation: sayPop .4s ease; }
.phrases { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.phrases li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.say-sm {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink); font-size: 18px; display: grid; place-items: center; padding: 0; font-family: var(--emoji);
}
.say-sm.is-say { animation: sayPop .4s ease; }

/* Без озвучки кнопки 🔊 не показываем */
.no-speech .say-btn, .no-speech .say-hint { display: none !important; }

/* --------------------------------------------------------- Оболочка игры */
.game { max-width: 820px; margin: 0 auto; }
.g-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.g-back {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center; border: var(--bw) solid var(--ink);
  border-radius: 16px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font-size: 24px; font-weight: 900; text-decoration: none;
}
.g-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.g-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.g-title > span:last-child { min-width: 0; }
.g-title-emo {
  font-family: var(--emoji); font-size: 26px; width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 14px; background: var(--cs); border: 2px solid var(--ink);
}
.g-title b { display: block; font-family: var(--f-head); font-size: 18px; line-height: 1.15; }
.g-title small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-count {
  font-weight: 900; font-size: 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 12px; flex: none; font-variant-numeric: tabular-nums;
}
.g-count:empty { display: none; }
.g-prog { height: 14px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; margin-bottom: 14px; }
.g-prog i { display: block; height: 100%; width: 0; background: var(--c); transition: width .4s ease; }
.g-fox { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; min-height: 64px; }
.g-stage { position: relative; }
.g-hint { text-align: center; color: var(--ink-2); font-size: 14px; font-weight: 700; margin: 16px 0 0; }
.g-start {
  text-align: center; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 28px;
  box-shadow: var(--shadow); padding: 30px 20px; max-width: 520px; margin: 10px auto;
}
.g-start h2 { margin-bottom: 8px; }
.g-start p { color: var(--ink-2); font-weight: 600; }
.g-start-emo { font-family: var(--emoji); font-size: 72px; line-height: 1; margin-bottom: 12px; display: inline-block; animation: floaty 3s ease-in-out infinite; }
.g-round { width: 60px; height: 60px; min-height: 60px; padding: 0; border-radius: 50%; font-size: 24px; font-family: var(--emoji); }
.g-round-lg { width: 74px; height: 74px; font-size: 30px; }
.g-round[disabled] { opacity: .35; }
.game .btn-sm { min-height: 48px; padding: 10px 18px; font-size: 15px; }
@media (max-width: 420px) {
  .g-bar { gap: 8px; }
  .g-title-emo { display: none; }
  .g-title b { font-size: 16px; }
  .g-fox .fox-sm { width: 50px; height: 50px; }
}

/* disabled-кнопки в Safari бледнеют — возвращаем цвет */
.opt:disabled, .qz-opt:disabled, .sp-tile:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; cursor: default; }

/* ------------------------------------------------------------ Карточки */
.fc-wrap { display: flex; flex-direction: column; align-items: center; }
.fc-scene { width: min(440px, 100%); perspective: 1400px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.fc {
  display: block; width: 100%; height: clamp(300px, 72vw, 400px); padding: 0; border: 0; background: none;
  border-radius: 32px; -webkit-tap-highlight-color: transparent; color: var(--ink);
}
.fc.in-r { animation: cardInR .35s ease; }
.fc.in-l { animation: cardInL .35s ease; }
.fc-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.35, .5, 1); }
.fc.is-flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 22px; border: var(--bw) solid var(--ink); border-radius: 32px; box-shadow: var(--shadow-lg);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; background: var(--paper);
}
.fc-front { background: linear-gradient(var(--cs), var(--cs)) top / 100% 42% no-repeat, var(--paper); }
.fc-front .emo { font-size: clamp(96px, 26vw, 150px); filter: drop-shadow(4px 4px 0 rgba(30, 27, 58, .15)); }
.fc-front .ru-pic { font-size: clamp(28px, 7vw, 40px); padding: 18px 22px; background: var(--paper); }
.fc-en { font-weight: 900; font-size: clamp(34px, 9vw, 52px); line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
.fc-tap { position: absolute; bottom: 12px; right: 18px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.fc-back { transform: rotateY(180deg); background: var(--cs); }
.fc-ru { font-weight: 900; font-size: clamp(30px, 8vw, 46px); text-align: center; line-height: 1.1; overflow-wrap: anywhere; }
.fc-mini { font-family: var(--emoji); font-size: 58px; line-height: 1; }
.fc-en-sm { font-weight: 800; font-size: 20px; color: var(--ink-2); }
.fc-ctrl { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 24px; }
.fc-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 18px; max-width: 320px; }
.fc-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); transition: transform .2s, background .2s; }
.fc-dots i.seen { background: var(--cs); }
.fc-dots i.cur { background: var(--c); transform: scale(1.3); }
.fc-done { margin-top: 18px; animation: bounceIn .5s; }

/* ---------------------------------------------------------- Найди пару */
.mm-top { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.mm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto; }
@media (max-width: 560px) {
  .mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
.mc {
  position: relative; display: block; width: 100%; aspect-ratio: 5 / 6; min-height: 96px; padding: 0; border: 0;
  background: none; perspective: 900px; -webkit-tap-highlight-color: transparent; color: var(--ink);
}
@supports not (aspect-ratio: 1) { .mc { height: 124px; } }
@media (max-width: 560px) { .mc { aspect-ratio: 1 / 1; } }
.mc-inner { position: absolute; top: 0; left: 0; right: 0; bottom: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.mc.is-open .mc-inner, .mc.is-matched .mc-inner { transform: rotateY(180deg); }
.mc-face {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  padding: 6px; border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden;
}
.mc-back {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 8px, transparent 8px 16px) var(--c);
  color: #fff; font-family: var(--f-head); font-weight: 800; font-size: clamp(28px, 7vw, 40px); text-shadow: 2px 2px 0 var(--ink);
}
.mc:hover .mc-back { filter: brightness(1.05); }
.mc-front { transform: rotateY(180deg); background: var(--paper); }
.mc-front.is-word { background: var(--cs); }
.mc-front .emo { font-size: clamp(36px, 11vw, 58px); }
.mc-front .ru-pic { font-size: clamp(13px, 3.4vw, 17px); padding: 6px 8px; border-radius: 12px; }
.mc-word { font-weight: 900; font-size: clamp(14px, 4vw, 21px); line-height: 1.1; text-align: center; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.mc.is-matched .mc-front { background: var(--mint-soft); }
.mc.is-matched .mc-front::after {
  content: '✓'; position: absolute; top: 5px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--ink);
}
.mc.is-matched { animation: rightPop .5s ease .1s; }

/* ------------------------------------------------- Послушай и выбери */
.ls-top { display: flex; justify-content: center; margin-bottom: 18px; }
.ls-play { font-size: 20px; font-family: var(--f-body); }
.ls-word { text-align: center; }
.ls-word span { display: block; font-weight: 700; color: var(--ink-2); }
.ls-word b { font-size: clamp(36px, 9vw, 54px); font-weight: 900; line-height: 1.1; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 560px; margin: 0 auto; }
.opt {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: clamp(130px, 34vw, 180px);
  padding: 14px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 24px; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s, background .2s; -webkit-tap-highlight-color: transparent; color: var(--ink);
}
.opt:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.opt:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.opt .emo { font-size: clamp(60px, 17vw, 90px); }
.opt .ru-pic { font-size: clamp(18px, 4.8vw, 24px); }
.opt-n { position: absolute; top: 8px; left: 11px; font-size: 12px; font-weight: 900; color: var(--ink-3); font-family: var(--f-body); }
.opt.is-right, .qz-opt.is-right { background: var(--mint-soft); box-shadow: 0 0 0 5px var(--mint), var(--shadow); animation: rightPop .5s ease; }
.opt.is-wrong, .qz-opt.is-wrong { background: var(--red-soft); animation: shake .45s ease; opacity: .7; box-shadow: none; }
.ls-reveal { text-align: center; min-height: 34px; margin-top: 16px; font-size: 21px; font-weight: 800; }

/* ------------------------------------------------------- Собери слово */
.sp-card {
  display: flex; align-items: center; justify-content: center; gap: 20px; margin: 0 auto 20px; padding: 16px 20px;
  max-width: 460px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow);
}
.sp-pic .emo { font-size: clamp(72px, 20vw, 104px); }
.sp-pic .ru-pic { font-size: clamp(22px, 6vw, 30px); padding: 14px 16px; }
.sp-side { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.sp-ru { font-weight: 800; font-size: 18px; color: var(--ink-2); text-align: center; }
.sp-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin: 0 auto 22px; }
.sp-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sp-slot, .sp-fix {
  width: clamp(34px, 9vw, 50px); height: clamp(46px, 11vw, 58px); display: grid; place-items: center;
  font-weight: 900; font-size: clamp(22px, 6vw, 30px); line-height: 1;
}
.sp-slot { border-bottom: 4px solid var(--ink); background: rgba(255, 255, 255, .7); border-radius: 10px 10px 4px 4px; }
.sp-slot.is-filled { background: var(--cs); border: var(--bw) solid var(--ink); border-bottom-width: 4px; animation: popIn .2s ease; }
.sp-slot.is-hint { background: var(--yellow-soft); }
.sp-slots.is-done .sp-slot { background: var(--mint-soft); animation: bounceIn .5s ease; }
.sp-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 620px; margin: 0 auto; }
.sp-tile {
  min-width: 56px; height: 62px; padding: 0 12px; background: var(--paper); border: var(--bw) solid var(--ink);
  border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); font-weight: 900; font-size: 28px; color: var(--ink);
  transition: transform .12s, box-shadow .12s, opacity .25s; -webkit-tap-highlight-color: transparent;
}
.sp-tile:hover { transform: translateY(-3px); }
.sp-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.sp-tile.is-used { opacity: 0; transform: scale(.5); pointer-events: none; }
.sp-tools { display: flex; justify-content: center; margin-top: 20px; }
.shake { animation: shake .45s ease; }
@media (max-width: 420px) {
  .sp-card { gap: 14px; padding: 14px; }
  .sp-tile { min-width: 50px; height: 56px; font-size: 25px; padding: 0 10px; }
  .sp-tiles { gap: 8px; }
}

/* --------------------------------------------------------------- Переведи */
.qz-q {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--paper);
  border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--shadow); padding: 20px; max-width: 560px; margin: 0 auto 14px;
}
.qz-q.is-ru { background: var(--cs); }
.qz-label { font-weight: 800; color: var(--ink-2); font-size: 15px; }
.qz-word { font-weight: 900; font-size: clamp(30px, 8vw, 48px); line-height: 1.1; overflow-wrap: anywhere; }
.qz-emo { font-size: 60px; }
.qz-timer { max-width: 560px; margin: 0 auto 16px; height: 10px; border-radius: 999px; background: rgba(30, 27, 58, .08); overflow: hidden; }
.qz-timer i { display: block; height: 100%; width: 100%; background: var(--mint); border-radius: 999px; transition: background .3s; }
.qz-timer i.low { background: var(--yellow); }
.qz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin: 0 auto; }
@media (max-width: 480px) { .qz-opts { grid-template-columns: 1fr; } }
.qz-opt {
  position: relative; min-height: 68px; padding: 12px 18px 12px 38px; background: var(--paper); border: var(--bw) solid var(--ink);
  border-radius: 20px; box-shadow: var(--shadow); font-weight: 900; font-size: 20px; line-height: 1.2; text-align: center;
  transition: transform .12s, box-shadow .12s, background .2s; color: var(--ink); overflow-wrap: anywhere;
}
.qz-opt:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.qz-opt:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.qz-opt .opt-n { top: 50%; transform: translateY(-50%); left: 14px; }

/* --------------------------------------------------------------- Алфавит */
.k0 { --kc: var(--orange); --kc-soft: var(--orange-soft); }
.k1 { --kc: var(--blue); --kc-soft: var(--blue-soft); }
.k2 { --kc: var(--mint); --kc-soft: var(--mint-soft); }
.k3 { --kc: var(--pink); --kc-soft: var(--pink-soft); }
.k4 { --kc: var(--purple); --kc-soft: var(--purple-soft); }
.k5 { --kc: var(--yellow); --kc-soft: var(--yellow-soft); }
.abc-show {
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; min-height: 180px;
  padding: 18px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.abc-empty { font-weight: 800; font-size: 20px; color: var(--ink-2); text-align: center; }
.abc-big {
  display: flex; align-items: baseline; gap: 8px; padding: 6px 22px; border-radius: 24px; background: var(--kc);
  border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-family: var(--f-head); font-weight: 800;
  font-size: clamp(60px, 16vw, 100px); line-height: 1.1; color: #fff; text-shadow: 3px 3px 0 var(--ink); animation: bounceIn .45s;
}
.abc-big span + span { font-size: .72em; }
.abc-info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.abc-name { font-weight: 800; font-size: 17px; }
.abc-ex { display: flex; align-items: center; gap: 12px; }
.abc-ex .emo { font-size: 56px; }
.abc-ex b { display: block; font-size: 30px; font-weight: 900; line-height: 1.1; }
.abc-ex mark { background: var(--yellow); border-radius: 6px; padding: 0 2px; color: inherit; }
.abc-ex small { display: block; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.abc-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.abc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; }
.abc-tile {
  position: relative; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: var(--kc-soft); border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-head); font-weight: 800; font-size: 30px; color: var(--ink); padding: 6px 0;
  transition: transform .12s, box-shadow .12s, background .2s; -webkit-tap-highlight-color: transparent;
}
.abc-tile small { font-family: var(--f-body); font-size: 17px; font-weight: 800; color: var(--ink-2); margin-top: 3px; }
.abc-tile:hover { transform: translate(-2px, -2px) rotate(-3deg); box-shadow: 5px 5px 0 var(--ink); }
.abc-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.abc-tile.is-seen::after {
  content: '✓'; position: absolute; top: 4px; right: 6px; font-size: 13px; font-family: var(--f-body); color: #0E7258; font-weight: 900;
}
.abc-tile.is-cur { background: var(--kc); color: #fff; text-shadow: 2px 2px 0 var(--ink); transform: scale(1.06) rotate(-3deg); }
.abc-tile.is-cur small { color: #fff; }
.abc-tile.is-cur::after { color: #fff; }

/* ------------------------------------------------------------ Финал игры */
.end-back { z-index: 120; }
.end { text-align: center; max-width: 480px; padding: 22px 22px 24px; }
.end-fox { width: 104px; height: 104px; margin: 0 auto 6px; }
.end h2 { font-size: clamp(22px, 5vw, 30px) !important; margin-bottom: 6px; }
.end-stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 12px; }
.es {
  font-size: clamp(40px, 11vw, 54px); line-height: 1; color: #EAE3D4; display: inline-block;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
}
.es.on { color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); animation: starPop .55s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: var(--d, 0s); }
.end-stat { font-weight: 800; color: var(--ink-2); margin-bottom: 4px; }
.end-save { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.end-save a { color: #1D4FB8; font-weight: 800; }
.end-rank {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px auto 12px; padding: 10px 16px;
  background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 18px; animation: bounceIn .6s; text-align: left;
}
.end-rank small { display: block; font-weight: 800; color: var(--ink-2); }
.end-rank b { font-family: var(--f-head); }
.end-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
@media (max-width: 480px) {
  .end { padding: 18px 16px 20px; }
  .end-btns { flex-direction: column; }
  .end-btns .btn { width: 100%; }
}
.confetti { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 130; }

/* ------------------------------------------------------------- Анимации */
@keyframes foxJump {
  0% { transform: none; } 30% { transform: translateY(-16px) rotate(-6deg) scale(1.06); }
  55% { transform: translateY(0) scale(.96, 1.04); } 75% { transform: translateY(-5px); } 100% { transform: none; }
}
@keyframes foxShake { 0%, 100% { transform: none; } 20% { transform: rotate(-11deg); } 40% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes foxCheer { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-10px) rotate(5deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes rightPop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes starPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.3) rotate(8deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes starSpin { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(-15deg) scale(1.15); } 94% { transform: rotate(10deg) scale(1.1); } }
@keyframes pulseRing {
  0% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 0 rgba(255, 122, 48, .6); }
  70% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 16px rgba(255, 122, 48, 0); }
  100% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 0 rgba(255, 122, 48, 0); }
}
@keyframes sayPop { 0% { transform: scale(1); } 40% { transform: scale(1.07) rotate(-1deg); } 100% { transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes cardInR { from { transform: translateX(8px) scale(.88) rotate(3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cardInL { from { transform: translateX(-8px) scale(.88) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .fc-inner, .mc-inner { transition: none !important; }
  .stars-ico, .choice-play-emo span, .g-start-emo, .fox.fx-cheer { animation: none !important; }
}
