html, body { margin: 0; height: 100%; background: #05030a; overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; }
body { font: 15px/1.35 ui-monospace, Menlo, monospace; color: #F2E9D8; }
#fh { position: fixed; inset: 0; display: block; }
.hud { position: fixed; z-index: 3; pointer-events: none; }
#top { top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; opacity: 0; transition: opacity .6s; }
body.playing #top { opacity: 1; }
#deep, #fed { white-space: nowrap; background: rgba(10,6,16,.6); padding: 6px 10px; border-radius: 6px; font-size: 13px; letter-spacing: .02em; }
#slots { display: flex; gap: 6px; padding: 5px 8px; background: rgba(10,6,16,.6); border-radius: 6px; }
#slots i { width: 18px; height: 18px; border: 2px solid rgba(242,233,216,.5); border-radius: 3px; display: block; }
#slots i.on { background: #FFE14D; border-color: #FFE14D; box-shadow: 0 0 10px #FFE14D; }
#right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#card { top: 30%; left: 50%; transform: translateX(-50%); max-width: min(86vw, 520px); text-align: center; font-size: 19px; background: rgba(10,6,16,.72); padding: 14px 18px; border-radius: 10px; opacity: 0; transition: opacity .8s; }
#card.on, #msg.on { opacity: 1; }
#msg { bottom: calc(236px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 88vw; text-align: center; background: rgba(10,6,16,.7); padding: 8px 12px; border-radius: 8px; opacity: 0; transition: opacity .4s; }
button.b { pointer-events: auto; font: inherit; color: #F2E9D8; background: rgba(20,12,30,.75); border: 2px solid rgba(242,233,216,.45); border-radius: 999px; padding: 10px 16px; cursor: pointer; }
#wakeup { position: fixed; z-index: 4; left: 16px; top: calc(max(12px, env(safe-area-inset-top)) + 40px); display: none; font-size: 11px; padding: 5px 9px 5px 7px; border-radius: 6px; }
body.playing #wakeup { display: flex; align-items: center; gap: 6px; }
#wakeup svg, #wakehim svg { width: 18px; height: 18px; image-rendering: pixelated; }
#wakehim { position: fixed; z-index: 4; right: 16px; bottom: calc(184px + env(safe-area-inset-bottom)); display: none; font-size: 14px; padding: 9px 14px 9px 10px; background: rgba(232,184,32,.9); color: #1A1612; border-color: #1A1612; }
body.playing #wakehim { display: flex; align-items: center; gap: 8px; }
@media (pointer: fine) { #wakehim { bottom: calc(70px + env(safe-area-inset-bottom)); } body:has(#verb:not([hidden])) #wakehim { bottom: calc(184px + env(safe-area-inset-bottom)); } }
#verb { position: fixed; z-index: 4; right: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); width: 104px; height: 104px; border-radius: 50%; font-size: 20px; background: rgba(224,32,122,.8); border-color: #FFE14D; }
body:not(.playing) #verb { display: none; }
body.talking #stick, body.talking #verb, body.talking #wakehim, body.talking #fh-talk, body.talking #fh-mute2, body.talking #fh-music, body.talking #msg { display: none !important; }
#jump { position: fixed; z-index: 4; right: 136px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 64px; height: 64px; border-radius: 50%; font-size: 14px; padding: 0; background: rgba(12,8,18,.6); display: none; touch-action: none; }
body.touch.playing #jump { display: block; }
body.talking #jump { display: none !important; }
/* 2026-11-22 (never stuck): Show me, always there, top right: walks you to the next thing */
#showme { position: fixed; z-index: 4; right: 16px; top: calc(max(12px, env(safe-area-inset-top)) + 40px); display: none; font-size: 15px; padding: 9px 15px; background: rgba(20,12,30,.8); border-color: #FFE14D; color: #FFE14D; }
body.playing #showme { display: block; }
body.talking #showme { display: none !important; }
body.busy #showme, body.silent-world #showme { opacity: 0; pointer-events: none; }
/* 2026-11-22 (B, knowing what to do without reading) */
#fed { display: none !important; }
#slots i.held { border-color: #FFE14D; box-shadow: 0 0 8px #FFE14D; animation: fhheld 1s steps(2) infinite; }
@keyframes fhheld { 50% { background: rgba(255,225,77,.45); } }
#slots.pop { animation: fhpop .45s ease-out; }
@keyframes fhpop { 30% { transform: scale(1.25); } }
#fh-prompt { top: 19%; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; font: 400 26px/1.1 "GH Dot", ui-monospace, monospace; letter-spacing: .04em; text-transform: uppercase; color: #FFE14D; background: rgba(10,6,16,.78); padding: 12px 18px; border-radius: 8px; border: 2px solid #FFE14D; opacity: 0; transition: opacity .3s; }
#fh-prompt.on { opacity: 1; }
body.talking #fh-prompt, body.busy #fh-prompt { opacity: 0 !important; }
#fh-arrow { position: fixed; left: 0; top: 0; z-index: 4; width: 92px; height: 92px; pointer-events: none; opacity: 0; }
#fh-arrow svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 8px #FFE14D) drop-shadow(0 0 3px #000); animation: fharrow .7s ease-in-out infinite; }
@keyframes fharrow { 0%, 100% { transform: translateX(-4px) scale(.9); } 50% { transform: translateX(8px) scale(1.12); } }
#fh-arrow svg polygon { animation: fharrowc .7s steps(2) infinite; }
@keyframes fharrowc { 50% { fill: #FFFFFF; } }
#fh-arrow.on { opacity: 1; }
body.busy #fh-arrow, body.talking #fh-arrow, body.silent-world #fh-arrow { opacity: 0 !important; }
#fh-flash { position: fixed; inset: 0; z-index: 4; background: #FFF6D8; opacity: 0; pointer-events: none; }
#verb.pulse { animation: fhverb 0.9s ease-in-out infinite; }
@keyframes fhverb { 50% { transform: scale(1.18); box-shadow: 0 0 0 10px rgba(255,225,77,.35); } }
#verb { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
#stick .ghost { position: absolute; left: 50px; top: 50px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,225,77,.55); border: 2px solid #FFE14D; pointer-events: none; animation: fhghost 1.6s ease-in-out infinite; }
@keyframes fhghost { 0%, 15% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 70% { transform: translate(0, -38px); opacity: 1; } 100% { transform: translate(0, -38px); opacity: 0; } }
body.moved #stick .ghost { display: none; }
#showme.pulse { animation: fhverb 1s ease-in-out infinite; }
#jump.pulse { animation: fhverb .8s ease-in-out infinite; border-color: #FFE14D; background: rgba(224,32,122,.8); }
#skip { position: fixed; z-index: 6; right: 16px; top: max(12px, env(safe-area-inset-top)); font-size: 13px; padding: 6px 12px; }
#stick { position: fixed; z-index: 4; left: 20px; bottom: calc(24px + env(safe-area-inset-bottom)); width: 136px; height: 136px; border-radius: 50%; background: rgba(12,8,18,.45); border: 1px solid rgba(242,233,216,.35); display: none; touch-action: none; }
#stick::before { content: ""; position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; border: 1px dashed rgba(242,233,216,.22); }
#stick div { position: absolute; left: 40px; top: 40px; width: 56px; height: 56px; border-radius: 50%; background: #F2E9D8; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
#stick div::after { content: ""; position: absolute; left: 24px; top: 24px; width: 8px; height: 8px; border-radius: 50%; background: #E03A1F; }
body.touch.playing #stick { display: block; }
#wakehim, #verb, #stick, #jump, #fh-talk, #wakeup, #top { transition: opacity .25s; }
body.busy #wakehim, body.busy #verb, body.busy #stick, body.busy #jump, body.busy #fh-talk, body.busy #wakeup, body.busy #top, body.busy #fh-mute2, body.busy #fh-music { opacity: 0; pointer-events: none; }
body.busy #card, body.throat #msg, body.throat #fh-box, body.throat #fh-rim { opacity: 0 !important; transition: opacity .2s; }
body.silent-world #top, body.silent-world #wakehim, body.silent-world #verb, body.silent-world #fh-mute2, body.silent-world #fh-music, body.silent-world #fh-talk, body.silent-world #fh-box, body.silent-world #card, body.silent-world #msg, body.silent-world .fh-naga { display: none !important; }
/* 2026-11-22: no two boxes overlap at 390x844 or 360x640: Talk sits above the stick, messages above Talk */
#fh-talk { left: 20px !important; transform: none !important; bottom: calc(176px + env(safe-area-inset-bottom)) !important; max-width: calc(100vw - 170px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#veil { position: fixed; inset: 0; z-index: 5; background: #05030a; opacity: 0; pointer-events: none; }
#start { position: fixed; z-index: 6; left: 0; right: 0; bottom: calc(40px + env(safe-area-inset-bottom)); text-align: center; pointer-events: auto; cursor: pointer; transition: opacity .5s; }
#start h1 { font-weight: 400; font-size: 26px; margin: 0 0 6px; letter-spacing: .04em; }
#start p { margin: 0 0 18px; opacity: .75; }
#start.go { opacity: 0; pointer-events: none; }
@media (max-width: 520px) { #deep, #fed { font-size: 11px; padding: 5px 7px; } #slots i { width: 14px; height: 14px; } #card { font-size: 15px; padding: 10px 14px; max-width: 92vw; } }
#nogl[hidden] { display: none; }
#nogl { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
