/* Kids on a phone or tablet: big pictures, few words (and those for the parent). Modern browsers only. */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: linear-gradient(#bfe9ff, #fff4d6); background-attachment: fixed; color: #3b2a20; font: 600 17px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
#app { min-height: 100%; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; background: #fff; border-radius: 22px; box-shadow: 0 5px 0 rgba(59,42,32,.15); cursor: pointer; touch-action: manipulation; }
button:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(59,42,32,.15); }
.pic { display: block; width: 100%; height: 100%; pointer-events: none; }
.note { font-size: 14px; opacity: .65; text-align: center; }
section { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }

/* parent: a new child */
.setup { justify-content: flex-start; gap: 10px; max-width: 560px; margin: 0 auto; width: 100%; }
.setup h1 { font-size: 24px; margin-top: 8px; }
.setup h2 { font-size: 16px; margin-top: 8px; align-self: flex-start; }
.setup label { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.setup input { font: inherit; font-size: 20px; padding: 12px 14px; border-radius: 14px; border: 3px solid #fff; -webkit-user-select: text; user-select: text; }
.setup input.need { border-color: #ff7a59; }
.group { display: flex; flex-wrap: wrap; gap: 10px; align-self: stretch; }
.group button { padding: 12px 18px; border: 4px solid transparent; }
.group button.on { border-color: #ff7a59; }
.group[data-group="buddy"] button { width: calc(25% - 8px); aspect-ratio: 1; padding: 6px; }
.row { display: flex; gap: 14px; margin-top: 12px; justify-content: center; }
.row button { padding: 12px 20px; }
button.big { background: #ff7a59; color: #fff; padding: 14px 28px; font-size: 20px; }

/* parent: who's playing, sticker book */
.who h1 { font-size: 26px; margin-bottom: 18px; text-align: center; }
.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.kid { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; position: relative; text-align: center; }
.kid .buddy { width: 130px; height: 130px; border-radius: 50%; padding: 14px; }
.kid .buddy.add { font-size: 64px; color: #ff7a59; }
.kid .book { position: absolute; top: 0; right: 0; width: 46px; height: 46px; border-radius: 50%; padding: 9px; }
.kid .book b { position: absolute; bottom: -4px; right: -6px; background: #ff7a59; color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 6px; }
.warn { background: #fff; padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; text-align: center; }
.warn.shake { animation: wiggle .5s; }
.bookview .who-small { width: 90px; height: 90px; margin-bottom: 16px; }
.bookview .stickers { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.bookview .sticker { width: 90px; height: 90px; border-radius: 50%; background: #fff; padding: 12px; box-shadow: 0 0 0 4px #ffd23f; }
.back { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; width: 52px; height: 52px; border-radius: 50%; padding: 10px; }

/* the child */
.leave { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; width: 44px; height: 44px; border-radius: 50%; padding: 9px; opacity: .5; z-index: 5; }
.leave.holding { opacity: 1; box-shadow: 0 0 0 6px #ff7a59; transition: box-shadow 1s; }
.wait > .pic { width: 46vmin; height: 46vmin; opacity: .55; }
.wait .dots { display: flex; gap: 12px; margin-top: 20px; }
.wait .dots i { width: 18px; height: 18px; border-radius: 50%; background: #3b2a20; opacity: .4; animation: blink 1.2s infinite; }
.wait .dots i:nth-child(2) { animation-delay: .2s; }
.wait .dots i:nth-child(3) { animation-delay: .4s; }
.connmsg { margin-top: 18px; }
.menu { gap: 18px; flex-direction: row; flex-wrap: wrap; align-content: center; }
.menu .tile { width: min(40vw, 30vh); aspect-ratio: 1; padding: 6%; border-radius: 28px; }
.question { gap: 16px; }
.speaker { width: 72px; height: 72px; border-radius: 50%; padding: 10px; }
.choices { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.choice { aspect-ratio: 1; padding: 6%; border-radius: 28px; transition: opacity .4s, transform .4s; }
.choices.n2 .choice { width: min(36vh, 80vw); }
.choices.n3 .choice { width: min(25vh, 72vw); }
.choice.faded { opacity: .3; filter: grayscale(1); transform: scale(.9); }
.choice.glow { animation: glow 1.2s ease-in-out infinite; }
.choice.wiggle { animation: wiggle .6s; }
/* Big & small: the same picture drawn smaller inside its card */
.sz { width: 100%; height: 100%; }
.sz-middle { padding: 17%; }
.sz-small { padding: 32%; }
@media (orientation: landscape) {
  .choices, .menu { flex-direction: row; }
  .choices.n2 .choice, .choices.n3 .choice { width: min(28vw, 62vh); }
  .menu .tile { width: min(22vw, 40vh); }
}
.yay > .pic { width: 55vmin; height: 55vmin; animation: jump .6s ease-in-out infinite alternate; }
.stickerview .sticker.big { width: 50vmin; height: 50vmin; border-radius: 50%; background: #fff; padding: 8vmin; box-shadow: 0 0 0 10px #ffd23f, 0 0 40px #ffd23f; animation: pop .6s ease-out; }
.stickerview .row { gap: 22px; margin-top: 40px; }
button.icon { width: 84px; height: 84px; border-radius: 50%; padding: 16px; }

@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(5deg); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,210,63,.9), 0 5px 0 rgba(59,42,32,.15); } 50% { box-shadow: 0 0 0 16px rgba(255,210,63,.6), 0 5px 0 rgba(59,42,32,.15); } }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: .7; } }
@keyframes jump { from { transform: translateY(0); } to { transform: translateY(-6vh); } }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
