@import "tailwindcss";
@import "tw-animate-css";

:root {
  color-scheme: light dark;
  --ink: #344054;
  --muted: #667085;
  --cream: #fff7e8;
  --card: #ffffff;
  --surface-soft: #f8f4ee;
  --surface-muted: #f3eee7;
  --question-bg: #f1ece4;
  --border: #ddd6cb;
  --object-circle: #ffffff;
  --orange: #f47b45;
  --orange-dark: #c64e24;
  --yellow: #ffc958;
  --green: #3f9f7e;
  --blue: #4f7fd9;
  --pink: #d96f96;
  --lavender: #8a79d4;
  --success-bg: #dff7e9;
  --success-ink: #287555;
  --wrong-bg: #ffe3e5;
  --wrong-ink: #a63d45;
  --notice-bg: #fff3cf;
  --notice-ink: #705c2b;
  --diagram-visual: #effaf6;
  --diagram-story: #fff0f5;
  --diagram-number: #eef3ff;
  --diagram-circle: #ffffff;
  --shadow: 0 8px 22px rgba(50, 57, 73, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: lining-nums tabular-nums slashed-zero;
  font-feature-settings: "zero" 1;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--cream);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
  opacity: .42;
}

body::before { width: 220px; height: 220px; background: #ffe09a; right: -80px; top: -75px; }
body::after { width: 170px; height: 170px; background: #fbd2dc; left: -80px; bottom: 8%; }

button, input { font: inherit; }
h1, h2, h3 { font-weight: 500; }
strong, b { font-weight: 600; }

button {
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
  transition: transform .12s ease, opacity .12s ease, background-color .12s ease, border-color .12s ease;
}

button:active { opacity: .72; transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  button:hover:not(:active) {
    border-color: var(--orange);
    filter: brightness(.97);
    transform: translateY(-1px);
  }
}

button:focus-visible, input:focus-visible {
  outline: 4px solid rgba(91, 141, 239, .38);
  outline-offset: 3px;
}

button.pressed { transform: scale(.96) !important; }

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

.loading-screen { align-items: center; justify-content: center; }
.loading-fox { width: 112px; height: 112px; }
.connection-status { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; color: var(--muted); font-size: .74rem; font-weight: 500; }
.connection-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.screen {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.brand-fox { display: grid; place-items: center; width: 42px; height: 42px; padding: 2px; border-radius: 14px; background: #ffe0c4; overflow: hidden; }
.fox-button { flex: 0 0 42px; padding: 0; border-color: var(--border); }
.fox-button .art-sprite { width: 38px; height: 38px; }

.parent-link, .icon-button, .read-button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--card);
  border-color: var(--border);
  box-shadow: none;
  font-weight: 600;
}

.parent-link { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.parent-link > span:first-child { display: flex; align-items: center; gap: 5px; }
.button-chevron { font-size: 1.2rem; line-height: 1; }
.icon-button { min-width: 46px; padding: 0 12px; font-size: 1.2rem; }
/* The shared Button base forces inner icons to 16px; restore the sizes these controls ask for. */
.icon-button svg { width: 24px; height: 24px; }
.read-button svg { width: 30px; height: 30px; }
.grownup-indicator { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 999px; background: var(--diagram-visual); color: var(--green); font-size: .78rem; font-weight: 600; }
.grownup-indicator > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(84,185,150,.16); }

.hero { text-align: center; padding: 20px 10px 18px; }
.hero h1 { margin: 24px 0 26px; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.02; letter-spacing: -.055em; }
.hero p { margin: 0 auto; max-width: 360px; color: var(--muted); font-size: 1.05rem; line-height: 1.45; font-weight: 650; }

.mascot-wrap { position: relative; width: 128px; margin: 0 auto; }
.mascot {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 42% 42% 48% 48%;
  padding: 3px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transform: rotate(-2deg);
}
.mascot-star { position: absolute; width: 34px; height: 34px; animation: bob 2.2s ease-in-out infinite; }
.star-left { left: -14px; top: 15px; }
.star-right { right: -12px; top: -2px; animation-delay: .7s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(12deg); } }

.section-title { margin: 20px 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); text-align: center; font-weight: 600; }

