:root{color-scheme:light;--ink:#24366c;--bg:#b2eff9;--gold:#ffd74c;--green:#238061}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,-apple-system,sans-serif;overscroll-behavior:none;background-image:radial-gradient(ellipse at 10% 10%,#c9f7ff 0,transparent 55%),radial-gradient(ellipse at 90% 80%,#90e0f1 0,transparent 60%);min-height:100svh}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #2c5fc3;outline-offset:3px}button:disabled{cursor:default}.game{width:min(100%,470px);margin:auto;padding: max(14px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));user-select:none}header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px;text-align:center}h1{margin:0;font-size:clamp(24px,6.8vw,33px);font-weight:850;letter-spacing:-1.3px;line-height:1.13}.eyebrow{font-size:12px;font-weight:650;opacity:.65;margin:6px 0 0}.circle{border:0;background:#fff;width:43px;height:43px;flex-shrink:0;border-radius:50%;font-size:24px;font-weight:700;box-shadow:0 4px 12px #28557d12;display:grid;place-items:center}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.goals{background:#fff;border-radius:24px;padding:13px 10px 11px;box-shadow:0 5px 15px #28557d0d;margin-bottom:12px}h2{font-size:17px;line-height:1.25;margin:0;text-align:center;font-weight:800}.goal-list{display:flex;justify-content:space-between;margin-top:6px}.goal{display:flex;align-items:center;justify-content:center;width:33.333%;gap:2px;font-size:22px;font-weight:800}.goal+.goal{border-left:1px solid #eaf0f3}.goal .art{width:61px;height:61px;border-radius:13px;flex-shrink:0}.goal small{font-size:15px;opacity:.55}.goal.done{color:var(--green)}.progress{height:4px;background:#edf2f5;border-radius:4px;margin:7px 7px 0;overflow:hidden}.progress i{display:block;height:100%;width:0;background:#64c3b7;transition:width .4s;border-radius:inherit}.board{position:relative;width:100%;aspect-ratio:5/6;touch-action:none}.tile{position:absolute;width:calc(20% - 6px);height:calc(16.666667% - 6px);border:0;padding:0;background:#fff;border-radius:20%;box-shadow:0 3px 6px #296b7910;transition:left .21s ease,top .24s ease,transform .18s,opacity .18s;touch-action:none;overflow:hidden;z-index:1}.art{display:block;background-image:url(assets/figurines.png);background-size:320.57143% 400.57143%;background-repeat:no-repeat}.tile .art{width:100%;height:100%;border-radius:inherit;pointer-events:none}.type-0{background-position:3.1088% 34.6958%}.type-1{background-position:51.0363% 34.6958%}.type-2{background-position:96.3731% 34.6958%}.type-3{background-position:3.1088% 74.1445%}.type-4{background-position:51.0363% 74.1445%}.type-5{background-position:96.3731% 74.1445%}.tile.selected{box-shadow:inset 0 0 0 4px var(--gold),0 0 0 3px var(--gold);transform:scale(.94);z-index:3}.tile.hinted{animation:hint 1s ease-in-out infinite;box-shadow:0 0 0 3px #e6ae1b;z-index:3}.tile.arriving{opacity:0;transform:translateY(-70px)}.tile.invalid{animation:shake .2s ease}footer{text-align:center;padding-top:10px}#status{font-weight:750;font-size:14px;margin:0;min-height:20px}.instruction{font-size:12px;opacity:.7;margin:3px 0 12px}.pill{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:#fff;border-radius:999px;padding:12px 23px;font-weight:750;box-shadow:0 4px 12px #28557d10}.pill svg{color:#e9a400;width:21px;height:21px;stroke-width:2}.pill:active,.circle:active{transform:scale(.95)}dialog{border:0;border-radius:30px;padding:28px 24px;max-width:min(88vw,370px);color:var(--ink);box-shadow:0 24px 100px #132f6640}dialog::backdrop{background:#193a665c;backdrop-filter:blur(5px)}.modal-icon{font-size:53px;text-align:center;color:#ed99a7;line-height:1.1;margin-bottom:16px}.modal-content h2{font-size:25px}.modal-content p{font-size:15px;line-height:1.65;text-align:center;white-space:pre-line;margin:14px 0 22px}.modal-content button{width:100%;margin-top:9px}.primary{background:var(--ink);color:white}.secondary{background:#eef7fa;box-shadow:none}.sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}#celebration{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:10}.confetti{position:absolute;top:-20px;width:9px;height:14px;border-radius:3px;animation:confetti 2.8s ease-in forwards}@keyframes confetti{to{transform:translateY(110vh) rotate(680deg)}}@keyframes hint{50%{transform:scale(.91)}}@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@media(min-width:700px){.game{padding-top:24px}.game:before{content:"";position:fixed;inset:0;z-index:-1;background:radial-gradient(circle at 15% 65%,#ffffff30 0 12%,transparent 12.1%),radial-gradient(circle at 85% 25%,#ffffff30 0 10%,transparent 10.1%)}}@media(max-height:760px) and (min-width:360px){.game{max-width:min(100%,calc((100svh - 285px)*.8333 + 24px))}header{margin-bottom:10px}h1{font-size:25px}.eyebrow{font-size:11px;margin-top:3px}.goals{padding:10px 8px 8px;margin-bottom:8px}.goal .art{width:48px;height:48px}.goal{font-size:19px}footer{padding-top:6px}.instruction{margin-bottom:8px}.pill{padding:10px 19px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Keep the family photo intact; fit it inside the illustrated monitor screen. */
.art.type-3{position:relative}
.art.type-3::after{content:"";position:absolute;left:16%;top:25.7%;width:60%;height:48.6%;background:url(assets/son-monitor.jpeg) center 58%/cover no-repeat;clip-path:polygon(0 9.4%,94.3% 0,100% 90.6%,5.2% 100%);pointer-events:none}

/* Match feedback is layered above the board and never captures input. */
#match-effects{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:15;contain:layout paint style;isolation:isolate}
#match-effects>span{position:absolute;pointer-events:none}
.match-beam{border-radius:999px;background:linear-gradient(90deg,transparent,var(--beam-color),#fff,var(--beam-color),transparent);box-shadow:0 0 15px 5px #fff9;opacity:0}
.match-ring{border:3px solid;border-radius:35%;opacity:0;box-shadow:0 0 10px #fff8}
.match-spark{border-radius:50%;opacity:0}
.match-spark.star{clip-path:polygon(50% 0,62% 35%,100% 50%,62% 65%,50% 100%,38% 65%,0 50%,38% 35%)}
.match-fly{border-radius:50%;box-shadow:0 0 16px 3px #fff8;opacity:0;z-index:2}
.match-badge{padding:9px 16px;min-height:40px;line-height:1.25;text-align:center;display:flex;align-items:center;justify-content:center;color:#24366c;background:#fff7cf;border:2px solid white;border-radius:999px;box-shadow:0 5px 16px #32548922;font-size:14px;font-weight:850;white-space:normal;overflow-wrap:anywhere;z-index:3;opacity:0}
@media(prefers-reduced-motion:reduce){#match-effects{display:none}}

[hidden]{display:none!important}
.game{transition:opacity .45s ease,transform .45s ease}
.game.leaving{opacity:0;transform:scale(.97);pointer-events:none}
.finale{width:min(100%,470px);min-height:100svh;margin:auto;padding:max(24px,env(safe-area-inset-top)) 24px max(28px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;animation:final-enter .6s ease both}
.finale h2{font-size:clamp(25px,7vw,32px);line-height:1.2;margin:12px 0 4px;max-width:340px;outline:none}
.final-monitor{width:min(72vw,290px);aspect-ratio:1;border-radius:26%;margin:12px auto 16px;box-shadow:0 12px 32px #28557d18;flex-shrink:0}
.gift-clue{background:#ffffffd9;border-radius:24px;padding:6px 12px;margin-bottom:20px;font-size:clamp(11px,3.55vw,16px);line-height:1.55}
.gift-clue p{margin:14px 0}.gift-clue p:last-child{font-weight:700}
.gift-end{font-size:21px;font-weight:700;margin:12px 0 24px}
.finale .primary{min-width:210px;min-height:48px}
.replay{border:0;background:transparent;font-size:13px;padding:16px;color:#3d5681;margin-top:4px;text-decoration:underline;text-underline-offset:3px}
@keyframes final-enter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}

.gift-clue{width:100%}.gift-clue span{white-space:nowrap}

.board.shuffling .tile{transition:left .6s ease-in-out,top .6s ease-in-out;opacity:1}
