/* ===== Собутыльник v2 — бар «У Васи» ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --drunk: 0;            /* 0..1 — степень опьянения (промилле / 3.6), управляет всем */
    --amber: #FFB347;
    --amber-deep: #E8821A;
    --neon: #FFD9A0;
    --text: #F3E9D2;
    --muted: #C9A06A;
    --dim: #6B5A40;
    --green: #7CF237;
    --red: #EF4444;
    --wood-1: #4a2f17;
    --wood-2: #2f1d0e;
    --panel: rgba(34, 23, 13, 0.88);
    --line: rgba(255, 160, 60, 0.2);
}
html, body { height: 100%; }
body {
    font-family: 'Geologica', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 122, 0, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(124, 242, 55, 0.06), transparent),
        linear-gradient(160deg, #14100B 0%, #1E150C 45%, #120D08 100%);
    background-color: #14100B;
    min-height: 100vh;
    overflow-x: hidden;
}
body::before { /* кирпичная кладка */
    content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0.06;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 38px, #000 38px 41px),
        repeating-linear-gradient(90deg, transparent 0 78px, #000 78px 81px);
}
.hidden { display: none !important; }

.room { max-width: 1120px; margin: 0 auto; padding: 24px 16px 16px; position: relative; }

/* ===== Шапка: неоновая вывеска ===== */
.top { text-align: center; margin-bottom: 18px; }
.neon {
    font-family: 'Rubik Mono One', monospace;
    font-size: clamp(1.5rem, 5.2vw, 3.2rem);
    letter-spacing: 0.08em; color: var(--neon);
    text-shadow: 0 0 6px rgba(255,170,60,.9), 0 0 18px rgba(255,140,30,.7), 0 0 42px rgba(255,110,0,.5), 0 0 80px rgba(255,110,0,.3);
    animation: neon-flicker 6s infinite; user-select: none;
}
.neon .tipsy { display: inline-block; transform: rotate(7deg) translateY(3px); animation: tipsy-letter 3.2s ease-in-out infinite; }
@keyframes tipsy-letter { 0%,100% { transform: rotate(7deg) translateY(3px); } 50% { transform: rotate(14deg) translateY(6px); } }
@keyframes neon-flicker {
    0%, 100% { opacity: 1; } 3% { opacity: .6; } 4% { opacity: 1; }
    43% { opacity: .4; } 44% { opacity: 1; } 45% { opacity: .7; } 46% { opacity: 1; }
    78% { opacity: .85; } 79% { opacity: 1; }
}
.tagline { margin-top: 8px; font-size: 1rem; color: var(--muted); }
.tagline .fromtech { color: var(--green); font-weight: 600; text-shadow: 0 0 12px rgba(124,242,55,.5); }

/* ===== Раскладка ===== */
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .bar { grid-template-columns: minmax(0, 1fr); } }

/* ===== Сцена ===== */
.scene {
    position: relative; overflow: hidden; border-radius: 24px;
    min-height: 520px; padding: 18px 16px 0;
    background:
        radial-gradient(ellipse 60% 45% at 50% 38%, rgba(255,150,40,.16), transparent 70%),
        linear-gradient(180deg, rgba(46,32,18,.85), rgba(28,19,11,.92));
    border: 1px solid var(--line);
    box-shadow: 0 8px 32px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,200,120,.08);
    display: flex; flex-direction: column; align-items: center;
}
/* «пьяное зрение»: вся сцена плывёт, чем пьянее — тем сильнее */
.scene-inner { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; flex: 1; transform-origin: 50% 70%; }
.room[data-stage="buzzed"] .scene-inner,
.room[data-stage="drunk"] .scene-inner,
.room[data-stage="wasted"] .scene-inner,
.room[data-stage="blackout"] .scene-inner { animation: room-sway calc(9s - var(--drunk) * 4s) ease-in-out infinite; }
@keyframes room-sway {
    0%, 100% { transform: rotate(calc(var(--drunk) * -1.8deg)) translateX(calc(var(--drunk) * -8px)); }
    50% { transform: rotate(calc(var(--drunk) * 1.8deg)) translateX(calc(var(--drunk) * 8px)); }
}
.room[data-stage="drunk"] .scene-inner,
.room[data-stage="wasted"] .scene-inner { filter: blur(calc((var(--drunk) - 0.35) * 1.3px)); }

