/* Midnight Snack Slicer styles */
.slice #front {
  cursor: crosshair;
  touch-action: none;
}

.slice .brand h1,
.slice .brand .score,
.slice .brand .best {
  color: #fff7e8;
  text-shadow: 0 2px 6px rgba(15, 10, 26, 0.72);
}

.slice .brand .best {
  color: rgba(255, 240, 214, 0.88);
}

.mode-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
  background: rgba(192, 57, 107, 0.35);
  border: 1.5px solid rgba(255, 118, 168, 0.75);
  color: #ffe3ee;
  text-shadow: none;
}

.mode-badge.zen {
  background: rgba(46, 204, 113, 0.28);
  border-color: #6df2a7;
  color: #dcffeb;
}

.mult-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
  background: #ffd23f;
  border: 1.5px solid #fff;
  color: #3a2400;
  text-shadow: none;
  animation: focusPulse 0.6s ease-in-out infinite alternate;
}

@keyframes focusPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.slice-controls {
  position: fixed;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.slice-pill {
  position: relative;
  overflow: hidden;
  min-width: 205px;
  min-height: 46px;
  padding: 8px 20px;
  border-radius: 99px;
  border: 3px solid #fff;
  background: rgba(29, 21, 46, 0.88);
  color: #fff7e8;
  font: 800 0.94rem/1 var(--body);
  box-shadow: 0 3px 0 #130c20, 0 6px 16px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.slice-pill .focus-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #ff5fa2, #ffd23f);
  transition: width 0.14s ease-out;
  z-index: 0;
}

.slice-pill .focus-text {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(15, 10, 26, 0.8);
}

.slice-pill.ready {
  border-color: #ffd23f;
  box-shadow: 0 3px 0 #8a5600, 0 0 20px rgba(255, 210, 63, 0.65);
  animation: focusPulse 0.7s ease-in-out infinite alternate;
}

.slice-pill.active {
  border-color: #44e0ff;
  box-shadow: 0 3px 0 #0c4d66, 0 0 24px rgba(68, 224, 255, 0.75);
}

.slice-pill.active .focus-fill {
  background: linear-gradient(90deg, #44e0ff, #b9a5f4);
}

.slice-pill:disabled {
  opacity: 0.78;
  cursor: default;
}

.slice-pill:not(:disabled):active {
  transform: translateY(2px);
}

.book.end {
  text-align: center;
  width: min(92vw, 420px);
}

.end h2 {
  font-size: 1.9rem;
  margin-top: 4px;
}

.over-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.over-stat {
  padding: 9px 6px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg);
}

.over-stat b {
  display: block;
  font: 400 1.35rem/1.1 var(--display);
  color: var(--ink);
}

.over-stat span {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.endbtns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 99px;
  font-weight: 800;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.btn.go {
  background: var(--gold);
  border-color: #fff;
  color: #3a2400;
  box-shadow: 0 3px 0 var(--gold-ink);
}

@media (max-width: 520px) {
  .slice-pill {
    min-width: 178px;
    min-height: 42px;
    font-size: 0.86rem;
    padding: 6px 16px;
  }
}
