/* ════════════════════════════════════════════════════════════
   IRL: THE GAME — дневной цикл в комнате
   наследует токены/кнопки/колесо из style.css
   ════════════════════════════════════════════════════════════ */

.gbody {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 176, 82, .06), transparent 65%),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 70%);
}

/* ── HUD ─────────────────────────────────────────────────── */

.ghud {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: rgba(21, 13, 7, .92);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}

.ghud__brand img { width: 40px; display: block; filter: drop-shadow(0 0 8px rgba(46, 196, 182, .5)); transition: transform .25s; }
.ghud__brand:hover img { transform: rotate(-6deg) scale(1.1); }

.ghud__clock { display: flex; flex-direction: column; line-height: 1.15; }
.ghud__day { font-family: var(--f-pix); font-size: .68rem; color: var(--yellow); }
.ghud__time { font-family: var(--f-pix); font-size: 1rem; color: var(--cream); }

.ghud__bars { display: flex; gap: 12px; flex: 1; min-width: 260px; }

.gbar { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 150px; }
.gbar .ic { color: var(--c); width: 1.15em; height: 1.15em; filter: drop-shadow(0 0 5px var(--c)); flex: none; }

.gbar__track {
  flex: 1;
  height: 12px;
  background: rgba(241, 231, 214, .12);
  border: 2px solid rgba(241, 231, 214, .18);
  border-radius: 0;
  overflow: hidden;
}

.gbar__track i {
  display: block;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff));
  border-radius: 0;
  transition: width .5s cubic-bezier(.22, 1, .36, 1), background-color .3s;
}

.gbar__track i.low { animation: lowPulse 1s ease-in-out infinite; }

@keyframes lowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.ghud__f {
  font-family: var(--f-pix);
  font-size: .8rem;
  color: var(--teal);
  background: var(--ink);
  border: 2px solid rgba(46, 196, 182, .35);
  padding: 8px 12px;
  border-radius: 0;
}

.ghud__cash {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-pix);
  font-size: .95rem;
  color: var(--yellow);
  background: var(--ink);
  border: 2px solid rgba(255, 194, 26, .4);
  padding: 8px 14px;
  border-radius: 0;
}

.ghud__cash .ic { width: 1.2em; height: 1.2em; }
.ghud__cash.flash-up { animation: cashUp .6s ease; }
.ghud__cash.flash-down { animation: cashDown .6s ease; }

@keyframes cashUp { 30% { transform: scale(1.12); box-shadow: 0 0 18px rgba(82, 210, 115, .8); } }
@keyframes cashDown { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); box-shadow: 0 0 18px rgba(230, 64, 46, .8); } 70% { transform: translateX(-3px); } }

.ghud__menu { display: flex; gap: 8px; }

.gmini {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 231, 214, .08);
  color: var(--cream);
  border: 2px solid rgba(241, 231, 214, .3);
  border-radius: 0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: transform .15s, color .15s, border-color .15s, box-shadow .15s;
}

.gmini:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); color: var(--yellow); border-color: var(--yellow); }
.gmini:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .4); }

/* ── devnet-режим: бейдж и кошелёк (game.html?chain=devnet) ── */

.chainbadge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-arc);
  font-size: .68rem;
  letter-spacing: .05em;
  color: var(--pump, #52d273);
  border: 2px solid rgba(82, 210, 115, .45);
  padding: 7px 10px 4px;
  align-self: center;
}

.chainbadge i {
  width: 7px; height: 7px;
  background: #52d273;
  box-shadow: 0 0 8px #52d273;
  animation: chainPulse 2s ease-in-out infinite;
}

@keyframes chainPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.chainbtn {
  font-family: var(--f-arc);
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
  padding: 9px 13px 6px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  align-self: center;
}

.chainbtn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); }
.chainbtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .4); }
.chainbtn--on { background: #52d273; cursor: default; }
.gmini .ic { width: 1.3em; height: 1.3em; }

/* ── сцена ───────────────────────────────────────────────── */

.gmain {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  padding: 16px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

.scene-wrap {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card), inset 0 0 60px rgba(0, 0, 0, .25);
  background: #5b3a20;
  align-self: start;
}

.room-bg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

.tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 2;
}


