/* 게임 모음 페이지 */
.gm-wrap { max-width: 980px; margin: 2rem auto 4rem; padding: 0 1rem; }
.gm-notice { max-width: 760px; margin: 0 auto 1.3rem; padding: .8rem 1.1rem; background: #fff8e1; border: 1px solid #ffd24d; border-radius: 14px; color: #5a4300; font-size: .95rem; line-height: 1.6; text-align: center; }
.gm-hero { text-align: center; margin-bottom: 1.8rem; }
.gm-hero h1 { font-size: 2.3rem; margin: 0 0 .5rem; color: #333; }
.gm-hero p { margin: 0 auto; max-width: 560px; color: #666; font-size: 1.05rem; line-height: 1.6; }

.gm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.gm-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; padding: 1.5rem 1.4rem 1.2rem; border: 2px solid rgba(0,0,0,.05); border-radius: 22px; background: var(--gc, #FFF3C4); cursor: pointer; font-family: inherit; color: #333; box-shadow: 0 4px 14px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s; }
.gm-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.gm-card:focus-visible { outline: 3px solid #FFD700; outline-offset: 3px; }
.gm-ic { font-size: 2.8rem; line-height: 1; margin-bottom: .2rem; }
.gm-card b { font-size: 1.25rem; }
.gm-desc { font-size: .95rem; color: #555; line-height: 1.5; }
.gm-best { margin-top: .3rem; font-size: .82rem; font-weight: 700; color: #7a5b00; background: rgba(255,255,255,.7); padding: .2rem .65rem; border-radius: 999px; }
.gm-play { margin-top: .6rem; align-self: flex-end; font-weight: 800; background: #fff; padding: .45rem 1rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }

.gm-stage { background: #fff; border: 1px solid #eee; border-radius: 22px; box-shadow: 0 6px 24px rgba(0,0,0,.07); padding: 1.2rem 1.4rem 1.8rem; }
.gm-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; border-bottom: 1px solid #f0f0f0; padding-bottom: .9rem; margin-bottom: 1.2rem; }
.gm-bar h2 { margin: 0; font-size: 1.25rem; color: #333; flex: 1; text-align: center; }
.gm-back { border: 0; background: #f4f1e6; color: #6b5a1d; font: 700 .9rem inherit; font-family: inherit; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; }
.gm-back:hover { background: #ffe9a0; }
.gm-hud { font-weight: 700; color: #7a5b00; font-size: .95rem; min-width: 7rem; text-align: right; }
.gm-body { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.gm-btn { border: 0; border-radius: 999px; padding: .65rem 1.3rem; font: 700 1rem inherit; font-family: inherit; background: #f1f1f1; color: #555; cursor: pointer; transition: transform .12s, background .12s; }
.gm-btn:hover { transform: translateY(-1px); background: #ffeaa0; color: #5a4300; }
.gm-btn.primary { background: linear-gradient(135deg, #ffe38a, #ffd24d); color: #5a4300; box-shadow: 0 4px 12px rgba(255,190,50,.35); }
.gm-btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

.gm-pick { text-align: center; }
.gm-pick p { font-size: 1.1rem; color: #555; margin: 0 0 1rem; }
.gm-levels { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.gm-btn.lv { min-width: 7rem; padding: .9rem 1.4rem; font-size: 1.05rem; }

.gm-q { width: 100%; max-width: 560px; text-align: center; }
.gm-emoji { font-size: 5rem; line-height: 1.1; margin-bottom: .6rem; }
.gm-tiles { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.gm-tile { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.9rem; border-radius: 12px; background: #FFF3C4; border: 2px solid #ffd24d; font-size: 1.5rem; font-weight: 800; color: #5a4300; text-transform: uppercase; box-shadow: 0 3px 0 #e8b830; }
.gm-row { display: flex; gap: .6rem; justify-content: center; margin: .6rem 0; }
.gm-row.sm { margin-top: .2rem; }
.gm-row input { flex: 1; min-width: 0; max-width: 300px; padding: .8rem 1rem; font-size: 1.15rem; border: 2px solid #e6e6e6; border-radius: 14px; text-align: center; font-family: inherit; }
.gm-row input:focus { outline: none; border-color: #FFD700; box-shadow: 0 0 0 3px rgba(255,215,0,.2); }
.shake { animation: gmShake .35s; }
@keyframes gmShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.gm-msg { min-height: 1.5em; margin: .6rem 0 0; font-weight: 700; color: #777; }
.gm-msg.good { color: #2e9a44; } .gm-msg.bad { color: #d6453a; }

.gm-mem { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: .7rem; width: 100%; max-width: 460px; }
.gm-mc { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; font-family: inherit; }
.gm-mc .f, .gm-mc .b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 16px; backface-visibility: hidden; transition: transform .35s; }
.gm-mc .f { background: linear-gradient(135deg, #ffe38a, #ffc83d); box-shadow: 0 3px 0 #e8b830; }
.gm-mc .f::after { content: "?"; font-size: 1.8rem; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.gm-mc .b { background: #fff; border: 2px solid #ffd24d; font-size: 2.1rem; transform: rotateY(180deg); }
.gm-mc.open .f, .gm-mc.done .f { transform: rotateY(180deg); }
.gm-mc.open .b, .gm-mc.done .b { transform: rotateY(0); }
.gm-mc.done .b { background: #eaf9e6; border-color: #8fd68a; }

.gm-ask { font-size: 1.15rem; font-weight: 700; color: #444; margin: 0 0 .8rem; }
.gm-flag { width: 240px; max-width: 70%; height: auto; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.18); margin-bottom: 1.2rem; border: 1px solid #eee; }
.gm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.gm-opt { padding: .9rem .6rem; border: 2px solid #eee; border-radius: 14px; background: #fff; font: 700 1rem inherit; font-family: inherit; color: #444; cursor: pointer; transition: border-color .12s, transform .12s; }
.gm-opt:hover:not(:disabled) { border-color: #ffd24d; transform: translateY(-2px); }
.gm-opt.good { background: #e4f8df; border-color: #6fcf6a; color: #1f7a31; }
.gm-opt.bad { background: #ffe5e2; border-color: #ef7b72; color: #b3382d; }
.gm-opt:disabled { cursor: default; }

.gm-timer { height: 10px; background: #f1ecd9; border-radius: 99px; overflow: hidden; margin-bottom: 1.4rem; }
.gm-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffd24d, #ff9a3d); transition: width 1s linear; }
.gm-eq { font-size: 3.2rem; font-weight: 800; color: #333; letter-spacing: 2px; margin-bottom: .6rem; }

.gm-result { text-align: center; }
.gm-big { font-size: 4.5rem; line-height: 1.1; }
.gm-result h3 { margin: .4rem 0; font-size: 1.6rem; color: #333; }
.gm-score { font-size: 1.2rem; font-weight: 700; color: #7a5b00; margin: .3rem 0; }
.gm-new { color: #d9822b; font-weight: 800; margin: .4rem 0; }

@media (max-width: 640px) {
  .gm-hero h1 { font-size: 1.9rem; }
  .gm-grid { grid-template-columns: 1fr; }
  .gm-eq { font-size: 2.4rem; }
  .gm-hud { width: 100%; text-align: center; order: 3; }
  .gm-bar h2 { order: 2; }
}
@media print { .gm-wrap { display: none !important; } }
