/* CSS dùng chung cho mọi trang bán (index.html + OTO). */
:root {
  --ink: #2b2d42; --night: #1b1638; --night2: #251d4d; --paper: #fff8e7; --gold: #ffd23f; --pink: #ff5d8f;
  --teal: #2ec4b6; --red: #e63946; --muted: #6c6f86; --line: #e8dfc8;
}
@font-face { font-family: Fredoka; src: url(fonts/Fredoka-SemiBold.ttf); font-weight: 300 650; font-display: swap; }
@font-face { font-family: Fredoka; src: url(fonts/Fredoka-Bold.ttf); font-weight: 651 900; font-display: swap; }
@font-face { font-family: Andika; src: url(fonts/Andika-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Andika; src: url(fonts/Andika-Bold.ttf); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; margin: 0; font-family: Andika, 'Trebuchet MS', sans-serif; color: var(--ink); background: var(--paper); font-size: 18px; line-height: 1.6; }
h1, h2, h3, .f { font-family: Fredoka, 'Trebuchet MS', sans-serif; line-height: 1.15; }
h1 { font-size: clamp(34px, 5.4vw, 60px); margin: 0 0 18px; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 22px; margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 14px; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; }
section { padding: 84px 0; position: relative; }
.center { text-align: center; }
.dark { background: var(--night); color: #f4f1ff; }
.dark2 { background: var(--night2); color: #f4f1ff; }
.dark .muted, .dark2 .muted { color: #b9b2df; }
.muted { color: var(--muted); }
.hl { background: linear-gradient(transparent 58%, rgba(255, 210, 63, .75) 58%); padding: 0 4px; }
.dark .hl, .dark2 .hl { background: none; color: var(--gold); padding: 0; }
.tag { display: inline-block; font-family: Fredoka, sans-serif; font-weight: 700; letter-spacing: 2px; font-size: 13px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; background: var(--pink); color: #fff; margin-bottom: 18px; }
.tag.gold { background: var(--gold); color: var(--ink); }
.tag.teal { background: var(--teal); color: #08302c; }

/* ---------- thanh "manh mối" dính trên cùng ---------- */
.casebar { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; font-family: Fredoka, sans-serif; font-size: 15px; }
.casebar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; }
.casebar .dots { display: flex; gap: 6px; align-items: center; }
.casebar .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed #6b6a8a; display: grid; place-items: center; font-size: 12px; transition: .3s; }
.casebar .dot.on { border: 2px solid var(--gold); background: var(--gold); color: var(--ink); transform: scale(1.12); }
.casebar .cta-mini { background: var(--gold); color: var(--ink); text-decoration: none; padding: 7px 14px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) { .casebar .label { display: none; } .casebar { font-size: 14px; } }

/* ---------- nút mua ---------- */
.btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; background: linear-gradient(180deg, #ffde59, #ffc21a); color: var(--ink); font-family: Fredoka, sans-serif; font-weight: 700; font-size: 24px; padding: 18px 38px; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn small { font-size: 14px; font-weight: 600; opacity: .8; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.trust { font-size: 14px; margin-top: 14px; opacity: .85; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 90px; overflow: hidden; background: radial-gradient(circle at 80% 20%, #3b2a7a 0, var(--night) 55%); }
.hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero .stamp { font-family: Fredoka, sans-serif; display: inline-block; border: 3px solid var(--red); color: #ff8a93; padding: 4px 14px; transform: rotate(-4deg); letter-spacing: 3px; font-weight: 700; margin-bottom: 20px; border-radius: 6px; }
.hero p.lead { font-size: 21px; color: #ded8ff; }
.fan { position: relative; height: 520px; }
.fan .cv { position: absolute; width: 58%; aspect-ratio: 612/792; border-radius: 8px; box-shadow: 0 18px 40px rgba(0,0,0,.45); background: #fff; overflow: hidden; transition: transform .35s; }
.fan .cv object { width: 100%; height: 100%; display: block; pointer-events: none; }
.fan .c1 { left: 0; top: 40px; transform: rotate(-9deg); }
.fan .c2 { left: 21%; top: 0; z-index: 2; transform: rotate(2deg); }
.fan .c3 { left: 42%; top: 56px; transform: rotate(10deg); }
.fan:hover .c1 { transform: rotate(-13deg) translateX(-14px); }
.fan:hover .c3 { transform: rotate(14deg) translateX(14px); }
@media (max-width: 860px) { .hero .grid { grid-template-columns: 1fr; } .fan { height: 420px; max-width: 520px; margin: 0 auto; width: 100%; } }
@media (max-width: 480px) { .fan { height: 330px; } }

/* ---------- chữ bị bôi đen (chạm để xem) ---------- */
.redact { background: var(--ink); color: transparent; border-radius: 3px; padding: 0 4px; cursor: pointer; transition: .4s; user-select: none; }
.dark .redact, .dark2 .redact { background: #f4f1ff; }
.redact.open { background: transparent !important; color: inherit; }
.redact:not(.open)::after { content: ' 👆 tap'; color: var(--gold); font-family: Fredoka, sans-serif; font-size: 14px; font-weight: 700; background: var(--ink); padding: 0 6px; border-radius: 6px; margin-left: 4px; }

/* ---------- vụ án chơi thử ---------- */
.casefile { background: #f3e2b8; border: 3px solid var(--ink); border-radius: 18px; padding: 28px; box-shadow: 0 10px 0 rgba(0,0,0,.25); color: var(--ink); position: relative; }
.casefile::before { content: attr(data-label); position: absolute; top: -18px; left: 26px; background: var(--red); color: #fff; font-family: Fredoka, sans-serif; font-weight: 700; padding: 4px 14px; border-radius: 8px; letter-spacing: 2px; border: 3px solid var(--ink); }
.game { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.game .map { background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 6px; position: relative; }
.game .map svg { display: block; width: 100%; height: auto; }
.game .solved { position: absolute; inset: 6px; opacity: 0; transition: opacity .8s; pointer-events: none; }
.game.done .solved { opacity: 1; }
.clues { list-style: none; padding: 0; margin: 10px 0 18px; }
.clues li { background: #fff8d6; border-left: 6px solid var(--gold); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 17px; }
.suspects { display: flex; gap: 12px; flex-wrap: wrap; }
.suspect { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 10px 6px; width: 104px; text-align: center; cursor: pointer; font-family: Fredoka, sans-serif; font-weight: 600; transition: transform .15s; }
.suspect svg { width: 70px; height: 70px; display: block; margin: 0 auto 4px; }
.suspect:hover { transform: translateY(-4px) rotate(-2deg); }
.suspect.no { opacity: .45; filter: grayscale(1); position: relative; }
.suspect.no::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 74px; color: var(--red); }
.suspect.yes { border-color: var(--teal); box-shadow: 0 0 0 5px var(--teal); }
.verdict { min-height: 56px; margin-top: 14px; font-family: Fredoka, sans-serif; font-size: 19px; }
.steps { display: none; margin-top: 16px; background: #fff; border-radius: 12px; padding: 14px 18px; border: 2px dashed var(--ink); }
.game.done .steps { display: block; }
.steps ol { margin: 6px 0 0; padding-left: 22px; font-size: 16px; }
.itemchip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px 2px 4px; font-family: Fredoka, sans-serif; font-weight: 600; }
.itemchip svg { width: 30px; height: 30px; }
@media (max-width: 860px) { .game { grid-template-columns: 1fr; } }

/* ---------- thẻ chọn vụ ---------- */
.casetabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.casetab { font: inherit; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 15px; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; cursor: pointer; text-align: left; line-height: 1.2; box-shadow: 0 4px 0 var(--ink); transition: transform .12s; }
.casetab small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.casetab:hover { transform: translateY(-2px); }
.casetab.on { background: var(--gold); }
.casetab.solved::after { content: ' ✔'; color: var(--teal); font-weight: 700; }
.casetab.solved.on::after { color: var(--ink); }
.solvedbar { text-align: center; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 18px; margin-top: 16px; min-height: 28px; }
.solvedbar .bar { display: inline-block; width: 160px; height: 12px; border-radius: 99px; background: #eadfc6; vertical-align: middle; margin-left: 10px; overflow: hidden; border: 2px solid var(--ink); }
.solvedbar .bar i { display: block; height: 100%; background: var(--teal); transition: width .5s; }
.nextcase { margin-top: 12px; font: inherit; font-family: Fredoka, sans-serif; font-weight: 700; background: var(--ink); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; cursor: pointer; }
@media (max-width: 560px) { .casetab { font-size: 13.5px; padding: 6px 10px; } }

/* ---------- lưới tính năng ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 6px 0 var(--line); }
.card .ic { font-size: 34px; margin-bottom: 6px; }
.card p { font-size: 16px; color: #4b4e66; margin: 0; }
.dark .card, .dark2 .card { background: #2d2560; border-color: #3e3480; box-shadow: 0 6px 0 #140f2c; }
.dark .card p, .dark2 .card p { color: #cfc9f2; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* ---------- bước ---------- */
.stepsrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { background: #fff; border-radius: 18px; padding: 26px 22px; border: 3px solid var(--ink); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -22px; left: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: #fff; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 22px; display: grid; place-items: center; border: 3px solid var(--ink); }
@media (max-width: 760px) { .stepsrow { grid-template-columns: 1fr; gap: 34px; } }

/* ---------- trang sách ---------- */
.pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; }
.pg { margin: 0; }
.pg .sheet { aspect-ratio: 612/792; background: #fff; border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.18); overflow: hidden; transition: transform .25s; }
.pg .sheet:hover { transform: translateY(-6px) rotate(-1deg); }
.pg object { width: 100%; height: 100%; display: block; pointer-events: none; }
.pg figcaption { font-family: Fredoka, sans-serif; font-weight: 600; text-align: center; margin-top: 10px; font-size: 16px; }
.pg figcaption small { display: block; font-family: Andika, sans-serif; font-weight: 400; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .pages { grid-template-columns: 1fr 1fr; } }
.wrapcover { margin-top: 40px; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.wrapcover object { width: 100%; aspect-ratio: 1253.6/810; display: block; pointer-events: none; }

/* ---------- bảng so sánh ---------- */
.vs { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 16px; overflow: hidden; border: 3px solid var(--ink); font-size: 17px; }
.vs th, .vs td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.vs th { font-family: Fredoka, sans-serif; background: var(--ink); color: #fff; font-size: 18px; }
.vs td:nth-child(3) { background: #f2fbf9; font-weight: 700; }
.vs tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .vs { font-size: 15px; } .vs th, .vs td { padding: 10px; } }

/* ---------- giá ---------- */
.offer { background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 24px; padding: 34px; box-shadow: 0 12px 0 var(--gold); max-width: 720px; margin: 0 auto; }
.offer ul { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; }
.offer li { padding: 9px 0 9px 36px; position: relative; border-bottom: 1px dashed var(--line); }
.offer li::before { content: '✔'; position: absolute; left: 4px; color: var(--teal); font-weight: 700; }
.offer-shot { display: block; width: 100%; height: auto; border-radius: 16px; margin: 0 0 26px; box-shadow: 0 8px 22px rgba(27,22,56,.25); }
.price { font-family: Fredoka, sans-serif; font-size: 64px; font-weight: 700; line-height: 1; }
.price small { font-size: 20px; color: var(--muted); font-weight: 600; }
.guarantee { display: flex; gap: 18px; align-items: center; text-align: left; margin-top: 26px; background: #f2fbf9; border-radius: 16px; padding: 16px 18px; }
.guarantee .seal { flex: none; width: 84px; height: 84px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 13px; text-align: center; line-height: 1.05; border: 3px dashed #fff; outline: 3px solid var(--teal); }

/* ---------- FAQ ---------- */
details { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; }
summary { font-family: Fredoka, sans-serif; font-weight: 700; font-size: 19px; cursor: pointer; list-style: none; }
summary::after { content: '+'; float: right; font-size: 24px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 10px 0 0; color: #4b4e66; }

/* ---------- xuất hiện khi cuộn ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
.clue-pop { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%); background: var(--gold); color: var(--ink); font-family: Fredoka, sans-serif; font-weight: 700; padding: 12px 22px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); z-index: 60; transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); white-space: nowrap; font-size: 16px; }
.clue-pop.show { transform: translate(-50%, 0); }
/* ---------- dấu chân đi ngang hero ---------- */
.steps-walk { position: absolute; left: 0; bottom: 18px; width: 100%; height: 40px; pointer-events: none; }
.steps-walk i { position: absolute; bottom: 0; width: 12px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .14); opacity: 0; animation: step 8s linear infinite; }
.steps-walk i:nth-child(odd) { bottom: 14px; }
.steps-walk i:nth-child(1) { left: 6%; animation-delay: 0s; } .steps-walk i:nth-child(2) { left: 16%; animation-delay: .5s; }
.steps-walk i:nth-child(3) { left: 26%; animation-delay: 1s; } .steps-walk i:nth-child(4) { left: 36%; animation-delay: 1.5s; }
.steps-walk i:nth-child(5) { left: 46%; animation-delay: 2s; } .steps-walk i:nth-child(6) { left: 56%; animation-delay: 2.5s; }
.steps-walk i:nth-child(7) { left: 66%; animation-delay: 3s; } .steps-walk i:nth-child(8) { left: 76%; animation-delay: 3.5s; }
@keyframes step { 0% { opacity: 0; } 5% { opacity: 1; } 40% { opacity: .9; } 60% { opacity: 0; } 100% { opacity: 0; } }

/* ---------- băng cảnh báo ---------- */
.tape { background: var(--gold); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); overflow: hidden; transform: rotate(-1.2deg); margin: -14px -10px 0; position: relative; z-index: 3; box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.tape-run { display: flex; width: max-content; animation: tape 26s linear infinite; }
.tape-run span { font-family: Fredoka, sans-serif; font-weight: 700; letter-spacing: 3px; padding: 9px 0; white-space: nowrap; font-size: 16px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- nỗi đau ---------- */
.painlist { display: grid; gap: 12px; margin-top: 30px; }
.pain { display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; font-size: 17px; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; box-shadow: 0 5px 0 var(--line); transition: transform .15s, border-color .2s, background .2s; }
.pain:hover { transform: translateX(4px); }
.pain .box { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 3px solid var(--ink); display: grid; place-items: center; margin-top: 1px; transition: .2s; }
.pain.on { border-color: var(--pink); background: #fff0f5; box-shadow: 0 5px 0 #ffc2d6; }
.pain.on .box { background: var(--pink); border-color: var(--pink); }
.pain.on .box::after { content: '✓'; color: #fff; font-weight: 700; }
.painscore { margin: 22px auto 0; text-align: center; font-family: Fredoka, sans-serif; font-size: 21px; font-weight: 700; min-height: 32px; transition: .3s; }
.painscore.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.12); color: var(--pink); } }
.agitate { margin-top: 40px; font-size: 19px; }

/* ---------- bảng bằng chứng (bảng bần + dây đỏ) ---------- */
.board { position: relative; background: #c99563; background-image: radial-gradient(#8a5a33 1.2px, transparent 1.3px); background-size: 22px 22px; border: 10px solid #7a4b2a; border-radius: 14px; padding: 34px 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; box-shadow: inset 0 0 40px rgba(0,0,0,.25), 0 14px 0 rgba(0,0,0,.25); }
.board .strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.board .strings line { stroke: #d62828; stroke-width: 2.4; stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.6s ease; }
.board.in .strings line { stroke-dashoffset: 0; }
.note { position: relative; background: #fffbea; color: var(--ink); padding: 26px 18px 16px; box-shadow: 0 8px 14px rgba(0,0,0,.25); font-size: 15.5px; z-index: 1; transition: transform .25s; }
.note:hover { transform: rotate(0deg) scale(1.03) !important; z-index: 4; }
.note.n1 { transform: rotate(-2.5deg); } .note.n2 { transform: rotate(1.8deg); background: #e8f7ff; } .note.n3 { transform: rotate(-1deg); background: #fff0f5; }
.note.n4 { transform: rotate(1.5deg); grid-column: span 1; } .note.n5 { transform: rotate(-2deg); background: #effbe9; }
.note .pin { position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a93, #d62828 60%); border: 2px solid var(--ink); z-index: 3; }
.note .big { font-family: Fredoka, sans-serif; font-weight: 700; font-size: 46px; line-height: 1; color: var(--red); margin-bottom: 8px; }
.note .big.amz { color: #232f3e; font-size: 34px; letter-spacing: -1px; }
.note .big.ets { color: #f1641e; font-size: 34px; }
.note p { margin: 0 0 10px; }
.note .src { font-size: 12.5px; color: var(--muted); text-decoration: underline; }
@media (max-width: 860px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; padding: 28px 16px; } .note .big { font-size: 40px; } }

/* ---------- dòng thời gian ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 33px; top: 8px; bottom: 8px; width: 4px; background: repeating-linear-gradient(var(--gold) 0 10px, transparent 10px 18px); }
.timeline li { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; position: relative; }
.timeline b { flex: none; width: 70px; text-align: center; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 4px 0; font-size: 17px; position: relative; z-index: 1; border: 3px solid var(--ink); }
.timeline span { padding-top: 4px; }

/* ---------- đèn pin ---------- */
.spot { position: relative; margin: 30px auto 0; max-width: 820px; min-height: 300px; border-radius: 20px; overflow: hidden; border: 3px solid #3e3480; background: #fff8e7; color: var(--ink); display: grid; place-items: center; padding: 40px 30px; touch-action: none; cursor: none; }
.spot-text .big { font-size: clamp(26px, 4.2vw, 42px); font-weight: 700; color: var(--red); margin: 6px 0 14px; }
.spot-text p { margin: 0 0 6px; }
.spot-dark { position: absolute; inset: 0; background: radial-gradient(circle 120px at var(--x, 50%) var(--y, 50%), transparent 0, transparent 95px, rgba(10, 8, 28, 1) 125px); transition: background .05s; }
.spot.lit .spot-dark { opacity: 0; transition: opacity 1.2s; }

/* ---------- nút mua rung nhẹ để gây chú ý ---------- */
.btn.wiggle { animation: wiggle 5s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(-3deg) scale(1.03); } 93% { transform: rotate(3deg) scale(1.03); } 96% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }

footer { background: var(--ink); color: #b9b2df; font-size: 14px; padding: 30px 0; text-align: center; }
footer a { color: #b9b2df; }

/* ---------- trang OTO (upsell) ---------- */
.upbar { background: var(--pink); color: #fff; text-align: center; font-family: Fredoka, sans-serif; font-weight: 700; padding: 10px 16px; font-size: 17px; }
.upbar .prog { display: flex; justify-content: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; flex-wrap: wrap; }
.upbar .prog span { background: rgba(255,255,255,.25); padding: 3px 10px; border-radius: 999px; }
.upbar .prog span.on { background: #fff; color: var(--pink); }
.upbar .prog span.done { text-decoration: line-through; opacity: .75; }
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.world { background: #fff; color: var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px rgba(0,0,0,.18); transition: transform .25s; display: flex; flex-direction: column; }
.world:hover { transform: translateY(-6px) rotate(-1deg); }
.world .cvr { aspect-ratio: 612/792; background: #eee; }
.world .cvr object { width: 100%; height: 100%; display: block; pointer-events: none; }
.world .txt { padding: 12px 14px 16px; font-size: 14.5px; line-height: 1.45; }
.world h3 { margin: 0 0 4px; font-size: 19px; }
.world .kinds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.world .kinds i { font-style: normal; font-size: 12px; font-weight: 700; background: var(--gold); padding: 2px 8px; border-radius: 999px; }
.world h3 .new-tag { font-size: 11px; font-weight: 700; vertical-align: middle; background: var(--pink, #ff5d8f); color: #fff; padding: 2px 7px; border-radius: 999px; }
@media (max-width: 960px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .worlds { gap: 14px; } .world .txt { font-size: 13.5px; } }
.mathbox { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; text-align: center; }
.mathbox .side { background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.35); border-radius: 16px; padding: 22px 16px; }
.mathbox .side.win { border: 3px solid var(--gold); background: rgba(255,210,63,.12); }
.mathbox .n { font-family: Fredoka, sans-serif; font-weight: 700; font-size: 56px; line-height: 1; color: var(--gold); }
.mathbox .arrow { font-size: 40px; }
@media (max-width: 640px) { .mathbox { grid-template-columns: 1fr; } .mathbox .arrow { transform: rotate(90deg); } }
.nothanks { display: inline-block; margin-top: 18px; color: inherit; opacity: .7; font-size: 15px; }
.nothanks:hover { opacity: 1; }
.pages.two { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .cards.two { grid-template-columns: 1fr; } }

/* ---------- OTO3: lưới 3 trang + màn chiếu mô phỏng ---------- */
.pages.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .pages.three { grid-template-columns: 1fr 1fr; } }
.screen { max-width: 860px; margin: 0 auto; }
.screen-in { background: #11131f; border: 10px solid #2b2d42; border-radius: 14px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; color: #fff; }
.screen-in .sm { background: #fff; border-radius: 8px; aspect-ratio: 1; overflow: hidden; }
.screen-in .sm object { width: 100%; height: 100%; display: block; pointer-events: none; }
.screen-in .st b.f { color: var(--gold); font-size: 15px; letter-spacing: 1px; }
.screen-in .st h3 { color: #fff; margin: 4px 0 12px; }
.screen-in .st ol { padding-left: 22px; margin: 0; font-size: 17px; }
.screen-in .st li { margin: 6px 0; opacity: .7; }
.screen-in .st li.new { opacity: 1; font-weight: 700; }
.screen-in .bar { height: 8px; border-radius: 99px; background: #2b2d42; margin-top: 16px; overflow: hidden; }
.screen-in .bar i { display: block; height: 100%; width: 38%; background: var(--teal); }
.screen .stand { width: 90px; height: 26px; margin: 0 auto; background: #2b2d42; clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
@media (max-width: 640px) { .screen-in { grid-template-columns: 1fr; } }

/* ---------- OTO4: khung điện thoại + bài đăng chơi thử ---------- */
.phone { background: #11131f; border-radius: 30px; padding: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.4); position: relative; }
.phone::before { content: ''; position: absolute; top: 15px; left: 50%; width: 22%; height: 6px; margin-left: -11%; border-radius: 99px; background: #2b2d42; z-index: 1; }
.phone .scr { aspect-ratio: 9/16; background: #fff; border-radius: 22px; overflow: hidden; }
.phone object { width: 100%; height: 100%; display: block; pointer-events: none; }
.phones-fan { position: relative; height: 540px; }
.phones-fan .phone { position: absolute; width: 44%; transition: transform .35s; }
.phones-fan .f1 { left: 0; top: 50px; transform: rotate(-8deg); }
.phones-fan .f2 { left: 28%; top: 0; z-index: 2; }
.phones-fan .f3 { left: 56%; top: 60px; transform: rotate(8deg); }
.phones-fan:hover .f1 { transform: rotate(-12deg) translateX(-12px); }
.phones-fan:hover .f3 { transform: rotate(12deg) translateX(12px); }
@media (max-width: 860px) { .phones-fan { height: 500px; max-width: 460px; margin: 0 auto; width: 100%; } }
@media (max-width: 480px) { .phones-fan { height: 360px; } }
.postdemo { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 36px; align-items: start; margin-top: 30px; }
.postdemo .phone.big { width: 100%; }
@media (max-width: 760px) { .postdemo { grid-template-columns: 1fr; } .postdemo .phone.big { max-width: 320px; margin: 0 auto; } }
.comment { margin-top: 14px; min-height: 0; }
.comment .bubble { display: inline-block; background: #fff; border: 2px solid var(--ink); border-radius: 16px 16px 16px 4px; padding: 8px 14px; font-size: 16px; }
.comment .bubble b { font-family: Fredoka, sans-serif; }
.capbox { margin-top: 16px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.captabs { display: flex; border-bottom: 2px solid var(--ink); }
.captabs button { flex: 1; font: inherit; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 14.5px; padding: 8px 6px; border: 0; background: #f3ecdc; cursor: pointer; color: var(--ink); }
.captabs button.on { background: var(--gold); }
.capbox pre { margin: 0; color: var(--ink); padding: 12px 14px; white-space: pre-wrap; word-break: break-word; font-family: Andika, sans-serif; font-size: 14.5px; line-height: 1.45; max-height: 300px; overflow: auto; }
.capbox .copy { display: block; width: 100%; font: inherit; font-family: Fredoka, sans-serif; font-weight: 700; border: 0; border-top: 2px solid var(--ink); background: var(--ink); color: #fff; padding: 9px; cursor: pointer; }
.postpairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 28px; }
.postpairs figure { margin: 0; }
.postpairs .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.postpairs .phone { border-radius: 22px; padding: 7px; }
.postpairs .phone .scr { border-radius: 16px; }
.postpairs .phone::before { top: 10px; height: 4px; }
.postpairs figcaption { font-family: Fredoka, sans-serif; font-weight: 600; text-align: center; margin-top: 10px; font-size: 16px; }
.postpairs figcaption small { display: block; font-family: Andika, sans-serif; font-weight: 400; opacity: .7; font-size: 14px; }
@media (max-width: 760px) { .postpairs { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }

/* ---------- OTO4 Marketing Kit: video mô phỏng, bài lướt ngang, pin, ảnh sản phẩm ---------- */
.scr { container-type: inline-size; position: relative; }
.phone .scr.vidsim { background: #1f3b2c; display: flex; flex-direction: column; }
.vidsim .vs-top { height: 8%; display: grid; place-items: center; font-family: Fredoka, sans-serif; font-weight: 700; color: #ffd23f; font-size: 6.4cqw; -webkit-text-stroke: .5cqw #2b2d42; paint-order: stroke fill; }
.vidsim .vs-img { flex: 1; margin: 0 8%; background: #fff; border-radius: 3cqw; overflow: hidden; }
.vidsim .vs-img object { width: 100%; height: 100%; display: block; pointer-events: none; }
.vidsim .vs-bot { height: 11%; display: flex; align-items: center; gap: 4cqw; padding: 0 7%; }
.vidsim .vs-bar { flex: 1; height: 4cqw; border-radius: 99px; background: rgba(255,255,255,.25); overflow: hidden; }
.vidsim .vs-bar i { display: block; height: 100%; background: #ffd23f; border-radius: 99px; transition: width .1s linear; }
.vidsim .vs-num { font-family: Fredoka, sans-serif; font-weight: 700; color: #fff; font-size: 10cqw; min-width: 12cqw; text-align: center; }
.vidsim.vs-red .vs-bar i { background: #ef476f; }
.vidsim.vs-red .vs-num { color: #ef476f; transform: scale(1.12); }
.vidsim .vs-over { position: absolute; inset: 0; background: rgba(20,20,35,.74); display: grid; place-items: center; text-align: center; padding: 8%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.vidsim .vs-over.on { opacity: 1; }
.vidsim .vs-over span { font-family: Fredoka, sans-serif; font-weight: 700; color: #ffd23f; font-size: 11cqw; line-height: 1.1; -webkit-text-stroke: .8cqw #2b2d42; paint-order: stroke fill; }
.phone .scr.trailsim { background: #3a1f6b; perspective: 900px; }
.trailsim .ts-page { position: absolute; left: 8%; right: 8%; top: 50%; aspect-ratio: 612/792; transform: translateY(-50%); background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.4); transform-origin: left center; transition: transform .6s ease-in, filter .6s; }
.trailsim .ts-page object { width: 100%; height: 100%; display: block; pointer-events: none; }
.trailsim .ts-page.flip { transform: translateY(-50%) rotateY(-90deg); filter: brightness(.6); }
.phone .scr.pinscr { background: #f3ecdc; display: grid; place-items: center; }
.pinscr object { width: 100%; aspect-ratio: 2/3; height: auto !important; }
.vidrow { display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 28px; justify-content: center; }
.vidrow figure { margin: 0; }
.vidrow figcaption, .pins figcaption { font-family: Fredoka, sans-serif; font-weight: 600; text-align: center; margin-top: 10px; }
.vidrow figcaption small { display: block; font-family: Andika, sans-serif; font-weight: 400; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .vidrow { grid-template-columns: repeat(2, minmax(0, 220px)); } }
.platbox { max-width: 760px; margin: 0 auto; }
.platbox pre { max-height: 360px; }
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 16px; }
.strip .sl { flex: 0 0 min(260px, 70vw); aspect-ratio: 4/5; background: #fff; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.18); overflow: hidden; scroll-snap-align: start; }
.strip object, .pin object, .ph object, .sheetbox object { width: 100%; height: 100%; display: block; pointer-events: none; }
.pins { display: grid; grid-template-columns: repeat(3, minmax(0, 240px)); gap: 22px; justify-content: center; }
.pins figure { margin: 0; }
.pin { aspect-ratio: 2/3; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
@media (max-width: 640px) { .pins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ph { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.18); background: #fff; }
@media (max-width: 760px) { .photos { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.sheetbox { aspect-ratio: 792/612; background: #fff; border-radius: 8px; overflow: hidden; margin-top: 12px; }
.giftrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.mathgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; text-align: center; }
.mathgrid div { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 18px 8px; box-shadow: 0 5px 0 var(--ink); }
.mathgrid b { display: block; font-family: Fredoka, sans-serif; font-size: 46px; color: var(--red); line-height: 1; }
.mathgrid span { font-size: 15px; }
@media (max-width: 640px) { .mathgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- OTO5 Global DFY Pack: công thức sách + ngôn ngữ ---------- */
.recipe { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 32px; align-items: start; margin-top: 30px; }
.recipe .pg .sheet { aspect-ratio: 612/792; }
.rc-field { background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 14px; margin-bottom: 10px; }
.rc-field b { display: block; font-family: Fredoka, sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.rc-field span { font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips i { font-style: normal; font-size: 14px; background: #fff3d6; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 10px; }
@media (max-width: 760px) { .recipe { grid-template-columns: 1fr; } .recipe .rc-cover { max-width: 280px; margin: 0 auto; width: 100%; } }
.langpage { max-width: 420px; margin: 24px auto 0; }
.langpage .sheet { aspect-ratio: 612/792; }

/* ---------- FE: sách lật trang ---------- */
.flipbook { max-width: 980px; margin: 0 auto; outline: none; }
.fb-book { position: relative; width: 100%; aspect-ratio: 1224/792; perspective: 2400px; cursor: pointer; transition: transform .6s; transform: translateX(-25%); }
.fb-book.open { transform: none; }
.fb-book.closed-back { transform: translateX(25%); }
.fb-leaf { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.45,.05,.3,1); }
.fb-leaf.flipped { transform: rotateY(-180deg); }
.fb-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.fb-front { border-radius: 2px 6px 6px 2px; }
.fb-back { transform: rotateY(180deg); border-radius: 6px 2px 2px 6px; }
.fb-front::after, .fb-back::after { content: ''; position: absolute; top: 0; bottom: 0; width: 26px; pointer-events: none; }
.fb-front::after { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.18), transparent); }
.fb-back::after { right: 0; background: linear-gradient(-90deg, rgba(0,0,0,.18), transparent); }
.fb-face object, .fb-sp object { width: 100%; height: 100%; display: block; pointer-events: none; }
.fb-blank { width: 100%; height: 100%; background: #f6efe1; }
.fb-hide { position: absolute; inset: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(255,255,255,.45); display: grid; place-items: center; text-align: center; }
.fb-hide span { font-family: Fredoka, sans-serif; font-weight: 700; font-size: clamp(14px, 2vw, 22px); background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 16px; transform: rotate(-4deg); }
.fb-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; font-family: Fredoka, sans-serif; font-weight: 600; }
.fb-nav #fbinfo { min-width: 220px; text-align: center; }
.fb-btn { font: inherit; font-size: 20px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: var(--gold); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.fb-btn:disabled { opacity: .35; cursor: default; }
.fb-strip { display: none; }
@media (max-width: 760px) {
  .fb-book { display: none; }
  .fb-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; }
  .fb-sp { flex: 0 0 82%; scroll-snap-align: center; position: relative; }
  .fb-sp > object, .fb-sp > .fb-blank { aspect-ratio: 612/792; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
  .fb-sp .fb-hide { bottom: 22px; border-radius: 6px; }
  .fb-sp small { display: block; text-align: center; margin-top: 6px; font-family: Fredoka, sans-serif; }
  .fb-nav #fbinfo { display: none; }
}
.phone .scr.vidscr { background: #1f3b2c; }
.vidscr video { width: 100%; height: 100%; display: block; object-fit: cover; }

.casetab[aria-pressed="true"] { background: var(--gold); }
.flipswitch { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 22px; }
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.worlds .pg figcaption small { font-size: 13.5px; }
@media (max-width: 640px) { .worlds { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ---------- FE: 4 bonus ---------- */
.bonus-sec { background: #fdf3ea; }
.bonus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 1000px; margin: 0 auto; }
.bonus { background: #fffdf9; border-radius: 28px; padding: 22px 32px 30px; box-shadow: 0 8px 30px rgba(43,45,66,.08); }
.bonus-box { width: min(230px, 80%); margin: 0 auto; }
.bonus-box object { width: 100%; aspect-ratio: 290/352; display: block; pointer-events: none; }
.bonus .bonus-n { color: #c1121f; font-family: Fredoka, sans-serif; font-weight: 700; letter-spacing: .08em; margin: 10px 0 2px; }
.bonus h3 { margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 28px); }
.bonus > p { color: #5c5f75; margin: 0 0 14px; }
.bonus ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bonus li { position: relative; padding-left: 36px; }
.bonus li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #e3f4ea; color: #1d9a6c; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
@media (max-width: 620px) { .bonus-grid { grid-template-columns: 1fr; } .bonus { padding: 18px 20px 24px; } }

/* ---------- OTO5: công thức sách (thẻ công thức + kệ 31 công thức) ---------- */
.ingredients { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }
.recipe-card { background: #fffdf6; color: var(--ink); border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 8px 0 #140f2c; overflow: hidden; transform: rotate(-1.2deg);
  background-image: repeating-linear-gradient(#fffdf6 0 33px, #e6eefb 33px 34px); }
.rcard-head { background: var(--pink); color: #fff; padding: 12px 18px; display: grid; gap: 2px; }
.rcard-head span { font-family: Fredoka, sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 12px; opacity: .85; }
.rcard-head b { font-family: Fredoka, sans-serif; font-size: 24px; }
.rcard-head small { font-size: 14px; opacity: .9; }
.recipe-card ol { margin: 0; padding: 10px 18px 16px 44px; display: grid; gap: 0; }
.recipe-card li { line-height: 34px; font-size: 16px; }
.recipe-card li::marker { font-family: Fredoka, sans-serif; font-weight: 700; color: var(--pink); }
.recipe-card li b { font-family: Fredoka, sans-serif; margin-right: 8px; }
.recipe-card li span { color: #5c5f75; font-size: 14.5px; }
.why-recipes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.shelf-card { color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.shelf-card .sc-cover { background: #f3ecdc; border-radius: 12px; padding: 14px 14px 10px; margin-bottom: 6px; }
.shelf-card .sc-cover object { width: 82%; margin: 0 auto; display: block; aspect-ratio: 612/792; border-radius: 4px; box-shadow: 0 10px 20px rgba(0,0,0,.28); pointer-events: none; transform: rotate(-2deg); }
.shelf-card .sc-group { font-family: Fredoka, sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pink); }
.shelf-card h3 { font-size: 19px; margin: 0; line-height: 1.2; }
.shelf-card .sc-sub { font-size: 14px; color: #5c5f75; }
.shelf-card .sc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.shelf-card .sc-meta span { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f3ecdc; }
.shelf-card .sc-pitch { font-size: 14.5px; color: #3b3e52; margin: 4px 0 0; }
.shelf-card .sc-alt { font-size: 13.5px; color: #5c5f75; border-top: 2px dashed var(--line); padding-top: 8px; }
.shelf-card .sc-need { margin-top: auto; padding-top: 6px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 13.5px; color: #1d9a6c; }
.shelf-card .sc-need.lock { color: #b5651d; }
@media (max-width: 1000px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .shelf { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .ingredients { grid-template-columns: 1fr; } .recipe-card { transform: none; } }
@media (max-width: 560px) { .why-recipes { grid-template-columns: 1fr; } .recipe-card li { line-height: 1.35; padding: 6px 0; } .recipe-card { background-image: none; } .recipe-card li span { display: block; } }
.wplus-btn { margin: 4px 0 14px; text-align: center; }
.wplus-btn img { max-width: 100%; height: auto; }
.wplus_spdisclaimer { font-size: 13px; opacity: .85; }
