/* styles/main.css */
:root {
    --panel: #fffef7; --ink: #2c3e50;
    --accent: #66bb6a; --accent-dark: #43a047;
    --font: "Fredoka", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; min-height: 100%;
    font-family: var(--font); color: var(--ink);
    background: linear-gradient(180deg,#c8e6c9 0%,#a5d6a7 50%,#81c784 100%); background-attachment: fixed;
    overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
#game-container {
    width: min(100vw, 520px); margin: 0 auto;
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center;
    padding: 0.6rem 0.6rem 1rem; gap: 0.4rem;
}
header { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.4rem; }
.home-link { text-decoration: none; font-size: 1.4rem; line-height: 1; padding: 0.25rem 0.4rem; border-radius: 10px; background: rgba(255,255,255,0.55); }
h1 { margin: 0; font-size: clamp(1.15rem, 4.5vw, 1.55rem); font-weight: 700; text-align: center; color: #8B5A2B; text-shadow: 1px 1px 0 rgba(255,255,255,0.6); }
#stats { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.75rem; font-weight: 600; line-height: 1.25; background: rgba(255,255,255,0.55); padding: 0.3rem 0.5rem; border-radius: 10px; white-space: nowrap; }
#combo { color: #8e44ad; }
main { position: relative; width: 100%; flex: 1; display: flex; justify-content: center; align-items: center; min-height: 0; }
#gameCanvas { display: block; width: 100%; max-width: 480px; height: auto; max-height: min(70vh, 640px); border-radius: 18px; border: 4px solid #fff; box-shadow: 0 12px 28px rgba(0,0,0,0.18); background: #7cb342; touch-action: none; cursor: pointer; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(40,60,20,0.35); border-radius: 18px; padding: 1rem; }
.overlay.hidden { display: none; }
.panel { background: var(--panel); border-radius: 20px; padding: 1.4rem 1.2rem; max-width: 320px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); border: 3px solid #a5d6a7; }
.panel h2 { margin: 0 0 0.6rem; font-size: 1.6rem; color: #8B5A2B; }
.panel p { margin: 0 0 0.75rem; font-size: 1rem; line-height: 1.35; }
.panel .hint { font-size: 0.85rem; opacity: 0.75; margin-bottom: 1rem; }
#start-btn { font-family: var(--font); font-size: 1.25rem; font-weight: 700; padding: 0.7rem 2rem; border: none; border-radius: 999px; background: var(--accent); color: white; cursor: pointer; box-shadow: 0 5px 0 var(--accent-dark); }
#start-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-dark); }
.bottom-bar { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 0.45rem; padding: 0.25rem 0.5rem 0; align-items: center; }
.tip { margin: 0; font-size: 0.8rem; font-weight: 600; opacity: 0.75; text-align: center; }
#done-btn { font-family: var(--font); font-size: 1rem; font-weight: 700; padding: 0.65rem 1rem; border: none; border-radius: 999px; background: #8d6e63; color: white; cursor: pointer; box-shadow: 0 4px 0 #6d4c41; width: 100%; }
#done-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #6d4c41; }
@media (max-height: 700px) { h1 { font-size: 1.1rem; } #stats { font-size: 0.68rem; } .tip { font-size: 0.72rem; } }
