/* Thiệp tương tác ngộ nghĩnh (play-fun.js): máy gắp quà, bứt cánh hoa, bánh quy may mắn, phiếu báo điểm, thú cưng ảo, máy tính cổ.
   Kích thước theo em của .pl (1em ≈ 1/21 cạnh khung) để co giãn đúng trong khung xem trước, thumbnail và toàn màn hình. */
.fn-hint { margin: 0; max-width: 21em; text-align: center; font-size: .82em; font-weight: 600; line-height: 1.4; opacity: .85; text-wrap: balance; }

/* ---------- thẻ lời nhắn cuối dùng chung ---------- */
.fn-ov { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 4cqmin; background: color-mix(in srgb, var(--ink) 35%, transparent); backdrop-filter: blur(3px); animation: fn-fade .35s ease both; }
.fn-ov.out { animation: fn-fade .3s ease reverse forwards; }
@keyframes fn-fade { from { opacity: 0; } }
.fn-card { width: min(21em, 100%); max-height: 100%; overflow: auto; padding: 1.4em 1.4em 1.2em; border-radius: 1.2em; background: #fffdf8; color: #2f2a3a; text-align: center; box-shadow: 0 1em 3em -.5em rgba(0, 0, 0, .45); animation: pl-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; scrollbar-width: thin; }
.fn-to { margin: 0; font-size: .75em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep, var(--accent)); }
.fn-title { margin: .25em 0 .4em; font-family: var(--tf); font-weight: 400; font-size: 1.9em; line-height: 1.15; color: var(--accent); overflow-wrap: anywhere; }
.fn-msg { margin: 0; font-size: .92em; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.fn-from { margin: .8em 0 0; font-family: var(--tf); font-size: 1.25em; color: var(--accent-deep, var(--accent)); }
.fn-again { margin-top: 1em; }
.pl-btn.ghost { background: transparent; color: var(--accent-deep, var(--accent)); box-shadow: inset 0 0 0 2px currentColor; }

/* ---------- 1. máy gắp quà ---------- */
.cl-machine { position: relative; width: 17em; display: flex; flex-direction: column; border-radius: 1.4em 1.4em .8em .8em; padding: .6em .6em .7em; background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); box-shadow: 0 1em 2.4em -.6em rgba(0, 0, 0, .45), inset 0 .25em 0 rgba(255, 255, 255, .25); }
.cl-top { display: flex; flex-direction: column; align-items: center; gap: .25em; padding: .3em 0 .5em; color: #fff; }
.cl-top b { font: 900 1em/1 'Be Vietnam Pro', system-ui, sans-serif; letter-spacing: .14em; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); }
.cl-bulbs { display: flex; gap: .55em; }
.cl-bulbs i { width: .45em; height: .45em; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 .5em var(--accent2); animation: cl-bulb 1.2s steps(1) infinite; }
.cl-bulbs i:nth-child(even) { animation-delay: .6s; }
.static .cl-bulbs i { animation: none; }
@keyframes cl-bulb { 50% { opacity: .3; box-shadow: none; } }
.cl-glass { position: relative; height: 15em; border-radius: .6em; overflow: hidden; background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .9), transparent 40%), linear-gradient(180deg, color-mix(in srgb, var(--accent2) 22%, #fff), color-mix(in srgb, var(--accent) 18%, #fff) 70%, color-mix(in srgb, var(--accent) 35%, #fff)); box-shadow: inset 0 0 0 .2em rgba(255, 255, 255, .6), inset 0 -1em 1.5em -1em rgba(0, 0, 0, .25); }
.cl-glass::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 38%, transparent 46%); pointer-events: none; }
.cl-rail { position: absolute; left: 4%; right: 4%; top: .5em; height: .35em; border-radius: 1em; background: #9aa3ad; box-shadow: inset 0 .1em 0 rgba(255, 255, 255, .6); }
.cl-claw { position: absolute; top: .5em; height: calc(100% - .5em); width: 3em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 2; --rope: 12%; }
.cl-claw.moving { transition: left .45s cubic-bezier(.4, 0, .3, 1); }
.cl-rope { width: .16em; height: 12%; background: #6c757d; transition: height .7s cubic-bezier(.5, 0, .3, 1); }
.cl-claw.down .cl-rope { height: var(--rope); }
.cl-head { position: relative; width: 3em; height: 2.4em; }
.cl-hub { position: absolute; left: 50%; top: 0; width: 1.6em; height: .9em; transform: translateX(-50%); border-radius: .4em .4em .6em .6em; background: linear-gradient(180deg, #ced4da, #868e96); }
.cl-arm { position: absolute; top: .6em; width: .32em; height: 1.7em; border-radius: 1em; background: #868e96; transform-origin: 50% 0; transition: transform .35s; }
.cl-arm::after { content: ''; position: absolute; bottom: -.1em; width: .7em; height: .32em; border-radius: 1em; background: #868e96; }
.cl-arm.l { left: .55em; transform: rotate(28deg); }
.cl-arm.l::after { left: 0; }
.cl-arm.r { right: .55em; transform: rotate(-28deg); }
.cl-arm.r::after { right: 0; }
.cl-claw.grab .cl-arm.l { transform: rotate(8deg); }
.cl-claw.grab .cl-arm.r { transform: rotate(-8deg); }
.cl-held { position: absolute; left: 50%; top: 1.15em; transform: translateX(-50%); font-size: 1.9em; line-height: 1; }
.cl-held.drop { animation: cl-drop .5s ease-in forwards; }
@keyframes cl-drop { to { transform: translate(-50%, 4em); opacity: 0; } }
.cl-pile { position: absolute; inset: 0; }
.cl-prize { position: absolute; transform: translateX(-50%) rotate(var(--r)); font-size: 2.3em; line-height: 1; filter: drop-shadow(0 .08em .06em rgba(0, 0, 0, .25)); transition: opacity .2s; }
.cl-prize.gone { opacity: 0; }
.cl-chute { position: absolute; left: 2%; bottom: 0; width: 16%; height: 22%; border-radius: .3em .3em 0 0; background: repeating-linear-gradient(45deg, rgba(0, 0, 0, .18) 0 .3em, rgba(0, 0, 0, .08) .3em .6em); box-shadow: inset 0 0 0 .15em rgba(255, 255, 255, .7); }
.cl-panel { display: flex; align-items: center; justify-content: space-between; gap: .6em; margin-top: .6em; padding: .45em .5em .45em .9em; border-radius: .8em; background: rgba(0, 0, 0, .22); color: #fff; }
.cl-left { font-size: .78em; font-weight: 700; }
.cl-go { background: var(--accent2); color: var(--ink); box-shadow: 0 .3em 0 color-mix(in srgb, var(--accent2) 60%, #000); padding: .55em 1.3em; }
.cl-go:active { transform: translateY(.2em); box-shadow: 0 .1em 0 color-mix(in srgb, var(--accent2) 60%, #000); }
.cl-win { position: absolute; inset: 0; z-index: 7; display: none; place-items: center; padding: 4cqmin; background: rgba(0, 0, 0, .35); }
.cl-win.show { display: grid; animation: fn-fade .3s ease; }
.cl-card { width: min(17em, 100%); padding: 1.2em; border-radius: 1.2em; background: #fffdf8; color: #2f2a3a; text-align: center; box-shadow: 0 1em 3em -.5em rgba(0, 0, 0, .5); animation: pl-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.cl-card small { font-size: .72em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cl-big { display: block; font-size: 3.6em; line-height: 1.15; animation: cl-wiggle 1.2s ease-in-out infinite; }
@keyframes cl-wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.cl-card b { display: block; font-size: 1.1em; }
.cl-card p { margin: .4em 0 0; font-size: .88em; line-height: 1.5; }
.cl-need { display: block; margin-top: .55em; font-size: .72em; font-weight: 700; color: var(--accent-deep, var(--accent)); opacity: .9; }
.cl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; margin-top: 1em; }

/* ---------- 2. bứt cánh hoa ---------- */
.pt-wrap { display: flex; flex-direction: column; align-items: center; gap: .6em; }
.pt-flower { position: relative; width: 16em; height: 16em; }
.pt-petal { position: absolute; left: 50%; top: 50%; width: 4.4em; height: 7.4em; margin: -7.4em 0 0 -2.2em; border: 0; padding: 0; cursor: pointer; transform-origin: 50% 100%; transform: rotate(var(--a)); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 30%, #fff 0 30%, transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--accent2) 70%, #fff), var(--accent2));
  box-shadow: inset 0 -.6em 1em -.4em color-mix(in srgb, var(--accent) 40%, transparent), 0 .15em .4em rgba(0, 0, 0, .12); animation: pt-in .6s var(--d) cubic-bezier(.3, 1.4, .5, 1) both; }
.pt-petal:hover { filter: brightness(1.05); }
.pt-petal.off { pointer-events: none; animation: pt-off 1.1s ease-in forwards; }
@keyframes pt-in { from { scale: .2; opacity: 0; } }
@keyframes pt-off { 30% { translate: 0 -1em; } to { translate: var(--fx) 60cqh; rotate: var(--fr); opacity: 0; } }
.static .pt-petal { animation: none; }
.pt-core { position: absolute; left: 50%; top: 50%; width: 5.4em; height: 5.4em; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, #ffe066), var(--accent)); box-shadow: 0 0 0 .3em color-mix(in srgb, var(--accent) 35%, #fff), 0 .3em 1em rgba(0, 0, 0, .25); z-index: 2; }
.pt-emo { font-size: 2.6em; line-height: 1; }
.pt-core img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.pt-flower.done .pt-core { animation: pt-glow 1.4s ease-in-out infinite; }
@keyframes pt-glow { 50% { box-shadow: 0 0 0 .3em color-mix(in srgb, var(--accent) 35%, #fff), 0 0 2.4em .6em var(--accent2); transform: translate(-50%, -50%) scale(1.06); } }
.pt-say { margin: 0; min-height: 1.3em; font-family: var(--tf); font-size: 2.1em; line-height: 1.2; color: var(--accent); text-align: center; }
.pt-say.no { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.pt-say.pop { animation: pl-pop .4s cubic-bezier(.3, 1.8, .5, 1); }
.pt-count { margin: 0; min-height: 1em; font-size: .75em; font-weight: 700; opacity: .65; }

/* ---------- 3. bánh quy may mắn ---------- */
.fc-wrap { display: flex; flex-direction: column; align-items: center; gap: .9em; width: 21em; }
.fc-plate { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em 1em; padding: 1.1em 1em 1.3em; border-radius: 50%; width: 20em; background: radial-gradient(ellipse at 50% 40%, #fff 0 55%, color-mix(in srgb, var(--accent2) 30%, #f1f3f5) 56% 66%, #fff 67% 70%, transparent 71%); }
.fc-cookie { position: relative; isolation: isolate; width: 4.8em; height: 2.7em; border: 0; padding: 0; background: none; cursor: pointer; transform: rotate(var(--r)); animation: pl-pop .5s var(--d) cubic-bezier(.3, 1.6, .5, 1) both; }
.static .fc-cookie { animation: none; }
.fc-cookie:not(.open):hover { animation: fc-shake .4s; }
@keyframes fc-shake { 25% { transform: rotate(calc(var(--r) - 8deg)); } 75% { transform: rotate(calc(var(--r) + 8deg)); } }
.fc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 .12em .12em rgba(120, 60, 0, .3)); }
.fc-half { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: view-box; }
.fc-half.l { transform-origin: 50% 54%; }
.fc-half.r { transform-origin: 50% 54%; }
.fc-crease { transition: opacity .2s; }
.fc-cookie.open .fc-crease { opacity: 0; }
.fc-paper { position: absolute; left: 50%; top: 45%; z-index: -1; width: 3.4em; height: .7em; transform: translate(-50%, 0) scaleX(.2); background: #fff; border-radius: .1em; box-shadow: 0 .05em .2em rgba(0, 0, 0, .2); opacity: 0; transition: .5s .15s; }
.fc-cookie.open .fc-half.l { transform: rotate(-32deg) translate(-6px, 2px); }
.fc-cookie.open .fc-half.r { transform: rotate(32deg) translate(6px, 2px); }
.fc-cookie.open .fc-paper { opacity: 1; transform: translate(-50%, -1.3em) scaleX(1); }
.fc-slip { position: relative; width: 19em; min-height: 5.6em; padding: .9em 1.1em; background: #fffdf5; color: #3b2f2f; border-radius: .2em; box-shadow: 0 .4em 1.2em -.3em rgba(0, 0, 0, .3); text-align: center; opacity: 0; transform: translateY(1em) rotate(-1.5deg); }
.fc-slip::before, .fc-slip::after { content: ''; position: absolute; top: 0; bottom: 0; width: .5em; background: radial-gradient(circle at 0 50%, transparent .25em, #fffdf5 .26em) 0 0 / .5em .7em repeat-y; }
.fc-slip::before { left: -.5em; transform: scaleX(-1); }
.fc-slip::after { right: -.5em; }
.fc-slip.show { opacity: 1; transform: rotate(-1.5deg); transition: .5s cubic-bezier(.3, 1.4, .5, 1); }
.fc-slip small { font-size: .68em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep, var(--accent)); }
.fc-slip p { margin: .3em 0; font-family: 'Patrick Hand', var(--bf); font-size: 1.12em; line-height: 1.35; }
.fc-nums { font-size: .72em; letter-spacing: .06em; color: #c92a2a; font-weight: 700; }

/* ---------- 4. phiếu báo điểm ---------- */
.rp-sheet { position: relative; width: 21em; max-height: 82cqh; overflow-y: auto; padding: 1.1em 1.2em 1em; background: #fffef7 repeating-linear-gradient(180deg, transparent 0 1.55em, #dbe9f7 1.55em calc(1.55em + 1px)); color: #1f2a44; border-radius: .3em; box-shadow: 0 .6em 1.6em -.4em rgba(0, 0, 0, .35); font-family: 'Be Vietnam Pro', system-ui, sans-serif; font-size: .9em; scrollbar-width: none; }
.rp-sheet::-webkit-scrollbar { display: none; }
.rp-sheet::before { content: ''; position: absolute; left: 2.1em; top: 0; bottom: 0; width: 1px; background: #f4a3a3; }
.rp-head { text-align: center; }
.rp-head small { font-size: .62em; font-weight: 700; letter-spacing: .14em; color: #5c6b8a; }
.rp-head h2 { text-wrap: balance; margin: .15em 0 .3em; font: 800 1.35em/1.2 'Be Vietnam Pro', system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase; color: #1f2a44; }
.rp-info { font-size: .78em; }
.rp-info b { font-family: 'Patrick Hand', cursive; font-size: 1.3em; font-weight: 400; color: #1c3faa; }
.rp-table { width: 100%; margin-top: .7em; border-collapse: collapse; font-size: .82em; }
.rp-table th, .rp-table td { border: 1px solid #b8c4d9; padding: .35em .45em; text-align: left; vertical-align: middle; }
.rp-table th { background: #eef3fb; font-size: .82em; text-transform: uppercase; letter-spacing: .06em; }
.rp-table tr:not(:first-child) { animation: pl-up .4s calc(var(--i) * .1s) both; }
.static .rp-table tr { animation: none; }
.rp-sub { font-weight: 700; }
.rp-score { width: 3.2em; text-align: center !important; font-family: 'Patrick Hand', cursive; font-size: 1.55em; color: #e03131; line-height: 1; }
.rp-score.in { animation: rp-write .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rp-write { from { transform: scale(2) rotate(-12deg); opacity: 0; } }
.rp-note { font-family: 'Patrick Hand', cursive; font-size: 1.12em; color: #1c3faa; line-height: 1.25; }
.rp-conduct { margin: .6em 0 0; font-size: .8em; }
.rp-conduct b { color: #e03131; font-family: 'Patrick Hand', cursive; font-size: 1.3em; font-weight: 400; }
.rp-comment { margin-top: .5em; }
.rp-comment small { font-size: .74em; font-weight: 700; }
.rp-ink { margin: .1em 0 0; min-height: 3em; font-family: 'Patrick Hand', cursive; font-size: 1.18em; line-height: 1.32; color: #e03131; white-space: pre-line; overflow-wrap: anywhere; }
.rp-foot { position: relative; display: flex; justify-content: space-between; gap: 1em; margin-top: .6em; text-align: center; }
.rp-sig { flex: 1; display: flex; flex-direction: column; align-items: center; }
.rp-sig small { font-size: .66em; font-weight: 700; color: #5c6b8a; }
.rp-sign { min-height: 1.4em; font-family: var(--tf); font-weight: 400; font-size: 1.35em; line-height: 1.15; color: #1c3faa; text-wrap: balance; }
.rp-sign.me.in { animation: rp-write .6s ease; }
.rp-stamp { position: absolute; right: -.2em; top: -1.5em; padding: .35em .7em; border: .22em double #e03131; border-radius: .4em; color: #e03131; font: 900 .95em/1 'Be Vietnam Pro', system-ui, sans-serif; letter-spacing: .1em; transform: rotate(-14deg); opacity: 0; mix-blend-mode: multiply; }
.rp-stamp.in, .rp-sheet.done .rp-stamp { opacity: .85; animation: rp-stamp .45s cubic-bezier(.3, 1.6, .5, 1); }
.rp-sheet.done .rp-stamp { animation: none; }
@keyframes rp-stamp { from { transform: rotate(-14deg) scale(2.4); opacity: 0; } }
.rp-btn { opacity: 0; pointer-events: none; transform: translateY(.5em); transition: .4s; }
.rp-btn.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 5. thú cưng ảo ---------- */
.vp-device { width: 17em; padding: 1.6em 1.3em 1.3em; border-radius: 48% 48% 44% 44% / 40% 40% 32% 32%; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent2) 60%, #fff), var(--accent2) 45%, color-mix(in srgb, var(--accent) 50%, var(--accent2))); box-shadow: inset 0 -.6em 1.4em rgba(0, 0, 0, .15), inset 0 .4em .8em rgba(255, 255, 255, .6), 0 1em 2em -.6em rgba(0, 0, 0, .4); display: flex; flex-direction: column; align-items: center; gap: .6em; }
.vp-name { margin: 0; font-size: .82em; text-align: center; color: #2f2a3a; line-height: 1.2; }
.vp-name b { font-family: var(--tf); font-weight: 400; font-size: 1.35em; color: var(--accent-deep, var(--accent)); }
.vp-name small { display: block; font-size: .8em; opacity: .7; }
.vp-screen { width: 100%; padding: .6em .7em .5em; border-radius: .9em; background: #e8f5d8; box-shadow: inset 0 .2em .5em rgba(0, 0, 0, .25), 0 0 0 .35em rgba(0, 0, 0, .12); }
.vp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4em; }
.vp-stat { display: flex; flex-direction: column; gap: .15em; }
.vp-stat small { font-size: .56em; font-weight: 800; color: #3d5a2a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-stat span { height: .45em; border-radius: 1em; background: rgba(61, 90, 42, .2); overflow: hidden; }
.vp-stat i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #74b816, #37b24d); transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.vp-stage { position: relative; height: 9.6em; display: flex; align-items: flex-end; justify-content: center; }
.vp-pet { position: relative; width: 5.2em; height: 4.6em; margin-bottom: .7em; border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--accent2) 55%, #fff) 60%, color-mix(in srgb, var(--accent2) 85%, var(--accent))); box-shadow: inset 0 -.4em .6em rgba(0, 0, 0, .08); animation: vp-idle 2.4s ease-in-out infinite; z-index: 1; }
.static .vp-pet { animation: none; }
@keyframes vp-idle { 50% { transform: scale(1.04, .96) translateY(.1em); } }
.vp-ear { position: absolute; top: -.6em; width: 1.4em; height: 1.6em; border-radius: 50% 50% 20% 20%; background: color-mix(in srgb, var(--accent2) 70%, #fff); }
.vp-ear.l { left: .5em; transform: rotate(-18deg); } .vp-ear.r { right: .5em; transform: rotate(18deg); }
.vp-eye { position: absolute; top: 1.7em; width: .55em; height: .7em; border-radius: 50%; background: #2b2b2b; animation: vp-blink 4s infinite; }
.vp-eye::after { content: ''; position: absolute; left: .12em; top: .1em; width: .2em; height: .2em; border-radius: 50%; background: #fff; }
.vp-eye.l { left: 1.35em; } .vp-eye.r { right: 1.35em; }
@keyframes vp-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.vp-blush { position: absolute; top: 2.55em; width: .8em; height: .4em; border-radius: 50%; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.vp-blush.l { left: .7em; } .vp-blush.r { right: .7em; }
.vp-mouth { position: absolute; left: 50%; top: 2.55em; width: .7em; height: .35em; transform: translateX(-50%); border: .14em solid #2b2b2b; border-top: 0; border-radius: 0 0 1em 1em; }
.vp-crown { position: absolute; left: 50%; top: -1.5em; font-style: normal; transform: translateX(-50%) scale(0); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); }
.vp-crown::before { content: '👑'; font-size: 1.5em; }
.vp-pet.act { animation: vp-hop .6s cubic-bezier(.3, 1.6, .5, 1); }
.vp-pet.food.act .vp-mouth { height: .55em; width: .55em; border: .14em solid #2b2b2b; border-radius: 50%; animation: vp-chew .2s 3; }
@keyframes vp-chew { 50% { transform: translateX(-50%) scaleY(.4); } }
.vp-pet.love.act .vp-eye { height: .2em; top: 1.9em; border-radius: 1em 1em 0 0; background: none; border: .14em solid #2b2b2b; border-bottom: 0; animation: none; }
.vp-pet.love.act .vp-eye::after { display: none; }
.vp-pet.fun.act { animation: vp-jump .8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes vp-hop { 40% { transform: scale(1.12, .88); } 70% { transform: scale(.94, 1.08) translateY(-.4em); } }
@keyframes vp-jump { 40% { transform: translateY(-2.2em) rotate(-10deg); } 70% { transform: translateY(0) scale(1.1, .9); } }
.vp-pet.grown { width: 6.2em; height: 5.4em; transition: width .6s, height .6s; }
.vp-pet.grown .vp-crown { transform: translateX(-50%) scale(1); }
.vp-shadow { position: absolute; bottom: .3em; left: 50%; width: 5em; height: .6em; transform: translateX(-50%); border-radius: 50%; background: rgba(61, 90, 42, .25); }
.vp-bubble { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 13em; margin: 0; padding: .4em .7em; border-radius: .8em; background: #fff; color: #2b2b2b; font-size: .74em; font-weight: 600; line-height: 1.35; text-align: center; box-shadow: 0 .15em .4em rgba(0, 0, 0, .15); z-index: 2; }
.vp-bubble::after { content: ''; position: absolute; left: 50%; bottom: -.35em; width: .7em; height: .7em; background: #fff; transform: translateX(-50%) rotate(45deg); }
.vp-bubble.pop { animation: pl-pop .35s cubic-bezier(.3, 1.8, .5, 1); }
.vp-prop { position: absolute; bottom: 2em; font-size: 1.6em; opacity: 0; pointer-events: none; }
.vp-prop.food.go { animation: vp-food 1s ease-in forwards; }
.vp-prop.love.go { animation: vp-love 1s ease-out forwards; }
.vp-prop.fun.go { animation: vp-ball 1.1s ease-out forwards; }
@keyframes vp-food { 0% { opacity: 1; transform: translate(0, -3.5em); } 70% { opacity: 1; transform: translate(0, -.6em) scale(.8); } 100% { opacity: 0; transform: translate(0, -.6em) scale(.2); } }
@keyframes vp-love { 0% { opacity: 1; transform: translate(-.5em, 0) scale(.5); } 100% { opacity: 0; transform: translate(.6em, -3.5em) scale(1.3); } }
@keyframes vp-ball { 0% { opacity: 1; transform: translate(-3em, 0) rotate(0); } 40% { transform: translate(-.5em, -2.5em) rotate(200deg); } 70% { opacity: 1; transform: translate(1.8em, -.2em) rotate(360deg); } 100% { opacity: 0; transform: translate(3em, -.6em) rotate(420deg); } }
.vp-pad { display: flex; justify-content: center; gap: .7em; }
.vp-btn { display: flex; flex-direction: column; align-items: center; gap: .2em; border: 0; background: none; cursor: pointer; color: var(--ink); padding: 0; }
.vp-ic { display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; font-size: 1.1em; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--accent) 25%, #fff)); box-shadow: 0 .25em 0 color-mix(in srgb, var(--accent) 55%, #000), inset 0 -.2em .3em rgba(0, 0, 0, .1); transition: transform .1s, box-shadow .1s; }
.vp-btn:active .vp-ic { transform: translateY(.2em); box-shadow: 0 .05em 0 color-mix(in srgb, var(--accent) 55%, #000); }
.vp-btn small { font-size: .62em; font-weight: 800; }

/* ---------- 6. máy tính cổ "TimOS" ---------- */
.rt-monitor { position: relative; width: 21em; padding: 1em 1em 1.6em; border-radius: 1em 1em 1.2em 1.2em; background: linear-gradient(180deg, #e9e4d8, #cfc8b6); box-shadow: inset 0 .2em 0 rgba(255, 255, 255, .7), inset 0 -.3em .6em rgba(0, 0, 0, .15), 0 1em 2em -.6em rgba(0, 0, 0, .45); }
.rt-led { position: absolute; right: 1.4em; bottom: .6em; width: .45em; height: .45em; border-radius: 50%; background: #51cf66; box-shadow: 0 0 .4em #51cf66; }
.rt-screen { position: relative; height: 15.5em; overflow: hidden; border-radius: .5em; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 55%, #0b7285), color-mix(in srgb, var(--accent) 35%, #073b4c)); box-shadow: inset 0 0 1.5em rgba(0, 0, 0, .55); font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
.rt-screen::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 3px); pointer-events: none; z-index: 9; }
.rt-icons { position: absolute; left: .4em; top: .4em; display: flex; flex-direction: column; gap: .3em; }
.rt-ico { display: flex; flex-direction: column; align-items: center; width: 3.4em; color: #fff; text-shadow: 0 .05em .1em #000; }
.rt-ico span { font-size: 1.3em; }
.rt-ico small { font-size: .56em; }
.rt-desk { position: absolute; inset: 0 0 1.6em 0; display: grid; place-items: center; }
.rt-task { position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; display: flex; align-items: center; justify-content: space-between; padding: 0 .3em; background: #c0c0c0; box-shadow: inset 0 .08em 0 #fff; font-size: .7em; }
.rt-start { padding: .1em .5em; font-weight: 700; background: #c0c0c0; box-shadow: inset -.08em -.08em 0 #404040, inset .08em .08em 0 #fff; }
.rt-start::before { content: '♥ '; color: #e03131; }
.rt-clock { padding: .1em .5em; box-shadow: inset .08em .08em 0 #808080, inset -.08em -.08em 0 #fff; }
.rt-win { position: absolute; width: 14em; max-width: 92%; background: #c0c0c0; color: #111; box-shadow: inset -.1em -.1em 0 #404040, inset .1em .1em 0 #fff, .25em .25em 0 rgba(0, 0, 0, .3); font-size: .82em; animation: rt-in .22s steps(3) both; }
.rt-win.out { animation: rt-in .2s steps(2) reverse forwards; }
@keyframes rt-in { from { transform: scale(.4); opacity: 0; } }
.rt-pop { left: calc(50% - 7em + var(--ox, 0%)); top: calc(30% + var(--oy, 0%)); }
.rt-title { display: flex; align-items: center; justify-content: space-between; gap: .4em; padding: .2em .25em .2em .45em; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, #000080), color-mix(in srgb, var(--accent) 40%, #1084d0)); color: #fff; font-weight: 700; font-size: .9em; }
.rt-title span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rt-x { width: 1.2em; height: 1.1em; display: grid; place-items: center; font-style: normal; background: #c0c0c0; color: #111; box-shadow: inset -.08em -.08em 0 #404040, inset .08em .08em 0 #fff; cursor: pointer; line-height: 1; }
.rt-body { padding: .7em .7em .6em; }
.rt-msg { display: flex; gap: .6em; align-items: flex-start; }
.rt-warn { font-size: 1.5em; line-height: 1; }
.rt-msg p { margin: 0; font-size: .92em; line-height: 1.35; }
.rt-btns { display: flex; justify-content: center; gap: .6em; margin-top: .7em; }
.rt-b { min-width: 4.6em; padding: .25em .7em; border: 0; background: #c0c0c0; color: #111; font: inherit; font-size: .9em; cursor: pointer; box-shadow: inset -.1em -.1em 0 #404040, inset .1em .1em 0 #fff, 0 0 0 .08em #111; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.rt-b:active { box-shadow: inset .1em .1em 0 #404040, inset -.1em -.1em 0 #fff, 0 0 0 .08em #111; }
.rt-load { left: calc(50% - 7em); top: 35%; }
.rt-load p { margin: 0 0 .5em; font-size: .9em; }
.rt-prog { height: 1em; padding: .12em; background: #fff; box-shadow: inset .08em .08em 0 #808080, inset -.08em -.08em 0 #fff; }
.rt-prog i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, #000080) 0 .6em, transparent .6em .75em); transition: width .2s steps(4); }
.rt-load small { display: block; margin-top: .3em; font-size: .78em; }
.rt-note { left: 6%; right: 6%; top: 5%; bottom: 6%; width: auto; max-width: none; display: flex; flex-direction: column; }
.rt-note .rt-body { flex: 1; min-height: 0; padding: .15em; }
.rt-text { height: 100%; overflow-y: auto; padding: .5em .6em; background: #fff; box-shadow: inset .08em .08em 0 #808080, inset -.08em -.08em 0 #fff; scrollbar-width: thin; }
.rt-text b { display: block; font-size: 1.05em; margin-bottom: .3em; color: var(--accent-deep, var(--accent)); }
.rt-text p { margin: 0; font-size: .9em; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.rt-text p:not(.end)::after { content: '▌'; animation: pl-blink 1s steps(1) infinite; }
.rt-from { display: block; margin-top: .5em; text-align: right; font-size: .9em; }
