/* 기억력 카드(2026-10-27 개발자3). 공용 /psych/style.css 위에 덮는다. 본문 14px 이상. */
.stage.mc { padding: 0 0 40px; }
.hidden { display: none !important; }
.mc-head { text-align: center; margin: 12px 16px 0; }
.mc-eyebrow { font-size: 14px; font-weight: 800; color: #7048E8; }
.mc-title { font-size: 30px; font-weight: 900; color: #111827; margin: 2px 0 0; letter-spacing: -0.02em; word-break: keep-all; }
.mc-sub { font-size: 15px; line-height: 1.6; color: #4B5563; margin: 6px 0 0; word-break: keep-all; }

.mc-box { background: #fff; border: 1.5px solid #E5E7EB; border-radius: 22px; padding: 16px; margin: 16px 16px 0; }
.mc-box-title { font-size: 17px; font-weight: 900; color: #111827; margin-bottom: 10px; }
.mc-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mc-level { display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: inherit; background: #F8F9FA; border: 2px solid #E9ECEF; border-radius: 14px;
    padding: 10px 4px; cursor: pointer; color: #374151; -webkit-tap-highlight-color: transparent; }
.mc-level b { font-size: 18px; font-weight: 900; }
.mc-level span { font-size: 14px; font-weight: 700; color: #6B7280; }
.mc-level.on { background: #F3F0FF; border-color: #7950F2; color: #5F3DC4; box-shadow: 0 3px 0 #D0BFFF; }
.mc-level.on span { color: #7048E8; }
.mc-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-topic { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; font-family: inherit; border: 0; border-radius: 18px; padding: 14px 12px;
    min-height: 118px; color: #fff; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.12); -webkit-tap-highlight-color: transparent; }
.mc-topic:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.mc-topic .e { font-size: 30px; line-height: 1; }
.mc-topic .n { font-size: 17px; font-weight: 900; word-break: keep-all; }
.mc-topic .d { font-size: 14px; font-weight: 700; opacity: .92; line-height: 1.4; word-break: keep-all; }
.mc-topic .p { margin-top: auto; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.mc-t0 { background: linear-gradient(135deg, #9775FA, #6741D9); }
.mc-t1 { background: linear-gradient(135deg, #FF8787, #C92A2A); }
.mc-t2 { background: linear-gradient(135deg, #4DABF7, #1971C2); }
.mc-t3 { background: linear-gradient(135deg, #FFA94D, #E8590C); }
.mc-rule { font-size: 14px; color: #6B7280; margin: 14px 0 0; line-height: 1.6; word-break: keep-all; }
.mc-landing { text-align: center; margin-top: 14px; }

.mc-challenge { text-align: center; padding: 6px 0 4px; }
.mc-ch-badge { display: inline-block; font-size: 14px; font-weight: 900; color: #fff; background: #E8590C; border-radius: 999px; padding: 4px 12px; }
.mc-ch-title { font-size: 22px; font-weight: 900; color: #111827; margin-top: 10px; word-break: keep-all; }
.mc-ch-desc { font-size: 15px; color: #4B5563; margin: 6px 0 0; word-break: keep-all; }
.mc-text-btn { display: block; margin: 10px auto 0; font-family: inherit; font-size: 14px; font-weight: 800; color: #6B7280; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; }
.mc-main { display: block; width: 100%; margin-top: 14px; font-family: inherit; font-size: 18px; font-weight: 900; color: #fff;
    background: linear-gradient(180deg, #845EF7, #6741D9); border: 0; border-radius: 16px; padding: 15px; cursor: pointer; box-shadow: 0 5px 0 #5F3DC4; }
.mc-main:active { transform: translateY(3px); box-shadow: 0 2px 0 #5F3DC4; }

/* 게임 */
.mc-game { position: relative; background: linear-gradient(180deg, #F3F0FF 0%, #fff 70%); border-color: #E5DBFF; padding: 14px 12px; }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-chip { font-size: 14px; font-weight: 800; color: #5F3DC4; background: #fff; border: 1.5px solid #D0BFFF; border-radius: 999px; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mc-stat { flex-shrink: 0; font-size: 15px; font-weight: 800; color: #495057; }
.mc-stat b { font-weight: 900; color: #111827; font-variant-numeric: tabular-nums; }
.mc-progress { height: 8px; background: #E9ECEF; border-radius: 999px; overflow: hidden; margin: 10px 0 12px; }
.mc-progress i { display: block; height: 100%; background: linear-gradient(90deg, #845EF7, #20C997); border-radius: 999px; transform: scaleX(0); transform-origin: left center; transition: transform .35s ease-out; }
.mc-combo { position: absolute; left: 50%; top: 64px; z-index: 5; white-space: nowrap; font-size: 20px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #FF922B, #E8590C);
    border-radius: 999px; padding: 5px 16px; box-shadow: 0 4px 12px rgba(232,89,12,.35); opacity: 0; pointer-events: none; transform: translate(-50%, 0); }
.mc-combo.show { animation: mcCombo 1.2s ease-out; }
@keyframes mcCombo { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.5); } 20% { opacity: 1; transform: translate(-50%, -4px) scale(1.2); } 35% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }

.mc-board { --cols: 4; --card-ratio: 1.12; --card-min-ratio: 0.8; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; margin: 0 auto; max-width: calc(var(--cols) * 118px); perspective: 900px; }
.mc-card { position: relative; width: 100%; aspect-ratio: 1 / var(--card-ratio); height: var(--card-h, auto); padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; touch-action: manipulation;
    -webkit-tap-highlight-color: transparent; animation: mcDeal .35s ease-out backwards; }
.mc-card .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3,1.3,.5,1); }
.mc-card.up .in, .mc-card.ok .in { transform: rotateY(180deg); }
.mc-card .bk, .mc-card .fr { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mc-card .bk { font-size: 28px; font-weight: 900; color: rgba(255,255,255,.9);
    background: repeating-linear-gradient(45deg, #7950F2 0 10px, #845EF7 10px 20px); box-shadow: 0 4px 0 #5F3DC4; border: 2px solid rgba(255,255,255,.35); }
.mc-card:active:not(.up):not(.ok) .bk { transform: translateY(2px); box-shadow: 0 2px 0 #5F3DC4; }
.mc-card .fr { transform: rotateY(180deg); background: #fff; border: 2px solid #CED4DA; box-shadow: 0 4px 0 #DEE2E6; padding: 3px 1px; }
.mc-card .tx { font-size: 14px; font-weight: 900; color: #212529; line-height: 1.25; letter-spacing: -0.05em; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }   /* 휴대폰 4열에서 다섯 글자 낱말(광개토대왕·플래시오버)이 한 줄에 들어가게 */
.mc-board.same .mc-card .tx { font-size: 38px; line-height: 1; }
.mc-board.few .mc-card .tx { font-size: 18px; }
.mc-board.same.few .mc-card .tx { font-size: 46px; }
.mc-board.hanja .mc-card.side-a .tx { font-size: 36px; font-family: "Noto Serif KR", "Batang", serif; }
.mc-card.side-a .fr { border-color: #339AF0; box-shadow: 0 4px 0 #A5D8FF; background: #F1F8FF; }
.mc-card.side-b .fr { border-color: #FF922B; box-shadow: 0 4px 0 #FFD8A8; background: #FFF8F0; }
.mc-card.ok .fr { border-color: #2B8A3E; box-shadow: 0 4px 0 #B2F2BB; background: #EBFBEE; animation: mcMatch .6s ease-out; }
.mc-card.ok .fr::after { content: '✨'; position: absolute; right: 2px; top: 0; font-size: 16px; animation: mcSpark .7s ease-out; }
.mc-card.no .fr { border-color: #FA5252; box-shadow: 0 4px 0 #FFC9C9; }
.mc-card.no { animation: mcShake .35s .25s; }
.mc-card:disabled { cursor: default; }
@keyframes mcDeal { from { transform: translateY(10px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mcMatch { 0% { transform: rotateY(180deg) scale(1); } 40% { transform: rotateY(180deg) scale(1.1); } 100% { transform: rotateY(180deg) scale(1); } }
@keyframes mcSpark { 0% { opacity: 0; transform: scale(.3) rotate(-30deg); } 40% { opacity: 1; transform: scale(1.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mcShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.mc-board.clear .mc-card { animation: mcWave .6s ease-out; }
.mc-board.clear .mc-card:nth-child(2n) { animation-delay: .06s; } .mc-board.clear .mc-card:nth-child(3n) { animation-delay: .12s; }
@keyframes mcWave { 0% { transform: none; } 40% { transform: translateY(-8px) scale(1.05); } 100% { transform: none; } }
.mc-legend { text-align: center; font-size: 14px; font-weight: 700; color: #6B7280; margin-top: 12px; word-break: keep-all; }
.mc-legend .la { color: #1C7ED6; font-weight: 900; } .mc-legend .lb { color: #E8590C; font-weight: 900; }

/* 결과 */
#mcResult { text-align: center; }
.mc-res-emoji { font-size: 56px; line-height: 1.1; animation: mcDeal .5s ease-out; }
.mc-res-title { display: inline-block; margin-top: 6px; font-size: 20px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #FF922B, #E8590C); border-radius: 999px; padding: 5px 16px; box-shadow: 0 4px 0 #C2410C; }
.mc-res-big { font-size: 28px; font-weight: 900; color: #5F3DC4; margin-top: 10px; font-variant-numeric: tabular-nums; }
.mc-res-sub { font-size: 15px; font-weight: 800; color: #495057; margin-top: 4px; word-break: keep-all; line-height: 1.5; }
.mc-res-best { display: inline-block; font-size: 15px; font-weight: 800; color: #495057; background: #F8F9FA; border-radius: 999px; padding: 4px 12px; margin-top: 8px; }
.mc-res-best.new { color: #fff; background: linear-gradient(135deg, #20C997, #0CA678); animation: mcDeal .5s ease-out; }
.mc-res-say { font-size: 15px; font-weight: 700; color: #4B5563; margin-top: 8px; word-break: keep-all; }
.mc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mc-sub-btn { display: block; width: 100%; font-family: inherit; font-size: 15px; font-weight: 800; color: #374151; background: #F8F9FA; border: 1.5px solid #E9ECEF; border-radius: 12px; padding: 12px 6px; cursor: pointer; }
.mc-others { margin-top: 16px; text-align: left; }
.mc-others-title { font-size: 16px; font-weight: 900; color: #111827; margin-bottom: 8px; text-align: center; }
.mc-others-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-others-row button { font-family: inherit; font-size: 14px; font-weight: 800; color: #374151; background: #F8F9FA; border: 1.5px solid #E9ECEF; border-radius: 12px; padding: 11px 6px; cursor: pointer; word-break: keep-all; }
.mc-others-row button.lv { color: #5F3DC4; background: #F3F0FF; border-color: #D0BFFF; }
.mc-exam { display: block; margin-top: 12px; font-size: 15px; font-weight: 900; color: #1864AB; background: #E7F5FF; border-radius: 12px; padding: 12px; text-decoration: none; }
.mc-review { text-align: left; margin-top: 14px; }
.mc-review summary { font-size: 15px; font-weight: 800; color: #374151; cursor: pointer; padding: 6px 0; }
.mc-review-list { margin: 6px 0 0; padding-left: 22px; }
.mc-review-list li { font-size: 15px; line-height: 1.6; margin-bottom: 6px; word-break: keep-all; }
.mc-review-list .x { display: block; font-size: 14px; color: #495057; margin-top: 2px; }
.mc-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* 소개 글 */
.mc-intro { color: #374151; }
.mc-intro:empty { display: none; }
.mc-intro-title { font-size: 18px; font-weight: 900; color: #111827; margin: 0 0 8px; }
.mc-intro p { font-size: 15px; line-height: 1.7; margin: 0 0 8px; word-break: keep-all; }
.mc-intro-meta { font-size: 14px !important; color: #6B7280; }
.mc-topic-links { list-style: none; margin: 0; padding: 0; }
.mc-topic-links li { padding: 10px 2px; border-top: 1px solid #F1F3F5; }
.mc-topic-links li:first-child { border-top: 0; }
.mc-topic-links a { font-size: 16px; font-weight: 900; color: #5F3DC4; text-decoration: none; }
.mc-topic-links span { display: block; font-size: 14px; color: #6B7280; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) { .mc-card, .mc-card.no, .mc-card.ok .fr, .mc-board.clear .mc-card, .mc-combo.show { animation: none; } .mc-card .in { transition: none; } }
@media (max-width: 400px) { .mc-board { gap: 6px; } .mc-game { padding: 12px 10px; } }
@media (max-width: 360px) { .mc-board.same .mc-card .tx { font-size: 32px; } }
@media (min-width: 768px) {
    .stage.mc { max-width: 760px; }
    .mc-title { font-size: 36px; }
    .mc-topics { grid-template-columns: repeat(4, 1fr); }
    .mc-card .tx { font-size: 16px; }
    .mc-board.same .mc-card .tx { font-size: 46px; }
}

/* 오늘의 카드(2026-10-30) - 처음 화면 맨 위 큰 버튼(숫자야구 오늘의 숫자와 같은 꼴, 색만 기억력 카드 파랑) */
.mc-daily { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; text-align: left; font-family: inherit; border: 0; border-radius: 20px; padding: 16px; margin-bottom: 16px;
    color: #fff; cursor: pointer; background: linear-gradient(135deg, #339AF0, #1C7ED6); box-shadow: 0 5px 0 #1864AB; -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden; }
.mc-daily::after { content: '🃏'; position: absolute; right: 14px; bottom: 6px; font-size: 52px; opacity: .25; transform: rotate(-12deg); }
.mc-daily:active { transform: translateY(3px); box-shadow: 0 2px 0 #1864AB; }
.mc-daily-top { display: flex; align-items: center; gap: 8px; }
.mc-daily-badge { font-size: 13px; font-weight: 900; color: #1C7ED6; background: #fff; border-radius: 999px; padding: 2px 9px; }
.mc-daily-date { font-size: 15px; font-weight: 800; }
.mc-daily-name { font-size: 20px; font-weight: 900; }
.mc-daily-state { font-size: 14px; font-weight: 800; background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; }
