:root {
  --s: 1;
  --gold: #f6d36b;
  --gold-2: #ffe9a6;
  --red: #e3263a;
  --wine: #2a0d1c;
  --ink: #1a0a12;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #0c070b;
  color: #fff7e6;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  user-select: none;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

#fit {
  width: calc(390px * var(--s));
  height: calc(844px * var(--s));
  display: grid;
  place-items: center;
}

#phone {
  width: 390px;
  height: 844px;
  position: relative;
  overflow: hidden;
  transform: scale(var(--s));
  transform-origin: center center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 210, 90, 0.22), transparent 46%),
    linear-gradient(180deg, #4a1630 0%, #1b0b16 38%, #12080f 100%);
  box-shadow: 0 0 0 1px rgba(246, 211, 107, 0.28), 0 18px 50px rgba(0, 0, 0, 0.55);
}

.hud {
  height: 78px;
  padding: 16px 16px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.stat {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(246, 211, 107, 0.28);
  border-radius: 12px;
  padding: 8px 10px 7px;
  text-align: center;
}

.stat .k {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255, 233, 166, 0.7);
}

.stat .v {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-2);
}

.stat.combo .v {
  color: #ffb3c4;
}

.stage {
  position: relative;
  height: 620px;
}

#game {
  display: block;
  width: 390px;
  height: 620px;
}

.toast {
  position: absolute;
  left: 50%;
  top: 86px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(227, 38, 58, 0.92);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.dock {
  height: 146px;
  padding: 8px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
}

.hint {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 233, 166, 0.62);
}

#pinch-btn {
  width: 210px;
  height: 74px;
  border: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 25%, #ff6a78, #d10d28 62%, #8c0818);
  color: #fff7e8;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.18em;
  box-shadow:
    0 0 0 4px rgba(246, 211, 107, 0.28),
    0 10px 0 #6d0814,
    0 16px 24px rgba(0, 0, 0, 0.4);
}

#pinch-btn:enabled:active {
  transform: translateY(6px);
  box-shadow:
    0 0 0 4px rgba(246, 211, 107, 0.22),
    0 4px 0 #6d0814,
    0 8px 16px rgba(0, 0, 0, 0.35);
}

#pinch-btn:disabled {
  opacity: 0.42;
  filter: grayscale(0.35);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 4, 8, 0.62);
  backdrop-filter: blur(6px);
}

.overlay.hidden {
  display: none;
}

.card {
  width: 100%;
  padding: 28px 22px 24px;
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(255, 214, 110, 0.2), transparent 50%),
    linear-gradient(180deg, #5a2040, #2a1020);
  border: 1px solid rgba(246, 211, 107, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.card.hidden {
  display: none;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--gold);
}

h1,
h2 {
  margin: 10px 0 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

h1 {
  font-size: 52px;
  line-height: 1;
  color: #ffe7a3;
  text-shadow: 0 4px 0 #8a1b2c, 0 10px 24px rgba(0, 0, 0, 0.45);
}

h2 {
  font-size: 40px;
  color: #ffe7a3;
}

.blurb {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 247, 230, 0.82);
}

.best,
.scoreline {
  margin: 0 0 16px;
  color: var(--gold-2);
}

.scoreline strong,
.best strong {
  font-size: 28px;
}

.card button {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffd978, #f0b133);
  color: #4a220c;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  box-shadow: 0 6px 0 #b07a14;
}

.card button:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #b07a14;
}