/* полка с бутылками на стене */
.shelf { position: absolute; top: 14px; left: 0; right: 0; height: 64px; display: flex; justify-content: space-between; padding: 0 22px; pointer-events: none; opacity: .55; }
.shelf::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 6px; border-radius: 3px; background: linear-gradient(180deg, #5b3b21, #2f1d0e); }
.shelf-group { display: flex; align-items: flex-end; gap: 6px; }
.shelf-bottle { width: 14px; border-radius: 4px 4px 3px 3px; position: relative; background: var(--c, #3a5a3a); box-shadow: inset -3px 0 4px rgba(0,0,0,.35); }
.shelf-bottle::before { content: ''; position: absolute; left: 4px; top: -10px; width: 6px; height: 11px; background: inherit; border-radius: 2px; }

/* неоновый баннер тоста */
.toast-banner {
    position: absolute; top: 70px; left: 50%; z-index: 20; max-width: 92%;
    transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; text-align: center;
    font-family: 'Rubik Mono One', monospace; font-size: clamp(1rem, 3.4vw, 1.6rem); line-height: 1.25;
    color: #fff4d6; padding: 10px 18px; border-radius: 14px; border: 2px solid rgba(255,190,90,.8);
    background: rgba(30,18,8,.72);
    text-shadow: 0 0 8px rgba(255,170,60,.9), 0 0 22px rgba(255,120,0,.7);
    box-shadow: 0 0 18px rgba(255,150,40,.5), inset 0 0 14px rgba(255,150,40,.25);
}
.toast-banner.show { animation: toast-in 3.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes toast-in {
    0% { opacity: 0; transform: translateX(-50%) scale(.5) rotate(-4deg); }
    12% { opacity: 1; transform: translateX(-50%) scale(1.08) rotate(2deg); }
    22% { transform: translateX(-50%) scale(1) rotate(-1deg); }
    80% { opacity: 1; transform: translateX(-50%) scale(1) rotate(-1deg); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(.95); }
}

/* ===== Вася ===== */
.vasya-wrap { position: relative; width: 280px; height: 300px; margin-top: 56px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.spotlight { position: absolute; bottom: 6px; width: 220px; height: 26px; border-radius: 50%; background: rgba(255,150,40,.14); filter: blur(6px); }
.vasya {
    position: relative; width: 220px; height: 240px; transform-origin: 50% 90%;
    animation: idle-sway calc(5s - var(--drunk) * 2.5s) ease-in-out infinite;
}
.vasya.ghost { position: absolute; top: 30px; left: 30px; opacity: 0; pointer-events: none; z-index: -1; filter: saturate(.6); }
.room[data-stage="drunk"] .vasya.ghost,
.room[data-stage="wasted"] .vasya.ghost,
.room[data-stage="blackout"] .vasya.ghost { opacity: calc(var(--drunk) * 0.3); animation: ghost-drift 4s ease-in-out infinite; }
@keyframes ghost-drift { 0%,100% { transform: translate(calc(var(--drunk) * 16px), 2px) rotate(2deg); } 50% { transform: translate(calc(var(--drunk) * -12px), -3px) rotate(-3deg); } }
@keyframes idle-sway {
    0%, 100% { transform: rotate(calc(-1deg - var(--drunk) * 4deg)); }
    50% { transform: rotate(calc(1deg + var(--drunk) * 4deg)); }
}
.vasya.speaking { animation: speak-sway calc(1.1s - var(--drunk) * .3s) ease-in-out infinite; }
@keyframes speak-sway {
    0%, 100% { transform: rotate(calc(-2deg - var(--drunk) * 3deg)) translateY(0); }
    50% { transform: rotate(calc(2deg + var(--drunk) * 3deg)) translateY(-3px); }
}
.vasya.singing { animation: sing-bob .46s ease-in-out infinite; }
@keyframes sing-bob { 0%,100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-6px); } }
.vasya.asleep { animation: none; transform: rotate(-18deg) translate(-10px, 40px); transition: transform 1.4s cubic-bezier(.5,0,.3,1); }

/* шапка-ушанка */
.hat { position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(calc(-4deg - var(--drunk) * 10deg)); width: 150px; height: 60px; z-index: 4; transition: transform .6s ease; }
.hat-body { position: absolute; top: 14px; left: 0; width: 150px; height: 44px; border-radius: 70px 70px 30px 30px; background: linear-gradient(180deg,#5b3b21,#3c2614); box-shadow: inset 0 -6px 10px rgba(0,0,0,.4); }
.hat-fur { position: absolute; top: 6px; left: 8px; width: 134px; height: 26px; border-radius: 40px; background: repeating-linear-gradient(95deg,#cdb18b 0 6px,#b9966c 6px 12px); }
.hat-star { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: #c0392b; font-size: 16px; z-index: 5; }

.head {
    position: absolute; top: 36px; left: 50%; transform: translateX(-50%);
    width: 180px; height: 180px; border-radius: 46% 46% 48% 48%;
    background:
        radial-gradient(circle at 50% 120%, rgba(255,120,80, calc(.12 + var(--drunk) * .45)), transparent 55%),
        linear-gradient(160deg, #f1c9a0, #e3a878);
    box-shadow: inset -10px -14px 26px rgba(150,80,40,.35), inset 8px 8px 16px rgba(255,230,200,.4), 0 14px 30px rgba(0,0,0,.45);
}
.ears { position: absolute; top: 84px; width: 100%; }
.ear { position: absolute; width: 26px; height: 34px; border-radius: 50%; background: linear-gradient(160deg,#edb98e,#d99a68); box-shadow: inset -3px -3px 6px rgba(150,80,40,.4); }
.ear-l { left: -10px; } .ear-r { right: -10px; }

.brow { position: absolute; top: 56px; width: 44px; height: 10px; border-radius: 8px; background: #6b4423; transition: transform .25s ease; }
.brow-l { left: 30px; transform: rotate(6deg); }
.brow-r { right: 30px; transform: rotate(-6deg); }
.vasya.listening .brow-l { transform: translateY(-9px) rotate(-4deg); }
.vasya.listening .brow-r { transform: translateY(-9px) rotate(4deg); }
.vasya.speaking .brow-l { transform: translateY(-2px) rotate(9deg); }
.vasya.speaking .brow-r { transform: translateY(-2px) rotate(-9deg); }
.vasya.singing .brow-l { transform: translateY(-10px) rotate(-8deg); }
.vasya.singing .brow-r { transform: translateY(-10px) rotate(8deg); }

.eye { position: absolute; top: 70px; width: 42px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #e9dcc8); overflow: hidden; box-shadow: inset 0 3px 6px rgba(120,70,40,.3); }
.eye-l { left: 30px; } .eye-r { right: 30px; }
.pupil { position: absolute; top: 12px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: #3a2a1a; transform: translateX(-50%); transition: transform .3s ease; }
.pupil::after { content: ''; position: absolute; top: 3px; left: 3px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.85); }
/* пьяные глаза разъезжаются в разные стороны */
.room[data-stage="drunk"] .eye-l .pupil, .room[data-stage="wasted"] .eye-l .pupil { animation: wander-l 3.4s ease-in-out infinite; }
.room[data-stage="drunk"] .eye-r .pupil, .room[data-stage="wasted"] .eye-r .pupil { animation: wander-r 2.9s ease-in-out infinite; }
@keyframes wander-l { 0%,100% { transform: translate(-50%,0); } 30% { transform: translate(-90%,3px); } 70% { transform: translate(-20%,-2px); } }
@keyframes wander-r { 0%,100% { transform: translate(-50%,0); } 40% { transform: translate(-5%,4px); } 75% { transform: translate(-70%,1px); } }
.eye::before { content: ''; position: absolute; inset: 0; opacity: calc(var(--drunk) * .85);
    background: radial-gradient(circle at 20% 60%, rgba(220,60,40,.5), transparent 30%), radial-gradient(circle at 80% 40%, rgba(220,60,40,.5), transparent 30%); }
.lid { position: absolute; left: -2px; right: -2px; top: 0; height: calc(18% + var(--drunk) * 45%); background: linear-gradient(180deg,#e3a878,#d99a68); border-radius: 0 0 4px 4px; box-shadow: 0 2px 3px rgba(120,70,40,.4); transition: height .15s ease; }
.vasya.blink .lid { height: 92%; }
.vasya.listening .lid { height: calc(8% + var(--drunk) * 25%); }
.vasya.asleep .lid { height: 100%; }

.cheek { position: absolute; top: 110px; width: 34px; height: 22px; border-radius: 50%; background: radial-gradient(circle, rgba(232,90,60, calc(.25 + var(--drunk) * .65)), transparent 70%); filter: blur(2px); }
.cheek-l { left: 22px; } .cheek-r { right: 22px; }
.nose { position: absolute; top: 92px; left: 50%; transform: translateX(-50%); width: 40px; height: 46px; border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, rgba(255,180,150, calc(1 - var(--drunk) * .5)), hsl(calc(20deg - var(--drunk) * 20deg), calc(60% + var(--drunk) * 40%), calc(62% - var(--drunk) * 18%)));
    box-shadow: inset -4px -5px 8px rgba(150,60,40,.45), 0 3px 6px rgba(0,0,0,.25); }
.nose::after { content: ''; position: absolute; top: 8px; left: 9px; width: 10px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }

.mouth-wrap { position: absolute; top: 142px; left: 50%; transform: translateX(-50%); width: 90px; height: 50px; }
.moustache { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; background: radial-gradient(circle at 50% 0,#6b4423 60%, transparent 62%); border-radius: 0 0 40px 40px; }
.mouth { position: absolute; top: 16px; left: 50%; width: 60px; height: 40px; background: #5a2620; border-radius: 0 0 40px 40px; transform-origin: top center; overflow: hidden; transform: translateX(-50%) scaleY(.18); transition: transform .05s linear; }
.tongue { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 34px; height: 16px; border-radius: 50%; background: #c0584f; }
.teeth { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 44px; height: 8px; background: #f3e9d2; border-radius: 0 0 6px 6px; }

/* гранёный стакан в руке */
.mug { position: absolute; bottom: 4px; right: 0; width: 46px; height: 60px; z-index: 5; transform-origin: 40% 90%; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.mug-glass { position: absolute; inset: 0; clip-path: polygon(6% 0, 94% 0, 88% 100%, 12% 100%);
    border: 2px solid rgba(210,225,235,.3);
    background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.16) 50%, rgba(255,255,255,.04));
    box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 0 6px rgba(255,255,255,.15); overflow: hidden; }
.mug-glass::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 5px; z-index: 3; border-top: 2px solid rgba(220,235,245,.5); border-bottom: 1px solid rgba(220,235,245,.22); }
.mug-glass::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 1px, transparent 1px 9px); }
.mug-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 8%; z-index: 1;
    background: radial-gradient(circle at 32% 18%, rgba(255,255,255,.4), transparent 45%), linear-gradient(180deg, var(--liq, rgba(228,232,226,.72)), var(--liq2, rgba(196,204,195,.88)));
    box-shadow: inset 0 3px 5px rgba(255,255,255,.25); transition: height .6s ease; }
.vasya.cheers .mug { transform: rotate(-52deg) translate(-8px, -26px); }
.vasya.spill .mug { animation: spill-shake .5s ease-in-out 2; }
@keyframes spill-shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(10deg); } }

/* эффекты над Васей */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.fx-item { position: absolute; font-size: 1.6rem; opacity: 0; }
.fx-note { animation: note-float 1.6s ease-out forwards; }
@keyframes note-float {
    0% { opacity: 0; transform: translateY(0) scale(.6) rotate(0); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-90px) translateX(var(--nx, 0)) scale(1.2) rotate(var(--nr, 20deg)); }
}
.fx-pop { font-family: 'Rubik Mono One', monospace; font-size: 1.1rem; color: var(--neon); text-shadow: 0 0 10px rgba(255,160,40,.8); white-space: nowrap; animation: pop 1.1s ease-out forwards; }
@keyframes pop {
    0% { opacity: 0; transform: translate(-50%, 0) scale(.4); }
    25% { opacity: 1; transform: translate(-50%, -14px) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}
.fx-zzz { font-family: 'Rubik Mono One', monospace; color: #cfe3ff; animation: zzz 2.4s ease-out infinite; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(40px,-80px) scale(1.4); } }

/* ===== Стол ===== */
.table {
    position: relative; width: calc(100% + 32px); margin-top: -26px; min-height: 118px; flex: 1; z-index: 3;
    background:
        repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 70px),
        linear-gradient(180deg, #6a4424 0%, var(--wood-1) 14%, var(--wood-2) 100%);
    border-top: 3px solid #7d5230; box-shadow: 0 -10px 24px rgba(0,0,0,.45);
    display: flex; justify-content: center; align-items: flex-start; gap: 110px; padding-top: 0;
}
.bottle { position: relative; width: 44px; height: 112px; margin-top: -92px; }
.bottle-body { position: absolute; bottom: 0; left: 0; width: 44px; height: 82px; border-radius: 10px 10px 6px 6px; overflow: hidden;
    background: var(--glass, rgba(200,220,215,.18)); border: 2px solid rgba(220,235,245,.28); box-shadow: inset -6px 0 10px rgba(0,0,0,.25), 0 6px 12px rgba(0,0,0,.4); }
.bottle-neck { position: absolute; bottom: 80px; left: 14px; width: 16px; height: 28px; border-radius: 4px 4px 0 0; background: var(--glass, rgba(200,220,215,.18)); border: 2px solid rgba(220,235,245,.28); border-bottom: none; }
.bottle-neck::before { content: ''; position: absolute; top: -6px; left: -2px; width: 16px; height: 7px; border-radius: 2px; background: var(--cap, #c0392b); }
.bottle-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 88%; background: var(--liq, rgba(228,232,226,.55)); transition: height .8s ease, background .6s ease; }
.bottle-label { position: absolute; left: 3px; right: 3px; top: 30px; padding: 5px 0; text-align: center; font-family: 'Rubik Mono One', monospace; font-size: 7px; letter-spacing: .02em; color: #2a1a0a; background: var(--label, #f3e9d2); border-radius: 2px; transform: rotate(-2deg); }
.plate { position: relative; width: 96px; height: 26px; margin-top: -8px; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #f7f1e3, #cfc5b2); box-shadow: 0 4px 8px rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.snack { font-size: 28px; line-height: 1; margin-bottom: 8px; transition: transform .3s ease; }
.snack.bite { animation: bite .45s ease; }
@keyframes bite { 50% { transform: scale(.7) rotate(-12deg); } }

/* ===== Субтитры ===== */
.subs { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 8; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.sub { max-width: 100%; padding: 7px 12px; border-radius: 10px; font-size: .95rem; line-height: 1.35; text-align: center; background: rgba(12,8,4,.78); border: 1px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.sub.on { opacity: 1; transform: none; }
.sub-user { color: #bff59a; font-size: .82rem; }
.sub-agent { color: var(--text); font-weight: 500; }
.room.no-subs .subs { display: none; }

/* ===== Панель ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: repeating-linear-gradient(90deg, #2A1C0E 0 60px, #271A0D 60px 120px); border: 1px solid rgba(255,160,60,.25); box-shadow: inset 0 2px 8px rgba(0,0,0,.5); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dim); flex: none; transition: all .3s ease; }
.dot.connecting { background: #F9BD23; animation: pulse 1.5s ease-in-out infinite; }
.dot.connected { background: var(--amber); box-shadow: 0 0 10px rgba(255,179,71,.6); }
.dot.listening { background: var(--green); box-shadow: 0 0 12px rgba(124,242,55,.7); }
.dot.speaking { background: #FF6B35; box-shadow: 0 0 12px rgba(255,107,53,.7); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.12); } }
.status-text { font-size: .9rem; font-weight: 500; }

.meter-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.meter-value { font-weight: 700; font-size: 1.25rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.meter-track { height: 10px; border-radius: 5px; background: rgba(0,0,0,.4); overflow: hidden; border: 1px solid rgba(255,160,60,.25); }
.meter-fill { height: 100%; width: 0%; border-radius: 5px; background: linear-gradient(90deg, var(--green), var(--amber) 55%, #FF6B35 85%, var(--red)); transition: width .6s cubic-bezier(.4,0,.2,1); }
.stage-name { margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--neon); }

.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tally div { text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,160,60,.12); }
.tally b { display: block; font-weight: 700; font-size: 1.3rem; color: var(--neon); font-variant-numeric: tabular-nums; }
.tally span { font-size: .72rem; color: var(--muted); }

.controls { display: flex; flex-direction: column; gap: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 12px; border: none; font-family: 'Geologica', sans-serif; font-size: .92rem; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, opacity .2s; text-transform: uppercase; letter-spacing: .5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-call { background: linear-gradient(135deg, var(--amber) 0%, var(--amber-deep) 100%); color: #1E150C; box-shadow: 0 0 18px rgba(255,179,71,.35); }
.btn-call:hover:not(:disabled) { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 26px rgba(255,179,71,.55); }
.btn-hangup { background: linear-gradient(135deg, var(--red) 0%, #B91C1C 100%); color: #fff; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn-ghost { background: linear-gradient(135deg, #5B4632 0%, #3E2F20 100%); color: var(--text); border: 1px solid rgba(255,200,120,.25); font-size: .78rem; padding: 10px 12px; }
.btn-ghost.off { opacity: .55; }

.error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); border-radius: 12px; padding: 12px; color: #FCA5A5; font-size: .85rem; line-height: 1.4; }
.hint { font-size: .75rem; color: var(--dim); line-height: 1.45; }
.footer { text-align: center; margin-top: 16px; color: var(--dim); font-size: .78rem; }

/* ===== Чек ===== */
.receipt-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,5,2,.72); backdrop-filter: blur(4px); }
.receipt {
    width: 100%; max-width: 360px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #f6f1e4; color: #2a2118; font-family: 'Courier New', ui-monospace, monospace; font-size: .86rem; line-height: 1.45;
    padding: 20px 18px 16px; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: receipt-in .5s cubic-bezier(.2,.8,.2,1);
    border-top: 6px dotted #d9cfb9; border-bottom: 6px dotted #d9cfb9;
}
@keyframes receipt-in { from { transform: translateY(40px) rotate(-3deg); opacity: 0; } }
.receipt h2 { font-family: 'Rubik Mono One', monospace; font-size: 1.05rem; text-align: center; margin-bottom: 2px; }
.receipt .r-sub { text-align: center; font-size: .75rem; color: #6d6150; margin-bottom: 10px; }
.receipt .r-sep { border-top: 1px dashed #9b8e78; margin: 8px 0; }
.receipt .r-line { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r-line span:last-child { white-space: nowrap; }
.receipt .r-list { font-size: .8rem; color: #4a3f31; padding-left: 10px; }
.receipt .r-total { font-weight: 700; font-size: .95rem; }
.receipt .r-reason { text-align: center; font-weight: 700; margin-top: 8px; }
.receipt .r-thanks { text-align: center; font-size: .75rem; color: #6d6150; margin-top: 8px; }
.receipt .btn { width: 100%; margin-top: 12px; }

@media (max-width: 520px) {
    .scene { min-height: 470px; }
    .vasya-wrap { transform: scale(.88); margin-top: 44px; }
    .table { gap: 70px; }
}
@media (prefers-reduced-motion: reduce) {
    .scene-inner, .vasya, .vasya.ghost, .neon, .neon .tipsy, .pupil { animation: none !important; }
    .room .scene-inner { filter: none !important; }
}
