@import url('https://fonts.googleapis.com/css2?family=Sedgwick+Ave&family=Young+Serif&display=swap');
::-webkit-scrollbar{-webkit-appearance:none;}
::-webkit-scrollbar:vertical{width:6px;}
::-webkit-scrollbar:horizontal{height:6px;}
::-webkit-scrollbar-thumb{background-color:rgba(0, 0, 0, .5);border-radius:10px;border:2px solid #ffffff;}
::-webkit-scrollbar-track{border-radius:10px;background-color:#ffffff;}
html,body{width:100%;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;}
body{font-family:Arial;font-size:12px;padding:0;margin:0;cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;background-color:#0a0b14;}
canvas{inset:0;width:100%;height:100vh;height:100dvh;position:fixed;cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;}
ul{list-style: none;}
.clear{clear:both;}
.notop{margin-top:0;}
.center{text-align:center;}
.justify{text-align:justify;}
.divider{background:url('https://www.morana-online.com/game/images/divider.png') no-repeat center;width:100%;height:16px;}
.close{position:absolute;top:0;right:0;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;z-index:2999;}
.right-click{background:url('https://www.morana-online.com/game/images/right-click.png') no-repeat left center;padding-left:30px;}

a.btn,.btn{font-family:'Young Serif', serif;text-transform:uppercase;text-shadow:-2px -2px 3px black;border:4px ridge rgba(188, 239, 255, .7);font-size:20px;border-radius:7px;text-decoration:none;color:#cce4ed;transition-duration: 0.4s;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;background:url('https://www.morana-online.com/game/images/bg-btn.jpg') center #695b50;background-size:cover;box-shadow:1px 1px 16px #6fb9df;}
	.btn.btn-green{background-image:url('https://www.morana-online.com/game/images/bg-btn-green.jpg');border:4px ridge rgba(136, 235, 153, .7);color:#ccedcd;box-shadow:1px 1px 16px #ccedcd;}
	.btn.btn-red{background-image:url('https://www.morana-online.com/game/images/bg-btn-red.jpg');border:4px ridge rgba(235, 145, 136, 0.7);color:#edcccc;box-shadow:1px 1px 16px #edcccc;}
	.btn.btn-gray{background-image:url('https://www.morana-online.com/game/images/bg-btn-gray.jpg');border:4px ridge rgba(100, 100, 100, .7);color:#cccccc;box-shadow:1px 1px 16px #cccccc;}
	.btn.btn-brown{background-image:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg');border:4px ridge rgba(246, 197, 149, .7);color:#edd8cc;box-shadow:1px 1px 16px #edd8cc;}
	.btn:hover{color:#fdda7c;border:4px ridge rgba(251, 179, 52, .6);box-shadow:1px 1px 30px #fbb334;}
		.btn.btn-gray:hover{color:#cccccc;border:4px ridge rgba(100, 100, 100, .7);box-shadow:1px 1px 16px #cccccc;cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;}
	.btn.close{font-size:14px;padding:6px 11px;box-shadow:none;}
		.btn.close:hover{border:4px ridge rgba(232, 89, 75, 0.7);color:#df8888;}

/* Full screen btn */
.fullscreenbtn{position:absolute;z-index:1000;height:28px;width:27px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAAACXBIWXMAAAsTAAALEwEAmpwYAAABb0lEQVRIie2Wr0sEQRTHP7u3gmK8YjKYLSb/ArGIxShi0GC02WziZcXqH2Dw4JIIBsVkVoMIRkHBX8k9d32G9bi9t7Nzs8eICH5hwn7f8v3OezPzZgIR2QZWgZByxMA6cFASXwG2gCGLRgI0EJFbccO+iFAyWo4a5+H37F2QDBjLI7aVsYroh6tIZODugSPFxcCORacBvFBcw3mg3sOIyJWq87FlraqOC6V9YippzVaSiihoVVlDLwgNs/CZoU6oFgKvinz2aPiuvt8CEZkEZoAASIEWcOfJcAqYJcs0AZqBiHjSdsOvbJp/w79tGJFdnot0j8Ue0PSkvwYs0T0Wu4jIjWqwpx6b96XSPus455F6yg6grb6TENAn32cnKGibNs1PGhpv/AgYVVxKsRFrjGC4HVwMp4FrxbWBDeCwxGwZ2DTojbkYDgPjBn7OYrgATJTEehBif7zm8TlgLI8oInul1fv9CTxZYo994h08fAFt/WJyc2BhtQAAAABJRU5ErkJggg==') no-repeat;left:15px;top:40px;}
.fullscreenbtn.active{background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAYAAABvCO8sAAAACXBIWXMAAAsTAAALEwEAmpwYAAABcElEQVRIie2WsUoDQRCGv4unryAEjVgpKFiIWCRKCsHC3jQWWgi+jU1ewMZGfAAR0SKxEAQrwWBEwTYvYA5/iyTkstzdTuSKIP6wsHP/zP4wtzOzSMKzNiS1JD1Imne4oqSGpFdJW4az8DpIqmuIE4c7inFnFsECfgSxfehwU4b4EVgElbL3cb8WzBX/ggBfxrO6FqcQWAcOgBmSf/y2UbAC1FO4CLgAmiFwCSwYD3XLIm4v91ca9oFiAegYxQCeHftljNgOQCCpCOzRS2kWWsB1wvcqsOKJ7QJXwEcgmeo1N0xkWeSKEJgFdoHpDD8Bb8BdAlcGlhht8i4i4Ab4RNK97Kg646YsKTLGPg7GU2mMjKw59ir2ETUHvZTWgEPSO80mw4KOHC5ut4FGQnzQ9zsfCDb7Kw2nZHeQAW6BY5+T5ZZmXaax/f5+HU6kYJCy93G5CH47XNy2ZcvweK1Iakt6krTocCX1XuTvknYsD+EfiCehaRtzBd4AAAAASUVORK5CYII=') no-repeat;}
	.fullscreenbtn:hover{opacity:0.7;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;}

/* Mobile Conditions */
#mobile-conditions{position: fixed;width: 100%;box-sizing: border-box;height: 100vh;z-index: 2999;background-color: #0a0b14;text-align: center;display: none;color: #fff;font-size: 18px;}
#phone-rotate{position:absolute;top:calc(50% - 125px);width:100%;text-align:center;}
#mobile-conditions p{margin:0;}
#phone-logo{display:none;margin-bottom:0 !important;}
#mobile-conditions img{margin-bottom: 20px;}
#mobile-conditions .btn{padding: 10px 20px;display: inline-block;margin-top: 0;font-size:18px;}
@media screen and (orientation: landscape) {
	#mobile-conditions img{margin-bottom:10px;margin-top:-10px;}
	#mobile-conditions .btn{margin-top:10px;padding:5px 10px;}
	#phone-logo{margin-bottom:0 !important;}
}

#version{position:absolute;left:15px;top:15px;color:#fff;z-index:2998;}

/* Ban pub */
#ban{width:728px;height:90px;left:calc(50% - 364px);top:5px;position:fixed;z-index:1999;}
#ban-interstitial{position:absolute;z-index:2999;}

/* Loader */
#loader{position:fixed;width:100%;box-sizing:border-box;height:100vh;z-index:3000;background-color:#0a0b14;text-align:center;}
#loader-wrapper{position:fixed;left:calc(50% - 171px);top:calc(50% - 120px);}
.loader{margin:auto;margin-top:20px;width:56px;height:56px;border-radius:50%;background:conic-gradient(#0000 10%,#f08912);-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 9px),#000 0);animation:spinloader 1s infinite linear;}
@keyframes spinloader{to{transform:rotate(1turn);}}

/* ── Cadeau quotidien — même langage graphique que « Quête accomplie ». ── */
#dailygift {
  --dg-accent:#ffffff;--dg-glow:#ffe8b7;--dg-deep:#5f564a;
  display:none;position:fixed;inset:0;z-index:3100;box-sizing:border-box;
  align-items:center;justify-content:center;padding:12px;
  isolation:isolate;font-family:Arial,sans-serif;color:#f9e7c8;
}
#dailygift.dg-open{display:flex}
#dailygift .dg-backdrop{position:absolute;inset:0;background:radial-gradient(ellipse at center,rgba(7,14,14,.46),rgba(0,0,0,.77));backdrop-filter:blur(5px);animation:dgBackdrop .35s ease both}
#dailygift .dg-card {
  position:relative;box-sizing:border-box;overflow:hidden;width:min(450px,calc(100vw - 24px));
  max-height:calc(100dvh - 20px);overscroll-behavior:contain;
  padding:16px 22px 18px;border:5px ridge rgba(193,161,119,.9);border-radius:6px;
  background:linear-gradient(145deg,rgba(14,17,19,.81),rgba(37,26,19,.76)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #241810;
  box-shadow:0 18px 45px rgba(0,0,0,.85),0 0 35px color-mix(in srgb,var(--dg-accent) 32%,transparent),
    inset 0 0 0 1px rgba(255,231,184,.23),inset 0 0 36px rgba(0,0,0,.53);
  text-align:center;animation:dgEnter .55s cubic-bezier(.16,.86,.2,1.04) both;
}
#dailygift .dg-card::before,#dailygift .dg-card::after{content:"";position:absolute;left:15px;right:15px;height:1px;background:linear-gradient(90deg,transparent,var(--dg-accent),transparent);pointer-events:none}
#dailygift .dg-card::before{top:7px}#dailygift .dg-card::after{bottom:7px;opacity:.62}
#dailygift .dg-glint{position:absolute;z-index:1;pointer-events:none;left:-45%;top:-70%;width:28%;height:230%;transform:rotate(26deg);background:linear-gradient(90deg,transparent,rgba(255,242,210,.19),transparent);animation:dgSweep 1.55s .27s ease-out both}
#dailygift .dg-ornament{font-size:11px;color:var(--dg-glow);text-shadow:0 0 9px var(--dg-accent);letter-spacing:9px;margin:0 0 8px}#dailygift .dg-ornament span{font-size:7px}
#dailygift .dg-chapter{color:#bcb09c;letter-spacing:2.2px;font-weight:bold;font-size:9px}
#dailygift h2{color:#fff4da;text-transform:uppercase;font:24px/1.2 'Sedgwick Ave','Young Serif',Georgia,serif;text-shadow:0 2px 4px #000,0 0 13px var(--dg-deep);margin:6px 0 15px}
#dailygift .dg-reward{position:relative;padding:14px 12px 9px;border:1px solid color-mix(in srgb,var(--dg-accent) 48%,transparent);background:radial-gradient(ellipse at 55% 35%,color-mix(in srgb,var(--dg-deep) 36%,transparent),rgba(0,0,0,.28) 80%);box-shadow:inset 0 0 27px rgba(0,0,0,.5);display:flex;align-items:center;gap:12px;justify-content:center}
#dailygift .dg-seal{width:47px;height:47px;flex:none;transform:rotate(45deg);display:grid;place-items:center;border:2px solid var(--dg-accent);outline:1px solid rgba(255,243,204,.27);outline-offset:4px;background:radial-gradient(circle,rgba(255,255,255,.13),rgba(0,0,0,.62) 70%);box-shadow:0 0 17px color-mix(in srgb,var(--dg-accent) 52%,transparent),inset 0 0 14px color-mix(in srgb,var(--dg-accent) 21%,transparent);animation:dgSeal .75s .1s both}
#dailygift .dg-seal span{transform:rotate(-45deg);font:31px 'Young Serif',Georgia,serif;color:var(--dg-glow);text-shadow:0 0 13px var(--dg-accent)}
#dailygift .dg-reward-core{flex:1;min-width:0}
#dailygift .dg-kicker{color:var(--dg-glow);font:700 9px/1.5 'Young Serif',Georgia,serif;letter-spacing:1.4px;text-shadow:0 0 8px var(--dg-deep)}
#dailygift .dg-chest-image{position:relative;max-width:205px;margin:5px auto 2px}
#dailygift .dg-chest-image::before{content:"";position:absolute;inset:8px 22px;background:var(--dg-accent);opacity:.15;filter:blur(22px);border-radius:50%;animation:dgPulse 3s ease-in-out infinite}
#dailygift .dg-chest-image img{position:relative;display:block;max-width:100%;height:auto;filter:drop-shadow(0 7px 8px #000) drop-shadow(0 0 11px var(--dg-deep))}
#dailygift .dg-itemname{font:700 15px/1.3 'Young Serif',Georgia,serif;color:#fff0d4;text-shadow:0 1px 3px #000}
/* Les sept couleurs sont représentées à parts égales : aucune indication sur
   la rareté réellement tirée, qui ne sera visible qu'au ramassage. */
#dailygift .dg-spectrum{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:12px;row-gap:5px;margin:9px auto 1px;color:#b9a994;font:600 9px/1.3 Arial,sans-serif;letter-spacing:.7px;text-transform:uppercase}
#dailygift .dg-spectrum-colors{display:inline-flex;gap:6px;align-items:center}
#dailygift .dg-spectrum-colors i{display:block;width:7px;height:7px;transform:rotate(45deg);border:1px solid rgba(255,255,255,.25);box-shadow:0 0 3px rgba(0,0,0,.8);border-radius:1px;opacity:.8}
#dailygift .dg-spectrum-colors i:nth-child(1){background:#fff}
#dailygift .dg-spectrum-colors i:nth-child(2){background:#fff3d1}
#dailygift .dg-spectrum-colors i:nth-child(3){background:#ffaf67}
#dailygift .dg-spectrum-colors i:nth-child(4){background:#ff694b}
#dailygift .dg-spectrum-colors i:nth-child(5){background:#dde5a3}
#dailygift .dg-spectrum-colors i:nth-child(6){background:#c9e4ba}
#dailygift .dg-spectrum-colors i:nth-child(7){background:#bed1f2}
#dailygift .dg-description{font-size:12px;line-height:1.55;color:#e3d4c0;max-width:360px;margin:12px auto 11px}
#dailygift .dg-footer{display:flex;gap:9px;align-items:center;justify-content:center;flex-wrap:wrap;padding:9px 0 12px;border-top:1px solid rgba(225,197,144,.25);font-size:10px;color:#d7c8b5}
#dailygift .dg-crystal{color:#ffe2a3;font-weight:bold}#dailygift .dg-ground{color:#b9cfb9}
#dailygift .dg-actions{display:flex;align-items:stretch;justify-content:center;gap:9px;flex-wrap:nowrap}
#dailygift .dg-button{flex:1 1 0;min-width:0;min-height:37px;padding:8px 14px;max-width:100%;font:700 11px/1.2 'Young Serif',Georgia,serif;text-transform:uppercase;letter-spacing:.3px;text-shadow:0 2px 3px #000;border:3px ridge rgba(196,167,126,.72);border-radius:5px;color:#f7ebd4;box-shadow:0 4px 11px #0009;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;transition:transform .15s ease,filter .15s ease,box-shadow .15s ease}
#dailygift .dg-claim{background:linear-gradient(#537e58,#275039);border-color:#93c0a1}
#dailygift .dg-remind{background:linear-gradient(#866d43,#574027);border-color:#d3b479}
#dailygift .dg-bell{font-size:13px;vertical-align:-1px;margin-right:2px;text-shadow:none}
#dailygift .dg-button:hover{filter:brightness(1.18);transform:translateY(-2px);box-shadow:0 6px 16px color-mix(in srgb,var(--dg-accent) 24%,#0008)}
#dailygift .dg-button:focus-visible{outline:2px solid var(--dg-glow);outline-offset:3px}
#dailygift .dg-button:disabled{opacity:.65;cursor:default;transform:none}
#dailygift .dg-button[hidden]{display:none!important}
#dailygift .dg-sparks{position:absolute;inset:0;pointer-events:none}#dailygift .dg-sparks i{position:absolute;left:15%;top:47%;width:3px;height:3px;background:var(--dg-glow);box-shadow:0 0 11px var(--dg-accent);opacity:0;--a:0deg;animation:dgSpark 1.2s .32s ease-out both}
#dailygift .dg-sparks i:nth-child(2){--a:45deg;animation-delay:.38s}#dailygift .dg-sparks i:nth-child(3){--a:90deg;animation-delay:.44s}#dailygift .dg-sparks i:nth-child(4){--a:135deg;animation-delay:.5s}#dailygift .dg-sparks i:nth-child(5){--a:180deg;animation-delay:.56s}#dailygift .dg-sparks i:nth-child(6){--a:225deg;animation-delay:.62s}#dailygift .dg-sparks i:nth-child(7){--a:270deg;animation-delay:.68s}#dailygift .dg-sparks i:nth-child(8){--a:315deg;animation-delay:.74s}
#dailygift.dg-closing .dg-card{animation:dgClose .49s cubic-bezier(.5,0,.95,.43) forwards}
#dailygift.dg-closing .dg-backdrop{animation:dgBackdropOut .49s ease forwards}
#dailygift.dg-closing .dg-sparks i{animation:dgSparkOut .48s ease-out both}
@keyframes dgBackdrop{from{opacity:0}to{opacity:1}}@keyframes dgBackdropOut{to{opacity:0}}
@keyframes dgEnter{from{opacity:0;transform:translateY(-30px) scale(.84);filter:brightness(1.8)}70%{transform:translateY(4px) scale(1.02)}to{opacity:1;transform:translateY(0) scale(1);filter:brightness(1)}}
@keyframes dgClose{0%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1)}37%{opacity:1;transform:translateY(-7px) scale(1.05);filter:brightness(1.8)}100%{opacity:0;transform:translateY(36px) scale(.63);filter:brightness(2.5) blur(9px)}}
@keyframes dgSeal{from{opacity:0;transform:rotate(-30deg) scale(.3)}to{opacity:1;transform:rotate(45deg) scale(1)}}
@keyframes dgSweep{from{left:-48%;opacity:0}30%{opacity:1}to{left:125%;opacity:0}}
@keyframes dgSpark{0%{opacity:0;transform:rotate(var(--a)) translateX(0)}30%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateX(125px)}}
@keyframes dgSparkOut{0%{opacity:0;transform:rotate(var(--a)) translateX(5px)}25%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateX(185px)}}
@keyframes dgPulse{50%{opacity:.28;transform:scale(1.1)}}
@media(max-width:650px){#dailygift .dg-card{width:min(400px,calc(100vw - 16px));padding:11px 13px 13px;border-width:4px}#dailygift h2{font-size:19px;margin:4px 0 9px}#dailygift .dg-reward{padding:8px 8px 6px}#dailygift .dg-seal{width:35px;height:35px}#dailygift .dg-seal span{font-size:25px}#dailygift .dg-chest-image{max-width:170px}#dailygift .dg-description{font-size:11px;margin:8px auto}#dailygift .dg-footer{padding:7px 0 9px;font-size:9px}#dailygift .dg-button{padding:8px 10px;font-size:10px;min-height:34px}}
@media(max-height:460px){#dailygift .dg-ornament,#dailygift .dg-chapter,#dailygift .dg-seal{display:none}#dailygift .dg-chest-image{max-width:125px}#dailygift h2{margin:3px 0 7px}#dailygift .dg-description{margin:6px auto}#dailygift .dg-footer{padding:5px 0}}
@media(prefers-reduced-motion:reduce){#dailygift .dg-backdrop,#dailygift .dg-card,#dailygift .dg-glint,#dailygift .dg-seal,#dailygift .dg-sparks i,#dailygift .dg-chest-image::before,#dailygift.dg-closing .dg-card{animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Information de notifications : toast discret, independant de la fenetre cadeau. */


/* Map name */
.map-name{position:absolute;top:30%;left:50%;transform:translate(-50%, -50%);font-size:48px;color:#ffffff;opacity:0.9;transition:opacity 3s ease;z-index:1000;font-family:'Sedgwick Ave';text-transform:capitalize;text-shadow:1px 1px 2px black;}

/* Tooltip */
#custom-tooltip{position: absolute;display: none;margin-left:20px;z-index: 1000;max-width: 200px;word-wrap: break-word;background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0, 0.5) 20%, rgb(0, 0, 0) 50%, rgb(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0) 100%);color: #f6f6f6;padding: 4px 10px;border-top: 1px solid #757575;border-bottom: 1px solid #757575;opacity: 1;transition: background 1s;}

/* Item dropped */
.name {background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0, 0.5) 20%, rgb(0, 0, 0) 50%, rgb(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0) 100%);color: #7cde6a;padding: 4px 10px;border-top: 1px solid #757575;border-bottom: 1px solid #757575;opacity: 0.8;z-index: 99 !important;transition: background 1s;margin-top:-10px;text-align:center;}
.namePNJ{color: #d579ff;top:-15px;}
.namePNJ.active{opacity: 1.0;background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgb(0, 0, 0) 20%, rgb(0, 0, 0) 50%, rgb(0, 0, 0) 80%, rgba(0, 0, 0, 0.4) 100%);}
	.namePNJ span{color:#ffffff;}
.drop-plate:hover{z-index:1000 !important;pointer-events:auto;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0, pointer;}
.drop-plate.active .name{opacity: 1.0;background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgb(0, 0, 0) 20%, rgb(0, 0, 0) 50%, rgb(0, 0, 0) 80%, rgba(0, 0, 0, 0.4) 100%);}
.drop img{height: 50px;width: auto;margin: 0 auto;display: table;margin-top: 20px;animation: MoveUpDown 2s linear infinite;position: relative;left: 0;bottom: 0;}
.drop img:hover{filter:grayscale(100%);}
img.shadow{position:relative;top:-33px;}
@keyframes MoveUpDown{0%, 100% {bottom:0;} 50% {bottom:10px;}}

/* Fight / Mob */
.mob-label-container{text-align:center;pointer-events:none;background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0, 0.5) 20%, rgb(0, 0, 0) 50%, rgb(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0) 100%);color: #7cde6a;padding: 4px 10px;border-top: 1px solid #757575;border-bottom: 1px solid #757575;opacity: 0.8;transition: background 1s;}
.mob-name{font-family:Arial,sans-serif;font-size:12px;color:white;text-shadow:1px 1px 2px black; margin-bottom:2px;}
.mob-health-bar-container{width:50px;height:4px;background-color:#9d2929;border:1px solid #111;margin:0 auto;position:relative;border-radius:2px;}
.mob-health-bar{width:100%;height:100%;background-color:#399818;position:absolute;top:0;left:0;border-radius:2px;}
.mob-life-points{position:absolute;top:0;left:0;width:100%;height:100%;font-size:10px;color:white;text-align:center;line-height:4px;text-shadow:1px 1px 2px black;}
.player-damage,.mob-damage{font-size:14px;text-shadow:1px 1px 2px black;user-select:none;pointer-events:none;opacity:0;color:#e62626;}
#deathScreen{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(64, 18, 18, 0.7);backdrop-filter:blur(10px);color:white;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;font-family:Arial, sans-serif;display:none;z-index:5000;font-size:14px;}
#deathScreenWrapper{position:absolute;width:100%;height:190px;top:calc(50% - 95px);}
#deathScreen .btn{padding:5px 15px;display:none;}
#deathScreen h1{font-family:'Young Serif', serif;font-size:32px;}
.hp-bar-bg{width:52px;height:4px;background:#222;border:1px solid #555;margin:2px auto 0;}
.hp-bar-fill{height:100%;background:#c33;width:100%;}

/* Chat */
#chat{position:fixed;bottom:10px;left:15px;width:260px;max-height:290px;background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.08);border-radius:8px;backdrop-filter:blur(4px);box-shadow:0 4px 12px rgba(0,0,0,.4);display:flex;flex-direction:column;font-family:Arial,sans-serif;color:#eee;z-index:100}
#chat:hover{background:rgba(0,0,0,.55);}
#chat.chat-active{background:rgba(0,0,0,.55);}
#chat-log{flex:1 1 auto;overflow-y:auto;padding:8px 10px;display:flex;flex-direction:column-reverse;gap:4px;scrollbar-width:thin;scrollbar-color:#444 transparent}
#chat-log::-webkit-scrollbar{width:6px}
#chat-log::-webkit-scrollbar-thumb{background:#444;border-radius:3px}
.chat-msg{font-size:12px;line-height:1.35;word-wrap:break-word;pointer-events:none;text-shadow:0 0 2px rgba(0,0,0,.8)}
.chat-msg.me{color:#5ab2ff}
.chat-msg.system{color:#f0c674}
#chat-input{flex:0 0 auto;border:none;border-top:1px solid rgba(255,255,255,.08);padding:6px 10px;background:rgba(255,255,255,.06);color:#fff;font-size:12px;outline:0}
#chat-input::placeholder{color:#bbb}
.chat-msg.whisper { color:#b975f7; font-style:italic; }
.chat-suggest{position:absolute;background:#242424;border:1px solid #555;list-style:none;margin:0;padding:2px 4px;font:12px/18px sans-serif;max-height:120px;overflow-y:auto;z-index:1000;}
.chat-suggest li{cursor:pointer;padding:1px 2px}
.chat-suggest li.sel{background:#555}
.chat-msg.red { color:#e53935; }
#chat-toggle{position:absolute;top:4px;right:6px;width:22px;height:20px;border:1px solid rgba(255,255,255,.3);border-radius:4px;background:rgba(0,0,0,.25);color:#fdda7c;font-size:14px;line-height:15px;cursor:pointer;transition:background .2s, transform .2s;}
#chat-toggle:hover{background:rgba(0,0,0,.55);}
#chat-toggle::before{content:'−';}
#chat.collapsed #chat-log{max-height:50px;}
#chat.collapsed #chat-toggle::before{content:'+';}

/* Modal Action */
.modal{position:absolute;width:100%;height: 100%;left: 0;top: 0;z-index: 9;display: none;}
#modal_action{z-index: 1;}
#modal_action-content{width:100%;height:100%;color:#fff;font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px #000;display:flex;justify-content:center;align-items:center}
#modal_action-content p{margin:0;display:flex;align-items:center;gap:.6em}
#modal_action-content .btn-action{position:relative;display:inline-block;line-height:0;text-decoration:none}
#modal_action-content .btn-action img{display:block;width:35px;height:auto;border-radius:5px;border:2px ridge rgba(251,179,52,.6)}
#modal_action-content .btn-action .key{position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);height:15px;display:flex;align-items:center;justify-content:center;padding:1px 3px;background:#e1ded2;color:#111;font-family: 'Young Serif', serif;border-radius:2px;box-shadow:0px 0px 3px #111;z-index:2;font-size:11px;text-shadow:none;}

/* Joystick mobile */
#joystick{width:125px;height:125px;opacity:0.5;position:absolute;bottom:5px;left:5px;z-index:101}

/* Game Menu */
#game-menu-wrapper{display:none;width:100%;height:100vh;box-sizing:border-box;position:fixed;z-index:3000;background:rgba(10,11,20,0.9);}
#game-menu,#game-settings{position:fixed;z-index:2000;width:383px;left:calc(50% - 192px);top:calc(50vh - 289px);background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;padding:20px 20px 10px 20px;box-sizing:border-box;color:#ffffff;font-size:14px;}
	#game-menu img{margin-top:-20px;}
	#game-menu h2,#game-settings h2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px black;margin-bottom:5px;color:#ffffff;}
	#game-menu .btn,#game-settings .btn{font-size:13px;padding:10px;display:block;}
	#game-menu .close,#game-settings .close{font-size:11px;padding:5px;}
#game-settings{display:none;}
	#game-settings hr{border:0;border-top:1px solid #ffffff;}
	#flag{list-style:none;margin:0;padding:0;text-align:center;}
		#flag li{display:inline-block;}
			#flag li a{padding:8px 7px 5px 7px;display:block;}
				#flag li a img{transition-duration:0.4s;filter:contrast(60%);}
				#flag li a:hover img,#flag li.current a img{filter:contrast(200%);}
	#bind{margin-bottom:10px;height:265px;padding:5px;overflow-y:scroll;background:rgba(0, 0, 0, .3);border:1px solid #777777;border-radius:5px;}
		#bind table{width:100%;border-collapse:collapse;}
			#bind table tr{background:rgba(0, 0, 0, .4);}
			#bind table tr.dark{background:rgba(0, 0, 0, .6);}
			#bind table td{padding:5px;}
				#bind table td div{width:100px;background:#4a3d32;border-radius:5px;height:20px;text-align:center;font-weight:bold;float:right;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;}
					#bind table td div:hover{background:#59493b;}

/* HUD */
#hud{position:fixed;z-index:100;width:568px;left:calc(50% - 284px);bottom:-1px;background:url('https://www.morana-online.com/game/images/bg-hud.png') no-repeat;background-size:100% 100%;padding:11px;box-sizing:border-box;height:115px;}
	#hud-hp{width:50px;float:left;color:#ffffff;text-align:center;font-weight:bold;}
	#hud-hp-progress{width:calc(100% - 55px);float:left;height:7px;background-color:#3d352a;margin-top:3px;overflow:hidden;}
		#hud-hp-progress div{height:7px;background:linear-gradient(0deg, rgba(0,0,0,0) 0%, rgb(230, 38, 38) 50%, rgba(252,176,69,0) 100%);border-radius:5px;box-shadow:0 0 3px #ff4e3c;}
	#hud-lvl{width:50px;float:left;color:#ffffff;text-align:center;font-weight:bold;}
	#hud-xp-progress{width:calc(100% - 55px);float:left;height:7px;background-color:#3d352a;margin-top:3px;}
		#hud-xp-progress div{height:7px;background:linear-gradient(0deg, rgba(0,0,0,0) 0%, rgb(255, 188, 60) 50%, rgba(252,176,69,0) 100%);border-radius:5px;box-shadow:0 0 3px #ffbc3c;}
	.skill{transition-duration:0.4s;width:56px;height:56px;float:left;background:rgba(0, 0, 0, .3);border:4px ridge rgba(251, 179, 52, .6);border-radius:7px;text-align:center;}
		.skill img{border-radius:7px;position:absolute;left:0;right:0;z-index:1;}
		.skill:hover{border:4px ridge rgba(188,239,255,.7);box-shadow: 1px 1px 15px #6fb9df;}
	.hudsmall{transition-duration:0.4s;width:32px;height:56px;float:left;border:4px ridge rgba(196, 167, 139, 0.7);border-radius:7px;text-align:center;}
		.hudsmall:hover{border:4px ridge rgba(251, 179, 52, .6);box-shadow: 1px 1px 15px #fbb334;}
	.bindbtn{padding:1px 3px;background-color:#e1ded2;color:#111111;position:relative;border-radius:2px;font-family:'Young Serif', serif;box-shadow:0px 0px 3px #111;display:inline-block;margin-top:45px;z-index:2;}
	.hudsmall,.skill{cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;}
	/* Combat cooldowns: rendu léger, sans canvas ni timer par bouton */
	.skill.combat-cooldown-active{cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;box-shadow:inset 0 0 12px rgba(0,0,0,.75);}
	.skill.combat-cooldown-active>img{filter:brightness(.48) saturate(.7);transition:filter .12s linear;}
	.combat-cooldown-mask{display:none;position:absolute;inset:0;z-index:2;pointer-events:none;border-radius:3px;background:conic-gradient(from -90deg,rgba(6,8,15,.78) var(--cooldown-angle,360deg),rgba(6,8,15,.08) 0);box-shadow:inset 0 0 8px rgba(0,0,0,.75);}
	.combat-cooldown-time{display:none;position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);min-width:30px;padding:2px 3px;border-radius:8px;background:rgba(0,0,0,.58);color:#fff;font-family:'Young Serif',serif;font-size:14px;font-weight:bold;line-height:16px;text-align:center;text-shadow:0 1px 3px #000;pointer-events:none;box-sizing:border-box;}
	.combat-cooldown-active>.combat-cooldown-mask,.combat-cooldown-active>.combat-cooldown-time{display:block;}
	.combat-cooldown-ready{animation:combatCooldownReady .22s ease-out;}
	@keyframes combatCooldownReady{0%{filter:brightness(1);transform:scale(1)}45%{filter:brightness(1.65);transform:scale(1.06)}100%{filter:brightness(1);transform:scale(1)}}
	.bindbtn{z-index:4;}
	#hud-mount{background:url('https://www.morana-online.com/game/images/hud-mount.jpg') no-repeat center #4f4134;opacity:0.4}
		#hud-mount .bindbtn{opacity:0.4}
	#hud-tp{background:url('https://www.morana-online.com/game/images/hud-tp.jpg') no-repeat center #4f4134;}
	#hud-inventory{background:url('https://www.morana-online.com/game/images/hud-inventory.jpg') no-repeat center #4f4134;}
	#hud-menu{background:url('https://www.morana-online.com/game/images/hud-menu.jpg') no-repeat center #4f4134;}

/* Inspect player */
#player-actions{display:none;position:fixed;z-index:1000;width:250px;left:calc(50% - 123px);top:calc(50vh - 164px);background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;padding:20px 20px 10px 20px;box-sizing:border-box;}
	#player-actions h2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px black;margin-bottom:5px;color:#ffffff;}
	#player-actions .btn{font-size:13px;padding:10px;display:block;}
	#player-actions .close{font-size:11px;padding:5px;}

/* Confirm box */
#confirm{display:none;position:fixed;z-index:1000;width:250px;left:calc(50% - 123px);top:calc(50vh - 164px);background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;padding:20px 20px 10px 20px;box-sizing:border-box;}
	#confirm .confirm_txt{font-size:16px;color:#ffffff;text-align:center;font-weight:bold;}
	#confirm .btn{text-align:center;font-size:13px;padding:10px;display:block;margin-bottom:10px;}

/* PNJ */
.pnj_shop{display:none;left:-17px;z-index:2000;position:fixed;bottom:0;height:100vh;padding:30px 25px;width:580px;box-sizing:border-box;background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;}
	.pnj_shop .close{right:-24px;}
	.pnj{float:left;width:210px;color:#ffffff;font-size:12px;margin-right:15px;margin-left:5px;}
		.pnj h2{font-family:'Sedgwick Ave';font-size:16px;text-shadow:1px 1px 2px black;text-transform:uppercase;margin-bottom:0px;}
			.pnj img{border:10px ridge rgba(255, 255, 255, .6);border-radius:5px;width:150px;height:150px;}
	.pnj_items{float:left;width:300px;position:relative;height:calc(100vh - 40px);overflow-y:scroll;}
	.pnj_dial{font-size:14px;padding:10px;border:1px solid #cccccc;background:rgba(0, 0, 0, .3);font-weight:bold;margin-top:15px;}
	.pnj_story{overflow-y:auto;height:calc(100vh - 538px);}
	.pnj_pay{display:none;margin-top:15px;}
		.pnj_pay .pnj_accept,.pnj_pay .pnj_cancel{text-align:center;padding:10px;border-radius:5px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;text-transform:uppercase;font-size:11px;width:67px;margin:5px;float:left;}
		.pnj_pay .pnj_accept{background-color:#5bbf69;}
		.pnj_pay .pnj_cancel{background-color:#c03537;}
	.noshop{margin:auto;float:none;}
	.pnj_craft{display:none;float:left;width:300px;position:relative;height:calc(100vh - 40px);overflow-y:scroll;text-align:center;}
		.pnj_craft .greyitem img{filter:grayscale(100%);}
		.pnj_craft .smallitembox{width:300px;padding:10px;margin-bottom:10px;border:8px ridge rgba(255, 255, 255, .6);border-radius:5px;box-sizing:border-box;}
			.pnj_craft .smallitembox:hover{opacity:1;cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;}
		.pnj_craft .craft{display:inline-block;margin-bottom:5px;}
		.pnj_craft .smallitem{border-radius:0;position:relative;padding:5px;border-width:5px;width:36px;height:36px;margin:auto;}
		.pnj_craft .craftplus{display:inline-block;height:34px;width:20px;background:url('https://www.morana-online.com/game/images/craft-plus.png') no-repeat center;}
		.pnj_craft .craftegal{display:inline-block;height:88px;width:20px;background:url('https://www.morana-online.com/game/images/craft-out.png') no-repeat center;}
		.pnj_craft .craftout{line-height:6px;text-align:center;color:#ffffff;margin-top:10px;font-size:13px;font-weight:bold;margin-bottom:0;}
			.pnj_craft .craftout img{opacity:0.7;width:45px;height:45px;}
			.pnj_craft .craftout .smallitem{width:45px;height:45px;}
			.pnj_craft .craftout .randomitem{width:45px;}
			.pnj_craft .craftout .craftegal{height:88px;height:30px;}
		.pnj_craft .randomitem{font-size:30px;position:absolute;width:36px;top:20px;text-shadow:#000 1px 0 5px;font-weight:bold;color:#f75117;}
	.craft_items{margin-bottom:10px;width:100%;box-sizing:border-box;height:175px;}
		.craft_item{width:56px;height:56px;float:left;background:rgba(0, 0, 0, .3);border: 1px solid #cccccc;}
			.craft_item:hover{opacity:0.75;}
	.pnj_menu{display:flex;flex-direction:column;height:100vh;width:45px;position:absolute;right:-26px;top:35px;}
		.pnj_menu .btn{opacity:0.8;margin:1px;font-size:13px;display:flex;padding:5px;}
		.pnj_menu .btn img{filter:drop-shadow(1px 1px 2px #000000);}
		.pnj_menu .btn.craftbtn{display:none;}
		.pnj_menu .btn:hover{opacity:1;border:4px ridge rgba(188,239,255,.7);box-shadow: 1px 1px 15px #6fb9df;}
		.pnj_menu .btn.selected{opacity:1;color:#fdda7c;border:4px ridge rgba(251, 179, 52, .6);box-shadow:1px 1px 30px #fbb334;}
	.pnj_lootbox{display:none;float:left;width:300px;position:relative;height:calc(100vh - 40px);overflow-y:scroll;}
		.pnj_lootbox .smallitembox .gold{border-left:0;font-size:18px;font-weight:bold;margin-top:5px;}
		.pnj_lootbox .btn{margin-bottom:10px;font-size:14px;padding:5px;text-align:center;}
	.smallitemcraft{border-radius:0 !important;padding:5px;width:36px;height:36px;position:relative;}

/* Inventory */	
.inventory{display:none; z-index:2000;color:#ffffff;position:fixed;bottom:0;right:-17px;height:100vh;padding:30px 25px;width:580px;box-sizing:border-box;background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;}
	.inventory .close{left:0;right:auto;}
	.inventory h2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px black;margin-bottom:10px;border-bottom:1px solid #cccccc;padding-bottom:5px;}
	.inventory_attributes{float:left;width:150px;margin-right:15px;height:425px;padding:15px;background:url('https://www.morana-online.com/game/images/bg-attributes.jpg');background-size:cover;border:10px ridge rgba(255, 255, 255, .6);border-radius:5px;}
		.inventory_attributes h2{font-size:14px;margin-bottom:5px;border-bottom:0;}
		.inventory_attributes hr{border:0;margin-top:15px;margin-bottom:15px;border-top:1px solid #cbc8ce;}
		.inventory_attributes table{border:0;border-collapse:collapse;width:100%;color:#ffe0a4;font-size:14px;}
			.inventory_attributes table tr td.score{text-align:right;color:#ffffff;font-weight:bold;padding:3px;}
		.inventory_attributes p{font-size:14px;line-height:25px;font-weight:bold;}
			.inventory_attributes p.center{line-height:18px;}
	.inventory_stuff{position:relative;float:left;width:295px;height:430px;background:url('https://www.morana-online.com/game/images/bg-stuff.png') no-repeat center rgba(0, 0, 0, .3);border:10px ridge rgba(255, 255, 255, .6);border-radius:5px;}
		.inventory_stuff .inventory_item{position:absolute;}
		.inventory_stuff .helmet{top:15px;left:118px;}
		.inventory_stuff .medallion{top:83px;left:118px;}
		.inventory_stuff .armor{top:151px;left:118px;}
		.inventory_stuff .greaves{top:287px;left:118px;}
		.inventory_stuff .belt{top:219px;left:118px;}
		.inventory_stuff .boots{top:355px;left:118px;}
		.inventory_stuff .gloves{top:151px;left:50px;}
		.inventory_stuff .ring{top:219px;left:50px;}
		.inventory_stuff .ring2{top:219px;left:185px;}
		.inventory_stuff .weapon{top:287px;left:50px;}
		.inventory_stuff .shield{top:287px;left:185px;}
	.inventory_mount{position:relative;float:left;width:295px;height:430px;background:url('https://www.morana-online.com/game/images/bg-mount.png') no-repeat center rgba(0, 0, 0, .3);border:10px ridge rgba(255, 255, 255, .6);display:none;border-radius:5px;}
		.inventory_mount .inventory_item{position:absolute;}
		.inventory_mount .mount{top:111px;left:118px;}
		.inventory_mount .whip{top:179px;left:118px;}
		.inventory_mount .saddle{top:247px;left:118px;}
	.inventory_fish{position:relative;float:left;width:295px;height:430px;background:url('https://www.morana-online.com/game/images/bg-fish.png') no-repeat center rgba(0, 0, 0, .3);border:10px ridge rgba(255, 255, 255, .6);display:none;border-radius:5px;}
		.inventory_fish .inventory_item{position:absolute;}
		.inventory_fish .rod{top:184px;left:57px;}
		.inventory_fish .hook{top:184px;left:125px;}
		.inventory_fish .bait{top:184px;left:193px;}
	.inventory_items{margin-top:15px;overflow-y:auto;height:calc(100vh - 600px);border:1px solid #cccccc;}
		.inventory_item{width:56px;height:56px;float:left;background:rgba(0, 0, 0, .3);border:1px solid #cccccc;}
		.inventory_item:hover{opacity:0.75;}
		.inventory_item .smallitem{border-radius:0;position:relative;padding:5px;border-width:5px;width:36px;height:36px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;z-index:1000;}
		.inventory_item.droppable{border:1px solid #ff0000;}
			.inventory_item.droppable .smallitem{border:5px ridge rgba(255, 0, 0, .6);}
				.inventory_item.droppable .smallitem img{filter:grayscale(80%);}
	.inventory_btn{font-weight:bold;float:right;margin-left:5px;font-family:'Sedgwick Ave';font-size:14px;text-transform:uppercase;padding:5px;background-color:#807c79;border-bottom-left-radius:5px;border-bottom-right-radius:5px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;opacity:0.45;}
			.inventory_btn:hover{opacity:0.75;}
			.inventory_btn.active{opacity:0.95;}
			
/* Chest */	
.chest{display:none;color:#ffffff;left:-17px;z-index:2000;position:fixed;bottom:0;height:100vh;padding:30px 25px;width:580px;box-sizing:border-box;background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;}
	.chest .close{right:-24px;}
	.chest h2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px black;margin-bottom:10px;border-bottom:1px solid #cccccc;padding-bottom:5px;}
	.chest_billing{text-align:center;}
	.chest_items{margin-top:15px;overflow-y:auto;height:calc(100vh - 223px);border:1px solid #cccccc;}
		.chest_item{width:56px;height:56px;float:left;background:rgba(0, 0, 0, .3);border:1px solid #cccccc;}
		.chest_item:hover{opacity:0.75;}
		.chest_item .smallitem{border-radius:0;position:relative;padding:5px;border-width:5px;width:36px;height:36px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;z-index:1000;}
		.chest_item.droppable{border:1px solid #ff0000;}
			.chest_item.droppable .smallitem{border:5px ridge rgba(255, 0, 0, .6);}
				.chest_item.droppable .smallitem img{filter:grayscale(80%);}
	.chest_items_wrapper{position:relative;}
		.no_chest{display:none;position:absolute;width:100%;background:rgba(0, 0, 0, .5);backdrop-filter: blur(3px) saturate(1.5);top:0;left:0;right:0;bottom:0;place-items:center;font-size:14px;z-index:2000;}

/* Inbox inventory */
#inbox{position:absolute;right:18px;top:0;z-index:2001;}
	#inbox .btn{animation:shadow 0.35s ease infinite alternate;padding:5px 15px;}
	@keyframes shadow{from{box-shadow:0 0 10px #ffbc3c;} to{box-shadow:0 0 0px #ffbc3c;}}

/* Trade */
.trade{color:#ffffff;position:fixed;bottom:0;left:-17px;height:100vh;padding:30px 25px;width:580px;box-sizing:border-box;background:url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat;background-size:100% 100%;display:none;z-index:2000;}
	.trade h2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:18px;text-shadow:1px 1px 2px black;margin-bottom:5px;}
	.trade_items_player_1,.trade_items_player_2{margin-top:10px;overflow-y:auto;height:116px;border:1px solid #cccccc;}
		.trade_items_player_1.trade_disabled,.trade_items_player_2.trade_disabled{filter:grayscale(1);}
		.trade_name_player_1,.trade_name_player_2{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:14px;text-shadow:1px 1px 2px black;margin-bottom:10px;}
		.trade_name_player_2{margin-top:10px;padding-top:10px;border-top:1px solid #ccc;}
		.trade_item{width:56px;height:56px;float:left;background:rgba(0, 0, 0, .3);border:1px solid #cccccc;}
		.trade_item:hover{opacity:0.75;}
		.trade_item .smallitem{border-radius:0;width:36px;height:36px;position:relative;padding:5px;border-width:5px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;z-index:1000;}
		.trade_item.droppable{border:1px solid #ff0000;}
			.trade_item.droppable .smallitem{border:5px ridge rgba(255, 0, 0, .6);}
				.trade_item.droppable .smallitem img{filter:grayscale(80%);}
		.trade_gold{margin-top:10px;text-align:right;width:170px;color:#ffffff;background:url('https://www.morana-online.com/game/images/gold.png') 15px center no-repeat rgba(0,0,0,.5);border:2px solid #cccccc;padding:15px 35px 15px 16px;cursor:url('https://www.morana-online.com/game/images/cursor-default.png'),default;}
		.trade_gold.disabled{color:#cccccc;filter:grayscale(1);}
	.trade_state{float:right;width:200px;text-align:right;}
		.trade_state_player_1,.trade_state_player_2{width:100%;float:right;margin-top:5px;font-size:14px;}
		.trade_player_1 .btn,.trade_player_2 .btn{box-sizing:border-box;width:100%;text-align:center;padding:10px;border-radius:5px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;text-transform:uppercase;font-size:13px;float:right;margin-top:5px;}

/* Farm */
#hud-farm-wrapper{display:none;background:url('https://www.morana-online.com/game/images/bg-hud-farm.png') no-repeat;background-size:100% 100%;z-index:2000;position:fixed;right:20px;top:calc(50% - 150px);height:300px;width:50px;}
	.hud-farm-btn{transition-duration:0.4s;width:42px;height:42px;position:absolute;bottom:-50px;background:rgba(0, 0, 0, .3);border:4px ridge rgba(251, 179, 52, .6);border-radius:7px;}
		.hud-farm-btn img{border-radius:7px;width:42px;height:42px;}
		.hud-farm-btn:hover{border:4px ridge rgba(188,239,255,.7);box-shadow: 1px 1px 15px #6fb9df;}
	.hud-pick{margin-top:18px;margin-left:15px;height:0px;width:20px;position:relative;background-color:#3d352a;border-radius:5px;}
		.hud-pick-bar{position:absolute;width:100%;background:linear-gradient(90deg, rgba(0,0,0,0) -50%, rgba(230, 136, 131, 0.9) 49%, rgba(255, 146, 146, 0.9) 51%, rgba(252,176,69,0) 150%);top:0;height:260px;width:20px;border-radius:5px;}
	.hud-mine{margin-top:18px;margin-left:15px;height:260px;width:20px;position:relative;background-color:#3d352a;border-radius:5px;}
		.hud-mine-bar{position:absolute;width:100%;background:linear-gradient(90deg, rgba(0,0,0,0) -50%, rgba(227, 227, 227, 0.9) 49%, rgba(206, 206, 206, 0.9) 51%, rgba(252,176,69,0) 150%);bottom:0;height:15px;width:20px;border-radius:5px;animation:moveUpDownHud 1.5s ease-in-out infinite;}
	.hud-mine-middle{position:absolute;top:110px;width:24px;height:30px;border:2px solid #52453a;left:-4px;border-radius:5px;background:rgba(100, 96, 34, 0.4);}
		.hud-mine-middle-bar{position:absolute;top:126px;height:1px;width:100%;background:#9f9995;}
	.hud-fish{margin-top:18px;margin-left:15px;height:260px;width:20px;position:relative;background-color:#3d352a;border-radius:5px;}
		.hud-fish-bar{position:absolute;width:100%;background:linear-gradient(90deg, rgba(0,0,0,0) -50%, rgb(131, 185, 230,0.9) 49%, rgb(146, 206, 255,0.9) 51%, rgba(252,176,69,0) 150%);bottom:0;height:260px;width:20px;border-radius:5px;}
		.hud-fish-middle{position:absolute;top:110px;width:24px;height:30px;border:2px solid #52453a;left:-4px;border-radius:5px;background:rgba(100, 96, 34, 0.4);}
		.hud-fish-middle-bar{position:absolute;top:126px;height:1px;width:100%;background:#9f9995;}
	.hud-lumb{margin-top:18px;margin-left:15px;height:260px;width:20px;position:relative;background-color:#3d352a;border-radius:5px;}
		.hud-lumb-bar{position:absolute;width:100%;background:linear-gradient(90deg, rgba(0,0,0,0) -50%, rgba(217, 182, 145, 0.9) 49%, rgba(221, 170, 132, 0.9) 51%, rgba(252,176,69,0) 150%);bottom:0;height:15px;width:20px;border-radius:5px;animation:moveUpDownHud 3s ease-in-out infinite;}
		.hud-lumb-middle{position:absolute;top:110px;width:24px;height:30px;border:2px solid #52453a;left:-4px;border-radius:5px;background:rgba(100, 96, 34, 0.4);}
		.hud-lumb-middle-bar{position:absolute;top:126px;height:1px;width:100%;background:#9f9995;}
@keyframes moveUpDownHud{0% {transform:translateY(0);} 50% {transform:translateY(-245px);} 100% {transform:translateY(0);}}

/* Item box */
.itembox{font-size:12px;color:#ffffff;width:200px;height:275px;padding:15px;margin:0 5px;background-size:cover;overflow:hidden;}
.itembox h2{margin:0;text-transform:uppercase;font-family:'Sedgwick Ave';text-shadow:1px 1px 2px black;width:115px;text-align:left;font-size:20px;height:65px;}
.itembox img.pic{filter:drop-shadow(2px 2px 5px #000);width:77px;height:77px;position:absolute;right:5px;top:0;}
.itembox img.effect{width:180px;height:180px;position:absolute;right:-44px;top:-47px;animation:rotating 80s linear infinite;opacity:0.8;}
.itembox input[type=text]{width:100px;}
.itembox .scrollbox{height:180px;overflow-y:scroll;}
.itembox.list{float:left;margin-right:10px;margin-bottom:10px;height:400px;}
.itembox .gold{float:left;width:50%;text-align:left;margin-top:10px;padding-top:5px;}
.itembox .point{float:left;width:50%;text-align:right;margin-top:10px;padding-top:5px;}
.common{background:url('https://www.morana-online.com/game/images/rarity/common.jpg');border:10px ridge rgba(255, 255, 255, .6);border-radius:5px;}
	.common .gold,.common .point{border-top:2px solid rgba(255, 255, 255, .6);}
	.common h2,.common stype{color:#ffffff;}
.uncommon{background:url('https://www.morana-online.com/game/images/rarity/uncommon.jpg');border:10px ridge rgba(255, 243, 209, .6);border-radius:5px;}
	.uncommon .gold,.uncommon .point{border-top:2px solid rgba(255, 243, 209, .6);}
	.uncommon h2,.uncommon stype{color:#fff3d1;}
.rare{background:url('https://www.morana-online.com/game/images/rarity/rare.jpg');border:10px ridge rgba(255, 175, 103, .6);border-radius:5px;}
	.rare .gold,.rare .point{border-top:2px solid rgba(255, 175, 103, .6);}
	.rare h2,.rare stype{color:#ffaf67;}
.very-rare{background:url('https://www.morana-online.com/game/images/rarity/very-rare.jpg');border:10px ridge rgba(255, 105, 75, .6);border-radius:5px;}
	.very-rare .gold,.very-rare .point{border-top:2px solid rgba(255, 105, 75, .6);}
	.very-rare h2,.very-rare stype{color:#ff694b;}
.epic{background:url('https://www.morana-online.com/game/images/rarity/epic.jpg');border:10px ridge rgba(221, 229, 163, .6);border-radius:5px;}
	.epic .gold,.epic .point{border-top:2px solid rgba(221, 229, 163, .6);}
	.epic h2,.epic stype{color:#dde5a3;}
.mythic{background:url('https://www.morana-online.com/game/images/rarity/mythic.jpg');border:10px ridge rgba(201, 228, 186, .6);border-radius:5px;}
	.mythic .gold,.mythic .point{border-top:2px solid rgba(201, 228, 186, .6);}
	.mythic h2,.mythic stype{color:#c9e4ba;}
.divine{background:url('https://www.morana-online.com/game/images/rarity/divine.jpg');border:10px ridge rgba(190, 209, 242, .6);border-radius:5px;}
	.divine .gold,.divine .point{border-top:2px solid rgba(190, 209, 242, .6);}
	.divine h2,.divine stype{color:#bed1f2;}
.smallitembox{position:relative;width:280px;margin-bottom:10px;cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png'),pointer;}
	.smallitembox:hover{opacity:0.75;}
	.smallitembox img.pic{position:relative;float:left;width:45px;height:45px;margin-right:10px;}
	.smallitembox img.effect{position:absolute;left:-32px;top:-20px;}
	.smallitembox h2{width:auto;font-size:14px;font-family:'Sedgwick Ave';font-size:14px;text-transform:uppercase;}
	.smallitembox h2 .stype{font-size:12px;font-family:Arial;text-transform:capitalize;}
	.smallitembox .gold,.smallitembox .point{float:right;border-top:0;color:#ffffff;}
	.smallitembox .gold{margin-left:5px;padding-left:5px;border-left:1px solid #ffffff;}
.smallitemfloat{position:absolute;z-index:2001;}
.quantity{position:absolute;right:2px;bottom:0;color:#ffffff;}
.itemboxfloat{display:none;position:absolute;z-index:2001;}
@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}

@media(max-width:1130px){
	#chat{width:180px;}
}
@media(max-width:980px){
	#chat{width:150px;}
}

@media(max-width:920px){
	/* Le HUD recouvre tout l'écran sur mobile : le conteneur ne doit pas
	   bloquer les clics sur les PNJ, le terrain et les objets 3D. */
	#custom-tooltip{display:none !important;}
	#hud{right:0;left:auto;height:100vh;width:100%;bottom:0;background:transparent;pointer-events:none;}
	/* Seuls les vrais boutons du HUD captent les gestes tactiles. */
	#hud .skill,#hud .hudsmall{pointer-events:auto;}
	#hud-hp-progress,#hud-xp-progress{float:right;width:200px;}
	#hud-hp,#hud-lvl{float:right;margin-right:230px;}
		#hud .skill{width:50px;border-width:1px;height:auto;border-radius:50%;margin:5px;height:50px;position:absolute !important;bottom:5px;right:5px;}
			#hud .skill img{width:100%;height:100%;border-radius:50%;}
			#hud .bindbtn{display:none;}
			#hud .combat-cooldown-mask{border-radius:50%;}
			#hud .combat-cooldown-time{font-size:12px;min-width:27px;}
		#hud .hudsmall{width:35px;height:35px;border-width:1px;border-radius:50%;background-position:center -10px;right:10px;position:absolute !important;}
	#hud-menu{bottom:135px;}
	#hud-inventory{bottom:135px;right:55px !important}
	#hud-tp{bottom:135px;right:100px !important}
	#hud-mount{bottom:135px;right:150px !important}
	#skill1{right:135px !important;}
	#skill2{right:70px !important;}
	#hud-jump{bottom:70px !important;}
	#hud-action{bottom:70px !important;right:70px !important;}
	#hud-heal{bottom:70px !important;right:135px !important;}
}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) {
  html.morana-tablet #custom-tooltip { display:none !important; }
  html.morana-tablet #hud { right:0;left:auto;height:100vh;width:100%;bottom:0;background:transparent;pointer-events:none; }
  html.morana-tablet #hud .skill,
  html.morana-tablet #hud .hudsmall { pointer-events:auto; }
  html.morana-tablet #hud-hp-progress,
  html.morana-tablet #hud-xp-progress { float:right;width:200px; }
  html.morana-tablet #hud-hp,
  html.morana-tablet #hud-lvl { float:right;margin-right:230px; }
  html.morana-tablet #hud .skill { width:50px;border-width:1px;height:auto;border-radius:50%;margin:5px;height:50px;position:absolute !important;bottom:5px;right:5px; }
  html.morana-tablet #hud .skill img { width:100%;height:100%;border-radius:50%; }
  html.morana-tablet #hud .bindbtn { display:none; }
  html.morana-tablet #hud .combat-cooldown-mask { border-radius:50%; }
  html.morana-tablet #hud .combat-cooldown-time { font-size:12px;min-width:27px; }
  html.morana-tablet #hud .hudsmall { width:35px;height:35px;border-width:1px;border-radius:50%;background-position:center -10px;right:10px;position:absolute !important; }
  html.morana-tablet #hud-menu { bottom:135px; }
  html.morana-tablet #hud-inventory { bottom:135px;right:55px !important }
  html.morana-tablet #hud-tp { bottom:135px;right:100px !important }
  html.morana-tablet #hud-mount { bottom:135px;right:150px !important }
  html.morana-tablet #skill1 { right:135px !important; }
  html.morana-tablet #skill2 { right:70px !important; }
  html.morana-tablet #hud-jump { bottom:70px !important; }
  html.morana-tablet #hud-action { bottom:70px !important;right:70px !important; }
  html.morana-tablet #hud-heal { bottom:70px !important;right:135px !important; }
}


@media(max-height:700px){
	.inventory h2{margin-bottom:0;padding-bottom:0;border-bottom:0;}
	.inventory_stuff{height:415px;}
	.inventory_attributes{height:415px;}
}

@media (max-height: 600px) or (max-width: 450px) {
	#game-menu, #game-settings{left:0;top:0;width:100%;height:100vh;text-align:center;overflow-y:scroll;}
	#game-menu img{height:75px;width:auto;}
	#game-menu p{margin:5px 0;}
	#game-menu .btn{padding:5px 10px;}
}

@media(max-height:740px) or (max-width: 1170px){
	#cam-toggle{top:19px !important;}
	
	#modal_action-content{font-size:14px;}
	
	#version{top:0;}
	.fullscreenbtn{left:15px;top:20px;}
	
	.inventory,.pnj_shop,.trade{background:url('https://www.morana-online.com/game/images/bg-shop-mobile.png') no-repeat;background-size:100% 100%;}
	
	.right-click,#modal_action-content .btn-action .key{display:none !important;}
	
	.chest{width:350px;padding:20px 10px;}
	.chest .close{right:0;}
	.chest h2{border-bottom:0;padding-bottom:0;margin-bottom:0;font-size:14px;}
	.chest_billing{display:none;}
	.chest_items{margin-top:5px;height:calc(100vh - 55px);margin-left:10px;}
	.chest_item{width:60px;height:60px;}
	.chest_item .smallitem,.chest_item .smallitem img{width:40px;height:40px;}
	
	.pnj_shop{width:350px;top:0;bottom:auto;height:100vh;padding:15px 10px;}
		.pnj_shop .divider{display:none;}
	.pnj_items,.pnj_craft,.pnj_lootbox{width:325px;margin-left:5px;height:calc(100vh - 230px);}
		.pnj_items .smallitembox,.pnj_craft .smallitembox,.pnj_lootbox .smallitembox{box-sizing:border-box;width:100%;}
	.craft_item{width:63px;height:63px;}
	.pnj{width:125px;margin-left:5px;height:200px;}
	.pnj_avatar{float:left;width:120px;margin-right:5px;}
		.pnj_avatar p{font-size:12px;margin:0;}
	.pnj h2{margin-top:5px;margin-bottom:0;font-size:14px;}
	.pnj img{width:100px;height:100px;}
	.pnj_info{float:left;width:calc(100% - 175px);}
	.pnj_dial{margin-top:0;height:115px;width:142px;overflow-y:auto;}
		.pnj_dial p{margin:0;font-size:12px;}
	.pnj_story_w{display:none;}
	.right-click{display:none;}
	.pnj_pay{margin-top:5px;}
	.pnj_menu,.pnj_shop .close{right:-1px;}
	.pnj_pay{width:163px;}
	.pnj_pay .pnj_accept, .pnj_pay .pnj_cancel{width:57px;padding:8px;margin:0 0 5px 0;}
	
	.trade{width:350px;top:0;bottom:auto;height:100vh;padding:10px;}
		.trade_item{width:49px;height:49px;}
			.trade .smallitem,.trade_item img{width:29px;height:29px;}
		.trade h2{display:none;}
		.trade .divider{display:none;}
		.trade_player_1,.trade_player_2{width:325px;margin:10px 0 0 5px;height:auto;box-sizing:border-box;}
		.trade_player_2{margin-top:0px;}
		.trade_items_player_1,.trade_items_player_2{width:317px;height:80px;float:left;margin-top:5px;margin-left:5px;}
		.trade_gold{float:left;width:95px;margin-top:0;margin-right:5px;margin-left:5px;margin-top:3px;background-position:120px center;padding:10px 25px 10px 15px}
		.trade_state{margin-right:2px;width:173px;float:right;}
		.trade_state_player_1, .trade_state_player_2{width:173px;}
		.trade_name_player_1,.trade_name_player_2{margin-bottom:0;margin-left:10px;border-top:0;}
		.trade_name_player_2{margin-top:0;}
		.trade_player_1 .btn, .trade_player_2 .btn{padding:5px;font-size:12px;}
	
	.inventory{width:465px;padding:7px 10px;}
		.inventory .ladder_score td:nth-child(odd){display:none;}
		.inventory_title{display:none;}
		.inventory .inventory_attributes{height:175px;width:100px;margin-right:0;padding:5px;padding-top:0;border:6px ridge rgba(255, 255, 255, .6);}
			.inventory_attributes table{font-size:12px;}
			.inventory_attributes table tr td.score{padding:0;}
			.inventory .inventory_attributes p{line-height:16px;margin-top:0;margin-bottom:0;font-size:12px !important;}
			.inventory_attributes h2{display:none;}
			.inventory_attributes .divider,.inventory_attributes hr{display:none;}
		.inventory_stuff,.inventory_mount,.inventory_fish{height:171px;width:288px;margin-left:5px;}
		.inventory_stuff .inventory_item,.inventory_mount .inventory_item,.inventory_fish .inventory_item{position:relative;float:left;top:auto;left:auto;width:55px;height:55px;}
		.inventory .smallitem,.inventory_stuff .inventory_item img,.inventory_mount .inventory_item img,.inventory_fish .inventory_item img{width:35px;height:35px;}
		.inventory_items{width:435px;margin:3px 0px 0px 0px;height:calc(100vh - 210px);box-sizing:border-box;}
			.inventory_items .inventory_item{width:59px;height:59px;}
			.inventory_items .inventory_item .smallitem,.inventory_items .inventory_item img{width:40px;height:40px;}
		.inventory_btn{margin-right:14px;font-size:12px;padding:5px 0;margin-left:0;margin-top:-37px;border-radius:5px 5px 0 0;width:74px;text-align:center;overflow:hidden;}
		.mount_btn{margin-right:90px;}
		.stuff_btn{margin-right:166px;}
		.inventory .close{left:auto;right:16px;}
	
	.smallitembox h2 .stype,.itembox{font-size:14px;}
	.smallitembox .gold, .smallitembox .point{font-size:14px;}
	
	.itembox{padding:5px;}
	.itembox .gold,.itembox .point{margin-top:5px;}
	.itemboxfloat{width:110px;height:185px;right:305px;border-width:5px;top:15px;}
		.itemboxfloat h2{width:75px;margin:0;font-size:12px;height:52px;}
		.itembox img.effect{width:120px;height:120px;right:-40px;top:-40px;}
		.itembox img.pic{width:45px;height:45px;right:-5px;top:0;}
		.itemboxfloat .scrollbox{height:105px;}
			.itemboxfloat .scrollbox p{margin:5px 0;font-size:11px;}
}
/* ========================================================================== */
/* ARENA EVENTS — interface intégrée au HUD Morana                           */
/* ========================================================================== */
#arena-event-ui{
	--arena-color:#48ccff;
	--arena-accent:#b8f2ff;
	--arena-dark:#0b1820;
	position:fixed;inset:0;z-index:850;pointer-events:none;color:#fff;
	font-family:Arial,sans-serif;text-shadow:1px 1px 2px #000;
}
#arena-event-ui[data-event="alpha"]{--arena-color:#c46cff;--arena-accent:#ffd86b;--arena-dark:#24132e;}
#arena-event-ui[data-event="storm"]{--arena-color:#ff654d;--arena-accent:#ffc45e;--arena-dark:#311611;}
.arena-event-hidden{display:none !important;}

/* Déclenchement plein écran : court, très lisible, sans bloquer le gameplay */
#arena-event-cinematic{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
	background:radial-gradient(circle at center,rgba(7,10,17,.18) 0%,rgba(7,10,17,.54) 58%,rgba(7,10,17,.76) 100%);
	backdrop-filter:blur(1.2px);overflow:hidden;animation:arenaCinematicIn .24s ease-out both;}
#arena-event-cinematic::before,#arena-event-cinematic::after{content:"";position:absolute;left:-10%;width:120%;height:2px;
	background:linear-gradient(90deg,transparent,var(--arena-color),var(--arena-accent),var(--arena-color),transparent);box-shadow:0 0 24px var(--arena-color);}
#arena-event-cinematic::before{top:31%;animation:arenaScanTop .8s ease-out both;}
#arena-event-cinematic::after{bottom:31%;animation:arenaScanBottom .8s ease-out both;}
.arena-event-cinematic-lines{position:absolute;inset:0;opacity:.24;background:
	repeating-linear-gradient(90deg,transparent 0,transparent 79px,rgba(255,255,255,.035) 80px),
	repeating-linear-gradient(0deg,transparent 0,transparent 79px,rgba(255,255,255,.025) 80px);transform:perspective(700px) rotateX(64deg) scale(1.5);}
.arena-event-cinematic-content{position:relative;width:min(720px,88vw);text-align:center;padding:25px 35px 24px;
	background:linear-gradient(90deg,transparent,rgba(6,8,14,.84) 13%,rgba(6,8,14,.94) 50%,rgba(6,8,14,.84) 87%,transparent);
	border-top:1px solid color-mix(in srgb,var(--arena-color) 65%,transparent);border-bottom:1px solid color-mix(in srgb,var(--arena-color) 65%,transparent);}
.arena-event-kicker{font-family:'Young Serif',serif;font-size:13px;letter-spacing:5px;color:var(--arena-accent);margin-bottom:7px;}
.arena-event-cinematic-title{font-family:'Sedgwick Ave';text-transform:uppercase;font-size:44px;line-height:1;color:#fff;
	filter:drop-shadow(0 0 10px var(--arena-color));}
.arena-event-cinematic-subtitle{font-family:'Young Serif',serif;text-transform:uppercase;color:var(--arena-color);font-size:14px;letter-spacing:1.7px;margin-top:9px;}
.arena-event-cinematic-objective{font-size:14px;max-width:560px;margin:11px auto 0;color:#e7eef4;}
.arena-event-cinematic-countdown{margin:14px auto 8px;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;
	border:2px solid var(--arena-color);box-shadow:0 0 16px color-mix(in srgb,var(--arena-color) 65%,transparent),inset 0 0 14px rgba(0,0,0,.7);
	background:rgba(0,0,0,.48);font-family:'Young Serif',serif;font-size:30px;color:var(--arena-accent);}
.arena-event-cinematic-reward{font-weight:bold;color:#ffe6a1;font-size:12px;text-transform:uppercase;letter-spacing:.7px;}

/* HUD persistant d'event */
#arena-event-hud{position:absolute;top:22px;left:50%;transform:translateX(-50%);width:min(650px,calc(100vw - 40px));
	box-sizing:border-box;padding:10px 14px 12px;background:
	linear-gradient(180deg,rgba(13,14,20,.94),rgba(15,12,10,.89)),
	url('https://www.morana-online.com/game/images/bg-shop.png') center/cover;
	border:4px ridge rgba(205,218,225,.5);border-top-color:color-mix(in srgb,var(--arena-color) 75%,#fff);
	border-radius:8px;box-shadow:0 8px 30px rgba(0,0,0,.6),0 0 18px color-mix(in srgb,var(--arena-color) 22%,transparent);
	animation:arenaHudIn .3s ease-out both;}
#arena-event-hud::before{content:"";position:absolute;left:10px;right:10px;top:0;height:2px;background:linear-gradient(90deg,transparent,var(--arena-color),var(--arena-accent),var(--arena-color),transparent);box-shadow:0 0 10px var(--arena-color);}
.arena-event-head{display:flex;align-items:center;gap:10px;min-height:48px;}
.arena-event-emblem{width:44px;height:44px;border:2px solid var(--arena-color);transform:rotate(45deg);display:grid;place-items:center;
	background:radial-gradient(circle,rgba(255,255,255,.08),rgba(0,0,0,.65));box-shadow:0 0 12px color-mix(in srgb,var(--arena-color) 45%,transparent);}
.arena-event-emblem span{display:block;width:19px;height:19px;border:2px solid var(--arena-accent);transform:rotate(45deg);box-shadow:0 0 9px var(--arena-accent);}
#arena-event-ui[data-event="alpha"] .arena-event-emblem{border-radius:50%;}
#arena-event-ui[data-event="storm"] .arena-event-emblem{transform:rotate(22deg);border-radius:2px;}
.arena-event-heading{min-width:0;flex:1;}
.arena-event-overline{font-size:9px;letter-spacing:2.5px;color:var(--arena-accent);font-weight:bold;}
.arena-event-title{display:block;font-family:'Sedgwick Ave';font-size:20px;text-transform:uppercase;line-height:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arena-event-phase{display:block;color:#b8bec6;font-size:11px;margin-top:1px;}
.arena-event-timer{min-width:72px;text-align:right;padding-left:10px;border-left:1px solid rgba(255,255,255,.15);}
.arena-event-timer small{display:block;color:#aab1ba;font-size:9px;letter-spacing:1.5px;}
.arena-event-timer strong{font-family:'Young Serif',serif;color:var(--arena-accent);font-size:22px;line-height:22px;}

.arena-event-wave-rail{height:13px;display:flex;gap:5px;margin:7px 0 6px;}
.arena-event-wave-node{height:5px;flex:1;background:#332f2b;border:1px solid rgba(255,255,255,.12);position:relative;overflow:hidden;transform:skewX(-18deg);}
.arena-event-wave-node.done{background:color-mix(in srgb,var(--arena-color) 55%,#111);box-shadow:0 0 5px var(--arena-color);}
.arena-event-wave-node.active{height:7px;margin-top:-1px;background:linear-gradient(90deg,var(--arena-color),var(--arena-accent));box-shadow:0 0 9px var(--arena-color);}
.arena-event-objective-line{display:flex;align-items:center;gap:7px;padding:5px 8px;background:rgba(0,0,0,.29);border-left:2px solid var(--arena-color);font-size:11px;color:#e4e4e4;}
.arena-event-objective-icon{color:var(--arena-accent);font-size:10px;}

.arena-event-primary-stats{display:grid;grid-template-columns:1.2fr .9fr .9fr 1fr;gap:5px;margin-top:7px;}
.arena-event-stat{background:rgba(0,0,0,.34);border:1px solid rgba(255,255,255,.1);padding:5px 7px;min-height:33px;box-sizing:border-box;}
.arena-event-stat small{display:block;font-size:8px;letter-spacing:1px;color:#aeb4bb;white-space:nowrap;}
.arena-event-stat strong{font-family:'Young Serif',serif;font-size:16px;color:#fff;line-height:17px;}
.arena-event-stat strong .current{color:var(--arena-accent);}
.arena-event-stat strong i{font-style:normal;font-size:10px;color:#747b83;padding:0 2px;}

.arena-event-hp-block{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px;}
.arena-event-hp-row{min-width:0;}
.arena-event-hp-label{display:flex;justify-content:space-between;gap:8px;font-size:8px;letter-spacing:.8px;color:#adb3bb;margin-bottom:3px;}
.arena-event-hp-label strong{color:#e8edf0;letter-spacing:0;font-size:9px;}
.arena-event-progress{height:8px;padding:1px;background:#211e1b;border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 0 5px #000;overflow:hidden;}
.arena-event-progress span{display:block;height:100%;width:100%;background:linear-gradient(90deg,var(--arena-color),var(--arena-accent));box-shadow:0 0 8px var(--arena-color);transition:width .18s linear;}
.arena-wave-hp span{filter:saturate(.8) brightness(.9);}
.arena-alpha-hp-row{grid-column:1 / -1;display:none;padding:4px 6px 5px;border:1px solid color-mix(in srgb,var(--arena-accent) 40%,transparent);background:rgba(20,8,25,.5);}
#arena-event-ui[data-event="alpha"] .arena-alpha-hp-row.active{display:block;}
.arena-alpha-hp span{background:linear-gradient(90deg,#9f49db,var(--arena-accent));}

.arena-event-context-stats{display:flex;gap:5px;margin-top:6px;}
.arena-event-context{flex:1;display:flex;justify-content:space-between;align-items:center;padding:4px 7px;background:rgba(255,255,255,.045);border-bottom:1px solid rgba(255,255,255,.08);}
.arena-event-context small{font-size:8px;letter-spacing:.8px;color:#aab1b8;}
.arena-event-context strong{font-family:'Young Serif',serif;font-size:12px;color:var(--arena-accent);}
.arena-event-reward-preview{display:flex;align-items:center;gap:12px;margin-top:7px;padding:5px 8px;background:linear-gradient(90deg,rgba(76,55,18,.38),rgba(0,0,0,.25));border:1px solid rgba(255,206,93,.22);font-size:9px;color:#ecdcae;}
.arena-event-reward-label{font-weight:bold;letter-spacing:1px;color:#ffd66f;}
.arena-event-reward-potion{color:#bfe9b7;}.arena-event-reward-gold{color:#ffd46d;}
.arena-event-danger{display:none;position:absolute;left:50%;bottom:-32px;transform:translateX(-50%);padding:5px 18px;background:rgba(126,18,18,.9);border:1px solid #ff5e4d;border-radius:0 0 5px 5px;color:#fff;font-family:'Young Serif',serif;font-size:11px;letter-spacing:1px;box-shadow:0 4px 12px rgba(0,0,0,.5);}
#arena-event-hud.danger .arena-event-danger{display:block;animation:arenaDangerPulse .6s ease-in-out infinite alternate;}

/* Bannières de vague / résultat */
#arena-event-wave-banner{position:absolute;top:41%;left:50%;transform:translate(-50%,-50%);min-width:280px;text-align:center;padding:10px 35px;
	background:linear-gradient(90deg,transparent,rgba(4,5,9,.86) 15%,rgba(4,5,9,.94) 50%,rgba(4,5,9,.86) 85%,transparent);border-top:1px solid var(--arena-color);border-bottom:1px solid var(--arena-color);}
#arena-event-wave-banner small{display:block;font-size:9px;letter-spacing:4px;color:var(--arena-accent);}
#arena-event-wave-banner strong{font-family:'Sedgwick Ave';font-size:28px;color:#fff;}
#arena-event-wave-banner span{display:block;color:#bbc1c7;font-size:10px;}
#arena-event-result{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:14px;min-width:390px;max-width:80vw;padding:15px 22px;
	background:linear-gradient(135deg,rgba(13,12,11,.96),rgba(31,24,13,.94));border:5px ridge rgba(255,218,121,.58);border-radius:7px;box-shadow:0 12px 38px rgba(0,0,0,.72),0 0 24px rgba(255,191,68,.2);}
.arena-result-grade{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;font-family:'Young Serif',serif;font-size:47px;color:#ffdf7d;border:3px solid #dba943;box-shadow:0 0 16px rgba(255,193,72,.45),inset 0 0 18px rgba(0,0,0,.7);}
.arena-result-content>small{display:block;color:#e5bc63;font-size:9px;letter-spacing:3px;}.arena-result-title{font-family:'Sedgwick Ave';font-size:22px;text-transform:uppercase;display:block;}
.arena-result-stats{font-size:11px;color:#d1d5d8;margin-top:4px;}.arena-result-rewards{margin-top:7px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);font-size:10px;color:#cfd5da;}.arena-result-rewards strong{display:block;color:#ffd978;font-size:12px;margin-top:2px;}

/* Toasts */
#arena-event-toasts{position:absolute;right:18px;top:145px;width:300px;display:flex;flex-direction:column;gap:5px;align-items:flex-end;}
.arena-event-toast{max-width:280px;padding:7px 10px;background:rgba(13,14,18,.9);border-left:3px solid var(--arena-color);border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 4px 14px rgba(0,0,0,.45);font-size:11px;animation:arenaToastIn .22s ease-out both;}
.arena-event-toast.warning{border-left-color:#ffc65b;}.arena-event-toast.danger{border-left-color:#ff574a;color:#ffd1cc;}.arena-event-toast.reward{border-left-color:#ffd85f;color:#fff0b8;}

/* Labels et états des mobs pendant les events */
.mob-label-container.arena-mob-elite{border-color:var(--arena-color,#63ceff);box-shadow:0 0 8px rgba(100,205,255,.5);opacity:1;}
.mob-label-container.arena-mob-alpha{padding:6px 14px;border-top:2px solid #ffd86b;border-bottom:2px solid #ffd86b;color:#ffe9ad;box-shadow:0 0 12px rgba(213,117,255,.55);opacity:1;}
.mob-label-container.arena-mob-sealed{filter:grayscale(.72);opacity:.6;}
.arena-mob-badge{display:block;margin:-4px auto 2px;font-family:'Young Serif',serif;font-size:9px;letter-spacing:1.4px;color:#ffd86b;text-shadow:0 0 5px #000;}
.arena-mob-elite .arena-mob-badge{color:#9de8ff;}

/* Loot d'or d'event dans le monde */
.arena-world-loot{padding:4px 9px;border-top:1px solid #f2c85b;border-bottom:1px solid #f2c85b;background:linear-gradient(90deg,transparent,rgba(20,14,3,.85) 20%,rgba(20,14,3,.95) 50%,rgba(20,14,3,.85) 80%,transparent);color:#ffe390;font-family:'Young Serif',serif;font-size:11px;white-space:nowrap;opacity:.88;transition:.15s;}
.arena-world-loot.active{transform:scale(1.08);opacity:1;color:#fff2b4;}.arena-world-loot-icon{color:#ffc23d;text-shadow:0 0 6px #ff9e2c;margin-right:3px;}
.arena-zone-label{min-width:150px;text-align:center;padding:5px 12px;background:linear-gradient(90deg,transparent,rgba(0,0,0,.72) 20%,rgba(0,0,0,.88) 50%,rgba(0,0,0,.72) 80%,transparent);border-top:1px solid currentColor;border-bottom:1px solid currentColor;transition:opacity .25s;color:#48ccff;}
.arena-zone-label-alpha{color:#d27bff}.arena-zone-label-storm{color:#ff705a}.arena-zone-label strong{display:block;font-family:'Sedgwick Ave';font-size:14px;text-transform:uppercase;color:#fff;}.arena-zone-label small{display:block;color:#d8dce0;font-size:9px;margin-top:1px;}.arena-zone-kicker{font-size:8px;letter-spacing:2px;font-weight:bold;color:currentColor;}

@keyframes arenaCinematicIn{from{opacity:0}to{opacity:1}}
@keyframes arenaHudIn{from{opacity:0;transform:translate(-50%,-15px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes arenaScanTop{from{transform:translateY(-170px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes arenaScanBottom{from{transform:translateY(170px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes arenaDangerPulse{from{filter:brightness(.85)}to{filter:brightness(1.25)}}
@keyframes arenaToastIn{from{opacity:0;transform:translateX(25px)}to{opacity:1;transform:translateX(0)}}

@media screen and (max-width:920px){
	#arena-event-hud{top:7px;width:calc(100vw - 14px);padding:7px 9px 8px;border-width:2px;}
	.arena-event-emblem{width:32px;height:32px}.arena-event-emblem span{width:13px;height:13px}.arena-event-title{font-size:16px}.arena-event-timer strong{font-size:17px}
	.arena-event-primary-stats{grid-template-columns:1fr 1fr 1fr}.arena-stat-kills{display:none}.arena-event-hp-block{gap:4px}.arena-event-context-c{display:none}.arena-event-reward-label{display:none}.arena-event-reward-preview{justify-content:center;gap:8px}
	.arena-event-cinematic-title{font-size:31px}.arena-event-cinematic-content{padding:18px 15px}.arena-event-cinematic-objective{font-size:12px}.arena-event-cinematic-countdown{width:48px;height:48px;font-size:24px}
	#arena-event-toasts{right:8px;top:122px;width:245px}.arena-event-toast{max-width:225px;font-size:10px}
	#arena-event-result{min-width:0;width:calc(100vw - 36px);box-sizing:border-box;padding:10px 14px}.arena-result-grade{width:58px;height:58px;font-size:35px;flex:none}
}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) {
  html.morana-tablet #arena-event-hud { top:7px;width:calc(100vw - 14px);padding:7px 9px 8px;border-width:2px; }
  html.morana-tablet .arena-event-emblem { width:32px;height:32px }
  html.morana-tablet .arena-event-emblem span { width:13px;height:13px }
  html.morana-tablet .arena-event-title { font-size:16px }
  html.morana-tablet .arena-event-timer strong { font-size:17px }
  html.morana-tablet .arena-event-primary-stats { grid-template-columns:1fr 1fr 1fr }
  html.morana-tablet .arena-stat-kills { display:none }
  html.morana-tablet .arena-event-hp-block { gap:4px }
  html.morana-tablet .arena-event-context-c { display:none }
  html.morana-tablet .arena-event-reward-label { display:none }
  html.morana-tablet .arena-event-reward-preview { justify-content:center;gap:8px }
  html.morana-tablet .arena-event-cinematic-title { font-size:31px }
  html.morana-tablet .arena-event-cinematic-content { padding:18px 15px }
  html.morana-tablet .arena-event-cinematic-objective { font-size:12px }
  html.morana-tablet .arena-event-cinematic-countdown { width:48px;height:48px;font-size:24px }
  html.morana-tablet #arena-event-toasts { right:8px;top:122px;width:245px }
  html.morana-tablet .arena-event-toast { max-width:225px;font-size:10px }
  html.morana-tablet #arena-event-result { min-width:0;width:calc(100vw - 36px);box-sizing:border-box;padding:10px 14px }
  html.morana-tablet .arena-result-grade { width:58px;height:58px;font-size:35px;flex:none }
}


/* ========================================================================== */
/* EVENT FLOW V2 — lecture début / progression / fin + priorité visuelle       */
/* ========================================================================== */
#arena-event-ui{z-index:2600;}
#arena-event-hud{
	top:12px;width:min(760px,calc(100vw - 34px));padding:10px 13px 11px;
	background:
		linear-gradient(180deg,rgba(18,18,22,.94),rgba(8,9,13,.96)),
		url('https://www.morana-online.com/game/images/bg-shop.png') center/cover;
	border:4px ridge rgba(196,167,139,.7);border-radius:8px;
	box-shadow:0 10px 28px rgba(0,0,0,.72),0 0 22px color-mix(in srgb,var(--arena-color) 45%,transparent),inset 0 0 18px rgba(0,0,0,.6);
}
#arena-event-hud::after{content:"EVENT ACTIF";position:absolute;right:11px;top:-10px;padding:2px 8px;background:#141219;border:1px solid var(--arena-color);color:var(--arena-accent);font-size:8px;letter-spacing:1.6px;font-weight:bold;box-shadow:0 0 8px var(--arena-color);}
.arena-event-head{min-height:52px}.arena-event-title{font-size:22px}.arena-event-phase{font-weight:bold;color:#e3e7eb;letter-spacing:.5px}.arena-event-timer strong{font-size:25px;text-shadow:0 0 8px var(--arena-color)}
.arena-event-flow{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin:6px 0 2px;}
.arena-event-flow span{position:relative;padding:4px 5px 3px;text-align:center;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.09);color:#747b84;font-size:8px;letter-spacing:1.2px;font-weight:bold;overflow:hidden;}
.arena-event-flow span::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--arena-color);box-shadow:0 0 8px var(--arena-color);transition:width .25s ease;}
.arena-event-flow span.active{color:#fff;border-color:color-mix(in srgb,var(--arena-color) 48%,#333);background:color-mix(in srgb,var(--arena-dark) 75%,rgba(255,255,255,.04));}
.arena-event-flow span.active::after,.arena-event-flow span.done::after{width:100%;}.arena-event-flow span.done{color:var(--arena-accent)}
.arena-event-primary-stats{grid-template-columns:1.2fr .9fr .9fr 1fr;gap:7px}.arena-event-stat{min-height:39px;padding:6px 8px;border-color:rgba(255,255,255,.15);box-shadow:inset 0 0 8px rgba(0,0,0,.32)}.arena-event-stat strong{font-size:19px}.arena-event-stat small{font-size:8px;color:#c0c5ca}
.arena-event-hp-block{margin-top:8px}.arena-event-progress{height:10px}.arena-event-hp-label{font-size:9px}.arena-event-hp-label strong{font-size:10px}
.arena-event-context-stats{gap:6px}.arena-event-context{min-height:24px;border:1px solid rgba(255,255,255,.08);border-bottom-color:color-mix(in srgb,var(--arena-color) 35%,rgba(255,255,255,.08));}.arena-event-context-party strong{color:#fff}
.arena-event-reward-preview{border-color:rgba(255,206,93,.38);background:linear-gradient(90deg,rgba(88,58,10,.5),rgba(12,11,9,.5));box-shadow:inset 0 0 10px rgba(255,189,50,.06)}
#arena-event-cinematic{z-index:3;background:radial-gradient(circle at center,rgba(4,6,10,.22) 0%,rgba(4,6,10,.69) 62%,rgba(4,6,10,.84) 100%);}
.arena-event-cinematic-content{width:min(760px,90vw);padding:30px 42px 28px;border:5px ridge rgba(196,167,139,.65);border-left:0;border-right:0;box-shadow:0 0 42px rgba(0,0,0,.8),0 0 28px color-mix(in srgb,var(--arena-color) 28%,transparent)}
.arena-event-kicker{font-size:15px;letter-spacing:6px}.arena-event-cinematic-title{font-size:52px}.arena-event-cinematic-subtitle{font-size:16px}.arena-event-cinematic-countdown{width:68px;height:68px;font-size:30px;border-width:3px;box-shadow:0 0 20px var(--arena-color),inset 0 0 18px rgba(0,0,0,.7)}
#arena-event-wave-banner{z-index:4;min-width:360px;padding:14px 45px;border-top:2px solid var(--arena-color);border-bottom:2px solid var(--arena-color);box-shadow:0 0 28px rgba(0,0,0,.8)}#arena-event-wave-banner strong{font-size:34px}#arena-event-wave-banner span{font-size:11px;letter-spacing:1px}
#arena-event-result{z-index:5;top:42%;min-width:470px;padding:20px 28px;border-width:7px;box-shadow:0 16px 48px rgba(0,0,0,.8),0 0 32px rgba(255,191,68,.35)}

/* Les rôles sont volontairement très lisibles : couleur event + grade du mob. */
.mob-label-container.arena-mob-elite{transform:scale(1.08);border-top:2px solid var(--arena-mob-color,#63ceff);border-bottom:2px solid var(--arena-mob-color,#63ceff);box-shadow:0 0 14px var(--arena-mob-color,#63ceff);background:linear-gradient(90deg,transparent,rgba(0,0,0,.72) 16%,rgba(0,0,0,.94) 50%,rgba(0,0,0,.72) 84%,transparent);opacity:1;}
.mob-label-container.arena-mob-alpha{transform:scale(1.16);border-top:3px solid var(--arena-mob-accent,#ffd86b);border-bottom:3px solid var(--arena-mob-accent,#ffd86b);box-shadow:0 0 20px var(--arena-mob-color,#c46cff),0 0 8px var(--arena-mob-accent,#ffd86b);background:linear-gradient(90deg,transparent,rgba(18,4,25,.82) 12%,rgba(8,4,12,.97) 50%,rgba(18,4,25,.82) 88%,transparent);opacity:1;}
.arena-mob-badge{font-size:11px;letter-spacing:2px;padding:1px 6px;color:var(--arena-mob-accent,#ffd86b);text-shadow:0 0 7px var(--arena-mob-color,#63ceff),1px 1px 2px #000}.arena-mob-elite .arena-mob-badge{color:var(--arena-mob-color,#9de8ff)}

@media screen and (max-width:920px){
	#arena-event-hud{top:5px;width:calc(100vw - 10px);padding:6px 8px 7px;border-width:3px}.arena-event-flow{margin-top:3px}.arena-event-flow span{font-size:7px;padding:3px 2px}.arena-event-primary-stats{gap:3px}.arena-event-stat{padding:4px;min-height:32px}.arena-event-stat strong{font-size:15px}.arena-event-context-party{display:none}.arena-event-cinematic-title{font-size:34px}.arena-event-cinematic-content{padding:18px 14px;border-width:3px}#arena-event-wave-banner{min-width:260px;padding:9px 24px}#arena-event-wave-banner strong{font-size:25px}
}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) {
  html.morana-tablet #arena-event-hud { top:5px;width:calc(100vw - 10px);padding:6px 8px 7px;border-width:3px }
  html.morana-tablet .arena-event-flow { margin-top:3px }
  html.morana-tablet .arena-event-flow span { font-size:7px;padding:3px 2px }
  html.morana-tablet .arena-event-primary-stats { gap:3px }
  html.morana-tablet .arena-event-stat { padding:4px;min-height:32px }
  html.morana-tablet .arena-event-stat strong { font-size:15px }
  html.morana-tablet .arena-event-context-party { display:none }
  html.morana-tablet .arena-event-cinematic-title { font-size:34px }
  html.morana-tablet .arena-event-cinematic-content { padding:18px 14px;border-width:3px }
  html.morana-tablet #arena-event-wave-banner { min-width:260px;padding:9px 24px }
  html.morana-tablet #arena-event-wave-banner strong { font-size:25px }
}


/* ========================================================================== */
/* EVENT FLOW — UX COMPACTE                                                   */
/* Conserve les stats essentielles sans recouvrir la zone de jeu.             */
/* ========================================================================== */

/* HUD persistant : panneau latéral compact, jamais au centre. */
#arena-event-hud{
  top:14px !important;
  right:14px !important;
  left:auto !important;
  transform:none !important;
  width:340px !important;
  padding:8px 9px 9px !important;
  border-width:2px !important;
  border-radius:6px !important;
  background:linear-gradient(180deg,rgba(15,16,21,.88),rgba(8,9,13,.91)),url('https://www.morana-online.com/game/images/bg-shop.png') center/cover !important;
  box-shadow:0 6px 18px rgba(0,0,0,.55),0 0 12px color-mix(in srgb,var(--arena-color) 24%,transparent) !important;
  backdrop-filter:blur(3px);
}
#arena-event-hud::after{display:none !important;}
#arena-event-hud::before{left:7px !important;right:7px !important;opacity:.75;}
.arena-event-head{min-height:36px !important;gap:7px !important;}
.arena-event-emblem{width:28px !important;height:28px !important;border-width:1px !important;box-shadow:0 0 7px color-mix(in srgb,var(--arena-color) 40%,transparent) !important;}
.arena-event-emblem span{width:10px !important;height:10px !important;border-width:1px !important;}
.arena-event-overline{display:none !important;}
.arena-event-title{font-size:15px !important;line-height:16px !important;}
.arena-event-phase{font-size:9px !important;line-height:12px !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arena-event-timer{min-width:58px !important;padding-left:7px !important;}
.arena-event-timer small{font-size:7px !important;letter-spacing:1px !important;}
.arena-event-timer strong{font-size:17px !important;line-height:18px !important;text-shadow:0 0 5px var(--arena-color) !important;}

/* Progression : fine et lisible. */
.arena-event-flow{margin:4px 0 3px !important;gap:3px !important;}
.arena-event-flow span{padding:2px 3px !important;font-size:6.5px !important;letter-spacing:.65px !important;border-color:rgba(255,255,255,.06) !important;}
.arena-event-wave-rail{height:7px !important;gap:3px !important;margin:3px 0 4px !important;}
.arena-event-wave-node{height:3px !important;border:0 !important;}
.arena-event-wave-node.active{height:4px !important;margin-top:0 !important;}
.arena-event-objective-line{padding:3px 5px !important;font-size:9px !important;line-height:12px !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.82;}
.arena-event-objective-icon{font-size:7px !important;}

/* 4 chiffres essentiels, compacts. */
.arena-event-primary-stats{grid-template-columns:1fr 1fr 1fr 1fr !important;gap:3px !important;margin-top:4px !important;}
.arena-event-stat{min-height:29px !important;padding:3px 4px !important;border-color:rgba(255,255,255,.07) !important;box-shadow:none !important;}
.arena-event-stat small{font-size:6.5px !important;letter-spacing:.45px !important;}
.arena-event-stat strong{font-size:13px !important;line-height:14px !important;}
.arena-event-stat strong i{font-size:8px !important;padding:0 1px !important;}

/* Les HP restent visibles mais prennent beaucoup moins de hauteur. */
.arena-event-hp-block{display:block !important;margin-top:4px !important;}
.arena-event-hp-row{margin-top:3px !important;}
.arena-event-hp-label{font-size:6.5px !important;margin-bottom:1px !important;}
.arena-event-hp-label strong{font-size:7px !important;}
.arena-event-progress{height:5px !important;padding:0 !important;border-color:rgba(255,255,255,.09) !important;}
.arena-alpha-hp-row{padding:3px 4px !important;margin-top:4px !important;}

/* Stats contextuelles : ligne secondaire très légère. */
.arena-event-context-stats{gap:2px !important;margin-top:4px !important;}
.arena-event-context{min-height:18px !important;padding:2px 4px !important;border:0 !important;background:rgba(255,255,255,.025) !important;}
.arena-event-context small{font-size:6px !important;letter-spacing:.35px !important;}
.arena-event-context strong{font-size:9px !important;}
.arena-event-reward-preview{display:none !important;}
.arena-event-danger{left:auto !important;right:0 !important;bottom:-24px !important;transform:none !important;padding:3px 8px !important;font-size:8px !important;border-radius:0 0 4px 4px !important;letter-spacing:.5px !important;}

/* Déclenchement : carte latérale courte, aucun voile plein écran. */
#arena-event-cinematic{
  position:absolute !important;
  inset:auto !important;
  left:14px !important;
  top:14px !important;
  width:350px !important;
  height:auto !important;
  display:block !important;
  background:none !important;
  backdrop-filter:none !important;
  overflow:visible !important;
  pointer-events:none !important;
}
#arena-event-cinematic::before,#arena-event-cinematic::after,.arena-event-cinematic-lines{display:none !important;}
.arena-event-cinematic-content{
  width:100% !important;
  box-sizing:border-box !important;
  text-align:left !important;
  padding:10px 52px 10px 12px !important;
  background:linear-gradient(100deg,rgba(7,9,14,.94),rgba(12,13,18,.86)) !important;
  border:1px solid color-mix(in srgb,var(--arena-color) 56%,rgba(255,255,255,.08)) !important;
  border-left:3px solid var(--arena-color) !important;
  border-radius:5px !important;
  box-shadow:0 5px 18px rgba(0,0,0,.52),0 0 10px color-mix(in srgb,var(--arena-color) 18%,transparent) !important;
}
.arena-event-kicker{font-size:7px !important;letter-spacing:1.8px !important;margin-bottom:2px !important;}
.arena-event-cinematic-title{font-size:19px !important;line-height:20px !important;filter:none !important;}
.arena-event-cinematic-subtitle{font-size:8px !important;letter-spacing:.6px !important;margin-top:2px !important;}
.arena-event-cinematic-objective{font-size:9px !important;line-height:12px !important;margin:4px 0 0 !important;max-width:270px !important;color:#d8dde2 !important;}
.arena-event-cinematic-countdown{
  position:absolute !important;
  right:10px !important;
  top:10px !important;
  margin:0 !important;
  width:34px !important;
  height:34px !important;
  font-size:16px !important;
  border-width:1px !important;
  box-shadow:0 0 8px color-mix(in srgb,var(--arena-color) 48%,transparent) !important;
}
.arena-event-cinematic-reward{font-size:7px !important;letter-spacing:.25px !important;margin-top:4px !important;color:#e9d49a !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Vagues : notification compacte au-dessus du HUD principal, à droite. */
#arena-event-wave-banner{
  top:auto !important;
  bottom:128px !important;
  right:14px !important;
  left:auto !important;
  transform:none !important;
  min-width:0 !important;
  width:285px !important;
  box-sizing:border-box !important;
  text-align:left !important;
  padding:6px 9px 6px 11px !important;
  background:rgba(7,9,13,.90) !important;
  border:0 !important;
  border-left:3px solid var(--arena-color) !important;
  box-shadow:0 4px 14px rgba(0,0,0,.48) !important;
}
#arena-event-wave-banner small{display:inline-block !important;font-size:6.5px !important;letter-spacing:1px !important;margin-right:6px;}
#arena-event-wave-banner strong{display:inline !important;font-size:15px !important;line-height:16px !important;}
#arena-event-wave-banner span{display:block !important;margin-top:1px !important;font-size:8px !important;line-height:10px !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Résultat : carte de coin, visible mais sans recouvrir l'action/le loot. */
#arena-event-result{
  top:auto !important;
  bottom:128px !important;
  right:14px !important;
  left:auto !important;
  transform:none !important;
  min-width:0 !important;
  width:330px !important;
  max-width:calc(100vw - 28px) !important;
  box-sizing:border-box !important;
  gap:9px !important;
  padding:9px 11px !important;
  border-width:2px !important;
  border-radius:5px !important;
  box-shadow:0 6px 20px rgba(0,0,0,.6),0 0 12px rgba(255,191,68,.16) !important;
}
.arena-result-grade{width:45px !important;height:45px !important;font-size:27px !important;border-width:2px !important;box-shadow:0 0 8px rgba(255,193,72,.35) !important;flex:none;}
.arena-result-content>small{font-size:6.5px !important;letter-spacing:1.3px !important;}
.arena-result-title{font-size:15px !important;line-height:16px !important;}
.arena-result-stats{font-size:8px !important;margin-top:2px !important;}
.arena-result-rewards{font-size:7.5px !important;margin-top:4px !important;padding-top:3px !important;}
.arena-result-rewards strong{font-size:9px !important;margin-top:1px !important;}

/* Toasts très courts, sous le HUD d'event. */
#arena-event-toasts{right:14px !important;top:255px !important;width:285px !important;gap:3px !important;}
.arena-event-toast{max-width:270px !important;padding:4px 7px !important;font-size:8.5px !important;line-height:11px !important;border-left-width:2px !important;box-shadow:0 3px 9px rgba(0,0,0,.4) !important;background:rgba(10,11,15,.86) !important;}

@keyframes arenaHudIn{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:translateX(0)}}
@keyframes arenaCinematicIn{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:translateX(0)}}

/* Mobile / petits écrans : bandeau haut ultra compact. */
@media screen and (max-width:920px){
  #arena-event-hud{top:5px !important;right:5px !important;width:min(315px,calc(100vw - 10px)) !important;padding:5px 6px 6px !important;}
  .arena-event-emblem{display:none !important;}
  .arena-event-title{font-size:13px !important;}
  .arena-event-phase{font-size:7.5px !important;}
  .arena-event-timer strong{font-size:15px !important;}
  .arena-event-objective-line,.arena-event-context-stats{display:none !important;}
  .arena-event-primary-stats{margin-top:3px !important;}
  .arena-event-stat small{font-size:5.5px !important;}.arena-event-stat strong{font-size:11px !important;}
  .arena-event-hp-label{display:none !important;}.arena-event-hp-row{margin-top:2px !important;}.arena-event-progress{height:4px !important;}
  #arena-event-cinematic{left:5px !important;top:5px !important;width:min(300px,calc(100vw - 10px)) !important;}
  .arena-event-cinematic-content{padding:7px 42px 7px 9px !important;}
  .arena-event-cinematic-title{font-size:15px !important;}.arena-event-cinematic-objective{font-size:7.5px !important;}.arena-event-cinematic-subtitle{display:none !important;}.arena-event-cinematic-reward{font-size:6px !important;}
  .arena-event-cinematic-countdown{right:7px !important;top:7px !important;width:28px !important;height:28px !important;font-size:13px !important;}
  #arena-event-wave-banner{right:5px !important;bottom:118px !important;width:245px !important;padding:5px 7px !important;}
  #arena-event-result{right:5px !important;bottom:118px !important;width:min(300px,calc(100vw - 10px)) !important;padding:7px 8px !important;}
  #arena-event-toasts{right:5px !important;top:185px !important;width:235px !important;}
}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) {
  html.morana-tablet #arena-event-hud { top:5px !important;right:5px !important;width:min(315px,calc(100vw - 10px)) !important;padding:5px 6px 6px !important; }
  html.morana-tablet .arena-event-emblem { display:none !important; }
  html.morana-tablet .arena-event-title { font-size:13px !important; }
  html.morana-tablet .arena-event-phase { font-size:7.5px !important; }
  html.morana-tablet .arena-event-timer strong { font-size:15px !important; }
  html.morana-tablet .arena-event-objective-line,
  html.morana-tablet .arena-event-context-stats { display:none !important; }
  html.morana-tablet .arena-event-primary-stats { margin-top:3px !important; }
  html.morana-tablet .arena-event-stat small { font-size:5.5px !important; }
  html.morana-tablet .arena-event-stat strong { font-size:11px !important; }
  html.morana-tablet .arena-event-hp-label { display:none !important; }
  html.morana-tablet .arena-event-hp-row { margin-top:2px !important; }
  html.morana-tablet .arena-event-progress { height:4px !important; }
  html.morana-tablet #arena-event-cinematic { left:5px !important;top:5px !important;width:min(300px,calc(100vw - 10px)) !important; }
  html.morana-tablet .arena-event-cinematic-content { padding:7px 42px 7px 9px !important; }
  html.morana-tablet .arena-event-cinematic-title { font-size:15px !important; }
  html.morana-tablet .arena-event-cinematic-objective { font-size:7.5px !important; }
  html.morana-tablet .arena-event-cinematic-subtitle { display:none !important; }
  html.morana-tablet .arena-event-cinematic-reward { font-size:6px !important; }
  html.morana-tablet .arena-event-cinematic-countdown { right:7px !important;top:7px !important;width:28px !important;height:28px !important;font-size:13px !important; }
  html.morana-tablet #arena-event-wave-banner { right:5px !important;bottom:118px !important;width:245px !important;padding:5px 7px !important; }
  html.morana-tablet #arena-event-result { right:5px !important;bottom:118px !important;width:min(300px,calc(100vw - 10px)) !important;padding:7px 8px !important; }
  html.morana-tablet #arena-event-toasts { right:5px !important;top:185px !important;width:235px !important; }
}


/* ==================================================================
 * EVENTS - VERSION ESSENTIELLE / TRANSITIONS COURTES
 * Informations persistantes minimales, messages contextuels au centre.
 * ================================================================== */
#arena-event-ui{position:fixed;inset:0;z-index:1180;pointer-events:none;font-family:Arial,sans-serif;color:#fff;}
#arena-event-ui.arena-event-hidden-shell{display:block;}
#arena-event-ui .arena-event-hidden{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(-5px) scale(.985)!important;}

#arena-event-hud{
  position:absolute!important;top:14px!important;right:14px!important;left:auto!important;bottom:auto!important;
  width:250px!important;box-sizing:border-box!important;padding:8px 9px 9px!important;
  background:linear-gradient(145deg,rgba(17,18,23,.88),rgba(8,9,13,.78))!important;
  border:1px solid color-mix(in srgb,var(--arena-color,#48ccff) 48%,rgba(255,255,255,.08))!important;
  border-left:3px solid var(--arena-color,#48ccff)!important;border-radius:6px!important;
  box-shadow:0 5px 15px rgba(0,0,0,.46)!important;backdrop-filter:blur(5px)!important;
  transition:opacity .18s ease,transform .18s ease,visibility .18s!important;
  animation:none!important;
}
#arena-event-hud::before,#arena-event-hud::after{display:none!important;}
.arena-event-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:27px!important;margin:0!important;}
.arena-event-heading{min-width:0!important;display:block!important;}
.arena-event-title{display:block!important;font-family:'Young Serif',serif!important;font-size:13px!important;line-height:14px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-transform:uppercase!important;color:#fff!important;}
.arena-event-phase{display:block!important;margin-top:2px!important;font-size:8px!important;line-height:9px!important;color:#aeb5bd!important;letter-spacing:.25px!important;text-transform:uppercase!important;}
.arena-event-timer{min-width:48px!important;padding:0!important;margin:0!important;text-align:right!important;border:0!important;background:none!important;}
.arena-event-timer small{display:block!important;font-size:6px!important;line-height:7px!important;letter-spacing:1px!important;color:#8d969f!important;}
.arena-event-timer strong{display:block!important;font-family:'Young Serif',serif!important;font-size:16px!important;line-height:17px!important;color:var(--arena-color,#48ccff)!important;text-shadow:0 0 5px color-mix(in srgb,var(--arena-color,#48ccff) 55%,transparent)!important;}

.arena-event-essential{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important;margin-top:6px!important;}
#arena-event-hud .arena-event-stat{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:25px!important;padding:3px 5px!important;margin:0!important;border:1px solid rgba(255,255,255,.06)!important;border-radius:4px!important;background:rgba(255,255,255,.025)!important;box-shadow:none!important;}
#arena-event-hud .arena-event-stat small{font-size:6.5px!important;line-height:8px!important;letter-spacing:.55px!important;color:#9ea6af!important;}
#arena-event-hud .arena-event-stat strong{font-family:'Young Serif',serif!important;font-size:12px!important;line-height:13px!important;color:#fff!important;}
#arena-event-hud .arena-event-stat strong i{font-style:normal!important;font-size:8px!important;opacity:.45!important;margin:0 1px!important;}

#arena-event-hud .arena-event-hp-row{display:block!important;margin-top:5px!important;padding:0!important;border:0!important;background:none!important;}
#arena-event-hud .arena-event-hp-label{display:flex!important;justify-content:space-between!important;align-items:center!important;margin-bottom:2px!important;font-size:6px!important;line-height:7px!important;color:#8f98a2!important;letter-spacing:.55px!important;}
#arena-event-hud .arena-event-hp-label strong{font-size:6.5px!important;font-weight:normal!important;color:#bfc6cd!important;}
#arena-event-hud .arena-event-progress{display:block!important;width:100%!important;height:4px!important;padding:0!important;border:0!important;border-radius:3px!important;background:rgba(255,255,255,.08)!important;overflow:hidden!important;box-shadow:none!important;}
#arena-event-hud .arena-event-progress>span{display:block!important;height:100%!important;width:0;border-radius:3px!important;background:linear-gradient(90deg,var(--arena-color,#48ccff),var(--arena-accent,#b8f2ff))!important;box-shadow:0 0 5px color-mix(in srgb,var(--arena-color,#48ccff) 55%,transparent)!important;transition:width .16s linear!important;}
#arena-event-hud .arena-alpha-hp-row{display:none!important;margin-top:6px!important;padding-top:5px!important;border-top:1px solid rgba(255,255,255,.07)!important;}
#arena-event-hud .arena-alpha-hp-row.active{display:block!important;}
#arena-event-hud .arena-alpha-hp-row .arena-event-hp-label span{color:#ffd86b!important;font-weight:bold!important;}
#arena-event-hud .arena-alpha-hp-row .arena-event-progress>span{background:linear-gradient(90deg,#c46cff,#ffd86b)!important;box-shadow:0 0 7px rgba(196,108,255,.65)!important;}

#arena-event-hud .arena-event-danger{display:none!important;position:absolute!important;right:0!important;top:100%!important;margin-top:3px!important;padding:3px 7px!important;border-radius:3px!important;background:rgba(111,19,19,.88)!important;color:#ffb7ad!important;font-size:7px!important;letter-spacing:.6px!important;text-transform:uppercase!important;}
#arena-event-hud.danger .arena-event-danger{display:block!important;}

#arena-event-centerflash{
  position:absolute;left:50%;top:42%;width:min(430px,calc(100vw - 30px));transform:translate(-50%,-50%) scale(1)!important;
  box-sizing:border-box;padding:9px 18px 10px;text-align:center;
  background:linear-gradient(90deg,transparent,rgba(8,9,13,.78) 18%,rgba(8,9,13,.88) 50%,rgba(8,9,13,.78) 82%,transparent);
  border-top:1px solid color-mix(in srgb,var(--arena-color,#48ccff) 62%,transparent);
  border-bottom:1px solid color-mix(in srgb,var(--arena-color,#48ccff) 45%,transparent);
  text-shadow:0 2px 4px #000;transition:opacity .16s ease,transform .18s ease,visibility .16s;animation:arenaEssentialFlash .22s ease-out;
}
#arena-event-centerflash small{display:block;font-size:7px;line-height:8px;letter-spacing:2.2px;text-transform:uppercase;color:var(--arena-accent,#b8f2ff);margin-bottom:2px;}
#arena-event-centerflash strong{display:block;font-family:'Young Serif',serif;font-size:22px;line-height:24px;text-transform:uppercase;color:#fff;}
#arena-event-centerflash span{display:block;margin-top:2px;font-size:9px;line-height:12px;color:#c8cdd2;}
#arena-event-centerflash.alpha strong{color:#ffd86b;text-shadow:0 0 9px rgba(196,108,255,.9),0 2px 4px #000;}
#arena-event-centerflash.danger{border-color:rgba(255,95,75,.6);}
#arena-event-centerflash.danger strong{color:#ff8b79;}
#arena-event-centerflash.success strong,#arena-event-centerflash.complete strong{color:#f8df8c;}
#arena-event-centerflash.complete{top:40%;}
@keyframes arenaEssentialFlash{from{opacity:0;transform:translate(-50%,-50%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

#arena-event-toasts{position:absolute!important;right:14px!important;top:145px!important;width:245px!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:3px!important;}
.arena-event-toast{max-width:235px!important;padding:4px 7px!important;border:0!important;border-left:2px solid var(--arena-color,#48ccff)!important;border-radius:3px!important;background:rgba(8,9,13,.78)!important;box-shadow:0 3px 9px rgba(0,0,0,.36)!important;color:#d9dde1!important;font-size:8px!important;line-height:10px!important;transition:opacity .22s ease,transform .22s ease!important;}
.arena-event-toast.reward{border-left-color:#e2bd54!important;color:#f3df9c!important;}
.arena-event-toast.leaving{opacity:0!important;transform:translateX(10px)!important;}

/* Anciens composants de la version détaillée : neutralisés même si un cache HTML les conserve. */
#arena-event-cinematic,#arena-event-wave-banner,#arena-event-result,.arena-event-flow,.arena-event-wave-rail,.arena-event-objective-line,.arena-event-context-stats,.arena-event-reward-preview,.arena-event-hp-block,.arena-stat-elites,.arena-stat-kills,.arena-wave-hp-row{display:none!important;}

@media(max-width:760px){
  #arena-event-hud{top:5px!important;right:5px!important;width:205px!important;padding:6px 7px 7px!important;}
  .arena-event-title{font-size:11px!important;line-height:12px!important;}.arena-event-phase{font-size:6.5px!important;}
  .arena-event-timer strong{font-size:13px!important;}.arena-event-essential{gap:3px!important;margin-top:4px!important;}
  #arena-event-hud .arena-event-stat{min-height:21px!important;padding:2px 4px!important;}#arena-event-hud .arena-event-stat small{font-size:5.5px!important;}#arena-event-hud .arena-event-stat strong{font-size:10px!important;}
  #arena-event-hud .arena-event-hp-label{display:none!important;}#arena-event-hud .arena-event-hp-row{margin-top:4px!important;}#arena-event-hud .arena-event-progress{height:3px!important;}
  #arena-event-centerflash{top:38%;width:min(330px,calc(100vw - 18px));padding:7px 12px 8px;}#arena-event-centerflash strong{font-size:17px;line-height:19px;}#arena-event-centerflash span{font-size:7.5px;}
  #arena-event-toasts{right:5px!important;top:112px!important;width:205px!important;}.arena-event-toast{max-width:195px!important;font-size:7px!important;}
}

/* HUD arène v2 : lecture accessible, priorités claires, coin supérieur gauche. */
#arena-event-ui #arena-event-hud{
 position:fixed!important;top:64px!important;left:14px!important;right:auto!important;
 transform:none!important;width:min(370px,calc(100vw - 28px))!important;
 padding:14px 15px!important;background:rgba(11,17,26,.96)!important;
 border:1px solid rgba(151,200,225,.5)!important;border-radius:12px!important;
 box-shadow:0 8px 28px rgba(0,0,0,.65)!important;
 backdrop-filter:none!important;color:#f7fbff!important;z-index:100!important;
}
#arena-event-hud .arena-event-head{gap:12px!important;min-height:44px!important;}
#arena-event-hud .arena-event-title{font-family:Arial,sans-serif!important;font-weight:800!important;font-size:19px!important;line-height:1.25!important;letter-spacing:.3px!important;color:#fff!important;}
#arena-event-hud .arena-event-phase{font:600 12px/1.5 Arial,sans-serif!important;color:#dae6ed!important;}
#arena-event-hud .arena-event-timer{min-width:68px!important;padding-left:10px!important;}
#arena-event-hud .arena-event-timer small{font-size:10px!important;color:#c7d7e0!important;}
#arena-event-hud .arena-event-timer strong{font:800 21px/1.25 Arial,sans-serif!important;color:#fff!important;}
#arena-event-hud .arena-event-instruction{margin-top:10px!important;padding:9px 10px!important;border-left:3px solid var(--arena-color,#48ccff)!important;background:rgba(85,164,206,.12)!important;font:600 12px/1.5 Arial,sans-serif!important;color:#f0f8ff!important;}
#arena-event-hud .arena-event-essential{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;margin-top:10px!important;}
#arena-event-hud .arena-event-stat{display:block!important;min-height:54px!important;padding:8px 10px!important;background:#1b2936!important;border:1px solid #405667!important;}
#arena-event-hud .arena-event-stat small{display:block!important;font:700 11px/1.35 Arial,sans-serif!important;letter-spacing:.6px!important;color:#d0dce6!important;}
#arena-event-hud .arena-event-stat strong{display:block!important;margin-top:3px!important;font:800 20px/1.2 Arial,sans-serif!important;color:#fff!important;}
#arena-event-hud .arena-event-stat strong i{font-size:13px!important;color:#d0dce6!important;}
#arena-event-hud .arena-event-secondary{display:flex!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important;padding:9px 1px 2px!important;font:700 12px/1.4 Arial,sans-serif!important;color:#dce9f1!important;}
#arena-event-hud .arena-event-hp-row{display:block!important;margin-top:9px!important;}
#arena-event-hud .arena-event-hp-label{display:flex!important;font:600 11px/1.4 Arial,sans-serif!important;color:#dce9f1!important;letter-spacing:0!important;}
#arena-event-hud .arena-event-hp-label strong{font:600 11px/1.4 Arial,sans-serif!important;color:#fff!important;}
#arena-event-hud .arena-event-progress{height:8px!important;background:#263643!important;}
#arena-event-hud .arena-event-danger{font-size:11px!important;line-height:1.4!important;}
@media(max-width:480px){#arena-event-ui #arena-event-hud{top:48px!important;left:8px!important;width:min(330px,calc(100vw - 16px))!important;padding:10px 11px!important;}}

/* Position finale demandée : HUD lisible dans le coin supérieur droit. */
#arena-event-ui #arena-event-hud{left:auto!important;right:14px!important;top:64px!important;transform:none!important;}
#arena-event-hud .arena-event-secondary{justify-content:flex-start!important;}
@media(max-width:480px){#arena-event-ui #arena-event-hud{left:auto!important;right:8px!important;top:48px!important;}}

/* V5 — avertissement d'attaque impossible à confondre avec une simple notification. */
#arena-event-ui #arena-event-hud .arena-event-aoe{display:none!important;margin-top:9px!important;padding:10px 11px!important;
  border:2px solid #ff745e!important;border-radius:8px!important;background:rgba(74,17,18,.95)!important;
  box-shadow:0 0 0 2px rgba(0,0,0,.65),0 0 20px rgba(245,68,53,.4)!important;
  color:#fff!important;pointer-events:none!important;}
#arena-event-ui #arena-event-hud .arena-event-aoe.active{display:block!important;animation:arena-aoe-alert .6s ease-in-out infinite alternate!important;}
#arena-event-ui .arena-event-aoe-top{display:flex;align-items:center;justify-content:space-between;gap:12px!important;}
#arena-event-ui .arena-event-aoe-name{font:800 13px/1.3 Arial,sans-serif!important;letter-spacing:.4px!important;color:#fff!important;}
#arena-event-ui .arena-event-aoe-time{font:800 22px/1 Arial,sans-serif!important;color:#fff8a6!important;font-variant-numeric:tabular-nums;white-space:nowrap;}
#arena-event-ui .arena-event-aoe-guide{font:700 11px/1.4 Arial,sans-serif!important;margin-top:4px!important;color:#ffe5d7!important;}
#arena-event-ui .arena-event-aoe-track{width:100%!important;height:6px!important;overflow:hidden;margin-top:7px!important;border-radius:8px;background:rgba(0,0,0,.55)!important;}
#arena-event-ui .arena-event-aoe-track>span{display:block;height:100%;width:0;background:#ffef88!important;box-shadow:0 0 10px #ffe77b;}
#arena-event-ui .arena-event-aoe[data-kind="frost"]{border-color:#60cfff!important;background:rgba(16,55,77,.96)!important;}
#arena-event-ui .arena-event-aoe[data-kind="shock"]{border-color:#d691ff!important;background:rgba(65,26,83,.96)!important;}
#arena-event-ui .arena-event-aoe[data-kind="snare"]{border-color:#ffc562!important;background:rgba(82,52,16,.96)!important;}
#arena-event-ui .arena-event-aoe:not(.targeted){animation:none!important;opacity:.85;}
@keyframes arena-aoe-alert{from{box-shadow:0 0 0 1px rgba(255,245,200,.28),0 0 12px rgba(255,95,65,.27)}to{box-shadow:0 0 0 2px rgba(255,245,200,.78),0 0 25px rgba(255,95,65,.7)}}
/* Étiquettes ancrées en 3D au-dessus des télégraphes (CSS2DRenderer déjà actif dans le jeu). */
.arena-aoe-ground-label{pointer-events:none!important;white-space:nowrap!important;padding:5px 10px!important;border:2px solid var(--aoe-tint,#ff7665)!important;
  border-radius:8px!important;background:rgba(13,12,20,.94)!important;color:#fff!important;text-align:center!important;
  font:900 12px/1.2 Arial,sans-serif!important;text-shadow:0 1px 2px #000;box-shadow:0 0 14px var(--aoe-tint,#ff7665)!important;}
.arena-aoe-ground-label small{display:block!important;margin-top:2px!important;color:#ffeec2!important;font:800 13px/1.1 Arial,sans-serif!important;}
@media(max-width:600px){#arena-event-ui #arena-event-hud .arena-event-aoe{padding:7px 8px!important;}
  #arena-event-ui .arena-event-aoe-name{font-size:11px!important;}.arena-aoe-ground-label{font-size:10px!important;}}

/* Résultats d'esquive et impacts réellement perceptibles, sans bloquer les clics. */
#arena-event-ui .arena-event-toast.danger{border-left:4px solid #ff7467!important;background:rgba(87,16,21,.97)!important;color:#fff!important;font-size:11px!important;line-height:1.4!important;padding:7px 10px!important;}
#arena-event-ui .arena-event-toast.success{border-left:4px solid #5affb5!important;background:rgba(9,67,48,.94)!important;color:#e8fff4!important;font-size:11px!important;line-height:1.4!important;padding:7px 10px!important;}

/* === UX 2026 : HUD événement ultra-compact, priorité au monde et aux esquives === */
#arena-event-ui[data-event="eclipse"]{--arena-color:#ffd16b;--arena-accent:#82f2bd;--arena-dark:#29230d;}
#arena-event-ui[data-event="echoes"]{--arena-color:#6fe8dc;--arena-accent:#db96ff;--arena-dark:#11292b;}
#arena-event-ui #arena-event-hud{
  position:fixed!important;right:12px!important;left:auto!important;top:58px!important;
  width:min(238px,calc(100vw - 24px))!important;padding:9px 11px!important;
  border:1px solid rgba(198,216,226,.4)!important;border-left:3px solid var(--arena-color)!important;
  border-radius:9px!important;background:rgba(10,16,25,.92)!important;
  box-shadow:0 6px 20px rgba(0,0,0,.35)!important;pointer-events:none!important;
  backdrop-filter:blur(6px)!important;animation:none!important;
}
#arena-event-hud .arena-event-head{min-height:28px!important;gap:8px!important;}
#arena-event-hud .arena-event-title{font:750 13px/1.3 Arial,sans-serif!important;letter-spacing:.1px!important;}
#arena-event-hud .arena-event-phase{font:500 10px/1.25 Arial,sans-serif!important;margin-top:2px!important;}
#arena-event-hud .arena-event-timer{min-width:42px!important;padding:0!important;}
#arena-event-hud .arena-event-timer small{display:none!important;}
#arena-event-hud .arena-event-timer strong{font:750 16px/1.1 Arial,sans-serif!important;color:var(--arena-accent)!important;}
#arena-event-hud .arena-event-instruction{font:500 10px/1.35 Arial,sans-serif!important;padding:5px 0!important;margin-top:6px!important;border:0!important;background:transparent!important;color:#ccd9e2!important;}
#arena-event-hud .arena-event-essential{display:flex!important;gap:6px!important;margin-top:5px!important;}
#arena-event-hud .arena-event-stat{flex:1!important;min-height:30px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:5px 6px!important;border:1px solid rgba(255,255,255,.08)!important;background:rgba(255,255,255,.035)!important;}
#arena-event-hud .arena-event-stat small{font:600 9px Arial,sans-serif!important;letter-spacing:0!important;}
#arena-event-hud .arena-event-stat strong{font:750 13px Arial,sans-serif!important;margin:0!important;}
#arena-event-hud .arena-event-secondary{display:none!important;}
#arena-event-hud .arena-global-row{display:none!important;}
#arena-event-hud .arena-alpha-hp-row.active{margin-top:5px!important;}
#arena-event-ui #arena-event-hud .arena-event-aoe.active{padding:6px 7px!important;margin-top:6px!important;border-width:1px!important;border-radius:6px!important;box-shadow:none!important;animation:none!important;}
#arena-event-ui .arena-event-aoe-name{font:750 11px/1.3 Arial,sans-serif!important;}
#arena-event-ui .arena-event-aoe-time{font:750 15px/1 Arial,sans-serif!important;}
#arena-event-ui .arena-event-aoe-guide{font:500 10px/1.35 Arial,sans-serif!important;margin-top:2px!important;}
#arena-event-ui .arena-event-aoe-track{height:3px!important;margin-top:4px!important;}
#arena-event-toasts{top:205px!important;right:12px!important;width:min(240px,calc(100vw - 24px))!important;}
.arena-aoe-ground-label{font:800 13px/1.25 Arial,sans-serif!important;border-radius:6px!important;}
@media (max-width:600px){
  #arena-event-ui #arena-event-hud{top:42px!important;right:7px!important;width:min(220px,calc(100vw - 14px))!important;padding:7px 9px!important;}
  #arena-event-hud .arena-event-instruction{display:none!important;}
  #arena-event-toasts{top:155px!important;right:7px!important;}
}
@media (prefers-reduced-motion:reduce){
  #arena-event-ui *,#arena-event-ui *::before,#arena-event-ui *::after{animation-duration:.01ms!important;transition-duration:.01ms!important;}
}


/* --- AOE feed détaché du panneau d'événement --- */
#arena-aoe-feed{position:absolute;top:14px;right:274px;width:min(320px,calc(100vw - 300px));display:flex;flex-direction:column;gap:8px;pointer-events:none;}
#arena-aoe-feed:not(.active){display:none;}
#arena-aoe-feed .arena-aoe-badge{padding:9px 10px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:linear-gradient(160deg,rgba(10,12,17,.92),rgba(18,20,28,.76));box-shadow:0 10px 26px rgba(0,0,0,.38),inset 0 0 0 1px rgba(255,255,255,.04);backdrop-filter:blur(10px);}
#arena-aoe-feed .arena-aoe-badge-top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
#arena-aoe-feed .arena-aoe-badge-name{font:900 12px/1.2 Arial,sans-serif;letter-spacing:.4px;text-transform:uppercase;color:#fff;text-shadow:0 1px 3px #000;}
#arena-aoe-feed .arena-aoe-badge-time{font:900 18px/1 'Young Serif',serif;color:#fff7cb;text-shadow:0 0 12px rgba(255,245,200,.35);}
#arena-aoe-feed .arena-aoe-badge-guide{margin-top:5px;font:600 11px/1.35 Arial,sans-serif;color:#dfe6ed;}
#arena-aoe-feed .arena-aoe-badge-track{position:relative;height:5px;margin-top:7px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.08);}
#arena-aoe-feed .arena-aoe-badge-track>span{display:block;height:100%;border-radius:999px;box-shadow:0 0 15px currentColor;}
#arena-aoe-feed .arena-aoe-badge[data-kind="blast"]{border-color:rgba(255,96,69,.4);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(255,96,69,.15),0 0 24px rgba(255,96,69,.14);}
#arena-aoe-feed .arena-aoe-badge[data-kind="blast"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#ff9f78,#ff5b3e);color:#ff6a52;}
#arena-aoe-feed .arena-aoe-badge[data-kind="shock"]{border-color:rgba(198,120,255,.42);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(198,120,255,.16),0 0 24px rgba(198,120,255,.14);}
#arena-aoe-feed .arena-aoe-badge[data-kind="shock"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#f0b3ff,#b975ff);color:#c678ff;}
#arena-aoe-feed .arena-aoe-badge[data-kind="frost"]{border-color:rgba(74,207,255,.42);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(74,207,255,.15),0 0 24px rgba(74,207,255,.12);}
#arena-aoe-feed .arena-aoe-badge[data-kind="frost"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#b8f4ff,#49d2ff);color:#55d4ff;}
#arena-aoe-feed .arena-aoe-badge[data-kind="snare"]{border-color:rgba(255,193,79,.4);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(255,193,79,.14),0 0 24px rgba(255,193,79,.12);}
#arena-aoe-feed .arena-aoe-badge[data-kind="snare"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#ffefb8,#ffbf4f);color:#ffc14f;}
#arena-aoe-feed .arena-aoe-badge[data-kind="eclipse"]{border-color:rgba(255,209,107,.44);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(255,209,107,.16),0 0 24px rgba(130,242,189,.14);}
#arena-aoe-feed .arena-aoe-badge[data-kind="eclipse"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#82f2bd,#ffd16b);color:#ffd16b;}
#arena-aoe-feed .arena-aoe-badge[data-kind="echo"]{border-color:rgba(151,102,255,.44);box-shadow:0 10px 26px rgba(0,0,0,.38),0 0 0 1px rgba(151,102,255,.15),0 0 24px rgba(151,102,255,.14);}
#arena-aoe-feed .arena-aoe-badge[data-kind="echo"] .arena-aoe-badge-track>span{background:linear-gradient(90deg,#7ef6e5,#b37dff);color:#a972ff;}

.player-damage,.mob-damage{font-weight:900!important;font-size:24px!important;letter-spacing:.5px;padding:2px 8px;border-radius:999px;background:linear-gradient(180deg,rgba(22,12,12,.78),rgba(50,12,12,.48));border:1px solid rgba(255,255,255,.09);text-shadow:0 2px 0 rgba(0,0,0,.5),0 0 14px rgba(255,84,84,.45)!important;box-shadow:0 0 16px rgba(0,0,0,.25);opacity:1!important;transform:translateY(0) scale(1);animation:combatFloatUp .95s ease-out forwards;}
.player-damage{color:#ffd6cf;border-color:rgba(255,116,116,.22);background:linear-gradient(180deg,rgba(61,18,18,.86),rgba(25,9,9,.5));}
.mob-damage{color:#fff4cc;border-color:rgba(255,226,124,.2);background:linear-gradient(180deg,rgba(63,34,5,.84),rgba(22,13,6,.48));}
@keyframes combatFloatUp{0%{opacity:0;transform:translateY(14px) scale(.72);}15%{opacity:1;transform:translateY(0) scale(1.18);}100%{opacity:0;transform:translateY(-38px) scale(.96);}}
@media(max-width:920px){#arena-aoe-feed{right:10px;top:152px;width:min(280px,calc(100vw - 20px));}}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) {
  html.morana-tablet #arena-aoe-feed { right:10px;top:152px;width:min(280px,calc(100vw - 20px)); }
}



/* COMBAT V3 - nombres de dégâts dans l'espace du monde, ancrage CSS2D sans transform. */
.combat-damage-anchor{pointer-events:none!important;white-space:nowrap;user-select:none;-webkit-user-select:none;z-index:9999;}
.combat-damage-chip{
  --damage-x:0px;display:inline-flex;align-items:center;justify-content:center;min-width:46px;
  padding:5px 11px;border-radius:10px;border:2px solid rgba(255,245,207,.62);
  background:linear-gradient(165deg,rgba(35,23,13,.94),rgba(8,12,17,.92));
  color:#ffe5a4;font:900 clamp(20px,2.1vw,30px)/1.1 Arial,sans-serif;
  letter-spacing:.6px;font-variant-numeric:tabular-nums;font-feature-settings:'tnum';
  text-shadow:0 2px 0 #31190b,0 0 16px rgba(255,201,110,.75),0 0 3px #000;
  box-shadow:0 4px 14px rgba(0,0,0,.5),0 0 20px rgba(255,179,83,.20);
  filter:drop-shadow(0 3px 3px rgba(0,0,0,.75));
  animation:combatDamagePop 1120ms cubic-bezier(.17,.64,.21,1) both;
  will-change:transform,opacity;
}
.combat-damage-incoming{
  font-size:clamp(23px,2.5vw,34px);color:#fff4f0;
  border-color:#ff887f;background:linear-gradient(145deg,rgba(129,24,33,.97),rgba(31,6,14,.95));
  text-shadow:0 1px 0 #6d1721,0 0 17px rgba(255,96,102,.92),0 2px 5px #000;
  box-shadow:0 3px 16px rgba(0,0,0,.60),0 0 25px rgba(255,69,84,.50);
}
.combat-damage-frost{border-color:#82ecff;color:#e2faff;background:linear-gradient(145deg,#186585,#0b223b);text-shadow:0 0 17px #7cebff,0 1px 4px #001b36;}
.combat-damage-magic{border-color:#d1a6ff;color:#f2dbff;background:linear-gradient(145deg,#64409d,#251540);text-shadow:0 0 17px #c988ff,0 1px 4px #210c38;}
.combat-damage-blast{border-color:#ffb169;color:#fff1cc;background:linear-gradient(145deg,#ba4822,#3e140a);text-shadow:0 0 17px #ffb069,0 1px 4px #351208;}
.combat-damage-heavy{font-size:clamp(27px,3.1vw,39px);border-width:3px;}
@keyframes combatDamagePop{
  0%{opacity:0;transform:translate3d(var(--damage-x),16px,0) scale(.68);}
  12%{opacity:1;transform:translate3d(var(--damage-x),-2px,0) scale(1.18);}
  28%{opacity:1;transform:translate3d(var(--damage-x),-8px,0) scale(1);}
  70%{opacity:1;transform:translate3d(var(--damage-x),-25px,0) scale(1);}
  100%{opacity:0;transform:translate3d(var(--damage-x),-52px,0) scale(.95);}
}
#combat-hit-vignette{position:fixed!important;inset:0;z-index:1160;pointer-events:none!important;opacity:0;
  --impact-glow:rgba(255,61,70,.55);
  box-shadow:inset 0 0 90px 28px var(--impact-glow),inset 0 0 15px 2px var(--impact-glow);}
#combat-hit-vignette[data-kind="frost"]{--impact-glow:rgba(68,202,255,.50);}
#combat-hit-vignette[data-kind="shock"],#combat-hit-vignette[data-kind="echo"]{--impact-glow:rgba(180,89,255,.46);}
#combat-hit-vignette[data-kind="blast"]{--impact-glow:rgba(255,113,40,.54);}
#combat-hit-vignette.combat-hit-pulse{animation:combatHitPulse 360ms ease-out both;}
@keyframes combatHitPulse{0%{opacity:0;}22%{opacity:.95;}100%{opacity:0;}}
@media(max-width:600px){.combat-damage-chip{font-size:22px;}.combat-damage-incoming{font-size:25px;}}
@media(prefers-reduced-motion:reduce){.combat-damage-chip{animation:none!important;opacity:1!important;}.combat-hit-pulse{animation:none!important;}}


/* === V4 esthétique médiévale / combat lisible === */

/* Nombres de dégâts : plus petits, sans cadre, intégrés à l'univers visuel. */
.combat-damage-anchor{z-index:9999;}
.combat-damage-chip{
  --damage-x:0px;
  display:inline-block;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.72));
  color:#f3d59a;
  font:700 clamp(17px,1.55vw,22px)/1 'Young Serif',serif;
  letter-spacing:.25px;
  text-shadow:
    0 1px 0 rgba(73,35,11,.92),
    0 0 5px rgba(255,214,130,.30),
    0 2px 3px rgba(0,0,0,.68);
  animation:combatDamagePopMedieval 1080ms cubic-bezier(.17,.64,.21,1) both;
  will-change:transform,opacity;
}
.combat-damage-outgoing{color:#f0d39a;}
.combat-damage-incoming{
  color:#f1d7cf;
  font-size:clamp(18px,1.7vw,24px);
  text-shadow:
    0 1px 0 rgba(93,25,20,.95),
    0 0 6px rgba(173,42,32,.26),
    0 2px 3px rgba(0,0,0,.78);
}
.combat-damage-frost{color:#d7f1ff;text-shadow:0 1px 0 rgba(15,67,92,.95),0 0 6px rgba(114,214,255,.28),0 2px 3px rgba(0,0,0,.72);}
.combat-damage-magic{color:#ead7ff;text-shadow:0 1px 0 rgba(69,38,116,.95),0 0 6px rgba(183,122,255,.26),0 2px 3px rgba(0,0,0,.72);}
.combat-damage-blast{color:#ffe0b7;text-shadow:0 1px 0 rgba(110,51,16,.95),0 0 6px rgba(255,163,85,.28),0 2px 3px rgba(0,0,0,.72);}
.combat-damage-heavy{font-size:clamp(21px,2vw,28px);}
@keyframes combatDamagePopMedieval{
  0%{opacity:0;transform:translate3d(var(--damage-x),10px,0) scale(.84);}
  15%{opacity:1;transform:translate3d(var(--damage-x),-2px,0) scale(1.08);}
  36%{opacity:1;transform:translate3d(var(--damage-x),-8px,0) scale(1);}
  78%{opacity:.95;transform:translate3d(var(--damage-x),-22px,0) scale(1);}
  100%{opacity:0;transform:translate3d(var(--damage-x),-40px,0) scale(.97);}
}

/* Impact reçu : flash plus organique et moins néon. */
#combat-hit-vignette{
  position:fixed!important;inset:0;z-index:1160;pointer-events:none!important;opacity:0;
  --impact-glow:rgba(142,26,24,.52);
  background:radial-gradient(circle at center,rgba(255,255,255,0) 42%,rgba(37,10,8,.04) 58%,rgba(49,10,8,.10) 74%,rgba(20,7,6,.34) 100%);
  box-shadow:inset 0 0 120px 42px var(--impact-glow),inset 0 0 20px 6px rgba(24,8,6,.38);
}
#combat-hit-vignette[data-kind="frost"]{--impact-glow:rgba(62,150,191,.38);}
#combat-hit-vignette[data-kind="shock"],#combat-hit-vignette[data-kind="echo"]{--impact-glow:rgba(113,68,161,.34);}
#combat-hit-vignette[data-kind="blast"]{--impact-glow:rgba(153,74,26,.40);}
#combat-hit-vignette.combat-hit-pulse{animation:combatHitPulseMedieval 440ms ease-out both;}
@keyframes combatHitPulseMedieval{0%{opacity:0;}24%{opacity:.82;}100%{opacity:0;}}

/* Vie basse : voile permanent progressif et plus dramatique. */
#combat-lowlife-vignette{
  position:fixed!important;inset:0;z-index:1150;pointer-events:none!important;opacity:0;transition:opacity .28s ease;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0) 36%, rgba(57,12,10,.10) 60%, rgba(38,6,6,.34) 79%, rgba(21,4,4,.72) 100%),
    linear-gradient(180deg, rgba(56,11,9,.08), rgba(17,3,3,.18));
  mix-blend-mode:normal;
}
#combat-lowlife-vignette.active{opacity:1;}
#combat-lowlife-vignette[data-level="low"]{animation:lowLifeBreath 2.2s ease-in-out infinite;}
#combat-lowlife-vignette[data-level="critical"]{opacity:1;animation:lowLifeCritical 1.25s ease-in-out infinite;}
@keyframes lowLifeBreath{0%,100%{box-shadow:inset 0 0 110px 26px rgba(117,20,18,.36);}50%{box-shadow:inset 0 0 140px 34px rgba(145,26,22,.54);}}
@keyframes lowLifeCritical{0%,100%{box-shadow:inset 0 0 132px 35px rgba(142,18,15,.48);}50%{box-shadow:inset 0 0 190px 58px rgba(186,28,24,.74);}}

/* Barre de vie principale : aspect plus médiéval et état critique visible. */
#hud-hp{font-family:'Young Serif',serif;letter-spacing:.5px;color:#f1e1bf;text-shadow:0 1px 2px #000;}
#hud-hp-progress{
  position:relative;overflow:hidden;border:1px solid rgba(90,60,34,.95);border-radius:3px;
  background:linear-gradient(180deg,#21160e,#4d3924 45%,#22170d);
  box-shadow:inset 0 0 0 1px rgba(212,177,122,.14), inset 0 1px 3px rgba(0,0,0,.7), 0 1px 3px rgba(0,0,0,.35);
}
#hud-hp-progress::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,239,201,.18),rgba(255,255,255,0) 45%,rgba(0,0,0,.1) 100%);
}
#hud-hp-progress>div{
  position:relative;height:7px;border-radius:2px;
  box-shadow:inset 0 0 4px rgba(255,255,255,.12),0 0 6px rgba(154,35,24,.38);
}
#hud-hp-progress[data-state="low"]{box-shadow:inset 0 0 0 1px rgba(212,177,122,.14), inset 0 1px 3px rgba(0,0,0,.7), 0 0 8px rgba(165,48,30,.40);}
#hud-hp-progress[data-state="critical"]{animation:hudCriticalPulse 1.1s ease-in-out infinite;}
#hud-hp-progress[data-state="critical"]>div{box-shadow:0 0 10px rgba(205,54,44,.74), inset 0 0 4px rgba(255,210,210,.14);}
@keyframes hudCriticalPulse{0%,100%{box-shadow:inset 0 0 0 1px rgba(212,177,122,.14), inset 0 1px 3px rgba(0,0,0,.7), 0 0 8px rgba(172,39,29,.30);}50%{box-shadow:inset 0 0 0 1px rgba(212,177,122,.16), inset 0 1px 3px rgba(0,0,0,.74), 0 0 16px rgba(212,46,32,.62);}}

/* Panneau d'event : plus parchemin / laiton, moins techno. */
#arena-event-ui{--arena-paper:#1f1712;--arena-paper-soft:rgba(32,24,18,.94);--arena-trim:#9b7b4e;--arena-trim-soft:rgba(184,156,108,.34);}
#arena-event-ui #arena-event-hud{
  border:1px solid rgba(161,132,87,.62)!important;
  border-left:4px solid color-mix(in srgb,var(--arena-color) 52%, #b9935a)!important;
  background:
    linear-gradient(180deg,rgba(43,32,24,.96),rgba(24,18,14,.95)),
    repeating-linear-gradient(180deg,rgba(255,255,255,.018) 0,rgba(255,255,255,.018) 1px,transparent 1px,transparent 4px)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.42), inset 0 0 0 1px rgba(214,185,133,.06), inset 0 10px 18px rgba(255,233,198,.02)!important;
  color:#efe2c3!important;
}
#arena-event-hud::before{background:linear-gradient(90deg,transparent,#8a6d42,var(--arena-accent),#8a6d42,transparent)!important;box-shadow:0 0 6px rgba(201,165,98,.35)!important;}
#arena-event-hud .arena-event-title{font-family:'Young Serif',serif!important;letter-spacing:.25px!important;color:#f2e4c2!important;text-shadow:0 1px 2px rgba(0,0,0,.55)!important;}
#arena-event-hud .arena-event-phase,
#arena-event-hud .arena-event-instruction,
#arena-event-hud .arena-event-stat small,
#arena-event-hud .arena-event-hp-label,
#arena-event-hud .arena-event-secondary{color:#c7b79a!important;}
#arena-event-hud .arena-event-timer strong,
#arena-event-hud .arena-event-stat strong,
#arena-event-hud .arena-event-hp-label strong{color:#f4e6c4!important;text-shadow:none!important;}
#arena-event-hud .arena-event-essential .arena-event-stat,
#arena-event-hud .arena-event-hp-row,
#arena-event-hud .arena-event-alpha-hp-row,
#arena-event-hud .arena-event-secondary{
  background:linear-gradient(180deg,rgba(255,248,227,.03),rgba(0,0,0,.04))!important;
}
#arena-event-hud .arena-event-stat{border:1px solid rgba(157,128,84,.22)!important;}
#arena-event-hud .arena-event-progress{background:#261d16!important;border:1px solid rgba(122,92,57,.52)!important;box-shadow:inset 0 0 4px rgba(0,0,0,.7)!important;}
#arena-event-hud .arena-event-progress span{box-shadow:0 0 6px color-mix(in srgb,var(--arena-color) 22%, transparent)!important;}
#arena-event-centerflash strong,#arena-event-wave-banner strong{font-family:'Sedgwick Ave',cursive!important;letter-spacing:.4px;}
#arena-event-centerflash,#arena-event-wave-banner,#arena-event-result{
  background:linear-gradient(180deg,rgba(29,21,16,.95),rgba(18,13,10,.96))!important;
  border-color:rgba(170,139,92,.72)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.58), inset 0 0 0 1px rgba(231,205,155,.05)!important;
}
#arena-event-toasts .arena-event-toast{
  background:linear-gradient(180deg,rgba(32,24,18,.95),rgba(18,13,10,.95))!important;
  border-left-color:color-mix(in srgb,var(--arena-color) 46%, #b89259)!important;
  color:#eadfc6!important;
}

@media(max-width:600px){
  .combat-damage-chip{font-size:16px;}
  .combat-damage-incoming{font-size:18px;}
  .combat-damage-heavy{font-size:21px;}
}
@media(prefers-reduced-motion:reduce){
  #combat-lowlife-vignette,#hud-hp-progress[data-state="critical"]{animation:none!important;}
}


/* === V5 : hiérarchie des impacts et transition de mort === */
.combat-damage-outgoing {
  color:#e3c594!important;
  font-size:clamp(15px,1.35vw,19px)!important;
  text-shadow:0 1px 1px #26170e,0 2px 4px rgba(0,0,0,.75)!important;
}
.combat-damage-incoming {
  color:#ffd8d2!important;
  font-family:'Young Serif',serif!important;
  font-size:clamp(22px,2.1vw,29px)!important;
  line-height:1.04!important;
  text-align:center!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:1px!important;
  text-shadow:0 1px 0 #7e221a,0 0 9px rgba(193,32,25,.46),0 3px 4px #100908!important;
}
.combat-damage-incoming strong{font-weight:800;letter-spacing:.1px;}
.combat-damage-incoming .combat-damage-sign{font:800 9px/1 Arial,sans-serif;color:#ff998b;letter-spacing:2px;text-shadow:0 1px 3px #100808;}
.combat-damage-incoming.combat-damage-heavy{font-size:clamp(25px,2.45vw,33px)!important;}
.combat-damage-frost{color:#c5edff!important;}
.combat-damage-magic{color:#ead7ff!important;}
.combat-damage-blast{color:#ffe0b7!important;}
#deathScreen{z-index:6500;background:radial-gradient(ellipse at 50% 45%,rgba(49,15,13,.74),rgba(11,8,8,.96));backdrop-filter:blur(5px);}
#deathScreen h1{font-family:'Sedgwick Ave',cursive;font-size:38px;color:#e6c99b;text-shadow:0 2px 6px #000,0 0 20px rgba(143,29,21,.3);}
#deathScreenWrapper{animation:deathAppear .32s ease-out both;}
@keyframes deathAppear{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (prefers-reduced-motion:reduce){#deathScreenWrapper{animation:none!important;}}


/* === V6 effets de mobs / textes de combo === */
.combat-damage-incoming{font-size:clamp(20px,1.95vw,28px)!important;color:#fff1e9!important;text-shadow:0 1px 0 rgba(111,22,16,.96),0 0 7px rgba(210,67,44,.42),0 3px 4px rgba(0,0,0,.82)!important;}
.combat-damage-incoming strong{font-weight:900;}
.combat-damage-incoming .combat-damage-sign{display:block;margin-bottom:1px;font:700 10px/1.1 Arial,sans-serif;letter-spacing:1.25px;color:#ffcfbf;text-transform:uppercase;opacity:.92;}
.combat-damage-outgoing{opacity:.96;}

.combat-callout-anchor{pointer-events:none!important;white-space:nowrap;user-select:none;-webkit-user-select:none;z-index:9999;}
.combat-callout-chip{display:inline-block;padding:0 2px;color:#eadbbc;font:700 clamp(14px,1.3vw,18px)/1 'Young Serif',serif;letter-spacing:.65px;text-transform:uppercase;text-shadow:0 1px 0 rgba(77,48,21,.96),0 2px 4px rgba(0,0,0,.78),0 0 8px rgba(255,221,166,.18);animation:combatCalloutRise 1280ms cubic-bezier(.17,.64,.21,1) both;}
.combat-callout-combo{color:#f2dfb2;text-shadow:0 1px 0 rgba(93,63,19,.96),0 2px 4px rgba(0,0,0,.80),0 0 10px rgba(255,226,163,.26);}
.combat-callout-incoming{color:#ffd8ce;font-size:clamp(15px,1.45vw,19px);text-shadow:0 1px 0 rgba(115,29,19,.96),0 2px 5px rgba(0,0,0,.82),0 0 10px rgba(226,83,61,.28);}
@keyframes combatCalloutRise{0%{opacity:0;transform:translate3d(0,12px,0) scale(.86);}14%{opacity:1;transform:translate3d(0,0,0) scale(1.06);}100%{opacity:0;transform:translate3d(0,-26px,0) scale(.98);}}

/* === V11 • Mort cinématique : la chute reste visible jusqu'au dernier frame === */
#death-cinematic.death-cinematic{
  position:fixed;inset:0;z-index:6600;pointer-events:none;overflow:hidden;
  opacity:1;isolation:isolate;transition:opacity .8s ease;
}
.death-cinematic__pulse,.death-cinematic__edges,.death-cinematic__veil,
.death-cinematic__dust,.death-cinematic__seal{position:absolute;inset:0;pointer-events:none;}
.death-cinematic__pulse{
  background:radial-gradient(ellipse at 50% 48%,rgba(255,220,171,.10),rgba(167,15,22,.24) 42%,rgba(48,3,11,.05) 79%);
  animation:deathCinematicPulse 1.25s cubic-bezier(.18,.66,.4,1) both;
}
.death-cinematic__edges{
  box-shadow:inset 0 0 min(18vw,210px) rgba(72,9,15,.75),inset 0 0 30px rgba(160,19,26,.25);
  animation:deathCinematicBreath 2.8s ease-in-out infinite alternate;
}
.death-cinematic__veil{
  opacity:0;
  background:radial-gradient(ellipse at 50% 45%,rgba(35,8,15,.86),rgba(10,7,11,.97) 75%),
    repeating-linear-gradient(120deg,transparent 0 26px,rgba(205,131,62,.018) 27px 28px);
  transition:opacity .85s cubic-bezier(.22,.61,.27,1);
}
.death-cinematic__dust{opacity:.45;transition:opacity .5s ease;}
.death-cinematic__dust i{
  position:absolute;bottom:-8%;left:calc(10% + var(--p,0) * 11%);
  width:3px;height:3px;border-radius:50%;background:#d7a26d;filter:drop-shadow(0 0 6px #b85339);
  animation:deathCinematicDust calc(2.1s + var(--p,0) * .23s) ease-in infinite;
  animation-delay:calc(var(--p,0) * -.37s);
}
.death-cinematic__dust i:nth-child(1){--p:0}.death-cinematic__dust i:nth-child(2){--p:1}
.death-cinematic__dust i:nth-child(3){--p:2}.death-cinematic__dust i:nth-child(4){--p:3}
.death-cinematic__dust i:nth-child(5){--p:4}.death-cinematic__dust i:nth-child(6){--p:5}
.death-cinematic__dust i:nth-child(7){--p:6}.death-cinematic__dust i:nth-child(8){--p:7}
.death-cinematic__seal{
  inset:0;display:flex;align-items:center;justify-content:center;gap:18px;
  opacity:0;transform:translateY(12px) scale(.92);transition:opacity .38s ease,transform .7s ease;
}
.death-cinematic__seal-line{
  display:block;width:min(20vw,180px);height:1px;
  background:linear-gradient(90deg,transparent,#c7a16c,transparent);
  box-shadow:0 0 16px rgba(208,153,79,.55);
}
.death-cinematic__seal-rune{
  display:block;color:#e8c38c;font-family:Georgia,serif;font-size:42px;
  text-shadow:0 0 12px #e0a062,0 0 40px rgba(209,112,55,.65);
  animation:deathCinematicRune 2.4s ease-in-out infinite alternate;
}
#death-cinematic.death-cinematic--transition .death-cinematic__veil{opacity:1;}
#death-cinematic.death-cinematic--transition .death-cinematic__seal{opacity:1;transform:translateY(0) scale(1);}
#death-cinematic.death-cinematic--fade{opacity:0;}
@keyframes deathCinematicPulse{
  0%{opacity:0;filter:brightness(2)}15%{opacity:1}35%{opacity:.42}62%{opacity:.7}100%{opacity:.12}
}
@keyframes deathCinematicBreath{from{opacity:.55}to{opacity:.95}}
@keyframes deathCinematicDust{0%{transform:translate3d(0,0,0) scale(.55);opacity:0}25%{opacity:.85}100%{transform:translate3d(32px,-95vh,0) scale(.12);opacity:0}}
@keyframes deathCinematicRune{to{transform:rotate(35deg) scale(.92);opacity:.7}}

/* Ne redessine pas la logique de résurrection de /js/ui.php. */
#deathScreen.death-screen-cinematic{
  z-index:6500;
  background:radial-gradient(ellipse at 50% 40%,rgba(43,16,24,.95),rgba(8,8,14,.99) 72%);
  backdrop-filter:blur(12px) saturate(.5);
  color:#f3dec0;
}
#deathScreen.death-screen-cinematic::before,
#deathScreen.death-screen-cinematic::after{
  content:"";position:absolute;left:5%;right:5%;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#977251,#d8ba7a,#977251,transparent);
  box-shadow:0 0 14px rgba(202,143,83,.4);
}
#deathScreen.death-screen-cinematic::before{top:11%;}
#deathScreen.death-screen-cinematic::after{bottom:11%;}
#deathScreen.death-screen-cinematic #deathScreenWrapper{
  width:min(90vw,640px);height:auto;min-height:190px;
  top:50%;left:50%;padding:32px 22px;
  transform:translate(-50%,-50%);
  animation:deathCinematicPanelAppear .85s cubic-bezier(.15,.78,.24,1) both;
}
#deathScreen.death-screen-cinematic h1{
  font-family:'Young Serif',Georgia,serif;
  font-size:clamp(28px,5vw,47px);color:#f1d0a3;
  letter-spacing:.065em;font-variant:small-caps;
  text-shadow:0 3px 8px #000,0 0 25px rgba(169,58,36,.46);
}
#deathScreen.death-screen-fallback .death-screen-cinematic__eyebrow{
  color:#9c7c5b;letter-spacing:.42em;font:700 10px/1.5 Arial,sans-serif;
}
#deathScreen.death-screen-fallback .death-screen-cinematic__crest{
  color:#d6a771;font:normal 44px/1 Georgia,serif;margin-bottom:12px;
  text-shadow:0 0 18px rgba(236,173,95,.48);
}
#deathScreen.death-screen-fallback .death-screen-cinematic__subtitle{
  color:#b9a58e;font:italic 15px/1.5 Georgia,serif;margin:16px 0 24px;
}
#deathScreen.death-screen-fallback .death-screen-cinematic__return{
  display:inline-block;padding:12px 25px;max-width:90%;min-height:42px;
  border:1px solid #bd9060;border-radius:4px;cursor:pointer;
  background:linear-gradient(180deg,#49301f,#28191a);color:#f4ddaf;
  letter-spacing:.10em;text-transform:uppercase;font:700 12px/1.4 Arial,sans-serif;
  box-shadow:0 8px 28px rgba(0,0,0,.6),inset 0 1px rgba(255,231,193,.20);
  transition:background .2s,box-shadow .2s,transform .2s;
}
#deathScreen.death-screen-fallback .death-screen-cinematic__return:hover,
#deathScreen.death-screen-fallback .death-screen-cinematic__return:focus-visible{
  background:linear-gradient(180deg,#6a452b,#352020);
  box-shadow:0 0 25px rgba(193,126,71,.26);transform:translateY(-1px);
}
@keyframes deathCinematicPanelAppear{
  from{opacity:0;transform:translate(-50%,calc(-50% + 24px)) scale(.95);filter:blur(8px)}
  to{opacity:1;transform:translate(-50%,-50%) scale(1);filter:blur(0)}
}
@media (prefers-reduced-motion:reduce){
  #death-cinematic *,#deathScreen.death-screen-cinematic #deathScreenWrapper{
    animation:none!important;transition:none!important;
  }
}


/* V13 - UI de combat : priorité aux télégraphes in-world.
   ui.php (externe à cette archive) peut recréer le feed AoE ; masquer sa sortie
   évite les doublons sans casser la logique serveur ni les autres notifications. */
#arena-event-ui #arena-aoe-feed,
#arena-aoe-feed { display: none !important; visibility: hidden !important; }

/* Étiquette unique près de la zone : compacte, suffisamment contrastée. */
.arena-aoe-ground-label {
  padding: 4px 8px !important;
  border-width: 1px !important;
  border-radius: 6px !important;
  background: rgba(11, 15, 23, 0.78) !important;
  box-shadow: 0 3px 11px rgba(0,0,0,.3) !important;
  color: #f8f9fb !important;
  font: 750 11px/1.2 Arial, sans-serif !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.75);
  backdrop-filter: blur(3px);
}
.arena-aoe-ground-label small {
  font: 700 11px/1.2 Arial, sans-serif !important;
  color: #f3e6c8 !important;
}
@media (max-width: 600px) {
  .arena-aoe-ground-label { padding: 3px 6px !important; font-size: 10px !important; }
  .arena-aoe-ground-label small { font-size: 10px !important; }
}

/* ── MORANA ONLINE • JOURNAL / PNJ v1.4 ──────────────────────────────────
   Visuel calqué sur l'inventaire natif : fond bg-shop-mobile.png, rebords
   « ridge » métalliques, boutons bruns du jeu, Young Serif / Sedgwick Ave.
   ─────────────────────────────────────────────────────────────────────── */
#morana-quest-ui {
  position:fixed;top:15px;left:85px;right:auto;z-index:1350;
  width:260px;max-width:calc(100vw - 36px);pointer-events:none;
  color:#f2e5d4;font:12px/1.45 Arial,sans-serif;
  --mq-metal:rgba(196,167,139,.82);--mq-ochre:#efd0a2;
}
#morana-quest-ui.mq-journal-open {z-index:2200;}
#morana-quest-ui.mq-journal-open .mq-hud-card {visibility:hidden;pointer-events:none;}
#morana-quest-ui button {cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;}
#morana-quest-ui button:focus-visible,
#morana-npc-quest button:focus-visible,
#morana-quest-ui summary:focus-visible,
#morana-quest-ui .mq-history-list:focus-visible {outline:2px solid #ffe1a5;outline-offset:2px;}
.mq-hud-card {
  pointer-events:auto;overflow:hidden;box-sizing:border-box;
  border:4px ridge var(--mq-metal);border-radius:4px;
  background:linear-gradient(rgba(21,15,12,.44),rgba(21,15,12,.55)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat;
  box-shadow:0 4px 12px rgba(0,0,0,.75),inset 0 0 0 1px rgba(238,201,152,.15);
}
#morana-quest-toggle {
  appearance:none;width:100%;box-sizing:border-box;min-height:40px;
  display:flex;align-items:center;gap:7px;padding:6px 8px;
  color:#f9ecd7;background:transparent;border:0;text-align:left;
}
#morana-quest-toggle:hover {background:rgba(208,165,105,.13);}
.mq-hud-emblem {
  flex:none;width:25px;height:25px;display:grid;place-items:center;
  border:2px ridge rgba(246,197,149,.7);border-radius:3px;
  background:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #574334;
  color:#ffe0a2;font:19px/1 'Young Serif',Georgia,serif;text-shadow:0 2px 2px #000;
}
.mq-hud-task {
  display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  color:#f5e7d1;font:12px/1.35 Arial,sans-serif;text-shadow:0 1px 2px #000;
}
.mq-hud-task-count {white-space:nowrap;flex:none;color:#eac28b;font:700 10px Arial,sans-serif;}
.mq-hud-task-count[hidden] {display:none;}
.mq-hud-chevron {color:#ecc38f;flex:none;font:17px/1 Arial,sans-serif;margin-left:1px;}
#morana-quest-journal {
  pointer-events:auto;position:fixed;top:82px;left:18px;
  width:min(376px,calc(100vw - 36px));max-height:calc(100vh - 96px);max-height:calc(100dvh - 96px);
  display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;
  margin:0;border:7px ridge var(--mq-metal);border-radius:5px;
  background:linear-gradient(rgba(20,14,12,.38),rgba(20,14,12,.56)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat;
  box-shadow:0 10px 26px rgba(0,0,0,.9),inset 0 0 0 1px rgba(248,200,151,.17);
  color:#f2e4d1;
}
#morana-quest-journal[hidden] {display:none!important;}
.mq-journal-header {
  display:flex;align-items:center;gap:9px;flex:none;
  min-height:54px;box-sizing:border-box;padding:9px 10px;
  background:rgba(23,16,13,.62);border-bottom:1px solid rgba(208,175,135,.48);
}
.mq-journal-insignia {display:grid;place-items:center;flex:none;width:25px;height:25px;color:#e7bd82;font:23px/1 Georgia,serif;}
.mq-journal-title {flex:1;color:#f4dfbc;font:18px/1.15 'Sedgwick Ave','Young Serif',Georgia,serif;text-transform:uppercase;text-shadow:1px 2px 3px #000;}
#morana-quest-close {
  flex:none;appearance:none;display:grid;place-items:center;
  width:29px;height:29px;border:3px ridge rgba(235,145,136,.7);border-radius:5px;
  color:#edcccc;background:url('https://www.morana-online.com/game/images/bg-btn-red.jpg') center/cover #5e3530;
  font:16px/1 'Young Serif',Georgia,serif;text-shadow:0 1px 2px #000;
}
#morana-quest-close:hover {border-color:#f2ad98;color:#fff;}
#morana-quest-body {min-height:0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:15px 14px 13px;line-height:1.5;}
#morana-quest-body h3,#pnj-shop #morana-npc-quest h3 {
  margin:8px 0 10px;color:#f4ddba;font:17px/1.3 'Young Serif',Georgia,serif;
  text-shadow:1px 1px 2px #000;overflow-wrap:anywhere;
}
#morana-quest-body p,#morana-npc-quest p {font:12px/1.6 Arial,sans-serif;}
.mq-description {margin:0 0 11px;color:#e3d5c3;}
.mq-mini-tag {display:block;margin:0 0 7px;color:#e6bd87;font:700 10px/1.3 Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;}
.mq-current-quest {padding:2px 0 13px;}
.mq-subheading {display:flex;align-items:baseline;justify-content:space-between;gap:7px;margin:14px 0 9px;padding-top:10px;border-top:1px solid rgba(196,167,139,.36);color:#eac795;font:700 11px/1.3 Arial,sans-serif;}
.mq-subheading small {color:#cdb99f;font:400 10px Arial,sans-serif;white-space:nowrap;}
.mq-objective {margin:7px 0;padding:9px 10px;border:1px solid rgba(180,151,116,.56);background:rgba(18,15,14,.60);}
.mq-objective.is-complete {opacity:.65;}
.mq-objective-line {display:flex;align-items:flex-start;gap:7px;font:12px/1.45 Arial,sans-serif;}
.mq-objective-icon {flex:none;color:#e9c28e;font-size:12px;}
.mq-objective-name {flex:1;min-width:0;overflow-wrap:anywhere;color:#f4e8d7;}
.mq-objective-amount {flex:none;color:#dec398;font-size:11px;white-space:nowrap;}
.mq-zone {display:block;margin:5px 0 0 16px;color:#cdb9a0;font-size:10px;}
.mq-meter {margin:8px 0 0 16px;height:5px;border:1px solid rgba(175,146,108,.6);background:rgba(0,0,0,.7);overflow:hidden;}
.mq-meter i {display:block;height:100%;width:0;background:linear-gradient(90deg,#91643a,#f2d197);transition:width .2s ease;}
.mq-objective.is-complete .mq-meter i {background:#aab19b;}
.mq-reward {display:flex;align-items:center;flex-wrap:wrap;gap:7px 15px;border-top:1px solid rgba(196,167,139,.37);margin:13px 0 0;padding-top:11px;color:#e9c997;font-size:11px;font-weight:700;}
.mq-reward-label {width:100%;font:700 10px Arial,sans-serif;color:#cdb395;}
.mq-next {padding:9px;border-left:3px solid #c79e6b;background:rgba(9,8,7,.56);color:#f1dcc0;font-size:12px;line-height:1.5;}
.mq-empty {margin:0;padding:18px 5px;color:#d9c7b0;text-align:center;font-style:italic;}
/* Historique gris, accessible et défilable indépendamment des objectifs actifs. */
.mq-history {border-top:1px solid rgba(220,184,135,.42);padding-top:11px;}
.mq-history h4 {margin:0 0 9px;color:#c7b8a4;font:13px/1.3 'Young Serif',Georgia,serif;}
.mq-history-list {
  max-height:min(260px,36vh);overflow-y:auto;overscroll-behavior:contain;
  display:block;padding:0 3px 0 0;
  scrollbar-width:thin;scrollbar-color:#92785c rgba(0,0,0,.35);
}
.mq-history-entry {margin:0 0 5px;border:1px solid rgba(143,133,119,.34);background:rgba(14,13,13,.6);color:#aaa39b;}
.mq-history-entry summary {list-style:none;display:flex;align-items:center;gap:8px;min-height:35px;padding:8px;box-sizing:border-box;cursor:pointer;}
.mq-history-entry summary::-webkit-details-marker {display:none;}
.mq-history-entry summary:hover,.mq-history-entry[open] summary {background:rgba(157,141,116,.12);color:#c9c1b6;}
.mq-history-check {flex:none;color:#929990;font-size:12px;}
.mq-history-name {flex:1;min-width:0;overflow-wrap:anywhere;font:12px/1.35 Arial,sans-serif;}
.mq-history-arrow {flex:none;color:#8a8580;line-height:1;}
.mq-history-entry[open] .mq-history-arrow {transform:rotate(180deg);}
.mq-history-entry p {margin:0;padding:4px 10px 11px 25px;color:#aca69d;font-size:11px!important;line-height:1.5!important;border-top:1px solid rgba(143,133,119,.2);}
.mq-history-unavailable {font-size:11px!important;color:#dbac91;}
.mq-journal-footer {flex:none;padding:8px 10px;text-align:center;color:#bea890;background:rgba(12,9,8,.5);border-top:1px solid rgba(196,167,139,.35);font-size:10px;}
.mq-journal-footer kbd {margin-left:4px;display:inline-block;padding:1px 5px;border:1px ridge #9a7952;background:rgba(22,17,13,.9);color:#efd0a2;font:700 10px Arial,sans-serif;}
/* L'onglet PNJ reste dans la zone normale de contenu, sans fenêtre superposée. */
#pnj-shop #morana-npc-quest.pnj_quest {
  display:none;float:left;position:relative;inset:auto;
  width:300px;height:calc(100vh - 80px);overflow-y:auto;
  box-sizing:border-box;padding:16px 12px 20px;
  border:4px ridge rgba(196,167,139,.7);border-radius:3px;
  background:linear-gradient(rgba(24,18,15,.62),rgba(24,18,15,.67)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat;
  box-shadow:inset 0 0 10px rgba(0,0,0,.45);
  color:#f0e4d2;font:12px/1.5 Arial,sans-serif;
}
#pnj-shop .pnj_menu .questbtn {display:flex;align-items:center;justify-content:center;color:#f2d196;}
#pnj-shop .pnj_menu .questbtn span {font:24px/1 'Young Serif',Georgia,serif;text-shadow:0 2px 3px #000;}
#pnj-shop #morana-npc-quest .mq-objective {margin:9px 0;}
#pnj-shop #morana-npc-quest .mq-reward {margin-top:15px;}
#pnj-shop #morana-npc-quest .mq-accept {
  display:block;width:100%;box-sizing:border-box;margin-top:20px;padding:9px 7px;
  text-align:center;font-size:13px;line-height:1.5;
}
#pnj-shop #morana-npc-quest .mq-accept:disabled {opacity:.6;cursor:wait;}
.morana-quest-toast {
  pointer-events:none;position:fixed;z-index:5000;top:16%;left:50%;transform:translateX(-50%);
  max-width:min(450px,85vw);padding:12px 16px;box-sizing:border-box;
  border:4px ridge rgba(246,197,149,.7);border-radius:4px;
  background:url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #271b16;
  color:#f7e7cb;box-shadow:0 6px 25px #000c;
  font:13px/1.4 'Young Serif',Georgia,serif;transition:opacity .5s ease;
}
.morana-quest-fading {opacity:0;}
.mq-error {padding:11px;background:rgba(67,28,23,.72);border:1px solid #bd7360;color:#f9d2c3;}
.mq-error p {margin:0 0 8px;}
#morana-quest-retry,#morana-npc-retry {appearance:none;padding:7px 10px;background:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #583e27;border:3px ridge rgba(246,197,149,.7);color:#fff1d4;font:12px 'Young Serif',Georgia,serif;}
@media(max-height:740px), (max-width:1170px) {
  #pnj-shop #morana-npc-quest.pnj_quest {clear:both;float:left;width:325px;margin-left:5px;height:calc(100vh - 245px);min-height:130px;max-height:calc(100vh - 245px);padding:12px;}
}
@media(max-width:700px) {
  #morana-quest-ui {top:49px;left:7px;width:225px;max-width:calc(100vw - 14px);}
  #morana-quest-toggle {min-height:36px;padding:5px 6px;gap:6px;}
  .mq-hud-emblem {width:23px;height:23px;font-size:17px;}
  #morana-quest-journal {top:49px;left:7px;width:min(350px,calc(100vw - 14px));max-height:calc(100dvh - 59px);}
  .mq-history-list {max-height:min(210px,28vh);}
  .mq-journal-header {min-height:48px;}
}
@media(max-width:390px) {
  #pnj-shop #morana-npc-quest.pnj_quest {width:calc(100% - 12px);}
  #morana-quest-ui {width:205px;}
}
@media(prefers-reduced-motion:reduce) {
  .mq-meter i,.morana-quest-toast {transition:none!important;}
}
/* Marqueurs des PNJ, dans le même style que les boutons de l'inventaire. */
.namePNJ.morana-npc-ready::before,.namePNJ.morana-npc-target::before {
  content:attr(data-quest-mark);display:block;margin:auto auto 2px;text-align:center;
  width:24px;height:24px;border:3px ridge #c6a169;border-radius:4px;
  background:linear-gradient(#e9c78e,#8d6336);box-shadow:0 2px 9px #000b;
  font:900 20px/24px Georgia,serif;color:#322119;
}
.namePNJ.morana-npc-target::before {border-color:#8aaeb6;background:linear-gradient(#bbe6e3,#669aa5);color:#192830;}

/* ──────────────────────────────────────────────────────────────────────
 * CHRONIQUES DE DALMAROK — notifications de quêtes v1.6
 * Inspirées des bandeaux/résultats d'événements : bronze, métal, éclats,
 * puis or & émeraude à la victoire. Ne capture JAMAIS les interactions.
 * ────────────────────────────────────────────────────────────────────── */
#morana-quest-feedback {
  position:fixed;z-index:2750;top:clamp(86px,14vh,158px);left:50%;
  width:min(490px,calc(100vw - 28px));pointer-events:none;
  transform:translateX(-50%);isolation:isolate;
  font-family:Arial,sans-serif;text-align:left;
}
#morana-quest-feedback .mq-fx-card {
  --mq-fx:#d4a96c;--mq-fx-bright:#ffdda4;--mq-fx-deep:#644422;
  position:relative;overflow:hidden;box-sizing:border-box;
  width:100%;padding:11px 18px 10px;
  border:5px ridge rgba(193,161,119,.88);border-radius:5px;
  background:linear-gradient(145deg,rgba(15,10,8,.71),rgba(28,19,13,.64)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #241810;
  color:#f9e7c8;
  box-shadow:0 13px 33px rgba(0,0,0,.78),0 0 29px color-mix(in srgb,var(--mq-fx) 24%,transparent),
    inset 0 0 0 1px rgba(255,231,184,.21),inset 0 0 30px rgba(0,0,0,.43);
  animation:mqFxEntrance .55s cubic-bezier(.18,.82,.2,1.05) both;
}
#morana-quest-feedback .mq-fx-complete {
  --mq-fx:#66c6a4;--mq-fx-bright:#dcffcc;--mq-fx-deep:#2f7253;
  border-color:rgba(194,177,120,.9);
  background:linear-gradient(145deg,rgba(9,26,21,.79),rgba(32,27,16,.68)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #16241c;
}
#morana-quest-feedback .mq-fx-unlocked {--mq-fx:#c5a0e9;--mq-fx-bright:#f5e0ff;--mq-fx-deep:#614273;}
#morana-quest-feedback .mq-fx-card::before,
#morana-quest-feedback .mq-fx-card::after {
  content:"";position:absolute;left:13px;right:13px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,var(--mq-fx-bright),transparent);opacity:.85;
}
#morana-quest-feedback .mq-fx-card::before {top:5px;}
#morana-quest-feedback .mq-fx-card::after {bottom:5px;opacity:.55;}
#morana-quest-feedback .mq-fx-glint {
  position:absolute;left:-35%;top:-70%;width:38%;height:240%;transform:rotate(27deg);
  background:linear-gradient(90deg,transparent,rgba(255,242,198,.15),transparent);
  animation:mqFxSweep 2.1s .25s ease-out both;pointer-events:none;
}
#morana-quest-feedback .mq-fx-ornament {
  position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:13px;
  color:var(--mq-fx-bright);font-size:10px;line-height:1;margin:-1px auto 8px;
  text-shadow:0 0 9px var(--mq-fx);
}
#morana-quest-feedback .mq-fx-ornament span:nth-child(2) {font-size:6px;}
#morana-quest-feedback .mq-fx-core {display:flex;gap:15px;align-items:center;position:relative;z-index:1;}
#morana-quest-feedback .mq-fx-seal {
  flex:none;position:relative;display:grid;place-items:center;width:69px;height:69px;
  border:2px solid var(--mq-fx);outline:1px solid rgba(255,243,204,.25);outline-offset:5px;
  background:radial-gradient(circle,rgba(255,244,204,.12),rgba(0,0,0,.59) 73%);
  box-shadow:0 0 16px color-mix(in srgb,var(--mq-fx) 45%,transparent),
    inset 0 0 19px color-mix(in srgb,var(--mq-fx) 21%,transparent);
  transform:rotate(45deg) scale(.87);animation:mqFxSeal .8s .12s ease-out both;
}
#morana-quest-feedback .mq-fx-seal span {
  display:block;transform:rotate(-45deg);font:40px/1 'Young Serif',Georgia,serif;
  color:var(--mq-fx-bright);text-shadow:0 0 13px var(--mq-fx);
}
#morana-quest-feedback .mq-fx-copy {min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;}
#morana-quest-feedback .mq-fx-chapter {
  color:#ac9a7f;font:700 8px/1.4 Arial,sans-serif;letter-spacing:2.3px;
}
#morana-quest-feedback .mq-fx-kicker {
  color:var(--mq-fx-bright);font:700 10px/1.3 'Young Serif',Georgia,serif;
  letter-spacing:2.3px;text-shadow:0 0 9px var(--mq-fx);
}
#morana-quest-feedback .mq-fx-title {
  display:block;color:#fff4da;font:22px/1.25 'Sedgwick Ave','Young Serif',Georgia,serif;
  text-transform:uppercase;overflow-wrap:anywhere;text-shadow:0 2px 3px #000,0 0 10px rgba(255,220,160,.25);
}
#morana-quest-feedback .mq-fx-caption {
  color:#ddd0bd;font:11px/1.35 Arial,sans-serif;overflow-wrap:anywhere;
}
#morana-quest-feedback .mq-fx-bottom {
  display:flex;align-items:center;gap:12px;justify-content:center;
  color:var(--mq-fx);font-size:10px;margin:10px auto 0;
}
#morana-quest-feedback .mq-fx-bottom span {
  width:24%;height:1px;background:linear-gradient(90deg,transparent,var(--mq-fx),transparent);
}
#morana-quest-feedback .mq-fx-rewards {
  position:relative;z-index:1;display:flex;justify-content:center;flex-wrap:wrap;gap:7px;
  margin-top:12px;padding-top:9px;border-top:1px solid rgba(225,197,144,.23);
}
#morana-quest-feedback .mq-fx-reward {
  padding:5px 11px;border:1px solid rgba(213,174,108,.38);
  background:linear-gradient(90deg,rgba(114,82,35,.24),rgba(11,11,10,.37));
  font:700 12px/1.2 'Young Serif',Georgia,serif;color:#ffe1a3;
  box-shadow:inset 0 0 10px rgba(0,0,0,.23);
}
#morana-quest-feedback .mq-fx-reward b {color:#ffeb9b;font-size:13px;}
#morana-quest-feedback .mq-fx-unlock {
  position:relative;z-index:1;margin:8px auto 0;text-align:center;
  color:#e1c9f1;font:700 9px/1.45 Arial,sans-serif;letter-spacing:1px;
  animation:mqFxReveal .55s .9s ease both;
}
#morana-quest-feedback .mq-fx-unlock span {font-size:15px;color:#dfb4ff;vertical-align:middle;}
#morana-quest-feedback .mq-fx-unlock strong {
  display:block;color:#f6e8ff;font:15px/1.3 'Young Serif',Georgia,serif;
  letter-spacing:0;text-shadow:0 0 9px #8e58af;
}
#morana-quest-feedback .mq-fx-sparks {position:absolute;inset:0;pointer-events:none;}
#morana-quest-feedback .mq-fx-sparks i {
  --mq-a:calc(var(--mq-spark) * 36deg);
  position:absolute;top:50%;left:15%;width:4px;height:4px;
  background:var(--mq-fx-bright);box-shadow:0 0 9px var(--mq-fx);
  transform:rotate(var(--mq-a));opacity:0;
  animation:mqFxSpark 1.1s calc(.15s + var(--mq-spark) * 32ms) ease-out both;
}
#morana-quest-feedback .mq-fx-outro {animation:mqFxLeave .4s ease-in both;}
@keyframes mqFxEntrance {
  from {opacity:0;transform:translateY(-24px) scale(.92);filter:brightness(1.6)}
  70% {opacity:1;transform:translateY(3px) scale(1.01)}
  to {opacity:1;transform:translateY(0) scale(1);filter:brightness(1)}
}
@keyframes mqFxSeal {
  from {opacity:0;transform:rotate(-35deg) scale(.25)}
  to {opacity:1;transform:rotate(45deg) scale(.87)}
}
@keyframes mqFxSweep {from {left:-50%;opacity:0} 35% {opacity:1} to {left:125%;opacity:0}}
@keyframes mqFxSpark {
  from {opacity:0;transform:rotate(var(--mq-a)) translateX(0) scale(.3)}
  35% {opacity:.9}
  to {opacity:0;transform:rotate(var(--mq-a)) translateX(103px) scale(.05)}
}
@keyframes mqFxReveal {from {opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes mqFxLeave {from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-13px) scale(.97)}}
@media(max-width:700px) {
  #morana-quest-feedback {top:clamp(62px,15vh,100px);width:calc(100vw - 20px);max-width:430px;}
  #morana-quest-feedback .mq-fx-card {padding:9px 12px 8px;border-width:4px;}
  #morana-quest-feedback .mq-fx-core {gap:10px;}
  #morana-quest-feedback .mq-fx-seal {width:47px;height:47px;outline-offset:3px;}
  #morana-quest-feedback .mq-fx-seal span {font-size:29px;}
  #morana-quest-feedback .mq-fx-chapter {font-size:7px;letter-spacing:1.3px;}
  #morana-quest-feedback .mq-fx-kicker {font-size:9px;letter-spacing:1.5px;}
  #morana-quest-feedback .mq-fx-title {font-size:17px;line-height:1.2;}
  #morana-quest-feedback .mq-fx-caption {font-size:10px;}
  #morana-quest-feedback .mq-fx-rewards {margin-top:8px;padding-top:7px;}
  #morana-quest-feedback .mq-fx-reward {font-size:10px;padding:4px 7px;}
  #morana-quest-feedback .mq-fx-ornament {margin-bottom:5px;}
  #morana-quest-feedback .mq-fx-bottom {margin-top:6px;}
}
@media(prefers-reduced-motion:reduce) {
  #morana-quest-feedback .mq-fx-card,
  #morana-quest-feedback .mq-fx-seal,
  #morana-quest-feedback .mq-fx-glint,
  #morana-quest-feedback .mq-fx-sparks i,
  #morana-quest-feedback .mq-fx-unlock {animation:none!important;}
  #morana-quest-feedback .mq-fx-glint,#morana-quest-feedback .mq-fx-sparks {display:none;}
  #morana-quest-feedback .mq-fx-outro {opacity:0;}
}


/* Morana v4.5 — Chat compact, style inventaire / PNJ */
#chat {
  width: min(362px, calc(100vw - 24px)); max-height: min(335px, 44vh);
  border: 1px solid #8c6a3a; border-radius: 5px;
  background: linear-gradient(180deg,rgba(20,13,10,.82),rgba(19,14,11,.91)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(241,202,130,.15), 0 7px 25px rgba(0,0,0,.62);
  color: #ecd8b5; backdrop-filter: blur(3px); overflow: hidden;
  font-family: Arial, sans-serif;
}
#chat:hover, #chat.chat-active {background-color:rgba(25,18,13,.94)}
#chat-bar {flex:0 0 auto;min-height:30px;display:flex;align-items:center;justify-content:space-between;gap:4px;
  padding:4px 7px;border-bottom:1px solid rgba(184,136,71,.54);
  background:linear-gradient(90deg,rgba(86,53,28,.55),rgba(26,17,12,.7))}
#chat-heading {font:12px/1.2 'Young Serif',Georgia,serif;color:#f1ce8a;letter-spacing:.4px;white-space:nowrap}
#chat-tools {display:flex;align-items:center;justify-content:flex-end;gap:2px;flex-wrap:nowrap}
#chat .chat-tool {all:unset;box-sizing:border-box;display:grid;place-items:center;flex:0 0 auto;
  width:22px;height:22px;line-height:1;border:1px solid rgba(195,150,88,.22);border-radius:3px;
  background:rgba(5,4,3,.26);font-size:12px;font-weight:bold;color:#dbc49c;cursor:pointer;
  transition:background .15s,color .15s,border-color .15s}
#chat .chat-tool:hover,#chat .chat-tool:focus-visible,#chat .chat-tool.is-active {
 background:rgba(155,103,47,.32);border-color:rgba(241,193,113,.8);color:#ffe4a4;outline:none}
#chat #chat-toggle {position:static;width:22px;height:22px;font-size:13px;transform:none}
#chat #chat-toggle::before {content:'−'}
#chat.collapsed #chat-toggle::before{content:'+'}
#chat-log {min-height:60px;min-width:0;max-height:215px;padding:9px 10px;scrollbar-color:#8b6031 transparent;
 background:radial-gradient(ellipse at top,rgba(125,76,25,.08),transparent 66%)}
#chat.collapsed #chat-log {display:none}
#chat .chat-msg {pointer-events:auto;overflow-wrap:anywhere;font-size:12px;line-height:1.45;padding:2px 0;color:#eadcc7}
#chat .chat-msg.me {color:#a9d4ff}
#chat .chat-msg.whisper {color:#d1a9fa}
#chat .chat-msg.system {color:#f8ce87}
#chat .chat-player-name {cursor:pointer;text-decoration:underline;text-underline-offset:2px;color:#f2d39c}
#chat .chat-player-name:hover{color:#fff0c4}
#chat.chat-only-whispers .chat-msg:not(.whisper):not(.system){display:none}
#chat-compose {display:flex;align-items:stretch;min-height:32px;flex:0 0 auto;
 border-top:1px solid rgba(184,136,71,.38);background:rgba(13,10,7,.75)}
#chat-input {flex:1;min-width:0;border:0;background:transparent;color:#f6e6ca;font-size:12px;padding:8px 10px}
#chat-input::placeholder {color:#c1a989}
#chat-send {flex:0 0 33px;border:0;border-left:1px solid rgba(184,136,71,.38);
 background:linear-gradient(135deg,#6f4a25,#3f2a17);color:#f7d99e;cursor:pointer;font-size:15px}
#chat-send:hover,#chat-send:focus-visible{background:#8e5c2d;outline:1px solid #d6a966}
#chat-suggest {background:#241a12;color:#f1dbc0;border:1px solid #a98049;border-radius:3px;
 box-shadow:0 5px 20px #000b;max-height:140px;z-index:1002}
#chat-suggest li {padding:5px 8px;cursor:pointer}
#chat-suggest li.sel,#chat-suggest li:hover {background:#684524}
@media (max-width:600px){
  #chat {width:min(295px,calc(100vw - 16px));left:8px;bottom:8px;max-height:40vh}
  #chat-heading{display:none}
  #chat-bar{padding:3px 5px;justify-content:center}
  #chat-tools{width:100%;justify-content:space-between}
  #chat .chat-tool{width:21px;height:22px}
  #chat-log{max-height:120px;min-height:45px}
}


/* Morana v4.6 — chat translucide, comme dans l'interface classique du jeu.
   Les nouvelles icônes restent lisibles sans masquer le décor ni les combats. */
#chat {
  background: rgba(8, 8, 9, .25);
  border-color: rgba(191, 153, 98, .36);
  box-shadow: inset 0 0 0 1px rgba(230, 190, 130, .06), 0 3px 14px rgba(0,0,0,.19);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#chat:hover, #chat.chat-active, #chat:focus-within {
  background: rgba(9, 8, 8, .52);
  border-color: rgba(191, 153, 98, .58);
}
#chat-bar { background: rgba(20, 14, 9, .22); border-bottom-color: rgba(184,136,71,.24); }
#chat-log { background: transparent; }
#chat-compose { background: rgba(11, 10, 10, .30); border-top-color: rgba(184,136,71,.24); }
#chat .chat-tool { background: rgba(0,0,0,.18); border-color: rgba(195,150,88,.18); }
#chat-send { background: rgba(83, 53, 25, .33); }
#chat-send:hover, #chat-send:focus-visible { background: rgba(142, 92, 45, .68); }
#chat .chat-msg { text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 0 4px #000; }

/* Info d'ouverture de lootbox dans le flux, juste AVANT Gold / Points.
   Aucun fond ni contour sur le libellé : contraste ivoire/or adapté au beige-marron. */
.itemboxfloat.lootbox-openable .lootbox-rightclick-hint {
    position: relative; float:none; clear:both; display:flex;
    box-sizing:border-box; width:100%; align-items:center; justify-content:center;
    gap:6px; margin:5px 0 3px; padding:3px 0;
    border:0; border-radius:0; background:none; box-shadow:none;
    color:#f4dcab; font:600 10px/1.4 Arial,sans-serif;
    letter-spacing:.03em; text-shadow:0 1px 2px #2a190f;
    white-space:normal; text-align:center; pointer-events:none;
}
.itemboxfloat.lootbox-openable .lootbox-mouse-icon {
    position:relative; flex:0 0 12px; width:12px; height:17px;
    box-sizing:border-box; display:inline-block;
    border:1.5px solid #f3cd87; border-radius:6px 6px 5px 5px;
    background:transparent;
}
.itemboxfloat.lootbox-openable .lootbox-mouse-icon::before {
    content:''; position:absolute; top:1px; right:1px;
    width:4px; height:6px; border-radius:0 4px 0 1px;
    background:rgba(246,203,112,.75);
}
.itemboxfloat.lootbox-openable .lootbox-mouse-icon::after {
    content:''; position:absolute; top:0; bottom:7px; left:5px;
    width:1px; background:#e6c088;
}


/* Morana V8 — chat déployé identique à la V6.
   Seul le mode réduit reçoit un aperçu temporaire du dernier message. */
#chat.collapsed { overflow: visible; }
#chat.collapsed #chat-log,
#chat.collapsed #chat-compose { display: none; }
#chat.collapsed #chat-bar { border-bottom: 0; cursor: pointer; }
#chat.collapsed #chat-heading { user-select: none; }

/* Aperçu hors de la fenêtre, directement sur le décor. Il est créé par Game.js
   et ne modifie jamais l'historique des messages. */
#chat #chat-toast { display: none; }
#chat.collapsed #chat-toast {
    position: absolute;
    display: block;
    box-sizing: border-box;
    left: 0;
    bottom: calc(100% + 8px);
    width: min(325px, calc(100vw - 24px));
    max-width: none;
    padding: 2px 3px;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    z-index: 1;
}
#chat.collapsed #chat-toast.is-visible { opacity: 1; visibility: visible; }
#chat.collapsed #chat-toast .chat-msg {
    pointer-events: none;
    font-size: 12px;
    line-height: 1.35;
    color: #eadcc7;
    padding: 1px;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px #000, 0 0 7px #000;
}
#chat.collapsed #chat-toast .chat-msg.me {color:#a9d4ff;}
#chat.collapsed #chat-toast .chat-msg.whisper {color:#d1a9fa;}
#chat.collapsed #chat-toast .chat-msg.system {color:#f8ce87;}
#chat.collapsed #chat-toast .chat-player-name {pointer-events:none; text-decoration:none;}

/* Position tactile du mini-onglet, entre joystick et actions (V7). */
#chat.chat-mobile.collapsed {
    left: calc(50% - 30px);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(94px, max(54px, calc(100vw - 326px)));
    max-height: none;
    z-index: 102;
    box-shadow: 0 2px 10px rgba(0,0,0,.20);
}
#chat.chat-mobile.collapsed #chat-heading { display:block; font-size:0; }
#chat.chat-mobile.collapsed #chat-heading::after { content:'Chat'; font-size:11px; }
#chat.chat-mobile.collapsed #chat-bar {
    justify-content: space-between;
    min-height: 26px;
    padding: 3px 5px;
    gap: 3px;
}
#chat.chat-mobile.collapsed #chat-tools { width:auto; }
#chat.chat-mobile.collapsed .chat-tool:not(#chat-toggle) { display:none; }
#chat.chat-mobile.collapsed #chat-toggle { width:26px; height:26px; }
#chat.chat-mobile.collapsed #chat-toast {
    left:50%;
    transform:translateX(-50%);
    width:min(285px, calc(100vw - 20px));
    text-align:center;
}
/* Avant V7, l'affichage OUVERT du chat mobile était fixé 140 px au-dessus
   du bas, et non centré au milieu de l'écran. */
#chat.chat-mobile:not(.collapsed) { bottom: 140px; }

/* Intro : le monde 3D seul reste visible. Tous les éléments d'interface
   (y compris le calque CSS2D des noms de PNJ, joueurs, mobs et butins)
   restent masqués jusqu'au DERNIER rendu de la caméra en cadrage normal.
   visibility préserve les tailles utilisées par les scripts HUD. */
body.morana-intro-pending > :not(#canvas):not(.morana-world-canvas):not(#loader):not(#morana-welcome):not(script):not(style) {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.morana-intro-pending > #canvas,
body.morana-intro-pending > .morana-world-canvas {
  pointer-events: none !important;
}

/* ==============================================================
   MORANA - Accueil minimaliste, flou radial léger / centre net
   ============================================================== */
#morana-welcome {
  position: fixed;
  inset: 0;
  z-index: 3005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  box-sizing: border-box;
  isolation: isolate;
  overflow: hidden;
  color: #f8e7c9;
  text-align: center;
  opacity: 1;
  transition: opacity 1.15s cubic-bezier(.2, .8, .2, 1);
}
#morana-welcome[hidden] { display: none; }
#morana-welcome.is-leaving { opacity: 0; pointer-events: none; }
.morana-welcome-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Centre transparent : le personnage et la carte restent reconnaissables. */
  background: radial-gradient(ellipse 75% 78% at 50% 49%,
    rgba(7, 11, 19, .17) 0%,
    rgba(8, 12, 20, .19) 28%,
    rgba(8, 11, 19, .35) 57%,
    rgba(5, 8, 15, .69) 100%);
}
.morana-welcome-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Le masque radial évite le flou au centre et l'augmente sur les bords. */
  -webkit-backdrop-filter: blur(5px) saturate(.94);
  backdrop-filter: blur(5px) saturate(.94);
  -webkit-mask-image: radial-gradient(ellipse 73% 74% at 50% 50%,
    transparent 0%, transparent 22%, rgba(0,0,0,.13) 41%,
    rgba(0,0,0,.64) 70%, #000 100%);
  mask-image: radial-gradient(ellipse 73% 74% at 50% 50%,
    transparent 0%, transparent 22%, rgba(0,0,0,.13) 41%,
    rgba(0,0,0,.64) 70%, #000 100%);
}
.morana-welcome-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(100%, 460px);
  max-height: 100%;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: morana-welcome-arrive .85s ease-out both;
}
/* Un halo très discret pour détacher le logo du décor, sans carte ni cadre. */
.morana-welcome-panel::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 38%;
  width: min(90vw, 510px);
  height: min(50vh, 245px);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(5, 9, 17, .43), rgba(5, 9, 17, .09) 55%, transparent 75%);
  pointer-events: none;
}
.morana-welcome-logo {
  display: block;
  width: clamp(200px, 31vw, 340px);
  max-width: 88%;
  height: auto;
  margin: 0 0 clamp(22px, 5vh, 36px);
  object-fit: contain;
  filter: drop-shadow(0 7px 20px rgba(0,0,0,.65)) drop-shadow(0 0 20px rgba(243, 180, 89, .15));
}
/* L'image reste centrée dans le panneau à toutes les tailles d'écran. */
.morana-welcome-panel picture { display: flex; justify-content: center; width: 100%; }
/* Accueil PC : logo grand format, sans agrandir celui du mobile. */
@media (min-width: 769px) {
  .morana-welcome-panel { width: min(100%, 760px); }
  .morana-welcome-logo { width: clamp(420px, 48vw, 620px); max-width: 92%; }
}
/* Bouton d'accueil : conserver la bordure et les reflets classiques du jeu.
   Le contour externe n'est pas celui de la bordure : il provenait du focus automatique. */
.morana-welcome-start {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 205px;
  min-height: 48px;
  padding: 9px 26px;
  font-size: 19px;
  touch-action: manipulation;
}
.morana-welcome-start:focus-visible { outline: 2px solid #fff1c7; outline-offset: 5px; }
.morana-welcome-start:disabled { opacity: .56; cursor: progress; }
.morana-welcome-caption {
  margin: 16px 0 0;
  font: 10px/1.6 Arial, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 232, 198, .70);
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
}
.morana-welcome-caption:empty { display: none; }
#morana-welcome.is-leaving .morana-welcome-panel {
  animation: none;
  opacity: 0;
  transform: translateY(-8px) scale(1.02);
  transition: opacity .65s ease, transform .9s ease;
}
/* Le chargeur initial reste devant l'accueil jusqu'au premier rendu 3D. */
#loader { z-index: 3010; }
@keyframes morana-welcome-arrive {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-height: 500px) {
  .morana-welcome-logo { width: min(185px, 39vw); margin-bottom: 14px; }
  .morana-welcome-start { min-width: 175px; min-height: 41px; padding: 9px 18px; font-size: 12px; }
  .morana-welcome-caption { margin-top: 8px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #morana-welcome, .morana-welcome-panel { animation: none; transition-duration: .01ms; }
}

/* ==============================================================
   MORANA - Menu principal cinématique (même plan large que l'accueil)
   ============================================================== */
#game-menu-wrapper {
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse 75% 78% at 50% 49%,
    rgba(7,11,19,.17) 0%, rgba(8,12,20,.22) 28%,
    rgba(8,11,19,.41) 57%, rgba(5,8,15,.73) 100%);
}
#game-menu-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(5px) saturate(.94);
  backdrop-filter: blur(5px) saturate(.94);
  -webkit-mask-image: radial-gradient(ellipse 73% 74% at 50% 50%,
    transparent 0%, transparent 22%, rgba(0,0,0,.13) 41%,
    rgba(0,0,0,.64) 70%, #000 100%);
  mask-image: radial-gradient(ellipse 73% 74% at 50% 50%,
    transparent 0%, transparent 22%, rgba(0,0,0,.13) 41%,
    rgba(0,0,0,.64) 70%, #000 100%);
}
/* Même approche que l'accueil : logo et actions directement sur le décor,
   pas de cadre opaque. Le panneau des paramètres, lui, reste lisible. */
#game-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(370px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100dvh - 18px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 14px 24px;
  background: none;
  text-align: center;
  box-shadow: none;
}
#game-menu > img {
  display: block;
  width: min(235px, 65vw);
  max-width: 100%;
  height: auto;
  margin: 0 auto 1px;
  object-fit: contain;
  filter: drop-shadow(0 6px 17px rgba(0,0,0,.65));
}
#game-menu h2 { font-size: 16px; margin: 1px 0 0; }
#game-menu .divider { opacity: .6; margin: 0 auto; }
#game-menu p.center { margin: 7px 0; }
#game-menu p.center .btn {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 7px 12px;
  font-size: 12px;
  line-height: 1.4;
}
#game-menu .close { top: 10px; right: 10px; font-size: 11px; }
#game-settings {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(383px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
}
/* Le fond radial et le menu remplacent temporairement le HUD,
   y compris la couche CSS2D des noms PNJ/joueurs/monstres. */
body.morana-menu-open > :not(#canvas):not(.morana-world-canvas):not(#game-menu-wrapper):not(script):not(style),
body.morana-menu-restoring > :not(#canvas):not(.morana-world-canvas):not(#game-menu-wrapper):not(script):not(style) {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.morana-menu-open > #canvas,
body.morana-menu-open > .morana-world-canvas,
body.morana-menu-restoring > #canvas,
body.morana-menu-restoring > .morana-world-canvas { pointer-events: none !important; }
@media (max-height: 540px) {
  #game-menu { padding: 6px 16px; }
  #game-menu > img { width: min(145px, 36vw); }
  #game-menu h2 { font-size: 12px; }
  #game-menu p.center { margin: 4px 0; }
  #game-menu p.center .btn { font-size: 10px; padding: 4px 9px; border-width: 3px; }
  #game-menu .divider { height: 8px; }
}

/* Bouton 'Accepter la mission' des quêtes annexes : ne pas hériter du
   font-size:20px des gros boutons du jeu, ni déborder des fiches PNJ. */
#pnj-shop #morana-npc-quest .mq-side-offers { min-width: 0; }
#pnj-shop #morana-npc-quest .mq-side-card { min-width: 0; overflow-wrap: anywhere; }
#pnj-shop #morana-npc-quest .mq-accept-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  width: min(100%, 215px);
  min-width: 0;
  min-height: 36px;
  max-width: 100%;
  margin: 10px 0 3px;
  padding: 6px 10px;
  font-family: 'Young Serif', Georgia, serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  border-width: 3px;
  border-radius: 5px;
  text-shadow: 0 1px 2px #080503;
  box-shadow: 0 2px 8px rgba(0,0,0,.36), inset 0 1px rgba(255,239,204,.08);
}
#pnj-shop #morana-npc-quest .mq-accept-side:hover,
#pnj-shop #morana-npc-quest .mq-accept-side:focus-visible { border-width: 3px; }
#pnj-shop #morana-npc-quest .mq-accept-side:disabled {
  opacity: .55;
  cursor: default;
  filter: saturate(.65);
}
@media (max-width: 700px), (max-height: 540px) {
  #pnj-shop #morana-npc-quest .mq-accept-side {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 10px;
  }
}


/* MORANA V5 — Restaurer le panneau d'origine du menu, sans perdre la
   transition caméra ni le voile radial. Le décor reste visible autour. */
#game-menu {
  width: min(383px, calc(100vw - 24px));
  padding: 20px 20px 14px;
  background: url('https://www.morana-online.com/game/images/bg-shop.png') no-repeat center center;
  background-size: 100% 100%;
  box-shadow: none;
  overflow-x: hidden;
}
#game-menu > img { width: min(230px, 65vw); }
@media (max-height: 540px) {
  #game-menu { padding: 9px 18px; max-height: calc(100dvh - 10px); }
  #game-menu > img { width: min(150px, 36vw); }
}

/* Mort : travelling orbital et zoom sur le corps, cadrage rapproché.
   Garder une vignette douce pour voir la scène et la chute dans le décor. */
body.morana-death-active > :not(#canvas):not(.morana-world-canvas):not(#death-cinematic):not(#deathScreen):not(script):not(style) {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.morana-death-active > #canvas,
body.morana-death-active > .morana-world-canvas { pointer-events: none !important; }
#deathScreen.death-screen-cinematic {
  isolation: isolate;
  background: radial-gradient(ellipse 82% 80% at 50% 46%,
    rgba(12,7,13,.12) 0%, rgba(21,7,15,.23) 28%,
    rgba(27,8,17,.43) 62%, rgba(16,5,11,.77) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
#deathScreen.death-screen-cinematic::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
  -webkit-mask-image: radial-gradient(ellipse 73% 74% at 50% 50%, transparent 0 22%, rgba(0,0,0,.16) 41%, rgba(0,0,0,.7) 75%, #000 100%);
  mask-image: radial-gradient(ellipse 73% 74% at 50% 50%, transparent 0 22%, rgba(0,0,0,.16) 41%, rgba(0,0,0,.7) 75%, #000 100%);
}
#deathScreen.death-screen-cinematic::after { display: none; }
#deathScreen.death-screen-cinematic #deathScreenWrapper {
  z-index: 1;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  box-sizing: border-box;
}
#death-cinematic.death-cinematic--transition .death-cinematic__veil {
  background: radial-gradient(ellipse at 50% 48%, rgba(37,7,14,.20) 0%, rgba(39,6,14,.38) 54%, rgba(18,5,12,.78) 100%);
}
/* Le calque éphémère ne doit pas complètement masquer le plan 3D dézoomé. */
#death-cinematic.death-cinematic--transition .death-cinematic__veil { opacity: .85; }
/* Le petit chat utilise la traduction injectée, jamais un libellé CSS fixe. */
#chat.chat-mobile.collapsed #chat-heading::after { content: attr(data-short-label); }


/* MORANA V8 — Mort : zoom optique fixe + présentation sobre, sans box.
   Le monde reste visible au centre et les textes ne masquent pas le corps. */
#deathScreen.death-screen-cinematic {
  background:
    linear-gradient(180deg, rgba(9,7,12,.52) 0%, rgba(9,7,12,.06) 47%, rgba(10,5,10,.25) 100%),
    radial-gradient(ellipse 88% 84% at 50% 48%, rgba(11,6,10,.02) 0%, rgba(14,6,12,.18) 58%, rgba(9,5,11,.7) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#deathScreen.death-screen-cinematic::before {
  inset: 0;
  background: none;
  box-shadow: none;
  opacity: .65;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  -webkit-mask-image: radial-gradient(ellipse 72% 75% at 50% 48%, transparent 0 30%, #000 100%);
  mask-image: radial-gradient(ellipse 72% 75% at 50% 48%, transparent 0 30%, #000 100%);
}
#deathScreen.death-screen-cinematic #deathScreenWrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px));
  height: auto;
  min-height: 0;
  padding: 0 12px;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
  text-align: center;
  animation: moranaDeathV8Reveal .75s cubic-bezier(.2,.7,.2,1) both;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__mark {
  display: block;
  color: #caa476;
  font: normal 16px/1 Georgia, serif;
  letter-spacing: 0;
  opacity: .9;
  text-shadow: 0 2px 12px rgba(0,0,0,.85);
  margin-bottom: 9px;
}
#deathScreen.death-screen-cinematic h1 {
  font: normal clamp(25px, 3vw, 39px)/1.16 'Young Serif', Georgia, serif;
  letter-spacing: .025em;
  font-variant: normal;
  color: #f1ddbf;
  margin: 0;
  text-shadow: 0 3px 16px #070306, 0 1px 4px #070306;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__rule {
  width: min(160px, 45%);
  height: 1px;
  margin: 14px auto 12px;
  background: linear-gradient(90deg, transparent, rgba(211,162,102,.8), transparent);
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__subtitle {
  color: #d4c5b4;
  font: italic clamp(12px, 1.35vw, 15px)/1.5 Georgia, serif;
  margin: 0;
  text-shadow: 0 2px 12px #000;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__countdown {
  margin: 19px 0 0;
  color: #d7c6b5;
  font: normal 12px/1.5 Arial, sans-serif;
  letter-spacing: .035em;
  text-shadow: 0 2px 12px #000;
}
#deathScreen.death-screen-cinematic #countdown {
  color: #f0d29c;
  font-weight: 700;
  font-size: 17px;
  padding: 0 3px;
  font-variant-numeric: tabular-nums;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__action {
  margin: 17px 0 0;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__return {
  display: inline-block;
  max-width: min(92vw, 340px);
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 18px;
  font: normal 12px/1.35 'Young Serif', Georgia, serif;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-decoration: none;
  background: url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #564032;
  border: 4px ridge rgba(246,197,149,.7);
  color: #f6e6ce;
  border-radius: 6px;
  box-shadow: 0 5px 20px rgba(4,3,6,.55), inset 0 1px rgba(255,225,177,.14);
  cursor: pointer;
}
#deathScreen.death-screen-cinematic .death-screen-cinematic__return:hover,
#deathScreen.death-screen-cinematic .death-screen-cinematic__return:focus-visible {
  color: #ffe3b0;
  box-shadow: 0 4px 24px rgba(134,85,43,.5);
}
/* Le bouton reste caché jusqu'au terme des 5 secondes dans l'écran normal. */
#deathScreen.death-screen-cinematic:not(.death-screen-fallback) #resurrectButton { display: none; }
#deathScreen.death-screen-cinematic:not(.death-screen-fallback) #resurrectButton[style*="inline-block"] { display: inline-block; }
#death-cinematic.death-cinematic--transition .death-cinematic__veil {
  background: radial-gradient(ellipse at 50% 48%, rgba(28,8,17,.13) 0%, rgba(24,7,13,.27) 56%, rgba(16,5,11,.62) 100%);
  opacity: .65;
}
@keyframes moranaDeathV8Reveal {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
@media (max-height: 550px) {
  #deathScreen.death-screen-cinematic .death-screen-cinematic__mark { margin-bottom: 5px; }
  #deathScreen.death-screen-cinematic h1 { font-size: clamp(20px, 4vh, 26px); }
  #deathScreen.death-screen-cinematic .death-screen-cinematic__rule { margin: 7px auto 6px; }
  #deathScreen.death-screen-cinematic .death-screen-cinematic__countdown { margin-top: 9px; }
  #deathScreen.death-screen-cinematic .death-screen-cinematic__action { margin-top: 9px; }
  #deathScreen.death-screen-cinematic .death-screen-cinematic__return { min-height: 34px; padding: 5px 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #deathScreen.death-screen-cinematic #deathScreenWrapper { animation: none !important; }
}

/* ==================================================================
 * Ajustements événements : parchemin du HUD + annonces discrètes.
 * Ces règles sont placées en dernier pour neutraliser les anciens thèmes.
 * ================================================================== */
#arena-event-ui #arena-event-hud {
  top:60px!important;
  right:14px!important;
  left:auto!important;
  width:min(258px,calc(100vw - 28px))!important;
  padding:11px 12px 12px!important;
  border:4px ridge rgba(207,165,112,.85)!important;
  border-radius:5px!important;
  background:
    linear-gradient(180deg,rgba(26,16,10,.35),rgba(26,16,10,.49)),
    url('images/bg-shop-mobile.png') center/100% 100% no-repeat #352318!important;
  box-shadow:0 6px 18px rgba(0,0,0,.54),inset 0 0 0 1px rgba(243,207,151,.16)!important;
  backdrop-filter:none!important;
  color:#f6e8cc!important;
}
#arena-event-hud .arena-event-title {
  color:#ffebbb!important;
  font:normal 15px/1.25 'Young Serif',Georgia,serif!important;
  text-shadow:0 2px 3px rgba(0,0,0,.8)!important;
}
#arena-event-hud .arena-event-phase {
  color:#d5ba92!important;
  font:600 10px/1.35 Arial,sans-serif!important;
  letter-spacing:.35px!important;
}
#arena-event-hud .arena-event-timer strong {
  color:#ffe3a1!important;
  font:normal 17px/1.2 'Young Serif',Georgia,serif!important;
  text-shadow:0 1px 3px #1b0d06!important;
}
#arena-event-hud .arena-event-instruction {
  color:#ebd5b7!important;
  font:normal 10px/1.45 Arial,sans-serif!important;
  border-top:1px solid rgba(218,174,110,.23)!important;
  margin-top:7px!important;
  padding-top:6px!important;
}
#arena-event-hud .arena-event-essential { gap:7px!important; margin-top:8px!important; }
#arena-event-ui #arena-event-hud .arena-event-stat {
  background:rgba(34,22,13,.31)!important;
  border:1px solid rgba(209,169,116,.38)!important;
  border-radius:3px!important;
  box-shadow:inset 0 1px rgba(255,235,197,.06)!important;
}
#arena-event-hud .arena-event-stat small {
  color:#dcc19a!important;
  font:600 9px/1.2 Arial,sans-serif!important;
}
#arena-event-hud .arena-event-stat strong {
  color:#fff0cf!important;
  font:normal 14px/1.2 'Young Serif',Georgia,serif!important;
}
#arena-event-hud .arena-event-hp-label,
#arena-event-hud .arena-event-hp-label strong {color:#e2cba8!important;}
#arena-event-hud .arena-event-progress {
  background:rgba(20,12,9,.54)!important;
  border:1px solid rgba(198,154,101,.42)!important;
}
/* Les annonces de début et de vague restent lisibles, sans panneau opaque
   qui cache les ennemis au centre du champ de vision. */
#arena-event-ui #arena-event-centerflash {
  top:37%!important;
  width:min(355px,calc(100vw - 28px))!important;
  padding:5px 12px 7px!important;
  background:linear-gradient(90deg,
      transparent 0%,rgba(30,20,14,.13) 16%,rgba(30,20,14,.30) 50%,
      rgba(30,20,14,.13) 84%,transparent 100%)!important;
  border:0!important;
  border-top:1px solid rgba(211,172,114,.35)!important;
  border-bottom:1px solid rgba(211,172,114,.25)!important;
  border-radius:0!important;
  box-shadow:0 2px 8px rgba(0,0,0,.12)!important;
  backdrop-filter:none!important;
  pointer-events:none!important;
}
#arena-event-centerflash small {
  color:#f5d79b!important;
  font:600 9px/1.2 Arial,sans-serif!important;
  letter-spacing:1.3px!important;
}
#arena-event-ui #arena-event-centerflash strong {
  font:normal 18px/1.2 'Young Serif',Georgia,serif!important;
  color:#fff1d2!important;
  text-shadow:0 1px 3px rgba(0,0,0,.9)!important;
}
#arena-event-centerflash span {
  color:#f1dfc4!important;
  font:normal 10px/1.3 Arial,sans-serif!important;
  text-shadow:0 1px 3px #000!important;
}
#arena-event-ui #arena-event-toasts .arena-event-toast {
  background:linear-gradient(rgba(27,17,11,.79),rgba(27,17,11,.81)),
    url('images/bg-shop-mobile.png') center/100% 100% no-repeat #302117!important;
  border:2px ridge rgba(195,155,106,.7)!important;
  color:#f0dcc0!important;
  border-radius:3px!important;
}
@media(max-width:600px) {
  #arena-event-ui #arena-event-hud {
    top:43px!important;
    right:7px!important;
    width:min(218px,calc(100vw - 14px))!important;
    padding:8px 9px!important;
    border-width:3px!important;
  }
  #arena-event-hud .arena-event-title {font-size:13px!important;}
  #arena-event-hud .arena-event-stat strong {font-size:12px!important;}
  #arena-event-ui #arena-event-centerflash {
    top:35%!important;
    width:min(290px,calc(100vw - 18px))!important;
    padding:4px 9px 5px!important;
  }
  #arena-event-ui #arena-event-centerflash strong {font-size:15px!important;}
  #arena-event-centerflash span {font-size:9px!important;}
}


/* ========================================================================== */
/* Arènes v2 — même habillage que #morana-quest-journal (et affichage pertinent) */
/* ========================================================================== */
#arena-event-ui #arena-event-hud {
  box-sizing:border-box!important;
  top:60px!important;right:14px!important;left:auto!important;
  transform:none!important;
  width:min(294px,calc(100vw - 28px))!important;
  padding:0!important;
  margin:0!important;
  border:7px ridge rgba(196,167,139,.82)!important;
  border-radius:5px!important;
  background:linear-gradient(rgba(20,14,12,.38),rgba(20,14,12,.56)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #302117!important;
  box-shadow:0 10px 26px rgba(0,0,0,.9),inset 0 0 0 1px rgba(248,200,151,.17)!important;
  backdrop-filter:none!important;
  color:#f2e4d1!important;
  font:12px/1.45 Arial,sans-serif!important;
  text-shadow:none!important;
  pointer-events:none!important;
}
/* Masque le trait néon hérité, absent du journal de quêtes. */
#arena-event-ui #arena-event-hud::before,
#arena-event-ui #arena-event-hud::after {display:none!important;content:none!important;}
#arena-event-ui #arena-event-hud .arena-event-head {
  display:flex!important;align-items:center!important;
  box-sizing:border-box!important;
  min-height:55px!important;
  gap:9px!important;padding:9px 10px!important;
  background:rgba(23,16,13,.62)!important;
  border-bottom:1px solid rgba(208,175,135,.48)!important;
}
#arena-event-hud .arena-event-insignia {
  flex:none;width:25px;height:25px;display:grid;place-items:center;
  color:#e7bd82;font:23px/1 Georgia,serif;
}
#arena-event-hud .arena-event-heading {flex:1;min-width:0;}
#arena-event-hud .arena-event-title {
  color:#f4dfbc!important;
  font:normal 17px/1.15 'Sedgwick Ave','Young Serif',Georgia,serif!important;
  letter-spacing:0!important;text-transform:uppercase!important;
  text-shadow:1px 2px 3px #000!important;
  white-space:normal!important;overflow-wrap:anywhere;
}
#arena-event-hud .arena-event-phase {
  margin-top:3px!important;
  color:#d5bfa4!important;
  font:normal 10px/1.4 Arial,sans-serif!important;
  letter-spacing:0!important;
}
#arena-event-hud .arena-event-timer {
  min-width:45px!important;
  margin:0!important;padding:0 0 0 8px!important;
  border-left:1px solid rgba(208,175,135,.38)!important;
  text-align:right;
}
#arena-event-hud .arena-event-timer strong {
  color:#f4dfbc!important;
  font:normal 15px/1.2 'Young Serif',Georgia,serif!important;
  text-shadow:1px 1px 2px #000!important;
}
#arena-event-hud .arena-event-body {padding:11px 12px 12px;box-sizing:border-box;}
#arena-event-hud .arena-event-instruction {
  color:#e3d5c3!important;
  font:normal 11px/1.5 Arial,sans-serif!important;
  margin:0 0 10px!important;padding:0!important;
  border:0!important;background:none!important;
}
#arena-event-hud .arena-event-essential {
  display:flex!important;gap:7px!important;margin:0!important;
}
#arena-event-ui #arena-event-hud .arena-event-stat {
  flex:1;display:flex!important;flex-direction:column;
  align-items:stretch!important;justify-content:space-between!important;
  min-height:42px!important;
  padding:7px 8px!important;
  border:1px solid rgba(180,151,116,.56)!important;
  border-radius:0!important;
  background:rgba(18,15,14,.60)!important;
  box-shadow:none!important;
}
#arena-event-hud .arena-event-stat small {
  color:#cdb9a0!important;font:600 10px/1.3 Arial,sans-serif!important;
  letter-spacing:0!important;
}
#arena-event-hud .arena-event-stat strong {
  color:#f4e8d7!important;
  margin-top:4px!important;
  font:normal 15px/1.2 'Young Serif',Georgia,serif!important;
}
#arena-event-hud .arena-event-stat strong i {color:#cdb9a0!important;}
#arena-event-ui #arena-event-hud .arena-event-secondary.active {
  display:block!important;
  margin-top:8px!important;padding:7px 9px!important;
  color:#eac795!important;
  font:600 11px/1.4 Arial,sans-serif!important;
  background:rgba(18,15,14,.6)!important;
  border:1px solid rgba(180,151,116,.46)!important;
}
#arena-event-ui #arena-event-hud .arena-alpha-hp-row.active {
  display:block!important;
  margin-top:9px!important;padding:8px 9px!important;
  background:rgba(18,15,14,.60)!important;
  border:1px solid rgba(180,151,116,.56)!important;
  border-radius:0!important;
}
#arena-event-hud .arena-alpha-hp-row .arena-event-hp-label {
  display:flex!important;color:#e6bd87!important;
  margin:0 0 5px!important;font:600 10px/1.4 Arial,sans-serif!important;
}
#arena-event-hud .arena-alpha-hp-row .arena-event-hp-label strong {
  color:#f4e8d7!important;font:600 10px/1.4 Arial,sans-serif!important;
}
#arena-event-hud .arena-alpha-hp-row .arena-event-progress {
  height:5px!important;border:1px solid rgba(175,146,108,.6)!important;
  background:rgba(0,0,0,.7)!important;
}
/* D'anciennes règles avec display:block!important forçaient ALPHA et les
   compteurs vides à rester affichés. hidden prime sur toutes ces règles. */
#arena-event-ui #arena-event-hud [hidden],
#arena-event-ui #arena-event-hud .arena-alpha-hp-row:not(.active),
#arena-event-ui #arena-event-hud .arena-event-secondary:not(.active) {
  display:none!important;
}
@media(max-width:600px){
  #arena-event-ui #arena-event-hud {
    top:43px!important;right:7px!important;
    width:min(248px,calc(100vw - 14px))!important;
    border-width:5px!important;
  }
  #arena-event-ui #arena-event-hud .arena-event-head {
    min-height:46px!important;padding:7px 8px!important;gap:7px!important;
  }
  #arena-event-hud .arena-event-insignia {width:20px;height:20px;font-size:19px;}
  #arena-event-hud .arena-event-title {font-size:14px!important;}
  #arena-event-hud .arena-event-body {padding:8px 9px 9px;}
  #arena-event-hud .arena-event-instruction {display:block!important;font-size:10px!important;}
  #arena-event-hud .arena-event-stat {padding:5px 6px!important;min-height:36px!important;}
  #arena-event-hud .arena-event-stat strong {font-size:12px!important;}
  #arena-event-hud .arena-event-stat small {font-size:9px!important;}
}

/* V4 : une puce discrète sur les objets réellement nouveaux. */
/* Les icônes .smallitem ont z-index:1000 : afficher la puce DEVANT elles. */
.inventory_items .inventory_item.morana-new-item { position:relative; }
.inventory_item.morana-new-item::after {
  content:""; position:absolute; z-index:2001; pointer-events:none;
  top:2px; right:2px; width:8px; height:8px; border-radius:50%;
  background:#ff992d; border:1px solid #553016;
  box-shadow:0 0 0 1px rgba(255,218,153,.65), 0 0 6px rgba(255,147,34,.85);
}
.inventory_item.morana-drag-source,.chest_item.morana-drag-source,.trade_item.morana-drag-source {opacity:.55;}
.inventory_item.morana-drag-target,.chest_item.morana-drag-target,.trade_item.morana-drag-target,.craft_item.morana-drag-target {
  outline:2px solid rgba(255,176,65,.7); outline-offset:-2px;
  background-color:rgba(255,176,65,.12);
}

/* V8 — nouveautés acquittées et lien des items vers le chat. */
.inventory_item { position:relative; }
.inventory_item .morana-link-item {
  position:absolute; z-index:2005; left:1px; bottom:1px; width:17px; height:17px;
  padding:0; border:1px solid rgba(251,191,102,.68); border-radius:3px;
  background:rgba(20,13,8,.88); color:#ffe0a1; font:700 13px/15px Arial,sans-serif;
  cursor:pointer; opacity:0; transform:scale(.87); transition:opacity .16s,transform .16s;
}
.inventory_item:hover .morana-link-item,.inventory_item:focus-within .morana-link-item,
.inventory_item .morana-link-item:focus-visible{opacity:1;transform:scale(1)}
@media (hover:none), (pointer:coarse) { .inventory_item .morana-link-item{opacity:.9;transform:none} }
/* V9 : fiche immédiate, aucune animation ni délai de disparition. */
.itemboxfloat,.itemboxfloat.morana-tooltip-visible {
  transition:none!important; animation:none!important; transform:none!important;
  opacity:1; visibility:visible; pointer-events:auto; will-change:auto;
}
/* Les messages de base ne capturent pas les clics, mais les liens d'objet oui. */
#chat .chat-msg .morana-chat-item {pointer-events:auto;}
#chat .chat-msg:has(.morana-chat-item) {pointer-events:auto;}
#chat .morana-chat-item { cursor:help; text-decoration:underline dotted; text-underline-offset:2px;
  font-weight:600; white-space:normal; }
#chat .morana-chat-item:hover,#chat .morana-chat-item:focus-visible {filter:brightness(1.2);outline-offset:2px}
#chat .morana-chat-item.common{color:#fff;background:none;border:0;border-radius:0}
#chat .morana-chat-item.uncommon{color:#fff3d1;background:none;border:0;border-radius:0}
#chat .morana-chat-item.rare{color:#ffaf67;background:none;border:0;border-radius:0}
#chat .morana-chat-item.very-rare{color:#ff694b;background:none;border:0;border-radius:0}
#chat .morana-chat-item.epic{color:#dde5a3;background:none;border:0;border-radius:0}
#chat .morana-chat-item.mythic{color:#c9e4ba;background:none;border:0;border-radius:0}
#chat .morana-chat-item.divine{color:#bed1f2;background:none;border:0;border-radius:0}
/* V10 : exactement les dimensions, bordures, polices et images de fond
   de .itemboxfloat de l'inventaire, sans surcharge spécifique au chat. */
.itemboxfloat.morana-chat-tooltip{z-index:3005!important;}

/* V9 : la flèche se trouve AU-DESSUS du slot draggable et reste cliquable. */
#inventory .inventory_item .morana-link-item {z-index:2500;pointer-events:auto;touch-action:manipulation;}
#inventory .inventory_item .smallitem {pointer-events:auto;}


/* V10 : le rang est dans le paragraphe PHP existant sous le pseudo. */
.inventory_attributes .morana-rank{white-space:nowrap;}

/* Boss permanents (indépendants du système d'arène) */
.morana-world-boss-label .morana-world-boss { color:#ffdf91; font-weight:900; text-shadow:0 0 8px #8e34f1,0 0 18px #30184c,0 2px 2px #08050d; letter-spacing:.045em; }
.morana-world-boss-label .mob-health-bar-container { border:1px solid rgba(245,188,78,.9); box-shadow:0 0 12px rgba(174,85,255,.6); }

/* ====================================================================
   MORANA — Mini-jeux de métiers / habillage du journal de quêtes
   Fond, encadrements et boutons alignés sur #morana-quest-journal.
   Les couleurs des métiers restent de discrets accents, non des néons.
   ==================================================================== */
#hud-farm-wrapper.morana-farm-panel {
  --farm-metal:rgba(196,167,139,.82);
  --farm-gold:#e7c38d;
  --farm-ink:#f2e4d1;
  --farm-dim:#cebea9;
  --farm-accent:#e7c38d;
  display:flex;flex-direction:column;gap:0;
  position:fixed;top:50%;right:clamp(12px,4vw,72px);left:auto;
  transform:translateY(-50%);z-index:2300;
  box-sizing:border-box;
  width:min(398px,calc(100vw - 24px));height:auto;min-height:0;
  max-height:calc(100dvh - 20px);overflow-y:auto;overflow-x:hidden;
  padding:0;border:7px ridge var(--farm-metal);border-radius:5px;
  background:linear-gradient(rgba(20,14,12,.38),rgba(20,14,12,.56)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #302117;
  box-shadow:0 10px 26px rgba(0,0,0,.9),inset 0 0 0 1px rgba(248,200,151,.17);
  color:var(--farm-ink);font:12px/1.45 Arial,sans-serif;
  text-shadow:none;isolation:isolate;
}
#hud-farm-wrapper.farm-theme-fishing{--farm-accent:#b9d4d0}
#hud-farm-wrapper.farm-theme-picking{--farm-accent:#c8d3a4}
#hud-farm-wrapper.farm-theme-mining{--farm-accent:#d1c3d9}
#hud-farm-wrapper.farm-theme-logging{--farm-accent:#e4ba89}
.morana-farm-panel *{box-sizing:border-box}
.morana-farm-panel button {cursor:url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;}
.morana-farm-panel button:focus-visible {outline:2px solid #ffe1a5;outline-offset:2px}
.morana-farm-panel .farm-topline {
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:9px 11px;min-height:53px;background:rgba(23,16,13,.62);
  border-bottom:1px solid rgba(208,175,135,.48);
}
.morana-farm-panel .farm-kicker {
  font:normal 17px/1.15 'Sedgwick Ave','Young Serif',Georgia,serif;
  text-transform:uppercase;letter-spacing:.01em;color:#f4dfbc;text-shadow:1px 2px 3px #000;
}
.morana-farm-panel .farm-close {
  flex:none;display:grid;place-items:center;width:30px;height:30px;
  padding:0;border:3px ridge rgba(235,145,136,.7);border-radius:5px;
  background:url('https://www.morana-online.com/game/images/bg-btn-red.jpg') center/cover #5e3530;
  color:#edcccc;font:18px/1 'Young Serif',Georgia,serif;text-shadow:0 1px 2px #000;
}
.morana-farm-panel .farm-close:hover{border-color:#f2ad98;color:#fff}
.morana-farm-panel .farm-heading {
  display:flex;align-items:center;gap:11px;padding:13px 14px 11px;
  border-bottom:1px solid rgba(196,167,139,.3);
}
.morana-farm-panel .farm-heading-icon {
  flex:none;display:grid;place-items:center;width:48px;height:48px;
  background:rgba(18,15,14,.58);border:3px ridge rgba(196,167,139,.7);
  border-radius:4px;font-size:27px;text-shadow:0 1px 2px #000;
}
.morana-farm-panel .farm-heading h3 {
  margin:0 0 3px;color:#f4ddba;
  font:19px/1.25 'Young Serif',Georgia,serif;text-shadow:1px 1px 2px #000;
}
.morana-farm-panel .farm-heading p {margin:0;color:#dfd0bb;font:11px/1.5 Arial,sans-serif}
.morana-farm-panel .farm-steps-heading {
  display:flex;justify-content:space-between;align-items:baseline;
  padding:10px 15px 6px;font:700 11px/1.3 Arial,sans-serif;color:#eac795;
}
.morana-farm-panel .farm-step-count {font:700 10px/1.3 Arial,sans-serif;color:#d8c4aa}
.morana-farm-panel .farm-steps {display:flex;gap:5px;padding:0 15px 11px}
.morana-farm-panel .farm-steps span {
  flex:1;height:7px;min-width:0;border:1px solid rgba(175,146,108,.55);
  background:rgba(0,0,0,.65);transition:background .16s ease;
}
.morana-farm-panel .farm-steps span.current {background:linear-gradient(#f2d197,#91643a)}
.morana-farm-panel .farm-steps span.done {background:#ad986f}
.morana-farm-panel .farm-stage {
  position:relative;display:flex;flex-direction:column;justify-content:center;
  align-items:center;gap:11px;min-height:205px;overflow:hidden;
  margin:0 13px;padding:13px 12px;border:1px solid rgba(180,151,116,.56);
  border-radius:2px;background:rgba(18,15,14,.66);box-shadow:inset 0 0 17px rgba(0,0,0,.28);
}
.morana-farm-panel .farm-loading {display:flex;align-items:center;gap:9px;color:#eedfc8}
.morana-farm-panel .farm-loading-spinner {width:18px;height:18px;border:2px solid #68543c;border-top-color:#efd0a2;border-radius:50%;animation:farm-spin 1s linear infinite}
@keyframes farm-spin {to{transform:rotate(360deg)}}
.morana-farm-panel .farm-controls {display:flex;align-items:stretch;justify-content:center;gap:7px;padding:12px 13px 8px;min-height:56px}
.morana-farm-panel .farm-controls button {
  flex:1;min-height:43px;padding:7px 9px;touch-action:manipulation;
  border:3px ridge rgba(180,142,101,.75);border-radius:4px;
  background:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #58402b;
  color:#f8e8cc;font:700 13px/1.2 Arial,sans-serif;
  text-shadow:0 1px 2px #000;box-shadow:0 2px 6px rgba(0,0,0,.44);
  transition:filter .15s,transform .12s;
}
.morana-farm-panel .farm-controls button:hover:not(:disabled){filter:brightness(1.18)}
.morana-farm-panel .farm-controls button:active:not(:disabled){transform:translateY(1px)}
.morana-farm-panel .farm-controls button:disabled {opacity:.44;cursor:default}
.morana-farm-panel .farm-controls .farm-main-btn {max-width:230px;font-size:14px}
.morana-farm-panel .farm-status {
  padding:3px 14px 10px;min-height:31px;text-align:center;
  color:#e9c997;font:700 11px/1.4 Arial,sans-serif;
}
.morana-farm-panel .farm-footer {
  display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;
  padding:9px 11px;background:rgba(12,9,8,.5);
  border-top:1px solid rgba(196,167,139,.35);
  color:#bea890;font:10px/1.4 Arial,sans-serif;
}
.morana-farm-panel .farm-callout {color:#f4dfbc;text-align:center;font:14px/1.3 'Young Serif',Georgia,serif;text-shadow:0 1px 2px #000}
/* Eau, bouchon et frémissement de la pêche. */
.morana-farm-panel .farm-water {
  position:relative;width:100%;height:105px;overflow:hidden;border:1px ridge #7b8c87;
  background:linear-gradient(180deg,#24353d 0%,#31545a 65%,#1b343f 100%);
}
.morana-farm-panel .farm-waves {position:absolute;left:50%;top:64%;width:62px;height:22px;border:2px solid #b2c7b777;border-radius:50%;transform:translate(-50%,-50%);animation:farm-ripple 1.6s ease-out infinite}
.morana-farm-panel .farm-waves::after {content:"";position:absolute;inset:-13px;border:1px solid #b2c7b755;border-radius:50%}
@keyframes farm-ripple {from{transform:translate(-50%,-50%) scale(.6);opacity:1}to{transform:translate(-50%,-50%) scale(2.2);opacity:0}}
.morana-farm-panel .farm-fish-shadow {position:absolute;bottom:12px;left:16%;font-size:28px;filter:brightness(.34) sepia(.5);animation:farm-fish-swim 4.3s ease-in-out infinite alternate}
@keyframes farm-fish-swim {to{left:74%;transform:scaleX(-1)}}
.morana-farm-panel .farm-bobber {position:absolute;left:calc(50% - 17px);top:5px;font-size:32px;transform-origin:top;animation:farm-bob 1.8s ease-in-out infinite}
@keyframes farm-bob {50%{transform:translateY(8px) rotate(6deg)}}
.morana-farm-panel.farm-bite .farm-bobber {animation:farm-bite-jolt .17s linear infinite}
@keyframes farm-bite-jolt {50%{transform:translateY(13px) rotate(-10deg)}}
.morana-farm-panel.farm-bite .farm-callout {color:#e8eee4}
.morana-farm-panel .farm-tension {width:82%;height:8px;background:#181513;border:1px solid #967656;overflow:hidden}
.morana-farm-panel .farm-tension-fill {width:0;height:100%;background:linear-gradient(90deg,#8b7255,#d8c69d)}
/* Cueillette : six plantes à mémoriser et cinq espèces disponibles. */
.morana-farm-panel .farm-meadow {display:flex;justify-content:center;gap:27px;width:100%;padding:7px;background:linear-gradient(transparent,rgba(77,94,55,.2));font-size:27px}
.morana-farm-panel .farm-memory {padding:7px 0;text-align:center;width:100%}
.morana-farm-panel .farm-memory-caption {color:#ddc79f;font:700 10px/1.3 Arial,sans-serif;letter-spacing:.04em}
.morana-farm-panel .farm-memory-flowers {display:flex;justify-content:center;gap:8px;margin:11px auto 5px;filter:blur(8px);opacity:.22;transition:filter .23s,opacity .23s}
.morana-farm-panel.farm-revealing .farm-memory-flowers{filter:none;opacity:1}
.morana-farm-panel .farm-memory-flowers span {font-size:27px}
.morana-farm-panel .farm-choice-caption {font-size:11px;color:#ddcbb4;text-align:center}
.morana-farm-panel .farm-controls .farm-plant-btn {flex:1;min-width:0;max-width:73px;padding:7px 2px;font-size:25px}
/* Minage : fissure étroite, cadence plus rapide, cible variable. */
.morana-farm-panel .farm-ore {
  display:grid;place-items:center;position:relative;width:117px;height:104px;
  background:radial-gradient(ellipse,#615c66,#33313a 70%);
  clip-path:polygon(18% 2%,75% 0,100% 34%,85% 90%,31% 100%,0 63%);
}
.morana-farm-panel .farm-ore-symbol {font-size:53px;filter:drop-shadow(0 0 10px #9d8cb0);animation:farm-crystal 1.9s ease-in-out infinite}
@keyframes farm-crystal {50%{transform:scale(1.05);filter:drop-shadow(0 0 16px #b9a4c1)}}
.morana-farm-panel .farm-sparks {position:absolute;top:6px;right:11px;font-size:22px;color:#edd6a4;animation:farm-spin 4.5s linear infinite}
.morana-farm-panel .farm-timing-track {position:relative;width:88%;height:23px;border:2px ridge #988269;background:linear-gradient(90deg,#2b2726,#68605c,#2b2726)}
.morana-farm-panel .farm-timing-target {position:absolute;top:0;bottom:0;transform:translateX(-50%);background:#c4ac8e77;border-left:2px solid #f4d69f;border-right:2px solid #f4d69f}
.morana-farm-panel .farm-timing-marker {position:absolute;top:-5px;width:5px;height:29px;background:#f3e1c5;transform:translateX(-50%);box-shadow:0 0 5px #120e0a}
.morana-farm-panel.farm-perfect .farm-timing-marker {background:#e4f0d6}
/* Bûcheronnage : alternance imposée avec barre de rythme à durée limitée. */
.morana-farm-panel .farm-tree {display:flex;flex-direction:column;align-items:center;justify-content:center;width:135px;height:133px}
.morana-farm-panel .farm-tree-leaves {font-size:67px;line-height:1.1}
.morana-farm-panel .farm-tree-trunk {display:grid;place-items:center;height:38px;width:49px;margin-top:-12px;border-radius:4px;background:repeating-linear-gradient(90deg,#67452b 0 6px,#8a5d37 7px 13px)}
.morana-farm-panel .farm-tree-cut {color:#ffdfaf;font-size:14px;font-weight:800;text-shadow:0 1px 4px #000;white-space:nowrap}
.morana-farm-panel .farm-rhythm-track {width:84%;height:8px;overflow:hidden;border:1px solid #967656;background:#181513}
.morana-farm-panel .farm-rhythm-fill {display:block;width:100%;height:100%;background:linear-gradient(90deg,#856242,#f0c28a);transition:width .07s linear}
.morana-farm-panel .farm-controls .farm-axe-btn.suggested {border-color:#eac495;filter:brightness(1.14)}
/* Résultat : ne jamais mettre de diagnostic technique devant le joueur. */
.morana-farm-panel.farm-result .farm-stage {min-height:180px;padding:21px 12px}
.morana-farm-panel .farm-end-icon {font-size:44px;line-height:1.25}
.morana-farm-panel .farm-end-help {margin:2px auto 0;color:#d9c6ab;text-align:center;font:12px/1.5 Arial,sans-serif}
.morana-farm-panel.farm-result .farm-status {min-height:43px;color:#f2d197}
@media(max-width:680px) {
  #hud-farm-wrapper.morana-farm-panel {
    top:auto;bottom:max(9px,env(safe-area-inset-bottom));left:9px;right:9px;
    transform:none;width:auto;max-height:calc(100dvh - 18px);
  }
  .morana-farm-panel .farm-stage {min-height:158px;margin:0 9px;padding:9px}
  .morana-farm-panel .farm-steps {padding:0 11px 9px}
  .morana-farm-panel .farm-heading {padding:9px 11px}
  .morana-farm-panel .farm-heading-icon {width:42px;height:42px;font-size:25px}
  .morana-farm-panel .farm-controls {padding:8px 9px 6px;gap:4px}
  .morana-farm-panel .farm-controls button {min-height:38px;padding:5px 3px}
  .morana-farm-panel .farm-controls .farm-plant-btn {font-size:23px}
  .morana-farm-panel .farm-topline {min-height:47px}
}
@media(max-height:620px) and (min-width:681px) {
  #hud-farm-wrapper.morana-farm-panel .farm-stage {min-height:148px}
  #hud-farm-wrapper.morana-farm-panel .farm-heading {padding-top:8px;padding-bottom:7px}
}
@media(prefers-reduced-motion:reduce) {
  .morana-farm-panel *, .morana-farm-panel *::before, .morana-farm-panel *::after {animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* Préparation des mini-jeux : compte à rebours au centre de farm-stage. */
.morana-farm-panel .farm-prep {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:7px;width:100%;min-height:174px;text-align:center;
}
.morana-farm-panel .farm-prep-symbol {font-size:30px;line-height:1.15}
.morana-farm-panel .farm-prep-title {
  color:#f2d4a2;font:16px/1.3 'Young Serif',Georgia,serif;
  text-shadow:1px 2px 3px #000;letter-spacing:.03em;
}
.morana-farm-panel .farm-countdown-number {
  display:grid;place-items:center;min-width:75px;height:75px;border-radius:50%;
  border:3px ridge rgba(208,177,135,.83);background:rgba(19,13,10,.82);
  box-shadow:0 0 0 5px rgba(104,77,45,.25),inset 0 0 17px rgba(226,177,101,.13);
  color:#f7e0b3;font:43px/1 'Young Serif',Georgia,serif;
  text-shadow:0 2px 7px #000;animation:farm-prep-pulse 1s ease-in-out infinite;
}
.morana-farm-panel .farm-prep-hint {
  color:#dfcbb4;font:11px/1.45 Arial,sans-serif;max-width:250px;
}
@keyframes farm-prep-pulse {50%{box-shadow:0 0 0 9px rgba(104,77,45,.13),inset 0 0 17px rgba(226,177,101,.20);}}
@media (prefers-reduced-motion: reduce){
  .morana-farm-panel .farm-countdown-number {animation:none}
}

/* Résultat de récolte : laisser immédiatement agir le joystick situé dessous.
   Seuls les boutons Fermer restent cliquables. La collecte active conserve
   son panneau interactif. */
#hud-farm-wrapper.morana-farm-panel.farm-result { pointer-events:none; }
#hud-farm-wrapper.morana-farm-panel.farm-result .farm-close,
#hud-farm-wrapper.morana-farm-panel.farm-result .farm-controls button { pointer-events:auto; }

/* Contrôles multi-touch — iOS/Android : aucun geste natif ne doit voler un doigt.
   Chaque commande conserve son pointeur jusqu'à son relâchement individuel. */
#joystick, #joystick canvas { touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
#hud .skill, #hud .hudsmall, #hud .skill img {
  touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none;
}
#hud .hud-touch-held { filter:brightness(1.2); border-color:rgba(241,201,139,.85); }
/* Les interactions du mini-jeu gardent leur propre gestion tactile. */
#hud-farm-wrapper.morana-farm-panel { -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.morana-farm-panel .farm-controls button, .morana-farm-panel .farm-close { touch-action:manipulation; }
@media (pointer:coarse) {
  #hud .skill, #hud .hudsmall { -webkit-tap-highlight-color:transparent; }
  .morana-farm-panel .farm-controls button { min-height:44px; }
}

/* JOYSTICK MOBILE - CORRECTIF V2
   Le style global canvas du moteur 3D est en plein écran. Le mini-canvas du
   joystick ne doit JAMAIS hériter de ces dimensions ni de position:fixed.
   On conserve exactement le format historique 125 x 125 et sa position. */
#joystick > canvas#joystick-canvas {
  display: block;
  position: absolute;
  inset: 0 auto auto 0;
  width: 125px;
  height: 125px;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
}

/* Farm mobile paysage : panneau lisible sans cacher les commandes en bas.
   Aucun changement au joystick, au HUD ou à la taille de leurs canvas. */
@media (pointer:coarse) and (max-height:520px) {
  #hud-farm-wrapper.morana-farm-panel {
    top:max(6px, env(safe-area-inset-top));
    bottom:max(6px, env(safe-area-inset-bottom));
    right:max(8px, env(safe-area-inset-right));
    left:auto;
    transform:none;
    width:min(385px, calc(100vw - 16px));
    height:auto;
    max-height:calc(100dvh - 12px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  #hud-farm-wrapper.morana-farm-panel .farm-topline {
    min-height:33px; padding:3px 9px;
  }
  #hud-farm-wrapper.morana-farm-panel .farm-kicker {font-size:12px;}
  #hud-farm-wrapper.morana-farm-panel .farm-close {width:28px;height:28px;}
  #hud-farm-wrapper.morana-farm-panel .farm-heading {padding:4px 9px;gap:7px;}
  #hud-farm-wrapper.morana-farm-panel .farm-heading-icon {width:29px;height:29px;font-size:19px;}
  #hud-farm-wrapper.morana-farm-panel .farm-heading h3 {font-size:14px;margin:0;}
  #hud-farm-wrapper.morana-farm-panel .farm-heading p {font-size:10px;line-height:1.25;}
  #hud-farm-wrapper.morana-farm-panel .farm-steps-heading {padding:3px 10px 3px;}
  #hud-farm-wrapper.morana-farm-panel .farm-steps {padding:0 10px 4px;}
  #hud-farm-wrapper.morana-farm-panel .farm-steps span {height:5px;}
  #hud-farm-wrapper.morana-farm-panel .farm-stage {
    flex:1 1 auto; min-height:98px; margin:0 7px; padding:5px 8px;
    gap:5px; overflow:hidden;
  }
  #hud-farm-wrapper.morana-farm-panel .farm-prep {min-height:105px;gap:3px;}
  #hud-farm-wrapper.morana-farm-panel .farm-prep-symbol {font-size:18px;}
  #hud-farm-wrapper.morana-farm-panel .farm-prep-title {font-size:12px;}
  #hud-farm-wrapper.morana-farm-panel .farm-countdown-number {
    height:44px;min-width:44px;font-size:28px;
  }
  #hud-farm-wrapper.morana-farm-panel .farm-prep-hint {font-size:10px;}
  #hud-farm-wrapper.morana-farm-panel .farm-ore {width:86px;height:70px;}
  #hud-farm-wrapper.morana-farm-panel .farm-ore-symbol {font-size:32px;}
  #hud-farm-wrapper.morana-farm-panel .farm-tree {height:78px;width:110px;}
  #hud-farm-wrapper.morana-farm-panel .farm-tree-leaves {font-size:41px;}
  #hud-farm-wrapper.morana-farm-panel .farm-tree-trunk {height:28px;margin-top:-9px;}
  #hud-farm-wrapper.morana-farm-panel .farm-meadow {font-size:20px;padding:2px;}
  #hud-farm-wrapper.morana-farm-panel .farm-memory {padding:2px 0;}
  #hud-farm-wrapper.morana-farm-panel .farm-memory-flowers {margin:4px auto;}
  #hud-farm-wrapper.morana-farm-panel .farm-memory-flowers span {font-size:21px;}
  #hud-farm-wrapper.morana-farm-panel .farm-controls {
    position:sticky;bottom:0;z-index:2;
    padding:5px 8px;gap:5px;min-height:46px;
    background:rgba(27,19,14,.97);
  }
  #hud-farm-wrapper.morana-farm-panel .farm-controls button {min-height:42px;padding:4px;}
  #hud-farm-wrapper.morana-farm-panel .farm-status {padding:2px 8px 4px;min-height:20px;}
  #hud-farm-wrapper.morana-farm-panel .farm-footer {display:none;}
  #hud-farm-wrapper.morana-farm-panel.farm-result .farm-stage {min-height:97px;padding:6px 8px;}
  #hud-farm-wrapper.morana-farm-panel .farm-end-icon {font-size:26px;}
  #hud-farm-wrapper.morana-farm-panel .farm-end-help {font-size:10px;}
}

/* Chaque timer suit son propre mesh de zone d'action (comme le farm). */
.house-cooldown-timer.picking-timer {
  position: fixed; transform: translate(-50%, -100%);
  z-index: 2600; pointer-events: none; min-width: 148px;
  padding: 4px 14px; color: white; font-size: 14px; text-align: center;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.75) 25%, rgba(0,0,0,.75) 75%, transparent);
  border-top: 1px solid #757575; border-bottom: 1px solid #757575;
  text-shadow: 0 1px 2px #000; white-space: nowrap;
}

/* Daily Gift V4 : attente du prompt navigateur et guide de réactivation. */
#dailygift .dg-prompt-status{padding:7px 5px 0;margin:3px auto 0;max-width:350px;
  font:11px/1.4 Arial,sans-serif;color:#e6ca8f}
#dailygift .dg-prompt-status[hidden]{display:none!important}
#dg-notification-help{position:fixed;inset:0;z-index:3120;box-sizing:border-box;
  display:flex;align-items:center;justify-content:center;padding:14px;
  font-family:Arial,sans-serif;color:#f7e6cd;isolation:isolate}
#dg-notification-help[hidden]{display:none!important}
#dg-notification-help .dg-help-backdrop{position:absolute;inset:0;
  background:radial-gradient(ellipse at center,rgba(19,14,11,.55),rgba(0,0,0,.87));
  backdrop-filter:blur(6px);animation:dgBackdrop .25s ease both}
#dg-notification-help .dg-help-card{position:relative;width:min(420px,calc(100vw - 24px));
  box-sizing:border-box;max-height:calc(100dvh - 22px);overflow:auto;text-align:center;
  border:5px ridge rgba(198,165,109,.92);border-radius:7px;padding:18px 22px 20px;
  background:linear-gradient(152deg,rgba(16,23,26,.92),rgba(46,28,16,.95)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/cover #251a16;
  box-shadow:0 20px 60px #000e,0 0 28px #bc925466,inset 0 0 34px #0009;
  animation:dgHelpEnter .35s cubic-bezier(.18,.78,.26,1.08) both}
#dg-notification-help .dg-help-card::before,#dg-notification-help .dg-help-card::after{
  content:"";position:absolute;left:18px;right:18px;height:1px;
  background:linear-gradient(90deg,transparent,#bd9969,transparent)}
#dg-notification-help .dg-help-card::before{top:8px}
#dg-notification-help .dg-help-card::after{bottom:8px}
#dg-notification-help .dg-help-ornament{font-size:10px;letter-spacing:4px;color:#d1ab72}
#dg-notification-help .dg-help-icon{display:grid;place-items:center;margin:8px auto 9px;
  width:40px;height:40px;border-radius:50%;border:1px solid #bca06c;
  box-shadow:0 0 20px #daa66244,inset 0 0 16px #b88e4833;
  color:#f5d391;font-size:26px;transform:rotate(45deg)}
#dg-notification-help .dg-help-chapter{font-size:9px;font-weight:bold;letter-spacing:2px;color:#ae9d87}
#dg-notification-help h2{font:22px/1.2 'Young Serif',Georgia,serif;text-transform:uppercase;
  color:#fff0d4;margin:7px 0 10px;text-shadow:0 2px 6px #000}
#dg-notification-help #dg-help-description{margin:0 auto 12px;max-width:350px;
  color:#e2d3bf;font:12px/1.55 Arial,sans-serif}
#dg-notification-help .dg-help-steps{max-width:355px;text-align:left;margin:0 auto 7px;
  padding:10px 14px 10px 31px;background:#110f0db3;border:1px solid #c5a47759;
  border-radius:5px;box-shadow:inset 0 0 18px #0007}
#dg-notification-help .dg-help-steps li{font:12px/1.45 Arial,sans-serif;padding:3px 0;color:#f1e5d1}
#dg-notification-help .dg-help-steps li::marker{font-weight:bold;color:#dfb673}
#dg-notification-help .dg-help-alt{font:10px/1.5 Arial,sans-serif;color:#afaaa3;margin:8px 0 10px}
#dg-notification-help .dg-help-browser-demo{max-width:355px;margin:0 auto 12px;text-align:left}
#dg-notification-help .dg-help-browser-label{margin:0 0 6px;font:700 10px/1.3 Arial,sans-serif;
  letter-spacing:1.4px;text-transform:uppercase;color:#bea68b;text-align:center}
#dg-notification-help .dg-help-browser-frame{position:relative;padding:9px 10px 16px;
  border:1px solid #ccb0837a;border-radius:10px;background:linear-gradient(180deg,#27211ceb,#171310f5);
  box-shadow:inset 0 0 24px #0008,0 8px 20px #0007}
#dg-notification-help .dg-help-browser-top{display:flex;align-items:center;gap:5px;margin-bottom:8px}
#dg-notification-help .dg-help-browser-dot{width:8px;height:8px;border-radius:50%;background:#86694b;box-shadow:0 0 0 1px #0006}
#dg-notification-help .dg-help-browser-tab{margin-left:8px;flex:0 0 94px;height:15px;border-radius:7px 7px 0 0;
  background:linear-gradient(180deg,#66513b,#403223);opacity:.9;box-shadow:inset 0 1px 0 #ffffff18}
#dg-notification-help .dg-help-browser-bar{position:relative;display:flex;align-items:center;gap:7px;
  min-height:40px;padding:0 10px;border-radius:999px;border:1px solid #d7c3a555;
  background:linear-gradient(180deg,#f7f4ec,#dfd8ca 52%,#d2cab9);box-shadow:inset 0 1px 0 #fff9,inset 0 -1px 0 #0001}
#dg-notification-help .dg-help-browser-site-btn{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;
  border-radius:8px;background:linear-gradient(180deg,#fbfbfd,#ececf1);border:1px solid #d8d9de;
  box-shadow:0 0 0 2px #fff8,0 0 0 5px #76a6ff42,0 6px 14px #00000022;position:relative}
#dg-notification-help .dg-help-browser-site-btn::after{content:"";position:absolute;inset:-4px;border-radius:11px;
  border:2px solid rgba(113,166,255,.55);box-shadow:0 0 18px rgba(113,166,255,.28)}
#dg-notification-help .dg-help-browser-site-btn svg{display:block;width:17px;height:17px;fill:#5c6273}
#dg-notification-help .dg-help-browser-lock{font-size:14px;opacity:.9;filter:saturate(.85)}
#dg-notification-help .dg-help-browser-domain{flex:1 1 auto;min-width:0;color:#3c3328;font:700 12px/1 Arial,sans-serif;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dg-notification-help .dg-help-browser-star{color:#786b58;font-size:15px;line-height:1;transform:translateY(-.5px)}
#dg-notification-help .dg-help-browser-menu{color:#584b3b;font-size:18px;line-height:1}
#dg-notification-help .dg-help-browser-cursor{position:absolute;left:40px;top:55px;width:34px;height:34px;
  filter:drop-shadow(0 3px 3px rgba(0,0,0,.45));transform:rotate(-12deg)}
#dg-notification-help .dg-help-browser-cursor svg{display:block;width:100%;height:100%;fill:#fbfbfd;stroke:#161616;stroke-width:1.4;stroke-linejoin:round}
#dg-notification-help .dg-help-feedback{font:11px/1.5 Arial,sans-serif;
  border:1px solid #d5b07a77;border-radius:4px;padding:7px;margin:10px 0;
  background:#49352466;color:#ffdc9a}
#dg-notification-help [hidden]{display:none!important}
#dg-notification-help .dg-help-actions{display:flex;gap:8px;align-items:stretch;margin-top:12px}
#dg-notification-help .dg-button{flex:1 1 0;min-width:0;min-height:37px;padding:8px 8px;
  font:700 10px/1.3 'Young Serif',Georgia,serif;letter-spacing:.2px;color:#f5e7d5;
  text-transform:uppercase;border:3px ridge #ac8a62;border-radius:5px;
  cursor:pointer;text-shadow:0 2px 3px #000;box-shadow:0 4px 12px #0009;
  transition:transform .15s ease,filter .15s ease}
#dg-notification-help .dg-help-verify{background:linear-gradient(#537e58,#275039);border-color:#93c0a1}
#dg-notification-help .dg-help-skip{background:linear-gradient(#80643f,#513920);border-color:#c9a97b}
#dg-notification-help .dg-button:hover{filter:brightness(1.16);transform:translateY(-1px)}
#dg-notification-help .dg-button:focus-visible{outline:2px solid #ffdfab;outline-offset:2px}
#dg-notification-help .dg-button:disabled{opacity:.5;cursor:default;transform:none}
#dg-notification-help.dg-help-closing .dg-help-card{animation:dgHelpExit .26s ease-in both}
#dg-notification-help.dg-help-closing .dg-help-backdrop{animation:dgBackdropOut .26s ease-in both}
@keyframes dgHelpEnter{from{opacity:0;transform:translateY(18px) scale(.9);filter:brightness(1.35)}to{opacity:1;transform:none;filter:brightness(1)}}
@keyframes dgHelpExit{to{opacity:0;transform:translateY(-14px) scale(.9);filter:blur(4px)}}
@media(max-width:480px){#dg-notification-help .dg-help-card{padding:13px 14px 15px;border-width:4px}
  #dg-notification-help h2{font-size:18px}#dg-notification-help .dg-help-steps li{font-size:11px}
  #dg-notification-help .dg-help-browser-frame{padding:8px 8px 14px}
  #dg-notification-help .dg-help-browser-bar{min-height:35px;padding:0 8px;gap:6px}
  #dg-notification-help .dg-help-browser-site-btn{flex-basis:25px;width:25px;height:25px}
  #dg-notification-help .dg-help-browser-site-btn svg{width:15px;height:15px}
  #dg-notification-help .dg-help-browser-domain{font-size:11px}
  #dg-notification-help .dg-help-browser-star{font-size:14px}
  #dg-notification-help .dg-help-browser-cursor{left:11px;top:45px;width:29px;height:29px}
  #dg-notification-help .dg-button{font-size:9px;padding:7px 4px}}
@media(prefers-reduced-motion:reduce){#dg-notification-help .dg-help-card,
  #dg-notification-help .dg-help-backdrop{animation-duration:.01ms!important}}

/* ========================================================================== */
/* HUD mobile compact — événement + quête repliée (14/10/2026).
 * Isolé aux petits écrans : le journal ouvert et la version PC ne changent pas.
 * Les deux HUD restent de part et d'autre de l'écran sans se chevaucher.
 * ========================================================================== */
@media (max-width: 600px),
       (max-width: 920px) and (max-height: 500px) and (pointer: coarse) {
  /* Événement : conserver titre, phase, chrono, compteurs et jauge de boss. */
  #arena-event-ui #arena-event-hud {
    top: 43px!important;
    right: 7px!important;
    width: min(190px, 50vw)!important;
    border-width: 3px!important;
  }
  #arena-event-ui #arena-event-hud .arena-event-head {
    min-height: 34px!important;
    padding: 5px 6px!important;
    gap: 5px!important;
  }
  #arena-event-hud .arena-event-insignia {
    width: 16px;
    height: 16px;
    font-size: 15px;
  }
  #arena-event-hud .arena-event-title {
    font-size: 11px!important;
    line-height: 1.15!important;
    white-space: nowrap!important;
    overflow: hidden!important;
    text-overflow: ellipsis!important;
  }
  #arena-event-hud .arena-event-phase {
    font-size: 9px!important;
    line-height: 1.2!important;
    white-space: nowrap!important;
    overflow: hidden!important;
    text-overflow: ellipsis!important;
  }
  #arena-event-hud .arena-event-timer {
    min-width: 39px!important;
    padding-left: 5px!important;
  }
  #arena-event-hud .arena-event-timer strong {
    font-size: 12px!important;
    line-height: 1.1!important;
  }
  #arena-event-hud .arena-event-body {padding: 5px 6px 6px;}
  /* L'aide reste disponible aux lecteurs d'écran sans occuper la vue du jeu. */
  #arena-event-ui #arena-event-hud .arena-event-instruction:not([hidden]) {
    position: absolute!important;
    width: 1px!important;
    height: 1px!important;
    padding: 0!important;
    margin: -1px!important;
    overflow: hidden!important;
    white-space: nowrap!important;
    clip-path: inset(50%)!important;
    border: 0!important;
  }
  #arena-event-hud .arena-event-essential {gap: 4px!important;}
  #arena-event-ui #arena-event-hud .arena-event-stat {
    min-width: 0!important;
    min-height: 28px!important;
    padding: 4px 5px!important;
  }
  #arena-event-hud .arena-event-stat small {
    font-size: 8px!important;
    line-height: 1.1!important;
  }
  #arena-event-hud .arena-event-stat strong {
    margin-top: 2px!important;
    font-size: 11px!important;
    line-height: 1.1!important;
  }
  #arena-event-ui #arena-event-hud .arena-event-secondary.active,
  #arena-event-ui #arena-event-hud .arena-alpha-hp-row.active {
    margin-top: 5px!important;
    padding: 5px 6px!important;
  }

  /* Quête : réduire uniquement la barre repliée, jamais le journal ouvert. */
  #morana-quest-ui:not(.mq-journal-open) {
    width: min(156px, calc(48vw - 16px));
  }
  #morana-quest-ui:not(.mq-journal-open) .mq-hud-card {
    border-width: 2px;
  }
  #morana-quest-ui:not(.mq-journal-open) #morana-quest-toggle {
    min-height: 34px;
    padding: 4px 5px;
    gap: 4px;
  }
  #morana-quest-ui:not(.mq-journal-open) .mq-hud-emblem {
    width: 18px;
    height: 18px;
    border-width: 1px;
    font-size: 14px;
  }
  #morana-quest-ui:not(.mq-journal-open) .mq-hud-task {
    font-size: 10px;
    line-height: 1.2;
  }
  #morana-quest-ui:not(.mq-journal-open) .mq-hud-task-count {font-size: 9px;}
  #morana-quest-ui:not(.mq-journal-open) .mq-hud-chevron {
    font-size: 13px;
    margin-left: 0;
  }
}
/* Tablette large (> 920 px) : mêmes règles que le bloc mobile voisin,
   mais exclusivement après détection de .morana-tablet sur <html>. */
@media (min-width: 921px) and (max-height: 500px) and (pointer: coarse) {
  html.morana-tablet #arena-event-ui #arena-event-hud { 
    top: 43px!important;
    right: 7px!important;
    width: min(190px, 50vw)!important;
    border-width: 3px!important;
   }
  html.morana-tablet #arena-event-ui #arena-event-hud .arena-event-head { 
    min-height: 34px!important;
    padding: 5px 6px!important;
    gap: 5px!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-insignia { 
    width: 16px;
    height: 16px;
    font-size: 15px;
   }
  html.morana-tablet #arena-event-hud .arena-event-title { 
    font-size: 11px!important;
    line-height: 1.15!important;
    white-space: nowrap!important;
    overflow: hidden!important;
    text-overflow: ellipsis!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-phase { 
    font-size: 9px!important;
    line-height: 1.2!important;
    white-space: nowrap!important;
    overflow: hidden!important;
    text-overflow: ellipsis!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-timer { 
    min-width: 39px!important;
    padding-left: 5px!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-timer strong { 
    font-size: 12px!important;
    line-height: 1.1!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-body { padding: 5px 6px 6px; }
  html.morana-tablet #arena-event-ui #arena-event-hud .arena-event-instruction:not([hidden]) { 
    position: absolute!important;
    width: 1px!important;
    height: 1px!important;
    padding: 0!important;
    margin: -1px!important;
    overflow: hidden!important;
    white-space: nowrap!important;
    clip-path: inset(50%)!important;
    border: 0!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-essential { gap: 4px!important; }
  html.morana-tablet #arena-event-ui #arena-event-hud .arena-event-stat { 
    min-width: 0!important;
    min-height: 28px!important;
    padding: 4px 5px!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-stat small { 
    font-size: 8px!important;
    line-height: 1.1!important;
   }
  html.morana-tablet #arena-event-hud .arena-event-stat strong { 
    margin-top: 2px!important;
    font-size: 11px!important;
    line-height: 1.1!important;
   }
  html.morana-tablet #arena-event-ui #arena-event-hud .arena-event-secondary.active,
  html.morana-tablet #arena-event-ui #arena-event-hud .arena-alpha-hp-row.active { 
    margin-top: 5px!important;
    padding: 5px 6px!important;
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) { 
    width: min(156px, calc(48vw - 16px));
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) .mq-hud-card { 
    border-width: 2px;
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) #morana-quest-toggle { 
    min-height: 34px;
    padding: 4px 5px;
    gap: 4px;
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) .mq-hud-emblem { 
    width: 18px;
    height: 18px;
    border-width: 1px;
    font-size: 14px;
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) .mq-hud-task { 
    font-size: 10px;
    line-height: 1.2;
   }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) .mq-hud-task-count { font-size: 9px; }
  html.morana-tablet #morana-quest-ui:not(.mq-journal-open) .mq-hud-chevron { 
    font-size: 13px;
    margin-left: 0;
   }
}

/* Tharos premium chest (108 permanent + 3 x 108 paid slots) */
.chest_tabs {display:flex;gap:4px;margin:8px 0;align-items:center;justify-content:center;flex-wrap:wrap;}
.chest_tab {padding:7px 8px;border:1px solid #9b8b65;border-radius:5px;background:#292433;color:#fff;cursor:pointer;font-weight:bold;}
.chest_tab.selected {background:#75582e;border-color:#e0c278;}
.chest_tab.locked {opacity:.7;}
.chest_billing {font-size:12px;line-height:1.4;min-height:22px;}
.chest_item.chest_locked {opacity:.45;cursor:not-allowed;pointer-events:none;background:repeating-linear-gradient(45deg,#302c32,#302c32 6px,#534047 6px,#534047 12px);}
.chest_item.chest_locked::after {content:'🔒';position:relative;top:-41px;left:16px;font-size:18px;text-shadow:1px 1px 3px black;pointer-events:none;}
.chest_item.chest_locked:not(:has(.smallitem))::after {top:15px;}
.tharos_npc_offers {padding:10px 5px;margin:6px;border:1px solid #8d6e47;border-radius:5px;color:white;}
.tharos_offer {margin:12px 0;padding:10px;border:1px solid #967b45;border-radius:6px;background:rgba(0,0,0,.3);}
.tharos_offer p {font-size:12px;line-height:1.4;}
.tharos_offer .btn {width:100%;font-size:13px;padding:5px;box-sizing:border-box;}
@media (max-width: 700px) {
 .chest_billing {display:block;font-size:10px;}
 .chest_items {height:calc(100vh - 164px);}
 .chest_tab {font-size:11px;padding:5px 7px;}
}

/* Tharos v5 — polished storage UI, aligned with Morana's dark/gold theme. */
#chest {--tharos-gold:#dfbd75;--tharos-muted:#c1ad91;--tharos-panel:rgba(20,16,22,.89);}
#chest .chest_title {margin-bottom:9px;padding-bottom:9px;letter-spacing:.025em;border-color:rgba(223,189,117,.36);}
#chest .chest_tabs {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0 6px;}
#chest .chest_tab {display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px;min-width:0;min-height:49px;padding:8px 5px;box-sizing:border-box;border:1px solid rgba(195,161,102,.48);border-radius:9px;background:linear-gradient(160deg,rgba(42,34,45,.98),rgba(20,17,23,.98));color:#e4ded5;font-family:inherit;font-size:12px;line-height:1.15;text-shadow:0 1px 2px #000;transition:background .15s,border-color .15s,box-shadow .15s;}
#chest .chest_tab:hover:not(.selected) {border-color:var(--tharos-gold);background:rgba(89,62,36,.9);opacity:1;}
#chest .chest_tab.selected {background:linear-gradient(145deg,#88633c,#4d3324);border-color:#edc57d;box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 0 1px rgba(212,177,110,.23);color:#fff6dc;}
#chest .chest_tab.locked {opacity:.82;}
#chest .chest_tab_icon {font-size:14px;line-height:1;}
#chest .chest_tab_text {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#chest .chest_tab_count {font-size:10px;color:#d3bc91;opacity:.86;flex:0 0 100%;}
#chest .chest_tab:focus-visible,.tharos_npc_offers button:focus-visible {outline:2px solid #f6d28c;outline-offset:2px;}
#chest .chest_billing {display:block !important;min-height:0;font-size:12px;line-height:1.35;text-align:left;}
#chest .chest_notice {margin:0;text-align:center;font-size:11px;color:#f5c195;}
#chest .chest_notice:empty {display:none;}
#chest .chest_items {height:calc(100vh - 270px);min-height:160px;margin-top:7px;border:1px solid rgba(206,178,123,.45);border-radius:6px;background:rgba(8,8,12,.28);scrollbar-color:#9f8054 #28222a;}
#chest .chest_item.chest_locked {opacity:.34;background:linear-gradient(135deg,rgba(75,61,70,.38),rgba(21,21,31,.63));pointer-events:none;}
#chest .chest_item.chest_locked::after {content:none;}
#chest .chest_locked_notice {position:absolute;top:68px;left:50%;transform:translateX(-50%);width:min(90%,310px);box-sizing:border-box;padding:15px 14px;text-align:center;border-radius:10px;border:1px solid rgba(235,197,123,.65);box-shadow:0 10px 32px rgba(0,0,0,.52);background:linear-gradient(145deg,rgba(53,40,37,.98),rgba(21,19,29,.98));z-index:3;color:#fff1d2;}
#chest.chest_is_saving .chest_items {pointer-events:none;opacity:.78;}
#chest.chest_is_saving .chest_tabs {pointer-events:none;}
#chest.chest_is_saving .chest_items_wrapper::after {content:'';position:absolute;right:17px;top:13px;width:15px;height:15px;border:2px solid rgba(240,205,135,.3);border-top-color:#f0cd87;border-radius:50%;animation:tharos-loading-spin .7s linear infinite;pointer-events:none;}
@keyframes tharos-loading-spin {to{transform:rotate(360deg)}}

/* The original item artwork (shop 55 = item 517, shop 56 = item 519). */
.tharos_npc_offers {box-sizing:border-box;border:0;padding:0;}
.tharos_npc_offers .tharos_hero {display:flex;align-items:center;gap:12px;padding-bottom:11px;margin-bottom:11px;border-bottom:1px solid rgba(205,169,102,.32);}
.tharos_npc_offers .tharos_hero_art {display:block;width:72px;height:72px;object-fit:contain;flex:0 0 72px;filter:drop-shadow(0 5px 8px rgba(0,0,0,.65));image-rendering:auto;}
.tharos_npc_offers .tharos_hero_copy {min-width:0;flex:1;}
.tharos_npc_offers .tharos_eyebrow {display:block;color:#d9ad67;font-size:10px;letter-spacing:.1em;text-transform:uppercase;}
.tharos_npc_offers h3 {margin:2px 0 4px;font-family:'Sedgwick Ave',cursive;font-size:17px;color:#ffdda0;line-height:1.25;text-shadow:1px 2px 3px #000;}
.tharos_npc_offers .tharos_hero_copy p {margin:0;font-size:12px;line-height:1.45;color:#ded1be;}
.tharos_npc_offers .tharos_offer_grid {gap:9px;}
.tharos_npc_offers .tharos_offer {box-sizing:border-box;min-width:0;margin:0;padding:11px;border:1px solid rgba(174,138,83,.65);border-radius:9px;background:linear-gradient(165deg,rgba(76,57,43,.48),rgba(15,18,27,.76));width:100%;;gap:8px;margin-bottom:10px;}
.tharos_npc_offers .tharos_offer_annual {border-color:#e6c27f;box-shadow:inset 0 0 0 1px rgba(230,194,127,.14);}
.tharos_npc_offers .tharos_offer_heading {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px;}
.tharos_npc_offers .tharos_offer_label {font-size:12px;font-weight:bold;color:#ffe2af;}
.tharos_npc_offers .tharos_offer_badge {font-size:9px;line-height:1.2;color:#3b2812;background:#e3c488;padding:3px 5px;border-radius:999px;font-weight:bold;}
.tharos_npc_offers .tharos_offer_badge_neutral {background:rgba(179,155,112,.24);color:#e6d1aa;}
.tharos_npc_offers .tharos_offer_amount {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px;}
.tharos_npc_offers .tharos_offer_amount strong {font-size:24px;font-weight:800;color:#fff5de;line-height:1.05;}
.tharos_npc_offers .tharos_offer_amount span {font-size:11px;color:#cebfa9;}
.tharos_npc_offers .tharos_offer_benefits {margin:0;flex:1;font-size:11px;line-height:1.4;color:#e2d5c4;}
.tharos_npc_offers .tharos_subscribe_btn {box-sizing:border-box;margin-top:auto;width:100%;padding:10px 6px;border:1px solid #ba9d5b;border-radius:7px;font-size:12px;font-weight:bold;line-height:1.2;white-space:normal;cursor:pointer;margin-top:15px;}
.tharos_npc_offers .tharos_renewal_note {font-size:10px;color:#d4c6ae;line-height:1.4;text-align:center;margin:11px 0 0;}
@media (max-width:700px), (max-height:740px) {
  #chest .chest_title {font-size:14px;margin-bottom:6px;}
  #chest .chest_tabs {gap:3px;margin:6px 0;}
  #chest .chest_tab {padding:6px 2px;min-height:42px;font-size:10px;gap:3px;}
  #chest .chest_tab_icon {font-size:12px;}
  #chest .chest_tab_count {font-size:9px;}
  #chest .chest_billing {display:block !important;font-size:10px;}
  #chest .chest_items {height:calc(100vh - 245px);min-height:110px;margin-left:8px;margin-top:5px;}
  #chest .chest_locked_notice {top:55px;padding:12px 9px;}
  .tharos_npc_offers {padding:10px;margin:5px 2px;}
  .tharos_npc_offers .tharos_hero_art {width:52px;height:52px;flex-basis:52px;}
  .tharos_npc_offers h3 {font-size:15px;}
  .tharos_npc_offers .tharos_offer_grid {grid-template-columns:1fr;gap:7px;}
  .tharos_npc_offers .tharos_offer {gap:5px;padding:9px;}
  .tharos_npc_offers .tharos_offer_amount strong {font-size:21px;}
}
@media (prefers-reduced-motion:reduce) {
  #chest .chest_tab,#chest.chest_is_saving .chest_items_wrapper::after {animation:none;transition:none;}
}

.tharos_npc_offers .tharos_offer_price_row {display:flex;justify-content:space-between;align-items:center;gap:6px;}
.tharos_npc_offers .tharos_offer_item_art {width:43px;height:43px;object-fit:contain;flex:0 0 43px;filter:drop-shadow(0 4px 6px rgba(0,0,0,.6));}


/* Tharos v7 — coffre minimal : une image, l'espace ajouté, deux achats compacts. */
#chest.chest {flex-direction:column;}
#chest .chest_title,#chest .chest_billing,#chest .chest_tabs,#chest .chest_notice {flex-shrink:0;}
#chest .chest_title {margin:0 0 5px;padding-bottom:5px;}
#chest .chest_tabs {margin:5px 0 4px;}
#chest .chest_billing {margin:0;}
#chest .tharos_chest_overview {box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;padding:6px 9px;border:1px solid rgba(214,173,107,.56);border-radius:9px;background:linear-gradient(150deg,rgba(75,54,42,.83),rgba(18,19,28,.96) 72%);box-shadow:inset 0 1px rgba(255,239,201,.08),0 5px 14px rgba(0,0,0,.2);color:#f7ead6;}
#chest .tharos_chest_hero {display:flex;flex:1 1 175px;align-items:center;gap:7px;min-width:0;}
#chest .tharos_chest_art {display:block;flex:0 0 39px;width:39px;height:39px;object-fit:contain;filter:drop-shadow(0 4px 7px rgba(0,0,0,.65));}
#chest .tharos_chest_copy {display:flex;flex-direction:column;gap:2px;min-width:0;}
#chest .tharos_chest_heading {color:#ffe1a4;font:normal 15px/1.12 'Sedgwick Ave',cursive;text-shadow:0 2px 3px rgba(0,0,0,.8);}
#chest .tharos_chest_benefits {font-size:10px;line-height:1.15;color:#e6d8bd;}
#chest .tharos_chest_status {display:flex;align-items:center;justify-content:space-between;flex:1 1 215px;gap:6px;min-width:0;}
#chest .tharos_chest_status_text {min-width:0;color:#e9c896;font-size:10px;line-height:1.25;overflow-wrap:anywhere;}
#chest .tharos_chest_status_active .tharos_chest_status_text {color:#b8e2b5;}
#chest .tharos_chest_portal {flex-shrink:0;padding:5px 7px;border:1px solid rgba(216,183,124,.55);border-radius:6px;background:rgba(107,77,48,.43);color:#fff1d4;font:inherit;font-size:10px;cursor:pointer;}
#chest .tharos_chest_portal:hover {background:rgba(140,98,51,.7);border-color:#e8c787;}
#chest .tharos_chest_plans {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1 1 220px;gap:5px;min-width:0;margin:0;}
#chest .tharos_chest_plan {display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;min-width:0;min-height:38px;box-sizing:border-box;padding:4px 5px;border:1px solid rgba(176,141,91,.72);border-radius:7px;background:linear-gradient(145deg,rgba(77,57,44,.98),rgba(26,29,38,.98));color:#f8ead0;text-align:center;cursor:pointer;transition:border-color .15s,background .15s,transform .15s;}
#chest .tharos_chest_plan_annual {border-color:#e3bf7b;background:linear-gradient(145deg,rgba(110,77,45,.95),rgba(45,33,33,.98));box-shadow:inset 0 0 0 1px rgba(239,197,119,.08);}
#chest .tharos_chest_plan:hover:not(:disabled) {border-color:#ffe0a1;background:linear-gradient(145deg,#815c39,#392b31);transform:translateY(-1px);}
#chest .tharos_chest_plan_label {font-size:10px;font-weight:700;line-height:1.12;color:#ffe6b9;}
#chest .tharos_chest_plan_price {display:flex;align-items:baseline;justify-content:center;gap:3px;min-width:0;white-space:nowrap;}
#chest .tharos_chest_plan_price strong {font-size:13px;line-height:1.1;color:#fff6df;font-weight:800;}
#chest .tharos_chest_plan_price small {font-size:9px;color:#d5bea0;}
#chest .tharos_chest_plan:disabled {cursor:not-allowed;opacity:.48;filter:saturate(.55);}
#chest .tharos_chest_plan:focus-visible,#chest .tharos_chest_portal:focus-visible {outline:2px solid #ffda8c;outline-offset:2px;}
/* La grille d'objets récupère toute la hauteur économisée. */
#chest .chest_items_wrapper {flex:1;min-height:0;margin-top:4px;position:relative;}
#chest .chest_items {box-sizing:border-box;height:100%;min-height:0;margin:0;width:100%;overflow-y:auto;}
#chest .chest_locked_notice {top:8px;left:50%;width:min(94%,335px);max-height:calc(100% - 16px);overflow-y:auto;box-sizing:border-box;padding:9px 10px;border:1px solid rgba(241,200,125,.85);border-radius:10px;background:radial-gradient(ellipse at 50% 0%,rgba(112,79,48,.96),rgba(40,31,32,.98) 48%,rgba(19,20,29,.99) 100%);box-shadow:0 12px 30px rgba(0,0,0,.62),inset 0 1px rgba(255,234,185,.15);color:#f6e6ca;scrollbar-color:#aa8956 #292128;}
#chest .tharos_locked_heading {display:flex;align-items:center;justify-content:center;gap:8px;text-align:left;}
#chest .tharos_locked_icon {display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border:1px solid rgba(242,209,150,.57);border-radius:8px;background:rgba(25,21,29,.6);font-size:14px;box-shadow:0 0 14px rgba(235,191,112,.15);}
#chest .tharos_locked_copy {min-width:0;}
#chest .chest_locked_notice h3 {margin:0;color:#ffe2ad;font:normal 15px/1.2 'Sedgwick Ave',cursive;text-shadow:0 2px 3px rgba(0,0,0,.7);}
#chest .tharos_locked_benefits {display:block;margin-top:2px;font-size:10px;line-height:1.2;color:#ffe0a3;}
#chest .chest_locked_notice .tharos_chest_plans {margin-top:7px;}
#chest .chest_locked_notice .tharos_locked_unavailable {margin:6px 0 0;font-size:10px;line-height:1.25;color:#f4be91;}
@media (max-width:700px), (max-height:740px) {
  #chest .chest_title {margin-bottom:4px;padding-bottom:3px;}
  #chest .tharos_chest_overview {gap:5px 8px;padding:5px 7px;}
  #chest .tharos_chest_art {width:36px;height:36px;flex-basis:36px;}
  #chest .tharos_chest_heading {font-size:14px;}
  #chest .tharos_chest_plans {gap:5px;}
  #chest .tharos_chest_plan {min-height:36px;padding:3px 4px;}
  #chest .chest_tabs {margin:5px 0 4px;}
  #chest .chest_items_wrapper {margin-top:4px;}
  #chest .chest_items {height:100%;min-height:0;margin:0;}
  #chest .chest_locked_notice {top:6px;max-height:calc(100% - 12px);padding:8px;}
  #chest .chest_locked_notice h3 {font-size:14px;}
}
@media (prefers-reduced-motion:reduce) {
  #chest .tharos_chest_plan {transition:none;}
  #chest .tharos_chest_plan:hover:not(:disabled) {transform:none;}
}

/* Nouveaux outils discrets dans la barre de chat */
#chat-tools { min-width: 0; overflow-x: auto; scrollbar-width: none; }
#chat-tools::-webkit-scrollbar { display: none; }
#chat-tools > button { flex-shrink: 0; }
#chat-tools .chat-social-tool {
  font-size: 13px; opacity: .86;
  transition: opacity .15s ease, color .15s ease;
}
#chat-tools .chat-social-tool:hover,
#chat-tools .chat-social-tool[aria-expanded="true"] { opacity: 1; color: #ffe2a4; }

/* Couleurs, dorures et lueurs proches des panneaux de récompense d'événement */
.morana-social-overlay {
  --ms-gold: #f0c67d;
  --ms-gold-light: #ffe6ae;
  --ms-gold-deep: #977348;
  --ms-text: #f7edda;
  --ms-muted: #ccb99b;
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  box-sizing: border-box;
  background: radial-gradient(ellipse at center, rgba(8, 12, 22, .67), rgba(2, 3, 9, .91));
  color: var(--ms-text);
  font-family: inherit;
}
.morana-social-overlay[hidden],
.morana-social-back[hidden],
.morana-social-hint[hidden] { display: none !important; }

.morana-social-dialog {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(100%, 460px);
  max-height: min(91dvh, 760px);
  overflow: hidden;
  line-height: 1.45;
  background:
    radial-gradient(ellipse at 50% -25%, rgba(230, 181, 97, .18), transparent 60%),
    radial-gradient(ellipse at 0% 105%, rgba(55, 84, 114, .23), transparent 60%),
    linear-gradient(154deg, #263044 0%, #171c2a 39%, #121522 100%);
  border: 1px solid #b89457;
  border-radius: 16px;
  box-shadow: 0 0 0 3px #171b27, 0 0 0 4px rgba(222, 174, 95, .32),
    0 20px 60px rgba(0, 0, 0, .8), 0 0 46px rgba(245, 176, 65, .13),
    inset 0 0 0 1px rgba(255, 226, 164, .15);
  animation: morana-social-appear .22s ease-out both;
}
.morana-social-dialog::before,
.morana-social-dialog::after {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  font-size: 18px;
  line-height: 1;
  color: var(--ms-gold);
  text-shadow: 0 0 12px rgba(255, 204, 116, .7);
}
.morana-social-dialog::before { content: none; left: 10px; top: 8px; }
.morana-social-dialog::after { content: none; right: 10px; bottom: 8px; }
@keyframes morana-social-appear {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.morana-social-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 19px 19px 17px;
  min-height: 78px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(241, 196, 116, .14), rgba(15, 22, 34, .02));
  border-bottom: 1px solid rgba(241, 191, 112, .43);
}
.morana-social-header::after {
  content: '';
  position: absolute;
  left: 20%; right: 20%; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f4d18b, transparent);
  box-shadow: 0 0 10px rgba(255, 205, 112, .4);
  pointer-events: none;
}
.morana-social-sigil {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  height: 38px;
  font-size: 25px;
  color: #fff2c8;
  border: 1px solid rgba(236, 195, 120, .68);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 126, 56, .55), rgba(57, 43, 39, .2));
  box-shadow: 0 0 19px rgba(247, 197, 109, .16), inset 0 0 12px rgba(255, 233, 177, .14);
  text-shadow: 0 0 12px rgba(255, 216, 139, .73);
}
.morana-social-heading { flex: 1; min-width: 0; text-align: center; }
.morana-social-eyebrow {
  display: block;
  color: #d6ad6b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .20em;
  line-height: 1.7;
  text-transform: uppercase;
}
.morana-social-header h2 {
  margin: 0;
  color: var(--ms-gold-light);
  font-size: clamp(17px, 4vw, 21px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 2px #06080d, 0 0 15px rgba(255, 187, 99, .22);
}
.morana-social-header button {
  position: relative;
  z-index: 3;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(218, 181, 118, .38);
  border-radius: 7px;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  color: #f5dcb4;
  background: rgba(9, 14, 24, .56);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.morana-social-header button:hover,
.morana-social-header button:focus-visible {
  border-color: #f0c67d;
  background: rgba(137, 99, 48, .4);
}
.morana-social-header .morana-social-back[hidden] { display: none; }
.morana-social-header .morana-social-back:not([hidden]) + .morana-social-sigil { display: none; }

.morana-social-body {
  position: relative;
  padding: 18px 23px 21px;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  scrollbar-color: #896a43 #1b2030;
  scrollbar-width: thin;
}
.morana-social-status {
  flex: none;
  min-height: 0;
  margin: 0;
  padding: 0 23px;
  font-size: 12px;
  color: var(--ms-gold-light);
  text-align: center;
}
.morana-social-status:not(:empty) { padding-top: 1px; padding-bottom: 17px; }
.morana-social-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.morana-social-count,
.morana-social-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ms-muted);
}
.morana-social-empty { text-align: center; padding: 16px 5px; }
.morana-social-list {
  display: grid;
  gap: 9px;
  max-height: min(46dvh, 365px);
  overflow-y: auto;
  padding: 3px 2px 6px;
}
.morana-social-player {
  position: relative;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 11px 12px;
  text-align: left;
  color: var(--ms-text);
  background: linear-gradient(105deg, rgba(51, 61, 77, .95), rgba(29, 35, 48, .96));
  border: 1px solid rgba(212, 170, 99, .37);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 235, 191, .05);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.morana-social-player::before {
  content: none;
  color: #dbb477;
  font-size: 22px;
  flex: 0 0 auto;
}
.morana-social-player:hover,
.morana-social-player:focus-visible {
  border-color: #edca8d;
  background: linear-gradient(105deg, rgba(84, 74, 62, .98), rgba(40, 45, 57, .98));
  transform: translateX(2px);
}
.morana-social-player-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.morana-social-self { color: var(--ms-muted); font-size: 11px; font-weight: 400; }
.morana-social-player-side {
  display: flex;
  flex: 0 0 auto;
  max-width: 48%;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.morana-social-tag {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 99px;
  color: #c4f9dc;
  border: 1px solid rgba(112, 185, 150, .28);
  background: rgba(51, 102, 82, .35);
  font-size: 10px;
  font-weight: 700;
}
.morana-social-tag.is-bot {
  color: #ffe1a6;
  border-color: rgba(227, 178, 98, .35);
  background: rgba(112, 78, 40, .5);
}
.morana-social-map-label {
  max-width: 100%;
  font-size: 11px;
  color: var(--ms-muted);
  overflow-wrap: anywhere;
}
.morana-social-meta {
  display: grid;
  grid-template-columns: minmax(85px, .8fr) minmax(0, 1.4fr);
  gap: 8px 15px;
  margin: 0 0 15px;
  padding: 13px 15px;
  background: rgba(5, 10, 19, .37);
  border: 1px solid rgba(217, 174, 104, .25);
  border-radius: 8px;
  font-size: 13px;
}
.morana-social-meta dt { color: var(--ms-muted); }
.morana-social-meta dd {
  margin: 0;
  color: #ffe5b2;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.morana-social-model {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 300px;
  height: 320px;
  margin: 0 auto 17px;
  background: #080d17;
  border: 1px solid rgba(238, 189, 112, .6);
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(216, 168, 100, .11), 0 10px 25px rgba(0,0,0,.36);
}
.morana-social-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.morana-social-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(239, 194, 116, .65);
  border-radius: 7px;
  color: #fbe8c4;
  background: linear-gradient(180deg, #654d36, #3f312b);
  box-shadow: inset 0 1px rgba(255, 231, 169, .12), 0 3px 8px rgba(0,0,0,.2);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.morana-social-action:hover,
.morana-social-action:focus-visible { filter: brightness(1.19); transform: translateY(-1px); }
.morana-social-action:disabled { opacity: .43; cursor: not-allowed; transform: none; }
.morana-social-primary {
  border-color: #fce3a6;
  color: #251a14;
  background: linear-gradient(180deg, #fae1a1, #deb264 54%, #a8743a);
  text-shadow: 0 1px 0 rgba(255, 238, 202, .3);
}
.morana-social-refresh {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
  background: rgba(27, 32, 44, .7);
}
.morana-social-invite-text {
  margin: 0 0 13px;
  text-align: center;
  color: #f3dfb8;
  font-size: 14px;
}
.morana-social-share-url {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  font-size: 12px;
  text-align: center;
  color: #ffe7bd;
  border: 1px solid rgba(217, 174, 104, .5);
  border-radius: 6px;
  background: rgba(6, 9, 17, .7);
}
.morana-social-share-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.morana-social-share-options .morana-social-primary { grid-column: 1 / -1; }
.morana-social-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ms-muted);
  text-align: center;
}
.morana-social-overlay button:focus-visible,
.morana-social-overlay a:focus-visible,
.morana-social-overlay input:focus-visible {
  outline: 2px solid #ffe6ae;
  outline-offset: 3px;
}
@media (max-width: 430px) {
  .morana-social-overlay { padding: 11px; }
  .morana-social-dialog { max-height: 94dvh; }
  .morana-social-header { padding: 14px 15px 13px; min-height: 68px; }
  .morana-social-body { padding: 14px 14px 18px; }
  .morana-social-player { padding: 9px; }
  .morana-social-model { height: min(39dvh, 310px); }
  .morana-social-meta { padding: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .morana-social-dialog { animation: none; }
  .morana-social-overlay .morana-social-player,
  .morana-social-overlay .morana-social-action { transition: none; }
}
/* =====================================================================
   Morana · fenêtres et social, dans l'esprit « quête accomplie ».
   La croix est dessinée en CSS : pas de X de police ni de dépendance icône.
   ===================================================================== */
.close.morana-close-control,
#morana-quest-close.morana-icon-close,
.morana-farm-panel .farm-close.morana-icon-close,
.morana-social-header .morana-social-close.morana-icon-close {
  position: absolute;
  display: block;
  box-sizing: border-box;
  width: 31px;
  height: 31px;
  min-width: 31px;
  min-height: 31px;
  padding: 0;
  border: 2px solid rgba(238,187,121,.66);
  border-radius: 8px;
  background: linear-gradient(150deg,rgba(99,56,45,.97),rgba(40,28,29,.96));
  box-shadow: inset 0 1px rgba(255,221,169,.22),0 3px 10px rgba(0,0,0,.44);
  color: #ffe3bd;
  text-shadow: none;
  font-size: 0;
  line-height: 1;
  cursor: url('https://www.morana-online.com/game/images/cursor-pointer.png') -8 0,pointer;
  transition: background .17s ease,border-color .17s ease,transform .17s ease,box-shadow .17s ease;
}
.close.morana-close-control::before,
.close.morana-close-control::after,
#morana-quest-close.morana-icon-close::before,
#morana-quest-close.morana-icon-close::after,
.morana-farm-panel .farm-close.morana-icon-close::before,
.morana-farm-panel .farm-close.morana-icon-close::after,
.morana-social-header .morana-social-close.morana-icon-close::before,
.morana-social-header .morana-social-close.morana-icon-close::after {
  content: '';
  position: absolute;
  top: 50%;left: 50%;
  width: 14px;height: 2px;
  margin-left: -7px;margin-top: -1px;
  border-radius: 3px;
  background: #ffe6c6;
  box-shadow: 0 0 7px rgba(255,211,150,.28);
  pointer-events:none;
}
.close.morana-close-control::before,
#morana-quest-close.morana-icon-close::before,
.morana-farm-panel .farm-close.morana-icon-close::before,
.morana-social-header .morana-social-close.morana-icon-close::before {transform:rotate(45deg);}
.close.morana-close-control::after,
#morana-quest-close.morana-icon-close::after,
.morana-farm-panel .farm-close.morana-icon-close::after,
.morana-social-header .morana-social-close.morana-icon-close::after {transform:rotate(-45deg);}
.close.morana-close-control:hover,
.close.morana-close-control:focus-visible,
#morana-quest-close.morana-icon-close:hover,
#morana-quest-close.morana-icon-close:focus-visible,
.morana-farm-panel .farm-close.morana-icon-close:hover,
.morana-farm-panel .farm-close.morana-icon-close:focus-visible,
.morana-social-header .morana-social-close.morana-icon-close:hover,
.morana-social-header .morana-social-close.morana-icon-close:focus-visible {
  border-color:#ffe0a0;
  background:linear-gradient(150deg,#905746,#422d2e);
  box-shadow: 0 0 14px rgba(237,164,94,.23),inset 0 1px rgba(255,229,180,.2);
  transform:scale(1.06);
}
.close.morana-close-control:focus-visible,
#morana-quest-close.morana-icon-close:focus-visible,
.morana-farm-panel .farm-close.morana-icon-close:focus-visible,
.morana-social-header .morana-social-close.morana-icon-close:focus-visible {outline:2px solid #fff2ce;outline-offset:3px;}
#morana-quest-close.morana-icon-close,
.morana-farm-panel .farm-close.morana-icon-close,
.morana-social-header .morana-social-close.morana-icon-close {position:relative;top:auto;right:auto;flex:0 0 31px;}
#game-menu .close.morana-close-control,
#game-settings .close.morana-close-control {top:10px;right:10px;}
#player-actions .close.morana-close-control {top:10px;right:10px;}

/* Actions du personnage : carte de récompense plus compacte et lisible. */
#player-actions {
  display:none;
  isolation:isolate;
  position:fixed;
  left:50%;top:50%;right:auto;
  transform:translate(-50%,-50%);
  width:min(340px,calc(100vw - 24px));
  max-height:calc(100dvh - 22px);
  overflow:auto;
  z-index:2800;
  padding:12px 17px 16px;
  border:5px ridge rgba(192,164,123,.91);
  border-radius:6px;
  background:linear-gradient(145deg,rgba(12,25,20,.79),rgba(38,26,16,.7)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #211b15;
  box-shadow:0 14px 35px rgba(0,0,0,.83),0 0 33px rgba(98,203,157,.16),
    inset 0 0 0 1px rgba(255,230,178,.23),inset 0 0 27px rgba(0,0,0,.4);
  color:#f9ecd5;
  font:12px/1.4 Arial,sans-serif;
}
#player-actions::before,#player-actions::after {
  content:'';position:absolute;left:17px;right:17px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,#e6d3a5,transparent);
}
#player-actions::before {top:6px;}
#player-actions::after {bottom:6px;opacity:.7;}
#player-actions .morana-player-actions-ornament {
  margin:0 auto 10px;color:#dfc489;text-align:center;
  font:12px/1 Georgia,serif;letter-spacing:12px;text-shadow:0 0 9px #a7d9a0;
}
#player-actions .morana-player-actions-hero {display:flex;align-items:center;gap:18px;margin:6px 0 17px;}
#player-actions .morana-player-actions-seal {
  display:grid;place-items:center;flex:none;width:57px;height:57px;
  box-sizing:border-box;border:2px solid #81c49d;outline:1px solid rgba(255,240,196,.25);outline-offset:5px;
  border-radius:3px;background:radial-gradient(circle,rgba(129,215,165,.26),rgba(0,0,0,.56) 75%);
  box-shadow:0 0 17px rgba(110,220,163,.2),inset 0 0 15px rgba(110,220,163,.14);
  color:#e6f6cd;font:28px/1 Georgia,serif;transform:rotate(45deg);
}
#player-actions .morana-player-actions-seal::first-letter {line-height:1;}
#player-actions .morana-player-actions-heading {min-width:0;flex:1;}
#player-actions .morana-player-actions-kicker {
  display:block;margin-bottom:5px;color:#b1d9b9;font:700 10px/1.3 Georgia,serif;
  letter-spacing:2px;text-transform:uppercase;
}
#player-actions #player-actions-name {
  margin:0 0 6px;color:#fff1d7;text-align:left;
  font:21px/1.25 'Sedgwick Ave','Young Serif',Georgia,serif;
  text-shadow:0 2px 3px #000,0 0 10px rgba(241,212,158,.18);
  overflow-wrap:anywhere;
}
#player-actions .morana-player-actions-level {
  display:inline-flex;min-height:22px;align-items:center;padding:2px 9px;
  border:1px solid rgba(179,225,173,.42);border-radius:6px;
  background:rgba(7,22,18,.69);font-weight:800;font-size:11px;
}
#player-actions .morana-player-actions-level[hidden] {display:none!important;}
#player-actions .morana-player-actions-buttons {display:grid;grid-template-columns:1fr 1fr;gap:9px;}
#player-actions .morana-player-actions-button {
  display:flex;min-height:39px;align-items:center;justify-content:center;
  box-sizing:border-box;text-align:center;padding:9px 7px;
  color:#f8e7cb;text-decoration:none;
  font:700 12px/1.3 'Young Serif',Georgia,serif;
  border:3px ridge rgba(216,181,125,.75);border-radius:6px;
  background:linear-gradient(180deg,rgba(107,75,45,.9),rgba(55,39,29,.94));
  box-shadow:inset 0 1px rgba(255,230,166,.16),0 3px 9px #0006;
  transition:border-color .17s,filter .17s,transform .17s;
}
#player-actions .morana-player-actions-button.is-primary {
  grid-column:1/-1;color:#f1ffe5;
  border-color:rgba(150,212,152,.77);
  background:linear-gradient(180deg,#507e57,#294737);
}
#player-actions .morana-player-actions-button:hover,
#player-actions .morana-player-actions-button:focus-visible {border-color:#ffe2aa;filter:brightness(1.15);transform:translateY(-1px);}
#player-actions .morana-player-actions-footer {text-align:center;color:#b9cd9f;margin-top:10px;line-height:1;}

/* Le répertoire reprend les motifs bronze, vert et les bordures de la
   notification de quête accomplie (au lieu de la vieille fenêtre bleue). */
.morana-social-overlay {
  background:radial-gradient(ellipse at center,rgba(8,17,14,.75),rgba(3,7,9,.93));
  --ms-gold:#e6c78e;--ms-gold-light:#f7e7c7;--ms-text:#f5e7d3;--ms-muted:#c8b9a4;
}
.morana-social-dialog {
  width:min(100%,480px);max-height:min(92dvh,780px);
  border:5px ridge rgba(196,172,129,.91);border-radius:6px;
  background:linear-gradient(145deg,rgba(9,27,21,.79),rgba(32,24,15,.72)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #18231c;
  box-shadow:0 16px 48px #000d,0 0 35px rgba(109,207,155,.16),
    inset 0 0 0 1px rgba(255,230,184,.18),inset 0 0 30px rgba(0,0,0,.38);
}
.morana-social-dialog::before,
.morana-social-dialog::after {content:'';left:15px;right:15px;width:auto;height:1px;font-size:0;
  background:linear-gradient(90deg,transparent,#dbe4a4,transparent);}
.morana-social-dialog::before {top:6px;}
.morana-social-dialog::after {top:auto;bottom:6px;}
.morana-social-header {
  min-height:72px;padding:13px 17px;
  background:linear-gradient(180deg,rgba(135,190,140,.15),rgba(7,19,15,.11));
  border-bottom:1px solid rgba(187,197,139,.45);
}
.morana-social-header h2 {
  font:21px/1.25 'Sedgwick Ave','Young Serif',Georgia,serif;
  color:#f9edcc;text-transform:uppercase;
  text-shadow:0 2px 2px #000,0 0 12px rgba(167,227,164,.2);
}
.morana-social-body {padding:15px 18px 20px;}
.morana-social-toolbar {gap:10px;margin:0 0 12px;}
.morana-social-overview {display:flex;gap:12px;align-items:center;min-width:0;}
.morana-social-overview-emblem,
.morana-social-player-seal,
.morana-social-detail-sigil {
  display:grid;place-items:center;flex:none;
  color:#dcf0c1;background:radial-gradient(circle,rgba(118,192,133,.2),rgba(4,19,15,.72));
  border:1px solid rgba(161,219,159,.65);
  box-shadow:inset 0 0 10px rgba(154,231,172,.12),0 0 10px rgba(135,214,159,.1);
}
.morana-social-overview-emblem {width:38px;height:38px;border-radius:4px;font:23px/1 Georgia,serif;}
.morana-social-overview-copy {display:flex;flex-direction:column;gap:3px;}
.morana-social-overview-copy strong {font:700 13px/1.3 'Young Serif',Georgia,serif;color:#f9efce;}
.morana-social-overview-copy span {font-size:11px;color:#c9c3ab;}
.morana-social-list {max-height:min(48dvh,370px);gap:8px;}
.morana-social-player {
  min-height:66px;padding:10px 11px;gap:10px;
  border:3px ridge rgba(190,164,117,.65);border-radius:5px;
  background:linear-gradient(120deg,rgba(32,45,34,.93),rgba(23,24,19,.94));
  box-shadow:inset 0 0 0 1px rgba(251,220,169,.06),0 3px 10px #0004;
}
.morana-social-player::before {content:none;}
.morana-social-player:hover,.morana-social-player:focus-visible {
  border-color:#dbe8aa;background:linear-gradient(110deg,rgba(55,78,50,.96),rgba(29,33,26,.96));
  transform:translateX(2px);
}
.morana-social-player-seal {width:31px;height:31px;border-radius:4px;font:19px/1 Georgia,serif;}
.morana-social-player-copy {display:flex;flex:1;flex-direction:column;min-width:0;gap:4px;}
.morana-social-player-name {font:700 14px/1.25 'Young Serif',Georgia,serif;color:#faefd7;}
.morana-social-player-subtitle {font-size:11px;color:#c5b9a1;}
.morana-social-player-side {flex-direction:column;align-items:flex-end;gap:5px;max-width:36%;}
.morana-social-player-level,
.morana-social-detail-level {
  display:inline-flex;align-items:center;justify-content:center;min-height:19px;
  padding:2px 8px;border:1px solid rgba(205,200,160,.47);border-radius:5px;
  background:rgba(8,17,13,.65);color:#fff0bf;
  font-size:11px;font-weight:800;white-space:nowrap;
}
.morana-social-tag {border-radius:4px;background:rgba(35,87,58,.51);border-color:rgba(130,213,158,.36);}
.morana-social-tag.is-bot {background:rgba(108,78,41,.55);}
.morana-social-player-arrow {font:25px/1 Georgia,serif;color:#e0c591;}
.morana-social-detail-hero {
  display:flex;gap:16px;align-items:center;padding:8px 4px 16px;margin-bottom:13px;
  border-bottom:1px solid rgba(193,190,133,.4);
}
.morana-social-detail-sigil {width:52px;height:52px;border:2px solid rgba(159,220,162,.75);
  border-radius:4px;font:28px/1 Georgia,serif;transform:rotate(45deg);}
.morana-social-detail-heading {display:flex;flex:1;flex-direction:column;gap:5px;min-width:0;}
.morana-social-detail-heading strong {
  font:22px/1.2 'Sedgwick Ave','Young Serif',Georgia,serif;color:#fff0d3;
  text-shadow:0 2px 3px #000;overflow-wrap:anywhere;
}
.morana-social-detail-heading span {font-size:11px;color:#bdd2b6;}
.morana-social-detail-level {max-width:110px;text-align:center;white-space:normal;}
.morana-social-stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0 0 12px;}
.morana-social-stat {display:flex;flex-direction:column;gap:5px;min-height:49px;
  padding:9px 12px;box-sizing:border-box;
  border:1px solid rgba(196,168,117,.32);border-radius:5px;background:rgba(9,19,15,.6);}
.morana-social-stat span {font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#b8bda5;}
.morana-social-stat strong {font-size:15px;color:#f9e8c4;overflow-wrap:anywhere;}
.morana-social-xp {margin:0 0 15px;padding:10px 13px;border:1px solid rgba(196,168,117,.28);
  border-radius:5px;background:rgba(11,24,18,.46);}
.morana-social-xp[hidden] {display:none!important;}
.morana-social-xp-top {display:flex;justify-content:space-between;gap:8px;margin-bottom:8px;
  color:#d5d5b6;font-size:11px;}
.morana-social-xp-top strong {color:#fff0ca;font-size:11px;}
.morana-social-xp-track {height:7px;overflow:hidden;border-radius:9px;background:#16180e;border:1px solid rgba(224,193,134,.25);}
.morana-social-xp-fill {display:block;height:100%;width:0;
  border-radius:9px;background:linear-gradient(90deg,#619b69,#e3dc9b);box-shadow:0 0 9px #a2e4a5;}
.morana-social-model {max-width:280px;height:245px;margin:0 auto 14px;border:3px ridge rgba(177,202,142,.6);
  border-radius:5px;background:#101a16;box-shadow:0 5px 18px #0008;}
.morana-social-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.morana-social-actions .morana-social-action:only-child {grid-column:1/-1;}
.morana-social-action {border:3px ridge rgba(214,181,127,.76);border-radius:5px;
  background:linear-gradient(180deg,#70513a,#372d24);font:700 12px/1.3 'Young Serif',Georgia,serif;}
.morana-social-primary {border-color:rgba(151,212,155,.86);color:#f3ffe5;
  background:linear-gradient(180deg,#578364,#2f5243);text-shadow:0 1px 0 #0005;}
.morana-social-refresh {border-width:1px;background:rgba(10,23,17,.56);white-space:nowrap;}
.morana-social-overlay .morana-social-action:focus-visible,
.morana-social-overlay .morana-social-player:focus-visible {outline:2px solid #e9efaf;outline-offset:2px;}
@media (max-width:410px) {
  #player-actions {padding:12px 13px 13px;}
  .morana-social-body {padding:12px 11px 17px;}
  .morana-social-player {padding:9px 7px;gap:7px;}
  .morana-social-player-seal {width:27px;height:27px;}
  .morana-social-player-side {max-width:39%;}
  .morana-social-player-name {font-size:12px;}
  .morana-social-player-level {font-size:10px;padding:2px 5px;}
  .morana-social-model {height:min(31dvh,225px);}
}
@media (max-height:570px) {
  .morana-social-header {min-height:52px;padding:9px 13px;}
  .morana-social-model {height:125px;}
  .morana-social-detail-hero {padding:4px 0 8px;margin-bottom:8px;}
  .morana-social-stats {gap:6px;margin-bottom:8px;}
}
@media (prefers-reduced-motion:reduce) {
  .close.morana-close-control,
  #morana-quest-close.morana-icon-close,
  .morana-farm-panel .farm-close.morana-icon-close,
  .morana-social-header .morana-social-close.morana-icon-close {transition:none;}
}
/* Conserver la fermeture à droite même lorsque le titre est court. */
.morana-social-header h2 {flex:1;min-width:0;}


/* ================================================================
   Social v3 — harmonie avec le journal de quêtes (sans ornement ✦,
   sans halo vert, vrais boutons natifs btn-brown).
   Règles en fin de fichier pour neutraliser les anciens styles sociaux.
   ================================================================ */
#player-actions {
  width:min(325px,calc(100vw - 20px)); padding:13px 14px 14px;
  border:7px ridge rgba(188,159,124,.85);border-radius:5px;
  background:linear-gradient(rgba(20,14,12,.38),rgba(20,14,12,.56)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #241810;
  box-shadow:0 10px 26px rgba(0,0,0,.9),inset 0 0 0 1px rgba(248,200,151,.17);
}
#player-actions::before,#player-actions::after {content:none;}
#player-actions .morana-player-actions-hero {margin:5px 34px 10px 1px;gap:0;}
#player-actions .morana-player-actions-kicker {color:#c8b09a;letter-spacing:.07em;margin-bottom:4px;font:700 10px Arial,sans-serif;}
#player-actions #player-actions-name {font-size:19px;margin-bottom:5px;}
#player-actions .morana-player-actions-level {border:1px solid rgba(185,151,113,.45);background:rgba(17,12,10,.6);}
#player-actions .morana-player-actions-buttons {grid-template-columns:1fr 1fr;gap:7px;}
#player-actions .morana-player-actions-buttons > :first-child {grid-column:1/-1;}
#player-actions a.btn.btn-brown.morana-player-actions-button,
.morana-social-overlay .btn.btn-brown.morana-social-action {
  display:inline-flex;align-items:center;justify-content:center;
  width:100%;box-sizing:border-box;min-height:37px;padding:6px 7px;
  font:700 12px/1.3 'Young Serif',Georgia,serif;
  color:#edd8cc;text-decoration:none;text-align:center;
  border:4px ridge rgba(246,197,149,.7);border-radius:6px;
  background:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #5e4331;
  box-shadow:1px 1px 10px rgba(237,216,204,.22);
  text-shadow:-2px -2px 3px #000;
  transform:none;transition:filter .15s,border-color .15s;
}
#player-actions a.btn.btn-brown.morana-player-actions-button:hover,
.morana-social-overlay .btn.btn-brown.morana-social-action:hover {filter:brightness(1.14);border-color:#fbb334;transform:none;}
.morana-social-overlay {--ms-text:#f2e4d1;--ms-muted:#c9b59d;--ms-gold:#e8c38a;--ms-gold-light:#f3dfc0;
  background:rgba(8,6,5,.83);}
.morana-social-dialog {
  width:min(100%,500px);max-height:94dvh;
  border:7px ridge rgba(188,159,124,.85);border-radius:5px;
  background:linear-gradient(rgba(20,14,12,.38),rgba(20,14,12,.56)),
    url('https://www.morana-online.com/game/images/bg-shop-mobile.png') center/100% 100% no-repeat #241810;
  box-shadow:0 10px 26px rgba(0,0,0,.9),inset 0 0 0 1px rgba(248,200,151,.17);
}
.morana-social-dialog::before,.morana-social-dialog::after {content:none;display:none;}
.morana-social-header {min-height:50px;padding:8px 12px;
  background:rgba(23,16,13,.62);border-bottom:1px solid rgba(208,175,135,.48);}
.morana-social-header::after {content:none;display:none;}
.morana-social-header h2 {font:18px/1.15 'Sedgwick Ave','Young Serif',Georgia,serif;
  color:#f4dfbc;text-shadow:1px 2px 3px #000;}
.morana-social-body {padding:12px 12px 14px;scrollbar-color:#92785c #17100d;}
.morana-social-overview {gap:6px;}
.morana-social-overview-copy strong {color:#f4dfbc;}
.morana-social-overview-copy span,.morana-social-player-subtitle {color:#ceb9a2;}
.morana-social-list {max-height:min(56dvh,440px);gap:6px;}
.morana-social-player {
  min-height:55px;padding:7px 10px;gap:8px;border:1px solid rgba(180,151,116,.56);border-radius:2px;
  background:rgba(18,15,14,.6);box-shadow:none;color:#f4e8d7;transform:none;
}
.morana-social-player::before {content:none;display:none;}
.morana-social-player:hover,.morana-social-player:focus-visible {
  border-color:#e0c29b;background:rgba(84,63,43,.45);transform:none;
}
.morana-social-player-name {color:#f4e8d7;font-size:13px;}
.morana-social-player-subtitle {font-size:11px;}
.morana-social-tag,.morana-social-tag.is-bot {
  color:#e3c5a2;background:rgba(66,46,32,.65);border-color:rgba(192,157,111,.35);border-radius:2px;
}
.morana-social-player-side {gap:3px;}
.morana-social-player-level,.morana-social-detail-level {
  background:rgba(17,12,10,.65);border:1px solid rgba(188,156,118,.45);border-radius:2px;
}
.morana-social-player-arrow {color:#e4bf88;}
.morana-social-detail-layout {display:grid;grid-template-columns:minmax(142px,.8fr) minmax(0,1.2fr);gap:13px;align-items:stretch;}
.morana-social-body.morana-social-body-detail {padding:10px 12px 12px;}
.morana-social-model {
  display:block;width:100%;max-width:none;min-width:0;
  height:clamp(240px,55dvh,410px);margin:0;
  border:1px solid rgba(190,153,104,.55);border-radius:2px;
  background:rgba(18,15,14,.35);box-shadow:none;
}
.morana-social-detail-info {min-width:0;display:flex;flex-direction:column;gap:9px;justify-content:center;}
.morana-social-detail-summary {display:flex;align-items:center;flex-wrap:wrap;gap:5px;}
.morana-social-detail-presence {font-size:11px;color:#d6c0a7;}
.morana-social-detail-rank {
  display:block;padding:7px 9px;border:1px solid rgba(180,151,116,.44);
  background:rgba(18,15,14,.6);color:#f0d4aa;font:700 13px/1.3 'Young Serif',Georgia,serif;
}
.morana-social-xp {margin:0;padding:6px 8px;border-color:rgba(188,156,118,.35);
  border-radius:2px;background:rgba(18,15,14,.5);}
.morana-social-xp-top {margin-bottom:5px;color:#d2bea4;}
.morana-social-xp-track {height:5px;border-radius:0;border-color:#80634b;background:#140e09;}
.morana-social-xp-fill {border-radius:0;background:#d1a66c;box-shadow:none;}
.morana-social-actions.morana-social-detail-actions {display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.morana-social-detail-actions > :first-child {grid-column:1/-1;}
.morana-social-overlay .btn.btn-brown.morana-social-action {
  min-height:34px;font-size:11px;padding:5px 5px;white-space:normal;
}
.morana-social-overlay .btn.btn-brown.morana-social-action:disabled {opacity:.48;filter:grayscale(.5);}
.morana-social-overlay .morana-social-refresh {width:auto!important;white-space:nowrap;}
.morana-social-overlay .morana-social-action:focus-visible,
.morana-social-overlay .morana-social-player:focus-visible {outline:2px solid #e4bc8b;}
@media(max-width:520px){
  .morana-social-overlay {padding:6px;}
  .morana-social-dialog {width:min(100%,480px);max-height:96dvh;}
  .morana-social-header {min-height:45px;padding:7px 9px;}
  .morana-social-body {padding:9px;}
  .morana-social-detail-layout {grid-template-columns:minmax(105px,.82fr) minmax(0,1.18fr);gap:8px;}
  .morana-social-model {height:clamp(210px,47dvh,320px);}
  .morana-social-detail-info {gap:6px;}
  .morana-social-overlay .morana-social-detail-actions .btn.btn-brown.morana-social-action {min-height:33px;font-size:10px;padding:5px 2px;}
}
/* Sur mobile en paysage : image 3D entière à gauche et actions à droite,
   sans empiler les blocs dans une fenêtre trop haute. */
@media (orientation:landscape) and (max-height:520px){
  .morana-social-dialog {width:min(760px,calc(100vw - 14px));max-height:96dvh;}
  .morana-social-header {min-height:41px;padding:5px 10px;}
  .morana-social-header h2 {font-size:16px;}
  .morana-social-body.morana-social-body-detail {padding:7px 10px 9px;}
  .morana-social-detail-layout {grid-template-columns:minmax(130px,.46fr) minmax(0,1.54fr);gap:12px;}
  .morana-social-model {height:clamp(170px,65dvh,280px);}
  .morana-social-detail-info {gap:5px;}
  .morana-social-actions.morana-social-detail-actions {grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;}
  .morana-social-detail-actions > :first-child {grid-column:auto;}
  .morana-social-overlay .morana-social-detail-actions .btn.btn-brown.morana-social-action {font-size:10px;min-height:35px;padding:4px 2px;}
  .morana-social-xp {padding:5px 7px;}
}

/* Fiches sociales v4 : fenêtres flottantes, sans voile ni capture de la scène. */
.morana-social-overlay {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}
.morana-social-dialog {pointer-events:auto; width:min(650px,calc(100vw - 14px));}
.morana-social-body.morana-social-body-detail {overflow:auto;overscroll-behavior:contain;}
.morana-social-detail-info {justify-content:flex-start;}
.morana-social-attributes {min-width:0;padding:7px 8px;border:1px solid rgba(180,151,116,.45);background:rgba(18,15,14,.51);}
.morana-social-attributes-heading {margin:0 0 7px;color:#e8c9a2;font:700 12px/1.2 'Young Serif',Georgia,serif;}
.morana-social-attributes-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;}
.morana-social-attribute {min-width:0;display:flex;justify-content:space-between;align-items:baseline;gap:5px;padding:3px 0;border-bottom:1px solid rgba(186,150,109,.18);font-size:11px;}
.morana-social-attribute span {color:#cdbba3;white-space:normal;overflow-wrap:anywhere;}
.morana-social-attribute strong {color:#f2dfc5;font-weight:700;font-variant-numeric:tabular-nums;}
.morana-social-attributes-empty {grid-column:1/-1;margin:0;color:#bba58a;font-size:11px;}
@media(max-width:520px){
  .morana-social-dialog {width:min(100%,510px);}
  .morana-social-detail-layout {grid-template-columns:minmax(115px,.76fr) minmax(0,1.24fr);}
  .morana-social-attributes-grid {gap:3px 6px;}
  .morana-social-attribute {font-size:10px;}
}
@media(orientation:landscape) and (max-height:520px){
  .morana-social-dialog {width:min(850px,calc(100vw - 12px));max-height:96dvh;}
  .morana-social-detail-layout {grid-template-columns:minmax(140px,.55fr) minmax(0,1.45fr);}
  .morana-social-model {height:clamp(168px,66dvh,300px);align-self:start;}
  .morana-social-attributes-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:1px 7px;}
  .morana-social-attribute {font-size:10px;padding:2px 0;}
  .morana-social-attributes {padding:5px 7px;}
  .morana-social-attributes-heading {margin-bottom:3px;}
}


/* v5 — overlay invisible mais cliquable : clic extérieur = fermeture.
   Le gestionnaire de Game.js intercepte pointerdown sur la surface. */
.morana-social-overlay {
  background:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  pointer-events:auto !important;
}
.morana-social-dialog {pointer-events:auto;}

/* Fiche joueur : caractéristiques identiques à l'inventaire, présentation
   dense de type journal de quêtes, sans l'or et les cristaux. */
.morana-social-detail-info {gap:7px;}
.morana-social-rank-points {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.morana-social-detail-rank,
.morana-social-detail-points {
  min-width:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  padding:6px 7px;margin:0;border:1px solid rgba(180,151,116,.48);
  background:rgba(22,16,13,.66);color:#f1d4a8;
  font:700 12px/1.25 'Young Serif',Georgia,serif;text-align:center;
}
.morana-social-detail-points {color:#ffdf9c;border-color:rgba(218,174,111,.54);}
.morana-social-attributes {padding:8px;border-color:rgba(189,156,113,.53);}
.morana-social-attributes-heading {margin:0 0 7px;font:700 12px/1.2 'Young Serif',Georgia,serif;color:#ecd2ad;}
.morana-social-attributes-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.morana-social-attribute {
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;
  min-width:0;min-height:44px;box-sizing:border-box;padding:6px 8px;
  border:1px solid rgba(174,140,102,.32);
  background:linear-gradient(120deg,rgba(62,44,33,.54),rgba(27,21,17,.58));
  font-size:11px;
}
.morana-social-attribute span {font-size:10px;color:#cfb598;line-height:1.2;}
.morana-social-attribute strong {font-size:15px;line-height:1.1;color:#fff0d2;}
.morana-social-xp {padding:6px 8px;}
@media (orientation:landscape) and (max-height:520px) {
  .morana-social-dialog {max-height:96dvh;}
  .morana-social-detail-layout {grid-template-columns:minmax(145px,.55fr) minmax(0,1.45fr);}
  .morana-social-model {height:clamp(155px,66dvh,330px);}
  .morana-social-detail-info {gap:5px;}
  .morana-social-attributes {padding:5px 6px;}
  .morana-social-attributes-heading {margin-bottom:4px;}
  .morana-social-attributes-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;}
  .morana-social-attribute {min-height:35px;padding:4px 6px;gap:2px;font-size:10px;}
  .morana-social-attribute span {font-size:9px;}
  .morana-social-attribute strong {font-size:13px;}
  .morana-social-detail-rank,.morana-social-detail-points {font-size:11px;padding:4px 6px;}
}
@media (max-width:380px) {
  .morana-social-detail-layout {grid-template-columns:minmax(100px,.74fr) minmax(0,1.26fr);gap:7px;}
  .morana-social-attribute {min-height:39px;padding:4px 6px;}
  .morana-social-attribute strong {font-size:13px;}
  .morana-social-detail-rank,.morana-social-detail-points {font-size:10px;padding:4px 2px;}
}

/* Coffre : quatre onglets explicites, et une seule action vers le PNJ. */
#chest .chest_tab {gap:2px;min-height:52px;padding:5px 2px;}
#chest .chest_tab_text {font-size:12px;}
#chest .chest_tab_count {font-size:9px;letter-spacing:-.02em;white-space:normal;overflow-wrap:normal;}
#chest .tharos_chest_shop_btn {
  flex:0 0 auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:5px 12px;margin:0;
  border:3px ridge rgba(246,197,149,.75);border-radius:5px;
  background:url('https://www.morana-online.com/game/images/bg-btn-brown.jpg') center/cover #5e4331;
  color:#f5e2cc;font:700 11px/1.2 'Young Serif',Georgia,serif;
  white-space:normal;text-align:center;cursor:pointer;
}
#chest .tharos_chest_shop_btn:hover,
#chest .tharos_chest_shop_btn:focus-visible {filter:brightness(1.15);border-color:#eec48c;}
#chest .chest_locked_notice .tharos_chest_shop_btn {width:100%;margin-top:7px;}
@media (max-width:420px) {
  #chest .chest_tabs {gap:3px;}
  #chest .chest_tab {min-height:48px;padding:5px 1px;}
  #chest .chest_tab_text {font-size:10px;}
  #chest .chest_tab_count {font-size:8px;}
  #chest .tharos_chest_shop_btn {font-size:10px;padding:5px 7px;min-height:33px;}
}
@media (orientation:landscape) and (max-height:520px) {
  /* Le modèle reste entièrement visible ; seules les infos défilent à droite. */
  .morana-social-body.morana-social-body-detail {overflow:hidden;}
  .morana-social-detail-layout {align-items:start;}
  .morana-social-detail-info {
    max-height:calc(96dvh - 65px);
    overflow-y:auto;overscroll-behavior:contain;
    padding-right:3px;scrollbar-width:thin;scrollbar-color:#8d7258 transparent;
  }
}
@media (max-width:420px) {
  /* Le raccourci vers Tharos tient sur la même rangée que le visuel du coffre. */
  #chest .tharos_chest_overview {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;row-gap:4px;}
  #chest .tharos_chest_hero {min-width:0;flex:initial;grid-column:1;grid-row:1;}
  #chest .tharos_chest_heading {font-size:12px;}
  #chest .tharos_chest_shop_btn {grid-column:2;grid-row:1;max-width:126px;min-height:33px;font-size:9px;padding:4px 5px;}
  #chest .tharos_chest_status,
  #chest .tharos_chest_overview > .tharos_chest_portal {grid-column:1/-1;grid-row:2;}
  #chest .chest_locked_notice .tharos_chest_shop_btn {max-width:none;font-size:11px;}
}

/* v6 — Coffres premium : centrer l'encart dans la zone des 108 emplacements.
   Le centrage se réfère à .chest_items_wrapper, qui contient #chest-slot-panel.
   Les règles sont après les media queries historiques pour tous les formats. */
#chest .chest_items_wrapper > .chest_locked_notice {
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:min(94%,335px);
  max-height:calc(100% - 12px);
  overflow-y:auto;
}

/* v11 — retour a la superposition fonctionnelle de la v4.
   L'overlay ne recouvre jamais les clics : seul le panneau est interactif.
   Le document ferme le dialogue au clic hors du panneau. */
.morana-social-overlay { background: transparent !important; pointer-events: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.morana-social-dialog { pointer-events: auto !important; }

/* Correctifs inventaire tactile et DnD vers le sol (2026-10-30).
   Le tooltip était monté dans body avec z-index:2001 et pointer-events:auto :
   il pouvait passer DEVANT les cases de droite. */
#inventory .inventory_items { position:relative; isolation:isolate; }
#inventory .inventory_items .inventory_item { touch-action:pan-y; }
#inventory .inventory_items .inventory_item .smallitem,
#inventory .inventory_stuff .inventory_item .smallitem,
#inventory .inventory_mount .inventory_item .smallitem,
#inventory .inventory_fish .inventory_item .smallitem,
#chest .chest_item .smallitem,
#trade .trade_item .smallitem,
.pnj_craft .craft_item .smallitemcraft {
  touch-action:none; -webkit-user-select:none; user-select:none;
  -webkit-touch-callout:none;
}
/* Le fantôme du drag et l'item détaché ne capturent jamais les pointeurs. */
.morana-touch-drag-ghost {
  position:fixed; width:56px; height:56px; pointer-events:none!important;
  z-index:5005; opacity:.88; transform:scale(1.08);
  filter:drop-shadow(0 5px 9px rgba(0,0,0,.7));
}
.morana-touch-drag-ghost * { pointer-events:none!important; }
.smallitemfloat { pointer-events:none!important; }
/* Ne jamais laisser une fiche visible intercepter les colonnes d'items. */
.itemboxfloat:not(.morana-chat-tooltip) { pointer-events:none; }
@media (pointer:coarse) {
  .itemboxfloat:not(.morana-inventory-touch-tooltip) .scrollbox {pointer-events:none;}
}
@media (pointer:coarse) {
  #inventory { right:max(0px,env(safe-area-inset-right)); }
  #inventory .inventory_items { max-width:100%; }
}
/* V3 : la même superposition s'applique à toutes les fiches d'objets,
   y compris celles des PNJ, des coffres, des échanges et des lootboxes. */
.itemboxfloat.morana-inventory-touch-tooltip {
  position:fixed!important;z-index:3004!important;
  pointer-events:none!important;
  max-width:none!important;min-width:0!important;
  min-height:0!important;box-sizing:border-box!important;
  margin:0!important;overflow:hidden;
}
/* La description peut défiler sans élargir la fiche ni masquer les cases. */
.itemboxfloat.morana-inventory-touch-tooltip .scrollbox {
  height:min(105px,calc(100% - 78px));min-height:0;
  pointer-events:auto;overscroll-behavior:contain;
}
@media (max-width:470px) and (pointer:coarse) {
  #inventory {width: min(465px,100vw);padding-left:8px;padding-right:8px;}
  #inventory .inventory_items {width:100%;}
  #inventory .inventory_items .inventory_item {box-sizing:border-box; width:calc(100% / 7);height:auto;aspect-ratio:1;}
  #inventory .inventory_items .inventory_item .smallitem {max-width:100%;max-height:100%;box-sizing:border-box;}
  #inventory .inventory_items .inventory_item img {max-width:100%;max-height:100%;}
  #inventory .inventory_stuff,#inventory .inventory_mount,#inventory .inventory_fish {
    box-sizing:border-box; width:calc(100% - 128px); margin-left:5px;
  }
  #inventory .inventory_stuff .inventory_item,#inventory .inventory_mount .inventory_item,
  #inventory .inventory_fish .inventory_item {box-sizing:border-box;width:20%;height:55px;}
  #inventory .inventory_btn {margin-right:6px;}
  #inventory .mount_btn {margin-right:82px;}
  #inventory .stuff_btn {margin-right:158px;}
}

/* Dépôt au sol tactile : destination explicite, visible UNIQUEMENT pendant
   un glissement depuis l'inventaire ou le coffre. La fiche reste en dessous. */
.morana-ground-drop-zone {
  display:none;position:fixed;z-index:5004;box-sizing:border-box;
  border:4px dashed rgba(243,198,123,.95);border-radius:6px;
  background:linear-gradient(160deg,rgba(55,37,24,.97),rgba(17,16,14,.98));
  box-shadow:0 5px 18px rgba(0,0,0,.58),inset 0 0 14px rgba(255,180,66,.14);
  color:#ffebbc;pointer-events:auto;touch-action:none;
  flex-direction:column;align-items:center;justify-content:center;
  gap:4px;text-align:center;font:700 12px/1.2 Arial,sans-serif;
  -webkit-user-select:none;user-select:none;
}
.morana-ground-drop-zone.morana-ground-drop-visible {display:flex;}
.morana-ground-drop-zone .morana-ground-drop-icon {font-size:28px;line-height:1;}
.morana-ground-drop-zone small {font-size:10px;font-weight:400;color:#f0d5a6;}
.morana-ground-drop-zone.morana-ground-drop-over {
  background:linear-gradient(160deg,rgba(111,76,38,.97),rgba(48,36,21,.99));
  border-color:#fff5d2;box-shadow:0 0 20px rgba(255,204,110,.6);
}
