/* ANTEVER MC-09 (PROPOSED): game-style on-screen aids for the 3D view (hud.js). Same light skin as the MC-02 menus. Loaded after ui.css. */
.fxveil{position:absolute;inset:0;z-index:8;display:flex;align-items:center;justify-content:center;background:#e9e6e0;color:#3a362f;font:600 15px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;pointer-events:none;animation:fxveilout .5s 16s forwards}
.fxveil span{display:inline-flex;align-items:center;gap:12px;background:rgba(250,248,244,.97);border-radius:12px;padding:12px 18px;box-shadow:0 2px 10px rgba(0,0,0,.14)}
.fxveil span::before{content:"";width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(47,79,62,.25);border-top-color:#2f4f3e;animation:fxspin .9s linear infinite}
.fxveil.off{opacity:0;transition:opacity .35s}
@keyframes fxveilout{to{opacity:0;visibility:hidden}}
@keyframes fxspin{to{transform:rotate(360deg)}}

.hudtr{position:absolute;right:12px;top:12px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:8px;pointer-events:none}
.hudrow{display:inline-flex;gap:4px;background:rgba(250,248,244,.97);border-radius:12px;padding:4px;box-shadow:0 2px 10px rgba(0,0,0,.14);pointer-events:auto}
.hudbtn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;background:transparent;border:0;border-radius:9px;color:#1f1d1a;cursor:pointer;padding:0}
.hudbtn:hover{background:rgba(0,0,0,.06)}
.hudbtn[aria-pressed="true"]{background:#e4e1da}
.hudbtn:focus-visible,.hudhelp button:focus-visible{outline:3px solid #2a6df4;outline-offset:2px}
.hudbtn[hidden]{display:none}
/* room for everything (hud.js measures): the approved top bar wraps before it reaches the buttons; on a very narrow screen the row
   tightens and, last, moves below the bar */
.topbar{max-width:calc(100% - var(--hudw,160px) - 24px)}
.hudtr.hudtight{right:6px}
.hudtr.hudtight .hudrow{padding:2px;gap:0}
.hudtr.hudlow{top:var(--toph,64px)}
.hudtr.hudyield{visibility:hidden}
.walkmsg{left:calc((100% - var(--hudm,0px))/2);max-width:calc(100% - var(--hudm,0px) - 24px)}

.hudmap{position:relative;background:rgba(31,29,26,.78);border-radius:12px;padding:8px 8px 6px;box-shadow:0 2px 12px rgba(0,0,0,.22);pointer-events:auto;color:#fff}
.hudmap[hidden]{display:none}
.hudmap svg{display:block;border-radius:6px;cursor:pointer;touch-action:none;overflow:hidden}
.hudmap p{margin:5px 2px 0;font:600 11px/1.25 system-ui,-apple-system,"Segoe UI",sans-serif;color:rgba(255,255,255,.82);max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.hudroom{position:absolute;left:50%;top:calc(var(--toph,64px) + 10px);transform:translate(-50%,-6px);z-index:3;pointer-events:none;text-align:center;opacity:0;transition:opacity .35s,transform .35s;color:#fff;padding:9px 22px 10px;border-radius:14px;background:rgba(31,29,26,.5);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);text-shadow:0 1px 6px rgba(0,0,0,.45);white-space:nowrap}
.hudroom.on{opacity:1;transform:translate(-50%,0)}
.hudroom.hudroomleft{left:12px;transform:translate(0,-6px);white-space:normal;text-align:left}
.hudroom.hudroomleft.on{transform:none}
.hudroom b{display:block;font:400 26px/1.15 Georgia,"Times New Roman",serif;letter-spacing:.01em}
.hudroom i{display:block;font:600 12px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;font-style:normal;letter-spacing:.08em;text-transform:uppercase;opacity:.92}

.hudtips{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3;display:flex;gap:10px;pointer-events:none;opacity:0;transition:opacity .4s}
.hudtips.on{opacity:1}
.hudtips.hudtipsside{left:calc(50% - 95px)}
body.touring .hudroom,body.touring .hudtips{display:none}
.hudtip{display:flex;flex-direction:column;align-items:center;gap:8px;width:172px;padding:14px 10px 12px;background:rgba(31,29,26,.78);color:#fff;border-radius:14px;text-align:center;font:600 13px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;box-shadow:0 4px 18px rgba(0,0,0,.25)}
.hudtip small{display:block;font-weight:400;font-size:12px;color:rgba(255,255,255,.78)}
.hudtip svg{width:34px;height:34px;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hudkeys{display:grid;grid-template-columns:repeat(3,20px);grid-auto-rows:20px;gap:3px;justify-content:center;height:43px}
.hudkeys kbd{display:flex;align-items:center;justify-content:center;font:700 10px/1 system-ui,sans-serif;border:1.5px solid rgba(255,255,255,.85);border-radius:4px;color:#fff}
.hudkeys kbd:first-child{grid-column:2}
.hudkeys kbd:nth-child(2){grid-column:1}
.hudtips.hudtipscol{flex-direction:column;gap:6px}
.hudtips.hudtipscol .hudtip{flex-direction:row;width:auto;min-width:230px;padding:8px 12px;text-align:left}
.hudtips.hudtipscol .hudtip svg{width:26px;height:26px;flex:0 0 auto}
.hudtips.hudtipscol .hudkeys{display:none}

.hudhelp{z-index:10}
.hudhelp table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.35}
.hudhelp td{padding:7px 0;border-top:1px solid rgba(31,29,26,.12);vertical-align:top}
.hudhelp td:first-child{width:42%;font-weight:600;padding-right:10px}
.hudhelp td span{display:block;color:#6b665e;font-size:13px}
.hudhelp kbd{display:inline-block;min-width:22px;padding:1px 5px;border:1px solid rgba(31,29,26,.3);border-bottom-width:2px;border-radius:5px;font:600 12px/1.5 system-ui,sans-serif;text-align:center;background:#fff}
.hudhelp .hudsw{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(31,29,26,.12);font-size:14px;font-weight:600}
.hudhelp .hudsw button{flex:0 0 auto;min-height:40px;padding:6px 12px;border-radius:9px;border:0;background:#e4e1da;color:#1f1d1a;font:inherit;font-size:13px;cursor:pointer}
.hudhelp .hudsw button[aria-pressed="true"]{background:#2f4f3e;color:#fff}
.hint{font-weight:600;text-shadow:0 0 2px #faf8f4,0 0 4px #faf8f4,0 0 7px #faf8f4,0 0 11px rgba(250,248,244,.9);transition:opacity .6s}
.hint.hudquiet{opacity:0}
@media (min-width:601px){.hint{right:var(--hudr,16px)}}
body.mouselook #stage canvas{cursor:none}
body.mouselook .hudtr::after{content:"Esc: libertar o rato / release the mouse";align-self:flex-end;background:rgba(31,29,26,.78);color:#fff;font:600 12px/1.3 system-ui,sans-serif;padding:5px 9px;border-radius:8px}
@media (max-width:620px){.hudroom b{font-size:21px}.hudtips{flex-direction:column;gap:6px}.hudtip{flex-direction:row;width:auto;min-width:230px;padding:8px 12px;text-align:left}.hudtip svg{width:26px;height:26px;flex:0 0 auto}.hudkeys{display:none}}
@media (max-height:479px){.hudtips{top:calc(50% - 8px)}.hudtr{flex-direction:row-reverse;align-items:flex-start}.hudmap p{max-width:110px}.hudtip{flex-direction:row;width:auto;min-width:200px;padding:8px 12px;text-align:left}.hudtip svg{width:26px;height:26px;flex:0 0 auto}.hudroom{top:calc(var(--toph,64px) + 2px);padding:6px 18px 7px}.hudroom b{font-size:19px}.hint{display:none}}
@media (prefers-reduced-motion:reduce){.hudroom,.hudtips,.fxveil.off{transition:none}.fxveil span::before{animation:none}}
