/* Tiffin Tracks: lawn-green shell, level card, pause overlay, win/fail card bits */

body.game {
  --bg-top: #e6f1c8;
  --bg-bottom: #c4dd98;
  --hud-ink: #2b1d14;
  --hud-chip: rgba(255, 250, 241, .7);
}
.stage { overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.subhud .chip { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.chip.tt-tries { letter-spacing: 1px; }
.chip.tt-tries i { font-style: normal; display: inline-block; transition: filter .3s, opacity .3s, transform .3s; }
.chip.tt-tries i.off { filter: grayscale(1); opacity: .3; transform: scale(.8); }
.chip.tt-tries.hit { animation: tt-hit .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tt-hit { 0% { transform: scale(1); } 30% { transform: scale(1.18) rotate(-4deg); background: #e2462f; color: #fff; } 100% { transform: none; } }

.boost { background: rgba(255, 250, 241, .78); box-shadow: 0 2px 0 rgba(43, 29, 20, .15); }
.tt-hand { margin: -2px 0 0 -10px; }

.tt-card {
  position: absolute; z-index: 6; left: 50%; top: 42%; pointer-events: none; text-align: center;
  transform: translate(-50%, -50%) scale(.6) rotate(-3deg); opacity: 0;
  padding: 12px 26px 14px; border-radius: 18px; background: #2f7a4f; color: #fff;
  box-shadow: 0 10px 30px rgba(43, 29, 20, .35), inset 0 0 0 3px #f6c531;
  transition: opacity .2s, transform .35s cubic-bezier(.2, 1.6, .4, 1);
  max-width: calc(100% - 32px);
}
.tt-card.fresh { background: #2f7fc0; }
.tt-card.show { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
.tt-card b { display: block; font: 700 30px/1.1 var(--display); white-space: nowrap; }
.tt-card small { display: block; font-weight: 700; font-size: 15px; opacity: .95; margin-top: 2px; white-space: nowrap; }

.tt-pause {
  position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; gap: 6px; border: 0;
  background: rgba(43, 29, 20, .55); color: #fffaf1; font: inherit; text-align: center;
}
.tt-pause b { font: 700 34px/1 var(--display); }
.tt-pause span { font-weight: 700; font-size: 17px; opacity: .9; }

.tt-win h2 { text-align: center; }
.tt-win .tt-kicker { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; color: var(--chili); text-align: center; }
.tt-win .tt-note { text-align: center; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.tt-win .tt-progress { display: grid; gap: 6px; text-align: center; }
.tt-win .tt-got { margin: 0; font-weight: 800; font-size: 18px; color: var(--ink); }
.tt-win .tt-bar { position: relative; height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tt-win .tt-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f6c531, #2f7a4f); animation: ttFill .7s cubic-bezier(.2, .8, .3, 1) both; transform-origin: left; }
@keyframes ttFill { from { transform: scaleX(0); } }
html[lang="hi"] .tt-win .tt-kicker { letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  .tt-card, .chip.tt-tries.hit, .tt-win .tt-bar i { animation: none; transition: opacity .2s; }
  .tt-hand { animation: none; }
}
