/* Phông chính: Andika (miễn phí, chữ a và g một nét như Sassoon Infant, dành cho bé tập đọc). Baloo 2/Nunito là phông dự phòng. */
@font-face { font-family: "Andika"; src: url(fonts/andika-vi-400.woff2) format("woff2"); font-weight: 400; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Andika"; src: url(fonts/andika-lx-400.woff2) format("woff2"); font-weight: 400; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Andika"; src: url(fonts/andika-la-400.woff2) format("woff2"); font-weight: 400; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Andika"; src: url(fonts/andika-vi-700.woff2) format("woff2"); font-weight: 700; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Andika"; src: url(fonts/andika-lx-700.woff2) format("woff2"); font-weight: 700; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Andika"; src: url(fonts/andika-la-700.woff2) format("woff2"); font-weight: 700; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


/* Giao diện tươi vui cho bé: đỏ đô (rượu vang tươi) làm màu chính, hồng kem làm nền, điểm nhấn vàng nắng, xanh bạc hà, xanh trời.
   Phông tròn dễ thương: Baloo 2 (tiêu đề) + Nunito (nội dung), đều có tiếng Việt, lưu sẵn trong web. */
@font-face { font-family: "Baloo 2"; src: url(fonts/baloo-vi.woff2) format("woff2"); font-weight: 400 800; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Baloo 2"; src: url(fonts/baloo-lx.woff2) format("woff2"); font-weight: 400 800; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; src: url(fonts/baloo-la.woff2) format("woff2"); font-weight: 400 800; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; src: url(fonts/nunito-vi.woff2) format("woff2"); font-weight: 200 1000; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Nunito"; src: url(fonts/nunito-lx.woff2) format("woff2"); font-weight: 200 1000; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; src: url(fonts/nunito-la.woff2) format("woff2"); font-weight: 200 1000; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --wine: #A5193F; --wine-deep: #7A1130; --wine-soft: #F7D9E0;
  --blush: #FFF3F0; --card: #FFFFFF; --ink: #4A1424; --muted: #7C5560; --line: #F0D6DB;
  --sun: #FFC83D; --mint: #7DD3B5; --sky: #9AD5F6; --peach: #FFB9A8;
  --head: "Andika", "Baloo 2", system-ui, sans-serif; --body: "Andika", "Nunito", system-ui, sans-serif;
  /* tương thích tên cũ */
  --wood: var(--wine); --sprout: var(--mint); --cream: var(--blush); --white: #fff; --soft: #FFF9F7;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--ink); font-family: var(--body); font-weight: 600; font-size: 17px; line-height: 1.45; }
body {
  min-height: 100vh; padding-bottom: 48px; background-color: var(--blush);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g opacity='.55'><path d='M30 40l4 9 10 1-8 7 3 10-9-6-9 6 3-10-8-7 10-1z' fill='%23FFD978'/><circle cx='150' cy='34' r='7' fill='%23F7C4CE'/><circle cx='190' cy='110' r='5' fill='%23B9E6D6'/><path d='M120 150c0-10 8-14 15-12 3-8 16-8 19 1 9-1 14 11 6 17h-37c-5 0-7-3-3-6z' fill='%23D8EEFB'/><circle cx='42' cy='168' r='6' fill='%23FFD2C7'/><path d='M80 90l3 7 8 1-6 5 2 8-7-5-7 5 2-8-6-5 8-1z' fill='%23F7C4CE'/><circle cx='200' cy='190' r='5' fill='%23FFD978'/></g></svg>");
  background-size: 220px 220px;
}
#app { max-width: 720px; margin: 0 auto; padding: 14px 16px; }
h1, h2, h3 { margin: 0 0 8px; font-family: var(--head); font-weight: 800; color: var(--wine); line-height: 1.15; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 19px; }
.bar { display: block; width: 72px; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--sun), var(--peach)); margin: 6px 0 16px; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brand { font-family: var(--head); font-weight: 800; font-size: 22px; color: var(--wine); display: flex; align-items: center; gap: 6px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.spacer { flex: 1; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 16px; margin: 12px 0; box-shadow: 0 4px 0 var(--line); }
.card.wood { background: var(--wine); color: #fff; border-color: var(--wine-deep); box-shadow: 0 5px 0 var(--wine-deep); }
.card.wood h2, .card.wood h3 { color: #fff; }
.muted { color: var(--muted); font-size: 15px; font-weight: 600; }
.btn { appearance: none; border: 0; border-radius: 18px; background: var(--wine); color: #fff; font: 800 18px var(--head); padding: 12px 20px; min-height: 50px; cursor: pointer; box-shadow: 0 5px 0 var(--wine-deep); text-decoration: none; display: inline-block; text-align: center; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wine-deep); }
.btn.ghost { background: #fff; color: var(--wine); border: 2px solid var(--wine); box-shadow: 0 4px 0 var(--wine-soft); }
.btn.small { padding: 7px 13px; min-height: 40px; font-size: 16px; border-radius: 14px; box-shadow: 0 3px 0 var(--wine-deep); }
.btn.ghost.small { box-shadow: 0 3px 0 var(--wine-soft); }
.btn.block { display: block; width: 100%; }
.btn[disabled] { opacity: .45; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.big { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; min-height: 120px; border-radius: 26px; border: 3px solid var(--wine); background: #fff; color: var(--wine); font: 800 22px var(--head); padding: 12px; cursor: pointer; box-shadow: 0 6px 0 var(--wine-soft); text-decoration: none; transition: transform .08s; }
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--wine-soft); }
.big.wood { background: var(--wine); color: #fff; border-color: var(--wine-deep); box-shadow: 0 6px 0 var(--wine-deep); }
.big .emo { font-size: 44px; line-height: 1; }
.big.c1 { border-color: var(--sun); box-shadow: 0 6px 0 #F2DDA0; } .big.c2 { border-color: var(--mint); box-shadow: 0 6px 0 #C3EADB; } .big.c3 { border-color: var(--sky); box-shadow: 0 6px 0 #CDE9F9; } .big.c4 { border-color: var(--peach); box-shadow: 0 6px 0 #FFDCD3; }
input, select, textarea { width: 100%; font: 700 17px var(--body); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 11px 12px; min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--wine); }
textarea { min-height: 90px; }
label { display: block; font-weight: 800; margin: 10px 0 4px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; margin: 4px 0; }
.tab { flex: none; border: 2px solid var(--wine); background: #fff; color: var(--wine); border-radius: 999px; padding: 8px 15px; font: 800 16px var(--head); cursor: pointer; text-decoration: none; }
.tab.on { background: var(--wine); color: #fff; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 800; background: var(--mint); color: var(--ink); }
.pill.warn { background: var(--sun); } .pill.gray { background: var(--line); }
.chip { display: inline-block; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 14px; padding: 6px 12px; font: 800 18px var(--head); cursor: pointer; min-width: 46px; }
.chip.on { background: var(--wine); color: #fff; border-color: var(--wine); }
.chip.grp { border-color: var(--sun); background: #FFF6DC; }
.chip.grp.on { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.code { flex: 1; min-width: 56px; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 4px; font: 800 16px var(--head); cursor: pointer; min-height: 46px; }
.code.on { background: var(--wine); color: #fff; border-color: var(--wine); }
.code.hw.on { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.stu { border-top: 2px dashed var(--line); padding: 10px 0; }
.stu:first-child { border-top: 0; }
.stu .nm { font-family: var(--head); font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.stars { display: flex; gap: 6px; font-size: 36px; }
.stars .s { opacity: .3; filter: grayscale(1); }
.stars .s.on { opacity: 1; filter: none; animation: pop .4s; }
@keyframes pop { 0% { transform: scale(.3) rotate(-20deg); } 70% { transform: scale(1.3) rotate(8deg); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.gift { display: flex; gap: 14px; align-items: center; }
.gift .pic { flex: none; width: 96px; height: 96px; border-radius: 22px; background: var(--blush); border: 3px dashed var(--peach); display: flex; align-items: center; justify-content: center; font-size: 56px; overflow: hidden; animation: bob 3s ease-in-out infinite; }
.gift .pic img { width: 100%; height: 100%; object-fit: cover; }
.meter { display: flex; gap: 5px; margin-top: 8px; }
.meter b { flex: 1; height: 14px; border-radius: 8px; background: rgba(255, 255, 255, .3); }
.meter b.on { background: var(--sun); }
.opts { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.opt { display: block; width: 100%; text-align: center; border: 3px solid var(--wine); background: #fff; color: var(--wine); border-radius: 26px; font: 800 46px var(--head); padding: 14px 8px; margin: 0; cursor: pointer; min-height: 94px; box-shadow: 0 6px 0 var(--wine-soft); transition: transform .08s; }
.opt:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--wine-soft); }
.opt.good { background: var(--mint); border-color: #4DB894; color: var(--ink); box-shadow: 0 6px 0 #B7E4D3; animation: pop .4s; }
.opt.bad { opacity: .35; animation: shake .3s; }
.say { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 100px; border-radius: 28px; border: 0; background: var(--wine); color: #fff; font: 800 28px var(--head); cursor: pointer; box-shadow: 0 7px 0 var(--wine-deep); }
.say:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--wine-deep); }
.say .ear { font-size: 40px; }
.word { text-align: center; font: 800 56px var(--head); letter-spacing: 6px; margin: 16px 0; color: var(--wine); }
.slots { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.slot { width: 78px; height: 90px; border: 3px dashed var(--wine); border-radius: 20px; display: flex; align-items: center; justify-content: center; font: 800 42px var(--head); color: var(--wine); background: #fff; }
.slot.full { border-style: solid; background: var(--wine-soft); }
.tiles { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.tile { min-width: 78px; height: 78px; border-radius: 22px; background: var(--wine); color: #fff; font: 800 40px var(--head); border: 0; cursor: pointer; box-shadow: 0 6px 0 var(--wine-deep); }
.tile:nth-child(3n+2) { background: #D1456B; box-shadow: 0 6px 0 #9E2447; } .tile:nth-child(3n) { background: #C2306A; box-shadow: 0 6px 0 #8D1B4C; }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--wine-deep); }
.tile.used { opacity: .2; }
.prog { height: 16px; border-radius: 12px; background: #fff; border: 2px solid var(--line); margin: 6px 0 14px; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--peach)); border-radius: 10px; transition: width .4s; }
video { width: 100%; border-radius: 22px; background: #000; max-height: 60vh; }
.vtext { font: 800 42px var(--head); text-align: center; color: var(--wine); margin: 12px 0; }
.vtext.small { font: 700 26px var(--body); text-align: left; white-space: pre-wrap; color: var(--ink); }
.join { display: flex; justify-content: center; gap: 6px; font: 800 54px var(--head); color: var(--wine); min-height: 72px; align-items: center; }
.join span { transition: all .4s; padding: 0 8px; border-radius: 14px; }
.join span.hl { background: var(--sun); color: var(--ink); }
.big-msg { text-align: center; padding: 14px 0; }
.big-msg .emo { font-size: 72px; }
.mascot { display: block; margin: 0 auto; animation: bob 2.6s ease-in-out infinite; }
.hero { background: var(--wine); color: #fff; border-radius: 30px; padding: 18px 18px 0; margin: 6px 0 14px; position: relative; overflow: hidden; box-shadow: 0 6px 0 var(--wine-deep); }
.hero h1 { color: #fff; margin: 0; }
.hero p { margin: 4px 0 12px; font-weight: 700; opacity: .95; }
.hero .deco { position: absolute; inset: 0; pointer-events: none; opacity: .22; }
.hero .row { align-items: flex-end; flex-wrap: nowrap; gap: 8px; }
.hero .row > div:first-child { flex: 1; padding-bottom: 16px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--wine-deep); color: #fff; padding: 12px 18px; border-radius: 16px; z-index: 50; max-width: 90vw; font-weight: 800; }
.modal { position: fixed; inset: 0; background: rgba(74, 20, 36, .55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal > div { background: var(--blush); width: 100%; max-width: 720px; max-height: 88vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--soft); }
.scroll { overflow-x: auto; }
.sndbtn { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 560px) { .opts.three { grid-template-columns: 1fr 1fr 1fr; } }
