:root { --c: #4361EE; --c2: #F9C74F; --bg: #0F1630; --ink: #14203d; --mut: #5d6a8a; --sat: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink); overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; touch-action: none; display: block; }
#menu { position: fixed; inset: 0; z-index: 20; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#menu.on { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: calc(var(--sat) + 76px) 16px 32px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.3); }
.logo .mark { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 24px; display: grid; place-items: center; font-size: 42px; background: linear-gradient(135deg, var(--c2), var(--c)); box-shadow: 0 10px 30px rgba(0,0,0,.3); transform: rotate(-8deg); }
.logo h1 { margin: 0; font-size: clamp(40px, 11vw, 60px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.logo p { margin: 4px 0 0; font-weight: 800; font-size: 18px; }
.story { color: #fff; text-align: center; font-weight: 600; margin: 0; opacity: .92; }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 17px; margin: 8px 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn.main { background: linear-gradient(180deg, var(--c2), var(--c)); color: #fff; }
.btn.big { min-height: 72px; font-size: 24px; font-weight: 900; }
.btn.big small { display: block; font-size: 14px; font-weight: 700; opacity: .9; }
.link { border: 0; background: rgba(255,255,255,.88); border-radius: 14px; padding: 12px 16px; font-weight: 800; width: 100%; }
.panel { background: #fff; border-radius: 22px; padding: 20px; max-width: 480px; margin: calc(var(--sat) + 70px) auto 24px; width: calc(100% - 32px); }
.panel h2 { margin: 0 0 8px; }
.panel p, .panel li { color: var(--mut); font-weight: 600; line-height: 1.5; }
.foot { color: #fff; font-size: 13px; text-align: center; opacity: .85; }
.foot a { color: #fff; }
/* ===== Suy Nghĩ — trang chính, phòng, hành trình, học viện, bộ sưu tập ===== */
.home { gap: 12px; }
.logo .mark { font-size: 40px; }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .85; }
.btn.cont { background: #fff; color: var(--ink); border-left: 8px solid #80ed99; text-align: left; padding: 10px 16px; }
.daily { width: 100%; background: linear-gradient(160deg, #fffdf6, #fff1d0); border-radius: 22px; padding: 14px 14px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.daily .dtop { display: flex; justify-content: space-between; gap: 8px; font-weight: 900; font-size: 15px; color: #8a5a00; flex-wrap: wrap; }
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.dchip { border: 0; border-radius: 16px; background: #fff; padding: 8px 4px; min-height: 84px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.dchip i { font-style: normal; font-size: 24px; }
.dchip b { font-size: 13px; font-weight: 900; }
.dchip small { font-size: 11.5px; font-weight: 700; color: var(--mut); }
.dchip.ok { background: #e3f9e9; }
.dchip.ok small { color: #1f7a3a; }
.sec { color: #fff; margin: 8px 0 0; font-size: 18px; font-weight: 900; align-self: flex-start; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.room { border: 0; border-radius: 20px; padding: 14px 12px; text-align: left; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.22); border-top: 6px solid var(--gc); display: flex; flex-direction: column; gap: 3px; min-height: 140px; }
.room i { font-style: normal; font-size: 30px; }
.room b { font-size: 18px; font-weight: 900; color: var(--gc); }
.room small { font-size: 12.5px; font-weight: 600; color: var(--mut); line-height: 1.3; }
.room em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--ink); margin-top: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.row2 .link { min-height: 56px; }
.link small { display: block; font-size: 12px; font-weight: 700; color: var(--mut); }
.panel .back { width: auto; background: #f1f3fb; margin-bottom: 8px; }
.panel .lead { margin-top: 0; }
.panel h3 { margin: 16px 0 6px; }
.panel h3 small { color: var(--mut); font-weight: 700; }
.chap { border-radius: 18px; background: #f7f8fd; padding: 12px; margin: 10px 0; border-left: 6px solid var(--gc, #4361EE); }
.ch-h b { display: block; font-size: 16px; }
.ch-h small { color: var(--mut); font-weight: 700; font-size: 12.5px; }
.lvs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tier { min-width: 88px; min-height: 60px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 10px; }
.tier.wide { flex: 1 1 40%; }
.tier b { font-size: 15px; font-weight: 900; color: var(--ink); }
.tier span { font-size: 12px; font-weight: 700; color: var(--mut); }
.tier.lock { opacity: .5; }
.stage { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; background: #f7f8fd; padding: 10px 12px; margin: 7px 0; text-align: left; min-height: 60px; }
.stage .sn { flex: 0 0 38px; height: 38px; border-radius: 50%; background: #dfe5ff; display: grid; place-items: center; font-weight: 900; color: #3355d6; }
.stage.ok .sn { background: #80ed99; color: #14532d; }
.stage .sb { flex: 1; }
.stage .sb b { display: block; font-size: 14.5px; }
.stage .sb small { display: block; color: var(--mut); font-weight: 700; font-size: 12.5px; }
.stage .ss { color: #E0A100; font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.stage.lock { opacity: .5; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.thumbs.big { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.th { border: 0; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.th canvas { width: 100%; aspect-ratio: 1; border-radius: 8px; image-rendering: pixelated; }
.th small { font-size: 11.5px; font-weight: 800; color: var(--ink); text-align: center; }
.bigpic { width: 100%; max-width: 300px; display: block; margin: 0 auto; border-radius: 12px; image-rendering: pixelated; border: 6px solid #c9a227; }
.prog { height: 12px; border-radius: 6px; background: #eef0f7; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, #F9C74F, #F3722C); }
.bkc { width: 100%; display: flex; gap: 12px; padding: 12px; margin: 8px 0; border: 0; border-radius: 16px; background: #f4f4f7; text-align: left; }
.bkc.on { background: #fffaf0; border-left: 6px solid #F9C74F; }
.bkc i { font-style: normal; font-size: 28px; }
.bkc b { display: block; font-size: 16px; }
.bkc b em { font-style: normal; color: #E0A100; font-size: 13px; }
.bkc small { display: block; color: var(--mut); font-weight: 700; font-size: 12.5px; line-height: 1.35; }
.combo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.combo span { background: #effaf7; border-radius: 10px; padding: 6px 8px; font-weight: 700; font-size: 13px; color: #1d5a52; }
