/* ==========================================================================
   VAANI — Variety games (js/games2.js): memory, basket, listen & pick,
   word builder, odd one out. Shared chrome (.wm-top/.wm-msg/.wm-grid/
   .wm-opt/.wm-finish) comes from wordmatch.css; this file styles only
   what is unique to the new games.
   ========================================================================== */

.gm-howto{font-weight:800;font-size:15.5px;color:#5B4B8A;background:#F3EFFF;border-radius:12px;padding:10px 14px;margin:6px 0 12px;text-align:center}

/* --- memory cards --- */
.gm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.gm-card{aspect-ratio:1/1.08;border:2px solid #E9E4F5;border-radius:16px;background:linear-gradient(150deg,#FFF7E8,#F3EFFF);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:inherit;transition:transform .15s, background .15s;padding:6px}
.gm-card:active{transform:scale(.96)}
.gm-back-img{width:clamp(58px,17vw,104px);height:clamp(58px,17vw,104px);border-radius:50%;object-fit:cover;box-shadow:0 4px 12px rgba(124,100,150,.35)}
.gm-card.up{background:#fff;border-color:#FFCA28}
.gm-card.got{background:#EAF7EC;border-color:#81C784;cursor:default}
.gm-emoji{font-size:clamp(46px,13vw,84px);line-height:1.1}
.gm-word{font-size:19px;font-weight:900;color:var(--ink,#0A0A0A)}
.gm-roman{font-size:12.5px;font-weight:700;color:var(--muted)}

/* --- basket --- */
.gb-basket{background:#FFF7E8;border:2px dashed #FFCA28;border-radius:14px;padding:10px 14px;font-size:22px;margin:6px 0 12px;min-height:52px;display:flex;align-items:center;gap:8px}
.gb-items{font-size:20px;letter-spacing:2px}
.gb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.gb-item{border:2px solid #E9E4F5;border-radius:16px;background:#fff;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:12px 4px;font:inherit;transition:transform .15s}
.gb-item:active{transform:scale(.96)}
.gb-item.got{background:#EAF7EC;border-color:#81C784;opacity:.55;cursor:default}
.gb-item.wrong{animation:gbShake .45s}
.gb-emoji{font-size:clamp(42px,11vw,62px);line-height:1.1}
.gb-word{font-size:16px;font-weight:800}
@keyframes gbShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* --- listen & pick --- */
.gl-stage{display:flex;flex-direction:column;align-items:center;gap:6px;margin:8px 0 14px}
.gl-speaker{width:96px;height:96px;border-radius:50%;border:none;background:linear-gradient(135deg,#FF6F61,#FF9E57);font-size:44px;cursor:pointer;box-shadow:0 12px 26px rgba(255,111,97,.35);transition:transform .15s}
.gl-speaker:active{transform:scale(.94)}
.gl-hidden{font-weight:800;color:var(--muted);font-size:14px}
.gl-reveal{min-height:34px}
.gl-word{font-size:28px;font-weight:900;color:#4C7A4F}
.gl-roman{font-size:14px;font-weight:700;color:var(--muted)}

/* --- word builder --- */
.gw-stage{display:flex;flex-direction:column;align-items:center;gap:4px;margin:8px 0 14px}
.gw-emoji{font-size:56px;line-height:1.1}
.gw-roman{font-weight:700;color:var(--muted);font-size:14px}
.gw-slots{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;justify-content:center;max-width:100%}
.gw-slot{min-width:52px;height:58px;padding:0 10px;border:2.5px dashed #C9BFE8;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:900;background:#FBFAFF;white-space:nowrap}
.gw-slot.filled{border-style:solid;border-color:#81C784;background:#EAF7EC}
.gw-bank{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.gw-tile{min-width:52px;height:58px;padding:0 10px;border-radius:12px;border:2px solid #E9E4F5;background:#fff;font-size:24px;font-weight:900;cursor:pointer;font-family:inherit;transition:transform .12s}
.gw-tile:active{transform:scale(.94)}
.gw-tile.used{opacity:.3;cursor:default}
.gw-tile.wrong{animation:gbShake .45s;border-color:#FF6F61}

/* --- odd one out --- */
.go-opt{display:flex;flex-direction:column;align-items:center;gap:2px}
.go-label{font-size:16px;font-weight:800}
.go-why{text-align:center;font-weight:800;color:#4C7A4F;font-size:15px;min-height:22px;margin-top:10px}

@media (max-width:560px){
  .gm-grid,.gb-grid{grid-template-columns:repeat(3,1fr);gap:8px}
  .gw-slot{min-width:46px;height:52px;font-size:23px}
  .gw-tile{min-width:46px;height:52px;font-size:21px}
}

/* Real-picture tiles (pack values starting "img:") */
.gw-emoji .tile-img{width:clamp(130px,36vw,176px);height:clamp(130px,36vw,176px);object-fit:cover;border-radius:18px}
.gm-emoji .tile-img{width:clamp(64px,18vw,96px);height:clamp(64px,18vw,96px);object-fit:cover;border-radius:14px}
.gb-emoji .tile-img{width:clamp(64px,17vw,84px);height:clamp(64px,17vw,84px);object-fit:cover;border-radius:14px}
.gb-items .tile-img{width:26px;height:26px;object-fit:cover;border-radius:7px;vertical-align:-6px}
