*{box-sizing:border-box;margin:0;padding:0}html,body{height:100%}body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:#1a0a2e;font-family:Comic Sans MS,Chalkboard SE,cursive,sans-serif;overflow:hidden}#game{touch-action:none;width:100vw;height:100vh;display:block}#loading{z-index:1200;background:linear-gradient(135deg,#1a0a2e 0%,#2d1b69 50%,#1a0a2e 100%);justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.loadCard{color:#5a3e28;background:#fbefd6;border:4px solid #8b6f47;border-radius:18px;padding:16px 24px;font-weight:700}#customizer{z-index:1000;justify-content:center;align-items:flex-start;padding:12px 0;display:flex;position:fixed;top:0;bottom:0;left:0;right:0;overflow-y:auto}#customizerInner{background:#fbefd6;border:5px solid #8b6f47;border-radius:24px;width:96%;max-width:760px;margin:auto;padding:20px;box-shadow:0 12px #8b6f47,0 0 40px #ff6b3580}#customizerInner h1{text-align:center;color:#f2702e;text-shadow:3px 3px #8b6f47;margin-bottom:12px;font-size:2em}#customizerLayout{align-items:flex-start;gap:16px;display:flex}#previewArea{text-align:center;flex:0 0 200px}#previewHole{background:0 0;border:4px solid #8b6f47;border-radius:16px;width:200px;height:220px;margin:0 auto 8px}#customOptions{flex:1}.optRow{margin-bottom:12px}.optRow label{color:#8b6f47;margin-bottom:4px;font-size:.9em;font-weight:700;display:block}.swatchRow,.btnRow{flex-wrap:wrap;gap:6px;display:flex}.swatch{cursor:pointer;border:3px solid #8b6f47;border-radius:8px;width:34px;height:34px;transition:transform .1s}.swatch:hover{transform:scale(1.15)}.swatch.selected{border-color:#f2702e;box-shadow:0 0 0 3px #f2702e}.optBtn{cursor:pointer;color:#5a3e28;background:#fbefd6;border:3px solid #8b6f47;border-radius:10px;padding:6px 10px;font-family:inherit;font-size:.85em;font-weight:700}.optBtn:hover{background:#ffe0b2}.optBtn.selected{color:#fff;background:#f2702e;border-color:#c0440d}.optBtn small{opacity:.75;font-size:.7em;display:block}#nameLabel{color:#8b6f47;margin-bottom:2px;font-size:.85em;font-weight:700;display:block}#nameHint{color:#7c5a3a;margin-top:4px;font-size:.72em;line-height:1.3}#nameInput{color:#3a2010;background:#fffbf0;border:3px solid #8b6f47;border-radius:10px;width:100%;padding:8px 12px;font-family:inherit;font-size:1em}.bigBtnRow{flex-wrap:wrap;gap:10px;margin-top:14px;display:flex}.bigBtn{cursor:pointer;border:4px solid;border-radius:14px;flex:1;padding:12px;font-family:inherit;font-size:1.05em;font-weight:700;box-shadow:0 5px}.bigBtn:active{transform:translateY(3px);box-shadow:0 2px}#btnContinue{color:#fff;background:#6bcb77;border-color:#3f9a4a;box-shadow:0 5px #3f9a4a}#btnRandom{color:#fff;background:#a78bfa;border-color:#7c3aed;box-shadow:0 5px #7c3aed}#btnStart{color:#fff;background:#f2702e;border-color:#c0440d;font-size:1.2em;box-shadow:0 5px #c0440d}@media (max-width:620px){#customizerLayout{flex-direction:column;align-items:center}#previewArea{flex:none}#previewHole{height:160px}}#hud{pointer-events:none;z-index:10;position:fixed;top:0;bottom:0;left:0;right:0}#playerBadge,#questBadge{top:calc(10px + env(safe-area-inset-top));background:#fbefd6;border:3px solid #8b6f47;border-radius:12px;padding:6px 12px;font-weight:700;position:absolute;box-shadow:0 3px #8b6f47}#playerBadge{left:calc(10px + env(safe-area-inset-left));color:#f2702e}#questBadge{right:calc(10px + env(safe-area-inset-right));color:#4ecdc4;font-size:.9em}#starCount{transition:transform .2s;display:inline-block}#minimap{bottom:calc(10px + env(safe-area-inset-bottom));left:calc(10px + env(safe-area-inset-left));position:absolute}#minimapCanvas{border:3px solid #8b6f47;border-radius:50%;box-shadow:0 3px #8b6f47}#cameraHint{color:#5a3e28;background:#fbefd6d9;border:2px solid #8b6f47;border-radius:10px;padding:4px 10px;font-size:.75em;position:absolute;bottom:20px;right:20px}.touch #cameraHint{display:none}.touch #minimap{bottom:calc(160px + env(safe-area-inset-bottom))}.townLabel,.npcBubble{z-index:40;pointer-events:none;display:none;position:fixed;transform:translate(-50%,-50%)}.townLabel{color:#3a2a18;white-space:nowrap;background:#fbefd6eb;border:2px solid #7a5e3c;border-radius:999px;padding:3px 12px;font-size:.85em;font-weight:700;box-shadow:0 2px #6b4f30}.npcBubble{font-size:22px}.npcName{z-index:39;pointer-events:none;color:#fff;text-shadow:0 1px 2px #000,0 0 3px #000;white-space:nowrap;font-size:.7em;font-weight:700;display:none;position:fixed;transform:translate(-50%,-50%)}#storyChip{top:calc(54px + env(safe-area-inset-top));z-index:30;color:#3a2a18;cursor:pointer;text-align:center;background:#fbefd6f5;border:3px solid #7a5e3c;border-radius:999px;max-width:90vw;padding:6px 16px;font-size:.95em;font-weight:700;display:none;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 3px #6b4f30}#musicBtn{top:calc(98px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));z-index:30;cursor:pointer;background:#fbefd6;border:3px solid #8b6f47;border-radius:10px;width:40px;height:40px;font-size:1.1em;position:fixed}#questToggle{top:calc(50px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));z-index:30;color:#fff;cursor:pointer;background:#4ecdc4;border:3px solid #2a9d8f;border-radius:10px;padding:6px 12px;font-family:inherit;font-weight:700;position:fixed;box-shadow:0 3px #2a9d8f}#questLog{top:calc(146px + env(safe-area-inset-top));z-index:40;background:#fbefd6;border:3px solid #8b6f47;border-radius:14px;width:240px;max-height:50vh;padding:12px;display:none;position:fixed;right:10px;overflow-y:auto;box-shadow:0 4px #8b6f47}#questLog h3{color:#f2702e;margin-bottom:8px;font-size:.95em}.questEntry{color:#3a2010;margin-bottom:8px;font-size:.8em}.questEntry .qtitle{color:#8b6f47;justify-content:space-between;gap:6px;font-weight:700;display:flex}.questEntry .qobj{color:#666;padding-left:8px;font-size:.9em}.questEntry .qdone{color:#4caf50}.questEntry .qtag{color:#2a9d8f;white-space:nowrap;background:#e8f6f5;border-radius:6px;padding:0 6px;font-size:.8em}.questEntry .qtag.team{color:#7c3aed;background:#f3e8ff}.questEntry .qnote{color:#7c3aed;padding-left:8px;font-size:.85em}.qempty{color:#8b6f47;font-size:.8em}#inventory{top:calc(54px + env(safe-area-inset-top));z-index:40;background:#fbefd6;border:3px solid #8b6f47;border-radius:14px;flex-flow:column wrap;gap:4px;max-height:42vh;padding:5px;display:none;position:fixed;left:10px;box-shadow:0 3px #8b6f47}.invSlot{background:#fffbf0;border:2px solid #8b6f47;border-radius:8px;justify-content:center;align-items:center;width:34px;height:34px;font-size:1.1em;display:flex;position:relative}.invCount{color:#fff;background:#f2702e;border-radius:50%;justify-content:center;align-items:center;width:15px;height:15px;font-size:.6em;font-weight:700;display:flex;position:absolute;bottom:-3px;right:-3px}#dialoguePanel{padding:16px 16px calc(16px + env(safe-area-inset-bottom));z-index:50;background:#fbefd6;border-top:5px solid #8b6f47;border-radius:20px 20px 0 0;max-height:min(75vh,480px);transition:transform .3s;position:fixed;bottom:0;left:0;right:0;overflow-y:auto;transform:translateY(105%)}#dialoguePanel.open{transform:translateY(0)}#dialogueInner{align-items:flex-start;gap:16px;max-width:860px;margin:0 auto;display:flex}#dialoguePortrait{background:radial-gradient(circle,#e0f4ff,#b3d9f7);border:3px solid #8b6f47;border-radius:12px;flex:0 0 72px;justify-content:center;align-items:center;height:72px;font-size:40px;display:flex}#dialogueRight{flex:1}#dialogueName{color:#f2702e;font-size:1.1em;font-weight:700}#dialogueHearts{margin-left:6px;font-size:.8em}#dialogueText{color:#3a2010;white-space:pre-line;min-height:48px;font-size:1em;line-height:1.5}#dialogueChoices{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.choiceBtn{color:#fff;cursor:pointer;background:#f2702e;border:3px solid #8b6f47;border-radius:10px;padding:8px 16px;font-family:inherit;font-size:.95em;font-weight:700;box-shadow:0 3px #c0440d}.choiceBtn:active{transform:translateY(2px)}.choiceBtn.decline{background:#aaa;box-shadow:0 3px #777}.choiceBtn.team{background:#a78bfa;box-shadow:0 3px #7c3aed}#celebration{z-index:200;pointer-events:none;display:none;position:fixed;top:0;bottom:0;left:0;right:0}#celebrationText{color:#fff;text-align:center;background:#f2702e;border:5px solid #c0440d;border-radius:20px;max-width:90vw;padding:18px 36px;font-size:1.6em;font-weight:700;animation:.4s ease-out popIn;position:absolute;top:32%;left:50%;transform:translate(-50%,-50%);box-shadow:0 8px #c0440d}@keyframes popIn{0%{opacity:0;transform:translate(-50%,-50%)scale(.3)}to{opacity:1;transform:translate(-50%,-50%)scale(1)}}#toast{z-index:60;pointer-events:none;color:#3a2010;text-align:center;background:#fbefd6f7;border:3px solid #8b6f47;border-radius:14px;max-width:90vw;padding:8px 16px;font-weight:700;display:none;position:fixed;bottom:150px;left:50%;transform:translate(-50%)}#biomeCard{z-index:45;opacity:0;color:#5a3e28;pointer-events:none;background:#fbefd6f2;border:4px solid #8b6f47;border-radius:16px;padding:10px 26px;font-size:1.5em;font-weight:700;transition:all .4s;position:fixed;top:22%;left:50%;transform:translate(-50%)scale(.8)}#biomeCard.show{opacity:1;transform:translate(-50%)scale(1)}#interactPrompt{z-index:25;pointer-events:none;background:#fbefd6f2;border:3px solid #8b6f47;border-radius:50%;justify-content:center;align-items:center;width:54px;height:54px;font-size:1.6em;display:none;position:fixed;bottom:170px;left:calc(50% - 27px)}#sceneTransition{opacity:0;pointer-events:none;z-index:900;background:#000;transition:opacity .45s;position:fixed;top:0;bottom:0;left:0;right:0}#sceneTransition.active{opacity:1}#joystickBase,#btnInteract,#btnJump,#camLeft,#camRight{display:none}.touch.playing #joystickBase,.touch.playing #btnInteract,.touch.playing #btnJump,.touch.playing #camLeft,.touch.playing #camRight{display:flex}#joystickBase{bottom:calc(28px + env(safe-area-inset-bottom));left:calc(24px + env(safe-area-inset-left));touch-action:none;z-index:20;background:#8b6f4747;border:3px solid #8b6f478c;border-radius:50%;justify-content:center;align-items:center;width:120px;height:120px;transition:opacity .2s;position:fixed}#joystickThumb{pointer-events:none;background:radial-gradient(circle at 35% 35%,#f7b85e,#f2702e);border:3px solid #ffffffbf;border-radius:50%;width:52px;height:52px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#btnInteract,#btnJump,#camLeft,#camRight{z-index:20;touch-action:none;color:#fff;cursor:pointer;border:3px solid #ffffffbf;border-radius:50%;justify-content:center;align-items:center;position:fixed}#btnInteract{bottom:calc(28px + env(safe-area-inset-bottom));right:calc(24px + env(safe-area-inset-right));background:radial-gradient(circle at 35% 35%,#4dd9c0,#2ab8a0);width:72px;height:72px;font-size:1.7em}#btnInteract.pulse{animation:.9s ease-in-out infinite btnPulse}@keyframes btnPulse{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}#btnJump{bottom:calc(112px + env(safe-area-inset-bottom));right:calc(34px + env(safe-area-inset-right));background:radial-gradient(circle at 35% 35%,#f7b85e,#f2702e);width:56px;height:56px;font-size:1.4em}#camLeft,#camRight{bottom:calc(40px + env(safe-area-inset-bottom));background:#8b6f4799;width:46px;height:46px;font-size:1.4em}#camLeft{right:calc(112px + env(safe-area-inset-right))}#camRight{right:calc(112px + env(safe-area-inset-right));bottom:calc(100px + env(safe-area-inset-bottom))}#social{display:none}body.playing #social{display:block}#offlineBadge{top:calc(12px + env(safe-area-inset-top));z-index:31;color:#fff;pointer-events:none;white-space:nowrap;background:#5a5a5ad9;border-radius:999px;padding:3px 12px;font-size:.75em;font-weight:700;display:none;position:fixed;left:50%;transform:translate(-50%)}#partyList{top:calc(146px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));z-index:30;background:#fbefd6f2;border:3px solid #8b6f47;border-radius:14px;min-width:120px;max-width:46vw;padding:4px 6px;display:none;position:fixed;box-shadow:0 3px #8b6f47}.partyRow{color:#5a3e28;align-items:center;gap:6px;padding:2px 0;font-size:.78em;font-weight:700;display:flex}.partyIcon{border:2px solid #8b6f47;border-radius:50%;flex:none;justify-content:center;align-items:center;width:24px;height:24px;font-size:15px;display:inline-flex}.partyNick{white-space:nowrap;text-overflow:ellipsis;flex:1;overflow:hidden}.muteBtn{cursor:pointer;touch-action:manipulation;background:#fff;border:2px solid #8b6f47;border-radius:10px;min-width:44px;min-height:44px;font-size:16px}.muteBtn.muted{background:#ffd6d6}#socialBar{z-index:30;right:calc(10px + env(safe-area-inset-right));flex-direction:column;gap:10px;display:none;position:fixed;top:50%;transform:translateY(-50%)}body.online #socialBar{display:flex}.socialBtn{cursor:pointer;touch-action:manipulation;background:#fbefd6;border:3px solid #8b6f47;border-radius:50%;width:56px;height:56px;font-size:28px;box-shadow:0 3px #8b6f47}.socialBtn:active{transform:translateY(2px);box-shadow:0 1px #8b6f47}.socialPanel{z-index:70;display:none;position:fixed}.socialPanel.open{display:block}#emoteWheel{background:#00000040;top:0;bottom:0;left:0;right:0}#emoteRing{width:0;height:0;position:absolute;top:50%;left:50%}.emoteBtn{cursor:pointer;width:72px;height:72px;transform:rotate(var(--a)) translate(min(130px, 34vw)) rotate(calc(-1 * var(--a)));touch-action:manipulation;background:#fbefd6;border:3px solid #8b6f47;border-radius:50%;margin:-36px 0 0 -36px;font-size:40px;position:absolute;top:0;left:0;box-shadow:0 3px #8b6f47}.emoteClose{cursor:pointer;background:#fff;border:3px solid #8b6f47;border-radius:50%;width:56px;height:56px;margin:-28px 0 0 -28px;font-size:22px;position:absolute;top:0;left:0}#phraseList{background:#fbefd6;border:4px solid #8b6f47;border-radius:18px;width:min(520px,100vw - 32px);max-height:80vh;padding:12px;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%);box-shadow:0 5px #8b6f47}#phraseGrid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;display:grid}.phraseBtn{color:#3a2a18;cursor:pointer;text-align:left;touch-action:manipulation;background:#fff;border:3px solid #8b6f47;border-radius:14px;align-items:center;gap:6px;min-height:52px;padding:6px 10px;font-size:1em;font-weight:700;display:flex}.phraseIcon{font-size:1.5em}.phraseClose{cursor:pointer;background:#eee;border:3px solid #8b6f47;border-radius:12px;width:100%;min-height:44px;margin-top:10px;font-weight:700}#netLabels{pointer-events:none;z-index:41;position:fixed;top:0;bottom:0;left:0;right:0}.nickTag{white-space:nowrap;color:#fff;background:#4ecdc4d9;border:2px solid #fff;border-radius:999px;padding:1px 8px;font-size:.72em;font-weight:700;display:none;position:fixed;transform:translate(-50%,-50%)}.chatBubble{white-space:nowrap;color:#3a2a18;background:#fff;border:3px solid #8b6f47;border-radius:16px;padding:4px 10px;font-size:.9em;font-weight:700;display:none;position:fixed;transform:translate(-50%,-100%);box-shadow:0 3px #8b6f47}.chatBubble.emote{box-shadow:none;background:0 0;border:none}.bubbleEmote{font-size:40px;animation:.35s ease-out emotePop;display:inline-block}@keyframes emotePop{0%{transform:scale(.2)}to{transform:scale(1)}}.touch #socialBar{top:auto;bottom:calc(184px + env(safe-area-inset-bottom));transform:none}.touch #toast{bottom:calc(290px + env(safe-area-inset-bottom));max-width:calc(100vw - 150px)}.touch #questToggle{min-height:44px}.touch #musicBtn{width:44px;height:44px;top:calc(102px + env(safe-area-inset-top))}.touch #partyList{top:calc(154px + env(safe-area-inset-top));max-height:calc(100vh - 538px);overflow-y:auto}.touch .choiceBtn{min-height:44px}.touch .swatch{width:44px;height:44px}.touch .optBtn{min-height:44px}@media (max-width:520px){#storyChip{left:calc(68px + env(safe-area-inset-left));right:calc(112px + env(safe-area-inset-right));border-radius:16px;max-width:none;padding:5px 10px;font-size:.8em;transform:none}}
