.family-tile{background:linear-gradient(145deg,#fff2b8,#ffd899);color:#704f61}.family-picture{display:grid;grid-template-columns:1fr 1fr;align-items:center;justify-items:center;width:165px;height:165px;border:7px solid #fff;border-radius:31px;background:linear-gradient(135deg,#f7c4df,#cfc3ff);box-shadow:0 7px 0 #caabd0;transform:rotate(-5deg)}.family-picture i,.family-picture b,.family-picture em{font:900 74px/1 system-ui;color:#795cae;font-style:normal}.family-picture b{color:#f07493}.family-picture em{grid-column:1/-1;font-size:55px;color:#ffe279;text-shadow:0 2px #b27d65}
.family-screen,.family-game-screen{max-width:1120px;margin:0 auto;padding:36px 22px 70px;text-align:center}.family-screen[hidden],.family-game-screen[hidden]{display:none}.family-heading h1,.family-game-head h1{font-size:clamp(36px,5vw,60px);color:#6552a7;margin:7px 0}.family-heading p{font-size:20px;font-weight:800;color:#5f7c9c}.family-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:36px}.family-tiles .game-tile{min-height:285px}.tic-tile{background:linear-gradient(145deg,#cde9ff,#acd8f7);color:#355b8b}.checkers-tile{background:linear-gradient(145deg,#ffe6b4,#ffd09c);color:#78543e}.family-tile-art{width:155px;height:155px;display:grid;place-items:center;border:6px solid white;border-radius:28px;background:#fff9;font-size:54px;line-height:1.2;color:#765bb4;box-shadow:0 6px 0 #abc7dc}.checker-art{font-size:45px;background:repeating-conic-gradient(#f6dfbc 0% 25%,#8e634d 0% 50%) 50%/50px 50px;color:#fff;text-shadow:0 2px 4px #433}.in-family .game-dock #open-book,.in-family .game-dock #open-playground{display:none}.in-family .game-dock{width:auto}.in-family .game-dock #open-home{min-width:90px}
.family-game-head{display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;margin-bottom:18px}.family-game-head h1{font-size:clamp(30px,4vw,49px)}.family-nav{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.family-nav button,.family-modes button,.family-again{min-height:50px;padding:9px 18px;border:3px solid white;border-radius:17px;font-weight:900;font-size:17px;box-shadow:0 4px 0 #b8c8d5;touch-action:manipulation}.family-nav button{background:#fff2ad;color:#745f34}.family-game-panel{width:min(100%,740px);margin:0 auto;padding:20px;border:5px solid white;border-radius:32px;background:#fdf8ee;box-shadow:0 8px 0 #b8d8e2}.family-modes{display:flex;gap:10px;justify-content:center}.family-modes button{background:#e9e4f9;color:#615286}.family-modes button[aria-pressed=true]{background:#bde4ff;color:#305e8a;box-shadow:0 4px 0 #78b5d9}.family-status{font-size:clamp(21px,3vw,30px);font-weight:900;color:#674e99;min-height:38px;margin:15px 0}.family-again{margin-top:18px;background:#ffd563;color:#765120}.family-mode-note,.family-rule{color:#6d6790;font-size:17px;font-weight:800}.family-rule{font-size:14px;margin:13px 0 0}
.tic-board{width:min(78vw,460px);aspect-ratio:1;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.tic-cell{border:5px solid white;border-radius:23px;background:#e0edff;color:#6652ac;font:900 clamp(52px,11vw,110px)/1 system-ui;box-shadow:0 5px 0 #b4c7e6;touch-action:manipulation}.tic-cell.is-o{color:#ef7791}.tic-cell:disabled{opacity:1;cursor:default}.tic-cell:not(:disabled):active,.checker-square:active{transform:scale(.96)}
.checkers-board{width:min(86vw,590px);aspect-ratio:1;margin:0 auto;display:grid;grid-template-columns:repeat(8,1fr);border:6px solid #7b5947;border-radius:13px;overflow:hidden;box-shadow:0 6px 0 #a99280;touch-action:manipulation}.checker-square{position:relative;display:grid;place-items:center;min-width:0;min-height:0;padding:0;border:0;border-radius:0;touch-action:manipulation}.checker-square.light{background:#f4e4c8}.checker-square.dark{background:#976e56}.checker-square.selected{background:#d2b957}.checker-square.legal:after{content:'';position:absolute;width:35%;aspect-ratio:1;border-radius:50%;background:#fff7;box-shadow:0 0 0 3px #ffe187}.checker-piece{position:relative;z-index:1;width:76%;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;border:3px solid #fff9;box-shadow:inset 0 -7px #0003,0 4px 3px #38282070;font-size:clamp(14px,3vw,34px);color:#fff3a8}.checker-piece.red{background:#da5966}.checker-piece.black{background:#364258}.checker-piece:empty:after{content:'';width:58%;aspect-ratio:1;border:2px solid #fff5;border-radius:50%}
@media(max-width:760px){.family-screen,.family-game-screen{padding:24px 13px 100px}.family-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px}.family-tiles .game-tile{min-height:210px}.family-tiles>.game-tile:last-child{grid-column:1/-1;width:calc(50% - 6px);justify-self:center}.family-tile-art{width:110px;height:110px;font-size:38px}.checker-art{font-size:31px}.family-picture{width:108px;height:108px;border-radius:24px}.family-picture i,.family-picture b{font-size:45px}.family-picture em{font-size:34px}.family-game-head{flex-direction:column;align-items:center;text-align:center;gap:7px}.family-nav{justify-content:center}.family-nav button{font-size:14px;min-height:47px;padding:7px 10px}.family-game-panel{padding:13px;border-radius:24px}.tic-board{width:min(88vw,400px);gap:6px}.tic-cell{border-radius:15px}.checkers-board{width:min(90vw,500px)}.checker-piece{border-width:2px}}
@media(max-width:400px){.family-tiles .game-tile{min-height:190px}.family-tiles .game-tile strong{font-size:17px}.family-tiles .game-tile small{font-size:12px}.family-tile-art{width:92px;height:92px;font-size:31px}.checker-art{font-size:26px}.family-modes button{font-size:15px;padding:7px 12px}}
@media(prefers-reduced-motion:reduce){.family-tiles .game-tile.playful{animation:none}}

/* Roomy, square boards that remain usable above the fixed LisaLand dock. */
.family-game-screen{padding-bottom:calc(130px + env(safe-area-inset-bottom));}
.family-board-open .game-dock{display:none}
.family-board-open .family-game-screen{padding-bottom:calc(40px + env(safe-area-inset-bottom))}
.family-game-panel{width:min(100%,780px);padding:clamp(16px,3vw,30px);background:linear-gradient(155deg,#fffdf6,#eef7ff);box-shadow:0 9px 0 #b8d8e2,0 19px 34px #657fa326;}
.family-status{margin:16px 0 20px;line-height:1.25;}
.family-rule{max-width:560px;margin:18px auto 0;line-height:1.4;}
.family-again{margin-top:19px;}
.checker-end-turn{margin-right:10px;background:#d6f4db;color:#37624b;box-shadow:0 4px 0 #9fcfa8}
.checker-end-turn[hidden]{display:none}
.tic-board{width:min(100%,470px);grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:clamp(7px,1.5vw,12px);padding:clamp(7px,1.5vw,12px);border:4px solid #d3dafa;border-radius:30px;background:#f5f2ff;box-shadow:0 8px 0 #c6cbea,0 13px 25px #7772ad24;}
.tic-cell{position:relative;min-width:0;min-height:0;padding:0;border:3px solid white;border-radius:clamp(14px,2vw,25px);background:linear-gradient(150deg,#f5fbff,#dcecff);box-shadow:inset 0 -5px #b7cde355,0 4px 0 #b4c7e6;font-size:clamp(42px,9vw,110px);line-height:1;}
.tic-cell.is-x{color:#6e60ba;text-shadow:0 3px #ffffffaa;}
.tic-cell.is-o{color:#e36585;text-shadow:0 3px #ffffffaa;}
.tic-cell.is-oldest:after{content:'next';position:absolute;right:7px;bottom:6px;padding:2px 5px;border-radius:8px;background:#fff5bd;color:#725643;font:800 clamp(9px,1.5vw,12px)/1 system-ui;text-transform:uppercase;}
.tic-cell.just-left{animation:family-empty-pop .35s ease-out;}
@keyframes family-empty-pop{from{background:#ffeab3;transform:scale(.89)}to{background:#e0edff;transform:scale(1)}}
.checkers-board{width:min(100%,520px);grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));border:clamp(6px,1vw,10px) solid #73513d;border-radius:18px;background:#e5caa7;box-shadow:0 7px 0 #9c7b63,0 17px 28px #73513d33;}
.checker-square.light{background:#f6e7cc}.checker-square.dark{background:#936b56}
.checker-square.selected{background:#c8b8ed;box-shadow:inset 0 0 0 4px #684caf;}
.checker-square.legal:after,.checker-square.capture:after{content:'';position:absolute;z-index:2;width:37%;aspect-ratio:1;border-radius:50%;background:#d6e7ff;box-shadow:0 0 0 3px #5c8bd8;}
.checker-square.capture:after{width:52%;background:#fff0a8;box-shadow:0 0 0 4px #f5bd42,0 0 15px #fff1a0;}
.checker-square.can-capture .checker-piece{outline:3px solid #ffdc70;outline-offset:1px;}
.checker-piece{width:78%;border:clamp(2px,.45vw,4px) solid #fff9;box-shadow:inset 0 3px #ffffff55,inset 0 -7px #0004,0 3px 5px #37292188;font-size:clamp(16px,3vw,37px);}
.checker-piece.red{background:radial-gradient(circle at 38% 25%,#ffadb1,#d95767 68%,#a5324a);}
.checker-piece.black{background:radial-gradient(circle at 38% 25%,#7d8b9c,#35465c 68%,#1c2739);}
.checker-piece.king{color:#fff1a4;text-shadow:0 1px 2px #4d311e,0 0 5px #fff0ac;box-shadow:inset 0 3px #ffffff77,inset 0 -7px #0004,0 3px 5px #37292188,0 0 0 2px #ffd975;}
.family-result[hidden]{display:none}
.family-result{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:20px;background:#29334a9c;backdrop-filter:blur(4px);}
.family-result-card{width:min(100%,440px);padding:30px 24px;border:5px solid white;border-radius:31px;background:linear-gradient(150deg,#fff7d9,#eef4ff 68%,#f4eaff);box-shadow:0 18px 0 #303c5980,0 27px 55px #202a4599;animation:family-result-pop .3s ease-out;text-align:center;}
.family-result-stars{font-size:36px;color:#e8ae39;letter-spacing:.25em;}
.family-result-card p{margin:7px 0;font-size:19px;font-weight:800;color:#646184;}
.family-result-card h2{margin:8px 0 23px;font-size:clamp(35px,8vw,54px);line-height:1;color:#594c9c;}
.family-result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;}
.family-result-actions button{min-height:52px;padding:10px 17px;border:3px solid white;border-radius:17px;background:#ffd763;color:#654f24;font-size:16px;font-weight:900;box-shadow:0 4px 0 #c5ab65;touch-action:manipulation;}
.family-result-actions button:last-child{background:#dce9ff;color:#4a5e87;box-shadow:0 4px 0 #a6b9d9;}
@keyframes family-result-pop{from{opacity:0;transform:translateY(16px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:760px){.family-game-screen{padding-bottom:calc(130px + env(safe-area-inset-bottom));}.family-game-panel{padding:clamp(11px,3vw,20px)}.family-game-head{margin-bottom:15px}.family-status{margin:12px 0 14px}.tic-board,.checkers-board{width:100%}.tic-cell.is-oldest:after{right:4px;bottom:4px}.family-rule{font-size:13px}}
@media(min-width:761px) and (max-height:850px){.family-game-screen{padding-top:16px}.family-game-head{margin-bottom:8px}.family-game-panel{padding:16px}.family-status{margin:8px 0 12px}.tic-board{width:min(100%,400px)}.checkers-board{width:min(100%,420px)}}
@media(prefers-reduced-motion:reduce){.family-result-card,.tic-cell.just-left{animation:none}}
