*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app::-webkit-scrollbar,
.stage::-webkit-scrollbar,
.customer-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

::selection { background: transparent; color: inherit; }

:root {
  --bg: #0b0f19;
  --panel: #141b2d;
  --panel-2: #1a2338;
  --line: #2a3550;
  --text: #e8eef8;
  --muted: #8b97b0;
  --gold: #f0b429;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden !important;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

body {
  background:
    radial-gradient(120% 80% at 50% -10%, #243156 0%, transparent 55%),
    linear-gradient(180deg, #0d1322 0%, #0b0f19 100%);
}

[hidden] { display: none !important; }

.game-btn {
  appearance: none;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.08s ease;
  touch-action: manipulation;
}

.game-btn:active,
.game-btn.is-pressed {
  transform: scale(0.92);
  opacity: 0.88;
}

.game-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.game-btn--primary {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6c84a, #d49a12);
  color: #1a1200;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(212, 154, 18, 0.28);
}

/* ---- Overlays ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + var(--safe-top)) 16px calc(12px + var(--safe-bottom));
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.overlay--title {
  z-index: 80;
  background:
    radial-gradient(90% 60% at 50% 20%, rgba(240, 180, 41, 0.18), transparent 60%),
    rgba(5, 8, 16, 0.96);
}

.title-card {
  width: min(100%, 360px);
  text-align: center;
  max-height: 100%;
  overflow: hidden;
}

.title-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.title-name {
  margin: 0 0 10px;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.title-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.title-ranks {
  list-style: none;
  margin: 0 0 18px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(12, 18, 32, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}

.title-ranks b {
  color: var(--gold);
  font-weight: 800;
  display: inline-block;
  min-width: 3.5em;
}

.title-hint {
  margin: 10px 0 0;
  color: #66738f;
  font-size: 11px;
}

.modal {
  width: min(100%, 380px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 16px 16px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.modal h2, .modal h3 { margin: 0 0 8px; }

.modal-msg {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal--scan { position: relative; overflow: hidden; }

.scan-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 12px #ef4444;
  animation: scan 1.1s ease-in-out infinite alternate;
}

@keyframes scan {
  from { top: 12%; }
  to { top: 78%; }
}

.scan-avatar {
  width: 88px;
  height: 132px;
  object-fit: cover;
  object-position: center top;
  border-radius: 14px;
  margin: 8px auto 10px;
  display: block;
  border: 2px solid #8a6238;
  background-color: #2a1c12;
  background-image: url('images/shop-bg.png');
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(201, 160, 106, 0.35);
}

.result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  border: 3px solid #2a9d6e;
  background: #123528;
}

.result-icon.danger {
  border-color: #c23b4a;
  background: #3a1520;
}

.go-title { color: #ef6b7b; }
.clear-title {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 24px;
}

.sheet {
  background: #0c1220;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: left;
}

.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  padding: 5px 0;
}

.sheet-row span:last-child {
  color: var(--text);
  font-weight: 700;
}

.sheet-row--total {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
  font-size: 14px;
}

.dayend-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.gold { color: var(--gold) !important; }
.danger { color: #ef6b7b !important; }

/* ---- App: 固定5段・スクロール禁止 ---- */
.app {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-areas:
    "hud"
    "banner"
    "stage"
    "item"
    "actions";
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  padding:
    calc(6px + var(--safe-top))
    calc(10px + var(--safe-right))
    calc(6px + var(--safe-bottom))
    calc(10px + var(--safe-left));
  gap: 6px;
  overflow: hidden !important;
}

.hud { grid-area: hud; }
.event-banner { grid-area: banner; }
.stage { grid-area: stage; min-height: 0; overflow: hidden; }
.item-panel { grid-area: item; }
.actions { grid-area: actions; }

.hud {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  background: rgba(20, 27, 45, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  flex-shrink: 0;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hud-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f0b429, #b87a08);
  color: #1a1200;
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}

.hud-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}

.hud-sub, .hud-goal {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.hud-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.stat-label {
  font-size: 9px;
  color: var(--muted);
}

.stat-value {
  font-size: 13px;
  font-weight: 900;
}

.trust { width: 100px; }

.trust-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.trust-track {
  height: 5px;
  background: #0c1220;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.trust-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #818cf8);
}

.trust-bar.is-mid { background: linear-gradient(90deg, #d97706, #fbbf24); }
.trust-bar.is-low { background: linear-gradient(90deg, #dc2626, #fb7185); }

.mute-btn {
  width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 16px;
}

.event-banner {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.1);
  color: #f6d27a;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
}

/* 客パネル：縦中央レイアウト（スクロールなし） */
.customer-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(20, 27, 45, 0.72), rgba(20, 27, 45, 0.88)),
    url('images/shop-bg.png') center / cover no-repeat,
    var(--panel);
  border: 1px solid #5c4030;
  border-radius: 14px;
  padding: 10px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(201, 160, 106, 0.18);
}

.avatar-wrap {
  position: relative;
  width: 112px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 2px solid #8a6238;
  overflow: hidden;
  background-color: #2a1c12;
  background-image: url('images/shop-bg.png');
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(201, 160, 106, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.35);
}

.avatar {
  width: 112px;
  height: 168px;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  border: none;
  background: transparent;
  display: block;
  position: relative;
  z-index: 1;
}

.tag {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--panel-2);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0 14px 0 10px;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  z-index: 1;
}

.sweat {
  position: absolute;
  top: 2px;
  right: -2px;
  font-size: 14px;
  animation: drop 1.4s infinite;
}

@keyframes drop {
  0% { transform: translateY(-3px); opacity: 0; }
  45% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.customer-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  flex-shrink: 0;
}

.insight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  background: #0c1220;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  padding: 3px 9px;
  flex-shrink: 0;
}

.stars { color: var(--gold); letter-spacing: 1px; }

.speech {
  margin: 0;
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #d5deef;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  flex-shrink: 1;
  min-height: 0;
}

.desc { display: none !important; }

.item-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  overflow: hidden;
}

.item-head {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.item-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #0c1220;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.item-body h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.item-desc { display: none !important; }

.item-price {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.item-price strong {
  color: var(--gold);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.actions-label { display: none; }

.game-btn.choice {
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.choice-title {
  font-size: 13px;
  font-weight: 800;
}

.choice-sub {
  font-size: 10px;
  opacity: 0.85;
}

.choice--risk {
  background: linear-gradient(90deg, #4a1820, #3a1524);
  border-color: rgba(194, 59, 74, 0.55);
  color: #ffc9d0;
}

.choice--safe {
  background: linear-gradient(90deg, #123528, #0f2f36);
  border-color: rgba(42, 157, 110, 0.55);
  color: #b9f0d4;
}

.choice--honest {
  background: #182234;
  border-color: var(--line);
  color: #c5d0e4;
}

@media (min-height: 780px) {
  .avatar-wrap { width: 120px; }
  .avatar { width: 120px; height: 180px; }
  .speech { font-size: 13px; }
  .game-btn.choice { min-height: 48px; }
}

@media (max-height: 700px) {
  .avatar-wrap { width: 88px; }
  .avatar { width: 88px; height: 132px; }
  .customer-panel { gap: 4px; padding: 8px; }
  .speech { font-size: 11px; padding: 6px 8px; }
  .game-btn.choice { min-height: 40px; padding: 7px 9px; }
  .item-panel { padding: 6px 8px; }
  .hud { padding: 6px 8px; }
}

@media (max-height: 620px) {
  .avatar-wrap { width: 72px; }
  .avatar { width: 72px; height: 108px; }
  .speech { -webkit-line-clamp: 1; line-clamp: 1; }
  .game-btn.choice { min-height: 36px; padding: 6px 8px; }
  .choice-title { font-size: 12px; }
}

/* ---- 大富豪エンディング ---- */
.overlay--ending {
  z-index: 90;
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(255, 215, 64, 0.35), transparent 70%),
    linear-gradient(180deg, #1a1200 0%, #0b0f19 55%, #141008 100%);
  overflow: hidden;
  padding: calc(8px + var(--safe-top)) 12px calc(8px + var(--safe-bottom));
}

.ending {
  position: relative;
  width: min(100%, 400px);
  max-height: 100%;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ending-sparkles {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ending-sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: #ffe566;
  box-shadow: 0 0 8px #ffd700;
  animation: spark-fall linear infinite;
  opacity: 0.9;
}

@keyframes spark-fall {
  0% { transform: translateY(-10%) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

.ending-kicker {
  margin: 0;
  color: #ffe566;
  font-size: 12px;
  letter-spacing: 0.28em;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 200, 0, 0.8);
  animation: blink-md 0.5s steps(2, end) infinite;
}

@keyframes blink-md {
  50% { opacity: 0.35; }
}

.ending-title {
  margin: 0;
  font-size: clamp(26px, 8vw, 34px);
  color: #ffe566;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 20px rgba(255, 200, 0, 0.85),
    2px 2px 0 #8a5a00,
    -1px -1px 0 #fff3b0;
  animation: title-pop 0.7s ease-out;
}

@keyframes title-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

.ending-lead {
  margin: 0;
  color: #f6e7a8;
  font-size: 12px;
  line-height: 1.4;
}

.statue-stage {
  position: relative;
  width: 100%;
  height: 150px;
  display: grid;
  place-items: center;
  margin: 2px 0;
}

.statue {
  position: relative;
  width: 120px;
  animation: statue-rise 1.1s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

@keyframes statue-rise {
  0% { transform: translateY(40px) scale(0.6); opacity: 0; filter: brightness(2); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: brightness(1); }
}

.statue-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 64, 0.55), transparent 68%);
  animation: glow-pulse 1.4s ease-in-out infinite;
  z-index: 0;
}

@keyframes glow-pulse {
  50% { opacity: 0.55; transform: scale(1.08); }
}

.statue-body {
  position: relative;
  z-index: 1;
  height: 96px;
}

.statue-head {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff1a8, #e6b422 45%, #a87400);
  box-shadow: inset -3px -3px 0 rgba(120, 70, 0, 0.35);
}

.statue-torso {
  width: 44px;
  height: 40px;
  margin: 2px auto 0;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(160deg, #ffe566, #d4a017 50%, #8a5a00);
  box-shadow: inset -4px -4px 0 rgba(90, 50, 0, 0.3);
}

.statue-arm {
  position: absolute;
  top: 32px;
  width: 14px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(160deg, #ffe566, #c4890c);
}

.statue-arm--l { left: 18px; transform: rotate(18deg); }
.statue-arm--r {
  right: 14px;
  transform: rotate(-40deg);
  height: 38px;
}

.statue-coin {
  position: absolute;
  top: 18px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #6b4500;
  background: radial-gradient(circle at 35% 35%, #fff6c2, #f0c419 55%, #a87400);
  border: 2px solid #8a5a00;
  animation: coin-spin 1.6s linear infinite;
}

@keyframes coin-spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

.statue-pedestal {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 88px;
  height: 28px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #f0c419, #8a5a00);
  box-shadow: 0 6px 0 #5a3a00;
  display: grid;
  place-items: center;
}

.statue-plaque {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #3d2500;
}

.bless-board {
  width: 100%;
  background: rgba(20, 16, 4, 0.75);
  border: 1px solid rgba(255, 215, 64, 0.45);
  border-radius: 14px;
  padding: 8px 10px 10px;
}

.bless-faces {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
  min-height: 36px;
}

.bless-faces img {
  width: 32px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #c9a227;
  background: #1a2338;
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
}

.bless-faces img.is-active {
  opacity: 1;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(255, 215, 64, 0.7);
}

.bless-label {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #c9a227;
  font-weight: 800;
}

.bless-text {
  margin: 4px 0 0;
  font-size: 12px;
  color: #fff6c8;
  line-height: 1.35;
  min-height: 2.6em;
}

.bless-from {
  margin: 2px 0 0;
  font-size: 10px;
  color: #e0c56a;
}

.ending-sheet {
  width: 100%;
  margin-bottom: 0;
  background: rgba(12, 10, 2, 0.85);
  border-color: rgba(255, 215, 64, 0.35);
}

@media (max-height: 700px) {
  .statue-stage { height: 120px; }
  .statue-body { height: 78px; }
  .statue-head { width: 22px; height: 22px; }
  .statue-torso { width: 36px; height: 32px; }
  .bless-text { min-height: 2.2em; font-size: 11px; }
  .ending-title { font-size: 24px; }
}

/* ---------- 逮捕 / 収監 ---------- */
.overlay--arrest,
.overlay--jail {
  background: rgba(4, 6, 12, 0.92);
}

.arrest-stage {
  position: relative;
  width: min(92vw, 360px);
  text-align: center;
  overflow: hidden;
  padding: 28px 16px 20px;
}

.arrest-siren {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: sirenFlash 0.45s linear infinite;
  opacity: 0;
}

.overlay--arrest.is-active .arrest-siren { opacity: 1; }

@keyframes sirenFlash {
  0%, 49% { background: rgba(220, 40, 60, 0.22); }
  50%, 100% { background: rgba(40, 80, 220, 0.22); }
}

.police-car {
  position: relative;
  height: 84px;
  margin: 12px auto 18px;
  width: 100%;
}

.police-car__body {
  position: absolute;
  left: -140%;
  top: 18px;
  width: 150px;
  height: 48px;
  border-radius: 10px 18px 8px 8px;
  background: linear-gradient(180deg, #f4f7ff, #c9d2e8);
  border: 2px solid #2a3550;
  box-shadow: 0 8px 0 #1a2030;
}

.overlay--arrest.is-active .police-car__body {
  animation: carRush 2.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes carRush {
  0% { left: -140%; }
  55% { left: 28%; }
  100% { left: 110%; }
}

.police-car__cabin {
  position: absolute;
  left: 42px;
  top: -18px;
  width: 58px;
  height: 22px;
  border-radius: 8px 8px 0 0;
  background: #7a8eab;
  border: 2px solid #2a3550;
}

.police-car__light {
  position: absolute;
  top: -8px;
  width: 14px;
  height: 10px;
  border-radius: 3px;
}

.police-car__light--r {
  left: 18px;
  background: #ef4444;
  animation: blinkR 0.35s infinite;
}

.police-car__light--b {
  right: 18px;
  background: #3b82f6;
  animation: blinkB 0.35s infinite;
}

@keyframes blinkR {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}
@keyframes blinkB {
  0%, 49% { opacity: 0.25; }
  50%, 100% { opacity: 1; }
}

.police-car__wheel {
  position: absolute;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  border: 3px solid #555;
}

.police-car__wheel--l { left: 16px; }
.police-car__wheel--r { right: 16px; }

.police-car__badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #1e3a8a;
}

.arrest-title {
  margin: 0;
  font-size: 32px;
  color: #fecaca;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.55);
}

.arrest-msg {
  margin: 10px 0 0;
  color: #e8eef8;
  font-size: 14px;
  line-height: 1.45;
}

.jail-card {
  width: min(92vw, 360px);
  background: var(--panel);
  border: 1px solid #5c4030;
  border-radius: 16px;
  padding: 18px 16px 16px;
  text-align: center;
}

.jail-cell {
  position: relative;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #1a1520, #0c0a10),
    repeating-linear-gradient(90deg, #222 0 8px, #181818 8px 18px);
  border: 2px solid #6b7280;
  overflow: hidden;
}

.jail-bars {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  padding: 0 8px;
  pointer-events: none;
  z-index: 2;
}

.jail-bars span {
  width: 7px;
  height: 100%;
  background: linear-gradient(90deg, #9ca3af, #4b5563 40%, #d1d5db 55%, #6b7280);
  border-radius: 2px;
  box-shadow: 1px 0 0 rgba(0,0,0,0.4);
}

.jail-inmate {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 42px;
  z-index: 1;
  filter: grayscale(0.2);
  animation: inmateSway 2.4s ease-in-out infinite;
}

@keyframes inmateSway {
  0%, 100% { transform: translateX(-50%) rotate(-3deg); }
  50% { transform: translateX(-50%) rotate(3deg); }
}

.jail-years {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 34px;
  margin: 10px 0 6px;
}

.jail-year-chip {
  background: #0c1220;
  border: 1px solid #ef6b7b;
  color: #fecaca;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.jail-year-chip.is-pop {
  animation: chipPop 0.35s ease-out;
}

@keyframes chipPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.jail-age {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
}

#age-badge {
  color: var(--gold);
}
