/* Sky Isle - everything on top of the canvas */
body { background: #ffd3a8; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; }
canvas:active { cursor: grabbing; }

.title { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 9vh 24px 8vh; box-sizing: border-box; text-align: center; pointer-events: none; transition: opacity 0.6s ease; z-index: 10; }
.title h1 { margin: 0; font-size: clamp(48px, 9vw, 104px); line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 0 rgb(214 120 120 / 0.35), 0 6px 40px rgb(120 60 110 / 0.5); }
.title p { margin: 0; padding: 10px 20px; border-radius: 9999px; background: rgb(60 36 70 / 0.42); color: #fff; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.01em; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.playing .title { opacity: 0; }

.hud { position: fixed; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; z-index: 20; }
.count { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 10px; border-radius: 9999px; background: rgb(60 36 70 / 0.45); border: 1px solid rgb(255 255 255 / 0.2); color: #fff; font-size: 14px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-sizing: border-box; }
.count .dot { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #ffd98a 60%, #ffb85c); box-shadow: 0 0 10px 2px rgb(255 214 130 / 0.9); }
.count .of { opacity: 0.7; }
.count.pop { animation: pop 0.45s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 30% { transform: scale(1.22); } 100% { transform: scale(1); } }
.mute { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: rgb(60 36 70 / 0.45); border: 1px solid rgb(255 255 255 / 0.2); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mute:hover { background: rgb(60 36 70 / 0.7); }
.mute svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mute .spk { fill: currentColor; stroke: none; }
.mute .cross { display: none; }
.mute.muted .wave { display: none; }
.mute.muted .cross { display: inline; }

.hint { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 9999px; background: rgb(60 36 70 / 0.45); color: #fff; font-size: 13px; line-height: 18px; font-weight: 500; text-align: center; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; z-index: 15; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-sizing: border-box; }
.hint.show { opacity: 1; }
.touch .hint { display: none; }

.end { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -40%); width: min(360px, calc(100% - 48px)); padding: 28px 24px 24px; border-radius: 24px; background: rgb(255 255 255 / 0.82); color: #3a2a44; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.7s ease, transform 0.7s ease; z-index: 30; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgb(60 90 140 / 0.25); box-sizing: border-box; }
.end.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.end h2 { margin: 0 0 8px; font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
.end p { margin: 0 0 20px; font-size: 15px; line-height: 22px; color: #5d4b68; }
.again { height: 44px; padding: 0 24px; border: 0; border-radius: 9999px; background: #e5566d; color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.again:hover { background: #d2445c; }

.stick, .jump { display: none; position: fixed; z-index: 25; touch-action: none; }
.touch.playing .stick { display: block; left: max(20px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgb(60 36 70 / 0.28); border: 1px solid rgb(255 255 255 / 0.3); box-sizing: border-box; }
.knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgb(255 255 255 / 0.75); box-shadow: 0 2px 10px rgb(60 36 70 / 0.3); pointer-events: none; }
.touch.playing .jump { display: block; right: max(24px, env(safe-area-inset-right)); bottom: max(36px, env(safe-area-inset-bottom)); width: 88px; height: 88px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.4); background: rgb(229 86 109 / 0.7); color: #fff; font: inherit; font-size: 15px; font-weight: 700; }
.touch.playing .jump:active { background: rgb(229 86 109 / 0.95); transform: scale(0.95); }
