:root {
  --navy: #12153a; --navy2: #1b1f4b; --violet: #5b2a8f; --cyan: #3ee0ff; --lime: #b6f23a; --orange: #ff9a2e;
  --pink: #ff6fae; --gold: #ffd23e; --text: #fff; --muted: #b9bde8; --glass: rgba(14, 16, 48, .62);
  --line: rgba(255, 255, 255, .14); --r: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Nunito, system-ui, sans-serif; color: var(--text); overflow: hidden; user-select: none;
  background: radial-gradient(1200px 700px at 30% 30%, #34399a 0%, transparent 60%),
              radial-gradient(900px 600px at 85% 85%, #5b2a8f 0%, transparent 60%),
              linear-gradient(160deg, var(--navy), #241a52);
}
button { font: inherit; color: inherit; }
input { font: inherit; }
.screen { position: fixed; inset: 0; display: none; }
.screen.on { display: block; }
.stars::before, .stars::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 18%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 42% 78%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 40%, #fff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.stars::after { transform: translate(37%, 23%) scale(1.3); animation-delay: -2s; }
@keyframes twinkle { to { opacity: .25; } }
.bg-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
#intro .bg-art, #gate .bg-art { opacity: .55; filter: saturate(1.2); }
.gate, .intro-logo { z-index: 1; }

/* ── кнопки ── */
.btn-game {
  border: 0; cursor: pointer; font-weight: 900; font-size: 22px; padding: 14px 30px; border-radius: 18px;
  color: #17203f; background: linear-gradient(180deg, #d4ff6a, #95dd1f); box-shadow: 0 6px 0 #5f9a0c, 0 12px 26px rgba(0,0,0,.3);
  transition: translate .15s, scale .15s, rotate .1s, filter .15s; letter-spacing: .3px;
}
.btn-game:hover { filter: brightness(1.08); translate: 0 -2px; }
.btn-game:active { translate: 0 4px; box-shadow: 0 2px 0 #5f9a0c; }
.btn-game:disabled { filter: grayscale(.8) brightness(.8); cursor: default; transform: none; }
.btn-game.cyan { background: linear-gradient(180deg, #8ff0ff, #2bc6ea); box-shadow: 0 6px 0 #1586a3, 0 12px 26px rgba(0,0,0,.3); }
.btn-game.gold { background: linear-gradient(180deg, #ffe680, #ffb81f); box-shadow: 0 6px 0 #b47900, 0 12px 26px rgba(0,0,0,.3); }
.btn-game.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.btn-game.small { font-size: 16px; padding: 9px 16px; border-radius: 14px; }
.link-btn { background: none; border: 0; color: var(--cyan); font-weight: 800; font-size: 18px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ── заставка ── */
#intro { display: none; place-items: center; }
#intro.on { display: grid; }
.intro-logo { position: relative; text-align: center; z-index: 2; }
.intro-logo .kicker { font-size: 18px; font-weight: 900; color: var(--lime); letter-spacing: .3em; text-transform: uppercase; }
.intro-logo h1 { margin: 6px 0 0; font-size: clamp(44px, 7vw, 96px); font-weight: 900; line-height: .95;
  background: linear-gradient(180deg, #fff, #a9eaff 55%, #6fb6ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 rgba(10, 12, 40, .6)) drop-shadow(0 0 30px rgba(62, 224, 255, .4)); }
.intro-bar { width: 320px; height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); margin: 30px auto 0; overflow: hidden; }
.intro-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--lime)); }

/* ── окно входа и регистрации ── */
.gate { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.panel {
  position: relative; width: min(560px, 100%); padding: 34px 36px 30px; border-radius: 30px; text-align: center;
  background: linear-gradient(180deg, rgba(40, 44, 110, .92), rgba(22, 24, 64, .94));
  border: 2px solid rgba(255,255,255,.18); box-shadow: 0 0 0 6px rgba(62,224,255,.08), 0 30px 80px rgba(0,0,0,.5);
}
.panel h2 { margin: 0 0 6px; font-size: 34px; font-weight: 900; }
.panel .sub { color: var(--muted); font-size: 18px; margin: 0 0 22px; }
.panel-badge { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; font-size: 46px; background: linear-gradient(180deg, #4a4fc4, #2a2d7a);
  border: 3px solid rgba(255,255,255,.25); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span { display: flex; gap: 8px; align-items: center; font-weight: 900; font-size: 18px; margin-bottom: 8px; color: var(--muted); }
.big-input {
  width: 100%; height: 66px; border-radius: 18px; border: 3px solid rgba(255,255,255,.18); background: rgba(0,0,0,.28);
  color: #fff; font-size: 30px; font-weight: 900; text-align: center; letter-spacing: .08em; outline: none; text-transform: uppercase;
  transition: border-color .15s, box-shadow .15s;
}
.big-input.plain { text-transform: none; letter-spacing: 0; }
.big-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 5px rgba(62,224,255,.2); }
.pin-row { display: flex; gap: 12px; justify-content: center; }
.pin-row input { width: 70px; height: 80px; font-size: 40px; padding: 0; letter-spacing: 0; }
.err { min-height: 28px; color: #ffb3c4; font-weight: 900; font-size: 19px; margin: 6px 0 10px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -12px 0; } 40%, 80% { translate: 12px 0; } }
.panel .row-btns { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.step-dots { display: flex; gap: 8px; justify-content: center; margin: 30px 0 18px; }
.step-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.2); }
.step-dots i.on { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.group-list { display: grid; gap: 12px; margin-bottom: 18px; }
.group-btn { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; cursor: pointer; text-align: left;
  border: 3px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); font-size: 22px; font-weight: 900; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s, filter .15s, opacity .15s, translate .15s; }
.group-btn small { display: block; font-size: 15px; color: var(--muted); font-weight: 700; }
.group-btn:hover { border-color: var(--cyan); background: rgba(62,224,255,.12); translate: 0 -2px; }
.ticket { margin: 6px auto 18px; padding: 20px; border-radius: 22px; background: linear-gradient(140deg, #1b1f4b, #4b2d8f);
  border: 2px dashed rgba(255,255,255,.35); display: grid; gap: 12px; }
.ticket .t-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ticket .t-lbl { color: var(--muted); font-weight: 900; width: 74px; text-align: right; }
.ticket .t-val { font-size: 40px; font-weight: 900; letter-spacing: .08em; background: rgba(255,255,255,.12); padding: 2px 16px; border-radius: 12px; }
.ticket .t-val.pin { color: var(--gold); }

/* ── кабинет ── */
#hub .hub-bg { position: absolute; inset: 0; overflow: hidden; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 78px; display: flex; align-items: center; gap: 14px; padding: 0 22px; z-index: 5;
  background: linear-gradient(180deg, rgba(10,12,40,.82), rgba(10,12,40,0)); }
.who { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.who .face { cursor: pointer; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: linear-gradient(180deg, #4a4fc4, #2a2d7a); border: 3px solid rgba(255,255,255,.3); position: relative; }
.face-circle { position: relative; overflow: hidden; border-radius: 50%; }
.face-circle .face-in { position: absolute; width: 238.1%; height: 357.2%; left: -69.07%; top: -4.42%; }
.who b { font-size: 22px; display: block; line-height: 1.1; }
.who small { color: var(--muted); font-weight: 800; }
.pill { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px; background: rgba(0,0,0,.4); border: 2px solid var(--line); font-size: 24px; font-weight: 900; }
.pill img, .pill .art-fallback { width: 38px; height: 38px; object-fit: contain; font-size: 28px; line-height: 38px; text-align: center; }
.top-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255,255,255,.08);
  font-weight: 900; font-size: 18px; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s, filter .15s, opacity .15s, translate .15s; position: relative; }
.top-btn:hover { background: rgba(255,255,255,.18); translate: 0 -2px; }
.top-btn .ico { font-size: 24px; }
.top-btn .dot { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--pink); font-size: 13px; display: grid; place-items: center; padding: 0 5px; }
.hub-left { position: absolute; left: 0; top: 78px; bottom: 0; width: min(34vw, 470px); display: flex; flex-direction: column; align-items: center; z-index: 3; }
.hero-stage { position: relative; flex: 1; width: 100%; display: grid; place-items: end center; padding-bottom: 8px; min-height: 0; }
.podium { position: absolute; bottom: 2%; width: 70%; height: 70px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(62,224,255,.6), rgba(62,224,255,.1) 70%, transparent); animation: glow 3s ease-in-out infinite alternate; }
@keyframes glow { to { transform: scale(1.08); opacity: .7; } }
.hero-stage .hero-box { position: relative; height: 100%; max-height: 640px; aspect-ratio: 512 / 768; }
.skills { width: calc(100% - 40px); margin: 0 20px 20px; padding: 14px 16px; border-radius: 20px; background: var(--glass); border: 2px solid var(--line); display: grid; gap: 8px; }
.skill { display: grid; grid-template-columns: 30px 110px 1fr 34px; align-items: center; gap: 8px; font-weight: 800; }
.skill .ico { font-size: 22px; }
.skill .bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.skill .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--lime)); }
.skill .lv { color: var(--gold); text-align: right; }

/* ── карта ── */
.map { position: absolute; left: min(34vw, 470px); right: 0; top: 78px; bottom: 0; z-index: 2; }
.map svg.path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.node { position: absolute; transform: translate(-50%, -50%); width: 128px; text-align: center; cursor: pointer; }
.node .disc { width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, #4a4fc4, #24276b); border: 4px solid rgba(255,255,255,.3); box-shadow: 0 10px 24px rgba(0,0,0,.45); transition: translate .15s, scale .15s, rotate .2s, filter .2s; }
.node .disc img, .node .disc .art-fallback { width: 86px; height: 86px; object-fit: contain; font-size: 54px; line-height: 86px; }
.node .num { position: absolute; top: -8px; left: -6px; width: 36px; height: 36px; border-radius: 50%; background: var(--navy2); border: 3px solid rgba(255,255,255,.4); font-weight: 900; display: grid; place-items: center; }
.node .lbl { margin-top: 8px; font-weight: 900; font-size: 15px; line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.node.done .disc { filter: grayscale(.85) brightness(.75); }
.node.done .check { position: absolute; bottom: -4px; right: -4px; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: #17203f; font-weight: 900; display: grid; place-items: center; border: 3px solid #17203f; }
.node.done .lbl { opacity: .7; }
.node.done:hover .disc { filter: none; scale: 1.06; }
.node.done:hover .lbl { opacity: 1; }
.node.current .disc { width: 140px; height: 140px; border-color: var(--lime); background: radial-gradient(circle at 50% 35%, #6a5ff0, #2f2a8a);
  box-shadow: 0 0 0 8px rgba(182,242,58,.25), 0 0 50px rgba(182,242,58,.7); animation: callme 1.4s ease-in-out infinite; }
.node.current .disc img, .node.current .disc .art-fallback { width: 110px; height: 110px; }
.node.current { width: 170px; }
.node.current .lbl { font-size: 19px; color: var(--lime); }
@keyframes callme { 50% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(182,242,58,.12), 0 0 70px rgba(182,242,58,.9); } }
.node .go { display: inline-block; margin-top: 8px; padding: 8px 18px; border-radius: 14px; background: var(--lime); color: #17203f; font-weight: 900; font-size: 18px;
  box-shadow: 0 5px 0 #5f9a0c; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.node.locked { cursor: default; }
.node.locked .disc { filter: grayscale(1) brightness(.5); }
.node.locked .lbl { opacity: .5; }

/* ── панели (гардероб, коллекция, награды) ── */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(6, 8, 30, .6); backdrop-filter: blur(4px); }
.sheet-box { width: min(1180px, 96vw); height: min(760px, 92vh); border-radius: 30px; background: linear-gradient(180deg, #262a72, #171a48);
  border: 2px solid rgba(255,255,255,.18); box-shadow: 0 30px 90px rgba(0,0,0,.6); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.sheet-hd { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 2px solid var(--line); }
.sheet-hd h2 { margin: 0; font-size: 30px; font-weight: 900; margin-right: auto; }
.x-btn { width: 52px; height: 52px; border-radius: 16px; border: 0; background: rgba(255,255,255,.12); font-size: 28px; cursor: pointer; }
.x-btn:hover { background: #ff5d7a; }
.sheet-body { overflow: auto; padding: 20px 24px; }

.wardrobe { display: grid; grid-template-columns: 40% 1fr; height: 100%; min-height: 0; }
.wardrobe .hero-stage { height: 100%; }
.wardrobe-right { display: flex; flex-direction: column; min-height: 0; border-left: 2px solid var(--line); }
.slot-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; padding: 14px 16px; }   /* 11 вкладок: на телефоне — в два ряда */
.slot-tab { aspect-ratio: 1; border-radius: 16px; border: 3px solid transparent; background: rgba(255,255,255,.08); font-size: clamp(18px, 2.2vw, 28px); padding: 0; cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s, filter .15s, opacity .15s, translate .15s; }
.slot-tab:hover { translate: 0 -2px; background: rgba(255,255,255,.16); }
.slot-tab.on { border-color: var(--cyan); background: rgba(62,224,255,.18); box-shadow: 0 0 20px rgba(62,224,255,.35); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 4px 16px 20px; overflow: auto; }
.item { position: relative; border-radius: 20px; border: 3px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  cursor: pointer; padding: 8px 8px 10px; transition: translate .15s, scale .15s, rotate .15s, border-color .15s; text-align: center; }
.item:hover { translate: 0 -3px; rotate: -1deg; border-color: rgba(255,255,255,.4); }
.item img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.item .nm { font-weight: 800; font-size: 15px; min-height: 2.3em; line-height: 1.15; }
.item .rar { position: absolute; left: 12px; right: 12px; top: 6px; height: 5px; border-radius: 3px; background: var(--r); }
.item.on { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(182,242,58,.25), 0 0 24px rgba(182,242,58,.35); }
.item.on::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: #17203f; font-weight: 900; display: grid; place-items: center; }
.item .price { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 12px; border-radius: 99px; background: var(--gold); color: #3a2600; font-weight: 900; }
.item.locked img { filter: grayscale(.4) brightness(.8); }
.item.poor .price { background: rgba(255,255,255,.2); color: #fff; }
.item .legend { margin-top: 4px; font-size: 13px; font-weight: 900; color: var(--gold); }
.wardrobe-foot { padding: 14px 16px; border-top: 2px solid var(--line); display: flex; justify-content: flex-end; gap: 12px; }

.sets { display: grid; gap: 24px; }
.set { padding: 18px; border-radius: 24px; background: rgba(255,255,255,.05); border: 2px solid var(--line); }
.set-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.set-hd h3 { margin: 0; font-size: 24px; }
.set-hd .prize { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 900; color: var(--gold); }
.set-hd .prize img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: rgba(255,255,255,.08); }
.cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gcard { border-radius: 18px; padding: 10px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); border: 3px solid var(--r, rgba(255,255,255,.2)); text-align: center; }
.gcard .pic { aspect-ratio: 3 / 4; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); overflow: hidden; }
.gcard .pic img, .gcard .pic .art-fallback { width: 92%; height: 92%; object-fit: contain; font-size: 60px; display: grid; place-items: center; }
.gcard b { display: block; margin-top: 8px; font-size: 17px; }
.gcard small { display: block; color: var(--muted); font-weight: 700; margin-top: 4px; font-size: 14px; }
.gcard.missing { --r: rgba(255,255,255,.12); }
.gcard.missing .pic img { filter: brightness(0) opacity(.45); }
.gcard.missing b { color: var(--muted); }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.07); border: 2px solid var(--line); }
.ach img, .ach .art-fallback { width: 72px; height: 72px; object-fit: contain; font-size: 48px; text-align: center; flex-shrink: 0; }
.ach b { display: block; font-size: 18px; }
.ach small { color: var(--muted); font-weight: 700; }
.ach.locked img, .ach.locked .art-fallback { filter: grayscale(1) brightness(.5); }
.ach.locked b { color: var(--muted); }
.ach.got { border-color: var(--gold); background: rgba(255, 210, 62, .08); }

/* ── герой ── */
.hero-box { position: relative; }
.hero-body { position: absolute; inset: 0; transform-origin: 50% 96%; }
.hero-idle .hero-body { animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe { 50% { scale: 1.006 1.016; } }
.hero-body img { position: absolute; pointer-events: none; }
.hero-blink { opacity: 0; }
.spark { position: absolute; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; z-index: 50;
  background: radial-gradient(circle, #fff, var(--c) 45%, transparent 70%); }

/* ── награды ── */
.loot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(70, 50, 160, .9), rgba(6, 8, 30, .95)); overflow: hidden; }
.loot-rays { position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255, 230, 128, .14) 0 8deg, transparent 8deg 22deg); animation: spin 18s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.loot-title { position: relative; font-size: 54px; font-weight: 900; color: var(--gold); text-shadow: 0 5px 0 #7a4b00, 0 0 30px rgba(255,210,62,.6); }
.loot-stage { position: relative; height: 200px; width: 300px; display: grid; place-items: center; }
.loot-stage:empty { display: none; }
.loot-chest { width: 220px; height: 200px; object-fit: contain; font-size: 140px; text-align: center; }
.loot-row { position: relative; display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; max-width: 1100px; }
.loot-tile { width: 190px; min-height: 190px; border-radius: 24px; padding: 14px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); border: 3px solid var(--r, rgba(255,255,255,.25)); box-shadow: 0 0 30px var(--r, transparent); }
.loot-tile b { font-size: 22px; font-weight: 900; }
.loot-coins b { color: var(--gold); font-size: 34px; }
.loot-img { width: 120px; height: 120px; object-fit: contain; font-size: 80px; text-align: center; line-height: 120px; }
.loot-emoji { font-size: 80px; line-height: 1; }
.loot-card { width: 220px; }
.card-flip { position: relative; width: 170px; height: 226px; perspective: 900px; }
.card-face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; transition: transform .7s cubic-bezier(.3,1.4,.5,1); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card-back { background: #2a1c5c; }
.card-front { transform: rotateY(180deg); background: radial-gradient(circle at 50% 35%, #4b3fb0, #1b1f4b); border: 3px solid var(--r); }
.card-flip.turned .card-back { transform: rotateY(-180deg); }
.card-flip.turned .card-front { transform: rotateY(0); }
.card-img { width: 100%; height: 100%; object-fit: cover; font-size: 90px; display: grid; place-items: center; }
.card-front .card-img { height: 78%; object-fit: contain; }
.card-name { font-weight: 900; font-size: 16px; padding: 0 8px 8px; }
.loot-take { position: relative; visibility: hidden; font-size: 28px; padding: 16px 48px; }
.loot-take.ready { visibility: visible; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 200; padding: 14px 24px; border-radius: 16px; background: #ff5d7a; font-weight: 900; font-size: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.art-fallback { display: inline-grid; place-items: center; }

@media (max-width: 1000px) {
  body { overflow: auto; }
  .hub-left { position: relative; width: 100%; height: 70vh; top: 78px; }
  .map { position: relative; left: 0; top: 78px; height: 900px; }
  .top-btn span:not(.ico) { display: none; }
  .wardrobe { grid-template-columns: 1fr; }
  .wardrobe .hero-stage { height: 340px; }
  .cards-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; } }
.badge { padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.12); font-weight: 900; }

/* ── карта мира: полотно, которое таскают ── */
.map-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.map-view.dragging { cursor: grabbing; }
.map-world { position: absolute; left: 0; top: 0; will-change: transform; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.map-clouds { position: absolute; inset: -40% -20%; pointer-events: none; will-change: transform; }
.map-clouds i { position: absolute; width: 520px; height: 220px; border-radius: 50%; filter: blur(18px); opacity: .45;
  background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(200,190,255,.25) 60%, transparent); animation: drift 26s ease-in-out infinite alternate; }
.map-clouds i:nth-child(1) { left: 5%; top: 20%; }
.map-clouds i:nth-child(2) { left: 60%; top: 35%; animation-duration: 32s; width: 640px; }
.map-clouds i:nth-child(3) { left: 30%; top: 62%; animation-duration: 22s; opacity: .3; }
.map-clouds i:nth-child(4) { left: 75%; top: 78%; animation-duration: 29s; }
.map-clouds i:nth-child(5) { left: -5%; top: 88%; animation-duration: 35s; opacity: .35; }
@keyframes drift { to { translate: 120px 30px; } }
.firefly { position: absolute; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: #fff6a8;
  box-shadow: 0 0 10px 3px rgba(255, 236, 120, .8); animation: fly 6s ease-in-out infinite; opacity: .8; }
@keyframes fly { 25% { translate: 14px -20px; opacity: .3; } 50% { translate: -10px -36px; opacity: 1; } 75% { translate: 8px -12px; opacity: .4; } }

.pnode { position: absolute; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.plat-ring { position: absolute; left: 0; top: 50%; translate: 0 -50%; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(62,224,255,.0), 0 0 24px rgba(62,224,255,.0); transition: box-shadow .2s; }
.pnode-ico { position: relative; margin-top: -78%; display: grid; place-items: end center; filter: drop-shadow(0 12px 10px rgba(0,0,0,.45)); transition: filter .2s, translate .2s; }
.pnode-ico img, .pnode-ico .art-fallback { width: 100%; height: 100%; object-fit: contain; font-size: 60px; }
.pnode-ico .check { position: absolute; right: 2%; bottom: 6%; width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: #17203f;
  font-weight: 900; display: grid; place-items: center; border: 3px solid #17203f; }
.pnode-lbl { position: absolute; top: 72%; white-space: nowrap; display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 99px;
  background: rgba(14,16,48,.82); border: 2px solid rgba(255,255,255,.2); font-weight: 900; font-size: 16px; pointer-events: none; }
.pnode-lbl b { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #1b1f4b; display: grid; place-items: center; font-size: 15px; }
.pnode.done .pnode-ico { filter: grayscale(.85) brightness(.75) drop-shadow(0 12px 10px rgba(0,0,0,.45)); }
.pnode.done .pnode-lbl { opacity: .75; }
.pnode.done:hover .pnode-ico { filter: drop-shadow(0 0 18px rgba(255,255,255,.6)); translate: 0 -6px; }
.pnode.done:hover .pnode-lbl { opacity: 1; }
.pnode.done:hover .plat-ring { box-shadow: 0 0 0 4px rgba(62,224,255,.7), 0 0 30px rgba(62,224,255,.8); }
.pnode.current .plat-ring { animation: ringPulse 1.3s ease-in-out infinite; }
@keyframes ringPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(182,242,58,.9), 0 0 30px rgba(182,242,58,.8); } 50% { box-shadow: 0 0 0 10px rgba(182,242,58,.35), 0 0 60px rgba(182,242,58,1); } }
.pnode.current .pnode-ico { animation: hopIco 1.4s ease-in-out infinite; }
@keyframes hopIco { 50% { translate: 0 -12px; } }
.pnode.current .pnode-lbl { border-color: var(--lime); color: var(--lime); font-size: 18px; }
.pnode .go { position: absolute; top: 100%; margin-top: 46px; padding: 8px 20px; border-radius: 14px; background: var(--lime); color: #17203f; font-weight: 900; font-size: 18px;
  box-shadow: 0 5px 0 #5f9a0c; animation: bob 1s ease-in-out infinite; white-space: nowrap; }
.pnode.locked { cursor: default; }
.pnode.locked .pnode-ico { filter: grayscale(1) brightness(.55) drop-shadow(0 12px 10px rgba(0,0,0,.45)); scale: .7; }
.pnode.locked .pnode-lbl { opacity: .55; }
.map-soon { position: absolute; left: 50%; top: 1.5%; translate: -50% 0; padding: 10px 20px; border-radius: 99px; background: rgba(14,16,48,.7);
  font-weight: 900; font-size: 18px; white-space: nowrap; border: 2px dashed rgba(255,255,255,.35); pointer-events: none; }
.map-pin { position: absolute; translate: -50% -100%; margin-top: -150px; display: flex; flex-direction: column; align-items: center; pointer-events: none;
  animation: pinBob 1.6s ease-in-out infinite; z-index: 3; }
@keyframes pinBob { 50% { margin-top: -162px; } }
.pin-face { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: linear-gradient(180deg, #4a4fc4, #2a2d7a); box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.pin-tail { width: 0; height: 0; border: 12px solid transparent; border-top: 16px solid #fff; margin-top: -2px; }
.sparkles { position: absolute; inset: -20% -25%; pointer-events: none; }
.sparkles i { position: absolute; font-style: normal; color: #fff6a8; text-shadow: 0 0 8px #ffd23e, 0 0 16px #b6f23a; animation: twinkleStar 2s ease-in-out infinite; }
@keyframes twinkleStar { 0%, 100% { opacity: 0; scale: .3; rotate: 0deg; } 50% { opacity: 1; scale: 1.2; rotate: 90deg; } }
.pnode.current .pnode-ico { filter: drop-shadow(0 0 18px rgba(182,242,58,.9)) drop-shadow(0 12px 10px rgba(0,0,0,.45)); }

/* ── успехи ── */
.res-h { margin: 12px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.res-missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.res-m { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.06); font-weight: 800; }
.rating { display: flex; justify-content: center; gap: 6px; font-size: 48px; line-height: 1; }
.rating span { color: rgba(255,255,255,.18); }
.rating span.on { color: var(--gold); text-shadow: 0 0 14px rgba(255,210,62,.7); }
.rating.small { font-size: 22px; gap: 2px; }
.grow { display: grid; gap: 8px; }
.grow-row { display: grid; grid-template-columns: 1fr 1.1fr 70px; gap: 12px; align-items: center; font-weight: 900; font-size: 17px; }
.gbar { height: 14px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--lime)); }
.grow-row b { color: var(--lime); text-align: right; }

.who .face:hover, .l-me:hover { box-shadow: 0 0 0 4px rgba(182,242,58,.6); }

/* выбор пола героя */
.gender-pick .gp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.gender-pick .gp { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 16px; border-radius: 24px; cursor: pointer;
  border: 3px solid rgba(255,255,255,.14); background: radial-gradient(80% 55% at 50% 88%, rgba(182,242,58,.22), transparent 70%), rgba(255,255,255,.06);
  color: #fff; font: 900 22px Nunito, sans-serif; transition: border-color .15s, background-color .15s, translate .15s; }
.gender-pick .gp:hover { border-color: var(--cyan); translate: 0 -3px; }
.gender-pick .gp-hero { position: relative; height: min(46vh, 380px); aspect-ratio: 512 / 768; }

/* ── эффекты коллекционных вещей ── */
.fx { position: absolute; pointer-events: none; z-index: 2; overflow: visible; }
.fx i { position: absolute; display: block; font-style: normal; }
.fx-stars i { color: #fff; text-shadow: 0 0 6px #9ad8ff, 0 0 12px #b48cff; animation: fxTwinkle 2.4s ease-in-out infinite; }
.fx-stars i:nth-child(3n) { color: #ffe27a; } .fx-stars i:nth-child(3n+1) { color: #9ad8ff; }
@keyframes fxTwinkle { 0%, 100% { opacity: 0; scale: .3; rotate: 0deg; } 45% { opacity: 1; scale: 1.15; } 70% { opacity: .8; rotate: 45deg; } }
.fx-sparkle i { width: 12px; height: 12px; background: radial-gradient(circle, #fff 0 18%, #ffe27a 30%, transparent 62%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: fxGlint 1.6s ease-in-out infinite; }
@keyframes fxGlint { 0%, 100% { opacity: 0; scale: .2; } 50% { opacity: 1; scale: 1.3; } }
.fx-fire i { width: 18%; aspect-ratio: 1; margin-left: -9%; border-radius: 50% 50% 45% 45%; mix-blend-mode: screen; filter: blur(2px);
  background: radial-gradient(circle at 50% 60%, #fff6b0 0 15%, #ffb02e 38%, rgba(255,70,20,.55) 62%, transparent 72%); animation: fxFlame 1.2s ease-in infinite; }
@keyframes fxFlame { 0% { opacity: 0; translate: 0 30%; scale: .6; } 25% { opacity: .95; } 100% { opacity: 0; translate: 0 -160%; scale: .15; } }
.fx-jet i { top: 0; width: 13%; height: 70%; margin-left: -6.5%; border-radius: 40% 40% 50% 50%; mix-blend-mode: screen; filter: blur(1.5px);
  background: linear-gradient(#fff6b0, #ffb02e 40%, rgba(255,60,20,.6) 75%, transparent); transform-origin: 50% 0; animation: fxJet .5s ease-out infinite; }
@keyframes fxJet { 0% { opacity: .2; scale: .6 .4; } 40% { opacity: 1; } 100% { opacity: 0; scale: 1 1.25; translate: 0 20%; } }
.fx-electric i { width: 30%; aspect-ratio: 1 / 1.6; animation: fxZap 3s steps(1) infinite;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 32'%3E%3Cpath d='M12 0 3 18h6l-3 14 11-20h-7z' fill='%23c9f6ff' stroke='%233ee0ff' stroke-width='1.5'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 4px #3ee0ff) drop-shadow(0 0 10px #3e8bff); }
@keyframes fxZap { 0%, 100% { opacity: 0; } 7% { opacity: 1; } 10% { opacity: .2; } 13% { opacity: 1; } 17% { opacity: 0; } }
.hero-body img.fx-glow-electric { animation: fxGlowBlue 1.8s ease-in-out infinite; }
.hero-body img.fx-glow-fire, .hero-body img.fx-glow-jet { animation: fxGlowFire 1.4s ease-in-out infinite; }
.hero-body img.fx-glow-stars { animation: fxGlowStar 2.6s ease-in-out infinite; }
.hero-body img.fx-glow-sparkle { animation: fxGlowGold 2s ease-in-out infinite; }
@keyframes fxGlowBlue { 50% { filter: drop-shadow(0 0 8px #3ee0ff) brightness(1.15); } }
@keyframes fxGlowFire { 50% { filter: drop-shadow(0 0 10px #ff8a2e) brightness(1.1); } }
@keyframes fxGlowStar { 50% { filter: drop-shadow(0 0 8px #b48cff) brightness(1.12); } }
@keyframes fxGlowGold { 50% { filter: drop-shadow(0 0 7px #ffd23e) brightness(1.1); } }
/* в магазине: эффект поверх миниатюры и метка «за достижение» */
.item .fx { inset: 18px 10px 40px; width: auto !important; height: auto !important; }
.item .ach { margin-top: 4px; font-size: 12px; font-weight: 900; color: #ffd23e; line-height: 1.15; }
.face-circle .fx { display: none; }

/* питомец в кабинете */
.hub-pet { position: absolute; right: 2%; bottom: 10px; width: 34%; max-width: 170px; z-index: 3; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.hub-pet img, .hub-pet .art-fallback { width: 100%; font-size: 90px; animation: petBob 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.hub-pet .pet-tag { margin-top: -6px; padding: 2px 10px; border-radius: 99px; background: rgba(14,16,48,.85); font-weight: 900; font-size: 14px; }
@keyframes petBob { 50% { translate: 0 -8px; } }
.pet-heart { position: fixed; z-index: 9000; font-size: 26px; pointer-events: none; }

/* перемотка и клон-тень */
.fx-rewind i { left: 50%; top: 50%; font-size: 26px; color: #9ff4ff; text-shadow: 0 0 10px #3ee0ff; animation: fxOrbit 4s linear infinite; transform-origin: 0 0; }
@keyframes fxOrbit { from { transform: rotate(0deg) translateX(95px) rotate(0deg); } to { transform: rotate(-360deg) translateX(95px) rotate(360deg); } }
.hero-body img.fx-glow-rewind { animation: fxGlowBlue 2.2s ease-in-out infinite; }
.hero-clone { opacity: .32; translate: -16% 2%; filter: hue-rotate(160deg) saturate(1.6) blur(.5px); animation-delay: -.6s !important; pointer-events: none; }

/* гостевой режим (?guest): «Выйти» заметнее, имя — вместо входа */
.top-btn.guest-out { background: rgba(255,154,46,.22); border-color: #ff9a2e; }
.top-btn.guest-out span:not(.ico) { display: inline; font-weight: 900; }
.guest-name { width: min(520px, 94vw); }
/* пропущенный урок (до урока «открыт всем») — цветной и нажимается, без искр */
.pnode.missed { cursor: pointer; }
.pnode.missed .pnode-ico { filter: drop-shadow(0 12px 10px rgba(0,0,0,.45)); }
.pnode.missed:hover .pnode-ico { translate: 0 -6px; }
.pnode.missed:hover .plat-ring { box-shadow: 0 0 0 4px rgba(255,210,62,.7), 0 0 30px rgba(255,210,62,.7); }
.pnode .go.missed-go { background: linear-gradient(180deg, #ffe680, #ffb81f); color: #2a1d00; font-size: 14px; }

/* ── урок 11: спина и спутник в гардеробе (живые карточки), дрон у булавки на карте ── */
.item .item-live { position: relative; width: 100%; aspect-ratio: 1; }
.item-none .none-ico { display: grid; place-items: center; width: 100%; aspect-ratio: 1; font-size: 54px; opacity: .55; }
.pin-buddy { position: absolute; left: 58px; top: -30px; width: 58px; height: 58px; pointer-events: none; }
