/* EAI City — shell styles (owner: shell): mount points, boot splash, the glass HUD (hud-), HUD panels, settings,
   the concierge, level-up. Built on the tokens and components of css/eai.css.
   The HUD is minimal: profile chip, energy, one menu, a 4-item dock and the concierge bar — the city stays mostly city. */

/* ---------------------------------------------------------------- mount points */
#city { position: fixed; inset: 0; z-index: 0; background: var(--sky); }
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#screen { position: relative; z-index: 40; }
#work { position: relative; z-index: 45; }
#onboarding { position: relative; z-index: 60; }
#city.no3d { background: linear-gradient(180deg, #e9e2d6 0%, #f3eee6 55%, #ddd3c3 100%); }
.hud-no3d { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 30px; border-radius: var(--r-xl); background: var(--glass-strong); text-align: center; box-shadow: var(--sh-2); color: var(--ink2); max-width: calc(100% - 32px); }
.hud-no3d > span:first-child { font-size: 2rem; opacity: 0.7; }
.hud-no3d b { font: 700 1.3rem var(--display); color: var(--ink); }

/* ---------------------------------------------------------------- boot splash */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 26px; padding: 24px; text-align: center;
  background: radial-gradient(110% 80% at 50% 28%, #22313d 0%, #141c24 58%, #0c1117 100%); color: #fff; transition: opacity 0.55s ease, visibility 0.55s; }
.boot.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__logo, .ob-logo, .ob-mini { display: inline-flex; align-items: baseline; gap: 0.02em; white-space: nowrap; line-height: 1; }
.boot__logo { font-size: clamp(2.2rem, 7vw, 4rem); }
.boot__e, .ob-logo__e { font-family: var(--font); font-weight: 800; letter-spacing: 0.02em; }
.boot__c, .ob-logo__c { font-family: var(--display); font-weight: 600; font-style: italic; color: #e3c88e; letter-spacing: 0.005em; }
.boot__bar { width: 168px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.boot__bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, transparent, #e3c88e, transparent); animation: hudBoot 1.4s ease-in-out infinite; }
.boot__text { font: 500 1rem var(--font); letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.72); }
@keyframes hudBoot { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------------------------------------------------------------- HUD layer */
.hud { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.25s ease, visibility 0.25s;
  --pad: 20px; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); }
.hud.is-hidden { opacity: 0; visibility: hidden; }
.hud.is-hidden * { pointer-events: none !important; }
.hud-w, .hud-w * { pointer-events: auto; }
.hud button { -webkit-tap-highlight-color: transparent; font-family: var(--font); cursor: pointer; color: var(--ink); }
.hud :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.hud [hidden] { display: none !important; }
/* shared glass surface */
.hud-player, .hud-chip, .hud-ibtn, .hud-dock, .hud-ask, .hud-bubble {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line); box-shadow: var(--sh-glass); }

/* top bar */
.hud-top { position: absolute; top: calc(var(--pad) + var(--sat)); left: calc(var(--pad) + var(--sal)); right: calc(var(--pad) + var(--sar)); display: flex; align-items: center; gap: 12px; }
.hud-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }

