:root { --c: #577590; --c2: #F8961E; --bg: #121A24; --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; }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .88; }
.btn.day { background: linear-gradient(180deg, #8fd3ff, #3f7cc8); color: #fff; min-height: 64px; font-size: 20px; font-weight: 900; }
.btn.quick { min-height: 72px; font-size: 18px; font-weight: 900; background: linear-gradient(180deg, #fff6e6, #f3d9a8); color: #4a2a12; margin: 0; }
.btn.lock { opacity: .62; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.row2 .link { min-height: 48px; }
.row3 { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 10px 0; }
.row3 .link { width: auto; min-height: 48px; }
.row3 input { width: 100%; min-height: 44px; }
.panel.wide { max-width: 580px; }
.panel h3 { margin: 4px 0 2px; font-size: 17px; color: var(--ink); }
.panel .small { font-size: 13px; margin: 2px 0 8px; }
.panel ul { padding-left: 20px; }
.panel ul li { margin: 6px 0; }
.ngan { background: #fbf6e9; border-radius: 16px; padding: 12px; margin: 12px 0; border: 1px solid #eadfc4; }
.ngan.lock { opacity: .75; background: #eeeae2; }
.lockp { font-size: 14px; margin: 6px 0; }
.trow { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; width: 100%; min-height: 60px; border: 0; background: #fff; border-radius: 14px; padding: 8px 10px; margin: 6px 0; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.trow .ic { font-size: 24px; text-align: center; }
.trow .tn b { display: block; font-size: 15px; color: var(--ink); }
.trow .tn small { font-size: 12px; color: var(--mut); font-weight: 600; }
.sp { width: 100%; max-width: 260px; height: 34px; display: block; margin-top: 4px; background: #f6f1e4; border-radius: 8px; }
.big-sp { background: #fbf6e9; border-radius: 14px; padding: 10px; text-align: center; }
.big-sp .sp { width: 100%; height: 140px; }
.big-sp small { color: var(--mut); font-weight: 700; font-size: 12px; }
.gc { font-style: normal; font-size: 11.5px; font-weight: 800; color: #fff; padding: 4px 8px; border-radius: 10px; white-space: nowrap; }
.gc.none { background: #c8ccd3; color: #4b5563; }
.grades { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.grades span { border: 2px solid; border-radius: 10px; padding: 6px 8px; font-size: 13px; font-weight: 700; color: var(--mut); }
.stampbar { background: linear-gradient(90deg, #577590, #2b8fd6); color: #fff; border-radius: 14px; padding: 10px 14px; font-weight: 800; }
.stampbar b { font-size: 22px; }
.calbox { display: grid; place-items: center; padding: 12px 0; overflow: hidden; }
.card { border: 3px solid #F8961E; border-radius: 16px; background: rgba(248,150,30,.1); display: grid; place-items: center; text-align: center; font-weight: 800; color: #b36a10; }
.pick .tool { display: block; width: 100%; text-align: left; border: 0; background: #fbf6e9; border-radius: 16px; padding: 14px; margin: 10px 0; min-height: 64px; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.pick .tool b { display: block; font-size: 18px; color: var(--ink); }
.pick .tool span { color: var(--mut); font-weight: 600; font-size: 14px; }
.pick .tool:disabled { opacity: .5; }

/* trang chủ nằm trên tờ giấy ô li vẽ ở canvas ⇒ chữ mực đậm */
.home .logo { color: #1d3557; text-shadow: 0 2px 0 rgba(255,255,255,.6); }
.home .logo .mark { transform: rotate(-6deg); }
.home .story { color: #2b3a55; background: rgba(251,246,233,.82); border-radius: 14px; padding: 8px 12px; }
.home .foot, .home .foot a { color: #2b3a55; }
.home .link { background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
