/* ───────── Interfaz del modo Mundo ───────── */
body.world-mode #top-bar,
body.world-mode #bottom-hud { display: none !important; }

#w-hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; font-family: 'Segoe UI', system-ui, sans-serif; color: #e8ecf4; }
body.w-modal-open #w-hud { z-index: 900; }
#w-hud * { user-select: none; }
.w-pane { background: linear-gradient(180deg, rgba(18,22,34,.88), rgba(10,13,22,.88)); border: 1px solid rgba(160,174,200,.28); border-radius: 10px; box-shadow: 0 6px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05); }

/* Tarjeta del personaje */
#w-card { position: absolute; left: 14px; top: 14px; width: 250px; padding: 10px 12px; }
#w-card .nm { font-weight: 800; font-size: 15px; letter-spacing: .4px; }
#w-card .sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }
#w-card .reg { margin-top: 7px; font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
#w-card .gold { margin-top: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 11px; }
#w-card .gold div { background: rgba(255,255,255,.05); border-radius: 6px; padding: 4px 7px; }
#w-card .gold b { display: block; font-size: 14px; color: #fbbf24; }
#w-card .gold .risk b { color: #fb923c; }
#w-card .gold small { color: #94a3b8; font-size: 10px; }

/* Minimapa */
#w-mini { position: absolute; right: 14px; top: 14px; width: 204px; padding: 8px; }
#w-mini canvas { display: block; width: 188px; height: 188px; border-radius: 50%; border: 2px solid rgba(251,191,36,.55); box-shadow: 0 0 14px rgba(0,0,0,.7), inset 0 0 20px rgba(0,0,0,.6); background: #0b0d14; margin: 0 auto; }
#w-mini .row { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; margin-top: 5px; }
#w-mini .row b { color: #e8ecf4; }
#w-mini .hint { text-align: center; font-size: 10px; color: #64748b; margin-top: 2px; }

/* Botín en riesgo */
#w-risk { position: absolute; right: 14px; top: 262px; width: 204px; padding: 8px 10px; font-size: 11px; }
#w-risk h4 { font-size: 11px; letter-spacing: .6px; color: #fb923c; margin-bottom: 4px; text-transform: uppercase; }
#w-risk .ln { display: flex; justify-content: space-between; padding: 1px 0; }
#w-risk .ln span:first-child { color: #94a3b8; }
#w-risk .safe-note { color: #4ade80; font-weight: 700; text-align: center; }

/* Alerta de jugadores */
#w-threat { position: absolute; right: 14px; top: 372px; width: 204px; padding: 6px 10px; font-size: 11px; font-weight: 700; color: #fca5a5; border-color: rgba(239,68,68,.6); display: none; animation: wpulse 1.2s infinite; }
@keyframes wpulse { 50% { box-shadow: 0 0 18px rgba(239,68,68,.55); } }

/* Feed */
#w-feed { position: absolute; left: 14px; top: 215px; width: 300px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
#w-feed .ln { background: rgba(10,13,22,.65); padding: 3px 8px; border-radius: 5px; border-left: 3px solid #64748b; animation: wfade 12s forwards; }
#w-feed .pk { border-color: #ef4444; color: #fecaca; } #w-feed .death { border-color: #64748b; color: #cbd5e1; }
#w-feed .join { border-color: #22c55e; color: #bbf7d0; } #w-feed .ritual { border-color: #a855f7; color: #e9d5ff; }
#w-feed .boss { border-color: #f97316; color: #fed7aa; }
@keyframes wfade { 0%,80% { opacity: 1; } 100% { opacity: 0; } }

