.uasm-math-app {
  --blue: #246bce;
  --sky: #dff4ff;
  --navy: #17345f;
  --yellow: #ffd34e;
  --green: #38ad72;
  --coral: #ff7668;
  --purple: #7557c8;
  --paper: #fffefb;
  --muted: #64748b;
  color: var(--navy);
  font-family: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  margin: 20px auto;
  max-width: 920px;
  -webkit-tap-highlight-color: transparent;
}

.uasm-math-app *, .uasm-math-app *::before, .uasm-math-app *::after { box-sizing: border-box; }
.uasm-math-app button, .uasm-math-app a { font: inherit; }
.uasm-math-app button { touch-action: manipulation; }

.uasm-math-shell {
  background: linear-gradient(180deg, #dff4ff 0%, #f6fbff 44%, #fff8e9 100%);
  border: 1px solid #c9e9f7;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(38, 91, 132, .16);
  min-height: 650px;
  overflow: hidden;
  position: relative;
}

.uasm-math-header {
  align-items: center;
  background: rgba(255, 255, 255, .87);
  border-bottom: 1px solid rgba(73, 139, 177, .16);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 12px 22px;
  position: relative;
  z-index: 4;
}

.uasm-math-brand { align-items: center; display: flex; gap: 11px; min-width: 0; }
.uasm-math-brand-mark {
  align-items: center;
  background: linear-gradient(145deg, var(--yellow), #ffad37);
  border: 3px solid #fff;
  border-radius: 18px;
  box-shadow: 0 4px 0 #e99b26;
  color: #713b10;
  display: flex;
  font-size: 17px;
  font-weight: 600;
  height: 52px;
  justify-content: center;
  letter-spacing: -1px;
  transform: rotate(-3deg);
  width: 58px;
}
.uasm-math-brand strong, .uasm-math-brand small { display: block; }
.uasm-math-brand strong { font-size: 19px; font-weight: 600; line-height: 1.15; }
.uasm-math-brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }

.uasm-math-langs { background: #e9f1fa; border-radius: 999px; display: flex; gap: 3px; padding: 4px; }
.uasm-math-langs a {
  border-radius: 999px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  min-width: 42px;
  padding: 8px 9px;
  text-align: center;
  text-decoration: none;
}
.uasm-math-langs a.is-active { background: var(--blue); box-shadow: 0 3px 7px rgba(36, 107, 206, .25); color: #fff; }

.uasm-math-content { min-height: 570px; padding: 36px 22px 44px; position: relative; z-index: 2; }
.uasm-math-content > h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 600; margin: 0 0 28px; position: relative; text-align: center; z-index: 2; }
.uasm-center { align-items: center; display: flex; flex-direction: column; justify-content: center; }

.uasm-cloud { background: rgba(255,255,255,.72); border-radius: 999px; height: 38px; position: absolute; width: 112px; }
.uasm-cloud::before, .uasm-cloud::after { background: inherit; border-radius: 50%; content: ""; position: absolute; }
.uasm-cloud::before { height: 54px; left: 18px; top: -24px; width: 54px; }
.uasm-cloud::after { height: 42px; right: 13px; top: -16px; width: 42px; }
.uasm-cloud-one { left: 7%; top: 85px; }
.uasm-cloud-two { right: 7%; top: 145px; transform: scale(.72); }

.uasm-achievement-summary {
  align-items: center;
  background: linear-gradient(135deg, #fff6cf, #fff);
  border: 2px solid #ffe080;
  border-radius: 20px;
  box-shadow: 0 6px 0 #e9c85f;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 50px 1fr 18px;
  margin: 0 auto 25px;
  max-width: 900px;
  min-height: 72px;
  padding: 9px 15px;
  position: relative;
  text-align: left;
  width: 100%;
  z-index: 3;
}
.uasm-achievement-summary__icon { align-items: center; background: #fff; border-radius: 14px; display: flex; font-size: 26px; height: 50px; justify-content: center; width: 50px; }
.uasm-achievement-summary strong, .uasm-achievement-summary small { display: block; }
.uasm-achievement-summary strong { font-size: 17px; font-weight: 600; }
.uasm-achievement-summary small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.uasm-achievement-summary__arrow { color: #ad7b05; font-size: 28px; }

.uasm-course-list { display: grid; gap: 30px; margin: 0 auto; max-width: 900px; position: relative; z-index: 3; }
.uasm-course { background: rgba(255,255,255,.42); border: 1px solid rgba(86,147,181,.14); border-radius: 25px; padding: 16px; }
.uasm-course-header { align-items: center; display: grid; gap: 12px; grid-template-columns: 48px 1fr auto; margin: 0 2px 15px; }
.uasm-course-header > span { align-items: center; background: #fff; border-radius: 15px; display: flex; font-size: 24px; height: 48px; justify-content: center; width: 48px; }
.uasm-course-header h2 { font-size: 23px; font-weight: 600; line-height: 1.1; margin: 0; }
.uasm-course-header p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.uasm-course-header em { background: #fff; border-radius: 999px; color: var(--blue); font-size: 12px; font-style: normal; font-weight: 600; padding: 6px 10px; }
.uasm-course-addition { background: rgba(245,239,255,.62); }
.uasm-course-subtraction { background: rgba(255,243,230,.62); }
.uasm-course-addition .uasm-level-number { background: linear-gradient(145deg, #9a7be5, var(--purple)); }
.uasm-course-subtraction .uasm-level-number { background: linear-gradient(145deg, #ff9e78, var(--coral)); }

.uasm-level-list { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 auto; max-width: 900px; position: relative; z-index: 3; }
.uasm-level-card {
  align-items: center;
  background: rgba(255,255,255,.94);
  border: 2px solid #fff;
  border-radius: 22px;
  box-shadow: 0 7px 0 #cae0ec, 0 10px 20px rgba(50, 96, 129, .08);
  color: var(--navy);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px 1fr 24px;
  min-height: 92px;
  padding: 13px 17px;
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease;
  width: 100%;
}
.uasm-level-card:not(:disabled):hover { box-shadow: 0 9px 0 #b9d9e8, 0 13px 24px rgba(50, 96, 129, .12); transform: translateY(-2px); }
.uasm-level-card:not(:disabled):active { box-shadow: 0 3px 0 #b9d9e8; transform: translateY(4px); }
.uasm-level-number {
  align-items: center;
  background: linear-gradient(145deg, #5ec4f0, var(--blue));
  border-radius: 17px;
  color: #fff;
  display: flex;
  font-size: 25px;
  font-weight: 600;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.uasm-level-copy strong, .uasm-level-copy small, .uasm-level-copy em { display: block; }
.uasm-level-copy strong { font-size: 20px; font-weight: 600; }
.uasm-level-copy small { color: var(--muted); font-size: 14px; margin-top: 2px; }
.uasm-level-copy em { color: var(--blue); font-size: 12px; font-style: normal; font-weight: 600; margin-top: 4px; text-transform: uppercase; }
.uasm-level-arrow { color: var(--blue); font-size: 36px; font-weight: 600; }
.uasm-level-card.is-complete .uasm-level-number { background: linear-gradient(145deg, #65d996, var(--green)); }
.uasm-level-card.is-complete .uasm-level-copy em { color: var(--green); }
.uasm-level-card.is-locked { box-shadow: 0 5px 0 #d9e1e7; cursor: not-allowed; filter: grayscale(.55); opacity: .65; }
.uasm-level-card.is-locked .uasm-level-number { background: #a8b7c3; font-size: 20px; }

.uasm-game-screen { min-height: 570px; padding: 18px 22px 30px; }
.uasm-game-top { align-items: center; display: grid; grid-template-columns: minmax(100px, auto) 1fr 52px; margin: 0 auto 10px; max-width: 720px; text-align: center; }
.uasm-game-top strong, .uasm-game-top span { display: block; }
.uasm-game-top strong { font-size: 18px; font-weight: 600; }
.uasm-game-top span { color: var(--muted); font-size: 13px; font-weight: 600; }
.uasm-game-top em { background: #fff5c6; border-radius: 999px; color: #74520b; display: inline-block; font-size: 10px; font-style: normal; margin-top: 3px; padding: 2px 7px; }
.uasm-back, .uasm-sound {
  align-items: center;
  background: #fff;
  border: 2px solid #d9edf7;
  border-radius: 16px;
  box-shadow: 0 4px 0 #c5dfec;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  font-size: 25px;
  height: 48px;
  justify-content: center;
  width: 48px;
}
.uasm-back { gap: 6px; min-width: 100px; padding: 0 13px; width: auto; }
.uasm-back span { color: inherit; display: inline; font-size: 21px; line-height: 1; }
.uasm-back b { font-size: 15px; font-weight: 600; line-height: 1; }
.uasm-sound { font-size: 20px; }
.uasm-progress { background: rgba(255,255,255,.9); border-radius: 99px; height: 11px; margin: 0 auto 18px; max-width: 720px; overflow: hidden; }
.uasm-progress span { background: linear-gradient(90deg, var(--yellow), #ffad37); border-radius: inherit; display: block; height: 100%; transition: width .3s ease; }

.uasm-question { align-items: center; display: flex; flex-direction: column; margin: 0 auto; max-width: 760px; text-align: center; }
.uasm-question h1 { font-size: clamp(27px, 5vw, 41px); font-weight: 600; line-height: 1.15; margin: 4px 0 16px; }
.uasm-animals {
  align-content: center;
  align-items: center;
  background: rgba(255,255,255,.88);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: inset 0 -7px 0 #e5f4fa, 0 8px 22px rgba(58, 105, 137, .11);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(5px, 1.6vw, 14px);
  justify-content: center;
  min-height: 270px;
  padding: 20px;
  width: 100%;
}
.uasm-animals img { filter: drop-shadow(0 6px 4px rgba(43,70,90,.14)); flex: 0 1 92px; height: auto; max-height: 108px; max-width: 92px; object-fit: contain; pointer-events: none; transform-origin: 50% 100%; user-select: none; width: 100%; }
.uasm-animals.count-1 img { flex-basis: 150px; max-height: 150px; max-width: 150px; }
.uasm-animals.count-2 img { flex-basis: 130px; max-width: 130px; }
.uasm-animals.count-3 img { flex-basis: 120px; max-width: 120px; }
.uasm-animals img.is-counted { animation: uasm-count .48s ease both; filter: drop-shadow(0 0 9px rgba(255,183,31,.72)); }
.uasm-animals.layout-scattered img:nth-child(3n+1) { transform: translateY(-8px) rotate(-5deg); }
.uasm-animals.layout-scattered img:nth-child(3n+2) { transform: translateY(9px) rotate(5deg); }
.uasm-animals.layout-scattered img:nth-child(3n) { transform: translateY(-2px) rotate(3deg); }
.uasm-animals.layout-groups { column-gap: clamp(14px, 3vw, 34px); }

.uasm-operation-board {
  align-items: center;
  background: rgba(255,255,255,.9);
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: inset 0 -7px 0 #e5f4fa, 0 8px 22px rgba(58, 105, 137, .11);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 270px;
  padding: 18px;
  width: 100%;
}
.uasm-operation-animals { align-items: center; display: flex; justify-content: center; min-height: 150px; width: 100%; }
.uasm-operation-group { align-items: center; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-width: 42%; }
.uasm-operation-group.is-subtraction { max-width: 88%; }
.uasm-operation-group img { filter: drop-shadow(0 6px 4px rgba(43,70,90,.14)); height: 84px; object-fit: contain; transition: opacity .35s ease, transform .35s ease; width: 76px; }
.uasm-operation-group img.is-leaving { filter: grayscale(.55); opacity: .22; transform: translate(20px,-14px) rotate(8deg) scale(.78); }
.uasm-operation-group img.is-counted { animation: uasm-count .48s ease both; filter: drop-shadow(0 0 9px rgba(255,183,31,.72)); }
.uasm-operation-symbol { align-items: center; background: #fff3b8; border-radius: 50%; color: #825d00; display: flex; flex: 0 0 50px; font-size: 35px; font-weight: 600; height: 50px; justify-content: center; margin: 0 13px; width: 50px; }
.uasm-operation-away { background: #ffe2d5; border-radius: 999px; color: #a53f2c; font-size: 22px; font-weight: 600; margin-left: 15px; padding: 7px 13px; }
.uasm-equation { align-items: center; background: #eef7ff; border-radius: 18px; display: flex; gap: 11px; justify-content: center; margin-top: 12px; min-width: 270px; padding: 9px 18px; }
.uasm-equation span, .uasm-equation b, .uasm-equation strong { font-size: 35px; font-weight: 600; line-height: 1; }
.uasm-equation b { color: var(--purple); }
.uasm-equation strong { align-items: center; background: #fff; border-radius: 12px; color: var(--blue); display: flex; height: 48px; justify-content: center; min-width: 48px; }

.uasm-tutorial-screen { min-height: 570px; padding: 18px 22px 30px; }
.uasm-tutorial-card { align-items: center; display: flex; flex-direction: column; margin: 0 auto; max-width: 760px; text-align: center; }
.uasm-tutorial-label { align-items: center; background: #fff; border-radius: 16px; box-shadow: 0 5px 0 #cfe3ed; display: flex; font-size: 26px; height: 52px; justify-content: center; margin-bottom: 9px; width: 52px; }
.uasm-tutorial-card h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 600; line-height: 1.12; margin: 3px 0 7px; }
.uasm-tutorial-card > p { color: #4e6480; font-size: 18px; margin: 0 0 14px; max-width: 650px; }
.uasm-tutorial-next { background: linear-gradient(145deg, #65d996, var(--green)); border: 0; border-radius: 19px; box-shadow: 0 7px 0 #248d5a; color: #fff; cursor: pointer; font-size: 19px; font-weight: 600; margin-top: 18px; min-height: 58px; padding: 12px 28px; }
.uasm-tutorial-next:active { box-shadow: 0 3px 0 #248d5a; transform: translateY(4px); }

.uasm-answers { display: grid; gap: 13px; grid-template-columns: repeat(3, 1fr); margin: 20px 0 0; max-width: 520px; width: 100%; }
.uasm-math-app .uasm-answer {
  background: #fff;
  border: 3px solid #cfe7f4;
  border-radius: 21px;
  box-shadow: 0 7px 0 #b8d9e9;
  color: var(--navy);
  cursor: pointer;
  font-size: clamp(44px, 8vw, 62px) !important;
  font-weight: 600;
  min-height: 82px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.uasm-answer:not(:disabled):active { box-shadow: 0 2px 0 #b8d9e9; transform: translateY(5px); }
.uasm-answer.is-selected { border-color: var(--blue); }
.uasm-answer.is-correct { animation: uasm-pop .45s ease; background: #dff8e9; border-color: var(--green); box-shadow: 0 7px 0 #26925b; color: #176c44; }
.uasm-answer.is-wrong { background: #fff0ed; border-color: var(--coral); box-shadow: 0 7px 0 #dc574b; }
.uasm-answer.is-correct-answer { border-color: var(--green); outline: 4px solid rgba(56,173,114,.18); }

.uasm-feedback { min-height: 95px; padding: 18px 0 0; width: 100%; }
.uasm-feedback strong { display: block; font-size: 22px; font-weight: 600; }
.uasm-feedback .is-good { color: #16784a; }
.uasm-feedback .is-try { color: #ad4c36; }
.uasm-feedback p { color: var(--navy); margin: 4px 0 13px; }
.uasm-next, .uasm-primary-result, .uasm-secondary-result {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
  min-height: 58px;
  padding: 13px 30px;
}
.uasm-next, .uasm-primary-result { background: var(--blue); box-shadow: 0 6px 0 #174d9c; color: #fff; }
.uasm-secondary-result { background: #fff; border: 2px solid #cadfea; color: var(--navy); }

.uasm-result { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 570px; padding: 38px 22px 54px; position: relative; text-align: center; z-index: 2; }
.uasm-result-icon { animation: uasm-pop .55s ease; font-size: 80px; line-height: 1; }
.uasm-result h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 600; margin: 20px 0 8px; }
.uasm-result > p { color: var(--muted); font-size: 18px; margin: 0 auto 22px; max-width: 590px; }
.uasm-score-ring { align-items: center; background: #fff; border: 10px solid var(--yellow); border-radius: 50%; box-shadow: 0 10px 24px rgba(52,87,119,.14); display: flex; flex-direction: column; height: 142px; justify-content: center; margin: 5px 0 25px; width: 142px; }
.uasm-score-ring strong { font-size: 31px; font-weight: 600; line-height: 1; }
.uasm-score-ring span { color: var(--muted); font-size: 15px; font-weight: 600; margin-top: 5px; }
.uasm-result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.uasm-error { color: #a33e35 !important; font-weight: 600; }
.uasm-new-titles { background: #fff8d9; border: 2px solid #f2d36f; border-radius: 19px; margin: 0 0 24px; max-width: 620px; padding: 14px; width: 100%; }
.uasm-new-titles > strong { color: #815b09; display: block; font-size: 14px; font-weight: 600; margin-bottom: 9px; text-transform: uppercase; }
.uasm-new-titles > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.uasm-title-speak { align-items: center; background: #fff; border: 0; border-radius: 999px; color: var(--navy); cursor: pointer; display: inline-flex; font-size: 13px; gap: 6px; padding: 7px 11px; }
.uasm-title-speak i { font-size: 15px; font-style: normal; margin-left: 2px; }
.uasm-title-speak:focus-visible, .uasm-title-listen:focus-visible { outline: 3px solid rgba(36, 107, 206, .28); outline-offset: 2px; }
.uasm-new-titles b { font-size: 17px; font-weight: 400; }

.uasm-achievement-modal { align-items: center; background: rgba(13, 37, 64, .72); display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 999999; }
.uasm-achievement-dialog { background: #f5fbff; border: 3px solid #fff; border-radius: 25px; box-shadow: 0 25px 70px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: min(820px, 92vh); max-width: 980px; overflow: hidden; width: 100%; }
.uasm-achievement-dialog > header { align-items: center; background: #fff; border-bottom: 1px solid #d9edf7; display: flex; justify-content: space-between; padding: 18px 22px; }
.uasm-achievement-dialog h2 { color: var(--navy); font-size: 27px; font-weight: 600; margin: 0; }
.uasm-achievement-dialog header p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.uasm-achievement-close { align-items: center; background: #eaf3f8; border: 0; border-radius: 13px; color: var(--navy); cursor: pointer; display: flex; font-size: 28px; height: 46px; justify-content: center; width: 46px; }
.uasm-title-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-y: auto; padding: 18px; }
.uasm-title-card-row { min-width: 0; position: relative; }
.uasm-title-card { align-items: center; background: #fff; border: 2px solid #dcebf3; border-radius: 17px; color: var(--navy); display: grid; gap: 10px; grid-template-columns: 44px 1fr; min-height: 92px; padding: 11px; position: relative; text-align: left; width: 100%; }
.uasm-title-card.is-unlocked { cursor: pointer; padding-right: 56px; }
.uasm-title-card.is-unlocked:hover { border-color: var(--blue); }
.uasm-title-card.is-active { background: #fff9dc; border-color: #e4bd38; }
.uasm-title-card.is-locked { filter: grayscale(.7); opacity: .58; }
.uasm-title-card__icon { align-items: center; background: #eef7fb; border-radius: 12px; display: flex; font-size: 23px; height: 44px; justify-content: center; width: 44px; }
.uasm-title-card__copy strong, .uasm-title-card__copy small { display: block; }
.uasm-title-card__copy strong { font-size: 14px; font-weight: 600; }
.uasm-title-card__copy small { color: var(--muted); font-size: 11px; line-height: 1.3; margin-top: 3px; }
.uasm-title-card em { background: #e4bd38; border-radius: 999px; bottom: 5px; color: #604500; font-size: 9px; font-style: normal; padding: 2px 6px; position: absolute; right: 6px; }
.uasm-title-listen { align-items: center; background: #eaf4fb; border: 0; border-radius: 12px; cursor: pointer; display: flex; font-size: 18px; height: 38px; justify-content: center; position: absolute; right: 10px; top: 10px; width: 38px; }

.uasm-math-loading { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 500px; }
.uasm-math-loader { animation: uasm-spin .9s linear infinite; border: 6px solid #d8edf7; border-radius: 50%; border-top-color: var(--blue); display: block; height: 54px; width: 54px; }
.uasm-confetti { animation: uasm-fall 2.5s ease-in forwards; height: 13px; position: absolute; top: -20px; transform: rotate(20deg); width: 9px; z-index: 6; }

@keyframes uasm-spin { to { transform: rotate(360deg); } }
@keyframes uasm-pop { 0% { transform: scale(.68); } 58% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes uasm-count { 45% { transform: translateY(-14px) scale(1.1); } }
@keyframes uasm-fall { to { top: 105%; transform: rotate(620deg); } }

@media (max-width: 640px) {
  .uasm-math-app { margin: 0; width: 100%; }
  .uasm-math-shell { border-left: 0; border-radius: 0; border-right: 0; min-height: min(760px, 100svh); }
  .uasm-math-header { min-height: 66px; padding: 8px 13px; }
  .uasm-math-brand-mark { border-radius: 14px; font-size: 14px; height: 44px; width: 48px; }
  .uasm-math-brand strong { font-size: 16px; }
  .uasm-math-brand small { display: none; }
  .uasm-math-langs a { min-width: 38px; padding: 7px 8px; }
  .uasm-math-content { min-height: calc(100svh - 66px); padding: 27px 13px 34px; }
  .uasm-level-list { gap: 11px; }
  .uasm-level-list { grid-template-columns: 1fr; }
  .uasm-course-list { gap: 20px; }
  .uasm-course { border-radius: 21px; padding: 10px; }
  .uasm-course-header { grid-template-columns: 42px 1fr auto; margin: 2px 3px 12px; }
  .uasm-course-header > span { border-radius: 13px; font-size: 21px; height: 42px; width: 42px; }
  .uasm-course-header h2 { font-size: 19px; }
  .uasm-course-header p { font-size: 11px; }
  .uasm-level-card { border-radius: 19px; gap: 11px; grid-template-columns: 52px 1fr 19px; min-height: 82px; padding: 11px 12px; }
  .uasm-level-number { border-radius: 15px; font-size: 22px; height: 52px; width: 52px; }
  .uasm-level-copy strong { font-size: 17px; }
  .uasm-level-copy small { font-size: 12px; }
  .uasm-level-copy em { font-size: 10px; }
  .uasm-game-screen { min-height: calc(100svh - 66px); padding: 12px 10px 24px; }
  .uasm-game-top { grid-template-columns: minmax(82px, auto) 1fr 46px; }
  .uasm-back, .uasm-sound { border-radius: 14px; height: 44px; }
  .uasm-back { min-width: 82px; padding: 0 8px; width: auto; }
  .uasm-back b { font-size: 13px; }
  .uasm-sound { width: 44px; }
  .uasm-question h1 { font-size: clamp(25px, 8vw, 34px); margin-bottom: 12px; }
  .uasm-animals { border-radius: 23px; gap: 5px; min-height: 235px; padding: 14px 9px; }
  .uasm-animals img { flex-basis: calc((100% - 20px) / 5); max-height: 91px; max-width: calc((100% - 20px) / 5); }
  .uasm-animals.count-1 img { flex-basis: 145px; max-height: 138px; max-width: 145px; }
  .uasm-animals.count-2 img { flex-basis: 120px; max-width: 120px; }
  .uasm-animals.count-3 img { flex-basis: calc((100% - 10px) / 3); max-width: 120px; }
  .uasm-operation-board { border-radius: 23px; min-height: 235px; padding: 12px 7px; }
  .uasm-operation-animals { min-height: 128px; }
  .uasm-operation-group { gap: 2px; max-width: 43%; }
  .uasm-operation-group.is-subtraction { max-width: 90%; }
  .uasm-operation-group img { height: 67px; width: 58px; }
  .uasm-operation-symbol { flex-basis: 42px; font-size: 29px; height: 42px; margin: 0 6px; width: 42px; }
  .uasm-operation-away { font-size: 18px; margin-left: 7px; padding: 6px 9px; }
  .uasm-equation { gap: 8px; min-width: 245px; padding: 8px 12px; }
  .uasm-equation span, .uasm-equation b, .uasm-equation strong { font-size: 29px; }
  .uasm-equation strong { height: 42px; min-width: 42px; }
  .uasm-tutorial-screen { min-height: calc(100svh - 66px); padding: 12px 10px 24px; }
  .uasm-tutorial-card > p { font-size: 16px; }
  .uasm-tutorial-next { min-height: 56px; width: min(100%, 310px); }
  .uasm-answers { gap: 9px; margin-top: 15px; }
  .uasm-math-app .uasm-answer { border-radius: 18px; min-height: 82px; }
  .uasm-feedback { padding-top: 14px; }
  .uasm-result { min-height: calc(100svh - 66px); }
  .uasm-title-grid { grid-template-columns: 1fr; padding: 12px; }
  .uasm-achievement-modal { padding: 8px; }
  .uasm-achievement-dialog { border-radius: 19px; max-height: 96vh; }
  .uasm-achievement-dialog > header { padding: 13px 15px; }
  .uasm-achievement-dialog h2 { font-size: 22px; }
}

@media (max-width: 370px) {
  .uasm-math-brand strong { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .uasm-animals { min-height: 205px; }
  .uasm-animals img { max-height: 76px; }
  .uasm-math-app .uasm-answer { font-size: 42px !important; min-height: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .uasm-math-app *, .uasm-math-app *::before, .uasm-math-app *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
