/* performance minigame and later additions */
.perf-piece { font-size: 17px; font-weight: 800; color: var(--ultra); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-hint { order: 1; text-align: center; padding: 0 20px; }
.perf-area, #rightContent > .judge, .perf-count { order: 2; }
.perf-area { position: relative; cursor: pointer; }
#perfCanvas.shake { animation: inkShake 0.35s; }
@keyframes inkShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px) rotate(-0.6deg); } 45% { transform: translateX(5px) rotate(0.5deg); } 70% { transform: translateX(-3px); } }
.judge { color: var(--ink); text-shadow: 0 1px 0 rgba(255,245,220,0.8); line-height: 40px; }
.judge.pop { animation: judgePop 0.32s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes judgePop { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.judge.j-perfect { color: #e6ae2e; text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); font-size: 34px; letter-spacing: 0.04em; }
.judge.j-good { color: var(--ultra); text-shadow: 1px 1px 0 var(--gold2); }
.judge.j-miss { color: var(--verm); text-shadow: 1px 1px 0 rgba(255,245,220,0.9); }
.judge.j-ready { color: var(--ink2); font-size: 24px; }
.judge.j-sum { font-size: 20px; color: var(--ink); }
.perf-count { text-align: center; font-size: 18px; font-weight: 800; color: var(--verm); }

#title { cursor: pointer; }
#titleLogo { left: 3%; top: 5%; width: 56%; max-width: 56%; max-height: 38%; }
#titlePrompt { left: 4%; right: auto; width: 52%; bottom: 16%; font-size: 26px; }

/* every grid cell may shrink below its text's width */
.grid2, .end-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid2 > .btn, .end-grid > .btn, .row > .btn { min-width: 0; }

/* hub: 8 actions must fit one page */
.hub-grid { gap: 6px 8px; }
.hub-grid .btn { min-height: 70px; max-height: 74px; padding: 2px 4px; gap: 5px; font-size: 19px; }
.hub-grid .btn img { width: 32px; height: 32px; }
.hub-grid .btn .bl { flex: 1 1 auto; overflow: hidden; min-width: 0; }
.hub-grid .btn .bl > span, .hub-grid .btn .bl small { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-grid .btn .bl small { font-size: 15px; }
#rightContent .calendar { font-size: 16px; padding: 2px 10px; }
.hub-row { padding: 0 60px; }

/* phones: the 960x540 stage is shrunk to ~0.73, so enlarge small text and short buttons */
#app.phone .btn.small { min-height: 62px; font-size: 20px; }
#app.phone .small-note, #app.phone .kv, #app.phone .rank-list { font-size: 19px; }
#app.phone .kv b { font-size: 17px; }
#app.phone .stat .sl { font-size: 17px; }
#app.phone .piece .pc, #app.phone .piece .pm, #app.phone .codex-item .cn { font-size: 16px; }
#app.phone .hub-grid .btn { font-size: 19px; letter-spacing: -0.01em; }
#app.phone .hub-grid .btn img { width: 28px; height: 28px; }
#app.phone .hub-grid .btn .bl small { font-size: 16px; }
#app.phone .head h2 { font-size: 19px; }
#app.phone .pager .btn { min-width: 64px; }
#app.phone .codex-item { min-height: 62px; }
