:root {
  --ink: #3b2a1a;
  --card: #fffdf5;
  --btn: #ffcf3f;
  --btn-d: #e0a400;
  --ok: #4cc955;
  --bad: #ff6b6b;
  --soil: #b98355;
  --soil-d: #8d5d38;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: #dff5ff; color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Baloo 2", system-ui, -apple-system, sans-serif;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
#app { position: fixed; inset: 0; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; padding: 0; background: none; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* ---------- nút to, mập ---------- */
.btn {
  background: var(--btn); border-radius: 18px; padding: 12px 20px; font-weight: 800; font-size: 18px;
  box-shadow: 0 5px 0 var(--btn-d); transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-d); }
.btn.big { font-size: 20px; padding: 14px 26px; }
.x {
  width: 40px; height: 40px; border-radius: 50%; background: #fff; font-weight: 900; font-size: 18px;
  box-shadow: 0 3px 0 #e6dcc0; flex: none;
}

/* ---------- chọn hồ sơ ---------- */
.profile {
  align-items: center; justify-content: center; gap: 14px; padding: 24px;
  background: linear-gradient(#8fd6ff, #e4f8ff 55%, #b6ec82 55%, #79d44d);
}
.logo { font-size: clamp(30px, 8vw, 52px); font-weight: 900; text-align: center; text-shadow: 0 3px 0 #fff; }
.sub { font-weight: 700; opacity: .8; margin-bottom: 8px; text-align: center; }
.cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pcard {
  width: 160px; background: #fff; border-radius: 26px; padding: 18px 10px; text-align: center;
  box-shadow: 0 7px 0 #e0cf9a; border: 4px solid #ffe08a;
}
.pcard:active { transform: translateY(4px); box-shadow: 0 3px 0 #e0cf9a; }
.pcard .av { font-size: 64px; }
.pcard .pn { font-size: 20px; font-weight: 900; margin-top: 4px; }
.pcard .pg { font-size: 13px; font-weight: 700; opacity: .7; margin-top: 4px; }

/* ---------- nông trại ---------- */
.farm { background: #d9f4ff; }
.hud {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; z-index: 5;
}
.who { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 20px; padding: 4px 12px 4px 6px; box-shadow: 0 3px 0 #bfe3f5; font-weight: 900; }
.who .av { font-size: 28px; }
.lvl { flex: 1; max-width: 150px; font-size: 12px; font-weight: 900; }
.lvl .bar { height: 10px; background: #fff; border-radius: 6px; overflow: hidden; margin-top: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.lvl .bar i { display: block; height: 100%; background: linear-gradient(#ffd54f, #ffb300); border-radius: 6px; width: 0; transition: width .4s; }
.mbtn { width: 38px; height: 38px; border-radius: 50%; background: #fff; font-size: 19px; box-shadow: 0 3px 0 #bfe3f5; flex: none; }
.coins { background: #fff; border-radius: 20px; padding: 6px 14px; font-weight: 900; font-size: 18px; box-shadow: 0 3px 0 #bfe3f5; }
.coins.pop { animation: pop .4s; }

.scene { position: relative; flex: 1; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(#8fd6ff 0, #d9f4ff 150px, #bff08a 150px, #7ed957 100%); }
.scene .sunny { position: absolute; top: 6px; right: 22px; font-size: 54px; animation: spin 40s linear infinite; }
.scene .cld { position: absolute; font-size: 44px; opacity: .95; animation: drift 38s linear infinite; }
.scene .cld.c1 { top: 18px; left: -60px; }
.scene .cld.c2 { top: 62px; left: -60px; animation-duration: 55s; animation-delay: -20s; font-size: 34px; }
.hill { position: absolute; top: 100px; border-radius: 50% 50% 0 0; background: #a3ea72; height: 120px; }
.hill.h1 { left: -15%; width: 70%; }
.hill.h2 { right: -20%; width: 75%; top: 112px; background: #92e062; }
.deco { position: absolute; top: 52px; left: 0; right: 0; display: flex; justify-content: space-around; align-items: flex-end; padding: 0 16px; pointer-events: none; font-size: 34px; }
.deco span.big { font-size: 56px; }
.farmin { position: relative; z-index: 2; padding: 150px 12px 14px; max-width: 640px; margin: 0 auto; }
.tip { background: #fff; border-radius: 18px; padding: 8px 14px; margin: 0 auto 12px; width: fit-content; max-width: 100%; font-weight: 800; font-size: 14px; text-align: center; box-shadow: 0 3px 0 #d7ecb8; animation: bob 1.8s ease-in-out infinite; }
.field { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; --ps: min(26vw, 150px); }
.plot {
  position: relative; aspect-ratio: 1 / .92; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(0deg, var(--soil) 0 12px, #a97649 12px 15px);
  box-shadow: inset 0 -7px 0 rgba(0,0,0,.14), 0 6px 0 var(--soil-d);
}
.plot:active { transform: translateY(3px); }
.plot .crop { font-size: calc(var(--ps) * .5); line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.18)); }
.plot.empty .crop { font-size: calc(var(--ps) * .3); opacity: .55; }
.plot.grow .crop { animation: bob 1.4s ease-in-out infinite; }
.plot.ready .crop { animation: bounce .9s ease-in-out infinite; }
.plot.ready::after { content: '✨'; position: absolute; top: 4px; right: 8px; font-size: 22px; animation: pop 1s infinite; }
.plot .lbl { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pen {
  position: relative; height: 74px; margin-top: 18px; border-radius: 20px;
  background: #a8ec74; border: 4px dashed #fff; overflow: hidden;
}
.pen .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; opacity: .6; font-size: 13px; text-align: center; padding: 0 10px; }
.animal { position: absolute; bottom: 4px; font-size: 38px; animation: wander var(--dur) ease-in-out var(--delay) infinite alternate; }
.animal.hop { animation: bounce .5s 2; }

.nav {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; z-index: 6;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff7dc; border-top: 3px solid #f1d98a;
}
.nav button {
  background: #fff; border-radius: 16px; padding: 6px 2px 5px; box-shadow: 0 4px 0 #ead590;
  display: flex; flex-direction: column; align-items: center; font-weight: 900; font-size: 12px; line-height: 1.15;
}
.nav button:active { transform: translateY(3px); box-shadow: 0 1px 0 #ead590; }
.nav .e { font-size: 28px; line-height: 1.1; }
.nav small { font-size: 10px; font-weight: 700; opacity: .65; }

/* ---------- popup / sheet ---------- */
.overlay { position: absolute; inset: 0; background: rgba(50, 35, 20, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 40; animation: fade .2s; }
.sheet { width: min(100%, 680px); max-height: 90%; overflow: auto; -webkit-overflow-scrolling: touch; background: var(--card); border-radius: 28px 28px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); animation: slide .25s; }
.sh-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 22px; font-weight: 900; }
.overlay.mid { align-items: center; }
.overlay.mid .sheet { border-radius: 28px; max-width: 420px; margin: 0 16px; text-align: center; padding-bottom: 20px; }

.shop { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item { background: #fff; border-radius: 20px; padding: 10px 6px; text-align: center; box-shadow: 0 4px 0 #eadfba; border: 3px solid #f4ead0; }
.item .ie { font-size: 44px; }
.item .in { font-weight: 900; }
.item .iv { font-size: 12px; opacity: .7; font-weight: 700; }
.item .btn { font-size: 15px; padding: 6px 14px; margin-top: 6px; }
.item.owned { background: #e8f9e3; border-color: #bfe8b5; }
.item .btn.dis { background: #ddd; box-shadow: 0 5px 0 #bbb; }
.sec { font-weight: 900; margin: 14px 0 8px; font-size: 16px; opacity: .8; }

.dex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dcard { background: #fff; border-radius: 18px; padding: 8px 4px; text-align: center; box-shadow: 0 3px 0 #eadfba; }
.dcard .de { font-size: 38px; }
.dcard .dw { font-weight: 900; font-size: 14px; }
.dcard .dv { font-size: 11px; opacity: .7; font-weight: 700; }
.dcard.lock .de { filter: grayscale(1) brightness(0) opacity(.2); }
.dcard.lock .dw, .dcard.lock .dv { opacity: .3; }
.dcard .st { font-size: 11px; letter-spacing: 1px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px dashed #eee0b8; font-weight: 800; }
.seg { display: flex; gap: 6px; }
.seg button { background: #fff; border-radius: 12px; padding: 8px 14px; font-weight: 900; box-shadow: 0 3px 0 #e6dcc0; }
.seg button.on { background: var(--btn); box-shadow: 0 3px 0 var(--btn-d); }
.avs button { font-size: 30px; padding: 4px 8px; }

/* ---------- màn hình làm nhiệm vụ ---------- */
.quest { background: radial-gradient(circle at 20% 10%, #fff8d6, #fff0b8 60%, #ffe69a); z-index: 30; }
.q-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 6px; }
.dots { flex: 1; display: flex; gap: 8px; justify-content: center; }
.dots i { width: 22px; height: 12px; border-radius: 8px; background: rgba(0,0,0,.12); }
.dots i.ok { background: var(--ok); }
.dots i.bad { background: var(--bad); }
.dots i.cur { background: #fff; box-shadow: 0 0 0 3px var(--btn); }
.q-body { flex: 1; overflow-y: auto; padding: 8px 16px 150px; max-width: 640px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.prompt { font-size: clamp(20px, 5.4vw, 28px); font-weight: 900; text-align: center; margin-top: 6px; }
.prompt.sm { font-size: clamp(18px, 4.8vw, 23px); }
.vi { font-size: 15px; font-weight: 700; opacity: .75; text-align: center; margin-top: -4px; }
.hintbtn { background: #fff; border-radius: 14px; padding: 4px 12px; font-size: 14px; font-weight: 800; box-shadow: 0 3px 0 #e6dcc0; }
.speakrow { display: flex; gap: 12px; }
.spk { width: 64px; height: 64px; border-radius: 50%; background: #5cc8ff; font-size: 30px; box-shadow: 0 5px 0 #2a9bd6; }
.spk.slow { background: #b9e66a; box-shadow: 0 5px 0 #86bd2f; }
.spk:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.big-e { font-size: clamp(80px, 24vw, 130px); line-height: 1.1; animation: bob 2s ease-in-out infinite; }
.viword { font-size: 20px; font-weight: 900; opacity: .8; margin-top: -8px; }
.card { background: #fff; border-radius: 22px; padding: 14px 16px; font-size: 18px; font-weight: 700; line-height: 1.45; box-shadow: 0 4px 0 #eadfba; width: 100%; max-height: 38vh; overflow: auto; }
.card .vi { font-size: 14px; font-weight: 600; text-align: left; margin-top: 8px; border-top: 2px dashed #eee0b8; padding-top: 6px; }
.card .cvi { margin-top: 8px; font-size: 14px; opacity: .75; border-top: 2px dashed #eee0b8; padding-top: 6px; }
.sentence { font-size: clamp(22px, 6vw, 30px); font-weight: 900; text-align: center; background: #fff; border-radius: 22px; padding: 18px 14px; width: 100%; box-shadow: 0 4px 0 #eadfba; line-height: 1.4; }
.sentence .blank { display: inline-block; min-width: 70px; border-bottom: 4px solid #e0a400; color: #1f9d3a; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.opts.one { grid-template-columns: 1fr; }
.opt { background: #fff; border-radius: 20px; padding: 14px 8px; font-size: clamp(18px, 5vw, 24px); font-weight: 900; box-shadow: 0 5px 0 #e4d9b8; border: 3px solid #f2e7c4; min-height: 64px; }
.opt.pic { font-size: clamp(48px, 14vw, 72px); padding: 8px; line-height: 1.2; }
.opt:active { transform: translateY(3px); }
.opt.ok { background: #d7f8d4; border-color: var(--ok); box-shadow: 0 5px 0 #8fd68f; }
.opt.bad { background: #ffe0e0; border-color: var(--bad); animation: shake .4s; box-shadow: 0 5px 0 #f0aaaa; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.slot { width: 40px; height: 50px; border-bottom: 5px solid #c9b57a; font-size: 30px; font-weight: 900; text-transform: uppercase; }
.slot.f { color: #1d6fd6; }
.slots.ok .slot { color: #1f9d3a; border-color: var(--ok); animation: bounce .5s; }
.slots.bad .slot { color: #d93a3a; border-color: var(--bad); animation: shake .4s; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.tile { width: 50px; height: 54px; border-radius: 14px; background: var(--btn); box-shadow: 0 5px 0 var(--btn-d); font-size: 28px; font-weight: 900; text-transform: uppercase; }
.tile:active { transform: translateY(3px); }
.tile.used { opacity: .2; pointer-events: none; }

.fb { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); transform: translateY(115%); transition: transform .25s; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 3; }
.fb.show { transform: none; }
.fb.ok { background: #d7f8d4; border-top: 4px solid var(--ok); }
.fb.bad { background: #ffe0e0; border-top: 4px solid var(--bad); }
.fb-msg b { font-size: 22px; display: block; }
.fb-msg .ans { font-size: 15px; font-weight: 800; margin-top: 2px; }

.summary .stars { font-size: 54px; letter-spacing: 6px; }
.summary .stars span { display: inline-block; animation: pop .6s backwards; }
.summary .earn { font-size: 26px; font-weight: 900; margin: 8px 0 14px; }

.toast { position: fixed; left: 50%; top: calc(60px + env(safe-area-inset-top)); transform: translateX(-50%); background: #fff; border-radius: 20px; padding: 10px 18px; font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.15); z-index: 99; max-width: 90vw; text-align: center; animation: toast 2.6s forwards; pointer-events: none; }
.conf { position: fixed; font-size: 28px; z-index: 98; pointer-events: none; animation: conf 1.1s ease-out forwards; }

@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-10px) scale(1.08); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.25); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateY(60px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translateX(calc(100vw + 140px)); } }
@keyframes wander { from { left: var(--from); transform: scaleX(1); } 49% { transform: scaleX(1); } 51% { transform: scaleX(-1); } to { left: var(--to); transform: scaleX(-1); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -14px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@keyframes conf { 0% { transform: translate(0, 0) scale(.5); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(240deg); opacity: 0; } }

@media (min-width: 700px) {
  .field { gap: 18px; }
  .nav { padding-left: 20vw; padding-right: 20vw; }
}
@media (max-height: 640px) {
  .big-e { font-size: 80px; }
}

/* =================== BẢN ĐỒ 2D =================== */
.world { background: #3d8b3d; overflow: hidden; }
canvas.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.world .hud { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.world .hud > * { pointer-events: auto; }
.world .hud { gap: 6px; padding-left: calc(10px + env(safe-area-inset-left)); padding-right: calc(10px + env(safe-area-inset-right)); }
.world .who { min-width: 0; flex: 0 1 auto; }
.world .who .wn { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world .coins { flex: none; }
.world .lvl { flex: 1 1 0; min-width: 44px; background: rgba(255,255,255,.85); border-radius: 14px; padding: 4px 8px; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.joy {
  position: absolute; z-index: 6; width: 150px; height: 150px; touch-action: none;
  left: calc(10px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
}
.joy-base { position: absolute; inset: 10px; border-radius: 50%; background: rgba(255,255,255,.35); border: 4px solid rgba(255,255,255,.75); box-shadow: inset 0 0 0 10px rgba(255,255,255,.18), 0 4px 0 rgba(0,0,0,.15); }
.knob { position: relative; width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.22); border: 4px solid #ffcf3f; pointer-events: none; transition: transform .08s; }
.joy.on .knob { transition: none; background: #ffcf3f; }
.place { position: absolute; z-index: 5; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 14px; font-weight: 900; font-size: 15px; box-shadow: 0 3px 0 rgba(0,0,0,.15); display: none; white-space: nowrap; }
.place.on { display: block; }
.world .coins.stars { background: #fff6c9; }
.quest-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px; margin-top: 10px; box-shadow: 0 3px 0 #e4d9b8; }
.quest-row.ready { box-shadow: 0 0 0 3px #ffcf3f, 0 3px 0 #e4d9b8; }
.quest-row.done { opacity: .6; }
.quest-row .qe { font-size: 34px; }
.quest-row .qt { flex: 1; min-width: 0; }
.quest-row .qt .bar { height: 10px; background: #eee3c4; border-radius: 6px; overflow: hidden; margin-top: 5px; }
.quest-row .qt .bar i { display: block; height: 100%; background: #4cd3a5; }
.quest-row small { font-weight: 800; opacity: .6; }
.quest-row .btn { font-size: 14px; padding: 8px 10px; white-space: nowrap; }
.quest-row .qok { font-size: 26px; }
.wordbig { font-size: clamp(34px, 10vw, 54px); font-weight: 900; letter-spacing: 1px; margin: 6px 0; color: #3b2a1a; }
.wordbig.gap { letter-spacing: 2px; font-family: ui-monospace, Menlo, monospace; }
.basketopt { font-size: clamp(24px, 7vw, 32px); letter-spacing: 1px; }
.mcount { font-size: clamp(30px, 9vw, 44px); line-height: 1.3; max-width: 420px; margin: 4px auto; word-break: break-all; }
.abtn {
  position: absolute; z-index: 6; width: 88px; height: 88px; border-radius: 50%;
  right: calc(16px + env(safe-area-inset-right)); bottom: calc(34px + env(safe-area-inset-bottom));
  background: #ff7a59; box-shadow: 0 6px 0 #c9502f; color: #fff; font-size: 34px; font-weight: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.abtn small { font-size: 12px; margin-top: 3px; white-space: nowrap; }
.abtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9502f; }
.abtn.hint { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.talking .joy, .talking .abtn { display: none; }
@media (max-width: 430px) {
  .world .who .wn { max-width: 84px; }
  .world .coins { padding: 6px 10px; font-size: 16px; }
}

/* hộp thoại kiểu Pokémon */
.dlg {
  position: absolute; z-index: 20; left: 10px; right: 10px; max-width: 640px; margin: 0 auto;
  bottom: calc(12px + env(safe-area-inset-bottom));
  background: #fffdf5; border: 4px solid #4a3a2a; border-radius: 18px; padding: 10px 16px 12px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); animation: slide .2s;
}
.dlg-who { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 15px; color: #b0611f; }
.dlg-e { font-size: 28px; }
.dlg-spk { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: #5cc8ff; box-shadow: 0 3px 0 #2a9bd6; font-size: 18px; }
.dlg-en { font-size: clamp(18px, 4.8vw, 23px); font-weight: 900; margin-top: 4px; line-height: 1.3; }
.dlg .vi { text-align: left; margin-top: 4px; }
.dlg-wait { text-align: right; font-size: 14px; font-weight: 900; opacity: .35; margin-top: 4px; letter-spacing: 2px; animation: bob 1s ease-in-out infinite; }
.dlg-next { text-align: right; font-size: 12px; font-weight: 800; opacity: .55; margin-top: 4px; animation: bob 1s ease-in-out infinite; }
.dlg-ch { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.dlg-ch .btn { font-size: 17px; padding: 10px 18px; }
.dlg-ch .btn + .btn { background: #fff; box-shadow: 0 5px 0 #e0d4b0; }

/* =================== PUZZLE =================== */
.ptitle { flex: 1; text-align: center; font-weight: 900; font-size: 20px; padding-right: 40px; }
.puzzle .q-body { padding-bottom: 40px; }
.mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 520px; }
.mcard {
  aspect-ratio: 1 / 1.15; border-radius: 16px; background: linear-gradient(#86d86f, #5fb84b); box-shadow: 0 5px 0 #3f8f32;
  display: flex; align-items: center; justify-content: center; font-weight: 900; padding: 4px; overflow: hidden;
}
.mcard .back { font-size: 32px; opacity: .9; }
.mcard.open { background: #fff; box-shadow: 0 5px 0 #e4d9b8; animation: flip .25s; }
.mcard.pic { font-size: clamp(34px, 10vw, 52px); }
.mcard.word { font-size: clamp(13px, 3.8vw, 19px); word-break: break-word; line-height: 1.1; color: #1d6fd6; }
.mcard.m { background: #d7f8d4; box-shadow: 0 5px 0 #8fd68f; animation: pop .4s; }
@keyframes flip { from { transform: rotateY(90deg); } }
.ws-head { display: flex; align-items: center; gap: 14px; }
.ws-e { font-size: 64px; line-height: 1; }
.wordhint { font-size: 26px; font-weight: 900; letter-spacing: 6px; color: #1d6fd6; background: #fff; border-radius: 14px; padding: 4px 14px; box-shadow: 0 3px 0 #e4d9b8; }
.ws { display: grid; gap: 4px; touch-action: none; margin-top: 6px; }
.wc {
  width: var(--cs); height: var(--cs); border-radius: 10px; background: #fff; box-shadow: 0 3px 0 #e4d9b8;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: calc(var(--cs) * .52);
  touch-action: none; transition: background .1s;
}
.wc.sel { background: #ffe17a; box-shadow: 0 3px 0 #e0b400; }
.wc.found { background: #6fd36a; color: #fff; box-shadow: 0 3px 0 #3f9b3b; animation: pop .4s; }
.ws.bad { animation: shake .4s; }

/* =================== NHÂN VẬT =================== */
.charpv { display: block; margin: 0 auto; }

/* =================== CÀI APP =================== */
.instbtn { margin-top: 10px; background: #fff; box-shadow: 0 5px 0 #c9e3a8; }
.install .inst-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.install .inst-hero img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 4px 10px rgba(0,0,0,.15); flex: none; }
.install .inst-hero b { font-size: 19px; }
.install .inst-hero .vi { text-align: left; margin-top: 2px; }
.steps { padding-left: 22px; margin: 10px 0; font-weight: 700; font-size: 16px; line-height: 1.5; }
.steps li { margin: 8px 0; }
.kbd { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 2px solid #e6dcc0; border-radius: 10px; padding: 1px 8px; font-weight: 900; white-space: nowrap; }
.shareic { display: inline-flex; vertical-align: middle; }
.inst-status { font-size: 13px; font-weight: 800; background: #fff6d9; border-radius: 12px; padding: 8px 12px; }
.vbox { border-bottom: 2px dashed #eee0b8; padding-bottom: 10px; }
.vbox .row { border-bottom: 0; padding-bottom: 6px; }
.vsel { width: 100%; font: inherit; font-weight: 800; font-size: 15px; padding: 10px 12px; border-radius: 14px; border: 3px solid #f2e7c4; background: #fff; color: var(--ink); }
.vnote { font-size: 13px; font-weight: 700; opacity: .8; margin-top: 8px; line-height: 1.4; }
.vnote.warn { color: #b0611f; opacity: 1; }
.seg.looks { flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 6px; }
.seg.looks button { padding: 4px 6px; border-radius: 16px; }

/* =================== THAO TÁC TAY =================== */
.q-dots { flex: none; padding: 0 0 6px; }
.stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 4px; }
.drag { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.drag[data-off="1"] { opacity: .35; }
.ghost { position: fixed; z-index: 300; pointer-events: none; margin: 0; transform: scale(1.12) rotate(-5deg); opacity: .96; filter: drop-shadow(0 8px 6px rgba(0,0,0,.25)); }
.hover { outline: 5px solid #ffe17a; outline-offset: 3px; transform: scale(1.06); }
.bad.soil, .bad.basket, .bad.an, .bad.env { animation: shake .4s; }

.soil {
  position: relative; width: 230px; height: 130px; border-radius: 44px;
  background: repeating-linear-gradient(0deg, #a8703f 0 16px, #94603a 16px 20px);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.15), 0 6px 0 #7d5230;
  display: flex; align-items: center; justify-content: center; transition: transform .15s; overflow: visible;
}
.hole { width: 90px; height: 50px; border-radius: 50%; background: #5a3a20; box-shadow: inset 0 6px 8px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 30px; transition: transform .15s; }
.hole.seeded { animation: pop .4s; }
.hole.sprout { font-size: 46px; background: #6b4526; }
.packs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pack {
  width: 100px; min-height: 112px; border-radius: 14px; padding: 6px;
  background: linear-gradient(#fff6d9, #ffe7a3); border: 3px solid #e0b400; box-shadow: 0 5px 0 #c99700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.pack .pe { font-size: 40px; line-height: 1; }
.pack .pw { font-weight: 900; font-size: 17px; color: #7a4a00; }
.tool { width: 104px; height: 104px; border-radius: 26px; background: #fff; box-shadow: 0 5px 0 #e4d9b8; font-size: 58px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tool small { font-size: 12px; font-weight: 900; color: #2a9bd6; }
.bar2 { width: 230px; height: 16px; border-radius: 10px; background: rgba(0,0,0,.12); overflow: hidden; }
.bar2 i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(#8fdcff, #2a9bd6); transition: width .1s; }
.bar2.grow i { background: linear-gradient(#ffe17a, #ffb300); }
.drop { position: absolute; top: 0; font-size: 22px; pointer-events: none; animation: fall .6s linear forwards; }
@keyframes fall { from { transform: translateY(-50px); opacity: 1; } to { transform: translateY(40px); opacity: 0; } }

.pullzone { position: relative; width: 230px; height: 180px; touch-action: manipulation; cursor: pointer; }
.pullzone .soil { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 86px; z-index: 2; }
.pullcrop { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; font-size: 88px; line-height: 1; z-index: 1; transition: transform .08s; }
.pullcrop.out { z-index: 3; animation: popout .7s forwards; }
@keyframes popout { 0% { transform: translateY(0); } 60% { transform: translateY(-110px) rotate(200deg) scale(1.2); } 100% { transform: translateY(-80px) rotate(360deg) scale(1.15); } }
.tapme { font-weight: 900; font-size: 18px; opacity: .7; animation: bob .6s ease-in-out infinite; }

.items { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.item2 { position: relative; width: 66px; height: 66px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #e4d9b8; font-size: 44px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.item2.gone { visibility: hidden; }
.item2 .tag { position: absolute; bottom: -9px; right: -8px; font-size: 12px; font-weight: 900; background: #ffd23f; border-radius: 10px; padding: 1px 6px; box-shadow: 0 2px 0 #c99700; }
.basket {
  position: relative; width: 240px; min-height: 110px; padding: 12px 10px; border-radius: 20px 20px 56px 56px;
  background: repeating-linear-gradient(45deg, #dcaa70 0 10px, #c58f56 10px 20px); border: 4px solid #8b5a2b;
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.basket.tray { border-radius: 24px; background: #f4e6c4; border-color: #c9a76a; }
.blist { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 40px; }
.bi { font-size: 32px; line-height: 1; padding: 2px; }
.cnt { position: absolute; top: -14px; right: -12px; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 20px; background: #ff7a59; color: #fff; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #c9502f; }

.animals { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.an { position: relative; width: 104px; padding: 8px 4px 6px; border-radius: 22px; background: #eaf8df; border: 3px dashed #9bd27e; display: flex; flex-direction: column; align-items: center; transition: transform .15s; }
.an .ae { font-size: 56px; line-height: 1.1; }
.an .al { font-weight: 900; font-size: 15px; }
.an.happy .ae { animation: bounce .5s 2; }
.heart { position: absolute; top: 0; left: 50%; font-size: 26px; pointer-events: none; animation: heart 1s forwards; }
@keyframes heart { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -60px) scale(1.4); opacity: 0; } }

.cust { display: flex; align-items: center; gap: 10px; }
.cust .ce { font-size: 64px; line-height: 1; }
.bubble { position: relative; max-width: 250px; background: #fff; border-radius: 18px; padding: 10px 14px; font-weight: 900; font-size: 18px; box-shadow: 0 4px 0 #e4d9b8; }
.bubble .vi { text-align: left; font-size: 13px; margin-top: 4px; }
.bill { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-weight: 900; font-size: 20px; background: #fff; border-radius: 16px; padding: 8px 16px; box-shadow: 0 3px 0 #e4d9b8; }
.coin {
  width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffcf3f 45%, #e0a400); box-shadow: 0 4px 0 #b98500;
  font-weight: 900; font-size: 24px; color: #7a4a00;
}
.coin.sm { width: 40px; height: 40px; font-size: 15px; box-shadow: 0 2px 0 #b98500; }

.env { font-size: 130px; line-height: 1; margin-top: 20px; animation: bob 1.6s ease-in-out infinite; }
.env.bad { animation: shake .3s; }
.slots.words .slot { width: auto; min-width: 54px; height: 44px; padding: 0 6px; font-size: 18px; text-transform: none; }
.tiles.words .tile { width: auto; height: 46px; padding: 0 14px; font-size: 19px; text-transform: none; }

/* =================== HỒ SƠ & TẠO NHÂN VẬT =================== */
input, textarea, select { -webkit-user-select: text; user-select: text; }
.profile { justify-content: flex-start; overflow-y: auto; padding-top: calc(28px + env(safe-area-inset-top)); padding-bottom: 28px; }
.profile .cards { max-width: 720px; }
.pcard { position: relative; padding: 12px 8px 14px; width: 148px; }
.profile .cards { gap: 12px; }
.pplay { display: flex; flex-direction: column; align-items: center; width: 100%; }
.pedit { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; background: #fff6d9; box-shadow: 0 2px 0 #e0cf9a; font-size: 16px; z-index: 1; }
.padd { display: flex; flex-direction: column; align-items: center; justify-content: center; border-style: dashed; min-height: 170px; background: rgba(255,255,255,.75); }
.padd .plus { font-size: 56px; line-height: 1; color: #7fc95a; font-weight: 900; }
.studio .spv, .wpv { display: flex; justify-content: center; border-radius: 22px; padding: 6px 0; margin-bottom: 6px; background: radial-gradient(circle at 50% 70%, #d7f8d4, #fff 70%); }
.srow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px dashed #eee0b8; flex-wrap: wrap; }
.srow .sl { font-weight: 900; min-width: 74px; }
.sw { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.swc { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #e0d4b0; }
.swc.on { box-shadow: 0 0 0 4px #ff7a59; transform: scale(1.08); }
.stb { background: #fff; border-radius: 12px; padding: 7px 12px; font-weight: 800; box-shadow: 0 3px 0 #e6dcc0; }
.stb.on { background: var(--btn); box-shadow: 0 3px 0 var(--btn-d); }
.tin { flex: 1; min-width: 160px; font: inherit; font-size: 18px; font-weight: 800; padding: 10px 14px; border-radius: 14px; border: 3px solid #f2e7c4; background: #fff; color: var(--ink); }
.tin:focus { outline: none; border-color: #ffcf3f; }
.seg.grades button { min-width: 44px; }
.sbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.btn.danger { background: #ffe0e0; box-shadow: 0 5px 0 #f0aaaa; }
.me { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 2px dashed #eee0b8; }
.me > div { flex: 1; }
.me .vi { text-align: left; }
.who .av canvas { display: block; }

/* =================== TỦ ĐỒ =================== */
.wtools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.wtools .btn { font-size: 15px; padding: 8px 14px; }
.wopts { display: flex; flex-wrap: wrap; gap: 8px; }
.wo { background: #fff; border-radius: 14px; padding: 8px 12px; font-weight: 800; box-shadow: 0 3px 0 #e6dcc0; }
.wo.on { background: #d7f8d4; box-shadow: 0 3px 0 #8fd68f; }
.item .charpv { margin-bottom: 2px; }

/* =================== TOÁN =================== */
.mtopic { font-size: 13px; font-weight: 900; color: #1d6fd6; background: #e3f2ff; border-radius: 12px; padding: 4px 12px; text-align: center; }
.mtext { font-size: clamp(19px, 5vw, 24px); font-weight: 900; text-align: center; line-height: 1.35; background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: 0 4px 0 #eadfba; width: 100%; }
.kws { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.kwl { font-size: 12px; font-weight: 800; opacity: .6; }
.kw { background: #fff6d9; border: 2px solid #ffd23f; border-radius: 14px; padding: 4px 10px; font-weight: 800; font-size: 14px; }
.mcount { font-size: 38px; line-height: 1.2; text-align: center; max-width: 330px; letter-spacing: 4px; word-break: break-all; }
.mvis { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }
.mvis svg { max-width: 100%; height: auto; }
.opts.signs { grid-template-columns: repeat(3, 1fr); }
.opts.signs .opt { font-size: clamp(24px, 7vw, 34px); }
.opt.pic { display: flex; align-items: center; justify-content: center; }
.osvg svg { display: block; }
.mem.few { grid-template-columns: repeat(3, 1fr); max-width: 380px; }

/* =================== ĐIỂM DANH =================== */
.daily .dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.dcell { background: #fff; border-radius: 14px; padding: 6px 2px; box-shadow: 0 3px 0 #eadfba; opacity: .6; }
.dcell.done { background: #d7f8d4; opacity: 1; }
.dcell.today { background: #fff3b0; box-shadow: 0 0 0 3px #ffb300, 0 3px 0 #e0a400; opacity: 1; animation: pulse 1s infinite; }
.dcell .dd { font-size: 11px; font-weight: 800; }
.dcell .de2 { font-size: 24px; }
.dcell .dr { font-size: 13px; font-weight: 900; }

/* =================== BÁO CÁO PHỤ HUYNH =================== */
.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs { background: #fff; border-radius: 14px; padding: 8px; text-align: center; box-shadow: 0 3px 0 #eadfba; }
.rs b { display: block; font-size: 22px; }
.rs span { font-size: 12px; font-weight: 700; opacity: .7; }
.rline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 800; font-size: 14px; margin-top: 6px; }
.chip { background: #fff; border-radius: 12px; padding: 4px 10px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 0 #eadfba; }
.rtable { display: flex; flex-direction: column; gap: 6px; }
.rrow { display: grid; grid-template-columns: 1fr 90px 40px; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.rbar { height: 10px; background: #eee; border-radius: 6px; overflow: hidden; }
.rbar i { display: block; height: 100%; border-radius: 6px; }
.rv { font-weight: 900; text-align: right; }
.tipbox { background: #fff6d9; border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 14px; line-height: 1.5; }
.vsel.tsel { width: auto; max-width: 62%; font-size: 14px; padding: 8px 10px; }

/* ---------------- 👨‍👩‍👧 Khu Ba mẹ ---------------- */
.parentbtn { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); font-size: 15px; padding: 8px 14px; z-index: 3; }
.screen.profile { position: relative; }
.bigopt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; background: #fff; border-radius: 18px; padding: 14px 16px; margin-top: 12px; box-shadow: 0 4px 0 #e4d9b8; border: 3px solid #f2e7c4; }
.bigopt b { font-size: 18px; } .bigopt small { opacity: .65; font-weight: 700; }
.btn.ghost { background: #fff; box-shadow: 0 4px 0 #e0d4b0; margin-top: 12px; }
.famsetup .sbtns { margin-top: 14px; }
.tin.pin { letter-spacing: 6px; text-align: center; font-size: 22px; }
.tin.code { text-transform: uppercase; letter-spacing: 2px; font-weight: 900; }
.pinbox { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 4px; }
.pinbox .tin { max-width: 220px; }
.tu-e { font-size: 64px; line-height: 1.1; text-align: center; }
.famcode { text-align: center; background: #fff; border-radius: 18px; padding: 14px; margin-top: 8px; box-shadow: 0 3px 0 #e4d9b8; }
.famcode .fc { font-size: 28px; font-weight: 900; letter-spacing: 2px; margin: 4px 0 8px; color: #b0611f; user-select: all; -webkit-user-select: all; }
.famcode .qr { width: 180px; height: 180px; image-rendering: pixelated; border-radius: 10px; }
.seg.lims button { min-width: 44px; padding: 8px 8px; }
.screen.parent { position: fixed; inset: 0; z-index: 60; background: #fff8e6; display: flex; flex-direction: column; overflow: hidden; }
.ptop { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #ffe7a8; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.ptop b { font-size: 19px; } .ptop .pstat { flex: 1; font-size: 13px; font-weight: 800; opacity: .7; }
.ptop .btn { padding: 6px 12px; }
.pbody { flex: 1; overflow-y: auto; padding: 6px 14px calc(30px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; max-width: 760px; width: 100%; margin: 0 auto; }
.kidcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kidcard { background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 4px 0 #e4d9b8; }
.kc-top { display: flex; align-items: center; gap: 10px; }
.kc-name { flex: 1; min-width: 0; } .kc-name b { font-size: 19px; }
.kc-today { text-align: right; } .kc-today b { font-size: 26px; color: #2e8b57; display: block; line-height: 1; } .kc-today small { font-weight: 800; opacity: .6; }
.wbars { display: flex; gap: 6px; align-items: flex-end; height: 96px; margin: 12px 2px 4px; }
.wb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.wb i { display: block; width: 100%; min-height: 3px; background: #9fd9ff; border-radius: 6px 6px 2px 2px; }
.wb.today i { background: #4cd3a5; }
.wb small { font-size: 11px; font-weight: 800; opacity: .7; } .wb span { font-size: 11px; font-weight: 800; opacity: .6; }
.wsum { font-size: 14px; font-weight: 700; line-height: 1.45; margin-top: 6px; }
.kidcard .tipbox { margin-top: 8px; font-size: 13px; }
.kc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kc-btns .btn { flex: 1; font-size: 14px; padding: 8px 6px; white-space: nowrap; }
table.cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 0 #e4d9b8; font-size: 14px; }
table.cmp th, table.cmp td { padding: 8px 10px; text-align: center; border-bottom: 1px solid #f2e7c4; font-weight: 800; }
table.cmp td:first-child, table.cmp th:first-child { text-align: left; font-weight: 700; }
table.cmp tr:last-child td { border-bottom: 0; }
.screen.timeup { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: linear-gradient(#2c3e7a, #5a4a9e); color: #fff; }
.screen.timeup .vi { color: #e8e4ff; max-width: 420px; }
.screen.timeup .tu-e { font-size: 96px; }
.screen.timeup .sbtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.giftmsg { font-size: 19px; font-weight: 800; margin: 8px 0; line-height: 1.4; }
.screen.parent ~ .overlay { position: fixed; z-index: 70; }
.infocard { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.infocard .ic-e { font-size: 96px; line-height: 1.1; position: relative; animation: bob 2s ease-in-out infinite; }
.infocard .ic-flag { position: absolute; right: -26px; top: -6px; font-size: 40px; }
.infocard .ic-w { font-size: 34px; font-weight: 900; }
.infocard .ic-c { font-size: 18px; font-weight: 800; opacity: .75; }
.infocard .ic-line { font-size: 19px; font-weight: 800; line-height: 1.35; margin: 4px 0; }
.tix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tixcard { background: #fff; border-radius: 18px; padding: 12px 6px; box-shadow: 0 4px 0 #e4d9b8; border: 3px solid #f2e7c4; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tixcard.dis { opacity: .5; }
.tixcard .tx-e { font-size: 28px; min-height: 36px; } .tixcard b { font-size: 16px; } .tixcard .tx-c { font-weight: 900; color: #b0611f; }
.screen.race { display: flex; flex-direction: column; background: #2a8fc0; }
.racebar { text-align: center; font-size: 26px; font-weight: 900; color: #fff; padding: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.racecv { flex: 1; width: 100%; min-height: 0; touch-action: none; }
.tapbtn { margin: 10px auto calc(14px + env(safe-area-inset-bottom)); width: min(90vw, 360px); height: 92px; border-radius: 46px; background: #ffd23f; box-shadow: 0 7px 0 #c99a00; font-size: 34px; font-weight: 900; touch-action: none; user-select: none; -webkit-user-select: none; }
.tapbtn:active { transform: translateY(5px); box-shadow: 0 2px 0 #c99a00; }
/* 🎡 công viên */
.ridehdr { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 92px; margin: 2px 0 4px; }
.ridehdr .re { font-size: 74px; line-height: 1; display: inline-block; }
.ridehdr.spin .re { animation: rspin 6s linear infinite; }
.ridehdr.bob .re, .ridehdr.bob canvas { animation: rbob 1.2s ease-in-out infinite; }
.ridehdr.zoom .re { animation: rzoom 1.6s ease-in-out infinite; }
.ridehdr.shake .re { animation: rshake .5s ease-in-out infinite; }
@keyframes rspin { to { transform: rotate(360deg); } }
@keyframes rbob { 50% { transform: translateY(-12px); } }
@keyframes rzoom { 0% { transform: translate(-40px, 10px) rotate(-10deg); } 50% { transform: translate(40px, -14px) rotate(14deg); } 100% { transform: translate(-40px, 10px) rotate(-10deg); } }
@keyframes rshake { 25% { transform: translateX(-6px) rotate(-4deg); } 75% { transform: translateX(6px) rotate(4deg); } }
.scoopopt { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.scoopopt i { display: block; width: 46px; height: 40px; border-radius: 24px 24px 10px 10px; border: 3px solid #3b2a1a; }
.scoopopt b { font-size: 26px; line-height: 1; margin-top: -8px; }
.scoopopt small { font-size: 14px; font-weight: 800; }
.screen.bustrip { position: fixed; inset: 0; z-index: 80; background: linear-gradient(#8fd6ff, #c9f0ff 60%, #8ad068 60%); overflow: hidden; }
.bus-sky { position: absolute; top: 12%; left: 10%; font-size: 70px; animation: cloud 2.6s linear; }
.bus-road { position: absolute; left: 0; right: 0; top: 66%; height: 70px; background: #6b6b6b; border-top: 6px solid #ead096; border-bottom: 6px solid #ead096; }
.bus-road::after { content: ''; position: absolute; left: 0; right: 0; top: 32px; height: 6px; background: repeating-linear-gradient(90deg, #fff 0 40px, transparent 40px 80px); animation: road .4s linear infinite; }
.bus-e { position: absolute; top: calc(66% - 70px); font-size: 120px; line-height: 1; animation: busgo 2.6s ease-in-out forwards; transform: scaleX(-1); }
.bus-txt { position: absolute; top: 30%; left: 0; right: 0; text-align: center; font-size: clamp(22px, 6vw, 34px); font-weight: 900; color: #3b2a1a; text-shadow: 0 3px 0 #fff; }
@keyframes busgo { 0% { left: -160px; } 100% { left: 110%; } }
@keyframes road { to { background-position: -80px 0; } }
@keyframes cloud { to { transform: translateX(40px); } }
.ridehdr .charpv { margin: 0; }
