/* Nghề Ơi — dùng chung biến màu của VietMakers (vm.css) */
.trang-nghe [hidden] { display: none !important; }
body.trang-nghe { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.nhan-muc { font-weight: 800; color: var(--phu); font-size: 16px; }
.nhan-muc small { font-weight: 600; color: var(--mo); font-size: 11px; border: 1px solid var(--vien); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.khung-3d { position: relative; flex: 1; min-height: 0; }
#c3d { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#c3d.rung { animation: rung .35s; }
@keyframes rung { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* nhãn gắn vật */
.lop-nhan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nhan-vat { position: absolute; left: 0; top: 0; pointer-events: auto; background: rgba(255,255,255,.94); color: #1c2622; border: 1px solid rgba(28,38,34,.15); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background .12s, transform .05s; }
.nhan-vat:hover, .nhan-vat.tro { background: #0f5b46; color: #fff; }
.nhan-vat:focus-visible { outline: 3px solid #f4c542; }
.nhan-vat.nhay { animation: nhay .6s 4; background: #f4c542; color: #3a2e00; }
@keyframes nhay { 50% { box-shadow: 0 0 0 8px rgba(244,197,66,.45); } }

/* thẻ bước */
.the-buoc { position: absolute; left: 16px; top: 16px; width: min(380px, calc(100% - 32px)); background: var(--the); border: 1px solid var(--vien); border-radius: var(--r); box-shadow: var(--bong); padding: 12px 14px; }
.the-buoc .tien { height: 6px; background: var(--chinh-nhat); border-radius: 9px; overflow: hidden; margin-bottom: 8px; }
.the-buoc .tien i { display: block; height: 100%; background: var(--chinh); transition: width .4s; }
.the-buoc .dong1 { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mo); font-weight: 600; }
.the-buoc .viec { font-size: 17px; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }

/* thanh các gian */
.thanh-pho { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); overflow-x: auto; background: linear-gradient(transparent, rgba(0,0,0,.22)); }
.chip-nghe { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; background: var(--the); border: 1px solid var(--vien); border-radius: 12px; padding: 7px 12px; cursor: pointer; box-shadow: var(--bong); }
.chip-nghe span { grid-row: span 2; font-size: 22px; }
.chip-nghe b { font-size: 13.5px; } .chip-nghe small { color: var(--mo); font-size: 12px; }
.chip-nghe:hover { border-color: var(--chinh); }
.chip-nghe.khoa { opacity: .72; }

/* giữ */
.giu { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); background: var(--the); border: 1px solid var(--vien); border-radius: var(--r); box-shadow: var(--bong); padding: 14px; text-align: center; }
.giu p { margin: 0 0 10px; font-weight: 600; }
.xanh { color: var(--checkin); }
.thanh-giu { position: relative; height: 22px; border-radius: 11px; background: var(--chinh-nhat); overflow: hidden; margin-bottom: 12px; }
.thanh-giu .vung { position: absolute; top: 0; bottom: 0; background: rgba(22,163,74,.35); border-left: 2px solid var(--checkin); border-right: 2px solid var(--checkin); }
.thanh-giu .day { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--phu); opacity: .85; }
.nut.to { width: 100%; padding: 14px; font-size: 17px; user-select: none; -webkit-user-select: none; touch-action: none; }

/* thông báo */
.bao { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -20px); max-width: min(560px, calc(100% - 32px)); background: #1c2622; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--bong); z-index: 5; }
.bao.hien { opacity: 1; transform: translate(-50%, 0); }
.bao.dung { background: #0f5b46; } .bao.sai { background: #8a5a0a; } .bao.nguy { background: #b42318; }
@media (min-width: 760px) { .bao { left: auto; right: 16px; transform: translate(0, -20px); } .bao.hien { transform: none; } }

/* hộp */
.hop { position: absolute; inset: 0; background: rgba(15,20,18,.45); display: grid; place-items: center; padding: 16px; z-index: 10; }
.hop-trong { position: relative; background: var(--the); border-radius: 18px; width: min(560px, 100%); max-height: calc(100% - 8px); overflow: auto; padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.hop-trong .dong { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--mo); }
.hop-dau { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.hop-dau .bieu { font-size: 38px; }
.hop-dau h2 { margin: 0; font-size: 21px; }
.mo { color: var(--mo); margin: 2px 0 0; font-size: 13.5px; }
.cau { background: var(--the2); border-left: 4px solid var(--phu); padding: 10px 12px; border-radius: 8px; font-style: italic; }
.luat { padding-left: 18px; color: var(--muc); } .luat li { margin: 4px 0; }
.hang-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.the-hoi { font-size: 17px; font-weight: 700; margin: 4px 26px 12px 0; }
.ds-lua, .ds-dt { display: grid; gap: 8px; }
.lua { text-align: left; border: 1.5px solid var(--vien); background: var(--the2); border-radius: 12px; padding: 11px 14px; cursor: pointer; font-weight: 600; display: grid; }
.lua small { font-weight: 400; color: var(--mo); }
.lua:hover:not(:disabled) { border-color: var(--chinh); }
.lua.dung { border-color: var(--checkin); background: rgba(22,163,74,.1); }
.lua.sai { border-color: #c0392b; background: rgba(192,57,43,.08); text-decoration: line-through; opacity: .8; }
.giai { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; }
.giai.dung { background: rgba(22,163,74,.1); } .giai.sai { background: rgba(192,57,43,.08); }
.giai + .nut { margin-top: 10px; }
.o-diem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.o-diem div { background: var(--the2); border: 1px solid var(--vien); border-radius: 12px; padding: 10px; text-align: center; }
.o-diem b { display: block; font-size: 24px; color: var(--chinh); } .o-diem span { font-size: 12.5px; color: var(--mo); }
.loi summary { cursor: pointer; font-weight: 600; color: var(--phu); }
.loi li { font-size: 13.5px; margin: 4px 0; }
.khen { color: var(--checkin); font-weight: 600; }
#cam-nhan .nut.chon { background: var(--chinh); color: #fff; border-color: var(--chinh); }
.hop-trong h3 { margin: 16px 0 6px; font-size: 16px; }
.bang-luong { width: 100%; border-collapse: collapse; margin: 6px 0; }
.bang-luong td { padding: 7px 10px; border-bottom: 1px solid var(--vien); } .bang-luong td:last-child { text-align: right; font-weight: 700; }
.nho-chu { font-size: 12.5px; color: var(--mo); }
.lo-trinh { background: var(--chinh-nhat); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.buoc-tiep { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 4px; }
.moc { font-size: 12px; font-weight: 600; text-align: center; padding: 7px 4px; border-radius: 8px; border: 1px dashed var(--vien); color: var(--mo); }
.moc.xong { background: var(--chinh); color: #fff; border: 0; }
.chao { text-align: center; } .chao .ds-dt { text-align: left; margin-top: 8px; }
.chao h1 { font-size: 40px; margin: 0; color: var(--chinh); letter-spacing: -.02em; }
.nhan-nho { font-size: 12px; font-weight: 700; color: var(--mo); text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.slogan { font-size: 18px; font-weight: 700; color: var(--phu); margin: 0 0 10px; }
.ds-ho-so { display: grid; gap: 6px; margin: 10px 0; }
.dong-hs { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--vien); border-radius: 10px; }
.dong-hs .bieu { font-size: 22px; } .dong-hs span:last-child { color: var(--mo); font-size: 13px; }
@media (max-width: 600px) {
  .the-buoc { top: 10px; left: 10px; width: calc(100% - 20px); padding: 10px 12px; }
  .the-buoc .viec { font-size: 15.5px; }
  .top .nhan-muc small { display: none; }
  .nhan-vat { font-size: 11.5px; padding: 3px 9px; }
}

/* nhân vật đi lại: cần điều khiển + nút Làm */
.nhan-vat.gan { background: #f4c542; color: #3a2e00; border-color: #c99a00; box-shadow: 0 0 0 4px rgba(244,197,66,.35); }
.can { position: absolute; left: 22px; bottom: 26px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.28); border: 2px solid rgba(255,255,255,.65); touch-action: none; display: none; z-index: 4; backdrop-filter: blur(2px); }
.can i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(15,91,70,.85); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (pointer: coarse) { .can { display: block; } }
body.o-pho .can { bottom: 96px; }
.nut-lam { position: absolute; right: 20px; bottom: 26px; z-index: 4; border: 0; border-radius: 16px; background: #f4c542; color: #3a2e00; font-weight: 700; font-size: 15px; padding: 14px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; max-width: min(320px, calc(100% - 170px)); text-align: left; }
.nut-lam kbd { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(0,0,0,.12); font: 700 12px var(--font); }
@media (pointer: coarse) { .nut-lam kbd { display: none; } .nut-lam { padding: 18px 20px; } }
body.o-pho .nut-lam { bottom: 96px; }

/* cấp bậc */
.cap-bac { background: var(--the2); border: 1px solid var(--vien); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.cap-bac p { margin: 0 0 6px; }
.cap-bac .kho { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--phu); }
.cap-bac.len { border-color: #f4c542; background: linear-gradient(135deg, rgba(244,197,66,.22), var(--the2)); animation: lenCap 1.2s ease-out; }
.len-cap { font-size: 22px; font-weight: 800; color: #b8860b; letter-spacing: .02em; animation: nayLen .8s ease-out 2; }
@keyframes lenCap { 0% { transform: scale(.92); box-shadow: 0 0 0 0 rgba(244,197,66,.7); } 60% { transform: scale(1.03); box-shadow: 0 0 0 14px rgba(244,197,66,0); } 100% { transform: none; } }
@keyframes nayLen { 50% { transform: translateY(-5px) scale(1.06); } }
.thanh-kn { height: 10px; border-radius: 6px; background: var(--chinh-nhat); overflow: hidden; margin: 4px 0; }
.thanh-kn i { display: block; height: 100%; background: linear-gradient(90deg, var(--chinh), #f4c542); transition: width .8s; }
.thanh-kn.nho { height: 6px; margin-top: 4px; }
.dong-hs > div small { display: block; color: var(--mo); font-size: 12.5px; }

/* bong bóng lời nói của người xung quanh */
.bong-noi { position: absolute; left: 0; top: 0; pointer-events: none; background: #fff; color: #1c2622; border-radius: 12px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; max-width: 210px; box-shadow: 0 3px 12px rgba(0,0,0,.18); animation: bongHien .25s ease-out; }
.bong-noi::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
@keyframes bongHien { from { opacity: 0; transform: translate(-50%,-80%) scale(.9); } }
