* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Noto Sans TC", sans-serif; }
main { width: min(100%, calc((100dvh - 120px) * .72), 480px); min-width: 280px; margin-inline: auto; padding: 10px 16px; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
#hearts { color: var(--accent); letter-spacing: 2px; }
#order { display: flex; justify-content: center; gap: 8px; min-height: 40px; margin: 8px 0; }
.chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--item-text); border: 2px solid var(--line); font-weight: 700; }
.chip.done { opacity: .25; }
#patience { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
#patience i { display: block; width: 100%; height: 100%; background: var(--main); transform-origin: left; }
#stage { position: relative; margin-top: 8px; }
canvas { display: block; width: 100%; border-radius: 16px; touch-action: none; }
#panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; background: var(--veil); border-radius: 16px; }
#panel[hidden] { display: none; }
h1, p { margin: 0; }
button { padding: 12px 36px; border: 0; border-radius: 999px; background: var(--main); color: var(--on); font: inherit; font-size: 1.1rem; cursor: pointer; }