.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.profile-card {
  min-height: 142px;
  border-radius: 26px;
  padding: 18px 10px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .14s ease;
}
.profile-name { font-size: 1.42rem; font-weight: 500; letter-spacing: -.01em; }
.profile-card { border-color: var(--border); box-shadow: none; }
.profile-card:nth-child(4n+1) { border-color: #5ec2a1; }
.profile-card:nth-child(4n+2) { border-color: #f2a36f; }
.profile-card:nth-child(4n+3) { border-color: #83a8f4; }
.profile-card:nth-child(4n+4) { border-color: #d791c7; }
.profile-emoji { display: grid; place-items: center; width: 70px; height: 70px; padding: 2px; border-radius: 24px; background: var(--surface-soft); overflow: hidden; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 24px;
  box-shadow: none;
}
.panel h1, .panel h2 { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.035em; }
.panel > h1 + label { margin-top: 24px; }
.panel-copy { color: var(--muted); line-height: 1.45; margin: 0 0 20px; font-weight: 400; }
.eyebrow { margin: 0 0 8px; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; }

.math-lock { text-align: center; font-size: 2.2rem; font-weight: 500; margin: 18px 0; letter-spacing: .02em; }
.pin-display { height: 58px; border-radius: 18px; background: var(--surface-soft); display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 15px; }
.pin-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #b2adab; }
.pin-dot.filled { background: var(--ink); border-color: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { min-height: 58px; border-radius: 17px; background: var(--surface-soft); border-color: var(--border); font-size: 1.35rem; font-weight: 500; }
.key.action { color: var(--orange-dark); font-size: 1rem; }
.error-text { min-height: 24px; margin: 10px 0 0; color: #c23f42; text-align: center; font-weight: 600; }

.primary, .secondary, .danger-link {
  width: 100%; min-height: 54px; border-radius: 18px; padding: 0 20px; font-weight: 500;
}
.primary { background: var(--orange); border-color: var(--orange); color: white; box-shadow: none; }
.primary:active { opacity: .82; transform: scale(.98); }
.secondary { background: transparent; border-color: var(--border); color: var(--ink); }
.danger-link { background: transparent; color: #b34c54; min-height: 44px; font-size: .88rem; }
.button-stack { display: grid; gap: 12px; margin-top: 18px; }

label { display: block; font-weight: 600; margin-bottom: 8px; }
.name-input {
  width: 100%; height: 56px; border: 1px solid var(--border); border-radius: 17px; padding: 0 16px; color: var(--ink); background: var(--card); font-size: 1.05rem; user-select: text; -webkit-user-select: text;
}
.animal-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 11px; margin: 16px 0 20px; }
.animal-choice { width: 100%; height: auto; min-height: 0; aspect-ratio: 1; padding: 6px; border-radius: 22px; background: var(--surface-soft); border-color: var(--border); overflow: hidden; }
.animal-choice.selected { background: #ffe1c6; outline: 3px solid var(--orange); transform: rotate(-3deg); }

.parent-header { margin-bottom: 20px; }
.parent-header h1 { margin: 0 0 5px; font-size: 2rem; letter-spacing: -.045em; }
.parent-header p { margin: 0; color: var(--muted); font-weight: 650; }
.parent-profile { background: var(--card); border: 1px solid var(--border); border-radius: 23px; margin-bottom: 12px; box-shadow: none; overflow: hidden; }
.parent-profile-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.parent-profile-head::-webkit-details-marker { display: none; }
.mini-animal { display: grid; place-items: center; width: 52px; height: 52px; padding: 2px; border-radius: 17px; background: var(--surface-soft); overflow: hidden; }
.profile-meta { flex: 1; }
.profile-meta strong { display: block; font-size: 1.2rem; font-weight: 500; }
.profile-meta small { color: var(--muted); font-weight: 500; }
.expand-label { color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 500; }
.expand-label svg { width: 24px; height: 24px; transition: transform .2s ease; }
.parent-profile[open] .expand-label svg { transform: rotate(180deg); }
.profile-details { padding: 0 16px 10px; border-top: 1px solid #eee8df; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--surface-soft); border-radius: 14px; padding: 10px 5px; text-align: center; }
.stat b { display: block; font-size: 1.15rem; }
.stat span { color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.help-note { margin: 11px 0 0; padding: 10px 12px; background: var(--notice-bg); border-radius: 13px; color: var(--notice-ink); font-size: .8rem; font-weight: 500; display: flex; align-items: flex-start; gap: 7px; }
.help-note svg { flex: none; }
.add-profile-row { width: 100%; min-height: 82px; justify-content: flex-start; gap: 15px; margin-top: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 23px; background: transparent; color: var(--muted); font-size: 1rem; font-weight: 450; }
.add-profile-avatar { width: 52px; height: 52px; display: grid; place-items: center; flex: none; border: 2px dashed var(--border); border-radius: 17px; color: var(--muted); }
.add-profile-avatar svg { width: 28px; height: 28px; }

.welcome-chip { align-self: center; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px 7px 8px; box-shadow: none; font-weight: 500; }
.welcome-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-soft); overflow: hidden; }
.module-list { display: grid; gap: clamp(8px, 1.6dvh, 16px); margin-top: clamp(12px, 2.5dvh, 22px); }
.module-card { position: relative; min-height: clamp(104px, calc((100dvh - 205px) / 4), 142px); display: flex; flex-direction: column; padding: clamp(9px, 1.6dvh, 14px) 64px clamp(9px, 1.6dvh, 14px) clamp(9px, 1.6dvh, 14px); border: 2px solid var(--border); border-radius: 25px; background: var(--card); text-align: left; box-shadow: none; }
.module-card.visual { border-color: var(--green); }
.module-card.story { border-color: var(--pink); }
.module-card.number { border-color: var(--blue); }
.module-card.calculator { border-color: var(--lavender); }
.module-art { display: block; width: 100%; height: clamp(76px, calc((100dvh - 325px) / 4), 105px); }
.picture-diagram, .story-diagram, .calculator-diagram { border-radius: 22px; }
.picture-diagram { display: grid; grid-template-columns: 48px 48px 30px 48px 48px; align-items: center; justify-content: center; gap: 2px; background: var(--diagram-visual); }
.picture-diagram span { width: clamp(38px, 6dvh, 46px); height: clamp(38px, 6dvh, 46px); }
.picture-diagram b { color: var(--green); font-size: 1.7rem; font-weight: 500; text-align: center; }
.story-diagram { display: flex; align-items: center; justify-content: center; gap: 15px; background: var(--diagram-story); }
.story-diagram span { width: clamp(62px, 10dvh, 82px); height: clamp(62px, 10dvh, 82px); }
.story-diagram b { position: relative; padding: 15px 18px; border-radius: 18px; background: var(--diagram-circle); color: var(--pink); font-size: 1.35rem; font-weight: 600; }
.calculator-diagram { display: flex; align-items: center; justify-content: center; gap: 12px; background: color-mix(in srgb, var(--lavender) 13%, var(--card)); color: var(--lavender); }
.calculator-diagram span { display: grid; place-items: center; width: clamp(48px, 7dvh, 56px); height: clamp(48px, 7dvh, 56px); border-radius: 50%; background: var(--diagram-circle); font-size: 1.75rem; font-weight: 600; }
.calculator-diagram b { font-size: 1.7rem; font-weight: 500; }
.calculator-diagram svg { width: 42px; height: 42px; margin-left: 6px; }
.module-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 54px; border: 0; border-radius: 0; font-size: 3rem; font-weight: 300; line-height: 1; color: var(--muted); background: transparent; }

.calculator-screen { width: min(100%, 960px); }
.calculator-spacer { flex: 1; }
.calculator-workspace { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px 0 18px; }
.calculator-side { min-height: 360px; display: grid; place-items: center; padding: 22px; border: 2px solid var(--border); border-radius: 34px; background: color-mix(in srgb, var(--card) 76%, transparent); transition: opacity .22s ease, filter .22s ease, border-color .22s ease; }
.second-side { opacity: .28; filter: saturate(.25); }
.second-side.ready { opacity: 1; filter: none; border-color: var(--lavender); }
.number-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px 5px; max-width: 340px; }
.number-bubble { --bubble-size: 54px; width: var(--bubble-size); height: var(--bubble-size); min-width: var(--bubble-size); min-height: var(--bubble-size); padding: 0; border: 2px solid var(--border); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 1.18rem; font-weight: 550; }
.number-bubble.bubble-0 { --bubble-size: 58px; transform: translateY(4px) rotate(-3deg); }
.number-bubble.bubble-1 { --bubble-size: 50px; transform: translateY(-5px) rotate(2deg); }
.number-bubble.bubble-2 { --bubble-size: 55px; transform: translateY(2px) rotate(3deg); }
.number-bubble.bubble-3 { --bubble-size: 48px; transform: translateY(-2px) rotate(-2deg); }
.number-bubble.bubble-4 { --bubble-size: 53px; transform: translateY(5px) rotate(1deg); }
.number-bubble.selected { background: var(--orange); border-color: var(--orange-dark); color: white; transform: scale(1.08); }
.calculator-plus { color: var(--orange); font-size: 4.5rem; font-weight: 300; text-align: center; }
.calculator-result { display: flex; align-items: baseline; justify-content: center; gap: 18px; min-height: 94px; }
.calculator-result span { color: var(--muted); font-size: 1.15rem; font-weight: 500; }
.calculator-result strong { color: var(--green); font-size: 4rem; font-weight: 550; line-height: 1; }
.calculator-reset { align-self: center; width: 76px; height: 76px; min-width: 76px; min-height: 76px; padding: 0; border: 2px solid var(--lavender); border-radius: 50%; background: var(--card); color: var(--lavender); }
.calculator-reset svg { width: 38px; height: 38px; }

.game-screen { background: transparent; }
.progress-wrap { flex: 1; }
.progress-label { font-size: .75rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; text-align: center; }
.progress-track { height: 11px; background: #e8e1d8; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: inherit; transition: width .35s ease; }
.question-card { background: transparent; border: 1px solid var(--border); border-radius: 30px; padding: 25px 20px; box-shadow: none; text-align: center; margin: 15px 0; }
.visual-equation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 10px 0 11px; }
.object-group { min-height: 142px; padding: 9px; display: grid; grid-template-columns: repeat(2, 44px); place-content: center; gap: 7px; background: var(--surface-soft); border-radius: 17px; }
.count-object { width: 44px; height: 44px; display: grid; place-items: center; padding: 1px; border-radius: 50%; background: var(--object-circle); border: 1px solid var(--border); overflow: hidden; }
.operator { font-size: 1.8rem; font-weight: 500; color: var(--orange); }
.question-main { font-size: clamp(2.1rem, 11vw, 3.4rem); line-height: 1.1; font-weight: 500; margin: 20px 0; letter-spacing: -.02em; }
.story-copy { margin: 16px auto 12px; max-width: 340px; font-size: 1.17rem; line-height: 1.48; font-weight: 500; }
.story-scene { display: flex; align-items: center; justify-content: center; gap: 12px; }
.story-scene span { width: 76px; height: 76px; }
.read-button { min-width: 60px; min-height: 60px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--surface-soft); border-color: var(--border); color: var(--muted); margin-top: 8px; }
.answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 38px; }
.answer-option { position: relative; }
.answer { width: 100%; height: auto; min-height: 84px; aspect-ratio: 1; border-radius: 23px; background: var(--card); border-color: var(--border); box-shadow: none; display: grid; place-items: center; font-size: 2.15rem; font-weight: 600; line-height: 1; }
.answer.correct { background: var(--card); color: var(--success-ink); border: 3px solid var(--green); box-shadow: none; }
.answer.wrong { background: var(--card); color: var(--wrong-ink); border: 3px solid var(--wrong-ink); animation: wiggle .3s linear; }
/* Keep the green/red grading visible while the pointer still rests on the tapped answer. */
.answer.correct:hover, .answer.correct:active { border-color: var(--green); }
.answer.wrong:hover, .answer.wrong:active { border-color: var(--wrong-ink); }
.answer-result { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); opacity: 0; font-size: 1.7rem; font-weight: 600; line-height: 1; }
.answer-result.visible { opacity: 1; }
.answer-result.correct-mark { color: var(--green); }
.answer-result.wrong-mark { color: var(--wrong-ink); }
@keyframes wiggle { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.interlude { justify-content: center; text-align: center; }
.interlude-grownup { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 18px; }
.speech-bubble { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 28px; padding: 24px; margin: 0 0 28px; box-shadow: none; font-size: 1.35rem; line-height: 1.35; font-weight: 500; }
.speech-bubble::after { content: ""; position: absolute; bottom: -18px; left: calc(50% - 18px); border: 18px solid transparent; border-top-color: white; border-bottom: 0; }
.interlude .mascot { width: 150px; height: 150px; font-size: 6rem; }
.interlude h1 { margin: 30px 0 8px; font-size: 2.2rem; }
.stars-earned { display: flex; justify-content: center; gap: 5px; margin: 4px 0 24px; }
.stars-earned span { width: 42px; height: 42px; }
.interlude-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.interlude-action { min-height: 66px; display: grid; place-items: center; border: 2px solid var(--border); border-radius: 18px; background: var(--card); color: var(--ink); }
.interlude-action svg { width: 34px; height: 34px; }
.interlude-action:active { border-color: var(--orange); color: var(--orange); transform: scale(.98); }

#celebration { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.confetti { position: absolute; top: -30px; font-size: 1.4rem; animation: fall 1.1s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(420deg); opacity: .3; } }

.empty-state { padding: 28px 16px; text-align: center; border: 2px dashed var(--border); border-radius: 25px; color: var(--muted); font-weight: 500; }
.spacer { flex: 1; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6e8ec;
    --muted: #a7adb8;
    --cream: #17191d;
    --card: #22252a;
    --surface-soft: #2b2f35;
    --surface-muted: #30343a;
    --question-bg: #1d2024;
    --border: #41464f;
    --object-circle: #363a41;
    --orange: #ee8757;
    --orange-dark: #ff9b6d;
    --yellow: #e7b956;
    --green: #69c5a3;
    --blue: #7fa7f3;
    --pink: #ec91b1;
    --success-bg: #203d33;
    --success-ink: #98dfc2;
    --wrong-bg: #482b30;
    --wrong-ink: #ffb0b8;
    --notice-bg: #413921;
    --notice-ink: #f0d98e;
    --diagram-visual: #20342e;
    --diagram-story: #3a2730;
    --diagram-number: #252e43;
    --diagram-circle: #30343a;
  }

  body::before { background: #513c21; opacity: .28; }
  body::after { background: #462a35; opacity: .28; }
  .brand-fox { background: #4a3428; }
  .animal-choice.selected { background: #4b3428; }
  .profile-details { border-top-color: var(--border); }
  .progress-track { background: #363a41; }
  .read-button { background: var(--surface-soft); color: var(--muted); }
  .speech-bubble::after { border-top-color: var(--card); }
  .empty-state { border-color: var(--border); }
}

@media (min-width: 700px) {
  .screen { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 699px) {
  .calculator-workspace { grid-template-columns: 1fr; gap: 8px; align-content: start; padding-top: 4px; }
  .calculator-side { min-height: 0; padding: 15px 10px; border-radius: 26px; }
  .number-cloud { max-width: 330px; gap: 5px 3px; }
  .number-bubble { --bubble-size: 49px; }
  .number-bubble.bubble-0 { --bubble-size: 53px; }
  .number-bubble.bubble-1 { --bubble-size: 46px; }
  .number-bubble.bubble-2 { --bubble-size: 50px; }
  .number-bubble.bubble-3 { --bubble-size: 45px; }
  .number-bubble.bubble-4 { --bubble-size: 48px; }
  .calc-extra { display: none; }
  .calculator-plus { font-size: 3.2rem; line-height: .9; }
  .calculator-result { min-height: 76px; }
  .calculator-result strong { font-size: 3.25rem; }
  .calculator-reset { width: 68px; height: 68px; min-width: 68px; min-height: 68px; }
}

@media (pointer: coarse) {
  button { min-width: 48px; min-height: 48px; }
  input { min-height: 48px; }
  .parent-profile-head { min-height: 56px; }
  .read-button { min-width: 64px; min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
