:root { --vari: #8ecae6; color-scheme: dark; }
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { background: #14213d; }
body { font: 500 1.15rem/1.4 ui-rounded, system-ui, sans-serif; color: #fff; min-height: 100dvh; touch-action: manipulation; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; background: linear-gradient(#14213d, #3b4f7a); }
section { min-height: 100dvh; padding: max(1.2rem, env(safe-area-inset-top)) max(1.2rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1.2rem, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 1rem; }
#koodi, #alku { justify-content: center; text-align: center; align-items: center; }
h1 { font-size: 2.6rem; }
.iso { font-size: 1.5rem; }
p { max-width: 26rem; }
button { font: inherit; font-weight: 700; color: #14213d; background: #fff; border: 0; border-radius: 999px; padding: 1rem 1.6rem; min-height: 3.5rem; }
button:active { transform: scale(.97); }
form { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
input { font: 700 2rem ui-monospace, monospace; width: 7rem; text-align: center; text-transform: uppercase; border: 0; border-radius: 1rem; padding: .6rem; color: #14213d; background: #fff; -webkit-user-select: text; user-select: text; }
header { display: flex; justify-content: space-between; font-size: 1.6rem; font-weight: 800; }
#hahmo { color: var(--vari); }
#kentta { flex: 1; min-height: 8rem; display: grid; place-items: center; position: relative; touch-action: none; border-radius: 2rem; border: 4px solid var(--vari); overflow: hidden; transition: background .15s; }
#kentta.osuma { background: var(--vari); }
#pallo { width: min(38vw, 30dvh); aspect-ratio: 1; border-radius: 49% 51% 52% 48% / 51% 48% 52% 49%; background: radial-gradient(circle at 35% 30%, #fff, #d4e5f7 70%, #a9c3e2); box-shadow: 0 1rem 2rem #0006; }
#pallo.lentaa { animation: lento .45s ease-in; }
@keyframes lento { 0% { transform: none } 60% { transform: translateY(-70dvh) scale(.3) } 61% { opacity: 0; transform: translateY(40dvh) } 100% { opacity: 1; transform: none } }
#ohje { position: absolute; bottom: 1rem; text-align: center; padding: 0 1rem; }
footer { display: flex; gap: .7rem; }
footer button { flex: 1; padding-inline: .6rem; }
#keskita { background: #ffffff2e; color: #fff; }
#aloita { background: var(--vari); }
#ilmoitus { position: fixed; inset: auto 1rem calc(1rem + env(safe-area-inset-bottom)); background: #7a1f2b; border-radius: 1rem; padding: 1rem; text-align: center; z-index: 5; }
@media (orientation: landscape) and (max-height: 480px) { section { gap: .5rem } h1 { font-size: 1.8rem } }