#fan { animation: fanSpin 5s linear infinite; transform-origin: 0 0; }
@keyframes fanSpin { to { transform: rotate(360deg); } }

#crtScreen { transition: fill .8s; }

/* персонаж */
.char {
  position: absolute;
  left: 62%;
  bottom: 7%;
  width: clamp(78px, 8.8vw, 130px);
  transform: translateX(-50%) scale(var(--s, 1));   /* --s = псевдоглубина от WASD */
  transform-origin: 50% 100%;
  transition: left 1s cubic-bezier(.45, 0, .25, 1);
  z-index: 5;
  pointer-events: none;
}

/* спрайт Kenney Toon Characters (CC0): кадры перелистывает game.js */
.char__sprite {
  width: 100%;
  display: block;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .35));
  animation: idleBreath 3s ease-in-out infinite;   /* дыхание через margin — не трогает transform */
}

@keyframes idleBreath {
  0%, 100% { margin-top: 0; }
  50% { margin-top: 3px; }
}

.char.walking .char__sprite { animation: none; }
.char.flip .char__sprite { transform: scaleX(-1); }

/* лежит на кровати: спрайт повёрнут, голова к подушке (слева) */
.char--lying .char__sprite {
  transform: rotate(-67deg);   /* вдоль кровати: голова к изголовью у стены */
  transition: transform .6s ease;
}

/* бег на дорожке: спрайт спиной к камере, частые подскоки */
.char--run .char__sprite { animation: runBob .3s ease-in-out infinite; }

@keyframes runBob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -7px; }
}

/* жим лёжа: спрайт повёрнут вдоль скамьи (как на кровати), «штанга» ходит вверх-вниз */
.char--bench .char__sprite {
  transform: rotate(-62deg);
  animation: benchPress .64s ease-in-out infinite;
}

@keyframes benchPress {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}

/* сидит в джакузи: ноги под водой, покачивается на волнах */
.char--soak .char__sprite {
  clip-path: inset(0 0 30% 0);
  animation: soakBob 2.2s ease-in-out infinite;
}

.char--soak::after { display: none; }   /* тень под водой не нужна */

@keyframes soakBob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: 6px; }
}

/* картонная коробка в руках (поза hold — руки над головой) */
.char__carry {
  display: none;
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  width: 42%;
  aspect-ratio: 1.25;
  background: linear-gradient(180deg, #d7b078, #c99e63 55%);
  border: 3px solid rgba(36, 24, 18, .4);
  border-radius: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
  pointer-events: none;
}

.char__carry::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 20%;
  transform: translateX(-50%);
  background: #9a7440;
}

.char--carry .char__carry { display: block; }

.char::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%;
  bottom: -7px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .35), transparent 70%);
}

.char__bubble {
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  padding: 6px 12px;
  font-weight: 800;
  font-size: .85rem;
  white-space: nowrap;
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.char__bubble.show { transform: translateX(-50%) scale(1); }

/* хотспоты */
.spot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 6;
  color: var(--cream);
  font-family: var(--f-body);
}

.spot .ic {
  width: 46px; height: 46px;
  padding: 11px;
  background: rgba(21, 13, 7, .82);
  border: 3px solid var(--cream);
  border-radius: 0;
  color: var(--yellow);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), border-color .22s, color .22s;
  animation: spotPulse 2.6s ease-in-out infinite;
}

@keyframes spotPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 0 0 rgba(255, 194, 26, .5); }
  55% { box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 0 10px rgba(255, 194, 26, 0); }
}

.spot span {
  font-family: var(--f-arc);
  font-weight: 400;
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(21, 13, 7, .82);
  padding: 4px 9px 1px;
  border-radius: 0;
  border: 2px solid rgba(241, 231, 214, .25);
}

.spot:hover .ic { transform: scale(1.15) rotate(-5deg); border-color: var(--yellow); }
.spot:disabled { opacity: .35; cursor: not-allowed; }
.spot:disabled .ic { animation: none; }

.spot--done .ic { border-color: var(--green); color: var(--green); animation: none; }

/* ближайший к персонажу хотспот: подсветка + подсказка «E» */
.spot--near .ic {
  border-color: var(--yellow);
  color: #fff;
  transform: scale(1.16);
  animation: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 194, 26, .55);
}

