/* Memory Match — theme styles */
.scene.themed { background:linear-gradient(180deg,#FFF0E8 0%, #FBE4D6 40%, #E5F2EB 41%, #D6EADF 100%); }
.prop.shelf { width:clamp(140px,22vw,240px); aspect-ratio:220/90; top:3%; left:3%; opacity:.9; }
.mem-grid { display:grid; grid-template-columns:repeat(var(--mcols,4),1fr); gap:clamp(6px,1.5vw,12px); width:100%; max-width:520px; }
.mem-grid.big { max-width:560px; }
@media (min-aspect-ratio:5/4) { .mem-grid { max-width:640px; } .mem-grid.big { grid-template-columns:repeat(6,1fr); max-width:820px; } }
.mem-card { position:relative; aspect-ratio:3/4; perspective:800px; border-radius:12px; min-width:44px; min-height:44px; }
.mem-inner { position:absolute; inset:0; transform-style:preserve-3d; transition:transform .45s cubic-bezier(.4,.2,.2,1); }
.mem-card.flipped .mem-inner { transform:rotateY(180deg); }
.mem-face { position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:12px; overflow:hidden; box-shadow:0 3px 10px rgba(30,42,74,.18); }
.mem-back img, .mem-back svg { width:100%; height:100%; object-fit:cover; }
.mem-front { background:#fff; transform:rotateY(180deg); display:flex; flex-direction:column; }
.mem-front img { width:100%; flex:1; min-height:0; object-fit:cover; }
.mem-word { font-weight:700; font-size:clamp(.55rem,2vw,.8rem); color:var(--navy); text-align:center; padding:2px 2px 4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mem-card.matched .mem-face { box-shadow:0 0 0 3px var(--gold), 0 4px 12px rgba(232,195,106,.5); }
.mem-card.matched { animation:match-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes match-pop { 0%{transform:scale(1)} 40%{transform:scale(1.12)} 100%{transform:scale(1)} }
/* size picker tiles */
.size-list { display:grid; gap:10px; margin-top:16px; }
.size-tile { display:flex; align-items:center; gap:12px; padding:12px 14px; background:#fff; border:2px solid var(--border); border-radius:16px; text-align:left; width:100%; min-height:44px; transition:border-color .15s, transform .12s; }
.size-tile:active { transform:scale(.98); }
.size-tile .badge { width:46px; height:46px; min-width:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:1.25rem; color:#fff; background:var(--sage); }
.size-tile .lab b { display:block; color:var(--navy); }
.size-tile .lab small { color:var(--muted); }

.intro-cluster { position:absolute; left:4%; bottom:26%; z-index:4; display:flex; flex-direction:column; gap:16px; max-width:min(320px,60vw); }
.host-el { width:clamp(120px,22vw,200px); flex:none; aspect-ratio:1; animation:host-bob 2.6s ease-in-out infinite; }
@keyframes host-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.host-el svg, .host-el img { width:100%; height:100%; border-radius:18px; }
.host-bubble { font-size:.98rem; }
.intro-panel { position:absolute; right:3%; bottom:4%; z-index:5; background:rgba(255,251,245,.92); border-radius:22px; box-shadow:var(--shadow); padding:20px 22px; text-align:center; width:min(360px, 60vw); }
.intro-panel h1 { font-size:clamp(1.5rem,4.6vw,2.2rem); }
.intro-panel .tagline { color:var(--body); font-size:.95rem; line-height:1.45; margin:8px 0 14px; }
.intro-panel .micro { margin-top:10px; font-size:.78rem; color:var(--muted); }
@media (max-width:620px) {
  .intro-cluster { left:4%; bottom:auto; top:10%; max-width:70vw; flex-direction:row; align-items:flex-end; }
  .host-el { order:-1; }
  .host-bubble { align-self:flex-start; }
  .intro-panel { left:50%; right:auto; transform:translateX(-50%); bottom:3%; width:min(420px, calc(100vw - 24px)); }
}