/* profile chip */
.hud-player { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; height: 56px; padding: 6px 18px 6px 6px; border-radius: 16px; text-align: left; transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.hud-player:hover { background: var(--glass-strong); }
.hud-player__ava { width: 44px; height: 44px; background: var(--panel3); }
.hud-player__info { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.hud-player__name { font-weight: 700; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hud-player__title { font-size: 0.86rem; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.hud-xpfloat { position: absolute; left: 44px; top: -12px; z-index: 2; padding: 2px 10px; border-radius: 999px; background: var(--gold-l); color: var(--gold-t); font-size: 0.86rem; font-weight: 800; line-height: 1.5; box-shadow: var(--sh-1); white-space: nowrap; pointer-events: none; animation: hudXpFloat 1.45s var(--ease) forwards; }
@keyframes hudXpFloat { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: translateY(0); } 75% { opacity: 1; transform: translateY(-8px); } 100% { opacity: 0; transform: translateY(-16px); } }

/* energy chip */
.hud-chip { display: inline-flex; align-items: center; gap: 9px; height: 56px; padding: 0 18px 0 10px; border-radius: 16px; font-weight: 600; font-size: 1rem; white-space: nowrap; transition: background-color 0.15s ease; }
.hud-chip:hover { background: var(--glass-strong); }
.hud-energy__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-l); color: var(--gold-d); flex: none; }
.hud-energy__ico .ico { width: 19px; height: 19px; }
.hud-energy__val { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.hud-energy__lbl { font-size: 0.9rem; font-weight: 600; color: var(--ink2); line-height: 1; }
.hud-energy.is-low .hud-energy__val { color: var(--danger); }
.hud-energy.is-low .hud-energy__ico { background: var(--danger-l); color: var(--danger); }

/* icon buttons */
.hud-ibtn { position: relative; width: 56px; height: 56px; padding: 0; border-radius: 16px; display: grid; place-items: center; transition: background-color 0.15s ease; }
.hud-ibtn:hover { background: var(--glass-strong); }
.hud-ibtn .ico { width: 24px; height: 24px; }
.hud-ibtn.sm { width: 48px; height: 48px; border-radius: 14px; }
.hud-ibtn.sm .ico { width: 20px; height: 20px; }
.hud-ibtn .badge { top: 6px; right: 6px; border-color: #fff; }

/* right edge: zoom (desktop) */
.hud-side { position: absolute; right: calc(var(--pad) + var(--sar)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }

/* v7.2 «Карта» (between the energy and the menu; js/ui/map.js) — on phones an icon with a short caption */
.hud-mapbtn { padding: 0 18px 0 10px; }
.hud-mapbtn__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-l); color: var(--primary); flex: none; transition: background-color 0.15s ease, color 0.15s ease; }
.hud-mapbtn__ico .ico { width: 19px; height: 19px; }
.hud-mapbtn:hover .hud-mapbtn__ico { background: var(--primary); color: #fff; }
.hud-mapbtn__lbl { font-size: 1rem; font-weight: 700; line-height: 1; }

/* v7.2 travel veil: a lazy part (the «Нейропарк», the office) is loading — a calm card instead of nothing (app.js APP.veil) */
.tv-veil { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; opacity: 0; transition: opacity 0.26s var(--ease);
  background: radial-gradient(120% 90% at 50% 38%, rgba(248, 245, 240, 0.9) 0%, rgba(239, 233, 224, 0.97) 72%);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
.tv-veil.in { opacity: 1; }
.tv-veil.out { opacity: 0; transition-duration: 0.3s; pointer-events: none; }
.tv-veil__card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transform: translateY(8px) scale(0.98); transition: transform 0.5s var(--ease); }
.tv-veil.in .tv-veil__card { transform: none; }
.tv-veil__mark { width: 88px; height: 88px; margin-bottom: 8px; border-radius: 28px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 28% 18%, var(--vc-l, #e3eeee) -40%, var(--vc, #14505c) 46%, var(--vc-d, #0d3c46) 100%);
  box-shadow: 0 18px 40px rgba(23, 32, 43, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.tv-veil__mark .ico { width: 40px; height: 40px; }
.tv-veil__t { font: 700 2rem/1.15 var(--display); color: var(--ink); }
.tv-veil__s { color: var(--ink2); font-size: 1.02rem; font-weight: 600; }
.tv-veil__bar { position: relative; width: 168px; height: 3px; margin-top: 12px; border-radius: 3px; background: rgba(23, 32, 43, 0.1); overflow: hidden; }
.tv-veil__bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--vc, var(--gold)), transparent); animation: hudBoot 1.2s ease-in-out infinite; }
html.lowfx .tv-veil { background: rgba(244, 240, 233, 0.98); }

/* bottom: dock + concierge bar */
.hud-bottom { position: absolute; left: 50%; bottom: calc(var(--pad) + var(--sab)); transform: translateX(-50%); display: flex; align-items: stretch; gap: 12px; max-width: calc(100% - 2 * var(--pad)); }
.hud-dock { display: flex; gap: 2px; padding: 6px; border-radius: 18px; }
.hud-dock__btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 84px; height: 62px; padding: 4px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink2) !important; transition: background-color 0.15s ease, color 0.15s ease; }
.hud-dock__btn:hover { background: rgba(23, 32, 43, 0.05); color: var(--ink) !important; }
.hud-dock__ico { position: relative; display: grid; }
.hud-dock__ico .ico { width: 24px; height: 24px; }
.hud-dock__lbl { font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
/* a quiet gold dot: there is something to do today (no red alarm badges) */
.hud-dot { position: absolute; top: -2px; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #fff; }
.hud-askwrap { position: relative; display: flex; }
.hud-ask { display: flex; align-items: center; gap: 14px; width: 500px; padding: 0 12px 0 14px; border-radius: 18px; text-align: left; transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.hud-ask:hover { background: var(--glass-strong); box-shadow: 0 1px 1px rgba(23, 32, 43, 0.04), 0 12px 34px rgba(23, 32, 43, 0.18); }
.hud-ask__mark { width: 44px; height: 44px; }
.hud-ask__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hud-ask__ph { font-size: 1.06rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-ask__sub { font-size: 0.88rem; font-weight: 500; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-ask__go { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: #fff; transition: background-color 0.15s ease; }
.hud-ask:hover .hud-ask__go { background: var(--primary-d); }
.hud-ask__go .ico { width: 20px; height: 20px; }

/* concierge speech bubble */
.hud-bubble { position: absolute; left: 50%; bottom: calc(100% + 12px); width: min(440px, calc(100vw - 32px)); display: flex; gap: 14px; align-items: flex-start; padding: 18px 16px 16px; border-radius: 18px; background: var(--glass-strong);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.22s ease, transform 0.28s var(--ease); }
.hud-bubble.in { opacity: 1; transform: translate(-50%, 0); }
.hud-bubble__mark { width: 40px; height: 40px; }
.hud-bubble__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 30px; }
.hud-bubble__title { font: 700 1.25rem/1.2 var(--display); }
.hud-bubble__text { color: var(--ink2); font-weight: 500; font-size: 1rem; line-height: 1.5; }
.hud-bubble__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hud-bubble__act .btn { white-space: normal; text-align: left; line-height: 1.25; }
.hud .hud-bubble__act .btn { color: var(--tc); }
.hud .hud-bubble__act .btn.ghost { color: var(--ink); }
.hud-bubble__x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: rgba(23, 32, 43, 0.05); color: var(--ink2) !important; display: grid; place-items: center; }
.hud-bubble__x:hover { background: rgba(23, 32, 43, 0.09); }
.hud-bubble__x .ico { width: 18px; height: 18px; }

/* level up: a quiet gold medal */
.hud-lvlwrap { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; cursor: pointer; background: rgba(14, 19, 26, 0.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadeIn 0.2s ease; transition: opacity 0.3s ease; }
.hud-lvlwrap.out { opacity: 0; }
.hud-lvlup { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 300px; padding: 34px 44px 30px; border-radius: 20px; background: var(--panel); box-shadow: var(--sh-3); text-align: center; animation: rise 0.3s var(--ease); }
.hud-lvlup__medal { width: 96px; height: 96px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; padding: 4px; background: conic-gradient(from 210deg, #f3e3bb, #c9a35a, #8f6a26, #d8bc7c, #f3e3bb); box-shadow: 0 8px 24px rgba(168, 130, 58, 0.3); }
.hud-lvlup__n { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff, var(--gold-ll)); color: var(--gold-t); font: 700 2.6rem/1 var(--display); }
.hud-lvlup__t { font: 700 1.8rem/1.15 var(--display); color: var(--ink); }
.hud-lvlup__s { color: var(--ink2); font-size: 1rem; }

/* ---------------------------------------------------------------- HUD modals (all panels) */
.modal.hud-modal { width: min(600px, 100%); }
.modal.hud-modal.wide { width: min(980px, 100%); }
.modal.hud-menu-modal { width: min(460px, 100%); }
.hud-lead { margin-bottom: 14px; font-size: 1rem; }
.hud-sub { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; font-size: 1.04rem; }
.hud-sub.first { margin-top: 0; }
.hud-sub .faint { font-weight: 600; font-size: 0.9rem; }
.hud-note { font-size: 0.92rem; margin-top: 8px; }
.hud-note .ico { width: 1em; height: 1em; vertical-align: -0.12em; }
.hud-danger { color: var(--danger) !important; }
.hud-plus { margin-left: 2px; padding: 1px 7px; border-radius: 6px; background: rgba(23, 32, 43, 0.08); font-size: 0.86rem; font-weight: 800; }

/* «answers are examples» (demo mode), shown in the concierge, settings and buildings */
.hud-demo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--gold-ll); border: 1px solid #ecdcb6; color: var(--ink2); font-size: 0.95rem; line-height: 1.45; }
.hud-demo .isq { --tc: var(--gold-l); --ti: var(--gold-t); }
.hud-demo > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hud-demo b { color: var(--ink); font-weight: 700; font-size: 1rem; }
.hud-demo.in-helper { margin-top: 6px; }

/* energy */
.hud-en__big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hud-en__num { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.hud-en__num b { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.hud-en__num .muted { font-size: 1.1rem; font-weight: 600; }
.hud-en__bolt { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-l); color: var(--gold-d); flex: none; }
.hud-en__bolt .ico { width: 26px; height: 26px; }
.hud-en__bar { height: 8px; margin: 16px 0 14px; }
.hud-en__p { font-size: 1rem; line-height: 1.55; color: var(--ink2); }
.hud-en__p + .hud-en__p { margin-top: 8px; }
.hud-en__h { margin: 20px 0 10px; font-size: 1.04rem; }
.hud-en__costs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.hud-en__cost { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--panel2); }
.hud-en__cost .isq { background: var(--panel); }
.hud-en__l { flex: 1; font-weight: 600; font-size: 1rem; line-height: 1.2; }
.hud-en__n { display: inline-flex; align-items: center; gap: 3px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.hud-en__z { display: grid; color: var(--gold-d); }
.hud-en__z .ico { width: 15px; height: 15px; }
.hud-en__acts { display: flex; flex-wrap: wrap; gap: 10px; }
.hud-en__acts .btn { flex: 1 1 220px; }
.hud-en__or { margin: 18px 0 10px; font-weight: 700; color: var(--ink); }
.hud-en__later { display: flex; justify-content: center; margin-top: 10px; }
.hud-out .hud-en__big { margin-bottom: 12px; }

/* who is online + the menu */
.hud-who__list { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; max-height: 50vh; overflow: auto; }
.hud-who__row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.hud-who__row:nth-child(odd) { background: var(--panel2); }
.hud-who__row .muted { margin-left: auto; font-size: 0.92rem; text-align: right; }
.hud-menu { display: flex; flex-direction: column; gap: 6px; }
.hud-mi { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-align: left; transition: background-color 0.15s ease; }
.hud-mi:hover { background: var(--panel2); }
.hud-mi__t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hud-mi__t b { font-weight: 700; font-size: 1.04rem; }
.hud-mi__t .muted { font-size: 0.92rem; }
.hud-mi__go { width: 18px; height: 18px; color: var(--ink3); }
.hud-mi__badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--danger); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 0.86rem; }

/* notifications */
.hud-notes { display: flex; flex-direction: column; gap: 6px; }
.hud-note { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); text-align: left; color: var(--ink); font: inherit; }
.hud-note.is-link { cursor: pointer; transition: background-color 0.15s ease; }
.hud-note.is-link:hover { background: var(--panel2); }
.hud-note.is-new { background: var(--primary-ll); border-color: #d5e6e6; }
.hud-note.is-new::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.hud-note__t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hud-note__t b { font-weight: 700; }
.hud-note__t .muted { font-size: 0.96rem; }
.hud-note__ts { font-size: 0.86rem; margin-top: 2px; }
.hud-note__go { width: 18px; height: 18px; color: var(--ink3); align-self: center; }

/* buildings «Куда пойти?» — a calm list */
.modal.hud-bmodal { width: min(640px, 100%); }
.hud-brows { display: flex; flex-direction: column; gap: 8px; }
.hud-brow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; transition: background-color 0.15s ease, border-color 0.15s ease; }
.hud-brow:hover { background: var(--bc-ll, var(--panel2)); border-color: var(--bc-m, var(--line2)); }
.hud-brow.is-rec { border-color: #e6d4aa; }
.hud-brow__pic { position: relative; flex: none; }
.hud-brow__ava { width: 56px; height: 56px; background: var(--bc-l, var(--panel3)); }
.hud-brow__mark { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bc-l, var(--panel3)); color: var(--bc-ink, var(--ink2)); box-shadow: 0 0 0 2px var(--panel); }
.hud-brow__mark .ico { width: 15px; height: 15px; }
.hud-brow__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hud-brow__n { font: 700 1.14rem/1.25 var(--display); }
.hud-brow__who { font-size: 0.92rem; font-weight: 600; color: var(--ink2); }
.hud-brow__a { font-size: 0.92rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-brow__go { width: 20px; height: 20px; color: var(--ink3); }
/* banner art (the concierge route card) */
.hud-bcard__wm { color: rgba(255, 255, 255, 0.22); display: grid; }
.hud-bcard__wm .ico { width: 56px; height: 56px; }
.hud-hl__art { position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--bc-d, #2b4a52) 0%, var(--bc-dd, #12262b) 100%); }
.hud-hl__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 12, 18, 0.18) 0%, rgba(8, 12, 18, 0) 40%); pointer-events: none; }
.hud-hl__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.hud-hl__art.has-img img { opacity: 1; }

/* quests, achievements, events */
.hud-quests { display: flex; flex-direction: column; gap: 8px; }
.hud-quest { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.hud-quest__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-quest__t b { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.hud-quest__meta { font-size: 0.92rem; }
.hud-quest.is-done { background: var(--panel2); }
.hud-quest.is-done .hud-quest__t b { color: var(--ink2); }
.hud-quest__go, .hud-quest__done { flex: none; }
.hud-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 6px 0 4px; }
.hud-ach__i { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.hud-ach__i:not(.got) { background: var(--panel2); border-color: transparent; }
.hud-ach__i:not(.got) b { color: var(--ink2); }
.hud-ach__i b { font-weight: 700; font-size: 0.94rem; line-height: 1.25; }
.hud-ach__i span.faint { font-size: 0.84rem; line-height: 1.3; }
.hud-events { display: flex; flex-direction: column; gap: 10px; }
.hud-event { display: flex; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.hud-event.is-active { background: linear-gradient(135deg, var(--gold-ll), var(--panel) 70%); border-color: #eadbb8; }
.hud-event.is-compact { padding: 14px; }
.hud-event__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hud-event__when { font-size: 0.9rem; font-weight: 700; color: var(--ink2); }
.hud-event__when.on { color: var(--success); }
.hud-event__title { font: 700 1.25rem/1.2 var(--display); }
.hud-event.is-compact .hud-event__title { font-size: 1.12rem; }
.hud-event__go { margin-top: 4px; }

/* profile */
.hud-prof__head { display: flex; align-items: center; gap: 20px; padding-right: 40px; }
.hud-prof__ava { width: 104px; height: 104px; background: var(--panel3); }
.hud-prof__id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hud-prof__name { font-size: 1.9rem; overflow-wrap: anywhere; }
.hud-prof__lvlt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.98rem; }
.hud-prof__bar { width: min(320px, 100%); height: 6px; }
.hud-prof__next { font-size: 0.9rem; }
.modal.hud-profile .modal__head { margin-bottom: 18px; }
.hud-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.hud-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--panel2); }
.hud-stat__i { width: 20px; height: 20px; color: var(--primary); margin-bottom: 6px; }
.hud-stat b { font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.hud-stat span.muted { font-size: 0.9rem; line-height: 1.25; }
.hud-prof__btns { margin-top: 16px; }
.chip.static, .chip.static:hover { cursor: default; background: var(--panel2); border-color: transparent; color: var(--ink); }
.chip.static .ico { color: var(--ink2); }
.hud-prof__nosaved { font-size: 0.98rem; }
.hud-saved { display: flex; flex-direction: column; gap: 6px; }
.hud-saved__i, .hud-achd { border-radius: 14px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.hud-saved__i summary, .hud-achd summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px 10px 10px; cursor: pointer; list-style: none; }
.hud-saved__i summary::-webkit-details-marker, .hud-achd summary::-webkit-details-marker { display: none; }
.hud-saved__i summary b, .hud-achd summary b { display: block; font-weight: 700; }
.hud-saved__i summary .faint, .hud-achd summary .faint { display: block; font-size: 0.88rem; }
.hud-saved__chev { width: 18px; height: 18px; color: var(--ink3); transition: transform 0.2s ease; }
.hud-saved__i[open] .hud-saved__chev, .hud-achd[open] .hud-saved__chev { transform: rotate(180deg); }
.hud-saved__text { padding: 0 16px 14px 60px; color: var(--ink2); }
.hud-saved__text p + p, .hud-saved__text ul, .hud-saved__text ol { margin-top: 6px; }
.hud-achd { margin-top: 18px; }
.hud-achd .hud-ach { padding: 0 12px 12px; }
.hud-prof__out { margin-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hud-lookbox { min-height: 300px; }

/* settings */
.hud-settings { display: flex; flex-direction: column; }
.hud-set__group { margin: 20px 0 2px; }
.hud-set__group:first-child { margin-top: 0; }
.hud-set { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.hud-set.stack { flex-wrap: wrap; }
.hud-set.stack > .hud-segs, .hud-set.stack > .hud-brain { flex: 1 1 100%; margin-left: 58px; }
.hud-set__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hud-set__txt b { font-weight: 700; font-size: 1.02rem; }
.hud-set__txt span { font-size: 0.92rem; }
.hud-set__ctl { flex: none; }
.hud-set.is-tap { cursor: pointer; }
.hud-switch { position: relative; width: 54px; height: 32px; padding: 0; border-radius: 999px; border: 0; background: var(--line2); transition: background-color 0.2s ease; flex: none; }
.hud-switch::after { content: ''; position: absolute; inset: -8px -4px; } /* a 48 px tap area around the small switch */
.hud-switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23, 32, 43, 0.3); transition: transform 0.2s var(--ease); }
.hud-switch[aria-checked="true"] { background: var(--primary); }
.hud-switch[aria-checked="true"] i { transform: translateX(22px); }
.hud-segs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel3); }
.hud-seg { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font-weight: 600; font-size: 0.98rem; }
.hud-seg .ico { width: 17px; height: 17px; }
.hud-seg[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.hud-brain { display: flex; flex-direction: column; gap: 10px; }
.hud-brain__status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--panel2); }
.hud-brain__status > div { display: flex; flex-direction: column; }
.hud-brain__dot { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; flex: none; background: var(--line2); }
.hud-brain__dot.is-ok { background: #3fa171; box-shadow: 0 0 0 3px rgba(63, 161, 113, 0.15); }
.hud-brain__dot.is-warn { background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 163, 90, 0.2); }
.hud-brain__dot.is-wait { background: var(--ink3); }
.hud-brain .row .input { flex: 1; min-width: 0; }
.hud-dev { border-radius: 12px; border: 1px dashed var(--line2); }
.hud-dev > summary { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); }
.hud-dev > .col { padding: 0 12px 12px; }
.hud-ver { margin-top: 16px; text-align: center; font-size: 0.86rem; }

/* ---------------------------------------------------------------- the concierge */
.modal.hud-helper { width: min(640px, 100%); }
.hud-hl__top { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding-right: 44px; }
.hud-hl__mark { width: 60px; height: 60px; }
.hud-hl__say { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hud-hl__say b { font: 700 1.55rem/1.2 var(--display); }
.hud-hl__say > span:last-child { font-weight: 500; font-size: 1rem; color: var(--ink2); }
.modal.hud-helper .modal__head { display: none; }
.hud-hl__ask { display: flex; flex-direction: column; gap: 10px; }
.hud-hl__form { display: flex; gap: 8px; align-items: stretch; }
.hud-hl__in { flex: 1; min-width: 0; min-height: 64px; padding: 16px; border-radius: 14px; font-size: 1.06rem; }
.hud-hl__in.shake { animation: hudShake 0.35s; border-color: var(--warn); }
.hud-hl__btns { display: flex; gap: 8px; flex: none; }
.hud-hl__send { min-width: 128px; border-radius: 14px; }
.hud-hl__send .ico { width: 20px; height: 20px; }
.hud-hl__mic { min-width: 56px; border-radius: 14px; padding: 8px; }
.hud-hl__mic .ico { width: 22px; height: 22px; }
.hud-hl__mic.is-on { --c: var(--danger-l); --tc: var(--danger); animation: pulse 1s ease-in-out infinite; }
.hud-hl__hint { margin-top: 8px; }
.hud-hl__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hud-hl__chip { min-height: 46px; padding: 8px 16px; font-size: 0.98rem; font-weight: 500; text-align: left; white-space: normal; }
.hud-hl__thinking { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--panel2); font-weight: 500; color: var(--ink2); }
.hud-hl__route { display: flex; flex-direction: column; gap: 14px; padding: 0 0 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; animation: rise 0.25s var(--ease); }
.hud-hl__art { aspect-ratio: 16 / 5; }
.hud-hl__rb { display: flex; align-items: flex-start; gap: 14px; margin-top: -44px; padding: 0 18px; position: relative; z-index: 2; }
.hud-hl__rb > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 50px; }
.hud-hl__ava { width: 80px; height: 80px; border-width: 3px; box-shadow: var(--sh-2); }
.hud-hl__bn { font: 700 1.4rem/1.2 var(--display); }
.hud-hl__rb .muted { font-size: 0.96rem; }
.hud-hl__q { display: flex; gap: 10px; align-items: flex-start; margin: 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--panel2); color: var(--ink2); font-size: 0.98rem; }
.hud-hl__q .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--ink3); }
.hud-hl__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 18px; }
.hud-hl__acts .btn.lg { flex: 1 1 220px; }
.hud-hl__pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 10px; }
.hud-hl__pb { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 1rem; text-align: left; transition: border-color 0.15s ease, background-color 0.15s ease; }
.hud-hl__pb:hover { border-color: #c5bcad; background: var(--panel2); }
@keyframes hudShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* action bars of long HUD modals stay reachable (avatar editor, interests) */
.modal.hud-modal .modal__actions { position: sticky; bottom: -26px; z-index: 3; margin: 20px -28px -26px; padding: 14px 28px 18px; background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* ---------------------------------------------------------------- responsive HUD */
@media (max-width: 1180px) {
  .hud-ask { width: clamp(300px, 38vw, 500px); }
  .hud-player__name { max-width: 170px; }
}
@media (max-width: 960px) {
  .hud-dock__btn { min-width: 72px; }
  .hud-ask__sub { display: none; }
}
@media (max-width: 760px) {
  .hud { --pad: 12px; }
  .hud-side { display: none; }
  .hud-top { gap: 8px; }
  .hud-right { gap: 8px; }
  .hud-player { height: 54px; padding: 5px 14px 5px 5px; gap: 10px; border-radius: 15px; }
  .hud-player__ava { width: 42px; height: 42px; }
  .hud-player__name { max-width: 38vw; }
  .hud-chip { height: 54px; padding: 0 14px 0 9px; border-radius: 15px; }
  .hud-energy__lbl { display: none; }
  .hud-ibtn { width: 54px; height: 54px; border-radius: 15px; }
  .hud-mapbtn { flex-direction: column; justify-content: center; gap: 3px; width: 54px; padding: 0; }
  .hud-mapbtn__ico { width: auto; height: auto; background: none !important; color: var(--primary) !important; }
  .hud-mapbtn__ico .ico { width: 22px; height: 22px; }
  .hud-mapbtn__lbl { font-size: 0.76rem; }
  .hud-bottom { left: calc(var(--pad) + var(--sal)); right: calc(var(--pad) + var(--sar)); transform: none; max-width: none; flex-direction: column-reverse; gap: 8px; }
  .hud-dock { justify-content: space-between; padding: 4px; border-radius: 16px; }
  .hud-dock__btn { flex: 1 1 0; min-width: 0; height: 60px; padding: 4px 2px; }
  .hud-dock__lbl { font-size: 0.82rem; }
  .hud-askwrap { width: 100%; }
  .hud-ask { width: 100%; height: 62px; padding: 0 8px 0 10px; gap: 12px; border-radius: 16px; }
  .hud-ask__mark { width: 42px; height: 42px; }
  .hud-ask__ph { font-size: 1.02rem; }
  .hud-ask__go { width: 46px; height: 46px; }
  .hud-bubble { left: 0; right: 0; width: auto; transform: translateY(8px); }
  .hud-bubble.in { transform: none; }
  .hud-bubble__title { font-size: 1.15rem; }
  .modal.hud-modal .modal__actions { bottom: calc(-20px - env(safe-area-inset-bottom, 0px)); margin: 18px -18px calc(-20px - env(safe-area-inset-bottom, 0px)); padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
  .modal.hud-modal .modal__actions .btn { flex: 1 1 auto; }
  .hud-prof__head { gap: 14px; padding-right: 36px; }
  .hud-prof__ava { width: 80px; height: 80px; }
  .hud-prof__name { font-size: 1.55rem; }
  .hud-stat { padding: 10px 12px; }
  .hud-stat b { font-size: 1.15rem; }
  .hud-set.stack > .hud-segs, .hud-set.stack > .hud-brain { margin-left: 0; }
  .hud-segs { flex-wrap: nowrap; }
  .hud-seg { padding: 6px 6px; font-size: 0.92rem; gap: 4px; min-width: 0; }
  .hud-hl__top { gap: 12px; margin-bottom: 14px; }
  .hud-hl__mark { width: 50px; height: 50px; }
  .hud-hl__say b { font-size: 1.3rem; }
  .hud-hl__form { flex-direction: column; }
  .hud-hl__btns { justify-content: flex-end; }
  .hud-hl__send { flex: 1 1 auto; }
  .hud-hl__in { min-height: 60px; }
  .hud-quest { flex-wrap: wrap; }
  .hud-quest__t { flex-basis: calc(100% - 60px); }
  .hud-quest__go, .hud-quest__done { margin-left: 58px; }
  .hud-brow { min-height: 72px; gap: 12px; }
  .hud-brow__ava { width: 50px; height: 50px; }
  .hud-lvlup { padding: 30px 28px 24px; min-width: 0; }
  .hud-saved__text { padding-left: 16px; }
  .hud-en__num b { font-size: 2.1rem; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .hud-side { display: none; }
}
/* v8.5 «Войти» (a guest, when the city has accounts) — like «Карта», in gold; on phones an icon over a short word */
.hud-login { padding: 0 18px 0 10px; }
.hud-login[hidden] { display: none; }
.hud-login__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-l); color: var(--gold-t); flex: none; transition: background-color 0.15s ease, color 0.15s ease; }
.hud-login__ico .ico { width: 19px; height: 19px; }
.hud-login:hover .hud-login__ico { background: var(--gold); color: #fff; }
.hud-login__lbl { font-size: 1rem; font-weight: 700; line-height: 1; }
@media (max-width: 760px) {
  .hud-login { flex-direction: column; justify-content: center; gap: 3px; width: 54px; padding: 0; }
  .hud-login__ico { width: auto; height: auto; background: none !important; color: var(--gold-t) !important; }
  .hud-login__ico .ico { width: 22px; height: 22px; }
  .hud-login__lbl { font-size: 0.76rem; }
  .hud-top.has-login .hud-player__name { max-width: 22vw; }
  html.big .hud-login { width: 56px; }
  html.big .hud-login__lbl { font-size: 0.7rem; }
}
/* v8.5 the «Аккаунт» rows of the settings (js/core/auth.js settingsRows) */
.hud-set.au-set .hud-set__txt .muted { overflow-wrap: anywhere; }
.au-set__btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 56px; }
.hud-set.stack > .au-set__btns { flex: 1 1 100%; margin: 0 0 0 58px; }
.hud-set.stack > .hud-set__txt { flex: 1 1 0; min-width: 0; }
.au-set__more { margin: 2px 0 6px; }
.au-set__more .au-set__btns { margin: 10px 0 8px; }
.au-set__more .hud-note a { color: var(--primary); }
@media (max-width: 760px) { .au-set__btns, .hud-set.stack > .au-set__btns { margin-left: 0; } .au-set__btns .btn { flex: 1 1 auto; } }
/* big font: the chips grow with the text and long names give way first */
html.big .hud-player__name { max-width: 180px; }
html.big .hud-player, html.big .hud-chip, html.big .hud-ibtn { height: 60px; }
html.big .hud-ibtn { width: 60px; }
html.big .hud-ask { width: clamp(300px, 36vw, 540px); }
html.big .hud-dock__btn { height: 66px; }
@media (max-width: 760px) {
  html.big .hud-player__name { max-width: 30vw; }
  html.big .hud-player, html.big .hud-chip, html.big .hud-ibtn { height: 56px; }
  html.big .hud-ibtn { width: 56px; }
  html.big .hud-mapbtn { width: 56px; }
  html.big .hud-mapbtn__lbl { font-size: 0.7rem; }
  html.big .hud-dock__btn { height: 64px; }
  html.big .hud-dock__lbl { font-size: 0.74rem; }
  html.big .hud-ask { width: 100%; height: 64px; }
  html.big .hud-player__title { font-size: 0.8rem; }
}
@media (max-width: 360px) {
  .hud-player__info { display: none; }
  .hud-player { padding-right: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-hl__mic.is-on { animation: none; }
}
.ob-open .hud-no3d { display: none; }

/* ---------------------------------------------------------------- v7.5 «Скоро открытие»: the «Скоро» badge, the list, the concierge */
.tag.soon-tag { background: var(--gold-l); color: var(--gold-t); vertical-align: 0.12em; margin-left: 8px; font-family: var(--font); font-size: 0.74rem; letter-spacing: 0.03em; padding: 2px 7px; }
.tag.soon-tag .ico { width: 13px; height: 13px; }
.hud-brow.is-soon .hud-brow__ava { filter: saturate(0.7); }
.hud-brow.is-soon .hud-brow__a { color: var(--ink3); }
.hud-hl__pb.is-soon { color: var(--ink2); }
.hud-hl__pb.is-soon .tag { margin-left: auto; }
.hud-hl__art.is-soon .hud-hl__soon { position: absolute; left: 14px; top: 12px; z-index: 2; }
.hud-hl__art.is-soon .hud-hl__soon .tag { margin: 0; padding: 4px 10px; font-size: 0.8rem; background: rgba(201, 163, 90, 0.96); color: #241a06; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.hud-hl__alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 0 18px; }
.hud-hl__alt { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; transition: border-color 0.15s ease, background-color 0.15s ease; }
.hud-hl__alt:hover { border-color: var(--bc-m, var(--line2)); background: var(--bc-ll, var(--panel2)); }
.hud-hl__altava { width: 54px; height: 54px; background: var(--bc-l, var(--panel3)); }
.hud-hl__altt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hud-hl__altt b { font: 700 1.05rem/1.25 var(--display); }
.hud-hl__altt .muted { font-size: 0.88rem; }
.hud-hl__altw { font-size: 0.92rem; color: var(--bc-ink, var(--ink)); font-weight: 600; line-height: 1.3; }
.hud-hl__altgo { width: 20px; height: 20px; color: var(--ink3); flex: none; }
@media (max-width: 760px) {
  .hud-hl__alts { grid-template-columns: minmax(0, 1fr); }
}
/* v8.6 unlimited energy («Режим показа» on this device, or the account's «Безлимит») */
.hud-energy.is-unl .hud-energy__val { font-size: 1.35em; line-height: 1; }
.hud-en__inf { font-size: 2.6rem; line-height: 1; }
.hud-en__show { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 0; color: var(--ink2); font-size: 0.95rem; line-height: 1.45; }
/* v8.6.1 «Войти» on narrow phones: the player chip keeps the face only (the name and level would slide under the chips) */
@media (max-width: 440px) { .hud-top.has-login .hud-player__info { display: none; } .hud-top.has-login .hud-player { padding-right: 5px; } }