.spot--near::before {
  content: 'E';
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-arc);
  font-size: .76rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 4px 7px 1px;
  animation: eBounce 1s ease-in-out infinite;
}

@keyframes eBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

/* ── изо-мебель: реакции ─────────────────────────────────── */

/* холодильник вздрагивает, когда его открывают */
.fridge-open image { animation: fridgeWobble .5s ease; transform-box: fill-box; transform-origin: 50% 100%; }

@keyframes fridgeWobble {
  25% { transform: rotate(-2.4deg); }
  60% { transform: rotate(1.8deg); }
}

/* одеяло и спинка кресла: вырезки из того же рендера комнаты */
.bed-blanket, .chair-front {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}

.bed-blanket { clip-path: polygon(35.1% 42.8%, 40.5% 46.6%, 31% 51.3%, 27.2% 47.6%); }
/* только силуэт спинки кресла — персонаж за ней, голова выше */
.chair-front { clip-path: polygon(52.7% 37.9%, 56.7% 37.9%, 57.3% 41.6%, 56.7% 45.4%, 53.1% 45.6%, 52.1% 41.6%); }

.bed-blanket.on, .chair-front.on { opacity: 1; }

/* еда: летит из холодильника и покусывается */
.fx__food {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  color: #b0642e;
  transition: left .55s cubic-bezier(.34, 1.2, .64, 1), bottom .55s cubic-bezier(.34, 1.2, .64, 1);
}

.fx__food .ic {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 2px 0 rgba(36, 24, 18, .5));
}

.fx__food.nibble { animation: foodNibble .28s ease-in-out infinite; }

@keyframes foodNibble {
  50% { transform: translateX(-50%) scale(.8) rotate(-12deg); }
}

.char--nibble .char__sprite { animation: nibbleBob .28s ease-in-out infinite; }

@keyframes nibbleBob {
  50% { transform: translateY(2.5%) scaleY(.97); }
}

/* ── живой декор и пасхалки ──────────────────────────────── */

.deco, .eggs { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.deco[hidden], .eggs[hidden] { display: none; }

.deco__glow { position: absolute; border-radius: 50%; }

.deco__glow--pc {
  left: 58.5%; top: 30%;
  width: 8%; height: 10%;
  background: radial-gradient(ellipse, rgba(46, 196, 182, .38), transparent 70%);
  animation: pcFlicker 3.4s steps(12) infinite;
}

@keyframes pcFlicker {
  0%, 100% { opacity: .8; }
  28% { opacity: .5; }
  52% { opacity: .9; }
  71% { opacity: .55; }
}



.deco__glow--wagmi {
  left: 65.5%; top: 24%;
  width: 14%; height: 12%;
  border-radius: 16px;
  background: radial-gradient(ellipse, rgba(46, 196, 182, .3), transparent 72%);
  animation: pcFlicker 2.6s steps(8) infinite;
}

/* кот: живёт у ковра, мигает хвостом, кликабелен */
.deco__cat {
  position: absolute;
  left: 28%; bottom: 26%;
  width: 6%;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .3));
  transition: transform .18s;
}

.deco__cat:hover { transform: scale(1.08); }

/* прогресс-декор: появляется с апгрейдами */
.deco__prog { position: absolute; display: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.deco--u1 .deco__prog--golddoge { display: block; left: 7.5%; top: 27%; width: 4.6%; transform: skewY(-14deg); }
.deco--u2 .deco__prog--trophy { display: block; left: 28.9%; top: 26.8%; width: 3.4%; }
.deco--gym .deco__prog--dumb { display: block; left: 39%; top: 66%; width: 7.5%; }

/* пасхалки: невидимые клик-зоны */
.egg {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

/* ── FX-слой: частицы, всплывающие числа, затемнение ─────── */

.fx {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}

.fx__text {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--f-pix);
  font-size: .82rem;
  text-shadow: 2px 2px 0 var(--ink);
  animation: fxRise 1.5s ease-out forwards;
}

.fx__text--zzz {
  color: #8db9ff;
  font-size: 1rem;
  animation: fxRise 1.6s ease-out forwards;
}

@keyframes fxRise {
  0% { opacity: 0; translate: 0 14px; }
  15% { opacity: 1; }
  100% { opacity: 0; translate: 0 -80px; }
}

.fx__p {
  position: absolute;
  width: 28px;
  height: 28px;
  animation: fxPop 1.8s ease-out forwards;
  opacity: 0;
}

.fx__p .ic {
  width: 100%;
  height: 100%;
  color: #fff;
  filter: drop-shadow(2px 2px 0 rgba(36, 24, 18, .55));
}

@keyframes fxPop {
  0% { opacity: 0; transform: translate(0, 12px) scale(.35) rotate(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 24px), -100px) scale(1.1) rotate(18deg); }
}

