/* Online Memory shares the site's pastel ombre and script wordmark. */
.playtime-collections{max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.memory-theme-stack{display:flex;align-items:center;justify-content:center;gap:0;aspect-ratio:3/2;overflow:hidden;padding:24px;background:linear-gradient(135deg,#ffb5d6,#bca2ff 25%,#8bd4ff 48%,#9be7bd 72%,#ffe3a0)}.preview-card{display:grid;place-items:center;width:31%;aspect-ratio:4/5;background:white;border:4px solid #fff;border-radius:14px;box-shadow:0 7px 16px #49316b25;overflow:hidden}.preview-card:first-child{transform:rotate(-12deg) translateX(9px)}.preview-card:last-child{transform:rotate(12deg) translateX(-9px)}.preview-card:nth-child(2){z-index:1;transform:translateY(-8px)}.memory-theme-stack .preview-card img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain}.memory-preview-back{font-family:"Garden Script","Segoe Print",cursive;color:#582776;font-size:clamp(16px,3vw,30px);text-align:center;line-height:1.05;background:linear-gradient(135deg,#ff8ec4,#ba8fff 22%,#73cbff 43%,#7de3b1 64%,#ffda70 83%,#ff9faa);padding:8px}.online-memory{padding:clamp(16px,3vw,30px);border-radius:24px;border:1px solid #e7daf4;background:#fff;box-shadow:0 12px 35px #45236712}.memory-topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;flex-wrap:wrap}.memory-topbar h2{margin:0 0 7px;color:#653294;font:700 24px/1.3 "Trebuchet MS",sans-serif}.memory-subtitle{margin:0;color:#756482;line-height:1.5}.memory-mode{padding:0;border:0;margin:0;min-width:245px}.memory-mode legend{font:700 13px/1.5 "Trebuchet MS",sans-serif;color:#6f548b;margin-bottom:7px}.memory-mode-options{display:flex;gap:7px;border:1px solid #e3d4f2;background:#f7f0ff;padding:5px;border-radius:14px}.memory-mode label{position:relative;flex:1;text-align:center;cursor:pointer}.memory-mode input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.memory-mode label span{display:block;padding:11px 13px;white-space:nowrap;border-radius:10px;font-size:14px;line-height:1.4;color:#6b4b8a;font-weight:700}.memory-mode input:checked+span{background:#6c39b7;color:white;box-shadow:0 3px 8px #6b39b72b}.memory-mode input:focus-visible+span{outline:3px solid #e34b91;outline-offset:3px}.memory-mode-note{font-size:12px;color:#7f708c;text-align:right;margin:7px 0 0}.memory-stats{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:22px 0 14px;padding:12px 16px;border-radius:14px;background:#f9f1fd}.memory-stat-group{display:flex;flex-wrap:wrap;gap:13px 22px;align-items:center}.memory-stat-group p{margin:0;font-size:15px;color:#695174}.memory-stat-group strong{font-size:21px;color:#cf2e7d}.memory-turn{font-size:15px;font-weight:700;color:#683598}.memory-stats .btn{font:700 14px/1.4 "Trebuchet MS",sans-serif;cursor:pointer;min-height:42px}.memory-instructions{font-size:15px;line-height:1.65;color:#6a5876;margin:14px 0 18px}.memory-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;max-width:900px;margin:0 auto;perspective:1000px}.memory-card{position:relative;aspect-ratio:4/3;border:0;border-radius:14px;background:transparent;padding:0;cursor:pointer;perspective:800px;min-width:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.memory-card-inner{display:block;width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .35s ease}.memory-card.is-open .memory-card-inner{transform:rotateY(180deg)}.memory-back,.memory-front{position:absolute;inset:0;border:3px solid #fff;border-radius:14px;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 4px 12px #59337c23;overflow:hidden}.memory-back{display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(135deg,#ff8ec4 0%,#ba8fff 22%,#73cbff 43%,#7de3b1 64%,#ffda70 83%,#ff9faa 100%);color:#552170;container-type:inline-size}.memory-back-pencil,.memory-back-wonderland{font-family:"Garden Script","Segoe Print",cursive;line-height:1.02;font-weight:400;text-shadow:0 1px 0 #ffffffa3}.memory-back-pencil{font-size:clamp(16px,23cqw,38px)}.memory-back-wonderland{font-size:clamp(13px,18cqw,31px)}.memory-back-spark{font-size:clamp(10px,9cqw,16px);color:#ffffffda;margin-bottom:4px}.memory-back-dots{font-size:clamp(8px,7cqw,12px);letter-spacing:3px;color:#603679b3;line-height:1;margin-top:8px}.memory-front{display:grid;place-items:center;background:#fff;transform:rotateY(180deg);border-color:#e9dcf4}.memory-front img{display:block;width:100%;height:100%;object-fit:contain}.memory-card:hover:not(.is-open):not(.is-collected) .memory-back{box-shadow:0 7px 16px #59337c38;border-color:#f6c7ff}.memory-card:focus-visible{outline:3px solid #7434b8;outline-offset:4px}.memory-card.is-collected{visibility:hidden;pointer-events:none}.memory-board.is-checking .memory-card{cursor:default}.memory-feedback{margin:20px 0 0;min-height:50px;color:#704090;font-size:16px;line-height:1.6;font-weight:700}.memory-collections-title{font:700 23px/1.3 "Trebuchet MS",sans-serif;color:#673b94;margin:12px 0 16px}.memory-collections{display:grid;grid-template-columns:1fr;gap:18px}.online-memory[data-players="2"] .memory-collections{grid-template-columns:1fr 1fr}.player-collection{border:2px solid #e8dbf3;border-radius:18px;padding:18px;background:#fcf9ff;min-width:0}.player-collection.current-player{border-color:#b884e0;background:#f7f0ff}.collection-score{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}.collection-score h3{font:700 18px/1.4 "Trebuchet MS",sans-serif;margin:0;color:#663391}.collection-score p{font-size:15px;margin:0;color:#6e5682}.collection-score strong{font-size:24px;color:#d03782}.collection-score p span{font-size:12px}.collected-pairs{list-style:none;padding:0;margin:18px 0 0;display:flex;gap:14px;flex-wrap:wrap;align-items:center;min-height:70px}.empty-collection{font-size:14px;line-height:1.6;color:#8a779a}.collected-pair{display:flex;gap:4px;animation:pair-arrives .3s ease-out}.collected-card{display:block;width:54px;height:65px;background:white;border:1px solid #e3d5ee;border-radius:8px;box-shadow:0 2px 5px #57327212;overflow:hidden}.collected-card img{width:100%;height:100%;display:block;object-fit:contain}.memory-result{text-align:center;border-radius:18px;background:linear-gradient(135deg,#fff0ba,#f7deff,#d8f6e8);padding:26px;margin-top:22px}.memory-result[hidden]{display:none}.memory-result h2{font-family:"Trebuchet MS",sans-serif;color:#6a38bd;margin:10px 0}.memory-result p{line-height:1.6;color:#6e5281}.memory-result .btn{margin:7px;cursor:pointer;font-family:"Trebuchet MS",sans-serif}.memory-result-spark{font-size:35px}.memory-steps{max-width:940px;margin:26px auto 0}.memory-steps h2{font-family:"Trebuchet MS",sans-serif;font-size:22px;color:#673b94;margin:0 0 12px}.memory-steps li{margin:9px 0;line-height:1.65}.memory-loading{padding:30px;border-radius:14px;background:#f8f1ff;color:#69448e}.online-memory .btn:focus-visible{outline:3px solid #7434b8;outline-offset:3px}@keyframes pair-arrives{from{transform:translateY(-8px);opacity:.2}to{transform:translateY(0);opacity:1}}
@media(max-width:760px){.playtime-collections{grid-template-columns:1fr}.online-memory{padding:16px 12px}.memory-topbar{gap:16px}.memory-topbar h2{font-size:22px}.memory-mode{width:100%;min-width:0}.memory-mode-note{text-align:left}.memory-board{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.memory-card{aspect-ratio:4/5;border-radius:10px}.memory-back,.memory-front{border-radius:10px;border-width:2px}.memory-stats{padding:10px;margin-top:18px;gap:10px}.memory-stat-group{gap:9px 13px}.memory-stat-group p{font-size:13px}.memory-stat-group strong{font-size:19px}.memory-turn{font-size:14px}.memory-feedback{font-size:15px;min-height:70px}.memory-instructions{font-size:14px}.memory-back-dots{letter-spacing:1px;margin-top:6px}.memory-back-spark{margin-bottom:3px}.online-memory[data-players="2"] .memory-collections{grid-template-columns:1fr}.player-collection{padding:14px}.collected-card{width:45px;height:54px}.collected-pairs{gap:12px}.collection-score h3{font-size:17px}.memory-collections-title{font-size:21px}.memory-theme-stack{padding:25px}.memory-preview-back{font-size:25px}}
@media(prefers-reduced-motion:reduce){.online-memory *{transition:none!important;animation:none!important}}

.memory-board.is-complete{display:none}.collection-score .pair-noun{font-size:15px}.memory-result:focus-visible{outline:3px solid #7434b8;outline-offset:4px}
/* Keep the theme previews large enough to recognise on narrow screens. */
.memory-theme-stack{container-type:inline-size;padding:16px}.preview-card{flex:0 0 38%;width:auto;margin-inline:-3%;border-width:3px;border-radius:12px}.memory-preview-back{font-size:clamp(12px,9cqw,32px);padding:4px}.preview-card:first-child{transform:rotate(-10deg) translateX(4px)}.preview-card:last-child{transform:rotate(10deg) translateX(-4px)}
.memory-preview-back{font-size:clamp(9px,7cqw,30px)}
/* Bound the whole artwork to its card face; grid's intrinsic image height
   previously exceeded short landscape cards and cropped the lower half. */
.online-memory .memory-front{display:block}
.online-memory .memory-front img{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;padding:5px;box-sizing:border-box;object-fit:contain;object-position:center}
