/* help.css — Room 6 (help centre), Room 7 (coach) and the ❓ tab on every screen */
.h6, .c7 { position: fixed; inset: 0; z-index: 52; overflow-y: auto; color: #1E2452; font-family: var(--f-body); }
.h6 { background: linear-gradient(180deg, #E3F8F1 0, #F6FCFA 320px, #FBFEFD 100%); }
.c7 { background: linear-gradient(180deg, #EEE8FF 0, #F8F6FF 320px, #FCFBFF 100%); overflow: hidden; display: flex; flex-direction: column; }
.h6.hidden, .c7.hidden { display: none; }
html.in-room6 #hud, html.in-room7 #hud { display: none; }
.h6 button, .c7 button { cursor: pointer; font-family: var(--f-head); }
.h6 :focus-visible, .c7 :focus-visible, .helpfab:focus-visible { outline: 3px solid #2BB39A; outline-offset: 2px; }
.h6 textarea, .h6 input, .c7 textarea, .c7 input { font: inherit; font-size: 1rem; color: #1E2452; border: 2px solid #D8E7E2; border-radius: 14px; padding: 10px 12px; background: #fff; box-sizing: border-box; }
.h6 .hidden, .c7 .hidden { display: none !important; }

.h6-head { position: sticky; top: 0; z-index: 3; flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t, 0px)) 16px 10px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: 0 6px 24px -14px rgba(30,36,82,.4); }
.h6-head .ttl { flex: 1; display: grid; text-align: center; }
.h6-head .ttl b { font-family: var(--f-head); font-weight: 600; font-size: 1.12rem; }
.h6-head .ttl span { font-size: .85rem; color: #6B6890; }
.h6-nav { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid #CFE9E1; background: #fff; color: #1E2452; font-size: 1rem; }
.h6-nav.next { background: #1E2452; border-color: #1E2452; color: #fff; }
.h6-wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 120px; display: grid; gap: 18px; }
.h6-hero { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: 24px; padding: 18px 20px; box-shadow: 0 14px 40px -26px rgba(30,36,82,.55); }
.h6-hero .nova-face { width: 84px; height: 84px; flex: none; }
.h6-hero > div { flex: 1; min-width: 0; }
.h6-hero h1 { margin: 0; font-family: var(--f-head); font-size: 1.5rem; }
.h6-hero p { margin: 4px 0 10px; color: #5D5A86; }
.h6-search { display: flex; gap: 8px; align-items: center; background: #F2FAF7; border: 2px solid #CFE9E1; border-radius: 999px; padding: 4px 4px 4px 14px; }
.h6-search input { flex: 1; border: 0; background: transparent; min-height: 44px; padding: 0 4px; min-width: 0; }
.h6-search input:focus { outline: none; }
.h6-search .ic { font-size: 1.1rem; }
.h6-search.small { margin-bottom: 8px; }
.h6-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid #CFE9E1; background: #fff; color: #1E2452; font-size: .95rem; }
.h6-btn.primary { background: #2BB39A; border-color: #2BB39A; color: #fff; }
.h6-link { border: 0; background: none; color: #1B8C78; text-decoration: underline; min-height: 40px; font-size: .95rem; }
.h6-muted { color: #6B6890; }
.h6-sec { display: grid; gap: 8px; }
.h6-sec h2 { margin: 0 0 4px; font-family: var(--f-head); font-size: 1.15rem; }
.h6-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.h6-cat { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; border: 2px solid #DDEFE9; background: #fff; color: #1E2452; text-align: center; }
.h6-cat .em { font-size: 2rem; } .h6-cat b { font-size: .98rem; } .h6-cat small { font-family: var(--f-body); color: #6B6890; }
.h6-cat:hover { border-color: #2BB39A; }
.h6-qa { background: #fff; border-radius: 16px; box-shadow: 0 8px 24px -20px rgba(30,36,82,.6); }
.h6-qa summary { display: flex; gap: 10px; align-items: center; min-height: 52px; padding: 8px 14px; cursor: pointer; font-family: var(--f-head); font-size: 1rem; list-style: none; }
.h6-qa summary::-webkit-details-marker { display: none; }
.h6-qa summary::after { content: '＋'; margin-left: auto; color: #2BB39A; font-weight: 700; }
.h6-qa[open] summary::after { content: '－'; }
.h6-qa .cat { font-size: 1.3rem; }
.h6-a { padding: 0 16px 14px 50px; }
.h6-a ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; line-height: 1.55; }
.h6-sym { display: inline-block; background: #F5F7FF; border-radius: 12px; padding: 4px 8px; margin-bottom: 6px; }
.h6-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.h6-useful { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-size: .85rem; color: #6B6890; }
.h6-useful button { border: 0; background: #F2F1F8; border-radius: 999px; width: 40px; height: 36px; font-size: 1.05rem; }
.h6-road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; counter-reset: r; }
.h6-road li { background: #fff; border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; box-shadow: 0 8px 24px -22px rgba(30,36,82,.6); }
.h6-road li span { color: #5D5A86; font-size: .9rem; }
.h6-ask { background: #FFF8E6; border-radius: 18px; padding: 12px 14px; display: grid; gap: 8px; }
.h6-askrow { display: flex; gap: 8px; align-items: stretch; } .h6-askrow textarea { flex: 1; }
.h6-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.h6-mine li { background: #fff; border-radius: 12px; padding: 6px 10px; display: grid; gap: 2px; font-size: .92rem; }
.h6-mine li small { color: #9A7B2E; } .h6-mine li .rep { color: #1B8C78; font-weight: 600; }
.h6-ctx { font-family: var(--f-head); margin: 10px 0 4px; }
.h6-results { display: grid; gap: 6px; margin-bottom: 6px; }

/* the ❓ tab on the right edge of every screen */
.helpfab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border: 0; border-radius: 16px 0 0 16px; background: #2BB39A; color: #fff; box-shadow: -6px 8px 24px -12px rgba(30,36,82,.6); cursor: pointer; font-family: var(--f-head); }
.helpfab .q { font-size: 1.2rem; } .helpfab .tx { writing-mode: vertical-rl; font-size: .85rem; letter-spacing: .5px; }
.helpfab.hidden { display: none; }

/* Room 7 */
.c7-head .h6-nav { border-color: #DCD3FF; }
.c7-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; max-width: 1240px; width: 100%; margin: 0 auto; padding: 16px; box-sizing: border-box; }
.c7-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding-right: 4px; }
.c7-nova { display: flex; gap: 14px; align-items: center; background: #1E2452; color: #fff; border-radius: 22px; padding: 12px 16px; }
.c7-bot { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.c7-bot .nova-face { width: 60px; height: 60px; }
.c7-nova b { display: block; font-family: var(--f-head); font-size: 1.1rem; } .c7-nova small { opacity: .85; }
.c7-chat { background: #fff; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; max-height: 46vh; overflow-y: auto; box-shadow: 0 14px 40px -28px rgba(30,36,82,.55); }
.c7-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.c7-msg p { margin: 0; padding: 10px 14px; border-radius: 18px; line-height: 1.55; background: #F1EEFF; }
.c7-msg .av { font-size: 1.4rem; }
.c7-msg.me { align-self: flex-end; } .c7-msg.me p { background: #FFE9D9; }
.c7-go { margin-left: 8px; border: 0; background: #7A5CF0; color: #fff; border-radius: 999px; min-height: 32px; padding: 0 12px; font-size: .85rem; }
.c7-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.c7-chip { min-height: 42px; padding: 0 14px; border-radius: 999px; border: 2px solid #DCD3FF; background: #fff; color: #1E2452; font-size: .92rem; }
.c7-chip:hover { border-color: #7A5CF0; }
.c7-send { display: flex; gap: 8px; } .c7-send input { flex: 1; min-height: 48px; }
.c7-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid #DCD3FF; background: #fff; color: #1E2452; font-size: .92rem; }
.c7-btn.primary { background: #7A5CF0; border-color: #7A5CF0; color: #fff; } .c7-btn.ghost { background: transparent; }
.c7-weaks:empty { display: none; }
.c7-weaks { display: grid; gap: 10px; scroll-margin-top: 10px; }
.c7-weaks h2 { margin: 6px 0 0; font-family: var(--f-head); font-size: 1.15rem; }
.c7-muted { color: #6B6890; display: block; }
.c7-weak { background: #fff; border-radius: 18px; padding: 12px 14px; display: grid; gap: 8px; border-left: 6px solid #F2B33D; box-shadow: 0 10px 30px -24px rgba(30,36,82,.6); }
.c7-weak.done { border-left-color: #45C486; opacity: .85; }
.c7-weak > b { font-family: var(--f-head); line-height: 1.5; }
.c7-hint { margin: 0; background: #FFF6D8; border-radius: 12px; padding: 8px 10px; }
.c7-ex { margin: 0; background: #EAF4FF; border-radius: 12px; padding: 8px 10px; }
.c7-row { display: flex; gap: 6px; flex-wrap: wrap; }
.c7-side { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; padding-bottom: 20px; }
.c7-card { background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: 0 14px 40px -28px rgba(30,36,82,.55); }
.c7-card h3 { margin: 0 0 8px; font-family: var(--f-head); font-size: 1.02rem; }
.c7-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.c7-steps li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.c7-steps li > div { flex: 1; min-width: 0; display: grid; } .c7-steps small { color: #6B6890; font-size: .8rem; }
.c7-steps .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #EEEAF8; font-weight: 700; flex: none; }
.c7-steps li.done .n { background: #45C486; color: #fff; } .c7-steps li.doing { background: #FFF6D8; } .c7-steps li.doing .n { background: #F2B33D; color: #fff; }
.c7-bar { margin: 8px 0; } .c7-bar .top { display: flex; justify-content: space-between; } .c7-bar small { color: #6B6890; font-size: .78rem; }
.c7-bar .track { height: 10px; border-radius: 999px; background: #EEEAF8; overflow: hidden; margin: 3px 0; }
.c7-bar .track i { display: block; height: 100%; background: linear-gradient(90deg, #7A5CF0, #45C486); }
.c7-level { font-size: 1.6rem; letter-spacing: 4px; color: #7A5CF0; margin: 0; }
.c7-ref summary { cursor: pointer; min-height: 36px; font-family: var(--f-head); }
.c7-ref p { margin: 4px 0; font-size: .9rem; }

@media (max-width: 900px) {
  .c7 { overflow-y: auto; display: block; }
  .c7-wrap { grid-template-columns: minmax(0, 1fr); }
  .c7-main { overflow: visible; }
  .c7-chat { max-height: 52vh; }
  .h6-nav .tx { display: none; } .h6-head .ttl span { display: none; }
  .h6-hero { flex-direction: column; text-align: center; }
  .h6-a { padding-left: 16px; }
  .helpfab { padding: 8px 6px; } .helpfab .tx { display: none; }
}

/* the drawer lives in the game's dark side panel: give its cards their own light colours */
.h6-in { display: grid; gap: 8px; }
.h6-in .h6-qa, .h6-in .h6-ask, .h6-in .h6-mine li { color: #1E2452; }
.h6-in .h6-ask textarea { background: #fff; color: #1E2452; }
.h6-in .h6-ctx { color: inherit; }
.h6-in .h6-muted { color: inherit; opacity: .8; }
.h6-in .h6-search { background: #fff; } .h6-in .h6-search input { color: #1E2452; }

/* Room 7 · Nova stage (3D world shown inside, or a big 2D Nova when 3D is off) */
.c7-stage { position: relative; height: clamp(300px, 48vh, 520px); border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #8C7BDA 0, #3A3486 60%, #252A73 100%); box-shadow: 0 18px 50px -26px rgba(30,36,82,.8); flex: none; }
.c7-world { position: absolute; inset: 0; }
.c7-world canvas { width: 100% !important; height: 100% !important; display: block; }
.c7-face { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: none; }
.c7.flat .c7-face { display: block; }
.c7-face .nova-face { width: min(220px, 40vw); height: min(220px, 40vw); filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); animation: c7float 3.2s ease-in-out infinite; }
.c7-face.talking .nova-face { animation: c7float 3.2s ease-in-out infinite, c7talk .28s ease-in-out infinite alternate; }
@keyframes c7float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes c7talk { from { scale: 1 1; } to { scale: 1.03 .97; } }
.c7-sub { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(680px, 90%); background: rgba(255,255,255,.95); color: #1E2452; border-radius: 18px; padding: 10px 16px; font-size: 1.08rem; line-height: 1.55; text-align: center; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.c7-sub.me { background: #FFE9D9; }
.c7-sub.pop { animation: c7pop .25s ease-out; }
@keyframes c7pop { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.c7-stagebar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.c7-mic { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 8px; border: 0; border-radius: 999px; background: #F07A3C; color: #fff; font-size: 1.05rem; box-shadow: 0 10px 24px -10px rgba(240,122,60,.9); }
.c7-mic .ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 1.3rem; }
.c7-mic.on { background: #E04848; animation: c7pulse 1s ease-in-out infinite; }
@keyframes c7pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,72,72,.6); } 50% { box-shadow: 0 0 0 12px rgba(224,72,72,0); } }
.c7-togs { display: flex; gap: 6px; }
.c7-tog { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.85); color: #1E2452; font-size: .88rem; }
.c7-tog.on { background: #fff; box-shadow: inset 0 0 0 2px #7A5CF0; }
.c7-nomic { color: #fff; background: rgba(0,0,0,.3); padding: 6px 10px; border-radius: 10px; }
.c7-vnote { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 999px; font-size: .8rem; }
.c7-log summary { cursor: pointer; min-height: 40px; font-family: var(--f-head); }
.c7-log .c7-chat { min-height: 0; max-height: 34vh; margin-top: 6px; }
.c7-label { margin: 0; color: #6B6890; font-size: .8rem; text-align: center; }
@media (max-width: 900px) { .c7-stage { height: 56vh; } .c7-sub { bottom: 78px; font-size: 1rem; } .c7-mic { min-height: 50px; } }

/* ---------- Room 1 incident scene ---------- */
.inc { position: fixed; inset: 0; z-index: 60; pointer-events: none; font-family: "Mitr", "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif; }
.inc.hidden { display: none; }
.inc-bars i { position: absolute; left: 0; right: 0; height: 7vh; background: #0D0F2B; }
.inc-bars i:first-child { top: 0; } .inc-bars i:last-child { bottom: 0; }
.inc-top { position: absolute; top: 1.4vh; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; color: #fff; font-size: 15px; }
.inc-tag { background: #E04848; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.inc-time { opacity: .8; font-size: 13px; }
.inc-cap { position: absolute; left: 50%; bottom: calc(7vh + 18px); transform: translateX(-50%) translateY(8px); max-width: min(860px, 92vw); background: rgba(13, 15, 43, .86); color: #fff; padding: 12px 22px; border-radius: 16px; font-size: clamp(16px, 2.1vw, 22px); line-height: 1.5; text-align: center; opacity: 0; transition: opacity .35s, transform .35s; }
.inc-cap.on { opacity: 1; transform: translateX(-50%); }
.inc-bub { position: fixed; left: 0; top: 0; background: #fff; color: #1E2452; padding: 7px 13px 8px; border-radius: 16px; font-size: clamp(14px, 1.6vw, 18px); max-width: 260px; box-shadow: 0 8px 22px -10px rgba(0,0,0,.6); white-space: normal; animation: incpop .25s ease-out; }
.inc-bub::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
.inc-bub b { display: block; font-size: 12px; color: #6B4FD8; font-weight: 600; }
.inc-bub.shout { background: #FFE9E2; border: 2px solid #E04848; font-weight: 600; }
.inc-bub.shout::after { border-top-color: #E04848; }
@keyframes incpop { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }
.inc-ctl { position: absolute; right: 16px; bottom: 1.6vh; display: flex; gap: 8px; pointer-events: auto; }
.inc-b { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); color: #1E2452; font: 600 16px "Mitr", sans-serif; cursor: pointer; }
.inc-b.primary { background: #6B4FD8; color: #fff; }
.inc-end { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13,15,43,.45); pointer-events: auto; }
.inc-end.hidden { display: none; }
.inc-endcard { background: #fff; border-radius: 24px; padding: 26px 30px; text-align: center; max-width: 440px; margin: 16px; }
.inc-endcard b { font-size: 24px; color: #1E2452; } .inc-endcard p { color: #4A4F7A; font-size: 17px; line-height: 1.6; }
.inc-endbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.in-incident #hud, .in-incident #helpfab, .in-incident #incbtn { display: none !important; }
.incbtn { position: fixed; left: 14px; bottom: 96px; z-index: 30; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px; background: #1E2452; color: #fff; font: 600 15px "Mitr", sans-serif; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); cursor: pointer; }
.incbtn.hidden { display: none; }
@media (max-width: 640px) { .inc-bars i { height: 5vh; } .inc-ctl { bottom: calc(5vh + 4px); } .inc-cap { bottom: calc(5vh + 64px); } .incbtn { bottom: 150px; font-size: 13px; } }
