/* =========================================================================
   Хоррор-стиль телефона для «Смертельной вечеринки»
   ========================================================================= */

body.horror-phone,
body.horror-phone .game {
  background-color: #0a0106 !important;
  background-image:
    radial-gradient(70% 40% at 50% 0%, rgba(150,10,26,.34) 0%, transparent 60%),
    linear-gradient(180deg, #24040c 0%, #12020a 46%, #080105 100%) !important;
  color: #f0dede;
}
/* шапка телефона тоже в теме */
body.horror-phone .topline,
body.horror-phone .game > header { background: rgba(20,2,7,.6); }
/* Хозяин на телефоне */
body.horror-phone .mr { height: 130px; }
body.horror-phone::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 40;
  background: radial-gradient(110% 90% at 50% 45%, transparent 40%, rgba(20,0,4,.72) 100%);
}
body.horror-phone .h1,
body.horror-phone .h2 { text-shadow: 0 0 22px rgba(255,50,70,.45); }
body.horror-phone .promptcard {
  background: linear-gradient(180deg, rgba(62,10,18,.96), rgba(24,3,9,.96));
  border: 1px solid rgba(255,90,110,.34);
  color: #ffeceb;
  text-shadow: 0 0 18px rgba(255,60,80,.3);
  box-shadow: 0 6px 0 rgba(0,0,0,.5), inset 0 0 40px rgba(200,12,32,.14);
}
body.horror-phone .note { color: #d2a2a8; opacity: .9; }
body.horror-phone .pill { background: #8e0f1d; color: #ffe3e3; }
body.horror-phone .waitbox,
body.horror-phone .center { color: #f4dede; }
body.horror-phone .p { color: #d9b6b8; }
body.horror-phone .result-good { color: #6ff09a; }
body.horror-phone .result-bad  { color: #ff5f6f; }
body.horror-phone .gain { color: #ffd166; }
body.horror-phone .tap-btn {
  background: radial-gradient(circle at 40% 34%, #d3162c, #6d0713);
  border: 2px solid rgba(255,120,140,.4); color: #fff;
  box-shadow: 0 8px 0 rgba(0,0,0,.6), 0 0 40px rgba(200,12,32,.4);
}
body.horror-phone .btn,
body.horror-phone .answer-btn {
  background: linear-gradient(180deg, #38101a, #1b060c);
  border: 1px solid rgba(255,90,110,.3);
  color: #ffe6e6;
  box-shadow: 0 4px 0 rgba(0,0,0,.6);
}
body.horror-phone .btn:active,
body.horror-phone .answer-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.6); }
body.horror-phone .btn.no  { background: linear-gradient(180deg, #7a0e1c, #3d040c); }
body.horror-phone .btn.ok  { background: linear-gradient(180deg, #1f6b36, #0c3018); border-color: rgba(90,255,140,.3); }
body.horror-phone .answer  { background: rgba(20,3,8,.9); border: 1px solid rgba(255,90,110,.3); color: #ffe6e6; }

/* пелена «ты мёртв» */
.deadveil {
  position: fixed; inset: 0; z-index: 44; pointer-events: none;
  background: radial-gradient(70% 50% at 50% 40%, rgba(120,0,16,.32), rgba(4,0,2,.92));
  animation: deadveil 1.1s ease forwards;
}
@keyframes deadveil { from { opacity: 0; } to { opacity: 1; } }

/* отрезанный вариант ответа */
.answer-btn.cutoff {
  opacity: .3; filter: grayscale(1); position: relative; pointer-events: none;
}
.answer-btn.cutoff::after {
  content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 3px;
  background: #c4142a; box-shadow: 0 0 8px rgba(200,12,32,.8);
}
.cutchip {
  display: inline-block; padding: .3em .8em; border-radius: 999px; margin-top: 8px;
  background: rgba(196,20,42,.2); border: 1px solid rgba(255,80,100,.42);
  color: #ff9aa5; font-size: 12px; letter-spacing: .08em;
}

/* ------- чаши на телефоне ------- */
.ph-cups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.ph-cup {
  padding: 12px 4px 8px; border-radius: 10px; text-align: center;
  background: linear-gradient(180deg, #38101a, #1b060c);
  border: 1px solid rgba(255,90,110,.3); color: #ffe6e6;
  font-family: inherit; font-size: 15px;
}
.ph-cup .g {
  width: 30px; height: 36px; margin: 0 auto 6px; border-radius: 4px 4px 46% 46% / 4px 4px 30% 30%;
  border: 2px solid rgba(255,255,255,.3); position: relative; overflow: hidden;
}
.ph-cup .g::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: #7a1020; }
.ph-cup:active { transform: translateY(2px); }

/* ------- память на телефоне ------- */
.ph-mem { display: grid; gap: 6px; margin: 12px auto; width: min(300px, 86vw); }
.ph-memcell {
  aspect-ratio: 1/1; border-radius: 6px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  transition: background .15s ease, transform .15s ease;
}
.ph-memcell.sel {
  background: linear-gradient(180deg, #ff4d5f, #8e0f1d);
  box-shadow: 0 0 18px rgba(255,60,80,.65); transform: scale(1.05);
}

/* ------- жадность: ползунок ------- */
.ph-greed { margin: 14px 0; }
.ph-greedval {
  font-family: inherit; font-size: 42px; font-weight: 800; color: #ffd166;
  text-shadow: 0 0 24px rgba(255,200,80,.5); text-align: center;
}
.ph-greed input[type=range] { width: 100%; height: 36px; accent-color: #ffd166; }
.ph-greed input[type=range]::-webkit-slider-runnable-track {
  height: 14px; border-radius: 99px;
  background: linear-gradient(90deg, #4d3208, #b8860b 55%, #ffd166);
}
.ph-greed input[type=range]::-moz-range-track {
  height: 14px; border-radius: 99px;
  background: linear-gradient(90deg, #4d3208, #b8860b 55%, #ffd166);
}
.ph-greed input[type=range]::-webkit-slider-thumb { border-color: #ffd166 !important; }
.ph-greed input[type=range]::-moz-range-thumb { border-color: #ffd166 !important; }
.ph-greednote { text-align: center; font-size: 13px; color: #ff9aa5; }

/* ------- пальцы ------- */
.ph-hand { display: flex; gap: 8px; justify-content: center; align-items: flex-end; height: 90px; margin: 8px 0 0; }
.ph-palm {
  width: 168px; height: 42px; margin: 0 auto 6px; border-radius: 4px 4px 26px 26px;
  background: linear-gradient(180deg, #cfa2a4, #a97b80);
  box-shadow: inset 0 -10px 14px rgba(0,0,0,.3);
}
.ph-fing {
  width: 34px; border-radius: 17px 17px 4px 4px; border: none; padding: 0;
  background: linear-gradient(180deg, #e9c6c6, #a97b80);
  color: #4a1c22; font-weight: 800; font-size: 15px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
}
.ph-fing:nth-child(1) { height: 62px; }
.ph-fing:nth-child(2) { height: 84px; }
.ph-fing:nth-child(3) { height: 76px; }
.ph-fing:nth-child(4) { height: 54px; }
.ph-fing:disabled { background: linear-gradient(180deg, #8e0f1d, #4d0510); color: #ffb3ba; height: 26px !important; }
.ph-fing:active { transform: translateY(3px); }

/* ------- арена ------- */
.ph-moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.ph-move {
  padding: 16px 6px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, #38101a, #1b060c);
  border: 1px solid rgba(255,90,110,.3); color: #ffe6e6;
}
.ph-move .ic { font-size: 30px; display: block; }
.ph-move .lb { font-size: 12px; letter-spacing: .08em; margin-top: 4px; color: #ffb3ba; }
.ph-move:active { transform: translateY(2px); }

/* ------- кости ------- */
.ph-die {
  width: 92px; height: 92px; margin: 14px auto; border-radius: 16px;
  background: linear-gradient(150deg, #f2e6e6, #c9b4b4);
  box-shadow: 0 6px 0 #6b5555; display: grid; place-items: center;
  font-size: 44px; font-weight: 800; color: #2a0a0e;
}
.ph-die.rolling { animation: ph-roll .45s linear infinite; }
@keyframes ph-roll { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .deadveil, .ph-die.rolling { animation: none !important; }
}

/* ---------- ДОМ ДЫШИТ · ПРОКЛЯТИЕ · ПОСЛЕДНЯЯ ВОЛЯ ---------- */

.ev-pill {
  background: #7a0c18 !important; color: #ffd9d9 !important;
  letter-spacing: .16em; animation: ev-blink 2s steps(2) infinite;
}
@keyframes ev-blink { 50% { opacity: .5; } }
.curse-pill { background: linear-gradient(90deg, #2b4a8b, #7fb4ff) !important; color: #04101f !important; }

.house-ev { animation: house-in .6s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes house-in { from { transform: scale(.8); opacity: 0; filter: blur(4px); } }

/* шёпот дома */
.whisperbox {
  margin: 10px 0; padding: 12px; border-radius: 10px;
  background: rgba(120,8,20,.18); border: 1px dashed rgba(255,120,140,.45);
}
.whisperbox .wt { font-size: 11px; letter-spacing: .22em; color: #ff8a99; }
.whisperbox .wv { font-size: 16px; margin-top: 4px; color: #ffe6e6; font-style: italic; }
.whisperbox .wn { font-size: 11px; margin-top: 4px; color: #8f6a6a; }

/* голос призрака */
.ghost-h { color: #a9c4e8 !important; text-shadow: 0 0 20px rgba(120,180,255,.5) !important; }
.curse-btn {
  background: linear-gradient(180deg, #24406e, #101f38) !important;
  border-color: rgba(150,190,255,.4) !important; color: #dbe8ff !important;
}

/* последняя воля */
.lwbox {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: rgba(40,30,26,.6); border: 1px solid rgba(200,190,180,.28);
}
.lwbox.done { border-style: dashed; }
.lwt { font-size: 11px; letter-spacing: .22em; color: #cbbfb2; }
.lwn { font-size: 12px; color: #9b9188; margin: 4px 0 8px; }
.lwv { font-size: 17px; color: #ffe6e6; font-style: italic; margin-top: 6px; }
.lwbox .answer { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  .ev-pill, .house-ev { animation: none !important; }
}

/* ---- поломки вопроса: телефон ---- */
.gl-erased{color:transparent!important;position:relative}
.gl-erased::after{content:'';position:absolute;inset:18% 6%;background:repeating-linear-gradient(90deg,#1a0308 0 8px,#2a060d 8px 16px);border-radius:3px}
.gl-flip{transform:rotate(180deg)}
.gl-ghost{opacity:.14}
.gl-tiny{font-size:9px!important;letter-spacing:0}
.gl-rev{letter-spacing:.02em}
.gl-static{letter-spacing:.04em;text-shadow:1px 0 rgba(255,60,80,.6),-1px 0 rgba(60,180,255,.5)}
.gl-gap b,.gl-gap{font-family:inherit}
.gl-chip{
  display:inline-block;background:#5c0a16;color:#ffd9d9;border-radius:3px;
  padding:2px 7px;font-family:var(--display);font-size:10px;letter-spacing:.14em;
  margin-bottom:6px;animation:glbl 1.6s steps(2) infinite;
}
@keyframes glbl{50%{opacity:.35}}
@media (prefers-reduced-motion: reduce){.gl-chip{animation:none}}