.fx__drop {
  position: absolute;
  width: 7px;
  height: 11px;
  border-radius: 50% 50% 60% 60%;
  background: #8fc7e8;
  border: 2px solid rgba(36, 24, 18, .5);
  animation: fxFall 1s ease-in forwards;
  opacity: 0;
}

@keyframes fxFall {
  0% { opacity: 0; translate: 0 -8px; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: 0 70px; }
}

.fx__away {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
  animation: awayIn .35s cubic-bezier(.22, 1.4, .36, 1);
}

.fx__away .ic {
  width: 2em;
  height: 2em;
  color: #a0642e;
  animation: awayPulse .8s ease-in-out infinite;
}

.fx__away.out { animation: awayOut .35s ease forwards; }

@keyframes awayIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } }
@keyframes awayOut { to { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
@keyframes awayPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18) rotate(-6deg); } }

.night-fade {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(8, 4, 2, .75), rgba(8, 4, 2, .96));
  opacity: 0;
  transition: opacity .9s ease;
}

.night-fade.on { opacity: 1; }

.keys-hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 8;
  font-family: var(--f-pix);
  font-size: .55rem;
  letter-spacing: .06em;
  color: rgba(241, 231, 214, .75);
  background: rgba(21, 13, 7, .72);
  border: 2px solid rgba(241, 231, 214, .2);
  border-radius: 0;
  padding: 7px 11px;
}

.keys-hint b { color: var(--yellow); }

@media (pointer: coarse) {
  .keys-hint { display: none; }
}

/* тосты */
.toasts {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  max-width: 320px;
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(241, 231, 214, .97);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  animation: toastIn .45s cubic-bezier(.22, 1.4, .36, 1);
  font-size: .85rem;
}

.toast.out { animation: toastOut .4s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.9); } }

.toast .ic { width: 1.6em; height: 1.6em; flex: none; color: var(--blue); }
.toast b { display: block; font-size: .8rem; }
.toast p { margin: 0; line-height: 1.3; }

/* ── док справа ──────────────────────────────────────────── */

.dock { display: flex; flex-direction: column; gap: 14px; }

.dock__card {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}

.dock__title { font-family: var(--f-arc); font-weight: 400; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.dock__title small { font-family: var(--f-body); font-weight: 700; font-size: .72rem; text-transform: none; color: rgba(36, 24, 18, .5); letter-spacing: 0; }

.plan { list-style: none; margin: 0; padding: 0; }

.plan li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: .9rem;
  padding: 6px 8px;
  border-radius: 0;
  color: rgba(36, 24, 18, .75);
}

