/* BiblePang 성경기억력 — /match/
   성경추리(Detective) 1140px UI / 3-column workspace 기준 */
.memory-page{
  --light:#edf7ff;--soft:#cde8ff;--mid:#68afe8;--dark:#337ab8;--deep:#1b4f81;--ink:#183652;
  width:min(1360px,calc(100% - 40px));max-width:1360px;margin:28px auto 58px;padding:0;
  color:#24364b;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif;
}
.memory-theme-red{--light:#ffe7eb;--soft:#ffcbd3;--mid:#ee7181;--dark:#bf3f58;--deep:#78283b;--ink:#4a2230}
.memory-theme-orange{--light:#fff0df;--soft:#ffd9af;--mid:#f59a47;--dark:#c96122;--deep:#7b3913;--ink:#4c2a16}
.memory-theme-yellow{--light:#fff8d8;--soft:#ffe99b;--mid:#eac246;--dark:#a97d17;--deep:#674a0d;--ink:#473913}
.memory-theme-green{--light:#eafaf0;--soft:#c9efd7;--mid:#61c287;--dark:#2b895a;--deep:#175b3b;--ink:#173a2b}
.memory-theme-blue{--light:#edf7ff;--soft:#cde8ff;--mid:#68afe8;--dark:#337ab8;--deep:#1b4f81;--ink:#183652}
.memory-theme-indigo{--light:#f1f2ff;--soft:#d9ddff;--mid:#8994dc;--dark:#5662ae;--deep:#343d79;--ink:#292f55}
.memory-theme-purple{--light:#faf1ff;--soft:#ead5ff;--mid:#b07bdb;--dark:#7948aa;--deep:#4e2d77;--ink:#38224a}

/* Detective V4형 상단 대시보드 */
.memory-dashboard{
  display:grid;grid-template-columns:minmax(300px,1.28fr) minmax(560px,2.45fr) 84px;gap:12px;align-items:stretch;
  min-height:94px;padding:10px 14px;margin-bottom:16px;border:1px solid color-mix(in srgb,var(--mid) 35%,#d5e1ef);
  border-radius:18px;background:radial-gradient(circle at 2% 8%,color-mix(in srgb,var(--light) 52%,transparent),transparent 29%),linear-gradient(180deg,#fff 0%,color-mix(in srgb,var(--light) 24%,#f8fbff) 100%);
  box-shadow:0 5px 18px rgba(39,79,124,.08);box-sizing:border-box;
}
.memory-brand{display:flex;align-items:center;gap:11px;min-width:0}.memory-logo{width:76px;height:76px;flex:0 0 76px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#fff,var(--light));box-shadow:0 2px 12px rgba(28,68,112,.12),0 0 0 3px color-mix(in srgb,var(--light) 45%,transparent)}
.memory-logo svg{width:56px;height:56px;fill:color-mix(in srgb,var(--mid) 65%,white);stroke:var(--deep);stroke-width:4;stroke-linecap:round}.memory-brand-copy{min-width:0}.memory-kicker{font-size:9.5px;letter-spacing:.16em;font-weight:900;color:var(--dark)}
.memory-brand h2{margin:2px 0 3px;font-size:22px;line-height:1.18;color:var(--ink);font-weight:900;white-space:nowrap}.memory-brand h2 small{font-size:.5em;color:var(--dark);font-weight:750}.memory-brand p{margin:0;color:#516c88;font-size:11px;font-weight:700;white-space:nowrap}
.memory-history{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;align-self:stretch}.memory-stat-card{min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:8px;min-height:72px;padding:8px 10px;background:#fff;border:1px solid color-mix(in srgb,var(--mid) 28%,#d7e2ef);border-radius:12px;box-shadow:0 3px 11px rgba(36,72,110,.07);box-sizing:border-box}
.memory-stat-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--light) 60%,white);color:var(--dark);font-size:17px;font-weight:950}.memory-stat-card>div{display:flex;flex-direction:column;gap:1px;min-width:0}.memory-stat-title{font-size:11px;font-weight:850;color:#334e6b;white-space:nowrap}.memory-stat-card span:not(.memory-stat-icon):not(.memory-stat-title){font-size:11.5px;color:#405a75;white-space:nowrap}.memory-stat-card i{display:inline-block;min-width:27px;font-style:normal;font-size:10px;color:#8a9aae;font-weight:800}
.memory-user-actions{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.memory-login-user{font-size:11px;color:#1d3656;font-weight:900;white-space:nowrap}.memory-home{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#fff;border:1px solid color-mix(in srgb,var(--mid) 38%,#c8d9ec);color:var(--dark);box-shadow:0 3px 10px rgba(30,73,121,.08)}.memory-home svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* 난이도 + 게임 툴바 */
.memory-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:7px;margin-bottom:12px;border:1px solid color-mix(in srgb,var(--mid) 38%,#c8d6e8);border-radius:15px;background:linear-gradient(110deg,color-mix(in srgb,var(--light) 64%,white),#fff 48%,color-mix(in srgb,var(--soft) 35%,white))}.memory-level{border:1px solid transparent;background:transparent;border-radius:11px;padding:9px 10px;color:var(--deep);font-weight:900;cursor:pointer}.memory-level small{display:block;margin-top:2px;font-size:10px;font-weight:700;opacity:.82}.memory-level.is-active{background:#fff;border-color:var(--mid);box-shadow:0 3px 10px rgba(30,73,121,.08)}
.memory-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;min-height:58px;margin-bottom:13px;padding:9px 12px 9px 15px;border:1px solid color-mix(in srgb,var(--mid) 35%,#c7d7e8);border-radius:16px;background:radial-gradient(circle at 2% 8%,color-mix(in srgb,var(--light) 38%,transparent),transparent 28%),linear-gradient(110deg,color-mix(in srgb,var(--light) 28%,white),#fff 55%,color-mix(in srgb,var(--soft) 20%,white))}.memory-toolbar>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}.memory-toolbar strong{font-size:16px;color:var(--deep)}.memory-toolbar>div:first-child span{font-size:11px;color:#71859c}.memory-toolbar-right{display:flex;align-items:center;gap:8px}.memory-time{min-height:34px;display:flex;align-items:center;padding:0 11px;border-radius:999px;background:#fff;border:1px solid color-mix(in srgb,var(--mid) 40%,#bfd2eb);font-size:11px;color:#61758c;font-weight:850}.memory-time b{margin-left:5px;color:var(--dark);font-size:14px}#newMemoryBtn{min-height:38px;border:1px solid var(--dark);background:linear-gradient(180deg,var(--mid),var(--dark));color:#fff;border-radius:10px;padding:0 14px;font-size:12px;font-weight:850;cursor:pointer;box-shadow:0 3px 8px color-mix(in srgb,var(--mid) 25%,transparent)}

/* Detective와 같은 3열: 게임판 / 찾은 짝 / 세로 그래프 */
.memory-workspace{display:grid;grid-template-columns:minmax(0,1fr) 290px 150px;gap:12px;align-items:stretch}.memory-board-card,.memory-found-card,.memory-chart-card{min-width:0;border:1px solid color-mix(in srgb,var(--mid) 42%,#b9cde5);border-radius:16px;background:linear-gradient(135deg,#f9fcff,color-mix(in srgb,var(--light) 55%,#eef5ff) 65%,#f8fbff);box-shadow:0 7px 22px rgba(35,76,122,.06);box-sizing:border-box}.memory-board-card{padding:10px}.memory-found-card{padding:13px;display:flex;flex-direction:column;overflow:hidden}.memory-chart-card{padding:12px 8px;display:flex;flex-direction:column;align-items:center;overflow:hidden}.memory-side-title{width:100%;display:flex;flex-direction:column;gap:2px;margin-bottom:10px}.memory-side-title strong{font-size:15px;color:#29445f}.memory-side-title span{font-size:10.5px;color:#8091a5;font-weight:800}

/* 반드시 정사각형 그리드 */
.memory-board{display:grid;width:100%;aspect-ratio:1/1;margin:0 auto;gap:7px;grid-auto-rows:1fr;min-width:0}.memory-board.size-6{grid-template-columns:repeat(6,minmax(0,1fr))}.memory-board.size-8{grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}.memory-board.size-10{grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}.memory-loading{grid-column:1/-1;display:grid;place-items:center;min-height:480px;color:var(--deep);font-weight:800}
.memory-card{position:relative;display:block;min-width:0;min-height:0;width:100%;height:100%;aspect-ratio:1/1;padding:0;border:0;background:transparent;perspective:800px;cursor:pointer;overflow:visible}.memory-card-inner{display:block;position:absolute;inset:0;transform-style:preserve-3d;transition:transform .38s cubic-bezier(.2,.75,.25,1)}.memory-card.is-open .memory-card-inner,.memory-card.is-matched .memory-card-inner{transform:rotateY(180deg)}.memory-card-back,.memory-card-front{position:absolute;inset:0;border-radius:10px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;box-sizing:border-box}.memory-card-back{display:grid;place-items:center;border:1px solid var(--deep);color:#fff;background:radial-gradient(circle at 26% 20%,rgba(255,255,255,.64) 0 3%,transparent 4%),linear-gradient(145deg,var(--light) 0%,var(--mid) 34%,var(--dark) 70%,var(--deep) 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -4px 10px rgba(0,0,0,.16),0 3px 8px rgba(20,45,70,.16)}.memory-card-back:after{content:"";position:absolute;inset:5px;border:1px solid rgba(255,255,255,.32);border-radius:7px}.memory-card-back i{position:absolute;width:42%;aspect-ratio:1;border:1px solid rgba(255,255,255,.38);transform:rotate(45deg);border-radius:7px}.memory-card-back b{position:relative;z-index:2;font-size:clamp(6px,.8vw,10px);line-height:1.12;letter-spacing:.04em;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.28)}
.memory-card-front{transform:rotateY(180deg);display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--mid) 70%,#aec4dd);background:radial-gradient(circle at 78% 18%,rgba(255,255,255,.95),transparent 27%),linear-gradient(145deg,#fff,var(--light) 58%,var(--soft));box-shadow:inset 0 0 0 3px rgba(255,255,255,.55),0 3px 8px rgba(20,45,70,.08)}.memory-card-front:before{content:"";position:absolute;inset:5px;border:1px dashed color-mix(in srgb,var(--mid) 70%,transparent);border-radius:7px;opacity:.58}.memory-picture,.memory-word{position:relative;z-index:2;text-align:center;color:var(--ink);font-weight:900}.memory-picture img{display:block;width:88%;height:88%;max-width:104px;max-height:104px;object-fit:contain;margin:auto}.memory-picture small{display:none}.memory-word{padding:3px;font-size:clamp(9px,.9vw,14px);word-break:keep-all;line-height:1.15}.size-10 .memory-word{font-size:clamp(7px,.67vw,10px)}.memory-card.is-matched{pointer-events:none}.memory-card.is-matched .memory-card-front{box-shadow:inset 0 0 0 3px rgba(255,255,255,.72),0 0 0 2px var(--dark),0 0 14px color-mix(in srgb,var(--mid) 38%,transparent)}

/* 찾은 짝 */
.matched-pairs{flex:1 1 auto;min-height:0;max-height:680px;overflow-y:auto;overflow-x:hidden;padding-right:5px;display:flex;flex-direction:column;gap:7px;scrollbar-width:thin;scrollbar-color:var(--mid) transparent}.matched-pair{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:4px;padding:5px;border:1px solid color-mix(in srgb,var(--mid) 32%,#d0ddea);border-radius:9px;background:linear-gradient(135deg,color-mix(in srgb,var(--mid) 14%,white),color-mix(in srgb,var(--light) 45%,white));animation:pairIn .42s ease both}.mini-card{min-width:0;min-height:44px;border:1px solid color-mix(in srgb,var(--mid) 55%,#bfd0e4);border-radius:8px;background:#fff;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px;color:#17324e;font-size:10px;font-weight:800;text-align:center;overflow:hidden}.mini-card b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.matched-image{width:29px;height:29px;object-fit:contain;flex:0 0 29px}.pair-link{text-align:center;color:var(--dark);font-size:10px;font-weight:900}@keyframes pairIn{from{opacity:0;transform:translateX(-14px) scale(.95)}to{opacity:1;transform:none}}

/* 세로 막대 그래프 */
.memory-chart{flex:1 1 auto;min-height:410px;width:100%;display:flex;align-items:flex-end;justify-content:space-around;gap:14px;padding:8px 8px 4px;box-sizing:border-box}.chart-row{height:100%;width:32px;flex:0 0 32px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px}.chart-label{order:2;text-align:center}.chart-label span{display:block;font-size:8px;color:#8091a5;font-weight:850;word-break:keep-all}.chart-label b{font-size:10px;color:var(--dark)}.chart-track{position:relative;width:26px;flex:1;min-height:330px;border:2px solid color-mix(in srgb,var(--mid) 26%,transparent);border-radius:999px;background:linear-gradient(180deg,rgba(255,255,255,.9),color-mix(in srgb,var(--light) 45%,#e0f0f9));overflow:hidden;box-shadow:inset 0 4px 10px rgba(69,112,150,.08)}.chart-track i{position:absolute;left:0;right:0;bottom:0;height:0;border-radius:999px;background:linear-gradient(0deg,var(--deep),var(--dark) 52%,var(--mid));box-shadow:0 0 12px color-mix(in srgb,var(--mid) 34%,transparent);transition:height .42s cubic-bezier(.2,.75,.25,1)}.memory-mini-stats{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding-top:8px;border-top:1px solid #d4e0ec}.memory-mini-stats span{font-size:8px;color:#8091a5;text-align:center}.memory-mini-stats b{display:block;margin-top:1px;font-size:13px;color:var(--dark)}
.memory-message{min-height:30px;margin-top:10px;padding:8px 11px;border-radius:9px;background:color-mix(in srgb,var(--light) 55%,white);border:1px solid color-mix(in srgb,var(--mid) 30%,#d0ddea);color:#58708a;font-size:12px;font-weight:700;box-sizing:border-box}

/* 날아가는 패 + 완료 */
.memory-fly-card{position:fixed!important;z-index:100000!important;pointer-events:none!important;display:grid!important;place-items:center!important;transform:none;transition:left .52s cubic-bezier(.18,.76,.22,1),top .52s cubic-bezier(.18,.76,.22,1),width .52s ease,height .52s ease,transform .52s ease,opacity .52s ease;box-shadow:0 12px 30px rgba(20,40,65,.3)!important}.memory-fly-card:before{display:none!important}.memory-celebration{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;pointer-events:none;background:rgba(10,20,35,.16);backdrop-filter:blur(2px)}.memory-celebration.is-show{display:flex}.memory-celebration strong{font-size:clamp(52px,9vw,120px);color:#fff;text-shadow:0 5px 30px rgba(0,0,0,.35);animation:pop .8s ease both}.memory-confetti{position:absolute;inset:0;background-image:radial-gradient(circle,#ffeb3b 0 4px,transparent 5px),radial-gradient(circle,#ff5b8a 0 4px,transparent 5px),radial-gradient(circle,#63e6be 0 4px,transparent 5px);background-size:90px 110px,120px 95px,130px 125px;animation:fall 1.8s linear infinite}@keyframes pop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fall{from{background-position:0 -120px,30px -150px,70px -180px}to{background-position:0 520px,30px 590px,70px 650px}}

/* Dark mode */
html.bp-dark .memory-page{color:#dce6f2}html.bp-dark .memory-dashboard,html.bp-dark .memory-board-card,html.bp-dark .memory-found-card,html.bp-dark .memory-chart-card,html.bp-dark .memory-toolbar,html.bp-dark .memory-levels,html.bp-dark .memory-message{background:#151f2e!important;border-color:#36506d!important;box-shadow:none!important}html.bp-dark .memory-stat-card,html.bp-dark .memory-home,html.bp-dark .memory-level.is-active,html.bp-dark .memory-time,html.bp-dark .matched-pair,html.bp-dark .mini-card{background:#172436!important;border-color:#36506d!important;box-shadow:none!important}html.bp-dark .memory-brand h2,html.bp-dark .memory-side-title strong,html.bp-dark .memory-toolbar strong{color:#eef6ff!important}html.bp-dark .memory-brand p,html.bp-dark .memory-brand h2 small,html.bp-dark .memory-kicker,html.bp-dark .memory-login-user,html.bp-dark .memory-side-title span,html.bp-dark .chart-label span,html.bp-dark .memory-mini-stats span{color:#9eb0c3!important}html.bp-dark .memory-stat-title{color:#b8c8d9!important}html.bp-dark .memory-stat-card span:not(.memory-stat-icon):not(.memory-stat-title),html.bp-dark .mini-card,html.bp-dark .memory-word{color:#e4edf7!important}html.bp-dark .memory-card-front{background:linear-gradient(145deg,#17283b,#111c2a)!important;border-color:#405f7e!important}html.bp-dark .chart-track{background:linear-gradient(180deg,#0f1d2d,#12253a)!important;border-color:#3a5873!important}html.bp-dark .memory-mini-stats{border-top-color:#304a62!important}


/* Google AdSense — Detective와 동일한 공용 슬롯 */
.memory-content-ad{margin:18px 0 20px}

/* Dark mode — BiblePang 공용 bp-dark + 보조 dark selector 모두 대응 */
html.bp-dark .memory-page,
body.bp-dark .memory-page,
html[data-theme="dark"] .memory-page,
body[data-theme="dark"] .memory-page{color:#dce6f2!important}
html.bp-dark .memory-dashboard,html.bp-dark .memory-board-card,html.bp-dark .memory-found-card,html.bp-dark .memory-chart-card,html.bp-dark .memory-toolbar,html.bp-dark .memory-levels,html.bp-dark .memory-message,
body.bp-dark .memory-dashboard,body.bp-dark .memory-board-card,body.bp-dark .memory-found-card,body.bp-dark .memory-chart-card,body.bp-dark .memory-toolbar,body.bp-dark .memory-levels,body.bp-dark .memory-message,
html[data-theme="dark"] .memory-dashboard,html[data-theme="dark"] .memory-board-card,html[data-theme="dark"] .memory-found-card,html[data-theme="dark"] .memory-chart-card,html[data-theme="dark"] .memory-toolbar,html[data-theme="dark"] .memory-levels,html[data-theme="dark"] .memory-message{
  background:#151f2e!important;border-color:#36506d!important;box-shadow:none!important;color:#dce6f2!important
}
html.bp-dark .memory-stat-card,html.bp-dark .memory-home,html.bp-dark .memory-level.is-active,html.bp-dark .memory-time,html.bp-dark .matched-pair,html.bp-dark .mini-card,
body.bp-dark .memory-stat-card,body.bp-dark .memory-home,body.bp-dark .memory-level.is-active,body.bp-dark .memory-time,body.bp-dark .matched-pair,body.bp-dark .mini-card,
html[data-theme="dark"] .memory-stat-card,html[data-theme="dark"] .memory-home,html[data-theme="dark"] .memory-level.is-active,html[data-theme="dark"] .memory-time,html[data-theme="dark"] .matched-pair,html[data-theme="dark"] .mini-card{
  background:#172436!important;border-color:#36506d!important;box-shadow:none!important;color:#e4edf7!important
}
html.bp-dark .memory-level,body.bp-dark .memory-level,html[data-theme="dark"] .memory-level{color:#a9bbcc!important}
html.bp-dark .memory-brand h2,html.bp-dark .memory-side-title strong,html.bp-dark .memory-toolbar strong,html.bp-dark .memory-stat-card strong,
body.bp-dark .memory-brand h2,body.bp-dark .memory-side-title strong,body.bp-dark .memory-toolbar strong,body.bp-dark .memory-stat-card strong,
html[data-theme="dark"] .memory-brand h2,html[data-theme="dark"] .memory-side-title strong,html[data-theme="dark"] .memory-toolbar strong,html[data-theme="dark"] .memory-stat-card strong{color:#eef6ff!important}
html.bp-dark .memory-card-front,body.bp-dark .memory-card-front,html[data-theme="dark"] .memory-card-front{background:linear-gradient(145deg,#17283b,#111c2a)!important;border-color:#405f7e!important;color:#eef6ff!important}
html.bp-dark .memory-word,html.bp-dark .mini-card,body.bp-dark .memory-word,body.bp-dark .mini-card,html[data-theme="dark"] .memory-word,html[data-theme="dark"] .mini-card{color:#eef6ff!important}
html.bp-dark .chart-track,body.bp-dark .chart-track,html[data-theme="dark"] .chart-track{background:linear-gradient(180deg,#0f1d2d,#12253a)!important;border-color:#3a5873!important}
html.bp-dark .memory-content-ad,html.bp-dark .bp-content-ad,body.bp-dark .memory-content-ad,body.bp-dark .bp-content-ad,html[data-theme="dark"] .memory-content-ad,html[data-theme="dark"] .bp-content-ad{background:#121d2b!important;border-color:#31465f!important;color:#a7b8ca!important}

/* 반응형 — Detective 기준 */
@media(max-width:1100px){.memory-dashboard{grid-template-columns:1fr}.memory-user-actions{flex-direction:row;justify-content:flex-end}.memory-history{grid-template-columns:repeat(3,minmax(0,1fr))}.memory-workspace{grid-template-columns:minmax(0,1fr) 250px 132px}}
@media(max-width:779px){.memory-workspace{grid-template-columns:minmax(0,1fr) 235px 120px;gap:9px}.memory-board{gap:5px}.memory-board.size-10{gap:3px}.memory-chart{min-height:330px}.chart-track{min-height:260px}}
@media(max-width:720px){.memory-page{width:calc(100% - 24px);max-width:none;margin-top:16px}.memory-history{grid-template-columns:1fr}.memory-levels{grid-template-columns:1fr}.memory-level small{display:inline;margin-left:6px}.memory-toolbar{grid-template-columns:1fr}.memory-toolbar-right{justify-content:flex-end}.memory-workspace{grid-template-columns:1fr!important}.memory-board-card{padding:7px}.memory-found-card{min-height:230px}.matched-pairs{max-height:260px}.memory-chart-card{min-height:190px}.memory-chart{min-height:145px;flex:none;height:145px}.chart-track{min-height:95px}.memory-mini-stats{max-width:220px}.memory-brand p{white-space:normal}.memory-brand h2{white-space:normal}.memory-dashboard{padding:10px}.memory-board.size-8{gap:4px}.memory-board.size-10{gap:2px}.memory-card-back b{font-size:6px}.memory-card-back:after,.memory-card-front:before{inset:3px}}

.memory-stat-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.memory-stat-card.stat-clears .memory-stat-icon{color:#27ada2}
.memory-stat-card.best-time .memory-stat-icon{color:#e7a11b}
.memory-stat-card.stat-points .memory-stat-icon{color:#ec991a}

/* v6 color image icons */

.memory-stat-icon{width:38px!important;height:38px!important;background:transparent!important;border:0!important;display:grid!important;place-items:center!important}
.memory-stat-icon img{display:block!important;width:36px!important;height:36px!important;object-fit:contain!important;max-width:none!important}
.memory-stat-icon svg{display:none!important}

/* v7: memory match color PNG icons, theme/dark-safe */
.memory-stat-icon{
  width:32px!important;height:32px!important;
  display:grid!important;place-items:center!important;
  background:color-mix(in srgb,var(--light) 72%,transparent)!important;
  border:1px solid color-mix(in srgb,var(--mid) 45%,transparent)!important;
  border-radius:10px!important;
}
.memory-stat-icon img{width:28px!important;height:28px!important;display:block!important;object-fit:contain!important;filter:none!important}
.memory-stat-icon svg{display:none!important}
html.bp-dark .memory-stat-icon,
body.bp-dark .memory-stat-icon,
html[data-theme="dark"] .memory-stat-icon{
  background:color-mix(in srgb,var(--deep) 40%,#172330)!important;
  border-color:color-mix(in srgb,var(--mid) 55%,#36516d)!important;
}


/* =========================================================
   2026-08-18 layout refinement — image 6
   퍼즐판을 한 화면에 들어오도록 축소하고 찾은 짝 패널을 확장
   ========================================================= */
@media (min-width:1101px){
  .memory-page .memory-workspace{
    grid-template-columns:720px minmax(380px,1fr) 150px!important;
    gap:12px!important;
    align-items:stretch!important;
  }
  .memory-page .memory-board-card{
    width:720px!important;
    max-width:720px!important;
    padding:10px!important;
  }
  .memory-page .memory-board{
    width:100%!important;
    max-width:700px!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    margin:0 auto!important;
  }
  .memory-page .memory-found-card{
    min-width:380px!important;
    min-height:720px!important;
    padding:16px!important;
  }
  .memory-page .matched-pairs{
    max-height:none!important;
    height:auto!important;
  }
  .memory-page .memory-side-title strong{
    font-size:16px!important;
  }
  .memory-page .memory-side-title span{
    font-size:11.5px!important;
  }
}
@media (min-width:1101px) and (max-width:1280px){
  .memory-page .memory-workspace{
    grid-template-columns:640px minmax(320px,1fr) 138px!important;
  }
  .memory-page .memory-board-card{width:640px!important;max-width:640px!important}
  .memory-page .memory-board{max-width:620px!important}
  .memory-page .memory-found-card{min-width:320px!important;min-height:640px!important}
}
