/* ===== «Лжец»: тёплая таверна поверх общей темы ===== */
.theme-liar {
  --gold: #d9b26a; --gold-2: #f6e3b4; --line: rgba(217, 178, 106, .25);
  --toxic: #ffc35a; --toxic-2: #e09a2a; --blood: #8e2a1c; --blood-2: #e4553c;
  --felt: #173a2a; --panel: rgba(18, 11, 6, .92);
  background: #0c0705;
}
.theme-liar .btn-gold { background: linear-gradient(180deg, #e7b75c, #8a5a1c); color: #1a0f04; border-color: #ffd98c; box-shadow: 0 6px 24px rgba(230, 160, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .45); }
.theme-liar .btn-gold:hover { background: linear-gradient(180deg, #f3c66a, #9a6620); }
.theme-liar .logo h1 { font-size: 3.6rem; background: linear-gradient(180deg, #fff6dc, #e8b45c 55%, #7a4410); -webkit-background-clip: text; background-clip: text; }
.theme-liar .logo-rule::after { content: '⚄'; color: var(--gold); font-size: 1rem; }
.theme-liar .ava-current { border-color: var(--gold); } .theme-liar .ava-current::after { background: var(--gold); color: #1a0f04; }
.theme-liar #scene .h-bg { background: url(/sprites/liar-cover.webp) center 45% / cover, radial-gradient(ellipse at 50% 40%, #3a2412, #0c0705 70%); filter: brightness(.6) saturate(1); }
body.theme-liar.in-game #scene .h-bg { background-image: url(/sprites/liar-bg.webp), url(/sprites/liar-cover.webp), radial-gradient(ellipse at 50% 40%, #3a2412, #0c0705 70%); filter: brightness(.32) saturate(.95) blur(2px); }
.theme-liar .h-lamp { background: radial-gradient(circle, rgba(255, 190, 110, .2), transparent 60%); animation: candle 5s infinite ease-in-out; }
@keyframes candle { 0%, 100% { opacity: 1; } 30% { opacity: .85; } 50% { opacity: .95; } 70% { opacity: .8; } }
.theme-liar .tr-fg { stroke: var(--gold); }
.theme-liar .seat.turn .ava { border-color: var(--toxic); box-shadow: 0 0 0 4px rgba(255, 195, 90, .25), 0 0 28px 6px rgba(255, 195, 90, .45); }
.theme-liar .tring circle { stroke: #ffc35a; filter: drop-shadow(0 0 6px rgba(255, 195, 90, .8)); }
.theme-liar .tring.low circle { stroke: #ff5a3c; }
.theme-liar .seat .ava { border-color: #6a4a2a; }
.theme-liar .seat .num { background: #1a0f06; border-color: #a77b3e; color: #ffe2a8; }
.theme-liar .seat.turn::before { content: '🎲'; }

/* ----- кубик ----- */
.die { --s: 2.6rem; position: relative; display: inline-grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: var(--s); height: var(--s); padding: calc(var(--s) * .13); gap: calc(var(--s) * .04);
  border-radius: calc(var(--s) * .2); vertical-align: middle; flex: none;
  background: radial-gradient(circle at 30% 25%, #fffdf4, #efe4c8 55%, #cdb98e); box-shadow: inset 0 -3px 0 rgba(120, 90, 40, .35), inset 0 2px 1px rgba(255, 255, 255, .8), 0 3px 6px rgba(0, 0, 0, .55); }
.die b { border-radius: 50%; transform: scale(.78); }
.die b.on { background: radial-gradient(circle at 35% 30%, #4a3a2a, #120a04); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6); }
.die.j { background: radial-gradient(circle at 30% 25%, #fff6d6, #f3cf72 55%, #b98126); }
.die.f1 b.on, .die.j b.on { background: radial-gradient(circle at 35% 30%, #e0553c, #6a120a); }
.die.xs { --s: 1.05rem; padding: 2px; gap: 0; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.die.sm { --s: 1.6rem; }
.die.big { --s: 4.6rem; }
.die.idle { margin: 0 .25rem; animation: idleRoll 4s ease-in-out infinite; }
.die.idle:nth-child(2) { animation-delay: -1.3s; } .die.idle:nth-child(3) { animation-delay: -2.6s; }
@keyframes idleRoll { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-6px); } }

/* ----- стол ----- */
.l-table { position: absolute; left: 50%; top: 50%; width: var(--bs, 420px); height: var(--bs, 420px); transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  background: url(/sprites/liar-table.webp) center/cover, radial-gradient(circle, var(--felt) 0 58%, #3b2412 59% 66%, #24150a 67% 100%);
  box-shadow: 0 50px 110px rgba(0, 0, 0, .85), 0 0 0 3px #120a04, 0 0 140px rgba(255, 170, 80, .1); }
.l-table::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 50% 35%, rgba(255, 210, 150, .18), transparent 55%); }
.pot { position: relative; z-index: 1; text-align: center; width: 64%; color: #f6ead2; transition: opacity .3s, transform .3s; }
.l-table.revealing .pot { opacity: 0; transform: scale(.85); }
.pot p { color: rgba(246, 234, 210, .7); font-size: .85rem; margin: .7rem 0 0; }
.pot-cap { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.pot-who { font-family: var(--serif); font-size: clamp(1.4rem, calc(var(--bs) * .07), 2.4rem); font-weight: 700; margin-top: .3rem; text-shadow: 0 2px 12px #000; }
.pot-win { font-family: var(--serif); font-size: clamp(1.6rem, calc(var(--bs) * .09), 3rem); font-weight: 900; color: #ffe2a0; text-shadow: 0 0 30px rgba(255, 200, 90, .6); }
.pal { display: inline-block; margin-right: .5rem; padding: .05rem .5rem; border-radius: 6px; background: #8e2a1c; color: #fff; letter-spacing: .15em; }
.pot-main { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .4rem 0 .2rem; }
.pot-main b { font-family: var(--serif); font-weight: 900; font-size: clamp(3rem, calc(var(--bs) * .2), 6.5rem); line-height: 1; color: #fff3d6; text-shadow: 0 4px 24px rgba(0, 0, 0, .8), 0 0 30px rgba(255, 190, 90, .4); }
.pot-main .x { font-size: clamp(1.4rem, calc(var(--bs) * .07), 2.4rem); color: var(--gold); }
.pot-main .die.big { --s: clamp(3rem, calc(var(--bs) * .17), 5.2rem); transform: rotate(-6deg); }
.pot-main.slam { animation: slam .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam { 0% { transform: scale(1.7) translateY(-20px); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: none; } }
.pot-say { font-size: .95rem; color: rgba(246, 234, 210, .85); font-style: italic; }
.pot-odds { margin-top: .5rem; font-size: .8rem; color: rgba(246, 234, 210, .7); }
.pot-odds b { font-size: 1rem; } .pot-odds b.hi { color: #9fe08a; } .pot-odds b.lo { color: #ff8f6a; }
.pot-hist { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; align-items: center; margin-top: .7rem; font-size: .78rem; color: rgba(246, 234, 210, .6); }
.pot-hist span { display: inline-flex; align-items: center; gap: 2px; background: rgba(0, 0, 0, .35); border-radius: 6px; padding: .1rem .35rem; }
.pot-hist em { font-style: normal; opacity: .5; }
.pot-wait p { max-width: 16rem; margin-left: auto; margin-right: auto; }

/* ----- игроки ----- */
.theme-liar .seats { pointer-events: none; } .theme-liar .seat { pointer-events: auto; }
.seat .dcount { display: flex; gap: 3px; justify-content: center; margin-top: 3px; min-height: .9rem; }
.seat .dcount i { width: .8rem; height: .8rem; border-radius: 3px; background: linear-gradient(145deg, #fffaf0, #d9c49a); box-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.seat .dcount i.lost { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.seat .scup { position: absolute; right: -16px; bottom: -6px; z-index: 3; width: 1.9rem; height: 2.1rem; background: url(/sprites/liar-cup.webp) center/contain no-repeat; filter: drop-shadow(0 3px 4px #000); }
.seat .sbid { position: absolute; left: 50%; top: -1.5rem; transform: translateX(-50%); z-index: 4; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: .8rem;
  background: rgba(20, 12, 6, .9); border: 1px solid rgba(217, 178, 106, .35); border-radius: 8px; padding: .05rem .4rem; color: #f6e3b4; opacity: .65; }
.seat .sbid.cur { opacity: 1; border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 195, 90, .45); }
.theme-liar .seat.turn .sbid { display: none; }
.seat.said .sbid.cur { animation: said .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes said { 0% { transform: translateX(-50%) scale(.3); } 100% { transform: translateX(-50%) scale(1); } }
.seat.hit .ava { animation: hit .8s; }
@keyframes hit { 15% { transform: translateX(-6px) rotate(-4deg); filter: brightness(1.8) sepia(1) hue-rotate(-30deg); } 30% { transform: translateX(6px) rotate(4deg); } 45% { transform: translateX(-3px); } 100% { transform: none; } }
.theme-liar .seat.out .ava::after { content: 'ВЫБЫЛ'; }
.fly-die { position: fixed; z-index: 70; pointer-events: none; }
.fly-die .die { --s: 2.4rem; }

/* ----- мой стакан ----- */
.l-dock { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; min-height: 8.6rem; position: relative; z-index: 25; }
.my-cup { position: relative; min-width: 15rem; padding: .7rem 1rem .5rem; border-radius: 16px; text-align: center;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 190, 110, .14), transparent 70%), linear-gradient(180deg, #1b3a2b, #10261b); border: 1px solid rgba(217, 178, 106, .3); box-shadow: inset 0 0 30px rgba(0, 0, 0, .6), 0 10px 30px rgba(0, 0, 0, .5); }
.my-cup::before { content: 'ваши кубики'; position: absolute; left: 50%; top: -.65rem; transform: translateX(-50%); font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; background: #1a0f06; color: var(--gold); padding: 0 .5rem; border-radius: 6px; white-space: nowrap; }
.my-dice { display: flex; gap: .45rem; justify-content: center; min-height: 3rem; align-items: center; }
.my-dice .die { --s: 3rem; transition: transform .2s; }
.my-dice .die:hover { transform: translateY(-4px) rotate(-5deg); }
.my-dice .die.hit { box-shadow: 0 0 0 2px #ffc35a, 0 0 16px rgba(255, 195, 90, .7), inset 0 -3px 0 rgba(120, 90, 40, .35); }
.my-cup small { display: block; min-height: 1rem; margin-top: .35rem; font-size: .75rem; color: rgba(246, 234, 210, .7); }
.cup-note { color: var(--muted); font-size: .85rem; }
.cup-lid { position: absolute; left: 50%; top: 50%; width: 6.5rem; height: 7rem; margin: -4.4rem 0 0 -3.25rem; z-index: 3; pointer-events: none; opacity: 0;
  background: url(/sprites/liar-cup.webp) center/contain no-repeat; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .8)); }
.my-cup.rolling .cup-lid { animation: cupShake 1.4s cubic-bezier(.3, .7, .3, 1); }
.my-cup.rolling .die { animation: dieIn .6s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(1s + var(--i, 0) * 70ms); }
@keyframes cupShake { 0% { opacity: 0; transform: translateY(-60%) rotate(0); } 12% { opacity: 1; transform: translateY(0) rotate(-14deg); } 22% { transform: translateX(-10%) rotate(12deg); } 32% { transform: translateX(10%) rotate(-12deg); } 42% { transform: translateX(-8%) rotate(10deg); } 52% { transform: translateX(6%) rotate(-6deg); } 62% { transform: translateY(6%) rotate(0); } 72% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-80%) rotate(8deg); } }
@keyframes dieIn { 0% { transform: translateY(-30px) rotate(-200deg) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ----- панель ставки ----- */
.bidder { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; margin: .3rem 0 .5rem; }
.bidder.only-doubt > :not(#bDudo) { display: none; }
.bidder .qty { display: flex; align-items: center; gap: .3rem; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 12px; padding: .2rem; }
.bidder .qty button { width: 2.2rem; height: 2.2rem; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.2rem; cursor: pointer; }
.bidder .qty button:hover { background: rgba(255, 195, 90, .25); }
.bidder .qty b { min-width: 2.4rem; text-align: center; font-family: var(--serif); font-size: 1.7rem; font-weight: 900; color: #fff3d6; }
.faces { display: flex; gap: .3rem; }
.faces button { padding: .2rem; border-radius: 10px; border: 2px solid transparent; background: transparent; cursor: pointer; transition: transform .15s; }
.faces button .die { --s: 2.3rem; }
.faces button:hover { transform: translateY(-3px); }
.faces button.on { border-color: #ffc35a; box-shadow: 0 0 14px rgba(255, 195, 90, .55); }
.faces button.no { opacity: .3; }
.bidder .btn { min-height: 2.8rem; }
#bGo { min-width: 10rem; display: inline-flex; align-items: center; gap: .35rem; justify-content: center; }
#bGo small { font-weight: 600; opacity: .75; font-size: .75rem; }
#bGo:disabled { background: rgba(255, 255, 255, .06); color: rgba(246, 234, 210, .6); border-color: var(--line); box-shadow: none; }
.btn-doubt { background: linear-gradient(180deg, #d9473a, #6e140c); color: #fff; border: 1px solid #ff8a72; font-weight: 900; letter-spacing: .04em; box-shadow: 0 6px 24px rgba(220, 60, 40, .35); }
.btn-doubt:hover:not(:disabled) { transform: scale(1.05) rotate(-1deg); }
.btn-exact { background: linear-gradient(180deg, #3e8c5a, #154a2a); color: #fff; border: 1px solid #8fe0a8; font-weight: 800; }
.btn-doubt:disabled, .btn-exact:disabled { opacity: .35; }

/* ----- вскрытие ----- */
.l-reveal { position: absolute; left: 50%; top: 50%; z-index: 5; width: min(94vw, 36rem); max-height: min(calc(var(--bs) * 1.3), 86vh); transform: translate(-50%, -50%); overflow: auto;
  padding: 1rem 1.2rem 1.1rem; border-radius: 18px; text-align: center; color: #f6ead2;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 190, 110, .16), transparent 60%), rgba(14, 9, 5, .94); border: 1px solid rgba(217, 178, 106, .4); box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
.l-reveal.go { animation: rvIn .5s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes rvIn { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.rv-head small { display: block; color: rgba(246, 234, 210, .65); font-size: .8rem; margin-top: .15rem; }
.rv-shout { display: inline-block; font-family: var(--serif); font-weight: 900; font-size: 2.2rem; line-height: 1; transform: rotate(-3deg); }
.rv-shout.dudo { color: #ff7a5c; text-shadow: 0 0 24px rgba(255, 80, 50, .55); }
.rv-shout.calza { color: #9fe08a; text-shadow: 0 0 24px rgba(120, 220, 120, .5); }
.l-reveal.go .rv-shout { animation: shout .6s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes shout { 0% { transform: scale(2.2) rotate(-12deg); opacity: 0; } 100% { transform: rotate(-3deg); opacity: 1; } }
.rv-bid { display: flex; justify-content: center; align-items: center; gap: .4rem; margin: .5rem 0 .6rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 900; }
.rv-bid span { font-family: var(--sans); font-size: .75rem; font-weight: 600; color: var(--gold); }
.rv-rows { display: grid; gap: .35rem; }
.rv-row { display: grid; grid-template-columns: 2rem 7rem 1fr; align-items: center; gap: .5rem; padding: .25rem .5rem; border-radius: 10px; background: rgba(255, 255, 255, .04); text-align: left; }
.rv-row.is-bidder { box-shadow: inset 0 0 0 1px rgba(217, 178, 106, .45); }
.rv-row.is-caller { box-shadow: inset 0 0 0 1px rgba(255, 122, 92, .45); }
.rv-ava { width: 2rem; height: 2rem; border-radius: 50%; background: center/cover; }
.rv-name { font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-dice { position: relative; display: flex; gap: .3rem; flex-wrap: wrap; }
.rv-dice .die { --s: 1.9rem; transition: transform .25s, opacity .4s, box-shadow .25s, filter .4s; }
.rv-cup { position: absolute; left: -.4rem; top: 50%; width: 3.2rem; height: 3.6rem; margin-top: -1.8rem; z-index: 2; pointer-events: none; background: url(/sprites/liar-cup.webp) center/contain no-repeat; opacity: 0; }
.l-reveal.go .rv-cup { animation: cupLift .9s cubic-bezier(.4, 0, .3, 1); }
@keyframes cupLift { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(40%, -120%) rotate(25deg); } }
.l-reveal.go .rv-dice .die { animation: dieIn .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: .35s; }
.rv-dice .die.lit { transform: translateY(-4px) scale(1.12); box-shadow: 0 0 0 2px #ffc35a, 0 0 18px rgba(255, 195, 90, .8); }
.l-reveal.judged .rv-dice .die.nm { opacity: .35; filter: grayscale(.8); }
.rv-count { display: flex; justify-content: center; align-items: baseline; gap: .5rem; margin-top: .7rem; color: rgba(246, 234, 210, .7); font-size: .85rem; }
.rv-count b { font-family: var(--serif); font-size: 2.6rem; font-weight: 900; color: #fff3d6; min-width: 2.4rem; }
.rv-count b.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.35); color: #ffc35a; } }
.rv-verdict { font-family: var(--serif); font-weight: 900; font-size: 2.6rem; line-height: 1; margin-top: .4rem; opacity: 0; transform: scale(2.5) rotate(-10deg);
  display: inline-block; padding: .2rem .9rem; border: 4px solid currentColor; border-radius: 10px; }
.l-reveal.judged .rv-verdict { animation: stamp .45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes stamp { to { opacity: 1; transform: rotate(-6deg); } }
.v-bluff, .v-miss { color: #ff5a3c; text-shadow: 0 0 20px rgba(255, 70, 40, .5); }
.v-truth, .v-exact { color: #9fe08a; text-shadow: 0 0 20px rgba(120, 220, 120, .5); }

/* ----- мобильные ----- */
@media (max-width: 700px) {
  .l-dock { grid-template-columns: 1fr; gap: .5rem; min-height: 0; }
  .my-cup { min-width: 0; padding: .6rem .5rem .3rem; }
  .my-dice .die { --s: 2.4rem; }
  .faces button .die { --s: 1.9rem; }
  .bidder { gap: .4rem; } .bidder .btn { min-height: 2.4rem; padding: 0 .8rem; }
  #bGo { min-width: 0; }
  .rv-row { grid-template-columns: 1.6rem 4.5rem 1fr; }
  .rv-dice .die { --s: 1.5rem; }
  .rv-shout { font-size: 1.7rem; } .rv-verdict { font-size: 2rem; }
  .theme-liar .seat .sbid { font-size: .7rem; top: -1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .die.idle, .my-cup.rolling .cup-lid { animation: none; } }
.theme-liar .mode-chip { white-space: nowrap; }
@media (max-width: 900px) { #diceChip { display: none; } }
/* маленький стол на телефоне: только главное */
.l-table.small .pot { width: 74%; }
.l-table.small .pot-say, .l-table.small .pot-hist, .l-table.small .pot p { display: none; }
.l-table.small .pot-cap { font-size: .6rem; letter-spacing: .18em; }
.l-table.small .pot-main { margin: .1rem 0; }
.l-table.small .pot-odds { margin-top: .2rem; font-size: .7rem; }
.l-table.small .die.big.idle { --s: 2.6rem; }
@media (max-width: 700px) { .theme-liar .seat .sbid { top: .1rem; left: -.9rem; transform: none; } .seat.said .sbid.cur { animation: none; } }
