:root{--paper:#fff5e4;--ink:#493831;--teal:#326f6c;--honey:#e8aa55;--coral:#d77967;--sage:#a5b69a;--line:#d7c9ac;--font:"Avenir Next","Trebuchet MS",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);line-height:1.5}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer}a{color:inherit}button:focus-visible,a:focus-visible,select:focus-visible{outline:4px solid var(--honey);outline-offset:5px}.masthead{max-width:1340px;margin:auto;padding:28px 48px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font:700 35px Georgia,serif;color:var(--teal)}.brand svg{width:40px;height:40px;fill:var(--honey)}.language-control{display:flex;align-items:center;gap:12px;font-size:14px}.language-control select{border:1px solid var(--line);background:#fffdf7;color:var(--ink);border-radius:14px;min-height:48px;padding:9px 36px 9px 14px;font-size:16px}main{max-width:1340px;margin:auto;padding:18px 48px 68px}.welcome{display:grid;grid-template-columns:0.8fr 1.2fr;gap:64px;align-items:center}.welcome h1{font:500 clamp(40px,5.2vw,75px)/1.07 Baskerville,Georgia,serif;letter-spacing:-1.5px;max-width:570px;margin:0 0 20px}.tagline{font-size:20px;line-height:1.6;max-width:400px;margin:0 0 28px}.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:var(--teal);color:white;border:0;min-height:54px;border-radius:18px;padding:14px 26px;font-weight:650}.hero-picture{border:0;padding:0;background:transparent;overflow:hidden;border-radius:34px 90px 34px 34px;aspect-ratio:1;box-shadow:0 15px 0 -4px #e9d9b8}.hero-picture img{display:block;width:100%;height:100%;object-fit:cover}.family-block{margin-top:44px}.family-block h2{font-size:16px;font-weight:650;margin:0 0 12px}.family-block dl{display:flex;flex-wrap:wrap;gap:16px 30px;margin:0 0 14px}.family-block dt{font-size:12px;color:#69502f}.family-block dd{margin:0;font-size:18px;font-weight:600}.reference-button{font-size:13px;background:none;color:var(--teal);border:0;padding:0;text-decoration:underline;text-underline-offset:4px;min-height:30px}.collection{padding-top:72px}.collection-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px}.collection-heading h2{font:500 33px/1.25 Baskerville,Georgia,serif;margin:0}.collection-heading p{margin:0;font-size:13px;color:#69502f}.picture-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 22px}.picture{margin:0}.picture button{display:block;width:100%;padding:0;border:0;background:none;color:inherit;text-align:start}.image-frame{position:relative;aspect-ratio:1;overflow:hidden;border-radius:18px;background:#e6e8d7}.image-frame img{display:block;width:100%;height:100%;object-fit:cover}.piece-count{position:absolute;inset-inline-end:10px;bottom:10px;border-radius:13px;background:#fffaf0eb;padding:6px 11px;font-size:12px;font-weight:700}.picture h3{font-size:16px;line-height:1.35;margin:12px 0 4px;font-weight:650}.picture .cast{font-size:12px;line-height:1.4;margin:0;color:#69502f}.pending-frame{display:flex;align-items:center;justify-content:center;flex-direction:column;padding:25px;text-align:center;background:#e6e8d7;color:#47613a}.pending-frame svg{width:56px;fill:#a5b69a;margin-bottom:12px}.pending-frame span{font-size:14px;max-width:190px}.picture button[disabled]{cursor:default}.picture button[disabled] h3{color:#69502f}.picture-note{font-size:12px;color:#69502f;margin:8px 0 0}.picture button:hover:not([disabled]) .image-frame{outline:3px solid var(--honey);outline-offset:4px}footer{padding:26px 48px;border-top:1px solid var(--line);font-size:12px;color:#69502f;text-align:center}dialog{border:0;border-radius:22px;padding:18px;background:#fffaf0;width:min(900px,94vw);max-height:94dvh;color:var(--ink)}dialog::backdrop{background:#302c26b8}.lightbox-bar{display:flex;gap:16px;justify-content:space-between;align-items:center;margin-bottom:12px}.lightbox-bar h2{margin:0;font-size:20px}.lightbox-bar button{border:0;background:var(--teal);color:white;border-radius:12px;padding:10px 18px;min-height:44px}#lightbox-image{display:block;max-width:100%;max-height:74dvh;object-fit:contain;margin:auto;border-radius:10px}#lightbox-caption{margin:12px 0 0;font-size:13px}[dir=rtl] .hero-picture{border-radius:90px 34px 34px 34px}[dir=rtl] .welcome h1{letter-spacing:0;font-family:var(--font)}
@media(max-width:1000px){.masthead,main{padding-inline:28px}.welcome{gap:30px}.picture-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.welcome h1{font-size:54px}.family-block{margin-top:28px}}
@media(max-width:700px){.masthead{padding:20px}.brand{font-size:28px}.brand svg{width:30px}.language-control>span{display:none}main{padding:12px 20px 48px}.welcome{grid-template-columns:1fr;gap:28px}.welcome-copy{display:contents}.welcome h1{font-size:46px;grid-row:1;margin-bottom:0;letter-spacing:-.5px}.tagline{grid-row:2;margin:0;font-size:17px}.hero-picture{grid-row:3;width:100%;border-radius:28px 64px 28px 28px}.button{grid-row:4;justify-self:start}.family-block{grid-row:5;margin-top:0}.collection{padding-top:38px}.collection-heading{display:block}.collection-heading h2{font-size:29px;margin-bottom:10px}.picture-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}.picture h3{font-size:14px}.pending-frame{padding:12px}.pending-frame span{font-size:12px}.pending-frame svg{width:40px}.piece-count{font-size:11px;padding:5px 8px;bottom:7px;inset-inline-end:7px}footer{padding:22px}.lightbox-bar h2{font-size:16px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

#puzzle-player{width:min(1240px,96vw);max-height:96dvh;padding:24px;overflow:auto}#puzzle-player::backdrop{background:#493831c4}.player-bar{display:flex;align-items:center;gap:20px}.player-bar h2{flex:1;font:500 28px Baskerville,Georgia,serif;margin:0}.player-bar>button,.player-tools button,.tray-pagination button,.celebration button{border:0;border-radius:14px;background:var(--teal);color:white;min-height:48px;padding:10px 18px;font-weight:650}.player-bar>button{background:#e5eadb;color:var(--teal)}#puzzle-progress{font-size:16px;font-weight:700;white-space:nowrap}.player-instruction{margin:18px 0 22px;color:#69502f;font-size:16px}.play-area{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);align-items:start;gap:32px}.board-wrap{position:relative;aspect-ratio:1;border:8px solid #dacba9;border-radius:18px;overflow:hidden;background:#e2e9d5;direction:ltr}#puzzle-board{display:block;width:100%;height:100%}.board-slots{position:absolute;inset:0;display:grid;direction:ltr}.board-slots button{padding:0;min-width:0;min-height:0;border:0;background:transparent;touch-action:none}.board-slots button[disabled]{cursor:default}.board-slots button:focus-visible{outline:4px solid var(--honey);outline-offset:-4px;background:#fffaf025}.board-slots .hint-slot{background:#f3bf5c6b;box-shadow:inset 0 0 0 5px var(--honey)}.player-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:18px}.player-tools label{display:flex;align-items:center;gap:9px;min-height:48px;font-size:14px;cursor:pointer}.player-tools input{width:22px;height:22px;accent-color:var(--teal)}.piece-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-height:190px}.puzzle-piece{min-height:104px;min-width:0;padding:6px;background:#ede5d3;border:3px solid transparent;border-radius:18px;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none}.puzzle-piece canvas{display:block;max-width:100%;max-height:160px;pointer-events:none}.puzzle-piece[aria-pressed=true]{border-color:var(--teal);background:#dfe8d5}.puzzle-piece.is-dragging{opacity:.35}.drag-piece{position:fixed;transform:translate(-50%,-50%);width:120px;max-height:220px;object-fit:contain;pointer-events:none;z-index:10;filter:drop-shadow(0 6px 5px #49383155)}.tray-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px;font-size:13px}.tray-pagination button{font-size:13px;background:#e5eadb;color:var(--teal);padding:8px 12px}.tray-pagination button[disabled],.celebration button[disabled]{opacity:.45;cursor:default}#puzzle-status{min-height:3em;font-size:14px;color:#69502f;margin:20px 0 0}.celebration{margin-top:18px;padding:20px;border-radius:20px;background:#f0d89f;text-align:center}.celebration-paw{font-size:42px;color:var(--teal)}.celebration h3{margin:4px 0 18px;font:500 27px Baskerville,Georgia,serif}.celebration>div{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}[hidden]{display:none!important}
@media(max-width:800px){#puzzle-player{padding:16px}.player-bar{gap:12px;flex-wrap:wrap}.player-bar h2{font-size:22px;order:3;flex-basis:100%}#puzzle-progress{margin-inline-start:auto}.player-instruction{font-size:14px;margin:14px 0}.play-area{grid-template-columns:1fr;gap:20px}.board-wrap{width:min(100%,540px);margin:auto;border-width:6px}.tray-section{width:min(100%,540px);margin:auto}.piece-tray{grid-template-columns:repeat(3,minmax(0,1fr));min-height:0}.puzzle-piece{min-height:100px}.puzzle-piece canvas{max-height:125px}.player-tools{margin-bottom:12px}#puzzle-status{margin-top:14px}}
#puzzle-progress,#tray-pages{direction:ltr;unicode-bidi:isolate}
.celebration{color:#654a0e}

/* Keep the board and finger-sized piece tray together, including on short tablets. */
:root{--player-height:96vh}
@supports(height:100dvh){:root{--player-height:96dvh}}
button,a,select{touch-action:manipulation}
.masthead{padding-top:max(20px,env(safe-area-inset-top));padding-left:max(28px,env(safe-area-inset-left));padding-right:max(28px,env(safe-area-inset-right))}
footer{padding-bottom:max(22px,env(safe-area-inset-bottom))}
#puzzle-player{max-height:min(var(--player-height),calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px));overscroll-behavior:contain}
.board-wrap{max-width:var(--board-max-size,calc(var(--player-height) - 180px));justify-self:center;width:100%}
.piece-tray{min-height:0}.puzzle-piece{-webkit-user-select:none;-webkit-touch-callout:none}
#puzzle-status{min-height:2em}
.language-control select{min-width:128px}
@media(min-width:740px){
  #puzzle-player{padding:20px}
  .player-bar{flex-wrap:nowrap}.player-bar h2{font-size:24px;order:initial;flex:1;min-width:0}
  .play-area{grid-template-columns:minmax(0,1fr) minmax(240px,.68fr);gap:24px}
  .board-wrap{border-width:6px}.tray-section{width:100%;max-width:100%}
  .puzzle-piece{min-height:104px}.puzzle-piece canvas{max-height:136px}
}
@media(max-width:739px){.board-wrap{width:min(100%,540px,var(--board-max-size))}.tray-section{width:100%}.player-bar h2{font-size:22px}.puzzle-piece canvas{max-height:125px}}

.masthead-actions{display:flex;align-items:center;gap:20px}.album-button{min-height:48px;border:0;border-radius:14px;padding:10px 18px;background:var(--teal);color:white;font:650 14px var(--font)}
.puzzle-preferences{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;margin:-8px 0 16px;color:#69502f;font-size:14px}
.puzzle-preferences label{display:flex;gap:10px;align-items:center;min-height:44px}.puzzle-preferences select{min-height:44px;border:1px solid #b5a480;border-radius:12px;background:#fffdf7;color:var(--ink);padding:6px 12px;font:inherit}.puzzle-preferences input{width:22px;height:22px;accent-color:var(--teal)}
.celebration{padding:18px}.celebration h3{font-size:25px;margin:12px 0}.celebration>p{font-size:14px;line-height:1.5;margin:10px 0}.celebration>p.earned-paws{font-size:22px;font-weight:700;color:#654a0e}
#celebration-character{width:110px;height:110px;border-radius:50%;object-fit:cover;border:4px solid #fff8e4;display:block;margin:auto}
.celebration-actions{margin-top:16px}.celebration-actions button{flex:1;padding:10px 12px;font-size:13px}.celebration>button{background:#654a0e;font-size:13px}
#voice-status:empty{display:none}.celebrate-now #celebration-character{animation:amor-hello 1.6s ease-in-out 1}
@keyframes amor-hello{0%,100%{transform:rotate(0) scale(1)}25%{transform:rotate(-7deg) scale(1.05)}65%{transform:rotate(5deg) scale(1.03)}}
#memory-album{width:min(1000px,94vw);padding:24px}#memory-album>p{line-height:1.6;color:#69502f}#album-total{font-size:22px;display:block;color:var(--teal)}
#album-meter{display:block;width:100%;height:18px;accent-color:var(--teal);margin:16px 0 0}#album-meter::-webkit-progress-bar{background:#dfdac8;border-radius:12px}#album-meter::-webkit-progress-value{background:var(--teal);border-radius:12px}
.album-gifts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:22px}.gift-card button{border:0;padding:0;width:100%;background:none;color:inherit;text-align:start}.gift-card img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:16px}
.gift-card h3{font-size:17px;margin:12px 0 6px}.gift-card p{font-size:14px;line-height:1.5;color:#69502f;margin:0}.gift-card button[disabled]{cursor:default}.gift-card[data-unlocked=false] img{opacity:.65}.gift-card[data-unlocked=true] button:hover img{outline:3px solid var(--honey);outline-offset:3px}
.gift-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr);gap:26px;align-items:center;padding-top:28px;margin-top:24px;border-top:1px solid var(--line)}.gift-detail img{width:100%;border-radius:18px}.gift-detail h3{font:500 30px/1.2 Baskerville,Georgia,serif;margin:0 0 16px}.gift-detail p{line-height:1.7;margin:0}.book-invitation{padding:18px;border-radius:14px;background:#e5eadb;color:#285b58!important}
@media(max-width:739px){.masthead{gap:10px;flex-wrap:wrap}.masthead-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}.album-button{padding:10px 12px;font-size:12px}.language-control select{min-width:110px}.album-gifts{gap:12px}.gift-card h3{font-size:14px}.gift-card p{font-size:12px}.gift-detail{grid-template-columns:1fr;gap:18px}#memory-album{padding:18px}}
@media(max-width:420px){.masthead-actions{width:100%;justify-content:space-between}.album-gifts{grid-template-columns:1fr}.gift-card button{display:grid;grid-template-columns:110px 1fr;column-gap:16px;align-items:center}.gift-card img{grid-row:1 / span 2}.gift-card h3{margin:0}.gift-card p{grid-column:2}.puzzle-preferences{gap:8px 16px}}
@media(prefers-reduced-motion:reduce){.celebrate-now #celebration-character{animation:none}}

/* The picture stays beside the help control, independent of the board overlay. */
.puzzle-guide{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:16px;margin-bottom:16px}
.puzzle-reference{margin:0;text-align:center;color:#69502f;font-size:12px;line-height:1.35}
.puzzle-reference img{display:block;width:100%;aspect-ratio:1;object-fit:contain;border:3px solid #dacba9;border-radius:12px;background:#e2e9d5}
.puzzle-reference figcaption{margin-top:6px}
.puzzle-guide .player-tools{margin:0;display:flex;flex-direction:column;align-items:stretch;gap:6px}
.puzzle-guide .player-tools button{display:flex;justify-content:center;align-items:center;gap:8px;background:#f0d89f;color:#654a0e}
.puzzle-guide .player-tools button:disabled{opacity:.5;cursor:default}
#puzzle-help svg{width:24px;height:24px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.puzzle-guide .player-tools label{font-size:13px;line-height:1.3;min-height:44px}
.board-slots .hint-slot{background:#f3bf5c30;box-shadow:inset 0 0 0 4px #a76616}
@media(max-width:739px){.puzzle-guide{grid-template-columns:88px minmax(0,1fr);gap:14px;margin-bottom:12px}.puzzle-guide .player-tools{align-items:flex-start}.puzzle-guide .player-tools button{min-width:150px}}
@media(min-width:740px) and (max-height:800px){.puzzle-piece canvas{max-height:110px}}
@media(min-width:740px) and (max-height:650px){.puzzle-guide{grid-template-columns:88px minmax(0,1fr);margin-bottom:12px}}

.game-home{font-size:14px;color:var(--teal);text-decoration:underline;text-underline-offset:4px;min-height:44px;display:inline-flex;align-items:center}.free-game-note{font-size:15px;font-weight:700;color:var(--teal);margin:0 0 16px}.welcome-copy .free-game-note{grid-row:1}.welcome-copy .free-game-note+h1{grid-row:2}@media(max-width:700px){.welcome-copy .tagline{grid-row:3}.welcome .hero-picture{grid-row:4}.welcome .button{grid-row:5}.welcome .family-block{grid-row:6}.masthead-actions{justify-content:space-between}.free-game-note{margin-bottom:0}}