/* Barras y habilidades */
#w-bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 560px; padding: 10px 14px 12px; pointer-events: auto; }
.w-bar { position: relative; height: 18px; border-radius: 6px; background: rgba(0,0,0,.55); overflow: hidden; border: 1px solid rgba(255,255,255,.12); margin-bottom: 5px; }
.w-bar i { position: absolute; inset: 0; width: 100%; transform-origin: left; transition: transform .08s linear; }
.w-bar.hp i { background: linear-gradient(180deg,#f87171,#b91c1c); } .w-bar.mp i { background: linear-gradient(180deg,#60a5fa,#1d4ed8); }
.w-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; font-weight: 700; line-height: 17px; text-shadow: 0 1px 2px #000; }
#w-slots { display: flex; gap: 7px; justify-content: center; margin-top: 7px; }
.w-slot { position: relative; width: 56px; height: 56px; border-radius: 9px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); text-align: center; overflow: hidden; pointer-events: auto; cursor: pointer; }
.w-slot .ic { font-size: 22px; line-height: 34px; } .w-slot .nm { font-size: 9px; color: #cbd5e1; line-height: 11px; height: 11px; overflow: hidden; white-space: nowrap; }
.w-slot .ky { position: absolute; left: 3px; top: 2px; font-size: 10px; font-weight: 800; color: #fbbf24; text-shadow: 0 1px 2px #000; }
.w-slot .cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0,0,0,.72); }
.w-slot .cdt { position: absolute; inset: 0; font-size: 14px; font-weight: 800; line-height: 56px; text-shadow: 0 1px 3px #000; }
.w-slot.nomana { filter: brightness(.55) saturate(.6); }
.w-slot .ct { position: absolute; right: 3px; bottom: 12px; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }
.w-slot.charge.on { border-color: #60a5fa; box-shadow: 0 0 12px #3b82f6; }

/* Prompt y ritual */
#w-prompt { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 7px 16px; font-size: 14px; font-weight: 700; display: none; }
#w-prompt kbd { background: #fbbf24; color: #111; border-radius: 4px; padding: 1px 7px; margin-right: 6px; font-weight: 900; }
#w-ritual { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); width: 420px; padding: 8px 14px; display: none; text-align: center; border-color: rgba(168,85,247,.7); }
#w-ritual .t { font-size: 13px; font-weight: 800; color: #e9d5ff; margin-bottom: 5px; letter-spacing: .5px; }
#w-ritual .pb { height: 12px; border-radius: 6px; background: rgba(0,0,0,.6); overflow: hidden; } #w-ritual .pb i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#7c3aed,#e879f9); }
#w-ritual .s { font-size: 11px; color: #c4b5fd; margin-top: 4px; }
#w-banner { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); font-size: 26px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 2px 10px #000; opacity: 0; transition: opacity .6s; text-align: center; }
#w-banner small { display: block; font-size: 13px; letter-spacing: 1px; color: #cbd5e1; }
#w-toast { position: absolute; left: 50%; bottom: 210px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; align-items: center; }
#w-toast .t { background: rgba(10,13,22,.88); border: 1px solid rgba(255,255,255,.2); padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; animation: wfade 3.2s forwards; }
#w-toast .warn { border-color: #f59e0b; color: #fde68a; } #w-toast .good { border-color: #22c55e; color: #bbf7d0; } #w-toast .gold { border-color: #fbbf24; color: #fde68a; } #w-toast .ritual { border-color: #a855f7; color: #e9d5ff; }
#w-hurt { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(220,38,38,.55) 100%); opacity: 0; transition: opacity .35s; }
#w-lowhp { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(127,29,29,.6) 100%); opacity: 0; transition: opacity .4s; }

/* Paneles */
.w-panel { background: rgba(12,15,26,.97); position: absolute; left: 50%; top: 7vh; transform: translateX(-50%); width: 640px; max-width: 94vw; max-height: 86vh; overflow: auto; padding: 14px 16px; pointer-events: auto; }
.w-panel h3 { font-size: 16px; letter-spacing: .6px; margin-bottom: 2px; color: #fbbf24; } .w-panel h5 { font-size: 11px; letter-spacing: .6px; color: #94a3b8; text-transform: uppercase; margin: 10px 0 5px; }
.w-panel .x { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: #94a3b8; font-size: 18px; cursor: pointer; }
.w-panel p.d { font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.w-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.itm { position: relative; height: 78px; border-radius: 8px; background: linear-gradient(180deg, rgba(28,32,48,.78), rgba(14,17,28,.9)); border: 2px solid #4b5563; cursor: pointer; text-align: center; padding: 3px; overflow: hidden; transition: filter .12s ease, box-shadow .16s ease, background .16s ease; }
.itm:hover { background: linear-gradient(180deg, rgba(44,50,74,.9), rgba(20,24,40,.95)); filter: brightness(1.08); }
.itm .icw { width: auto; height: 42px; display: flex; justify-content: center; align-items: center; margin-top: 1px; } .itm .icw svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); } .eqr { display: inline-flex; align-items: center; gap: 6px; }
.w-desc .dart { float: left; margin: 0 10px 4px 0; padding: 3px; border-radius: 8px; border: 1.5px solid rgba(148,163,184,.35); background: rgba(10,12,22,.78); }
.itm .n { font-size: 9px; line-height: 10px; color: #e2e8f0; max-height: 20px; overflow: hidden; }
.itm .lk { position: absolute; right: 2px; top: 1px; font-size: 10px; }
.itm .set-dot { position: absolute; right: 3px; top: 1px; font-size: 10px; color: #38bdf8; text-shadow: 0 0 6px rgba(56,189,248,.8); }
.itm .upg { position: absolute; left: 2px; top: 2px; font-size: 9px; font-weight: 900; line-height: 1; padding: 1px 4px; border-radius: 4px; background: rgba(10,12,20,.88); border: 1px solid rgba(251,191,36,.65); color: #fde68a; text-shadow: 0 1px 2px #000; }
.itm .v { position: absolute; left: 3px; bottom: 1px; font-size: 9px; color: #fbbf24; font-weight: 800; text-shadow: 0 1px 2px #000; }
.w-item-score { font-size: 9px; font-weight: 800; color: #7dd3fc; text-shadow: 0 1px 2px #000; }
.itm .w-item-score { position: absolute; right: 3px; bottom: 1px; background: rgba(8,12,24,.78); padding: 0 3px; border-radius: 4px; }
.itm.empty { border-style: dashed; border-color: rgba(255,255,255,.12); cursor: default; background: transparent; transform: none; filter: none; }
.r-common { border-color: #9ca3af; }
.r-rare { border-color: #4aa8ff; box-shadow: 0 0 10px rgba(74,168,255,.38), inset 0 0 8px rgba(74,168,255,.12); }
.r-epic { border-color: #c06bff; box-shadow: 0 0 12px rgba(192,107,255,.48), inset 0 0 10px rgba(192,107,255,.16); }
.r-cursed { border-color: #ff4a4a; box-shadow: 0 0 12px rgba(255,74,74,.55), inset 0 0 10px rgba(255,74,74,.20); animation: rcursed 2.2s ease-in-out infinite alternate; }
.r-legendary { border-color: #fbbf24; background: linear-gradient(180deg, rgba(72,48,12,.72), rgba(24,16,8,.92)); box-shadow: 0 0 16px rgba(251,191,36,.68), inset 0 0 12px rgba(251,191,36,.24); animation: rlegend 2.4s ease-in-out infinite alternate; }
@keyframes rcursed { from { box-shadow: 0 0 9px rgba(255,74,74,.45), inset 0 0 8px rgba(255,74,74,.16); } to { box-shadow: 0 0 16px rgba(255,74,74,.82), inset 0 0 12px rgba(255,74,74,.28); } }
@keyframes rlegend { from { box-shadow: 0 0 12px rgba(251,191,36,.52), inset 0 0 10px rgba(251,191,36,.18); } to { box-shadow: 0 0 22px rgba(251,191,36,.92), inset 0 0 16px rgba(251,191,36,.34); } }
.w-eq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.w-eq .slotname { font-size: 10px; color: #94a3b8; text-align: center; margin-bottom: 2px; }
.w-btn { pointer-events: auto; cursor: pointer; background: linear-gradient(180deg,#334155,#1e293b); border: 1px solid rgba(255,255,255,.25); color: #f1f5f9; border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: 700; margin: 2px 3px 2px 0; }
.w-btn:hover { background: linear-gradient(180deg,#475569,#334155); } .w-btn.gold { border-color: #fbbf24; color: #fde68a; } .w-btn.red { border-color: #ef4444; color: #fecaca; } .w-btn.big { padding: 10px 26px; font-size: 15px; }
.w-bonus { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; font-size: 12px; margin-top: 4px; } .w-bonus div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); } .w-bonus b { color: #86efac; }
.w-note { font-size: 11px; color: #fb923c; margin-top: 8px; line-height: 1.4; }
.w-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.w-in { background: #0f172a; border: 1px solid #475569; color: #fff; border-radius: 6px; padding: 5px 8px; width: 90px; user-select: text; }

/* Mapa grande */
#w-bigmap { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 10px; display: none; pointer-events: auto; z-index: 50; }
#w-bigmap canvas { display: block; width: min(78vh, 640px); height: min(78vh, 640px); border-radius: 6px; }
#w-bigmap .cap { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 5px; }

/* Pantallas completas */
.w-screen { position: absolute; inset: 0; background: rgba(5,7,12,.82); display: none; align-items: center; justify-content: center; pointer-events: auto; }
.w-screen .box { width: 460px; max-width: 92vw; text-align: center; padding: 26px 28px; }
.w-screen h2 { font-size: 28px; letter-spacing: 3px; margin-bottom: 8px; } .w-screen.death h2 { color: #ef4444; } .w-screen.exit h2 { color: #4ade80; } .w-screen.disc h2 { color: #f59e0b; }
.w-screen p { font-size: 13px; color: #cbd5e1; margin: 5px 0; line-height: 1.45; } .w-screen .loss { color: #fca5a5; font-weight: 700; } .w-screen .gain { color: #bbf7d0; font-weight: 700; }

/* Tarjeta del menú principal para el modo Mundo */
.mode-choice-card.world-theme { border-color: rgba(168,85,247,.6); background: linear-gradient(180deg, rgba(88,28,135,.25), rgba(15,23,42,.9)); }
.mode-choice-card.world-theme .btn-world { background: linear-gradient(180deg,#9333ea,#6b21a8); }
#world-login-err { color: #fca5a5; font-size: 12px; min-height: 16px; margin-top: 4px; }

/* Selector de modos con 3 tarjetas */
.mode-select-card { max-width: 1320px !important; width: 96vw !important; max-height: 94vh; overflow-y: auto; }
.mode-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 1000px) { .mode-cards-grid { grid-template-columns: 1fr !important; } }
#world-server, #world-name, #world-pass { text-transform: none !important; }

/* --- isla radial: ritual global, requisitos y descripciones --- */
#w-card .rq { margin-top: 6px; font-size: 11px; color: #cbd5e1; line-height: 1.5; background: rgba(251,146,60,.08); border-radius: 6px; padding: 4px 7px; }
#w-card .rq span { color: #94a3b8; font-size: 10px; }
#w-ritual { border-color: rgba(251,146,60,.8); width: 470px; }
#w-ritual .t { color: #fed7aa; }
#w-ritual .rl { font-size: 12px; color: #fdba74; padding: 2px 0; }
#w-ritual .rl.open { color: #67e8f9; font-weight: 600; animation: wpulse 1s infinite alternate; }
@keyframes wpulse { from { opacity: .65; } to { opacity: 1; } }
.w-desc { background: linear-gradient(180deg, rgba(16,20,34,.88), rgba(8,10,18,.92)); border: 1px solid rgba(148,163,184,.32); border-radius: 9px; padding: 9px 11px; margin: 6px 0; font-size: 12px; color: #cbd5e1; line-height: 1.45; min-height: 128px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden; }
.w-desc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.w-desc .dt { font-size: 14px; letter-spacing: .2px; } .w-desc small { color: #94a3b8; } .w-desc p { margin: 3px 0; }
.w-desc ul { margin: 4px 0 4px 16px; padding: 0; color: #86efac; } .w-desc li { padding: 1px 0; } .w-desc .nt { color: #fb923c; font-size: 11px; clear: left; }
.w-desc .w-item-score.desc { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.35); color: #7dd3fc; }
.w-desc-set { margin: 3px 0; font-size: 11.5px; color: #38bdf8; } .w-desc-set span { color: #94a3b8; }
.w-desc-cmp { margin: 3px 0 1px; font-size: 10.5px; color: #94a3b8; } .w-desc-cmp b { color: #e2e8f0; }
.w-desc .w-desc-lost { color: #94a3b8; }
.w-item-cmp-up { color: #4ade80; font-weight: 800; font-size: 11px; margin-left: 6px; text-shadow: 0 0 6px rgba(74,222,128,.35); }
.w-item-cmp-dn { color: #f87171; font-weight: 800; font-size: 11px; margin-left: 6px; text-shadow: 0 0 6px rgba(248,113,113,.35); }
.w-desc .r-rare { color: #4aa8ff; } .w-desc .r-epic { color: #c06bff; } .w-desc .r-cursed { color: #ff4a4a; } .w-desc .r-common { color: #e5e7eb; } .w-desc .r-legendary { color: #fbbf24; text-shadow: 0 0 10px rgba(251,191,36,.5); }

/* ── Misión, eventos, santuarios ── */
#w-quest { position: absolute; left: 14px; bottom: 14px; width: 240px; padding: 8px 11px; font-size: 12px; border-color: rgba(250,204,21,.55); display: none; }
#w-quest .t { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #fcd34d; }
#w-quest .x { margin: 3px 0 5px; font-weight: 700; }
#w-quest .pb { height: 8px; border-radius: 4px; background: rgba(0,0,0,.6); overflow: hidden; } #w-quest .pb i { display: block; height: 100%; background: linear-gradient(90deg,#f59e0b,#fde047); transition: width .3s; }
#w-quest .r { font-size: 10.5px; color: #cbd5e1; margin-top: 4px; } #w-quest .r b { color: #fbbf24; }
#w-events { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); min-width: 300px; padding: 7px 12px; font-size: 12px; display: none; border-color: rgba(248,113,113,.7); text-align: center; }
#w-events .t { font-size: 11px; font-weight: 800; letter-spacing: .7px; color: #fca5a5; margin-bottom: 3px; }
#w-events .ev { padding: 2px 0; } #w-events .ev small { color: #cbd5e1; } #w-events .ev.hunter b { color: #d8b4fe; } #w-events .ev.horde b { color: #fecaca; }

/* Jugadores en línea: invitar a pelea / cazar */
#w-btn-players { position: absolute; right: 232px; top: 14px; padding: 7px 12px; font-size: 12px; font-weight: 800; color: #fde68a; cursor: pointer; pointer-events: auto; border-color: rgba(251,191,36,.6); }
#w-btn-players:hover { background: rgba(60,45,10,.92); }
#w-social { pointer-events: auto; }
.pl-panel { width: 560px; z-index: 30; }
.pl-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pl-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; }
.pl-n { flex: 1; min-width: 0; } .pl-n b { display: block; font-size: 14px; color: #f1f5f9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-n small { color: #94a3b8; font-size: 11px; }
.pl-b { padding: 7px 10px; border-radius: 7px; border: 1px solid #4a5070; background: #222640; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap; }
.pl-b.inv { border-color: #fb7185; } .pl-b.hunt { border-color: #c084fc; }
.pl-b:hover:not(:disabled) { filter: brightness(1.3); } .pl-b:disabled { opacity: .45; cursor: default; }
#w-invites { position: absolute; left: 50%; bottom: 250px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: auto; z-index: 40; }
.inv-card { padding: 10px 14px; text-align: center; border-color: #fb7185; font-size: 13px; max-width: 92vw; }
.inv-card small { display: block; color: #cbd5e1; margin: 3px 0 7px; font-size: 11px; }
.inv-card .bt { display: flex; gap: 8px; justify-content: center; } .inv-card button { padding: 7px 16px; border-radius: 7px; border: 1px solid #4a5070; background: #222640; color: #fff; font-weight: 800; cursor: pointer; }
.inv-card .ok { border-color: #22c55e; background: #14532d; } .inv-card .no { border-color: #ef4444; }
#w-track { position: absolute; right: 14px; top: 420px; width: 204px; padding: 6px 10px; font-size: 11px; display: none; border-color: rgba(192,132,252,.6); }
#w-track .t { font-size: 11px; letter-spacing: .6px; color: #d8b4fe; font-weight: 800; margin-bottom: 3px; }
#w-track .tr { display: flex; justify-content: space-between; gap: 6px; padding: 1px 0; } #w-track .tr span { color: #94a3b8; } #w-track .tr.duel b { color: #fda4af; } #w-track .tr.hunt b { color: #d8b4fe; } #w-track .tr.warn { color: #fca5a5; font-weight: 700; }
@media (max-width: 900px), (max-height: 520px) { #w-btn-players { right: auto; left: 272px; top: 8px; padding: 6px 9px; font-size: 11px; } .pl-panel { width: 94vw; } .pl-row { flex-wrap: wrap; } #w-track { top: 210px; right: 8px; width: 170px; } #w-invites { bottom: 130px; } }

/* Alerta de cacería (para la víctima) */
#w-alert { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 60; min-width: 320px; max-width: 92vw; text-align: center; padding: 12px 22px 10px; border-radius: 10px; pointer-events: none;
  background: linear-gradient(180deg, rgba(60,6,12,.96), rgba(20,4,10,.96)); border: 2px solid #ff4a4a; box-shadow: 0 0 34px rgba(255,40,40,.65), inset 0 0 24px rgba(255,40,40,.25); animation: alin .35s ease-out, alpulse 1s ease-in-out .35s infinite; transition: opacity .6s; }
#w-alert.out { opacity: 0; }
#w-alert .al-t { font-size: 22px; font-weight: 900; letter-spacing: 2px; color: #ff6b6b; text-shadow: 0 0 12px rgba(255,60,60,.9); }
#w-alert .al-s { font-size: 14px; color: #ffe4e4; margin-top: 4px; } #w-alert .al-s b { color: #fff; }
#w-alert .al-h { font-size: 11px; color: #fca5a5; margin-top: 4px; letter-spacing: .5px; }
@keyframes alin { from { transform: translateX(-50%) scale(1.5); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes alpulse { 50% { box-shadow: 0 0 52px rgba(255,40,40,.95), inset 0 0 30px rgba(255,40,40,.4); } }

#w-track .tr.party b { color: #86efac; }
.pl-party { margin: 6px 0; padding: 6px 8px; border: 1px solid #22c55e66; border-radius: 8px; background: rgba(34,197,94,.08); font-size: 12px; } .pl-party .pm { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); } .pl-b.pty { background: #166534; } .pl-b.leave, .pl-b.kick { background: #7f1d1d; }

/* ───────── Mundo: diseño móvil compacto (deja libres joysticks y botones) ───────── */
body.touch-mode { --sl: env(safe-area-inset-left); --sr: env(safe-area-inset-right); --st: env(safe-area-inset-top); --sb: env(safe-area-inset-bottom); }
body.touch-mode #w-card { left: calc(8px + var(--sl)); top: calc(6px + var(--st)); width: 150px; padding: 5px 8px; border-radius: 8px; }
body.touch-mode #w-card .nm { font-size: 12px; } body.touch-mode #w-card .sub { font-size: 9px; }
body.touch-mode #w-card .reg { margin-top: 3px; font-size: 10px; }
body.touch-mode #w-card .gold { margin-top: 3px; gap: 3px; font-size: 8px; }
body.touch-mode #w-card .gold div { padding: 2px 4px; } body.touch-mode #w-card .gold b { font-size: 11px; } body.touch-mode #w-card .gold small { font-size: 8px; }
body.touch-mode #w-mini { right: calc(8px + var(--sr)); top: calc(6px + var(--st)); width: 86px; padding: 3px; border-radius: 50%; background: rgba(10,13,22,.45); border: 0; box-shadow: none; }
body.touch-mode #w-mini canvas { width: 80px; height: 80px; border-width: 1px; }
body.touch-mode #w-mini .row, body.touch-mode #w-mini .hint { display: none; }
body.touch-mode #w-risk { right: calc(100px + var(--sr)); top: calc(6px + var(--st)); width: 120px; padding: 4px 7px; font-size: 9px; }
body.touch-mode #w-risk h4 { font-size: 9px; margin-bottom: 2px; }
body.touch-mode #w-threat { right: calc(100px + var(--sr)); top: calc(62px + var(--st)); width: 120px; padding: 3px 7px; font-size: 9px; }
body.touch-mode #w-track { right: calc(100px + var(--sr)); top: calc(92px + var(--st)); width: 120px; padding: 3px 7px; font-size: 9px; }
body.touch-mode #w-track .t { font-size: 9px; }
body.touch-mode #w-btn-players { left: calc(170px + var(--sl)); right: auto; top: calc(6px + var(--st)); min-width: 44px; min-height: 36px; padding: 8px 10px; font-size: 12px; }
body.touch-mode #w-feed { left: calc(8px + var(--sl)); top: calc(84px + var(--st)); width: 190px; font-size: 9.5px; gap: 2px; }
body.touch-mode #w-feed .ln { padding: 2px 6px; }
body.touch-mode #w-feed .ln:nth-child(n+4) { display: none; }
body.touch-mode #w-quest { left: auto; right: calc(100px + var(--sr)); top: calc(130px + var(--st)); bottom: auto; width: 120px; padding: 4px 7px; font-size: 9px; }
body.touch-mode #w-quest .t { font-size: 8px; } body.touch-mode #w-quest .r { display: none; }
body.touch-mode #w-events { top: calc(6px + var(--st)); min-width: 0; width: 200px; padding: 3px 8px; font-size: 9px; }
body.touch-mode #w-ritual { top: calc(50px + var(--st)); width: min(300px, 50vw); padding: 4px 10px; }
body.touch-mode #w-ritual .t { font-size: 11px; margin-bottom: 3px; } body.touch-mode #w-ritual .rl, body.touch-mode #w-ritual .s { font-size: 10px; }
body.touch-mode #w-banner { top: 70px; font-size: 18px; max-width: 60vw; text-align: center; } body.touch-mode #w-banner small { font-size: 10px; }
/* barras de vida/maná: delgadas, entre los dos joysticks; las habilidades están en los botones táctiles */
body.touch-mode #w-bottom { width: min(34vw, 250px); bottom: calc(8px + var(--sb)); padding: 4px 6px; background: rgba(10,13,22,.55); border-radius: 8px; }
body.touch-mode .w-bar { height: 13px; margin-bottom: 3px; } body.touch-mode .w-bar span { font-size: 9px; line-height: 12px; }
body.touch-mode #w-slots { display: none; }
body.touch-mode #w-prompt { bottom: calc(52px + var(--sb)); font-size: 12px; padding: 5px 12px; }
body.touch-mode #w-toast { bottom: calc(76px + var(--sb)); } body.touch-mode #w-toast .t { font-size: 11px; padding: 3px 10px; }
/* paneles y mapa grande: ocupan la pantalla y tienen cierre cómodo */
body.touch-mode .w-panel { width: 96vw; max-width: 96vw; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 10px 12px; -webkit-overflow-scrolling: touch; }
body.touch-mode .w-panel .x { right: 4px; top: 2px; width: 44px; height: 44px; font-size: 24px; }
body.touch-mode .w-panel button, body.touch-mode .pl-b { min-height: 36px; }
body.touch-mode #w-bigmap canvas { width: min(calc(100vh - 70px), 90vw); height: min(calc(100vh - 70px), 90vw); }
body.touch-mode .w-screen .box { padding: 14px 16px; max-height: 94vh; overflow: auto; } body.touch-mode .w-screen h2 { font-size: 20px; }
body.touch-mode #w-invites { top: calc(48px + var(--st)); bottom: auto; }
body.touch-mode #w-card .gold, body.touch-mode #w-card .sub { display: none; }
body.touch-mode #w-card .reg { flex-wrap: wrap; }
body.touch-mode.world-mode .tc-pause { top: calc(54px + var(--st, env(safe-area-inset-top))); }
body.touch-mode #w-feed { top: calc(104px + var(--st)); left: calc(60px + var(--sl)); width: 180px; }
body.touch-mode #w-risk > :not(.ln):not(h4):not(.safe-note) { display: none; }
body.touch-mode #w-risk .ln:nth-of-type(n+3) { display: none; }
body.touch-mode #w-card .rq { font-size: 9px; margin-top: 3px; padding: 2px 4px; line-height: 1.25; }
body.touch-mode #w-card .rq span { display: none; }

/* Estilo tipo Albion móvil: barras HP/MP arriba-izquierda limpias, botones a su derecha sin tapar nada */
body.touch-mode #w-bottom { left: calc(8px + var(--sl)); top: calc(8px + var(--st)); bottom: auto; transform: none; width: 168px; padding: 4px 6px; border-radius: 8px; }
body.touch-mode .w-bar { height: 14px; margin-bottom: 3px; } body.touch-mode .w-bar:last-of-type { margin-bottom: 0; }
body.touch-mode #w-card { display: none; }
body.touch-mode #w-btn-players { left: calc(326px + var(--sl)); top: calc(8px + var(--st)); right: auto; font-size: 0; padding: 0; width: 42px; min-width: 42px; height: 42px; border-radius: 50%; }
body.touch-mode #w-btn-players::before { content: '👥'; font-size: 16px; }
body.touch-mode.world-mode .tc-pause { left: calc(182px + var(--sl)); top: calc(8px + var(--st)); width: 42px; height: 42px; }
body.touch-mode.world-mode .tc-bag { left: calc(230px + var(--sl)); top: calc(8px + var(--st)); width: 42px; height: 42px; }
body.touch-mode.world-mode .tc-map { left: calc(278px + var(--sl)); top: calc(8px + var(--st)); width: 42px; height: 42px; }
body.touch-mode #w-feed { top: calc(56px + var(--st)); left: calc(8px + var(--sl)); width: 168px; font-size: 9px; }
body.touch-mode #w-feed .ln:nth-child(n+3) { display: none; }
body.touch-mode #w-prompt { bottom: calc(150px + var(--sb)); }
body.touch-mode #w-toast { bottom: calc(190px + var(--sb)); }
body.touch-mode #w-risk h4 { display: none; }
body.touch-mode #w-risk { width: auto; max-width: 150px; padding: 2px 8px; border-radius: 12px; }
body.touch-mode #w-risk .ln:nth-of-type(n+2) { display: none; }
body.touch-mode #w-threat:empty, body.touch-mode #w-track:empty { display: none; }
body.touch-mode #w-quest { top: calc(34px + var(--st)); right: calc(100px + var(--sr)); width: auto; max-width: 150px; padding: 2px 8px; border-radius: 12px; opacity: .9; }
body.touch-mode #w-threat { top: calc(64px + var(--st)); }
body.touch-mode #w-track { top: calc(92px + var(--st)); }
