/* Approved option 2: generated decoration on semantic, working controls. */
:root{--pd-ink:#173970;--pd-ink-soft:#4d6689;--pd-line:#c9e5f8;--pd-surface:#fff;--pd-surface-soft:#f8fcff;--pd-accent:#00a2b5;--pd-accent-deep:#087b90;--pd-sun:#ffe27a;--pd-danger:#f0525f;--pd-radius-card:24px;--pd-radius-control:16px;--ui-font:"Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR","Yu Gothic",system-ui,sans-serif;--serif:var(--ui-font);font-family:var(--ui-font);--ink:var(--pd-ink);--muted:var(--pd-ink-soft)}
body{color:var(--ink)}
h1,h2,h3,button,input,select,.brand-name{font-family:var(--ui-font)}
h1,h2,h3{font-weight:800}button{font-weight:700}
/* Headings take programmatic focus for screen readers after navigation; they are not controls. */
h1[tabindex="-1"]:focus{outline:none}
.art-icon,.coin,.calendar-icon,.progress-icon{background-image:url('../assets/delivery/casual-icons-v2-1024.webp');background-size:400% 300%;background-repeat:no-repeat}
.art-icon{display:inline-block;width:30px;height:30px;flex:0 0 auto;vertical-align:middle;pointer-events:none}
.art-home{background-position:0 0}.art-album{background-position:33.333333% 0}.art-settings{background-position:66.666667% 0}.art-brush{background-position:100% 0}
.art-eraser{background-position:0 50%}.art-undo{background-position:33.333333% 50%}.art-hint{background-position:66.666667% 50%}.art-calendar{background-position:100% 50%}.art-sprout{background-position:0 100%}.art-lock{background-position:100% 100%}
.coins{gap:5px;padding:6px 12px 6px 6px;font-size:15px;border-color:var(--pd-line);box-shadow:0 3px 1px #a5cce640}
.coin{display:block;width:31px;height:31px;background-color:transparent;background-position:33.333333% 100%;border:0;box-shadow:none;border-radius:0;font-size:0}
.icon-button .art-icon{width:30px;height:30px}
.home-screen .hero,.home-screen .hero.has-progress{height:360px;border:1px solid var(--pd-line);box-shadow:inset 0 1px #fff}
.home-screen .hero-copy{inset:6px auto auto 25px;max-width:45%;width:265px;text-align:center}
.hero-logo{display:block;width:100%;height:auto;aspect-ratio:1358/1159;object-fit:contain;filter:drop-shadow(0 2px 1px #ffffffb0)}
.home-screen .hero:has(.hero-logo) h1{margin:-10px 0 0;font-size:19px;color:var(--pd-ink)}
.home-screen .hero-copy:has(.hero-brand){top:36px;text-align:left}
.resume-card{border:1px solid var(--pd-line);box-shadow:inset 0 2px #fff,0 4px 2px #b1d6ed40,0 10px 22px #6b9fb414;background:linear-gradient(150deg,#fff,var(--pd-surface-soft))}
.resume-info h2{color:var(--pd-ink);letter-spacing:-.045em}
.primary,.game-tools .tool.active{background:linear-gradient(#12dce0 0,#00b6c6 38%,#008b9f 100%);border:1px solid #009cab;box-shadow:inset 0 2px 2px #bdffffb3,0 4px 0 #087b90,0 6px 9px #0a91a329;color:#fff;text-shadow:0 1px 2px #005c73,0 0 4px #005064}
.primary:hover,.game-tools .tool.active:hover{background:linear-gradient(#23e3e2,#0098aa)}
.resume-info .primary{font-size:22px;font-weight:800;min-height:57px}
.progress>span{background:linear-gradient(#20d9d9,#00afbd);box-shadow:inset 0 1px #7efff3}
.small-card{border:1px solid #fff;box-shadow:0 3px 2px #a8d1e647,inset 0 1px #fff}
.daily-card{background:linear-gradient(140deg,#fff1fc,#ffe6f6)}
.collection-card{background:linear-gradient(140deg,#fffbed,#fff2cb)}
.small-card h2{font-weight:800;color:var(--pd-ink)}
.calendar-icon{position:relative;display:grid;place-items:center;transform:rotate(-7deg);width:59px;height:59px;flex:0 0 auto;background-color:transparent;background-position:100% 50%;border:0;border-radius:0;box-shadow:none;color:var(--pd-ink-soft);font-size:20px;line-height:1;padding:16px 0 0;font-weight:800}
.calendar-icon::before,.calendar-icon::after,.calendar-icon i{display:none}
.collection-card .card-icon{width:59px;height:59px;background:transparent;border:0;box-shadow:none;transform:rotate(-5deg);border-radius:0}
.collection-card .card-icon .art-icon{width:59px;height:59px}
.progress-icon{width:42px;height:42px;background-position:0 100%;display:block;flex:0 0 auto}.progress-icon>*{display:none}
.home-screen .daily-tools{margin:12px 16px 20px}
.overall-progress{background:linear-gradient(#fff,var(--pd-surface-soft));border-color:var(--pd-line);box-shadow:0 3px 1px #bddcec40}
.overall-progress .progress>span{background:linear-gradient(#8bd94a,#48b239)}
.bottom-nav{border:1px solid var(--pd-line);background:linear-gradient(#fff,var(--pd-surface-soft));box-shadow:0 -3px 20px #72a8c00c}
.bottom-nav button{gap:2px;font-weight:800;border-radius:17px;color:var(--pd-ink-soft)}
.bottom-nav .art-icon{width:37px;height:37px}
.bottom-nav button[aria-current]{color:#00758b;background:linear-gradient(#e1fbff,#edfcff)}
.album-book{box-shadow:0 4px 2px #afd0e447;border:1px solid var(--pd-line);background:linear-gradient(#fff,var(--pd-surface-soft))}
.album-book.current{border:3px solid #04bec8;box-shadow:0 3px 0 #009da950,0 4px 12px #08b8bd24}
.album-book .book-cover,.album-book.locked-book .book-cover{aspect-ratio:1;border-radius:14px}
.book-info h2{font-weight:800;color:var(--pd-ink)}
.cover-lock{background:#f5fbffed;box-shadow:0 2px 5px #25496c35}.cover-lock .art-icon{width:28px;height:28px}
.board-frame{background:linear-gradient(#fff,var(--pd-surface-soft));border-color:var(--pd-line);box-shadow:inset 0 2px #fff,0 5px 0 #c4ddec55,0 10px 28px #6394ac0d}
.game-tools .tool{background:linear-gradient(var(--pd-surface-soft),#e7f1ff);border-color:var(--pd-line);box-shadow:inset 0 2px #fff,0 4px 1px #bfd6eb;font-weight:800}
.game-tools .art-icon{width:42px;height:42px}
.game-tools .tool[data-action="hint"]{background:linear-gradient(#fffbd9,#ffe68c);box-shadow:inset 0 2px #fffff0,0 4px 1px #e4bc50;border-color:#f5d96f}
.game-tools .tool.active .sub{color:#fff}
@media(max-width:600px){
 .home-screen .hero,.home-screen .hero.has-progress{height:275px;margin-bottom:-28px}
 .home-screen .hero-copy{inset:9px auto auto 10px;width:185px;max-width:50%}
 .home-screen .hero:has(.hero-logo) h1{font-size:15px;margin:-6px 0 0;white-space:nowrap}
 .home-screen .hero-copy:has(.hero-brand){top:29px;left:20px}
 .resume-card{grid-template-columns:115px minmax(0,1fr);gap:13px;padding:15px 13px;border-radius:24px;margin-bottom:17px}
 .resume-info h2{font-size:20px}.resume-info .primary{font-size:20px;min-height:53px;padding:10px 8px}
 .home-bottom.with-daily{gap:12px}.with-daily .small-card{padding:12px 8px;gap:5px;min-height:108px}.with-daily .small-card h2{font-size:15px}
 .calendar-icon,.collection-card .card-icon,.collection-card .card-icon .art-icon{width:48px;height:48px}.calendar-icon{font-size:17px;padding-top:12px}
 .home-screen .daily-tools{margin:12px 0 20px}
 .overall-progress{padding:11px 12px;gap:9px}.progress-icon{width:35px;height:35px}
 .bottom-nav{padding-top:6px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.bottom-nav button{min-height:57px;font-size:12px}.bottom-nav .art-icon{width:34px;height:34px}
 .book-info h2{min-height:0;font-size:16px}.book-info{padding:10px 5px 5px}.album-shelf{gap:16px 12px}
 .game-tools .tool,.game-tools .tool.active{padding:9px 3px;min-height:96px;gap:4px;font-size:14px}.game-tools .art-icon{width:40px;height:40px}
}
@media(max-width:350px){
 .home-screen .hero,.home-screen .hero.has-progress{height:239px}.home-screen .hero-copy{width:156px;left:5px}.home-screen .hero:has(.hero-logo) h1{font-size:13px}
 .resume-card{grid-template-columns:88px minmax(0,1fr);gap:10px;padding:12px}.resume-info h2{font-size:17px}.resume-info .primary{font-size:17px;min-height:48px}
 .with-daily .small-card{flex-direction:row;align-items:center;min-height:94px}.with-daily .small-card h2{font-size:13px}.calendar-icon,.collection-card .card-icon,.collection-card .card-icon .art-icon{display:grid;width:36px;height:36px}.calendar-icon{font-size:14px;padding-top:9px}
 .game-tools .tool,.game-tools .tool.active{font-size:12px}.book-info h2{font-size:14px}
 /* Katakana title must not break mid-word; with very large coin counts it truncates instead of pushing buttons off-screen. */
 :lang(ja) .wordmark,:lang(ja) .wordmark>span{min-width:0}:lang(ja) .wordmark>span{overflow:hidden}:lang(ja) .brand-name{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media(max-height:730px) and (max-width:600px){.game-tools .tool,.game-tools .tool.active{min-height:67px;padding:5px 2px;font-size:12px}.game-tools .art-icon{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Mockup layout pass: match the approved option-2 screens while keeping every control. */
.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* Home: the garden art reaches the top; coins and settings float over it. */
.home-screen{position:relative}
.home-screen .topbar{position:absolute;top:0;left:0;right:0;z-index:4;justify-content:flex-end;height:auto;padding:16px 46px 0;pointer-events:none;border:0;background:none}
.home-screen .topbar>*{pointer-events:auto}
.home-screen .topbar .wordmark{display:none}
.home-screen main{padding-top:14px}
.home-screen .hero h1,.home-screen .hero.has-progress h1{color:#1b3f8f;transform:rotate(-4deg);transform-origin:left center;text-shadow:0 0 3px #fff,0 0 6px #fff,0 2px 0 #fff}
.home-screen .daily-card,.home-screen .collection-card{position:relative;padding-right:30px}
.home-screen .daily-card::after,.home-screen .collection-card::after{content:'';position:absolute;right:14px;top:50%;width:8px;height:8px;border:solid #6f86a8;border-width:2.5px 2.5px 0 0;transform:translateY(-50%) rotate(45deg)}
.home-screen .daily-tools{align-items:flex-end;margin:6px 16px 0}
.home-screen .daily-tools button[data-action="dailyCalendar"]{width:auto;min-height:44px;padding:6px 10px;background:none;border:0;box-shadow:none;color:#2c5d93;font-size:13px;font-weight:700}
.home-screen .daily-tools button[data-action="dailyCalendar"] .art-icon{width:24px;height:24px}
/* Bottom tabs: no pill; the current tab is a coloured label and a lively icon. */
.bottom-nav button[aria-current]{background:none;color:#00a2b5}
.bottom-nav button:not([aria-current]) .art-icon{filter:saturate(.35);opacity:.78}
.bottom-nav{border-radius:26px 26px 0 0}
/* Album shelf: picture, name, then one progress row. */
.collection-screen .section-heading{justify-content:center;text-align:center}
.collection-screen .section-heading>div{margin:0 auto}
.album-book .book-info{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px 8px}
.album-book .book-info .eyebrow,.album-book .book-status{display:none}
.album-book .book-info h2{grid-column:1/-1;margin:0}
.album-book .book-info .progress{grid-row:2;grid-column:1;margin:0}
.album-book .book-info p{grid-row:2;grid-column:2;margin:0;font-weight:800;color:#2a4672}
/* Play: centred title, hearts + progress + count on one row, quiet tool labels. */
.board-top{display:flex;align-items:center;gap:10px}
.board-top .board-progress{flex:1;margin:0;height:10px;border-radius:6px}
.board-top #game-progress{font-size:13px;color:var(--pd-ink)}
.board-top #game-time{font-size:11px;font-weight:600;color:#8094b0}
.board-top .hearts{font-size:20px;color:#f0525f;letter-spacing:1px}
.game-tools .tool[data-action="paint"] .sub,.game-tools .tool[data-action="erase"] .sub,.game-tools .tool[data-action="undo"] .sub{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.game-tools .tool{position:relative}
@media(max-width:900px){
 .game-aside{display:flex;flex-direction:column;align-items:center;text-align:center}
 .game-aside h1{order:-1}
 .game-aside .eyebrow{margin-top:2px}
 .game-tools{padding:10px;background:#fff;border-radius:24px;box-shadow:0 4px 18px #5f9cc01c}
}
@media(max-width:600px){
 .home-screen .topbar{padding:12px 10px 0}
 .home-screen main{padding-top:8px}
 .home-screen .daily-tools{margin:4px 0 0}
 .home-screen .daily-tools button[data-action="dailyCalendar"]{width:auto;align-self:flex-end}
}

/* Generated tagline and corner foliage (decorative only; never intercept input). */
.hero-tagline{display:block;width:100%;height:auto;margin-top:2px}
.home-screen .hero h1:has(.hero-tagline){transform:none;text-shadow:none;margin:0}
.collection-screen,.game-screen{position:relative;isolation:isolate}
.collection-screen::before,.collection-screen::after,.game-screen::before,.game-screen::after{content:'';position:absolute;z-index:-1;width:120px;height:120px;background:url('../assets/delivery/casual-leaves-v1-627.webp') no-repeat;background-size:200% 200%;pointer-events:none}
.collection-screen::before,.game-screen::before{left:0;top:0;background-position:0 0}
.collection-screen::after,.game-screen::after{right:0;top:0;background-position:100% 0}
@media(max-width:600px){
 .collection-screen::before,.collection-screen::after,.game-screen::before,.game-screen::after{width:92px;height:92px}
}
@media(max-width:350px){.home-screen .daily-card,.home-screen .collection-card{padding-right:8px}.home-screen .daily-card::after,.home-screen .collection-card::after{display:none}}
/* Wide screens: foliage sits in the window corners, clear of the centred controls. */
/* The screen shell animates with transform, which would capture fixed children, so the
   window-corner foliage is drawn on body instead. */
@media(min-width:901px){
 .collection-screen::before,.collection-screen::after,.game-screen::before,.game-screen::after{display:none}
 body:has(.collection-screen,.game-screen)::before,body:has(.collection-screen,.game-screen)::after{display:none;content:'';position:fixed;top:0;z-index:0;width:110px;height:110px;background:url('../assets/delivery/casual-leaves-v1-627.webp') no-repeat;background-size:200% 200%;pointer-events:none}
 body:has(.collection-screen,.game-screen)::before{left:0;background-position:0 0}
 body:has(.collection-screen,.game-screen)::after{right:0;background-position:100% 0}
}
@media(min-width:1240px){body:has(.collection-screen,.game-screen)::before,body:has(.collection-screen,.game-screen)::after{display:block}}

/* Effects pass: short, cheerful feedback. Global reduced-motion rules disable all animations;
   transitions are switched off explicitly below. */
:root{--pd-spring:cubic-bezier(.34,1.56,.64,1)}
.primary,.secondary,.game-tools .tool,.small-card,.icon-button,.album-book,.bottom-nav button,.zoom-controls button,.album-resume{transition:transform .34s var(--pd-spring),box-shadow .12s ease-out,filter .12s}
.primary:active,.secondary:active,.game-tools .tool:active,.small-card:active,.icon-button:active,.album-book:active,.bottom-nav button:active,.zoom-controls button:active,.album-resume:active{transform:translateY(2px) scale(1.03,.9);transition-duration:.06s}
@media(hover:hover){.primary:hover,.secondary:hover,.small-card:hover,.icon-button:hover,.album-book:hover,.album-resume:hover{transform:translateY(-2px) scale(1.02)}}
.primary:active,.game-tools .tool.active:active{box-shadow:inset 0 2px 2px #bdffffb3,0 2px 0 #087b90,0 3px 6px #0a91a329}
@keyframes glow-casual{40%{box-shadow:0 0 0 8px #ffe27aa6,0 0 0 16px #00c2d12e,0 15px 55px #00b6c63a}}
.board-frame.won{animation:glow-casual 1.1s ease-out}
@keyframes mistake-flash{25%{box-shadow:0 0 0 4px #f0525f8c}}
.board-frame.mistake{animation:shake .25s ease-out,mistake-flash .5s ease-out}
@keyframes dot-pop{0%{transform:scale(.2);opacity:.3}70%{transform:scale(1.35)}100%{transform:scale(1);opacity:1}}
@keyframes dot-drop{0%{transform:translateY(-16px) scale(.55,.9);opacity:0}55%{transform:translateY(0) scale(1.4,.65);opacity:1}78%{transform:scale(.9,1.12)}100%{transform:none;opacity:1}}
.collection-dots i.newest{animation:dot-drop .55s .45s ease-out both}
@keyframes coin-pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes coin-spin{from{transform:rotateY(0)}to{transform:rotateY(360deg)}}
.result .reward{animation:dot-drop .55s .6s ease-out both}
.result .reward .coin{display:inline-block;animation:coin-spin .7s .75s ease-out both}
@keyframes enter-casual{from{opacity:0;transform:translateY(10px) scale(.995)}to{opacity:1;transform:none}}
.fade-in{animation:enter-casual .3s cubic-bezier(.2,.7,.3,1)}
@media(prefers-reduced-motion:reduce){.primary,.secondary,.game-tools .tool,.small-card,.icon-button,.album-book,.bottom-nav button,.zoom-controls button{transition:none}}
body.reduce-motion .primary,body.reduce-motion .secondary,body.reduce-motion .game-tools .tool,body.reduce-motion .small-card,body.reduce-motion .icon-button,body.reduce-motion .album-book,body.reduce-motion .bottom-nav button,body.reduce-motion .zoom-controls button{transition:none}
@keyframes reward-reveal{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}
@keyframes reward-glow{0%,100%{box-shadow:0 0 0 0 #ffe27a00}45%{box-shadow:0 0 0 10px #ffe27a8c,0 0 32px 12px #00c2d12e}}
/* Paint-drop theme: reward pictures spread in like a drop of paint soaking outward; the finished
   picture and the newest album piece land as a squashed drop. */
@keyframes paint-spread{from{clip-path:circle(6% at 50% 50%)}to{clip-path:circle(150% at 50% 50%)}}
.reward-art{animation:paint-spread .65s .1s cubic-bezier(.3,.7,.3,1) both,reward-glow 1.2s .6s ease-out both}
.completion-scene .result-art{animation:dot-drop .55s ease-out both}
.album-tile.revealed.latest{animation:dot-drop .55s .2s ease-out both}

/* Touch targets: every control offers at least 44x44 CSS px. Visual size is kept where a
   larger box would look wrong (switches, range), using an invisible hit area instead. */
.icon-button{min-width:44px;min-height:44px}
.collection-tabs button,.text-button,.daily-tools button{min-height:44px}
.album-paging .icon-button{width:44px;height:44px}
.switch{position:relative}
.switch::after{content:'';position:absolute;left:-4px;right:-4px;top:-8px;bottom:-8px}
.volume-control{height:44px;margin:0}
.quick-rules summary{display:inline-flex;align-items:center;min-height:44px;padding:0 6px}
#offline-pill{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:60;padding:5px 12px;border-radius:999px;background:#1f3d6de6;color:#fff;font-size:12px;font-weight:700;box-shadow:0 4px 14px #1f3d6d40;pointer-events:none;white-space:nowrap}
#offline-pill[hidden]{display:none}
body:has(.game-screen) #offline-pill{bottom:calc(2px + env(safe-area-inset-bottom));padding:3px 10px;font-size:11px}
/* Buttons never split a Korean word ("코 / 인"); very small dialogs use a slightly smaller label. */
button{word-break:keep-all;overflow-wrap:break-word}
@media(max-width:350px){#modal .primary{font-size:17px;padding-left:10px;padding-right:10px}}
/* Albums 21-25 use the second cover atlas (3 columns x 2 rows). */
.book-cover img.extra-atlas{width:300%;height:200%}
/* casual.css resets .album-tile with the background shorthand; restore the 5x2 slicing of the gift picture. */
.album-tile.revealed{background-size:500% 200%;background-repeat:no-repeat}
/* Coins earned on the result fly to the header counter, which bumps as each one lands. */
.coin-fly{position:fixed;z-index:10;margin:0;pointer-events:none;animation:none}
@keyframes coin-bump{40%{transform:scale(1.18)}}
.coins.bump{animation:coin-bump .22s ease-out}
/* Completion mascot: a Rev2D-rendered paint drop (Tools/Art/rev2d/paint-drop.r2d.json) hops once to cheer.
   30 frames in one row; reduced motion shows the first (rest) frame. */
.completion-scene .mascot-drop{position:absolute;right:-18px;bottom:-10px;width:74px;height:101px;background:url('../assets/delivery/mascot-drop-jump-v1-3960.png') 0 0/3000% 100% no-repeat;pointer-events:none;animation:mascot-hop 1.55s steps(29) .5s both}
@keyframes mascot-hop{from{background-position:0 0}to{background-position:100% 0}}
/* The body gradient must reach the bottom of short screens; html keeps its own flat colour. */
body{min-height:100vh;min-height:100dvh}
/* Dialog and screen titles wrap by word (no lone syllable such as a trailing question mark line). */
:is(h1,h2):lang(ko){word-break:keep-all;overflow-wrap:break-word}h1,h2{text-wrap:balance}
/* Toasts and the in-board status line wrap by word too. */
#toast,#board-status,.pending-note,.small-card p{word-break:keep-all;overflow-wrap:anywhere}
/* Korean text wraps between words everywhere (no split syllables); text without spaces (Japanese) still breaks where it would overflow. */
body:lang(ko){word-break:keep-all;overflow-wrap:break-word}
/* 320-360px: a little more room for card titles (Japanese 'コレクション' needed 1px more). */
@media(max-width:360px){.with-daily .small-card{padding-left:6px;padding-right:6px;gap:3px}}
:lang(ja) .with-daily .small-card h2,.home-bottom .small-card h2{word-break:keep-all;overflow-wrap:break-word;text-wrap:wrap}
/* Radius scale (token pass 2): panels 24, tiles 18, controls 16, pills fully round. Measured on home/album/game/result. */
:root{--pd-radius-tile:18px;--pd-radius-pill:999px}
.hero,.hero-art,.resume-card,.game-tools,.board-frame,#modal{border-radius:var(--pd-radius-card)}
.bottom-nav{border-radius:var(--pd-radius-card) var(--pd-radius-card) 0 0}
.small-card,.album-book,.album-resume,.overall-progress,.result-stats{border-radius:var(--pd-radius-tile)}
.primary,.secondary,.icon-button,.game-tools .tool,.game-tools .tool.active,#modal .primary,#modal .secondary,.resume-info .primary{border-radius:var(--pd-radius-control)}
.coins,.result .reward{border-radius:var(--pd-radius-pill)}
/* Motion pass (commercial-casual feel): dialogs pop in on a spring, screens build up piece by piece,
   progress bars fill with a light sweep, the main call-to-action glints. Reduced motion turns all of it off. */
@keyframes pd-pop{0%{opacity:0;transform:scale(.78) translateY(24px)}60%{opacity:1}100%{opacity:1;transform:none}}
@keyframes pd-fade{from{opacity:0}to{opacity:1}}
#modal[open]{animation:pd-pop .46s var(--pd-spring) both}
#modal[open]::backdrop{animation:pd-fade .22s ease-out both}
@keyframes pd-rise{0%{opacity:0;transform:translateY(18px) scale(.97)}100%{opacity:1;transform:none}}
:is(.home-screen,.collection-screen).fade-in>*{animation:pd-fade .45s ease-out both}
:is(.home-screen,.collection-screen).fade-in>*:nth-child(2){animation-delay:.05s}
:is(.home-screen,.collection-screen).fade-in>*:nth-child(3){animation-delay:.1s}
:is(.home-screen,.collection-screen).fade-in>*:nth-child(4){animation-delay:.15s}
:is(.home-screen,.collection-screen).fade-in>*:nth-child(5){animation-delay:.2s}
:is(.home-screen,.collection-screen).fade-in>*:nth-child(n+6){animation-delay:.25s}
#modal[open] .modal-actions>*{animation:pd-fade .3s ease-out both}
#modal[open] .modal-actions>*:nth-child(1){animation-delay:.18s}
#modal[open] .modal-actions>*:nth-child(2){animation-delay:.24s}
#modal[open] .modal-actions>*:nth-child(n+3){animation-delay:.3s}
@keyframes pd-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes pd-sweep{0%{transform:translateX(-100%)}100%{transform:translateX(220%)}}
.progress>span{position:relative;overflow:hidden;transform-origin:left center;animation:pd-fill .9s .3s cubic-bezier(.2,.8,.2,1) both}
.progress>span::after{content:'';position:absolute;inset:0;width:45%;background:linear-gradient(90deg,transparent,#ffffffb0,transparent);transform:translateX(-100%);animation:pd-sweep .9s 1.15s ease-out both}
@keyframes pd-glint{0%,62%{transform:translateX(-130%) skewX(-18deg)}82%,100%{transform:translateX(330%) skewX(-18deg)}}
.resume-card .primary,#modal .primary{position:relative;overflow:hidden;isolation:isolate}
.resume-card .primary::after,#modal .primary::after{content:'';position:absolute;top:0;bottom:0;left:0;width:34%;background:linear-gradient(90deg,transparent,#ffffff8a,transparent);transform:translateX(-130%) skewX(-18deg);animation:pd-glint 3.6s 1.4s ease-in-out infinite;pointer-events:none;z-index:1}
@media(prefers-reduced-motion:reduce){.album-resume{transition:none}}
body.reduce-motion .album-resume{transition:none}
/* Completion sequence: the dialog pops, the title stamps down, the picture arrives, the details and
   stats follow, then the coins and finally the buttons - one beat after another (about 1.6s in all). */
@keyframes pd-stamp{0%{opacity:0;transform:scale(1.9)}55%{opacity:1;transform:scale(.9)}100%{opacity:1;transform:none}}
#modal.result[open]>.eyebrow{animation:pd-fade .3s .08s both}
#modal.result[open]>#modal-title{animation:pd-stamp .52s .16s var(--pd-spring) both}
#modal.result[open]>.completion-scene{animation:pd-fade .25s .32s both}
#modal.result[open]:not(:has(.reward-stage))>:is(strong,p,div:not(.modal-actions):not(.result-stats):not(.completion-scene)){animation:pd-fade .35s .72s both}
#modal.result[open]>.result-stats>div{animation:pd-rise .42s var(--pd-spring) both}
#modal.result[open]>.result-stats>div:nth-child(1){animation-delay:.9s}
#modal.result[open]>.result-stats>div:nth-child(2){animation-delay:.98s}
#modal.result[open]>.result-stats>div:nth-child(3){animation-delay:1.06s}
#modal.result[open] .reward{animation-delay:1.15s}
#modal.result[open] .modal-actions>*:nth-child(1){animation-delay:1.4s}
#modal.result[open] .modal-actions>*:nth-child(2){animation-delay:1.48s}
#modal.result[open] .modal-actions>*:nth-child(n+3){animation-delay:1.56s}
/* UI kit (Codex image ui-kit-v1, 3x2 cells: teal ribbon, yellow ribbon, star / gift closed, gift open, light burst). */
:root{--pd-kit:url('../assets/delivery/ui-kit-v1b-1536.webp')}
#modal.result:not(:has(.reward-art)) #modal-title{position:relative;z-index:0;color:#fff;font-size:24px;padding:4px 0 16px;margin-top:24px;white-space:nowrap;text-shadow:0 2px 0 #06808c,0 0 2px #06808c,0 4px 10px #0a5a6655}
#modal.result:not(:has(.reward-art)) #modal-title::before{content:'';position:absolute;z-index:-1;left:50%;top:42%;width:min(340px,118%);aspect-ratio:1;transform:translate(-50%,-50%);background:var(--pd-kit) 0 0/300% 200% no-repeat;pointer-events:none}
#modal.result{overflow-x:hidden}
@keyframes pd-spin{to{transform:rotate(360deg)}}
.completion-scene::before{content:'';position:absolute;inset:-22%;z-index:-1;background:var(--pd-kit) 100% 100%/300% 200% no-repeat;animation:pd-spin 16s linear infinite,pd-fade .6s .3s both;pointer-events:none}
.album-gift-panel{position:relative}
.album-gift-panel::after{content:'';position:absolute;right:8px;top:-22px;width:66px;height:66px;background:var(--pd-kit) 0 100%/300% 200% no-repeat;pointer-events:none;transform-origin:50% 90%;animation:pd-wiggle 3.2s 1s ease-in-out infinite}
.album-gift-panel:has(.primary[data-album-gift])::after{background-position:50% 100%;animation:none}
@keyframes pd-wiggle{0%,78%,100%{transform:none}82%{transform:rotate(-8deg) scale(1.05)}86%{transform:rotate(7deg) scale(1.05)}90%{transform:rotate(-4deg)}94%{transform:rotate(2deg)}}#modal.result:not(:has(.reward-art))>.eyebrow{display:none}
.reward-text b{font-weight:inherit}
/* Gift opening for reward pictures: shake (0-0.55s), pop open with light (0.6s), picture spreads in (1s). */
.reward-stage{position:relative;display:grid;place-items:center;isolation:isolate}
.reward-stage::before{content:'';position:absolute;inset:-12%;z-index:-1;background:var(--pd-kit) 100% 100%/300% 200% no-repeat;animation:pd-spin 18s linear infinite,pd-fade .5s .6s both;pointer-events:none}
.gift-open{position:absolute;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;background:var(--pd-kit) 0 100%/300% 200% no-repeat;pointer-events:none;animation:pd-gift 1.35s ease-out both}
@keyframes pd-gift{0%{opacity:0;transform:scale(.5)}12%{opacity:1;transform:scale(1.05)}18%{transform:rotate(-9deg)}26%{transform:rotate(8deg)}34%{transform:rotate(-7deg)}42%{transform:rotate(5deg) scale(1.05);background-position:0 100%}44%{transform:scale(1.2);background-position:50% 100%}70%{opacity:1;transform:scale(1.3);background-position:50% 100%}100%{opacity:0;transform:scale(1.6);background-position:50% 100%}}
.reward-stage .reward-art{animation-delay:1s,1.5s}
@media(prefers-reduced-motion:reduce){.gift-open{display:none}}
body.reduce-motion .gift-open{display:none}
#modal.result:has(.reward-stage)>.eyebrow{position:relative;z-index:0;display:block;width:max-content;margin:14px auto 24px;padding:5px 24px 9px;color:#6b3f00;font-size:13px;font-weight:850;text-shadow:0 1px 0 #fff8}
#modal.result:has(.reward-stage)>.eyebrow::before{content:'';position:absolute;z-index:-1;left:50%;top:44%;width:calc(100% + 34px);aspect-ratio:1;transform:translate(-50%,-50%);background:var(--pd-kit) 50% 0/300% 200% no-repeat;pointer-events:none}
/* Home: the logo springs in then bobs, the main play button breathes, and an unsolved daily puzzle wears a
   bouncing gold star. Breathing uses the separate 'scale' property so the press squash still works. */
@keyframes pd-logo-in{0%{opacity:0;transform:scale(.55) rotate(-6deg)}100%{opacity:1;transform:none}}
@keyframes pd-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.hero-logo,.hero-brand{animation:pd-logo-in .7s .1s var(--pd-spring) both,pd-bob 3.4s 1.1s ease-in-out infinite}
.hero-tagline{animation:pd-fade .5s .45s both}
@keyframes pd-breathe{0%,100%{scale:1}50%{scale:1.04}}
.resume-card .primary{animation:pd-breathe 2.6s 1.6s ease-in-out infinite}
.daily-card{position:relative;overflow:visible}
.daily-badge{position:absolute;top:-14px;right:-8px;width:40px;height:40px;background:var(--pd-kit) 100% 0/300% 200% no-repeat;pointer-events:none;z-index:2;animation:pd-badge 2.2s .8s ease-in-out infinite both}
@keyframes pd-badge{0%,60%,100%{transform:none}68%{transform:translateY(-6px) rotate(-10deg) scale(1.08)}76%{transform:translateY(0) rotate(6deg)}84%{transform:rotate(-3deg)}}
/* Play: praise words for completed regions (stronger colour as the no-mistake streak grows) and a frame glow. */
.board-frame{position:relative}
.praise{position:absolute;left:50%;top:42%;z-index:5;pointer-events:none;white-space:nowrap;font-size:30px;font-weight:900;letter-spacing:-.02em;color:#fff;
  -webkit-text-stroke:6px var(--pd-accent-deep);paint-order:stroke fill;text-shadow:0 5px 0 #05596566,0 8px 18px #0a4a5a40;animation:pd-praise 1.05s cubic-bezier(.2,.8,.3,1) both}
.praise.level-2{-webkit-text-stroke-color:#1c7fd6}
.praise.level-3{-webkit-text-stroke-color:#d9488f;font-size:33px}
.praise.level-4{-webkit-text-stroke-color:#e08a00;font-size:36px}
@keyframes pd-praise{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(-8deg)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.15) rotate(3deg)}36%{transform:translate(-50%,-50%) scale(.96)}48%{transform:translate(-50%,-50%) scale(1)}78%{opacity:1;transform:translate(-50%,-70%) scale(1)}100%{opacity:0;transform:translate(-50%,-95%) scale(.92)}}
@keyframes pd-frame-glow{0%{box-shadow:0 0 0 0 #00c2d100}35%{box-shadow:0 0 0 6px #00c2d155,0 0 26px 6px #00c2d140}100%{box-shadow:0 0 0 0 #00c2d100}}
.board-frame.region-done{animation:pd-frame-glow .6s ease-out}
/* Album shelf: finished albums wear a gold star and a glint across the cover; the current album glows softly. */
.album-book{position:relative}
.album-book.complete-book::after{content:'';position:absolute;top:-12px;left:-8px;width:44px;height:44px;background:var(--pd-kit) 100% 0/300% 200% no-repeat;pointer-events:none;z-index:2;animation:pd-badge 2.6s 1s ease-in-out infinite both}
.album-book.complete-book .book-cover{position:relative;overflow:hidden}
.album-book.complete-book .book-cover::after{content:'';position:absolute;top:0;bottom:0;left:0;width:40%;background:linear-gradient(100deg,transparent,#ffffffb0,transparent);transform:translateX(-140%) skewX(-16deg);animation:pd-glint 4.2s 1.2s ease-in-out infinite;pointer-events:none;z-index:1}
@keyframes pd-current{0%,100%{box-shadow:0 0 0 0 #00c2d100,0 8px 18px #1d4f8a1a}50%{box-shadow:0 0 0 5px #00c2d140,0 8px 22px #00a2b533}}
.album-book.current{animation:pd-current 2.4s ease-in-out infinite}/* Screen change: paint sheet lifting away (colour by destination). */
.paint-wipe{--wipe:#12c6d2;position:fixed;inset:0 0 auto 0;height:100%;z-index:90;pointer-events:none;background:linear-gradient(180deg,color-mix(in srgb,var(--wipe) 82%,#fff),var(--wipe));animation:pd-wipe .52s cubic-bezier(.55,.05,.35,1) both}
.paint-wipe::after{content:'';position:absolute;left:-5%;right:-5%;top:100%;height:46px;background:
  radial-gradient(circle at 8% 0,var(--wipe) 18px,transparent 19px),radial-gradient(circle at 24% 0,var(--wipe) 28px,transparent 29px),
  radial-gradient(circle at 41% 0,var(--wipe) 14px,transparent 15px),radial-gradient(circle at 57% 0,var(--wipe) 32px,transparent 33px),
  radial-gradient(circle at 74% 0,var(--wipe) 20px,transparent 21px),radial-gradient(circle at 91% 0,var(--wipe) 26px,transparent 27px)}
.paint-wipe.wipe-game{--wipe:#12c6d2}
.paint-wipe.wipe-album{--wipe:#ffcf3d}
.paint-wipe.wipe-settings{--wipe:#ff8fb8}
.paint-wipe.wipe-home{--wipe:#7cc8ff}
@keyframes pd-wipe{0%{transform:translateY(0)}100%{transform:translateY(calc(-100% - 60px))}}
@media(prefers-reduced-motion:reduce){.paint-wipe{display:none}}
body.reduce-motion .paint-wipe{display:none}
/* Hearts: a lost heart turns pale; the one just lost pops, cracks and drops back pale. */
.hearts i{display:inline-block;font-style:normal;transition:color .2s}
.hearts i.lost{color:#cdd9e6}
.fail-hearts{display:flex;justify-content:center;gap:10px;margin:2px 0 8px;font-size:36px;line-height:1;color:#cdd9e6}
.fail-hearts i{display:inline-block;font-style:normal}
.fail-hearts i{position:relative}
.fail-hearts .breaking{animation:pd-heart-ghost .9s var(--d,.3s) ease-out both}
.fail-hearts .breaking .half{position:absolute;left:0;top:0;width:100%;height:100%;color:#f0525f;transform-origin:50% 60%}
.fail-hearts .breaking .half.l{clip-path:polygon(0 0,54% 0,42% 34%,58% 56%,46% 100%,0 100%);animation:pd-half-l .9s var(--d,.3s) cubic-bezier(.3,.6,.4,1) both}
.fail-hearts .breaking .half.r{clip-path:polygon(54% 0,100% 0,100% 100%,46% 100%,58% 56%,42% 34%);animation:pd-half-r .9s var(--d,.3s) cubic-bezier(.3,.6,.4,1) both}
/* Settings switch: the knob springs across and squashes while pressed; the track colour eases. */
.switch{transition:background-color .25s ease}
.switch span{transition:transform .42s var(--pd-spring),width .12s ease}
.switch:active span{width:27px}
.switch[aria-checked=true]:active span{transform:translateX(14px)}
/* Calendar: days fade in row by row; today pulses; collected days show a small star. */
.calendar-day{position:relative;animation:pd-fade .3s ease-out both}
.calendar-day:nth-child(n+8){animation-delay:.04s}.calendar-day:nth-child(n+15){animation-delay:.08s}.calendar-day:nth-child(n+22){animation-delay:.12s}.calendar-day:nth-child(n+29){animation-delay:.16s}.calendar-day:nth-child(n+36){animation-delay:.2s}
@keyframes pd-today{0%,100%{box-shadow:0 0 0 0 #00c2d100}50%{box-shadow:0 0 0 4px #00c2d140}}
.calendar-day[aria-current]{animation:pd-fade .3s ease-out both,pd-today 2s .4s ease-in-out infinite}
.calendar-day.collected::after{content:'';position:absolute;top:-6px;right:-5px;width:18px;height:18px;background:var(--pd-kit) 100% 0/300% 200% no-repeat;pointer-events:none}/* Tutorial hand: presses on the start cell, drags to the neighbour, lifts, repeats. */
.tutorial-hand{position:absolute;z-index:4;pointer-events:none;width:52px;height:auto;transform-origin:23% 5%;filter:drop-shadow(0 3px 3px #563b2833);
  margin:-3px 0 0 -12px;animation:pd-hand 2.2s .6s ease-in-out infinite both}
@keyframes pd-hand{0%{opacity:0;transform:translate(10px,26px) scale(1.1)}12%{opacity:1;transform:translate(0,8px) scale(1.1)}22%{transform:translate(0,8px) scale(.92)}
  62%{opacity:1;transform:translate(var(--dx),calc(var(--dy) + 8px)) scale(.92)}74%{opacity:1;transform:translate(var(--dx),calc(var(--dy) + 8px)) scale(1.1)}100%{opacity:0;transform:translate(calc(var(--dx) + 10px),calc(var(--dy) + 26px)) scale(1.1)}}
@media(prefers-reduced-motion:reduce){.tutorial-hand{display:none}}
body.reduce-motion .tutorial-hand{display:none}
/* Result: the album reward as a 5x2 mosaic; the new piece flips in with a sparkle. */
.result-mosaic{display:grid;grid-template-columns:repeat(5,22px);grid-template-rows:repeat(2,22px);gap:2px;justify-content:center;margin:4px auto 0;perspective:400px}
.result-mosaic i{display:block;border-radius:5px;background:#e3eef8;background-size:500% 200%;box-shadow:inset 0 0 0 1px #ffffffa0}
.result-mosaic i:not(.revealed){background:#dce9f5 radial-gradient(circle,#9fb6cc 2px,transparent 3px)}
.result-mosaic i.newest{position:relative;animation:pd-flip .6s .95s var(--pd-spring) both;box-shadow:0 0 0 2px #ffd34d,0 0 12px 2px #ffd34d99}
.result-mosaic i.newest::after{content:'';position:absolute;inset:-10px;background:var(--pd-kit) 100% 100%/300% 200% no-repeat;animation:pd-fade .3s 1.3s both,pd-spark-out .7s 1.4s forwards;pointer-events:none}
@keyframes pd-flip{0%{transform:rotateY(90deg) scale(.6);opacity:0}100%{transform:none;opacity:1}}
@keyframes pd-spark-out{to{opacity:0;transform:scale(1.6)}}
@media(max-width:360px),(max-height:700px){.result-collection{display:flex;align-items:center;justify-content:center;gap:8px}.result-mosaic{grid-template-columns:repeat(5,12px);grid-template-rows:repeat(2,12px);gap:1px;margin:0}.result-mosaic i{border-radius:3px}.result-mosaic i.newest::after{inset:-6px}}
/* Coin guide bubble (hangs from the coin counter). */
.coins[role=button]{cursor:pointer}
.coin-tip{position:fixed;z-index:85;width:min(236px,calc(100vw - 20px));padding:12px 14px 10px;background:#fff;border-radius:18px;color:var(--pd-ink);font-size:13px;line-height:1.45;
  box-shadow:0 0 0 2px #ffd34d,0 12px 30px #1f3d6d38;transform-origin:calc(100% - var(--arrow)) -10px;animation:pd-pop .34s var(--pd-spring) both}
.coin-tip::before{content:'';position:absolute;top:-9px;right:calc(var(--arrow) - 9px);width:16px;height:16px;background:#fff;border-left:2px solid #ffd34d;border-top:2px solid #ffd34d;border-radius:3px 0 0 0;transform:rotate(45deg)}
.coin-tip strong{display:block;font-size:12px;font-weight:850;margin:0 0 4px}
.coin-tip strong.earn{color:#1c8a5a}
.coin-tip strong.spend{color:#c06a00;margin-top:8px}
.coin-tip ul{list-style:none;margin:0;padding:0}
.coin-tip li{position:relative;padding-left:16px;margin:2px 0}
.coin-tip li::before{content:'';position:absolute;left:0;top:.3em;width:11px;height:11px;border-radius:50%;background:linear-gradient(#ffe572,#ffb51e);box-shadow:inset 0 -1px 0 #c97a00}
/* Result fits one screen (Safari's toolbars eat ~180px): the scene scales with the visible height,
   the ribbon is sized to the title, and secondary actions share one row. */
#modal.result{max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain;padding:12px 18px 16px;scrollbar-width:none}
#modal.result::-webkit-scrollbar{display:none}
#modal.result:not(:has(.reward-art)) #modal-title{font-size:18px;line-height:1.25;margin:0 auto 2px;padding:13px 0;letter-spacing:-.2px}
#modal.result:not(:has(.reward-art)) #modal-title::before{width:232px;top:calc(50% + 10px)}
#modal.result .completion-scene{--s:clamp(112px,25dvh,178px);width:calc(var(--s)*1.18);height:var(--s);margin:0 auto 2px}
#modal.result .completion-scene .result-art{width:calc(var(--s)*.62);height:calc(var(--s)*.62);border-width:5px}
#modal.result .completion-scene .mascot-drop{width:calc(var(--s)*.38);height:calc(var(--s)*.52);right:-12px;bottom:-6px}
#modal.result .picture-title{margin:4px 0 0;font-size:16px}
#modal.result>p{margin:2px 0;font-size:13px}
#modal.result .result-collection{margin-top:6px}
#modal.result .result-stats{gap:0;margin:10px 0 0;padding:8px 4px}
#modal.result .result-stats>div{flex:1}
#modal.result .result-stats strong{font-size:17px;line-height:1.2}
#modal.result .reward{margin-top:10px}
#modal.result .modal-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;margin-top:12px}
#modal.result .modal-actions>*{flex:1 1 calc(50% - 4px);width:auto;min-width:0}
#modal.result .modal-actions>.primary{flex-basis:100%;min-height:52px}
#modal.result .modal-actions>.secondary{min-height:44px;padding:6px 8px}
@media(max-height:620px){#modal.result>p:not(.gift-earned):not(.album-gift-earned){display:none}#modal.result .result-stats{padding:6px 4px}#modal.result .modal-actions>.primary{min-height:48px}}
#modal.result:not(:has(.reward-art)) #modal-title:lang(en){font-size:17px}
/* Extra notices (album gift, calendar gift, archive) trade picture size and the generic note for room. */
#modal.result:has(.album-gift-earned,.gift-earned,.archive-note) .completion-scene{--s:clamp(96px,19dvh,156px)}
#modal.result:has(.album-gift-earned,.gift-earned) .picture-title+p{display:none}
#modal.result .modal-actions>.secondary{flex:1 1 0;line-height:1.2}
@media(max-width:360px){#modal.result{padding:10px 14px 12px}#modal.result .modal-actions>.secondary{font-size:12px;padding:4px 5px}#modal.result .album-gift-earned,#modal.result .gift-earned{font-size:12px;padding:6px 8px}#modal.result .reward{margin-top:8px}}
/* Hint spent: the button bounces and a gold -1 floats up from it. */
.game-tools .tool[data-action=hint]{position:relative;overflow:visible}
.game-tools .tool[data-action=hint].spent{animation:pd-hint-pop .5s var(--pd-spring)}
.hint-minus{position:absolute;left:50%;top:4px;z-index:3;padding:2px 9px;border-radius:999px;background:linear-gradient(#ffe37a,#ffb92e);color:#7a4300;font-size:13px;font-weight:900;box-shadow:0 2px 0 #c98200,0 4px 10px #c9820055;pointer-events:none;animation:pd-hint-minus .9s ease-out forwards}
@keyframes pd-hint-pop{0%{transform:none}35%{transform:scale(1.14) rotate(-4deg)}65%{transform:scale(.96) rotate(2deg)}100%{transform:none}}
@keyframes pd-hint-minus{0%{opacity:0;transform:translate(-50%,6px) scale(.6)}20%{opacity:1;transform:translate(-50%,-10px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-44px) scale(1)}}
/* Mistake: a firmer shake with a red glow around the board frame. */
.board-frame.mistake{animation:pd-mistake-shake .42s ease-out}
.board-frame.mistake::after{content:'';position:absolute;inset:-3px;border-radius:inherit;box-shadow:0 0 0 3px #ff5a72,0 0 18px 4px #ff5a7288;pointer-events:none;animation:pd-fade .42s reverse both}
@keyframes pd-mistake-shake{0%,100%{transform:none}15%{transform:translateX(-7px) rotate(-.6deg)}30%{transform:translateX(6px) rotate(.5deg)}45%{transform:translateX(-4px)}60%{transform:translateX(3px)}75%{transform:translateX(-1px)}}
@media(prefers-reduced-motion:reduce){.board-frame.mistake,.game-tools .tool[data-action=hint].spent{animation:none}.hint-minus{display:none}}
.reduce-motion .board-frame.mistake,.reduce-motion .game-tools .tool[data-action=hint].spent{animation:none}
/* Heart break: the heart swells, cracks along a jagged line, both halves tumble away with shards,
   and the grey empty heart fades in underneath. */
.hearts i{position:relative}
.hearts i.just-lost{z-index:6;animation:pd-heart-ghost .9s ease-out both}
.hearts i .half{position:absolute;left:0;top:0;width:100%;height:100%;color:#f0525f;font-weight:inherit;pointer-events:none;transform-origin:50% 60%}
.hearts i .half.l{clip-path:polygon(0 0,54% 0,42% 34%,58% 56%,46% 100%,0 100%);animation:pd-half-l .9s cubic-bezier(.3,.6,.4,1) both}
.hearts i .half.r{clip-path:polygon(54% 0,100% 0,100% 100%,46% 100%,58% 56%,42% 34%);animation:pd-half-r .9s cubic-bezier(.3,.6,.4,1) both}
.hearts i.just-lost::after{content:'';position:absolute;left:50%;top:48%;width:3px;height:3px;margin:-1.5px;border-radius:1px;background:#f0525f;box-shadow:7px -6px 0 #f0525f,-8px -5px 0 #ff8a95,6px 7px 0 #ff8a95,-6px 6px 0 #f0525f,0 -9px 0 #ff8a95;opacity:0;animation:pd-heart-shards .55s .26s ease-out both;pointer-events:none}
@keyframes pd-heart-ghost{0%,38%{color:transparent}100%{color:#cdd9e6}}
@keyframes pd-half-l{0%{transform:none;opacity:1}22%{transform:scale(1.5)}32%{transform:scale(1.42) rotate(-5deg)}40%{transform:scale(1.35) translateX(-1px);opacity:1}75%{opacity:1}100%{transform:translate(-13px,22px) rotate(-50deg) scale(.8);opacity:0}}
@keyframes pd-half-r{0%{transform:none;opacity:1}22%{transform:scale(1.5)}32%{transform:scale(1.42) rotate(5deg)}40%{transform:scale(1.35) translateX(1px);opacity:1}75%{opacity:1}100%{transform:translate(13px,22px) rotate(50deg) scale(.8);opacity:0}}
@keyframes pd-heart-shards{0%{opacity:1;transform:scale(.3)}100%{opacity:0;transform:scale(2.3)}}
@media(prefers-reduced-motion:reduce){.hearts i .half,.hearts i.just-lost::after{display:none}.hearts i.just-lost{animation:none;color:#cdd9e6}}
.reduce-motion .hearts i .half,.reduce-motion .hearts i.just-lost::after{display:none}
.reduce-motion .hearts i.just-lost{animation:none;color:#cdd9e6}
/* Big heart over the board on a mistake: pops in, cracks, halves tumble away with shards. */
.big-heart{position:absolute;left:50%;top:50%;z-index:7;pointer-events:none;transform:translate(-50%,-50%);font-size:min(30vw,120px);line-height:1;animation:pd-big-heart-in .95s ease-out both}
.big-heart i{position:relative;display:block;font-style:normal;color:transparent}
.big-heart .half{position:absolute;left:0;top:0;width:100%;height:100%;color:#f0525f;text-shadow:0 0 0 #fff;filter:drop-shadow(0 4px 0 #b8323f) drop-shadow(0 0 3px #fff) drop-shadow(0 8px 14px #b8323f66);transform-origin:50% 60%}
.big-heart .half.l{clip-path:polygon(0 0,54% 0,42% 34%,58% 56%,46% 100%,0 100%);animation:pd-big-half-l .95s cubic-bezier(.3,.6,.4,1) both}
.big-heart .half.r{clip-path:polygon(54% 0,100% 0,100% 100%,46% 100%,58% 56%,42% 34%);animation:pd-big-half-r .95s cubic-bezier(.3,.6,.4,1) both}
.big-heart i::after{content:'';position:absolute;left:50%;top:46%;width:9px;height:9px;margin:-4.5px;border-radius:3px;background:#f0525f;box-shadow:24px -20px 0 #f0525f,-26px -16px 0 #ff8a95,20px 24px 0 #ff8a95,-22px 20px 0 #f0525f,0 -30px 0 #ff8a95,32px 4px 0 #f0525f,-32px 2px 0 #ff8a95;opacity:0;animation:pd-heart-shards .6s .38s ease-out both}
@keyframes pd-big-heart-in{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}16%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}26%{transform:translate(-50%,-50%) scale(1)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes pd-big-half-l{0%,30%{transform:none;opacity:1}38%{transform:rotate(-6deg) translateX(-3px)}70%{opacity:1}100%{transform:translate(-46px,80px) rotate(-38deg) scale(.85);opacity:0}}
@keyframes pd-big-half-r{0%,30%{transform:none;opacity:1}38%{transform:rotate(6deg) translateX(3px)}70%{opacity:1}100%{transform:translate(46px,80px) rotate(38deg) scale(.85);opacity:0}}
@media(prefers-reduced-motion:reduce){.big-heart{display:none}.fail-hearts .breaking .half{display:none}.fail-hearts .breaking{animation:none;color:#cdd9e6}}
.reduce-motion .big-heart{display:none}
.reduce-motion .fail-hearts .breaking .half{display:none}
.reduce-motion .fail-hearts .breaking{animation:none;color:#cdd9e6}
.fail-hearts .breaking::after{content:'';position:absolute;left:50%;top:48%;width:5px;height:5px;margin:-2.5px;border-radius:2px;background:#f0525f;box-shadow:13px -11px 0 #f0525f,-14px -9px 0 #ff8a95,11px 13px 0 #ff8a95,-11px 11px 0 #f0525f,0 -16px 0 #ff8a95;opacity:0;animation:pd-heart-shards .55s calc(var(--d,.3s) + .26s) ease-out both;pointer-events:none}
.reduce-motion .fail-hearts .breaking::after{display:none}
@media(prefers-reduced-motion:reduce){.fail-hearts .breaking::after{display:none}}
/* Coin flight layer: a popover above the result dialog holding the flying coins and a copy of the counter. */
.coin-layer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;overflow:visible;pointer-events:none;z-index:90}
.coin-layer .coin-fly{position:fixed}
.coin-counter-float{position:fixed;margin:0;box-sizing:border-box;box-shadow:0 0 0 3px #ffd34d,0 6px 18px #c9820055;animation:pd-counter-in .25s var(--pd-spring) both}
.coin-counter-float.leaving{animation:pd-counter-out .6s ease-in forwards}
@keyframes pd-counter-in{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}
@keyframes pd-counter-out{to{opacity:0;transform:scale(.9)}}
