:root { --c: #e58fb0; --c2: #fbe3ec; --ink: #5b3a4a; }
body.t0 { --c: #6fa8dc; --c2: #e3f0fb; --ink: #2f4a66; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: "Nunito", "Trebuchet MS", system-ui, sans-serif; color: var(--ink); background: linear-gradient(180deg, var(--c2), #fff8f3 70%); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
body.t1 { background: linear-gradient(180deg, #fbe3ec, #fff8f3 70%); }
.v { display: none; position: absolute; inset: 56px 0 0; padding: 16px 22px calc(20px + env(safe-area-inset-bottom)); flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.v.on { display: flex; }
#team { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 18px; color: #fff; background: var(--c); box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
#team:empty, body:not(.t0):not(.t1) #team { background: #e8c7d4; }
#tImg { height: 36px; }
#tImg:not([src]) { display: none; }
h1 { margin: 0; font-size: 30px; line-height: 1.15; }
p { margin: 0; font-size: 17px; line-height: 1.4; max-width: 340px; }
.pick { width: 100%; max-width: 360px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 0; border-radius: 28px; font: inherit; font-size: 24px; font-weight: 900; color: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .12), inset 0 2px 0 rgba(255, 255, 255, .5); }
.pick img { height: 70px; }
.pick.boy { background: linear-gradient(160deg, #9cc7ee, #5f98d0); }
.pick.girl { background: linear-gradient(160deg, #f6b5cc, #df7fa5); }
.big { border: 0; border-radius: 999px; padding: 22px 34px; font: inherit; font-size: 26px; font-weight: 900; color: #fff; background: var(--c); box-shadow: 0 12px 30px rgba(0, 0, 0, .15), inset 0 3px 0 rgba(255, 255, 255, .45); }
.big:active, .big.on { transform: scale(.95); filter: brightness(1.08); }
.link { border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); opacity: .6; text-decoration: underline; padding: 10px; }
.err { color: #c0395e; font-weight: 700; }
.err:empty { display: none; }
#status { font-size: 30px; font-weight: 900; max-width: 360px; }
#status.go { font-size: 54px; color: var(--c); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
#meter { width: 86%; max-width: 360px; height: 34px; border-radius: 99px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .1); overflow: hidden; }
#meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--c), #f4cf6a); transition: width .12s; }
#tap { display: none; width: 220px; height: 220px; border-radius: 50%; padding: 0; font-size: 30px; }
body.tapmode #tap { display: block; }
#eImg { height: 160px; }
#eImg:not([src]) { display: none; }
.spin { width: 46px; height: 46px; border-radius: 50%; border: 5px solid #f3c6d7; border-top-color: #9cc7ee; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(1turn); } }
