@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;700;800&family=Inter:wght@400;600;700&display=swap');
:root{--cyan:#61f4ff;--pink:#ff4c8b;--gold:#ffd36b;--bg:#07101f}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#182b4c,#050914 75%);color:#f5f8ff;font-family:Inter,Arial,sans-serif;min-height:100vh;display:grid;place-items:center}#game{width:min(1100px,100%);padding:12px}header,footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 16px;background:#0b1426;border:1px solid #263a58}header{border-radius:16px 16px 0 0}header div:first-child{display:flex;flex-direction:column;gap:3px}header b{font-family:Oxanium,sans-serif;letter-spacing:2px;color:var(--cyan)}header small{font-size:9px;letter-spacing:2px;color:#8ba4c9}.topstats{display:flex;gap:18px;font-size:10px;color:#9db0cd}.topstats b{font-size:16px;color:white;margin-left:5px}.topstats span{white-space:nowrap}main{position:relative;overflow:hidden;border:1px solid #263a58;border-top:0;background:#0a1630}canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;touch-action:none;image-rendering:auto}.hud{position:absolute;top:12px;left:12px;right:12px;display:flex;justify-content:space-between;gap:12px;pointer-events:none}.mission,.meters{background:#081121dc;border:1px solid #304667;border-radius:8px;padding:9px 12px;backdrop-filter:blur(6px)}.mission{display:flex;flex-direction:column;gap:5px;font-size:11px}.mission b{font:700 10px Oxanium;color:var(--gold);letter-spacing:1.5px}.meters{width:150px;display:grid;grid-template-columns:1fr;gap:4px;font-size:8px;color:#a9c1e6}.bar{height:5px;background:#26344c;border-radius:5px;overflow:hidden;margin-bottom:3px}.bar i{display:block;height:100%;width:100%;background:var(--cyan);transition:width .2s}.bar:last-of-type i{background:var(--pink)}.toast{position:absolute;left:50%;top:31%;transform:translate(-50%,-50%);background:#091326e8;border:1px solid #5a789f;padding:10px 16px;border-radius:30px;font-size:12px;text-align:center;white-space:normal;max-width:80%;opacity:0;transition:opacity .25s;pointer-events:none}.toast.show{opacity:1}.mobile-controls{position:absolute;bottom:14px;left:14px;right:14px;display:flex;justify-content:space-between;align-items:end;pointer-events:none}.mobile-controls button{pointer-events:auto;border:1px solid #5b769a;background:#0a1730dc;color:#fff;border-radius:13px;min-width:48px;min-height:46px;font-size:20px;box-shadow:0 5px 15px #0005;touch-action:none}.dpad,.actions{display:flex;gap:7px}.actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px 9px;font-size:18px}.actions small{font-size:8px;letter-spacing:.5px;color:#a9c7eb;margin-top:2px}.actions #idea{border-color:#b8a1ff}.actions #report{border-color:#ff739a}.actions #jump{border-color:#65e8ff}footer{border-radius:0 0 16px 16px;font-size:10px;color:#9cb0d1}footer button{background:transparent;color:var(--cyan);border:1px solid #3b607f;border-radius:7px;padding:8px 10px;white-space:nowrap}.modal{position:absolute;inset:0;display:grid;place-items:center;background:#030817c9;z-index:5;padding:18px}.modal.hidden{display:none}.panel{max-width:480px;text-align:center;background:linear-gradient(145deg,#142543,#091222);border:1px solid #496587;border-radius:20px;padding:28px;box-shadow:0 20px 80px #0009}.eyebrow{font:700 10px Oxanium;letter-spacing:3px;color:var(--cyan)}h1{font:800 clamp(27px,5vw,43px)/1.08 Oxanium;margin:13px 0}h1 em{font-style:normal;color:var(--gold)}.panel p{color:#b7c8e2;font-size:13px;line-height:1.7}.legend{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;font-size:11px;margin:18px 0 22px}.panel button{width:100%;padding:14px;border:0;border-radius:9px;background:linear-gradient(90deg,#61f4ff,#7ba7ff);color:#07101f;font:800 12px Oxanium;letter-spacing:1.5px}@media(min-width:700px){.mobile-controls{opacity:.72}.mobile-controls button:hover{filter:brightness(1.3)}}@media(max-width:520px){#game{padding:0}header{border-radius:0;padding:10px}.topstats{gap:8px}.topstats span{font-size:8px}.topstats b{font-size:13px}.hud{top:6px;left:6px;right:6px}.mission,.meters{padding:6px 8px}.mission{font-size:9px;max-width:60%}.meters{width:100px}.mobile-controls{bottom:7px;left:7px;right:7px}.mobile-controls button{min-width:39px;min-height:39px;border-radius:10px}.actions{gap:4px}.actions button{padding:3px 5px}.actions small{font-size:6px}footer{border-radius:0;padding:10px;font-size:8px}footer span{max-width:66%}.panel{padding:23px}}
/* Ajustes de legibilidade para a atualização retrô 2.5D */
@media(max-width:520px){.mission{max-width:62%;}.mission span{line-height:1.35}.toast{font-size:11px;max-width:88%}}

/* HUD mobile legible + social phone */
.phone-ui{position:absolute;right:10px;top:72px;z-index:4;font-family:Inter,Arial,sans-serif}
.phone-toggle{border:1px solid #74dff0;background:#071326f2;color:#fff;border-radius:14px;padding:8px 10px;font-size:15px;box-shadow:0 5px 18px #0008}
.phone-toggle span{font-size:11px;font-weight:800}.phone-toggle b{color:#ff719f;font-size:9px;margin-left:4px}
.phone-panel{display:none;width:min(310px,calc(100vw - 22px));max-height:min(430px,65vh);overflow:hidden;background:#f7f9ff;color:#172238;border-radius:18px;border:2px solid #74dff0;box-shadow:0 14px 40px #000b}
.phone-panel.open{display:flex;flex-direction:column}.phone-head{background:#172c4b;color:white;padding:10px 12px;display:flex;justify-content:space-between;align-items:center}.phone-head div{display:flex;flex-direction:column;gap:2px}.phone-head small,.phone-profile small{font-size:10px;opacity:.75}.phone-head button{border:0;background:transparent;color:white;font-size:24px}
.phone-profile{display:flex;align-items:center;gap:8px;padding:9px;border-bottom:1px solid #dce4f0}.phone-profile>div:nth-child(2){display:flex;flex-direction:column;flex:1;font-size:11px}.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#5ef2ff,#9578ff);font-weight:900}.phone-profile>span{font-size:11px;font-weight:800;white-space:nowrap}
.feed{padding:8px;overflow:auto;min-height:90px;max-height:235px;display:flex;flex-direction:column;gap:7px}.feed article{background:white;border:1px solid #dbe3ef;border-radius:10px;padding:8px;font-size:11px;box-shadow:0 2px 5px #1427440c}.feed article b{color:#23527b}.feed article p{margin:5px 0;line-height:1.45;overflow-wrap:anywhere}.feed article small{color:#65758e;font-size:10px}.phone-actions{display:flex;gap:6px;padding:8px;border-top:1px solid #dce4f0}.phone-actions button{flex:1;border:0;border-radius:9px;padding:9px 4px;background:#1d8aab;color:white;font-weight:800;font-size:11px}.phone-actions button+button{background:#6b4ec5}
.world-actions{position:absolute;left:50%;bottom:82px;transform:translateX(-50%);z-index:3;display:flex;gap:5px;max-width:96%;flex-wrap:wrap;justify-content:center}.world-actions button{background:#071326ed;color:white;border:1px solid #61f4ff;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:800;box-shadow:0 4px 12px #0005}.world-actions button[hidden]{display:none}
.game-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;background:#020817ed;padding:12px;overflow-y:auto;overscroll-behavior:contain}.game-modal.open{display:flex}.game-modal section{position:relative;width:min(520px,100%);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;background:#101f38;border:1px solid #5d819f;border-radius:18px;padding:22px 18px 18px;color:#f7faff;box-shadow:0 20px 70px #0009;margin:auto}.game-modal h2{font-size:20px;margin:0 0 10px;color:#6df2ff}.game-modal p,.game-modal small{color:#b8c9e2;font-size:12px;line-height:1.5}.modal-x{position:absolute;right:12px;top:8px;border:0;background:transparent;color:white;font-size:25px}.shop-item{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #304c70;border-radius:10px;padding:10px;margin:8px 0;font-size:12px}.shop-item button,.game-modal #publishVideo{background:#61e8ef;border:0;border-radius:8px;padding:8px;color:#081323;font-weight:900}.game-modal label{display:block;font-size:12px;margin:10px 0 5px}.game-modal input{width:100%;border-radius:8px;border:1px solid #486589;background:#071326;color:white;padding:11px;font-size:14px}.game-modal #publishVideo{width:100%;margin-top:10px;padding:12px}.sleepbar{height:8px;background:#263751;border-radius:9px;overflow:hidden;margin:18px 0}.sleepbar i{display:block;height:100%;width:0;background:#61f4ff}
.like-float{position:absolute;z-index:5;pointer-events:none;font-size:14px;animation:likeRise 1.6s ease-out forwards;text-shadow:0 2px 5px #0008}@keyframes likeRise{0%{transform:translateY(0) scale(.7);opacity:0}15%{opacity:1}100%{transform:translateY(-95px) scale(1.1);opacity:0}}
@media(max-width:520px){body{display:block;min-height:100dvh}#game{width:100%;padding:0;min-height:100dvh;display:flex;flex-direction:column}header{flex-shrink:0;min-height:52px}main{flex:1;min-height:0;display:flex;align-items:center}canvas{width:100%;height:auto;max-height:calc(100dvh - 155px);aspect-ratio:16/9;object-fit:contain}.hud{top:5px}.mission,.meters{padding:6px 7px}.mission{font-size:11px;max-width:67%}.mission b{font-size:10px}.mission span{font-size:11px;line-height:1.35}.meters{width:94px;font-size:9px}.bar{height:6px}.toast{top:38%;font-size:13px;line-height:1.35;max-width:90%;padding:9px 12px}.mobile-controls{bottom:8px}.mobile-controls button{min-width:43px;min-height:43px}.actions small{font-size:8px}.phone-ui{top:62px;right:5px}.phone-toggle{padding:7px 8px}.world-actions{bottom:76px}.world-actions button{font-size:10px;padding:7px 8px}footer{flex-shrink:0;min-height:42px}.panel{max-height:90dvh;overflow:auto}.game-modal section{max-height:85dvh;overflow:auto}}

/* V3: leitura confortável no celular sem exigir zoom */
.feed{padding:11px;gap:10px;max-height:min(48vh,390px);min-height:150px}
.feed article{font-size:15px;line-height:1.45;padding:12px;border-radius:12px}
.feed article b{font-size:15px;display:block;margin-bottom:4px}
.feed article p{font-size:15px;line-height:1.5;margin:6px 0;white-space:normal}
.feed article small{font-size:12px;line-height:1.35;display:block}
.phone-panel{width:min(390px,calc(100vw - 16px));max-height:calc(100dvh - 100px)}
.phone-ui{top:62px;right:8px}.phone-toggle{font-size:18px;padding:10px 12px}.phone-toggle span{font-size:14px}.phone-head{padding:12px 14px}.phone-head b{font-size:17px}.phone-head small,.phone-profile small{font-size:12px}.phone-profile>div:nth-child(2){font-size:14px}.avatar{width:38px;height:38px}.phone-actions button{font-size:13px;padding:12px 6px}
.mission span{font-size:13px;line-height:1.4}.mission b{font-size:12px}.toast{font-size:15px;line-height:1.45;max-width:min(90%,520px)}
.game-modal section{width:min(440px,100%);max-height:88dvh;overflow:auto}.game-modal p,.game-modal small{font-size:14px}.game-modal label{font-size:14px;font-weight:700}.game-modal input,.game-modal textarea{width:100%;border-radius:9px;border:1px solid #486589;background:#071326;color:white;padding:12px;font-size:16px;font-family:inherit}.game-modal textarea{min-height:76px;resize:vertical}.shop-item{font-size:14px;padding:12px;flex-wrap:wrap}.shop-item button{font-size:13px;padding:10px 12px}
.ai-preview{margin:12px 0;padding:10px;border:1px solid #365474;border-radius:12px;background:#09162a;text-align:center}.ai-scene{height:105px;position:relative;overflow:hidden;border-radius:9px;background:linear-gradient(#1b3d62,#101a2b 75%);border-bottom:5px solid #56647a}.ai-scene:after{content:"";position:absolute;bottom:0;left:0;right:0;height:18px;background:repeating-linear-gradient(90deg,#24384f 0 35px,#304a63 35px 38px)}.ai-character{position:absolute;z-index:1;left:calc(50% - 12px);bottom:15px;width:28px;height:72px;animation:aiAct 1.15s ease-in-out infinite alternate;transform-origin:bottom center}.ai-head{position:absolute;top:0;left:7px;width:15px;height:15px;border-radius:50%;background:#d9a27d;border:2px solid #202b42}.ai-body{position:absolute;top:15px;left:4px;width:21px;height:29px;border-radius:5px;background:linear-gradient(90deg,#21a8b9,#6cf4ff);border:2px solid #17263d}.ai-arm{position:absolute;top:19px;left:22px;width:19px;height:6px;border-radius:5px;background:#d9a27d;transform-origin:left;animation:aiArm .65s ease-in-out infinite alternate}.ai-leg{position:absolute;top:42px;left:7px;width:6px;height:24px;background:#27354e;box-shadow:10px 0 #27354e;animation:aiLeg .55s ease-in-out infinite alternate}.ai-spark{position:absolute;top:16px;right:25%;color:#ffe17c;font-size:22px;animation:spark 1.2s ease-in-out infinite}.ai-preview>b{display:block;font-size:12px;color:#75efff;margin:8px 0 4px}.ai-preview small{display:block;font-size:12px!important}.ai-preview.is-speaking .ai-arm{animation-duration:.25s}.ai-preview.is-dancing .ai-character{animation:aiDance .45s ease-in-out infinite alternate}
@keyframes aiAct{from{transform:translateY(0) rotate(-2deg)}to{transform:translateY(-5px) rotate(3deg)}}@keyframes aiArm{from{transform:rotate(-28deg)}to{transform:rotate(55deg)}}@keyframes aiLeg{from{transform:skew(-15deg)}to{transform:skew(15deg)}}@keyframes aiDance{from{transform:rotate(-13deg) translateY(-1px)}to{transform:rotate(13deg) translateY(-7px)}}@keyframes spark{50%{transform:translateY(-7px) scale(1.25);opacity:.55}}
@media(max-width:520px){.phone-panel{width:calc(100vw - 12px);max-height:calc(100dvh - 85px)}.feed{max-height:42dvh;min-height:130px}.feed article,.feed article p,.feed article b{font-size:15px}.feed article small{font-size:12px}.phone-ui{top:55px;right:6px}.mission span{font-size:12px}.world-actions{bottom:82px}.game-modal section{padding:18px}}
/* V4 mobile readability and input fixes */
html,body,#game,main,canvas,.mobile-controls,.mobile-controls button,.world-actions,.world-actions button{ -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
input,textarea,.feed{ -webkit-user-select:text; user-select:text; }
.mobile-controls button,.world-actions button,button{touch-action:manipulation;}
@media(max-width:520px){
  .game-modal{padding:8px;align-items:center;}
  .game-modal section{width:100%;max-width:520px;max-height:calc(100dvh - 100px);overflow-y:auto;padding:18px 16px 76px;font-size:16px;}
  .game-modal h2{font-size:23px;line-height:1.25}
  .game-modal p,.game-modal small,.game-modal label{font-size:16px!important;line-height:1.45}
  .game-modal input,.game-modal textarea{font-size:18px;line-height:1.4;padding:13px;}
  .game-modal textarea{min-height:115px;}
  .game-modal #publishVideo{position:sticky;bottom:-60px;z-index:4;font-size:17px;padding:15px;box-shadow:0 -8px 15px #101f38;}
  .feed{max-height:46dvh;min-height:150px;overflow-y:auto;}
  .feed article,.feed article p,.feed article b{font-size:18px!important;line-height:1.45!important;}
  .feed article small{font-size:14px!important;line-height:1.4}
  .phone-profile>div:nth-child(2){font-size:15px}
  .phone-profile>div:nth-child(2) small{font-size:13px}
  .phone-head b{font-size:19px}.phone-head small{font-size:14px}
  .phone-actions button{font-size:15px;padding:11px}
  .mission span{font-size:13px;line-height:1.4}
  .actions small{font-size:9px;letter-spacing:0}
}
/* Character preview inspired by the in-game black cap, glasses, jacket and shoes */
.ai-character{width:36px;height:78px;left:calc(50% - 18px)}
.ai-head{left:9px;width:18px;height:17px;background:#d8a17d;box-shadow:0 -7px 0 -1px #10131b;border-radius:45% 45% 40% 40%}
.ai-head:after{content:"";position:absolute;top:5px;left:0;width:16px;height:5px;border-top:2px solid #090d15;border-bottom:2px solid #090d15;background:linear-gradient(90deg,transparent 43%,#090d15 43% 57%,transparent 57%);}
.ai-body{top:17px;left:5px;width:26px;height:31px;background:linear-gradient(90deg,#171c28,#343c4c 45%,#101522);border:2px solid #080c14;border-radius:5px 5px 3px 3px}
.ai-arm{top:22px;left:28px;width:18px;height:7px;background:#d8a17d}
.ai-leg{top:46px;left:10px;width:7px;height:22px;background:#151923;box-shadow:10px 0 #151923}
.ai-leg:after{content:"";position:absolute;bottom:-2px;left:-3px;width:12px;height:5px;background:#080b12;border-radius:2px;box-shadow:10px 0 #080b12}
/* V5: publish button stays visible and readable on narrow phone screens */
.game-modal{overflow:hidden}
.game-modal section{display:flex;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}
.game-modal #publishVideo{position:sticky;bottom:0;flex-shrink:0;margin-top:12px;padding:16px 12px;font-size:18px;line-height:1.25;min-height:54px;box-shadow:0 -10px 20px #101f38;border:2px solid #a8fbff}
#videoResult{font-size:16px;line-height:1.5;font-weight:800;color:#8effd9;overflow-wrap:anywhere;padding:8px 2px}
@media(max-width:520px){.game-modal{padding:6px}.game-modal section{max-height:calc(100dvh - 88px);padding:16px 14px 10px}.game-modal #publishVideo{bottom:0;margin-bottom:0}.ai-preview{flex-shrink:0}.ai-scene{height:115px}}

/* V6 mobile usability fix */
.game-modal #publishVideo{position:sticky;bottom:0;z-index:3;display:block;min-height:52px;font-size:17px;margin-top:14px;margin-bottom:env(safe-area-inset-bottom);box-shadow:0 -8px 18px #101f38cc;cursor:pointer;touch-action:manipulation}.game-modal .modal-x{position:sticky;float:right;top:0;z-index:4;background:#172b49;border:1px solid #5d819f;border-radius:10px;width:42px;height:42px;line-height:1;color:white;cursor:pointer}.game-modal label{font-size:16px}.game-modal input,.game-modal textarea{font-size:17px;line-height:1.4}.game-modal textarea{width:100%;min-height:110px;resize:vertical;box-sizing:border-box;border-radius:8px;border:1px solid #486589;background:#071326;color:white;padding:12px}.game-modal #videoResult{font-size:16px;line-height:1.5;overflow-wrap:anywhere;margin-top:10px}.game-modal .ai-preview{margin-top:14px}
@media(max-width:520px){.game-modal{padding:8px;align-items:flex-start}.game-modal section{max-height:calc(100dvh - 16px);width:100%;padding:16px 14px calc(18px + env(safe-area-inset-bottom))}.game-modal h2{font-size:22px;padding-right:38px}.game-modal #publishVideo{font-size:18px;min-height:56px}.modal-x{font-size:28px}}