.plan li .ic { width: 1.25em; height: 1.25em; color: #a0642e; }

.plan li.done { background: #d9f2db; color: #1d6b28; text-decoration: line-through; }
.plan li.done .ic { color: #1d6b28; }

.plan__hint { margin: 12px 0 0; font-size: .8rem; color: rgba(36, 24, 18, .6); text-align: center; }
.formula--mini { font-size: .58rem; padding: 6px 10px; margin-top: 6px; }

.goal { font-size: 1rem; font-weight: 800; margin: 0 0 8px; }
.goal b { font-family: var(--f-pix); font-size: .95rem; color: #1d6b28; }

.goal__track {
  height: 14px;
  background: #e4d7bd;
  border: 2px solid var(--ink);
  border-radius: 0;
  overflow: hidden;
}

.goal__track i {
  display: block;
  height: 100%;
  width: 3%;
  background: linear-gradient(90deg, var(--pump), #2fae54);
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
}

.goal__sub { margin: 8px 0 0; font-size: .76rem; color: rgba(36, 24, 18, .55); }

.dock__card--log { flex: 1; min-height: 120px; display: flex; flex-direction: column; }

.log { flex: 1; overflow-y: auto; max-height: 240px; font-size: .82rem; display: flex; flex-direction: column; gap: 5px; }

.log p { margin: 0; padding: 5px 8px; border-radius: 0; background: rgba(36, 24, 18, .05); animation: logIn .3s ease; }
.log p b { color: #a0642e; }
.log p.good { background: #d9f2db; }
.log p.bad { background: #ffd9d3; }

@keyframes logIn { from { opacity: 0; transform: translateY(-6px); } }

/* ── модалки ─────────────────────────────────────────────── */

.gmodal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 8, 4, .72);
  backdrop-filter: blur(4px);
  padding: 20px;
  animation: modalFade .25s ease;
}

.gmodal[hidden] { display: none; }

@keyframes modalFade { from { opacity: 0; } }

.gmodal__box {
  position: relative;
  width: min(480px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  animation: modalPop .35s cubic-bezier(.22, 1.4, .36, 1);
}

@keyframes modalPop { from { opacity: 0; transform: scale(.85) translateY(24px); } }

.gmodal__box--big { width: min(560px, 94vw); }

.gmodal__x {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  font-weight: 900;
  color: rgba(36, 24, 18, .5);
  cursor: pointer;
  line-height: 1;
}

.gmodal__x:hover { color: var(--red); }

/* карточки-действия внутри модалки */
.acard {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(36, 24, 18, .22);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: var(--f-body);
  transition: transform .13s ease-out, box-shadow .13s ease-out;
}

.acard:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(36, 24, 18, .3); }
.acard:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(36, 24, 18, .3); }
.acard:disabled { opacity: .45; cursor: not-allowed; }

.acard .ic { width: 2.2em; height: 2.2em; flex: none; color: var(--c, #a0642e); }

.acard b { display: block; font-size: .98rem; }
.acard small { display: block; color: rgba(36, 24, 18, .6); font-size: .8rem; line-height: 1.35; }

.acard__cost {
  margin-left: auto;
  text-align: right;
  flex: none;
  font-family: var(--f-pix);
  font-size: .62rem;
  color: rgba(36, 24, 18, .7);
  line-height: 1.7;
}

.acard__cost .money { color: #a12318; }
.acard__cost .gain { color: #1d6b28; }

.acard--owned { background: #d9f2db; }
.acard--owned .acard__cost { color: #1d6b28; }

/* ── трейдинг-терминал ───────────────────────────────────── */

/* hidden-атрибут сильнее классовых display:flex внутри терминала */
.gmodal--trade [hidden] { display: none !important; }

.gmodal__box--trade {
  width: min(640px, 96vw);
  background: linear-gradient(180deg, #10151c, #0a0e13);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 0 0 0 4px rgba(46, 196, 182, .25), 0 30px 60px rgba(0, 0, 0, .6);
  padding: 20px 22px;
  color: var(--cream);
}

.trade__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.trade__pair { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.trade__pair img { width: 30px; filter: drop-shadow(0 0 6px rgba(46, 196, 182, .6)); }

.trade__feed {
  font-family: var(--f-pix);
  font-size: .5rem;
  color: #52d273;
  border: 2px solid rgba(82, 210, 115, .4);
  border-radius: 0;
  padding: 4px 8px;
  animation: feedBlink 1.6s steps(2) infinite;
}

@keyframes feedBlink { 50% { opacity: .55; } }

.trade__quote { display: flex; align-items: baseline; gap: 10px; }
.trade__price { font-family: var(--f-pix); font-size: 1.05rem; color: var(--cream); }
.trade__delta { font-family: var(--f-pix); font-size: .68rem; }
.trade__delta.up { color: #52d273; }
.trade__delta.down { color: #ff7a68; }

.trade__meta { margin: 0 0 12px; font-size: .85rem; color: rgba(241, 231, 214, .7); }
.trade__meta b { color: var(--yellow); font-family: var(--f-pix); font-size: .72rem; }
.trade__hint { display: block; margin-top: 4px; font-size: .78rem; color: rgba(241, 231, 214, .5); }

.trade__chartwrap {
  position: relative;
  border: 2px solid rgba(46, 196, 182, .25);
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(46, 196, 182, .07), transparent 70%),
    #0b1117;
}

#tChart { display: block; width: 100%; height: 280px; }

.trade__pnl {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(10, 14, 19, .85);
  border: 2px solid rgba(241, 231, 214, .18);
  border-radius: 0;
  padding: 6px 12px;
}

.trade__pnl small { font-size: .62rem; letter-spacing: .1em; color: rgba(241, 231, 214, .55); }
.trade__pnl b { font-family: var(--f-pix); font-size: .85rem; }
.trade__pnl.up b { color: #52d273; }
.trade__pnl.down b { color: #ff7a68; }

.trade__event {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  font-family: var(--f-paint);
  font-size: 2rem;
  color: #ffd76a;
  -webkit-text-stroke: 8px var(--ink);
  paint-order: stroke fill;
  animation: eventPop .5s cubic-bezier(.22, 1.6, .36, 1), eventGlow .9s ease-in-out infinite alternate;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes eventPop { from { transform: translate(-50%, -50%) rotate(-5deg) scale(.3); opacity: 0; } }
@keyframes eventGlow { from { filter: drop-shadow(0 0 6px rgba(255, 215, 106, .5)); } to { filter: drop-shadow(0 0 22px rgba(255, 215, 106, .9)); } }

.trade__endgame {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(90deg, #ffe9ad, #ffd76a);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 5px 10px;
  animation: endgameGlow 1.6s ease-in-out infinite;
}

.trade__endgame .ic { width: 1.2em; height: 1.2em; }

.trade__btns { display: flex; gap: 12px; margin-top: 14px; }

.tbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px;
  border-radius: 0;
  border: 3px solid var(--ink);
  cursor: pointer;
  font-family: var(--f-body);
  color: var(--ink);
  transition: transform .13s ease-out, box-shadow .13s ease-out, filter .13s;
}

.tbtn b { font-family: var(--f-arc); font-weight: 400; font-size: 1.05rem; letter-spacing: .05em; }
.tbtn small { font-size: .72rem; font-weight: 700; opacity: .75; }

.tbtn--long { background: #3fbf60; box-shadow: 4px 4px 0 #1d6b28; }
.tbtn--short { background: #f05540; box-shadow: 4px 4px 0 #8f1d10; }

.tbtn:hover { transform: translate(-2px, -2px); filter: brightness(1.06); }
.tbtn--long:hover { box-shadow: 6px 6px 0 #1d6b28; }
.tbtn--short:hover { box-shadow: 6px 6px 0 #8f1d10; }
.tbtn:active { transform: translate(3px, 3px); }
.tbtn--long:active { box-shadow: 1px 1px 0 #1d6b28; }
.tbtn--short:active { box-shadow: 1px 1px 0 #8f1d10; }
.tbtn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.trade__close { margin-top: 14px; width: 100%; justify-content: center; }
.trade__leave { margin-top: 10px; width: 100%; justify-content: center; }

.trade__result {
  margin-top: 14px;
  text-align: center;
  border-radius: 0;
  border: 3px solid var(--ink);
  padding: 12px 14px;
  font-weight: 800;
  animation: modalPop .35s cubic-bezier(.22, 1.4, .36, 1);
}

.trade__result b { font-family: var(--f-pix); font-size: .95rem; display: block; margin-bottom: 4px; }
.trade__result span { font-size: .8rem; opacity: .8; }
.trade__result.win { background: #d9f2db; color: #1d6b28; }
.trade__result.loss { background: #ffd9d3; color: #a12318; }
.trade__result.crazy { background: linear-gradient(90deg, #ffe9ad, #ffd76a); color: var(--ink); }

/* ── гардероб ────────────────────────────────────────────── */

.skins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.skincard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(36, 24, 18, .22);
  padding: 14px 10px 10px;
  cursor: pointer;
  font-family: var(--f-body);
  transition: transform .13s ease-out, box-shadow .13s ease-out;
}

.skincard:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(36, 24, 18, .3); }
.skincard:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(36, 24, 18, .3); }
.skincard img { height: 84px; image-rendering: auto; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
.skincard b { font-size: .92rem; }
.skincard small { font-size: .72rem; color: rgba(36, 24, 18, .6); text-align: center; line-height: 1.3; }

.skincard--active { background: #d9f2db; border-color: #1d6b28; }
.skincard--active b { color: #1d6b28; }

.skincard--locked img { filter: grayscale(1) brightness(.82) drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); opacity: .9; }
.skincard img.pix { image-rendering: pixelated; }
.char--pixel img { image-rendering: pixelated; }
.skincard--locked b { color: rgba(36, 24, 18, .55); }

.skincard__price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 0;
  background: #241812;
  color: #ffc21a;
  font-family: var(--f-arc);
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .05em;
}

.skincard__price svg { width: 11px; height: 11px; }
.skincard__price--owned { background: transparent; border: 1.5px dashed #1d6b28; color: #1d6b28; }

/* ── сводка дня / интро ──────────────────────────────────── */

.sum__title {
  font-family: var(--f-paint);
  font-size: 1.7rem;
  text-align: center;
  color: #fff;
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  margin: 0 0 14px;
}

.sum__rows { margin: 0 0 14px; }

.sum__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 2px dotted rgba(36, 24, 18, .2);
  font-size: .92rem;
}

.sum__row b { font-family: var(--f-pix); font-size: .72rem; }
.sum__row .up { color: #1d6b28; }
.sum__row .down { color: #a12318; }

.intro p { font-size: .95rem; line-height: 1.5; }
.intro ul { padding-left: 0; list-style: none; }

.intro li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: .92rem;
}

.intro li .ic { width: 1.5em; height: 1.5em; flex: none; color: #a0642e; margin-top: 2px; }

.gmodal .btn { width: 100%; justify-content: center; margin-top: 6px; }
.gmodal .btn + .btn { margin-top: 10px; }

/* ghost-кнопка на светлой «бумаге»: кремовый текст лендинга там не читается */
.panel .btn--ghost {
  color: var(--ink);
  border-color: rgba(36, 24, 18, .6);
  box-shadow: 5px 5px 0 rgba(36, 24, 18, .28);   /* диагональ, как у всех кнопок */
}

.panel .btn--ghost:hover { background: rgba(36, 24, 18, .08); box-shadow: 7px 7px 0 rgba(36, 24, 18, .28); }
.panel .btn--ghost:active { box-shadow: 1px 1px 0 rgba(36, 24, 18, .28); }

/* ── адаптив ─────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .gmain { grid-template-columns: 1fr; }
  .dock { flex-direction: row; flex-wrap: wrap; }
  .dock__card { flex: 1 1 240px; }
}

@media (max-width: 760px) {
  .ghud { gap: 10px; }
  .ghud__bars { order: 10; width: 100%; max-width: none; }
  .gbar { max-width: none; }
  /* на узком экране сцена сжимается и подписи спотов наезжают друг на друга:
     оставляем текст только у ближайшего, остальные — иконка + палец */
  .spot span { display: none; }
  .spot--near span,
  .spot:active span { display: block; font-size: .6rem; }
  .spot .ic { width: 34px; height: 34px; padding: 7px; border-width: 2px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .45); }
  .spot--ask .ask { font-size: 1.3rem; -webkit-text-stroke-width: 4px; }
  .char { bottom: 5%; width: clamp(56px, 17vw, 82px); }
}

/* совсем узкие телефоны: иконки ещё мельче, чтобы не тесниться в комнате */
@media (max-width: 400px) {
  .spot .ic { width: 28px; height: 28px; padding: 6px; }
  .spot--ask .ask { font-size: 1.1rem; -webkit-text-stroke-width: 3px; }
  .char { width: clamp(50px, 15vw, 66px); }
}

/* ── табы активов в терминале (правка менеджера 18.08) ── */
.trade__pairs { display: flex; gap: 8px; margin: 10px 0 2px; }

.tpair {
  font-family: var(--f-pix);
  font-size: .58rem;
  color: rgba(241, 231, 214, .55);
  background: rgba(46, 196, 182, .06);
  border: 2px solid rgba(46, 196, 182, .25);
  padding: 7px 10px 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.tpair:hover:not(:disabled) { color: var(--cream); border-color: var(--teal); }
.tpair--on { color: var(--teal); border-color: var(--teal); background: rgba(46, 196, 182, .14); }
.tpair:disabled { opacity: .45; cursor: default; }

/* ── цветомузыка на яхте: мягкие блики пульсируют на палубе,
   ровно там, где в рендере нарисованы световые пятна прожекторов ── */
.deco__strobe {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  filter: blur(7px);
  opacity: 0;
}

.deco__strobe--pink {
  left: 60%; top: 45%; width: 11%; height: 9%;
  background: radial-gradient(ellipse, rgba(255, 46, 168, .5), transparent 70%);
  animation: strobe 2.6s ease-in-out infinite;
}

.deco__strobe--teal {
  left: 69%; top: 43%; width: 10%; height: 8%;
  background: radial-gradient(ellipse, rgba(46, 196, 182, .45), transparent 70%);
  animation: strobe 2.6s ease-in-out .87s infinite;
}

.deco__strobe--gold {
  left: 63%; top: 50%; width: 10%; height: 8%;
  background: radial-gradient(ellipse, rgba(255, 194, 26, .4), transparent 70%);
  animation: strobe 2.6s ease-in-out 1.73s infinite;
}

@keyframes strobe {
  0%, 100% { opacity: .15; transform: scale(.92); }
  50% { opacity: .85; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .deco__strobe { animation: none; opacity: .35; }
}


/* ── перекур по фазам: руки поднимает СМЕНА КАДРА (idle→hold),
   сигарета переезжает из опущенной кисти к рту с transition ── */
.char__cig {
  display: none;
  position: absolute;
  right: 13.5%;                    /* в опущенной кисти idle; огонёк вниз-наружу */
  top: 74.5%;
  width: 22%;
  height: 3%;
  background: #f1e7d6;
  border: 1px solid rgba(36, 24, 18, .4);
  transform: rotate(35deg);        /* вниз-наружу, огонёк вниз */
  transition: right .3s ease, top .3s ease, transform .3s ease, width .3s ease;
  z-index: 3;
}

.char--smoke .char__cig { display: block; }

/* затяжка: кадр hold (руки у груди), сигарета у рта */
.char--drag .char__cig {
  /* затяжка: сигарета ТОРЧИТ ИЗО РТА вверх-наружу (мульт-канон),
     огонёк на свободном конце — рука её не «держит за огонь» */
  right: 7.4%;
  top: 52.6%;
  transform: rotate(-12deg);
}

/* пиксельные скины: голова крупнее, рот заметно выше — своя посадка */
.char--pixel.char--drag .char__cig {
  right: 10%;
  top: 42.3%;
}

.char__cig::after {
  content: '';
  position: absolute;
  right: -8%;                      /* огонёк на дальнем от кисти конце */
  top: -14%;
  width: 18%;
  height: 128%;
  background: #b5502a;             /* тлеет тускло */
  transition: background .25s, box-shadow .25s;
}

.char--drag .char__cig::after {
  background: #ffb054;             /* разгорается на затяжке */
  box-shadow: 0 0 8px rgba(255, 143, 46, .95);
}

/* облачко дыма: всплывает от кончика сигареты и тает */
.fx__puff {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 228, 224, .8), rgba(228, 228, 224, 0) 72%);
  pointer-events: none;
  animation: puffUp 1.5s ease-out forwards;
  z-index: 6;
}

@keyframes puffUp {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  20% { opacity: .85; }
  100% { opacity: 0; transform: translate(9px, -46px) scale(2.1); }
}


/* ── RPG-маркер разговора: золотой «?» парит над головой NPC ── */
.spot--ask .ask {
  font-family: var(--f-arc);
  font-style: normal;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 10px rgba(255, 194, 26, .45));
  animation: askBob 1.7s ease-in-out infinite;
}

@keyframes askBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.06); }
}

.spot--ask span { opacity: 0; transition: opacity .2s; }
.spot--ask:hover span, .spot--ask.spot--near span { opacity: 1; }
.spot--ask:hover .ask, .spot--ask.spot--near .ask { color: #ffd75e; }

/* скрытый спот (поговорили сегодня) не должен воскресать через display:flex */
.spot[hidden] { display: none !important; }
