/* Memory Route Built-in Games v80 */
.mr-game-editor{margin-top:10px;padding:12px;border:1px solid #e4e2dc;border-radius:13px;background:#fbfbf9}
.mr-game-editor *{box-sizing:border-box}
.mr-game-editor .mrge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mr-game-editor .mrge-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.mr-game-editor .mrge-field.full{grid-column:1/-1}
.mr-game-editor label{font-size:12.5px;font-weight:750;color:#555951}
.mr-game-editor input,.mr-game-editor select,.mr-game-editor textarea{width:100%;min-width:0;padding:8px 9px;border:1px solid #dcdad4;border-radius:9px;background:#fff;font:inherit;font-size:13.5px;color:#1c1d21}
.mr-game-editor textarea{min-height:68px;resize:vertical;line-height:1.45}
.mr-game-editor .mrge-checks{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:10px 0}
.mr-game-editor .mrge-checks label{display:flex;align-items:center;gap:6px;font-weight:600}
.mr-game-editor .mrge-checks input{width:auto}
.mr-game-editor .mrge-section{margin-top:12px;padding-top:12px;border-top:1px dashed #dfddd6}
.mr-game-editor .mrge-section h4{margin:0 0 8px;font-size:13.5px}
.mr-game-editor .mrge-list{display:flex;flex-direction:column;gap:7px}
.mr-game-editor .mrge-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:center}
.mr-game-editor .mrge-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:7px;align-items:center}
.mr-game-editor button{border:1px solid #d9d7d0;border-radius:9px;background:#fff;padding:7px 10px;cursor:pointer;font-size:12.5px}
.mr-game-editor button:hover{background:#f5f4f0}
.mr-game-editor button.danger{color:#b24634}
.mr-game-editor .mrge-add{width:100%;margin-top:8px;border-style:dashed}
.mr-game-editor .mrge-help{font-size:11.8px;color:#858780;line-height:1.45;margin-top:5px}
.mr-game-editor .mrge-media{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.mr-game-editor .mrge-preview{margin-top:7px;width:100%;max-height:160px;object-fit:cover;border-radius:10px;border:1px solid #e4e2dc;background:#fff}
@media(max-width:680px){.mr-game-editor .mrge-grid{grid-template-columns:1fr}.mr-game-editor .mrge-field.full{grid-column:auto}.mr-game-editor .mrge-row{grid-template-columns:minmax(0,1fr) auto}.mr-game-editor .mrge-row .move2{display:none}.mr-game-editor .mrge-pair{grid-template-columns:1fr 1fr auto}}

.builtinGameHost{display:none;flex:1;min-height:0;overflow:auto;background:linear-gradient(180deg,#f7f6f2 0%,#fff 100%);padding:18px}
.mr-game{width:min(720px,100%);min-height:100%;margin:0 auto;display:flex;align-items:center;justify-content:center;color:#1c1d21}
.mr-game *{box-sizing:border-box}
.mr-game-card{width:100%;background:#fff;border:1px solid #e4e2dc;border-radius:24px;padding:clamp(18px,4vw,30px);box-shadow:0 18px 54px rgba(28,29,33,.12)}
.mr-game-kicker{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;background:#fff2ea;color:#b54a25;font-weight:850;font-size:12px}
.mr-game h2{margin:12px 0 7px;font-size:clamp(24px,5vw,36px);line-height:1.15}
.mr-game .mr-game-instructions{margin:0;color:#686b65;line-height:1.55;font-size:15px;white-space:pre-wrap}
.mr-game-media{display:block;width:100%;max-height:280px;object-fit:cover;border-radius:18px;margin:16px 0;border:1px solid #eceae4;background:#f7f7f5}
.mr-game-meta{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.mr-game-pill{padding:6px 10px;border-radius:999px;background:#f3f3f0;color:#555951;font-size:12.5px;font-weight:700}
.mr-game-status{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px;color:#686b65;font-size:13px}
.mr-game-timer{font-variant-numeric:tabular-nums;font-weight:900;color:#b54a25}
.mr-game-progress{height:8px;border-radius:999px;background:#ecebe6;overflow:hidden;margin:8px 0 16px}
.mr-game-progress>span{display:block;height:100%;width:0;background:#e2592e;transition:width .2s ease}
.mr-game-question{font-size:clamp(19px,4vw,27px);font-weight:850;line-height:1.35;margin:10px 0 16px;white-space:pre-wrap}
.mr-game-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mr-game button{font:inherit}
.mr-game-btn{border:1px solid #dcdad4;border-radius:15px;background:#fff;padding:13px 15px;cursor:pointer;font-weight:800;color:#1c1d21;transition:transform .15s ease,background .15s ease,border-color .15s ease}
.mr-game-btn:hover{background:#fff6f0;border-color:#e7b49f;transform:translateY(-1px)}
.mr-game-btn:focus-visible{outline:3px solid rgba(226,89,46,.28);outline-offset:2px}
.mr-game-btn.primary{width:100%;background:#1c1d21;color:#fff;border-color:#1c1d21;margin-top:18px}
.mr-game-btn.primary:hover{background:#34353a}
.mr-game-btn.secondary{background:#f5f4f0}
.mr-game-btn.correct{background:#e9f7ef;border-color:#80c69d;color:#176b3f}
.mr-game-btn.wrong{background:#fff0ed;border-color:#e7a08f;color:#a93d2a}
.mr-game-message{min-height:22px;margin-top:12px;font-size:14px;font-weight:750;color:#a93d2a}
.mr-game-message.ok{color:#176b3f}
.mr-game-input{width:100%;padding:14px 15px;border:1px solid #d6d4cd;border-radius:14px;font:inherit;font-size:17px}
.mr-game-input:focus{outline:3px solid rgba(226,89,46,.18);border-color:#dc8a68}
.mr-game-hint{margin-top:10px;padding:11px 13px;border-radius:13px;background:#fff9dc;color:#665818;font-size:13.5px;line-height:1.45}
.mr-game-order{display:flex;flex-direction:column;gap:9px}
.mr-game-order-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;border:1px solid #dfddd7;background:#fff;border-radius:14px;padding:9px 10px}
.mr-game-order-item .num{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#f1f0ec;font-weight:900;font-size:12px}
.mr-game-order-item .text{font-weight:750;line-height:1.35}
.mr-game-order-item button{border:1px solid #dedcd5;background:#f8f7f3;border-radius:9px;width:34px;height:34px;cursor:pointer}
.mr-memory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.mr-memory-card{position:relative;min-height:94px;border:0;background:transparent;padding:0;cursor:pointer;perspective:800px}
.mr-memory-card-inner{position:absolute;inset:0;transition:transform .35s ease;transform-style:preserve-3d}
.mr-memory-card.open .mr-memory-card-inner,.mr-memory-card.matched .mr-memory-card-inner{transform:rotateY(180deg)}
.mr-memory-face{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:8px;border-radius:14px;backface-visibility:hidden;border:1px solid #dddcd6;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
.mr-memory-front{background:linear-gradient(135deg,#ef6a38,#d94d2b);color:#fff;font-size:23px;border-color:#d94d2b}
.mr-memory-back{transform:rotateY(180deg);background:#fff7f2;color:#3b302b;border-color:#e6b39d;font-size:13px}
.mr-memory-card.matched .mr-memory-back{background:#e9f7ef;border-color:#80c69d;color:#176b3f}
.mr-tap-arena{position:relative;height:min(52vh,420px);min-height:300px;border:1px solid #e0ded8;border-radius:20px;background:radial-gradient(circle at 50% 50%,#fff 0%,#f3f1eb 100%);overflow:hidden}
.mr-tap-target{position:absolute;min-width:76px;min-height:76px;max-width:140px;border:0;border-radius:50%;background:#e2592e;color:#fff;box-shadow:0 12px 28px rgba(226,89,46,.32);font-size:clamp(19px,4vw,28px);font-weight:900;cursor:pointer;padding:12px;display:grid;place-items:center;text-align:center;line-height:1.05;transition:left .12s ease,top .12s ease,transform .08s ease}
.mr-tap-target:active{transform:scale(.92)}
.mr-game-result{text-align:center}
.mr-game-result .icon{font-size:58px;line-height:1;margin-bottom:12px}
.mr-game-result h2{margin:0 0 9px}
.mr-game-result p{color:#686b65;line-height:1.55;white-space:pre-wrap}
.mr-game-result-actions{display:flex;gap:9px;margin-top:18px}
.mr-game-result-actions .mr-game-btn{flex:1}
@media(max-width:620px){.builtinGameHost{padding:10px}.mr-game-card{border-radius:20px;padding:18px}.mr-game-options{grid-template-columns:1fr}.mr-memory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mr-memory-card{min-height:86px}.mr-game-order-item{grid-template-columns:auto minmax(0,1fr) auto auto}}
@media(prefers-reduced-motion:reduce){.mr-game *{scroll-behavior:auto!important}.mr-game-btn,.mr-memory-card-inner,.mr-game-progress>span,.mr-tap-target{transition:none!important}}
