/* King of Chaos — camada final de interface RPG clássica e responsividade mobile. */
:root{--koc-ink:#080604;--koc-leather:#24150d;--koc-wood:#4a2b18;--koc-gold:#d6a94f;--koc-gold-light:#ffe39a;--koc-rune:#69b8d8;--koc-safe-t:max(8px,env(safe-area-inset-top));--koc-safe-r:max(8px,env(safe-area-inset-right));--koc-safe-b:max(8px,env(safe-area-inset-bottom));--koc-safe-l:max(8px,env(safe-area-inset-left))}
#hud .mmo-frame,.player-card,.target-card,.quest,.minimap-shell,.resource-card,#skillBar,.world-chat,.panel,.rpg-window{border-color:#8a6637!important;background:linear-gradient(180deg,rgba(45,27,16,.96),rgba(10,8,7,.96))!important;box-shadow:inset 0 0 0 2px rgba(255,218,139,.07),inset 0 0 22px rgba(0,0,0,.48),0 8px 24px rgba(0,0,0,.65)!important}
#hud .mmo-frame:after,.player-card:after,.target-card:after{content:"";position:absolute;inset:4px;border:1px solid rgba(215,172,85,.22);border-radius:inherit;pointer-events:none}
.bar,.xp-top-bar,.mini-bar{border-color:#6d4a25!important;background:#090604!important}.hp i{background:linear-gradient(90deg,#6d111d,#e5484f)!important}.mp i{background:linear-gradient(90deg,#123d80,#3b9fe4)!important}.stamina i{background:linear-gradient(90deg,#80621e,#e7c24c)!important}
.gamer-menu button,.action-slot,#mobile button,.game-utility-bar button,.world-chat-toggle{border-color:#8d6735!important;background:linear-gradient(180deg,#4a321d,#160e09)!important;box-shadow:inset 0 0 0 1px rgba(255,229,166,.1),0 4px 0 #090604,0 8px 16px rgba(0,0,0,.45)!important}
.gamer-menu button:active,.action-slot:active,#mobile button:active{transform:translateY(3px)!important;box-shadow:inset 0 0 8px #000,0 1px 0 #090604!important}
.dialogue{z-index:130!important;border:2px solid #ad8142!important;border-radius:5px!important;background:linear-gradient(180deg,rgba(48,29,17,.985),rgba(10,7,6,.99))!important;box-shadow:inset 0 0 0 3px #130c08,inset 0 0 0 4px #6f4c28,0 18px 55px #000e!important}
.dialogue:before{content:"CONVERSA"!important;left:88px!important;border-radius:2px!important;background:linear-gradient(#f0cb78,#9b682d)!important}
.dialogue>div{flex:1;min-width:0}.dialogue strong{color:var(--koc-gold-light)!important;font-family:Georgia,serif;font-size:18px!important;letter-spacing:.04em}.dialogue p{color:#f4e7ca!important}.dialogue-continue{display:flex;align-items:center;justify-content:flex-end;gap:5px;width:100%;min-height:34px;margin-top:7px;padding:6px 10px;border:1px solid #8f6938;border-radius:4px;background:linear-gradient(180deg,#4b311b,#1b1009);color:#ffe7a6;font-size:10px;font-weight:900;letter-spacing:.08em;cursor:pointer}.dialogue-continue b{font-size:20px;line-height:12px}.mobile-dialogue-hint{display:none}
body.dialogue-open .world-chat,body.dialogue-open .world-chat-toggle{filter:brightness(.55);pointer-events:none}.mobile-map-toggle,.mobile-map-help{display:none}

@media (min-width:951px) and (hover:hover) and (pointer:fine){
 .hud-left-stack{left:14px!important;top:14px!important;width:304px!important}.hud-right-stack{right:14px!important;top:14px!important}
 #skillBar{bottom:18px!important;border-radius:5px!important}.action-slot{border-radius:4px!important}
 .dialogue{left:50%!important;right:auto!important;bottom:36px!important;transform:translateX(-50%)!important;width:min(780px,65vw)!important;min-height:126px!important;padding:15px!important}
}

/* Mobile definitivo: quadro Cidade Aurora abaixo do jogador e editável como uma unidade. */
@media (max-width:950px),(hover:none) and (pointer:coarse){body.mobile-landscape-game .quest{position:absolute!important;left:0!important;right:auto!important;top:82px!important;bottom:auto!important;transform:none!important;display:block!important;width:218px!important;max-width:218px!important;margin:0!important;padding:6px 8px!important;z-index:72!important;pointer-events:auto!important;text-align:center!important}body.mobile-landscape-game .quest b,body.mobile-landscape-game .quest span{display:block!important;width:100%!important;text-align:center!important}}

@media (max-width:950px),(hover:none) and (pointer:coarse){
 body.mobile-landscape-game #hud{font-size:10px}
 body.mobile-landscape-game .hud-left-stack{left:var(--koc-safe-l)!important;top:var(--koc-safe-t)!important;width:218px!important;gap:4px!important}
 body.mobile-landscape-game .player-card{width:218px!important;min-height:56px!important;padding:5px 7px!important;gap:6px!important;border-radius:6px!important}
 body.mobile-landscape-game .player-card #portrait{width:44px!important;height:44px!important;flex-basis:44px!important;border-radius:5px!important}
 body.mobile-landscape-game .player-card b{font-size:11px!important}body.mobile-landscape-game .player-card small{font-size:7px!important;margin:0!important}
 body.mobile-landscape-game .player-card .bar{height:8px!important;margin-top:2px!important}body.mobile-landscape-game .player-card .bar em{font-size:6px!important;line-height:7px!important}
 body.mobile-landscape-game .target-card{display:none!important}
 body.mobile-landscape-game .quest{width:218px!important;max-width:218px!important;margin-top:3px!important;padding:5px 7px!important;border-radius:5px!important;text-align:center!important}body.mobile-landscape-game .quest b{display:block!important;width:100%!important;text-align:center!important;font-size:9px!important}body.mobile-landscape-game .quest span{display:block!important;width:100%!important;text-align:center!important;font-size:7px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.mobile-landscape-game .hud-right-stack{position:fixed!important;left:auto!important;right:var(--koc-safe-r)!important;top:var(--koc-safe-t)!important;width:124px!important;align-items:flex-end!important;z-index:70!important;transform-origin:right top!important}
 body.mobile-landscape-game .minimap-shell{display:block!important;width:124px!important;padding:4px!important;border-radius:5px!important;pointer-events:auto!important;transition:width .2s ease,transform .2s ease!important}body.mobile-landscape-game .minimap-header{position:relative!important;display:grid!important;grid-template-columns:24px 1fr 24px!important;align-items:center!important;min-height:24px!important;margin-bottom:2px!important}body.mobile-landscape-game .minimap-header b{grid-column:2!important;text-align:center!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}body.mobile-landscape-game .minimap-header>span{position:absolute!important;left:50%!important;top:15px!important;transform:translateX(-50%)!important;width:100%!important;text-align:center!important;font-size:5px!important;color:#c9b88f!important}body.mobile-landscape-game .mobile-map-toggle{display:grid!important;grid-column:3!important;width:22px!important;height:22px!important;min-width:22px!important;padding:0!important;place-items:center!important;border-radius:4px!important;color:#ffe1a0!important;font-size:9px!important;pointer-events:auto!important}body.mobile-landscape-game .minimap-circle{width:82px!important;height:82px!important;border-width:2px!important;cursor:pointer!important;touch-action:manipulation!important}body.mobile-landscape-game .compass{font-size:6px!important}body.mobile-landscape-game .mobile-map-help{display:block!important;text-align:center!important;margin-top:2px!important;color:#c8a866!important;font-size:4px!important;letter-spacing:.08em!important}
 body.mobile-landscape-game .minimap-shell.mobile-map-expanded{position:fixed!important;left:50%!important;right:auto!important;top:50%!important;width:min(330px,68vw)!important;transform:translate(-50%,-50%)!important;padding:10px!important;border-width:2px!important;border-radius:8px!important;z-index:140!important;box-shadow:0 0 0 100vmax rgba(0,0,0,.68),inset 0 0 0 2px rgba(255,218,139,.08),0 18px 50px #000!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .minimap-header{grid-template-columns:34px 1fr 34px!important;min-height:36px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .minimap-header b{font-size:14px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .minimap-header>span{top:24px!important;font-size:8px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .mobile-map-toggle{width:32px!important;height:32px!important;min-width:32px!important;font-size:13px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .minimap-circle{width:min(230px,48vw)!important;height:min(230px,48vw)!important;border-width:4px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .compass{font-size:12px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded #miniPlayerDot{width:15px!important;height:15px!important;border-width:2px!important}body.mobile-landscape-game .minimap-shell.mobile-map-expanded .mobile-map-help{font-size:7px!important;margin-top:6px!important}
 body.mobile-landscape-game .gamer-resources,body.mobile-landscape-game .gamer-menu,body.mobile-landscape-game .xp-header,body.mobile-landscape-game #skillBar{display:none!important}
 body.mobile-landscape-game #mobile{display:block!important;pointer-events:none!important}body.mobile-landscape-game #mobile button{pointer-events:auto!important;touch-action:none!important;-webkit-user-select:none;user-select:none}
 body.mobile-landscape-game .movement-joystick{position:fixed!important;left:var(--koc-safe-l)!important;bottom:var(--koc-safe-b)!important;width:152px!important;height:164px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;pointer-events:auto!important;touch-action:none!important;-webkit-user-select:none;user-select:none;z-index:76!important}
 body.mobile-landscape-game .joystick-rim{position:relative;width:148px;height:148px;border-radius:50%;border:2px solid rgba(223,181,102,.62);background:radial-gradient(circle at 50% 50%,rgba(80,55,31,.35) 0 27%,rgba(18,13,10,.76) 28% 58%,rgba(105,74,39,.72) 59% 62%,rgba(10,7,5,.82) 63%);box-shadow:inset 0 0 22px #000,0 8px 24px #000b,0 0 0 3px rgba(8,6,4,.62)}
 body.mobile-landscape-game .joystick-rim:before,body.mobile-landscape-game .joystick-rim:after{content:"";position:absolute;inset:12px;border-radius:50%;pointer-events:none}body.mobile-landscape-game .joystick-rim:before{background:linear-gradient(90deg,transparent 49%,rgba(255,220,150,.12) 50%,transparent 51%),linear-gradient(0deg,transparent 49%,rgba(255,220,150,.12) 50%,transparent 51%)}body.mobile-landscape-game .joystick-rim:after{inset:31px;border:1px solid rgba(232,193,113,.15)}
 body.mobile-landscape-game .joystick-knob{position:absolute;left:50%;top:50%;width:68px;height:68px;margin:-34px 0 0 -34px;border-radius:50%;border:2px solid #b98b47;background:radial-gradient(circle at 36% 28%,#795633,#3b2616 48%,#160d08 78%);box-shadow:inset 0 0 0 4px rgba(255,224,158,.08),inset 0 -10px 18px #0009,0 7px 14px #000b;will-change:transform;transition:transform 70ms linear;pointer-events:none}body.mobile-landscape-game .joystick-knob span{position:absolute;inset:19px;border-radius:50%;border:1px solid rgba(255,224,158,.34);background:radial-gradient(circle,#d6aa59 0 12%,transparent 14%)}body.mobile-landscape-game .movement-joystick.active .joystick-knob{transition:none;filter:brightness(1.18);box-shadow:inset 0 0 0 4px rgba(255,224,158,.12),inset 0 -10px 18px #0009,0 7px 18px #000d,0 0 16px rgba(224,173,79,.3)}body.mobile-landscape-game .movement-joystick>small{margin-top:-2px;padding:2px 9px;border-radius:999px;background:#100a07cc;border:1px solid #76532d;color:#e4bd73;font-size:7px;font-weight:900;letter-spacing:.12em;text-shadow:0 1px 2px #000}
 body.mobile-landscape-game .mobile-utility{left:calc(var(--koc-safe-l) + 160px)!important;bottom:var(--koc-safe-b)!important;display:grid!important;grid-template-columns:repeat(3,44px)!important;gap:6px!important;width:auto!important}body.mobile-landscape-game .mobile-utility button{position:relative!important;inset:auto!important;width:44px!important;height:44px!important;border-radius:50%!important;padding:5px!important}body.mobile-landscape-game .mobile-utility button span,body.mobile-landscape-game .mobile-utility button b{font-size:6px!important}
 body.mobile-landscape-game .actions{right:var(--koc-safe-r)!important;bottom:var(--koc-safe-b)!important;width:252px!important;height:154px!important;transform:none!important}body.mobile-landscape-game .actions button{width:48px!important;height:48px!important;border-radius:50%!important;padding:5px!important}body.mobile-landscape-game .actions .mobile-attack{width:66px!important;height:66px!important;right:0!important;bottom:38px!important}body.mobile-landscape-game .actions button[data-action="heavy"]{right:68px!important;bottom:0!important}body.mobile-landscape-game .actions button[data-action="defend"]{right:68px!important;bottom:100px!important}body.mobile-landscape-game .actions button[data-action="potion"]{right:120px!important;bottom:2px!important}body.mobile-landscape-game .actions button[data-action="mana"]{right:120px!important;bottom:54px!important}body.mobile-landscape-game .actions button[data-action="skill1"]{left:0!important;top:0!important}body.mobile-landscape-game .actions button[data-action="skill2"]{left:52px!important;top:0!important}body.mobile-landscape-game .actions button[data-action="skill3"]{left:0!important;top:52px!important}body.mobile-landscape-game .actions button[data-action="ultimate"]{left:52px!important;top:52px!important}
 body.mobile-landscape-game .interaction{left:50%!important;bottom:calc(var(--koc-safe-b) + 10px)!important;transform:translateX(-50%)!important;z-index:72!important;min-width:132px!important;min-height:42px!important;border-radius:5px!important;font-size:10px!important}
 body.mobile-landscape-game .world-chat-toggle{right:var(--koc-safe-r)!important;bottom:calc(var(--koc-safe-b) + 160px)!important;z-index:74!important}
 body.mobile-landscape-game .world-chat.compact-chat{right:var(--koc-safe-r)!important;left:auto!important;bottom:calc(var(--koc-safe-b) + 54px)!important;width:min(310px,44vw)!important;max-height:54dvh!important;z-index:92!important}
 body.mobile-landscape-game .dialogue{position:fixed!important;left:18%!important;right:18%!important;bottom:calc(var(--koc-safe-b) + 12px)!important;width:auto!important;min-height:104px!important;max-height:46dvh!important;padding:10px!important;gap:9px!important;overflow:auto!important;z-index:130!important}body.mobile-landscape-game .dialogue img{width:54px!important;height:54px!important;flex-basis:54px!important}body.mobile-landscape-game .dialogue strong{font-size:13px!important}body.mobile-landscape-game .dialogue p{font-size:10px!important;line-height:1.35!important;margin:4px 0!important}body.mobile-landscape-game .dialogue-continue{min-height:38px!important;font-size:8px!important}.desktop-dialogue-hint{display:none}.mobile-dialogue-hint{display:inline}
 body.dialogue-open.mobile-landscape-game .mobile-utility [data-action="interact"]{position:fixed!important;left:50%!important;bottom:calc(var(--koc-safe-b) + 20px)!important;transform:translateX(-50%)!important;z-index:135!important;width:88px!important;height:42px!important;border-radius:5px!important}
}

@media (hover:none) and (pointer:coarse) and (orientation:landscape) and (max-height:430px){
 body.mobile-landscape-game .hud-left-stack{transform:scale(.88)!important;transform-origin:left top!important}body.mobile-landscape-game .hud-right-stack:not(:has(.mobile-map-expanded)){transform:scale(.86)!important;transform-origin:right top!important}
 body.mobile-landscape-game .movement-joystick{transform:scale(.84)!important;transform-origin:left bottom!important}body.mobile-landscape-game .actions{transform:scale(.82)!important;transform-origin:right bottom!important}body.mobile-landscape-game .mobile-utility{transform:scale(.84)!important;transform-origin:left bottom!important}
 body.mobile-landscape-game .dialogue{left:20%!important;right:20%!important;max-height:44dvh!important}
}
