/* Mia's English — giao diện tối ưu cho iPad (1180×820 ngang / 820×1180 dọc) */
:root {
  --bg: #FFF8EC; --ink: #3B2C4A; --muted: #8C7D9C; --line: #F0E7F6;
  --pink: #FF7EB6; --purple: #9B7BFF; --blue: #4FC3F7; --green: #4CC9A4; --yellow: #FFD54F; --orange: #FFB547;
  --shadow: 0 6px 0 rgba(59,44,74,.10), 0 12px 26px rgba(59,44,74,.08);
  --shadow-press: 0 2px 0 rgba(59,44,74,.10), 0 4px 10px rgba(59,44,74,.06);
  --r: 28px;
  --vh: 100vh;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 8% 12%, #FFE3F1 0 120px, transparent 121px),
    radial-gradient(circle at 92% 30%, #E4F6FF 0 160px, transparent 161px),
    radial-gradient(circle at 70% 96%, #EAF9E4 0 180px, transparent 181px);
  background-attachment: fixed;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation; overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; padding: 0; }
input, select { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
h1, h2, h3, p { margin: 0; }

/* ---------- press feedback ---------- */
.press { transition: transform .08s ease, box-shadow .08s ease; }
.press:active { transform: translateY(4px) scale(.98); box-shadow: var(--shadow-press); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: calc(env(safe-area-inset-top) + 14px) 24px 12px;
  background: rgba(255,248,236,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 28px; line-height: 1.05; }
.brand small, .ttl small { display: block; font-size: 15px; font-weight: 700; color: var(--muted); }
.logo { width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: var(--shadow); }
.ttl { font-size: 28px; font-weight: 900; line-height: 1.1; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px;
  padding: 12px 20px; font-weight: 900; font-size: 22px; box-shadow: var(--shadow); white-space: nowrap; }
.pill.on { background: var(--purple); color: #fff; }
.iconbtn { width: 62px; height: 62px; border-radius: 22px; background: #fff; box-shadow: var(--shadow);
  font-size: 30px; display: grid; place-items: center; flex: none; }

main { padding: 8px 24px calc(env(safe-area-inset-bottom) + 40px); max-width: 1240px; margin: 0 auto; }
.screen { min-height: var(--vh); display: flex; flex-direction: column; }

/* ---------- home ---------- */
.hero { display: flex; align-items: center; gap: 22px; padding: 22px 26px; margin: 6px 0 8px;
  border-radius: 40px; background: linear-gradient(135deg, #FFE1F0, #E6DEFF); box-shadow: var(--shadow); }
.hero-avatar { font-size: 92px; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
.hero h1 { font-size: 42px; font-weight: 900; }
.hero p { font-size: 20px; color: #6E5E80; font-weight: 700; margin-top: 4px; }
.today { margin-left: auto; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border-radius: 30px; padding: 14px 22px 14px 16px; box-shadow: var(--shadow); }
.today .ti { font-size: 60px; width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 28%, white); }
.today small { display: block; font-size: 15px; font-weight: 800; color: #E0569A; }
.today b { display: block; font-size: 28px; font-weight: 900; }
.today em { font-style: normal; color: var(--muted); font-weight: 700; }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 26px 4px 14px; font-size: 26px; font-weight: 900; }
.section-title small { font-size: 17px; font-weight: 700; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 18px; }
.tile { position: relative; overflow: hidden; background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px 10px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 60%;
  background: color-mix(in srgb, var(--c) 26%, white); border-radius: 0 0 50% 50% / 0 0 26px 26px; }
.tile > * { position: relative; }
.tile .ti { font-size: 66px; line-height: 1.1; }
.tile .en { font-size: 25px; font-weight: 900; margin-top: 4px; }
.tile .vi { font-size: 16px; font-weight: 700; color: var(--muted); }
.bar { width: 78%; height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 10px; background: var(--c); }
.tile .done { position: absolute; top: 10px; right: 12px; font-size: 22px; }

/* ---------- topic page ---------- */
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
@media (max-width: 900px) { .acts { grid-template-columns: repeat(2, 1fr); } }
.act { background: var(--c); color: #fff; border-radius: 34px; padding: 24px 12px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, black), 0 14px 24px rgba(0,0,0,.08); }
.act:active { transform: translateY(6px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 70%, black); }
.act .ai { font-size: 76px; line-height: 1.1; filter: drop-shadow(0 4px 0 rgba(0,0,0,.12)); }
.act b { font-size: 30px; font-weight: 900; }
.act span { font-size: 18px; font-weight: 700; opacity: .95; }

.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.wcard { --ps: 54px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 140px; justify-content: center; }
.wcard b { font-size: 20px; font-weight: 900; }
.wcard small { font-size: 14px; color: var(--muted); font-weight: 700; }
.wcard.seen { outline: 3px solid #DFF5E8; }

/* ---------- pictures ---------- */
.emoji { font-size: var(--ps, 64px); line-height: 1.05; display: inline-block; }
.swatch { display: inline-block; width: calc(var(--ps, 64px) * 1.15); height: calc(var(--ps, 64px) * 1.15); border-radius: 50%;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), 0 0 0 4px #fff, 0 0 0 6px #EEE6F3; }
.shape { width: calc(var(--ps, 64px) * 1.3); height: calc(var(--ps, 64px) * 1.3); filter: drop-shadow(0 5px 0 rgba(0,0,0,.12)); }
.numpic { display: flex; flex-direction: column; align-items: center; }
.numpic b { font-size: calc(var(--ps, 64px) * .95); line-height: 1; font-weight: 900; color: #5B7CFA; }
.numpic i { font-style: normal; font-size: calc(var(--ps, 64px) * .24); max-width: calc(var(--ps, 64px) * 1.9);
  display: flex; flex-wrap: wrap; justify-content: center; line-height: 1.15; }
.letterpic { display: flex; align-items: center; gap: calc(var(--ps, 64px) * .12); }
.letterpic b { font-size: calc(var(--ps, 64px) * .95); line-height: 1; font-weight: 900; color: #E0569A; }
.letterpic b small { font-size: .7em; color: #9B7BFF; margin-left: .04em; }
.letterpic i { font-style: normal; font-size: calc(var(--ps, 64px) * .6); }

/* ---------- flashcards ---------- */
.stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 20px; min-height: 0; }
.flash { --ps: min(24vh, 190px); position: relative; width: min(600px, 66vw); height: min(calc(var(--vh) - 290px), 560px);
  background: #fff; border-radius: 48px; box-shadow: 0 10px 0 rgba(59,44,74,.10), 0 20px 40px rgba(59,44,74,.10);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; }
@media (orientation: portrait) { .flash { width: min(640px, 76vw); height: min(calc(var(--vh) - 330px), 720px); --ps: min(20vh, 210px); } }
.flash .word { font-size: clamp(44px, 7.5vh, 76px); font-weight: 900; line-height: 1.05; text-align: center; }
.flash .vi { font-size: 26px; font-weight: 800; color: var(--muted); }
.flash .sent { font-size: 23px; font-weight: 800; color: #7A5CFF; background: #F3EEFF; padding: 8px 18px; border-radius: 999px; text-align: center; }
.flash.listening::after { content: "🎤 Nói đi nào!"; position: absolute; inset: 14px 14px auto auto; background: #FF5A8A; color: #fff;
  font-weight: 900; padding: 8px 16px; border-radius: 999px; font-size: 20px; animation: pulse 1s infinite; }
.flash.in-r { animation: inR .35s ease-out; }
.flash.in-l { animation: inL .35s ease-out; }
.nav { width: 84px; height: 84px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 34px; color: var(--purple); flex: none; }
.nav:disabled { opacity: .3; }
.toolbar { display: flex; justify-content: center; gap: 16px; padding: 14px 20px 6px; flex-wrap: wrap; }
.tool { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 10px 22px 10px 14px;
  display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 900; text-align: left; line-height: 1.1; }
.tool span { font-size: 36px; }
.tool small { display: block; font-size: 14px; color: var(--muted); font-weight: 700; }
.tool.rec { background: #FF5A8A; color: #fff; animation: pulse 1s infinite; }
.tool.rec small { color: #fff; }
.dots { display: flex; justify-content: center; gap: 7px; padding: 10px 20px calc(env(safe-area-inset-bottom) + 16px); flex-wrap: wrap; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #E7DDF0; }
.dots i.on { background: var(--purple); transform: scale(1.35); }

/* ---------- games ---------- */
.prog { display: flex; gap: 4px; font-size: 30px; }
.prog i { font-style: normal; filter: grayscale(1) opacity(.3); transition: .3s; }
.prog i.on { filter: none; animation: popIn .4s; }
.game { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 10px 24px calc(env(safe-area-inset-bottom) + 24px); }
.speaker { width: 116px; height: 116px; border-radius: 50%; font-size: 56px; background: linear-gradient(135deg, #FFB86B, #FF7EB6);
  box-shadow: 0 8px 0 #E0629A, 0 16px 30px rgba(255,126,182,.35); }
.speaker:active { transform: translateY(6px); box-shadow: 0 2px 0 #E0629A; }
.choices { display: grid; gap: 24px; width: 100%; max-width: 1060px; grid-template-columns: repeat(var(--n, 2), 1fr); }
.choices.n2 { max-width: 760px; }
@media (orientation: portrait) { .choices.n4 { grid-template-columns: repeat(2, 1fr); max-width: 640px; } }
.choice { --ps: min(17vh, 140px); position: relative; aspect-ratio: 1; background: #fff; border-radius: 40px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.n3 .choice, .n4 .choice { --ps: min(13vh, 110px); }
.choice .cap { font-size: 26px; font-weight: 900; opacity: 0; transition: opacity .3s; }
.choice.right { background: #E3FBEA; box-shadow: 0 0 0 6px #4CC97A, var(--shadow); animation: yay .5s; }
.choice.right .cap { opacity: 1; }
.choice.wrong { animation: shake .5s; }
.choice.hint { animation: glow 1s infinite; }

.mem { display: grid; gap: 16px; width: 100%; max-width: 1100px; grid-template-columns: repeat(var(--cols), 1fr); }
.mc { height: calc((var(--vh) - 200px) / var(--rows) - 16px); max-height: 330px; perspective: 900px; }
.mc-in { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.mc.open .mc-in { transform: rotateY(180deg); }
.mc-f, .mc-b { position: absolute; inset: 0; border-radius: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: var(--shadow); }
.mc-f { background: linear-gradient(135deg, #9B7BFF, #FF7EB6); font-size: 64px; color: #fff; }
.mc-f::after { content: ""; position: absolute; inset: 12px; border: 3px dashed rgba(255,255,255,.5); border-radius: 22px; }
.mc-b { --ps: min(11vh, 96px); background: #fff; transform: rotateY(180deg); }
.mc-b b { font-size: 22px; font-weight: 900; }
.mc.matched .mc-b { background: #E3FBEA; box-shadow: 0 0 0 5px #4CC97A, var(--shadow); }

.sky { position: relative; flex: 1; margin: 4px 20px calc(env(safe-area-inset-bottom) + 20px); border-radius: 40px; overflow: hidden;
  background: linear-gradient(#9EDBFF, #DDF3FF 70%, #F2FBFF); box-shadow: inset 0 -12px 0 rgba(255,255,255,.6); }
.sky::before { content: "☁️      ☁️"; position: absolute; top: 18%; left: 8%; font-size: 70px; opacity: .8; white-space: pre; }
.find { position: absolute; z-index: 3; left: 18px; top: 18px; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 30px; padding: 10px 20px 10px 12px; box-shadow: var(--shadow); --ps: 56px; font-weight: 900; font-size: 24px; }
.find .speaker { width: 70px; height: 70px; font-size: 34px; box-shadow: 0 5px 0 #E0629A; }
.bubble { position: absolute; bottom: calc(-1 * var(--s)); width: var(--s); height: var(--s); z-index: 2;
  animation: rise var(--d) linear forwards; will-change: transform; }
.bubble .bw { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; --ps: calc(var(--s) * .42);
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.98) 0 9%, rgba(255,255,255,.35) 10% 38%, rgba(140,205,255,.32) 70%, rgba(255,140,200,.35));
  border: 3px solid rgba(255,255,255,.95); box-shadow: inset 0 0 22px rgba(255,255,255,.7), 0 6px 18px rgba(80,150,220,.18);
  animation: sway 3s ease-in-out infinite alternate; }
.bubble .bw > * { pointer-events: none; }
.bubble.popped { animation-play-state: paused; pointer-events: none; }
.bubble.popped .bw { animation: popOut .35s forwards; }
.bubble.nope .bw { animation: wobble .5s; }

/* ---------- stickers ---------- */
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px; }
.stk { aspect-ratio: 1; background: #fff; border-radius: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 62px; line-height: 1.1; }
.stk small { font-size: 15px; font-weight: 800; color: var(--muted); }
.stk.locked { background: #F4EEF8; color: #CDBFDA; font-size: 44px; font-weight: 900; box-shadow: none; border: 3px dashed #E3D7EE; }
.stk.wig { animation: wiggle .5s; }

/* ---------- talk (ba mẹ & bé) ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.chip { background: #fff; border-radius: 999px; padding: 12px 20px; font-weight: 900; font-size: 19px; box-shadow: var(--shadow); }
.chip.on { background: var(--purple); color: #fff; }
.phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.phrase { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 16px; text-align: left; }
.phrase .pe { font-size: 52px; width: 76px; height: 76px; flex: none; border-radius: 22px; display: grid; place-items: center; background: #FFF1DE; }
.phrase b { display: block; font-size: 24px; font-weight: 900; }
.phrase small { display: block; font-size: 17px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.phrase .slow { margin-left: auto; font-size: 30px; width: 56px; height: 56px; border-radius: 18px; background: #F3EEFF; flex: none; }

/* ---------- parent ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stat { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 16px 18px; }
.stat b { display: block; font-size: 34px; font-weight: 900; }
.stat span { font-size: 16px; color: var(--muted); font-weight: 700; }
.panel { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 8px 22px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.row:last-child { border-bottom: 0; }
.row > label { flex: 1; min-width: 220px; font-weight: 800; font-size: 19px; }
.row > label small { display: block; font-size: 15px; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; background: #F3EEF9; border-radius: 16px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { padding: 10px 16px; border-radius: 12px; font-weight: 800; font-size: 17px; color: #6E5E80; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(59,44,74,.12); }
.field { border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 18px; font-weight: 700; background: #FBF8FD; max-width: 320px; }
.btn { background: var(--purple); color: #fff; font-weight: 900; font-size: 18px; padding: 12px 20px; border-radius: 16px; box-shadow: 0 4px 0 #7A5CE0; }
.btn.ghost { background: #F3EEF9; color: var(--ink); box-shadow: none; }
.btn.danger { background: #FFE6EC; color: #D6336C; box-shadow: none; }
.tprog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 26px; padding: 14px 0; }
.tprog div { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.tprog .bar { flex: 1; width: auto; margin: 0; }
.tprog em { font-style: normal; color: var(--muted); font-size: 15px; min-width: 52px; text-align: right; }
.tips { margin: 0; padding: 10px 0 10px 22px; font-size: 18px; line-height: 1.55; }
.tips li { margin: 6px 0; }
.tips b { color: #7A5CFF; }

/* ---------- modal, toast, rest ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(59,44,74,.42); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: fadeIn .2s; }
.sheet { width: min(560px, 100%); background: #fff; border-radius: 42px; padding: 30px 30px 26px; text-align: center; animation: popIn .35s; }
.sheet h2 { font-size: 34px; font-weight: 900; }
.sheet p { font-size: 20px; font-weight: 700; color: #6E5E80; margin-top: 8px; }
.big-star { font-size: 110px; line-height: 1; animation: spin 1.2s ease-out; }
.newsticker { font-size: 96px; margin: 10px auto 0; width: 150px; height: 150px; border-radius: 36px; display: grid; place-items: center; background: #FFF4D6; animation: wiggle 1s .4s; }
.sheet .acts2 { display: flex; gap: 16px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.bigbtn { min-width: 140px; border-radius: 28px; padding: 14px 18px; background: #F3EEFF; font-size: 44px; box-shadow: var(--shadow); line-height: 1.1; }
.bigbtn small { display: block; font-size: 17px; font-weight: 900; color: var(--ink); }
.bigbtn.main { background: var(--green); }
.bigbtn.main small { color: #fff; }
.gate-q { font-size: 26px !important; color: var(--ink) !important; margin: 14px 0 6px !important; }
.gate-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.gate-opts button { font-size: 32px; font-weight: 900; padding: 16px 0; border-radius: 20px; background: #F3EEF9; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 28px); transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 18px; padding: 14px 24px; border-radius: 999px; animation: fadeIn .2s; max-width: 90vw; text-align: center; }
.rest { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px;
  background: linear-gradient(#2E2A5A, #4B3F8F); color: #fff; }
.rest .moon { font-size: 140px; animation: bob 3s ease-in-out infinite; }
.rest h1 { font-size: 46px; font-weight: 900; }
.rest p { font-size: 22px; opacity: .9; font-weight: 700; max-width: 640px; }
.rest .btn { margin-top: 20px; background: rgba(255,255,255,.15); box-shadow: none; }

/* ---------- effects ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.cf { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall 2.4s ease-in forwards; }
.spark { position: fixed; font-size: 30px; animation: fly .8s ease-out forwards; }

@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes inR { from { transform: translateX(80px) rotate(3deg); opacity: 0; } }
@keyframes inL { from { transform: translateX(-80px) rotate(-3deg); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-14px) rotate(-2deg); } 40%, 80% { transform: translateX(14px) rotate(2deg); } }
@keyframes yay { 40% { transform: scale(1.1) rotate(-3deg); } }
@keyframes glow { 50% { box-shadow: 0 0 0 10px #FFD54F, var(--shadow); } }
@keyframes wiggle { 25% { transform: rotate(-12deg) scale(1.1); } 50% { transform: rotate(10deg) scale(1.1); } 75% { transform: rotate(-6deg); } }
@keyframes wobble { 30% { transform: scale(1.15, .85); } 60% { transform: scale(.9, 1.1); } }
@keyframes spin { from { transform: rotate(-200deg) scale(.2); } }
@keyframes rise { to { transform: translateY(calc(-1 * var(--h))); } }
@keyframes sway { from { transform: translateX(-16px); } to { transform: translateX(16px); } }
@keyframes popOut { to { transform: scale(1.7); opacity: 0; } }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
.pop-in { animation: popIn .4s both; }
.wig { animation: wiggle .5s; }

@media (max-width: 760px) {
  .hero { flex-wrap: wrap; } .today { margin-left: 0; }
  .brand { font-size: 22px; } .brand small { display: none; }
}

/* ---------- màn hình chào (mở khoá âm thanh) ---------- */
.splash { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(135deg, #FFE1F0, #E6DEFF); text-align: center; padding: 30px; }
.splash h1 { font-size: 48px; font-weight: 900; }
.splash p { font-size: 20px; font-weight: 700; color: #6E5E80; }
.splash .start { width: 220px; height: 220px; border-radius: 50%; background: var(--green); color: #fff; font-size: 96px; line-height: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 0 #2FA37F, 0 20px 40px rgba(76,201,164,.4); animation: pulse 1.6s infinite; }
.splash .start small { font-size: 15px; font-weight: 800; max-width: 170px; }
