/* SayMê Piano – trang công khai saymepiano.com. Màu lấy từ bộ nhận diện (docs/thuong-hieu/saymepiano, trang 05).
 * Font Quicksand tự lưu (fonts/). Không letter-spacing. Không để một chữ đứng lẻ ở dòng cuối (text-wrap + chu-khong-le.js). */
@font-face { font-family: "Quicksand"; src: url("/fonts/Quicksand-Medium.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/fonts/Quicksand-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/fonts/Quicksand-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

:root {
  --tim: #2A0A7E;        /* Tím Đêm – chữ tiêu đề, nền tối */
  --tim-khoi: #5B2BC4;   /* Tím Khối – nút phụ, điểm nhấn */
  --hong: #FF5FAE;       /* Hồng Say Mê – nút chính */
  --hong-day: #D9408F;   /* đáy 3D của nút chính */
  --hong-kem: #FFE3E6;
  --vang: #FFC928;
  --cam: #FF8A00;
  --ngoc: #22AEFF;
  --troi: #DCE8FF;
  --oai: #F1E9FF;
  --chu: #2A0A7E;
  --chu-phu: #5E5885;
  --vien: #E6DEF3;
  --nen: #FFFFFF;
  --do: #F0503C; --re: #FF9A2E; --mi: #FFD23F; --fa: #36C26B; --sol: #2F9BFF; --la: #5B5BE6; --si: #C25BE6;
  --bo: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--nen); color: var(--chu);
  font: 500 17px/1.6 "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  text-wrap: pretty;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--tim-khoi); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(91, 43, 196, .45); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3, .nut, .dai li, .the-chu, .nho-gon { text-wrap: balance; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.2; }
.vung { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .vung { padding: 0 32px; } }
.an { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- đầu trang ---------- */
.dau { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid #F2EDF9; }
.dau .vung { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.dau .logo img { display: block; width: 150px; height: auto; }
.dau-phai { display: flex; align-items: center; gap: 10px; }
.dau-phai .nut { width: auto; padding: 9px 16px; font-size: 15px; border-bottom-width: 3px; }
@media (max-width: 420px) { .dau-phai .an-dt { display: none; } }

/* ---------- nút: một hệ duy nhất, viền đáy 3D ---------- */
.nut {
  display: block; width: 100%; max-width: 340px; margin: 0; padding: 14px 22px;
  border: 2px solid transparent; border-bottom-width: 5px; border-radius: 16px;
  font: 700 17px/1.25 "Quicksand", system-ui, sans-serif; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, border-bottom-width .08s ease, filter .15s ease;
}
.nut:hover { filter: brightness(1.04); }
.nut:active { transform: translateY(3px); border-bottom-width: 2px; }
.nut-chinh { background: var(--hong); color: #fff; border-color: var(--hong); border-bottom-color: var(--hong-day); }
.nut-phu { background: #fff; color: var(--tim-khoi); border-color: var(--vien); }
.nut-phu:hover { background: #FBF8FF; filter: none; }
.nut-tim { background: var(--tim-khoi); color: #fff; border-color: var(--tim-khoi); border-bottom-color: #3E1A93; }
.nut-trang { background: #fff; color: var(--tim); border-color: #fff; border-bottom-color: #D9CCF2; }
.nut[aria-disabled="true"] { background: #F4F1FA; color: #8C86A8; border-color: #ECE7F5; cursor: default; pointer-events: none; }
.cap-nut { display: grid; gap: 14px; width: 100%; max-width: 340px; }

/* ---------- mở đầu ---------- */
.mo-dau { padding: 28px 0 40px; }
.mo-dau .vung { display: grid; gap: 28px; align-items: center; justify-items: center; }
@media (min-width: 900px) {
  .mo-dau { padding: 56px 0 72px; }
  .mo-dau .vung { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}
.mo-dau-chu { display: grid; gap: 26px; justify-items: center; text-align: center; max-width: 520px; }
.mo-dau h1 { font-size: clamp(28px, 6.4vw, 40px); }
.mo-dau .phu { margin: -10px 0 0; color: var(--chu-phu); font-size: 18px; }

/* cụm nhân vật – 7 bạn nốt nhạc và Mèo ABC quây quanh vầng sáng */
.cum { position: relative; width: min(100%, 540px); aspect-ratio: 1 / .86; }
.cum::before {
  content: ""; position: absolute; inset: 6% 4% 2%; border-radius: 50%;
  background: radial-gradient(closest-side, #FFE3EF 0%, #F6E9FF 55%, rgba(241, 233, 255, 0) 100%);
}
.cum img { position: absolute; width: var(--w); left: var(--x); top: var(--y); z-index: var(--z, 1); filter: drop-shadow(0 10px 14px rgba(42, 10, 126, .12)); }
.cum img:nth-child(odd) { animation: nhun 4.2s ease-in-out infinite; }
.cum img:nth-child(even) { animation: nhun 4.8s ease-in-out -1.3s infinite; }
@keyframes nhun { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .cum img { animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- dải nội dung ---------- */
.dai { border-top: 2px solid #F2EDF9; border-bottom: 2px solid #F2EDF9; padding: 14px 0; }
.dai ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.dai li { white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; font-weight: 700; color: var(--chu-phu); font-size: 15px; }
.dai li svg { width: 24px; height: 32px; fill: var(--k); flex: none; }
@media (min-width: 900px) { .dai ul { justify-content: space-between; } .dai li { font-size: 16px; } }

/* ---------- các phần tính năng (so le trái/phải) ---------- */
.tinh-nang { padding: 56px 0; overflow-x: clip; }
.tinh-nang + .tinh-nang { border-top: 2px solid #F6F2FB; }
.tinh-nang .vung { display: grid; gap: 32px; align-items: center; }
.tn-chu { max-width: 460px; justify-self: center; text-align: center; }
.tn-chu h2 { font-size: clamp(26px, 5.4vw, 40px); color: var(--k, var(--hong)); }
.tn-chu p { margin: 14px 0 0; color: var(--chu-phu); font-size: 18px; }
.tn-chu .ghi { font-size: 15px; margin-top: 12px; }
.tn-hinh { justify-self: center; width: min(100%, 440px); margin-top: 44px; }
@media (min-width: 900px) { .tn-hinh { margin-top: 0; } }
@media (min-width: 900px) {
  .tinh-nang { padding: 88px 0; }
  .tinh-nang .vung { grid-template-columns: 1fr 1fr; gap: 64px; }
  .tn-chu { text-align: left; justify-self: start; }
  .tinh-nang.dao .tn-hinh { order: -1; }
  .tinh-nang.dao .tn-chu { justify-self: end; }
}

/* thẻ minh hoạ dùng chung */
.the { position: relative; background: #fff; border: 2px solid var(--vien); border-bottom-width: 5px; border-radius: 24px; padding: 20px; }
.the-tieu { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; font-size: 17px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--oai); color: var(--tim-khoi); white-space: nowrap; }
.chip .cham { width: 8px; height: 8px; border-radius: 50%; background: var(--fa); }
.nv-goc { position: absolute; width: 130px; z-index: 2; filter: drop-shadow(0 8px 12px rgba(42, 10, 126, .15)); }
@media (max-width: 520px) { .nv-goc { width: 96px; } .gia .nv-goc, .midi .nv-goc { right: -8px !important; } .duong .nv-goc { left: -8px !important; } .bao-cao .nv-goc { left: -8px !important; } }

/* 1 · miễn phí */
.gia { text-align: center; padding: 26px 20px 22px; }
.gia .so { font-size: 64px; font-weight: 800; line-height: 1; color: var(--tim); margin: 10px 0 4px; }
.gia .so small { font-size: 26px; }
.gia ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.gia li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.gia li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--fa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.gia .nv-goc { right: -26px; top: -54px; }

/* 2 · đường học */
.duong { padding: 24px 20px 28px; background: linear-gradient(180deg, #F3FFF6 0%, #fff 100%); }
.duong-nut { display: grid; justify-items: center; gap: 18px; margin-top: 30px; }
.nut-bai { position: relative; width: 74px; height: 66px; border-radius: 50%; background: var(--k); box-shadow: 0 7px 0 var(--kd); display: grid; place-items: center; transform: translateX(var(--lech, 0)); }
.nut-bai svg { width: 26px; height: 34px; fill: #fff; }
.nut-bai .sao { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; }
.nut-bai .sao i { width: 16px; height: 16px; background: var(--vang); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.nut-bai .sao i.tat { background: #E7E1F1; }
.nut-bai.khoa { background: #E9E4F2; box-shadow: 0 7px 0 #D3CCE3; }
.nut-bai.khoa svg { fill: #B7AECB; }
.bong-noi { position: relative; justify-self: center; transform: translateX(var(--lech, 0)); background: #fff; border: 2px solid var(--vien); border-radius: 14px; padding: 6px 14px; font-weight: 800; color: var(--fa); font-size: 15px; }
.bong-noi::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: #fff; border-right: 2px solid var(--vien); border-bottom: 2px solid var(--vien); transform: translateX(-50%) rotate(45deg); }
.duong .nv-goc { left: -20px; bottom: 14px; }

/* 3 · đàn MIDI */
.midi { padding: 18px 18px 20px; }
.khuong { display: block; width: 100%; height: auto; margin: 14px 0 6px; }
.ban-phim { position: relative; display: flex; height: 112px; margin-top: 8px; border-radius: 10px 10px 14px 14px; overflow: hidden; background: #1B0B4A; padding: 6px 6px 8px; gap: 3px; }
.ban-phim .tr { flex: 1; background: #fff; border-radius: 0 0 7px 7px; box-shadow: inset 0 -5px 0 #E5E0EF; }
.ban-phim .tr.sang { background: var(--k); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .14); }
.ban-phim .den { position: absolute; top: 6px; width: 6.4%; height: 58%; background: #1B0B4A; border-radius: 0 0 5px 5px; }
.midi .nv-goc { right: -24px; top: -100px; width: 112px; }

/* 4 · xếp hạng */
.bxh { padding: 18px 16px 12px; }
.bxh ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.bxh li { display: grid; grid-template-columns: 28px 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; font-weight: 700; }
.bxh li.toi { background: #FFF4D6; }
.bxh .hang { text-align: center; font-weight: 800; color: var(--chu-phu); }
.bxh li:first-child .hang { color: var(--cam); }
.bxh .anh { width: 44px; height: 44px; border-radius: 50%; background: var(--k); overflow: hidden; }
.bxh .anh img { width: 64px; max-width: none; margin: -4px 0 0 -10px; }
.bxh .ten small { display: block; font-size: 13px; color: var(--chu-phu); font-weight: 600; }
.bxh .diem { color: var(--tim-khoi); font-weight: 800; }
.mua { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* 5 · phụ huynh */
.bao-cao { padding: 20px; }
.so-lieu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.so-lieu div { border: 2px solid var(--vien); border-radius: 16px; padding: 10px 6px; text-align: center; font-size: 13px; color: var(--chu-phu); font-weight: 600; }
.so-lieu b { display: block; font-size: 22px; color: var(--k); font-weight: 800; }
.cot { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 18px; padding: 0 4px; }
.cot div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; font-weight: 700; color: var(--chu-phu); }
.cot span { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: var(--k); height: var(--h); }
.cot .nghi span { background: #ECE7F5; }
.loi-khen { margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: #F3FFF6; color: #17763C; font-weight: 700; font-size: 15px; }
.bao-cao .nv-goc { left: -30px; top: -64px; }

/* ---------- dải kêu gọi cuối ---------- */
.ket {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding: 64px 0 0;
  background: radial-gradient(60% 70% at 15% 10%, rgba(255, 95, 174, .35), transparent 70%),
              radial-gradient(50% 60% at 90% 30%, rgba(34, 174, 255, .28), transparent 70%),
              linear-gradient(160deg, #3A12A0 0%, var(--tim) 70%);
}
.ket h2 { font-size: clamp(28px, 6vw, 46px); max-width: 16em; margin: 0 auto; }
.ket p { margin: 12px auto 26px; max-width: 30em; color: #E5DCFF; font-size: 18px; }
.ket .nut { margin: 0 auto; }
.ket-hang { display: flex; justify-content: center; align-items: flex-end; gap: 0; margin-top: 36px; }
.ket-hang img { width: clamp(46px, 14vw, 132px); margin: 0 -6px -10px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .3)); }

/* ---------- chân trang ---------- */
.chan { background: #1C0659; color: #D9D1F2; padding: 44px 0 36px; font-size: 15px; }
.chan .vung { display: grid; gap: 28px; }
@media (min-width: 720px) { .chan .vung { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.chan img { width: 140px; display: block; }
.chan h3 { font-size: 16px; color: #fff; margin-bottom: 10px; }
.chan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chan a { color: #fff; text-decoration: none; }
.chan a:hover { text-decoration: underline; }
.chan .cuoi a { white-space: nowrap; }
.chan .cuoi { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 20px; margin: 0; color: #B8ADE0; font-size: 14px; }

/* ---------- trang đăng ký / chào mừng ---------- */
.trang-hep { padding: 32px 0 56px; }
.trang-hep .vung { display: grid; justify-items: center; gap: 22px; text-align: center; max-width: 560px; }
.trang-hep h1 { font-size: clamp(26px, 6vw, 34px); }
.trang-hep .phu { margin: -6px 0 0; color: var(--chu-phu); font-size: 17px; }
.nv-dau { width: 150px; filter: drop-shadow(0 10px 14px rgba(42, 10, 126, .14)); }
.o-google { min-height: 48px; display: grid; place-items: center; }
.trang-thai { min-height: 26px; margin: 0; font-weight: 700; color: var(--chu-phu); }
.trang-thai.loi { color: #C2264B; }
.xoay { display: inline-block; animation: xoay 1.1s linear infinite; color: var(--hong); margin-right: 6px; }
@keyframes xoay { to { transform: rotate(360deg); } }
.luat { font-size: 14px; color: var(--chu-phu); max-width: 26em; margin: 0; }
.buoc { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; width: 100%; text-align: left; counter-reset: b; }
.buoc > li { counter-increment: b; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.buoc > li::before { content: counter(b); width: 40px; height: 40px; border-radius: 50%; background: var(--oai); color: var(--tim-khoi); font-weight: 800; font-size: 18px; display: grid; place-items: center; }
.buoc h2 { font-size: 18px; margin-top: 7px; }
.buoc p { margin: 4px 0 0; color: var(--chu-phu); font-size: 15px; }
.buoc .nut { margin-top: 12px; max-width: 300px; }
.buoc .nho-gon { font-size: 13px; margin-top: 8px; }
.the-iphone { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; }
.the-iphone img { width: 64px; flex: none; }
.the-iphone p { margin: 2px 0 0; color: var(--chu-phu); font-size: 15px; }
.beta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #F3FFF6; color: #17763C; font-weight: 700; font-size: 15px; }

/* ---------- văn bản pháp lý ---------- */
.van-ban { max-width: 780px; margin: 0 auto; padding: 32px 16px 56px; }
.van-ban h1 { font-size: clamp(26px, 5vw, 36px); margin: 8px 0 6px; }
.van-ban h2 { font-size: 21px; margin: 32px 0 8px; color: var(--tim-khoi); }
.van-ban .meta { color: var(--chu-phu); margin: 0 0 20px; }
.van-ban .ve { font-weight: 700; text-decoration: none; }
.van-ban li { margin: 6px 0; }
.trang-thai:empty { display: none; }
