/* uinvited — 미니게임 '하트 점프'
   색은 전부 테마 변수에서 받는다. 캔버스 안도 같은 값을 읽어 쓴다. */

.game__prize {
  margin: 0 0 14px; text-align: center;
  font-size: 14px; line-height: 1.7; color: var(--ink-2);
  word-break: keep-all;
}
.game__prize b { color: var(--accent); }

.game__stage {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden;
  aspect-ratio: 360 / 190;
}
.game__canvas {
  display: block; width: 100%; height: 100%;
  touch-action: manipulation;     /* 두 번 눌러 확대되는 일 없이 바로 점프로 간다 */
  cursor: pointer;
}

.game__hud {
  position: absolute; top: 8px; left: 10px; right: 10px;
  display: flex; align-items: baseline; justify-content: space-between;
  pointer-events: none;
}
.game__hudscore {
  font-family: var(--font-num); font-size: 20px; line-height: 1;
  color: var(--ink); letter-spacing: .04em;
}
.game__hudbest { font-size: 11px; color: var(--ink-3); letter-spacing: .02em; }

/* 시작·결과 화면 — 캔버스를 덮되 비치게 둔다 */
.game__veil {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 12px;
}
.game__veil[hidden] { display: none; }
.game__panel { text-align: center; width: 100%; max-width: 300px; }
.game__panelttl {
  margin: 0 0 2px; font-family: var(--font-display); font-weight: var(--font-display-weight);
  font-synthesis-weight: none; font-size: 22px; line-height: 1.3; color: var(--ink);
}
.game__paneltxt {
  margin: 0 0 8px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  word-break: keep-all;
}

/* 캔버스 위에 얹히는 칸이라 두 줄을 넘기지 않는다 */
.game__save { display: flex; flex-direction: column; gap: 6px; }
.game__saverow { display: flex; gap: 6px; }
.game__saverow .btn { flex: 1; min-width: 0; white-space: nowrap; }
.game__save input {
  width: 100%; min-width: 0; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; font-family: inherit;
}
.game__saverow input[name="name"] { flex: 1; }
.game__saverow input[name="pin"] { flex: 1.25; }
.game__save input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.game__help {
  margin: 8px 0 14px; text-align: center;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em;
}

/* ---------- 순위표 ---------- */

.game__rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.game__row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg);
}
/* 선물이 걸린 자리는 눈에 띄어야 한 번 더 하게 된다 */
.game__row.is-prize {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.game__no {
  flex: 0 0 22px; text-align: center;
  font-family: var(--font-num); font-size: 14px; color: var(--ink-3);
}
.game__row.is-prize .game__no { color: var(--accent); font-weight: 700; }
.game__name {
  flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.game__pts { font-family: var(--font-num); font-size: 14px; color: var(--ink-2); letter-spacing: .03em; }
.game__row.is-prize .game__pts { color: var(--ink); }

.game__count { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: var(--ink-3); }
.game__empty {
  margin: 0; padding: 20px 0; text-align: center;
  font-size: 13px; line-height: 1.8; color: var(--ink-3);
}
