.pj-game-panel {
  max-width: min(22rem, 100%);
  margin: 0 auto;
}

.pj-cabinet {
  position: relative;
  margin: 0.75rem auto;
  padding: 0.65rem;
  border-radius: 18px;
  background: linear-gradient(165deg, #8b1a1a, #5c0f0f 45%, #3d0808);
  border: 4px solid #c9a227;
  box-shadow:
    inset 0 2px 0 rgba(255, 220, 120, 0.25),
    0 8px 0 #2a0606,
    0 20px 40px rgba(0, 0, 0, 0.45);
}

.pj-cabinet-top {
  text-align: center;
  padding: 0.35rem 0.5rem 0.55rem;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #1a2848, #0f1828);
  border: 2px solid rgba(201, 162, 39, 0.55);
  border-bottom: none;
}

.pj-bajazzo {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.pj-title {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd966;
  text-shadow: 0 2px 0 #5c0f0f;
}

.pj-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pj-canvas-wrap {
  position: relative;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  border: 3px solid #2a0606;
  background: #0a1628;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.pj-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.pj-hud {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
  margin: 0.65rem 0 0.35rem;
  font-size: 0.88rem;
}

.pj-hud-item {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.pj-hud-item strong {
  color: #ffd966;
}

.pj-hud-wide {
  grid-column: 1 / -1;
  text-align: center;
}

.pj-ressu-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.35rem 0;
}

.pj-ressu {
  flex: 1;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  font-size: 0.8rem;
  text-align: center;
}

.pj-ressu-bar {
  height: 6px;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.pj-ressu-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c9a227, #ffd966);
  transition: width 0.25s ease;
}

.pj-status {
  text-align: center;
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  margin: 0.35rem 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}

.pj-status.win,
.pj-status.jackpot {
  background: rgba(61, 214, 140, 0.15);
  border: 1px solid rgba(61, 214, 140, 0.4);
  color: var(--accent2);
}

.pj-status.jackpot {
  animation: pj-flash 0.5s ease 2;
}

.pj-status.ressu {
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: #ffd966;
}

.pj-status.idle {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}

@keyframes pj-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.pj-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.pj-help {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.pj-help ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.pj-highscore {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

@media (min-width: 480px) {
  .pj-game-panel {
    max-width: min(24rem, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pj-status.jackpot {
    animation: none;
  }
}
