/* Телефон игрока: вертикаль, крупные тап-зоны, ничего лишнего. */

.player {
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.p-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  gap: 12px;
  animation: fade 0.3s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.p-center {
  margin: auto;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 0 8px;
}

.p-center h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

.p-center p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.4;
}

.big-emoji {
  font-size: 72px;
  line-height: 1;
}

.muted {
  color: var(--ink-dim);
}

.small {
  font-size: 13px;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--br-green);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Игра ── */

.p-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-round {
  font-size: 14px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
}

.p-round b {
  color: var(--ink);
}

.p-round .dots {
  font-size: 11px;
}

.p-timer {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.p-timer span {
  font-size: 30px;
  font-weight: 900;
}

.p-timer small {
  font-size: 12px;
  color: var(--ink-dim);
}

.p-timer.low span {
  color: var(--danger);
}

.p-question {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  font-size: clamp(22px, 6.8vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  min-height: 2.3em;
  display: grid;
  place-items: center;
}

.p-question .swatch {
  padding: 0 0.26em;
  border-radius: 0.16em;
  color: #0b1220;
}

.p-stage-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

#p-stage {
  height: 100%;
}

/* На телефоне упираемся в ширину слота — забираем её почти целиком */
.player .bottle-wrap {
  width: 86%;
}

.p-hint {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-dim);
  min-height: 1.3em;
}

.p-hint.go {
  color: var(--br-yellow);
  font-weight: 800;
}

/* ── Выбор приза ── */

.p-prize-head {
  flex: 0 0 auto;
  text-align: center;
}

.p-prize-head h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  color: var(--br-green);
}

.p-prize-head p {
  margin: 4px 0 0;
  color: var(--ink-dim);
}

.p-prize-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.p-prize-item {
  flex: 1 1 0;
  min-height: 92px;
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.12s ease,
    border-color 0.15s ease;
}

.p-prize-item:active {
  transform: scale(0.975);
  border-color: var(--br-green);
}

/* Квадрат во всю высоту карточки — блюдо должно быть видно, а не угадываться */
.p-prize-item img {
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  flex: 0 0 auto;
}

.p-prize-item > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.p-prize-item .nm {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.p-prize-item .pr {
  font-size: 16px;
  font-weight: 800;
  color: var(--br-yellow);
  margin-top: 2px;
}

.p-prize-item[disabled] {
  opacity: 0.45;
}

/* ── Приз выбран ── */

.p-claimed {
  margin: auto;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

.p-claimed img {
  width: min(58vw, 230px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.p-claimed-kicker {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--br-green);
}

.p-claimed h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
}

.p-claimed-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--br-yellow);
}

.p-code {
  margin-top: 6px;
  display: grid;
  gap: 2px;
  padding: 10px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.p-code span {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.p-code b {
  font-size: 30px;
  letter-spacing: 0.2em;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

.p-cta {
  margin-top: 10px;
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: var(--br-green);
  color: #04180d;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}
