/* =====================================================================
   Game Zone — CSS ร่วมทุกหน้าเกม (games, game-seamsi, game-mind, game-match, game-quiz, game-daily)
   โทน: ม่วง-ทอง-ครีม หรูหรา มีชีวิตชีวา
   ===================================================================== */

/* ---------- Hero ---------- */
.gz-hero { position: relative; overflow: hidden; }
.gz-hero::before {
  content: ''; position: absolute; left: 50%; top: -40px; width: 520px; height: 520px; transform: translateX(-50%);
  border-radius: 50%; border: 1px dashed rgba(227, 194, 122, .16); pointer-events: none; z-index: -1;
  box-shadow: 0 0 0 60px rgba(144, 103, 198, .04), 0 0 0 120px rgba(144, 103, 198, .025);
  animation: spinSlow 120s linear infinite;
}
.gz-hero .hero-icon { animation: floatY 5s ease-in-out infinite; }
.gz-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }
.gz-kicker svg { width: 14px; height: 14px; }

/* ---------- Mini stats (บนทุกหน้าเกม) ---------- */
.gz-mini-wrap { display: flex; justify-content: center; margin-top: 14px; }
.gz-mini { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; color: var(--text); }
.gz-mini:hover { color: var(--text); }
.gz-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .84rem; color: var(--text-2); white-space: nowrap; }
.gz-pill b { color: var(--gold-2); font-weight: 600; }
.gz-pill svg { width: 15px; height: 15px; color: var(--gold); fill: none; }
.gz-pill > svg[viewBox="0 0 24 24"]:not([stroke]) { fill: var(--gold); }
.gz-pill.rank { color: var(--lav); }

/* ---------- Hub: สถิติของฉัน ---------- */
.gz-stats {
  position: relative; border-radius: var(--radius-lg); padding: 18px; overflow: hidden;
  background: radial-gradient(500px 200px at 15% 0%, rgba(227, 194, 122, .18), transparent 70%), linear-gradient(160deg, rgba(70, 36, 120, .7), rgba(27, 13, 49, .85));
  border: 1px solid var(--line-2); box-shadow: var(--shadow-gold);
}
.gz-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.gz-stats-head h2 { margin: 0; font-size: 1.2rem; }
.gz-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gz-stat { text-align: center; padding: 12px 6px; border-radius: 16px; background: rgba(18, 8, 31, .35); border: 1px solid var(--line-soft); }
.gz-stat .ic { width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-2); background: radial-gradient(circle at 30% 25%, rgba(255, 236, 186, .3), rgba(144, 103, 198, .25) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line-2); }
.gz-stat .ic svg { width: 20px; height: 20px; }
.gz-stat .ic.fill svg { fill: var(--gold); stroke: none; }
.gz-stat b { display: block; font-family: var(--font-head); font-size: 1.6rem; line-height: 1.1; color: var(--text); }
.gz-stat small { display: block; font-size: .74rem; color: var(--text-3); line-height: 1.3; margin-top: 2px; }
.gz-rankbar { margin-top: 14px; display: grid; gap: 6px; }
.gz-rankbar .rk { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .86rem; }
.gz-rankbar .rk b { color: var(--gold-2); font-family: var(--font-head); font-size: 1rem; }
.gz-rankbar .rk span { color: var(--text-3); font-size: .8rem; text-align: right; }
.gz-progress { height: 8px; border-radius: 99px; background: rgba(255, 244, 222, .08); overflow: hidden; }
.gz-progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--gold-grad); box-shadow: 0 0 12px -2px var(--gold); transition: width 1s var(--ease); }
.gz-today-dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.gz-today-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 244, 222, .14); }
.gz-today-dots i.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
@media (min-width: 720px) { .gz-stats { padding: 24px; } .gz-stat b { font-size: 2rem; } }

/* ---------- Hub: การ์ดเกม ---------- */
.gz-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .gz-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .gz-cards { grid-template-columns: repeat(3, 1fr); } .gz-cards .gz-card.feature { grid-column: span 2; } }
.gz-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; color: var(--text);
  background: linear-gradient(180deg, rgba(58, 29, 99, .5), rgba(22, 10, 40, .9)); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; isolation: isolate;
}
.gz-card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-gold); border-color: var(--line-2); }
.gz-card .gz-art { position: relative; height: 150px; display: grid; place-items: center; background: var(--tone-bg); }
.gz-card .gz-art svg { height: 132px; width: auto; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .45)); transition: transform .5s var(--ease); }
.gz-card:hover .gz-art svg { transform: scale(1.05) rotate(-2deg); }
.gz-card .gz-body { padding: 14px 16px 16px; display: grid; gap: 4px; flex: 1; }
.gz-card h3 { margin: 0; font-size: 1.12rem; }
.gz-card p { margin: 0; font-size: .88rem; color: var(--text-2); line-height: 1.6; }
.gz-card .gz-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .82rem; color: var(--text-3); }
.gz-card .gz-play { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 500; }
.gz-card .gz-play svg { width: 16px; height: 16px; transition: transform .2s; }
.gz-card:hover .gz-play svg { transform: translateX(3px); }
.gz-card .gz-badge { position: absolute; top: 12px; right: 12px; z-index: 2; }
@media (min-width: 980px) { .gz-card.feature { flex-direction: row; } .gz-card.feature .gz-art { height: auto; flex: 1.1; min-height: 210px; } .gz-card.feature .gz-body { flex: 1; align-content: center; padding: 22px; } .gz-card.feature h3 { font-size: 1.4rem; } }
.tone-ss { --tone-bg: radial-gradient(circle at 50% 35%, rgba(214, 74, 74, .55), rgba(110, 25, 40, .45) 50%, transparent 75%); --tone: #f08a8a; }
.tone-mi { --tone-bg: radial-gradient(circle at 50% 35%, rgba(244, 143, 177, .45), rgba(120, 40, 90, .35) 50%, transparent 75%); --tone: #f48fb1; }
.tone-mt { --tone-bg: radial-gradient(circle at 50% 35%, rgba(185, 150, 236, .5), rgba(80, 45, 150, .4) 50%, transparent 75%); --tone: #b996ec; }
.tone-qz { --tone-bg: radial-gradient(circle at 50% 35%, rgba(143, 184, 255, .45), rgba(45, 70, 150, .35) 50%, transparent 75%); --tone: #8fb8ff; }
.tone-dl { --tone-bg: radial-gradient(circle at 50% 35%, rgba(245, 208, 111, .5), rgba(150, 100, 30, .35) 50%, transparent 75%); --tone: #f5d06f; }

/* แบนเนอร์คำถามประจำวัน / Interactive */
.gz-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); color: var(--text); background: linear-gradient(120deg, rgba(227, 194, 122, .14), rgba(93, 58, 150, .3)); border: 1px solid var(--line-2); transition: .25s var(--ease); }
.gz-banner:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.gz-banner .bi { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--gold-grad); box-shadow: 0 8px 20px -8px var(--gold); }
.gz-banner .bi svg { width: 26px; height: 26px; }
.gz-banner b { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.gz-banner small { color: var(--text-2); font-size: .85rem; line-height: 1.45; display: block; }
.gz-banner .chev { margin-left: auto; width: 20px; height: 20px; color: var(--gold); flex: none; }

/* ---------- More section ---------- */
.gz-more-games { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .gz-more-games { grid-template-columns: repeat(4, 1fr); } }
.gz-more-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line-soft); transition: .2s; min-height: 64px; }
.gz-more-card:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.gz-more-card .gm-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--tone, var(--gold)); background: color-mix(in srgb, var(--tone, var(--gold)) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--gold)) 40%, transparent); }
.gz-more-card .gm-ic svg { width: 20px; height: 20px; }
.gz-more-card .gm-tx { display: grid; line-height: 1.3; min-width: 0; }
.gz-more-card .gm-tx b { font-weight: 500; font-size: .92rem; }
.gz-more-card .gm-tx small { font-size: .74rem; color: var(--text-3); }
.gz-more-card .gm-badge { position: absolute; top: -8px; right: 6px; font-size: .68rem; padding: 1px 8px; }
.gz-li-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(227, 194, 122, .1); }
.gz-li-ic svg { width: 18px; height: 18px; }

/* ---------- Result modal ---------- */
.gz-result { text-align: center; }
.gz-result h2 { margin-bottom: .25em; font-size: 1.55rem; }
.gz-res-icon { width: 72px; height: 72px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--gold-grad); box-shadow: 0 0 0 6px rgba(227, 194, 122, .12), 0 12px 30px -10px var(--gold); animation: popIn .5s var(--ease); }
.gz-res-icon svg { width: 34px; height: 34px; }
.gz-res-kicker { font-size: .78rem; letter-spacing: .14em; color: var(--text-3); margin-bottom: 2px; }
.gz-res-sub { font-size: .95rem; margin: 0 auto 10px; max-width: 360px; }
.gz-res-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-soft); }
.gz-earn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 16px; border-radius: 999px; background: rgba(227, 194, 122, .12); border: 1px solid var(--line-2); color: var(--gold-2); font-size: .9rem; font-weight: 500; }
.gz-earn svg { width: 18px; height: 18px; fill: var(--gold); }
.gz-earn.muted-earn { color: var(--text-3); background: var(--surface); border-color: var(--line-soft); font-weight: 400; font-size: .82rem; }
.gz-bigstars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.gz-bigstars span { width: 44px; height: 44px; display: grid; place-items: center; }
.gz-bigstars span:nth-child(2) { width: 54px; height: 54px; margin-top: -8px; }
.gz-bigstars svg { width: 100%; height: 100%; fill: rgba(255, 244, 222, .1); stroke: rgba(227, 194, 122, .3); stroke-width: 1; }
.gz-bigstars .on svg { fill: url(#gzStarGrad); fill: #f0d08a; stroke: #fff1c9; filter: drop-shadow(0 0 10px rgba(227, 194, 122, .7)); animation: gzStarIn .6s var(--ease) both; animation-delay: calc(var(--i) * .22s + .2s); }
@keyframes gzStarIn { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: none; } }

/* confetti + sparks */
.gz-confetti { position: fixed; inset: 0; z-index: 99; pointer-events: none; }
.gz-sparks { position: fixed; z-index: 99; pointer-events: none; width: 0; height: 0; }
.gz-sparks i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--gold-2); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: gzSpark .8s var(--ease) forwards; }
@keyframes gzSpark { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(90deg); opacity: 0; } }

/* ---------- ส่วนประกอบเกมทั่วไป ---------- */
.gz-stage { position: relative; border-radius: var(--radius-lg); padding: 18px 16px; background: radial-gradient(420px 260px at 50% 0%, rgba(144, 103, 198, .3), transparent 70%), linear-gradient(170deg, rgba(48, 23, 84, .75), rgba(20, 9, 36, .9)); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 720px) { .gz-stage { padding: 26px; } }
.gz-hud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.gz-hud .gz-pill { font-variant-numeric: tabular-nums; }
.gz-label { display: block; font-size: .86rem; color: var(--text-2); margin-bottom: 8px; text-align: center; }
.gz-note { font-size: .8rem; color: var(--text-3); text-align: center; margin: 10px 0 0; }

/* =====================================================================
   เซียมซี
   ===================================================================== */
.ss-topics { justify-content: center; }
.ss-tube-wrap { position: relative; height: 300px; display: grid; place-items: end center; margin: 6px auto 0; max-width: 320px; }
.ss-tube { width: 170px; height: 280px; transform-origin: 50% 90%; cursor: pointer; border: 0; background: none; padding: 0; position: relative; z-index: 2; }
.ss-tube svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }
.ss-tube:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 30px; }
.ss-tube.shaking { animation: ssShake .16s ease-in-out infinite alternate; }
.ss-tube.shaking .ss-sticks { animation: ssRattle .1s linear infinite alternate; }
@keyframes ssShake { 0% { transform: rotate(-11deg) translateY(-4px); } 100% { transform: rotate(9deg) translateY(2px); } }
@keyframes ssRattle { 0% { transform: translateY(-3px); } 100% { transform: translateY(2px); } }
.ss-tube-wrap::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 180px; height: 22px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); z-index: 0; }
.ss-halo { position: absolute; left: 50%; top: 45%; width: 260px; height: 260px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(227, 194, 122, .22), transparent 65%); animation: twinkle 4s ease-in-out infinite; z-index: 0; }
.ss-stick-fall { position: absolute; left: 50%; top: 20px; width: 16px; height: 150px; margin-left: -8px; z-index: 3; pointer-events: none; opacity: 0; }
.ss-stick-fall svg { width: 100%; height: 100%; }
.ss-stick-fall.go { animation: ssFall 1.15s cubic-bezier(.3, .1, .4, 1) forwards; }
@keyframes ssFall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  30% { opacity: 1; transform: translate(18px, -84px) rotate(22deg); }
  74% { transform: translate(72px, 187px) rotate(92deg); }
  86% { transform: translate(72px, 174px) rotate(85deg); }
  100% { opacity: 1; transform: translate(72px, 187px) rotate(90deg); }
}
.ss-picked { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; top: 8px; z-index: 4; padding: 6px 18px; border-radius: 999px; background: var(--gold-grad); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; box-shadow: 0 10px 26px -10px var(--gold); animation: popIn .45s var(--ease) both; white-space: nowrap; }
.ss-left { text-align: center; margin-top: 4px; }
.ss-actions { display: grid; gap: 10px; justify-items: center; margin-top: 14px; }
.ss-wish { max-width: 420px; margin: 0 auto 4px; text-align: center; font-size: .92rem; color: var(--text-2); }

/* ใบเซียมซี (กระดาษแดง-ทอง/ครีม) */
.ss-slip {
  position: relative; max-width: 560px; margin: 0 auto; padding: 22px 18px 20px; color: #3a1a12;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .5), transparent 40%),
    repeating-linear-gradient(0deg, rgba(150, 90, 40, .035) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #fff6e2, #f6e6c2);
  border-radius: 6px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(184, 138, 62, .4);
  animation: ssUnroll .8s var(--ease) both; transform-origin: top center;
}
@keyframes ssUnroll { from { opacity: 0; transform: perspective(800px) rotateX(-70deg) translateY(-20px); } to { opacity: 1; transform: none; } }
.ss-slip::before { content: ''; position: absolute; inset: 7px; border: 2px solid #a8232f; border-radius: 3px; pointer-events: none; box-shadow: inset 0 0 0 3px #f6e6c2, inset 0 0 0 4px #c9a24a; }
.ss-slip-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px dashed rgba(168, 35, 47, .4); }
.ss-no { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 35% 30%, #d8434f, #8e1622); color: #ffe9b0; box-shadow: 0 0 0 3px #e3c27a, 0 8px 16px -6px rgba(142, 22, 34, .7); font-family: var(--font-head); line-height: 1; }
.ss-no small { font-size: .62rem; letter-spacing: .1em; font-family: var(--font-body); opacity: .85; }
.ss-no b { font-size: 1.6rem; }
.ss-slip-title { text-align: center; }
.ss-slip-title h2 { margin: 0; color: #8e1622; font-size: 1.3rem; }
.ss-slip-title p { margin: 0; font-size: .82rem; color: #8a6a4a; }
.ss-level { font-size: .78rem; padding: 4px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; color: #fff; }
.ss-level.great { background: linear-gradient(135deg, #c99a48, #8a5a12); }
.ss-level.good { background: linear-gradient(135deg, #3f9a6a, #23704a); }
.ss-level.fair { background: linear-gradient(135deg, #7d6aa8, #54437c); }
.ss-level.caution { background: linear-gradient(135deg, #c56b3a, #8e3a1a); }
.ss-poem { position: relative; text-align: center; padding: 16px 6px 10px; font-family: var(--font-head); font-size: 1.08rem; line-height: 2; color: #5a1a1a; }
.ss-poem span { display: block; }
.ss-sum { text-align: center; font-size: .95rem; color: #5b3a2a; margin: 0 6px 12px; }
.ss-preds { display: grid; gap: 8px; position: relative; }
.ss-pred { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(184, 138, 62, .25); font-size: .92rem; line-height: 1.7; }
.ss-pred b { display: flex; align-items: center; gap: 6px; color: #8e1622; font-size: .9rem; }
.ss-pred b svg { width: 16px; height: 16px; }
.ss-pred.focus { background: rgba(255, 233, 176, .7); border-color: #c9a24a; box-shadow: 0 0 0 2px rgba(201, 162, 74, .25); }
.ss-advice { margin-top: 12px; text-align: center; font-size: .9rem; color: #6b4a2a; font-style: italic; }
.ss-slip .ss-foot { margin-top: 12px; text-align: center; font-size: .72rem; color: #9a7a5a; }
@media (min-width: 640px) { .ss-preds { grid-template-columns: 1fr 1fr; } .ss-pred.wide { grid-column: 1 / -1; } .ss-slip { padding: 30px 28px 26px; } }
.ss-history { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ss-history button { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-family: var(--font-head); font-weight: 700; }
.ss-history button:hover, .ss-history button.is-active { border-color: var(--gold); color: var(--gold-2); background: rgba(227, 194, 122, .1); }

/* =====================================================================
   ทายใจ
   ===================================================================== */
.mq-sets { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mq-sets { grid-template-columns: 1fr 1fr; } }
.mq-set { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); color: var(--text); background: linear-gradient(150deg, color-mix(in srgb, var(--c) 18%, rgba(40, 20, 70, .8)), rgba(22, 10, 40, .9)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); transition: .25s var(--ease); }
.mq-set:hover { color: var(--text); transform: translateY(-3px); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--c) 70%, transparent); }
.mq-set.is-active { box-shadow: 0 0 0 2px var(--c); }
.mq-set .si { width: 56px; height: 56px; flex: none; border-radius: 18px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.mq-set .si svg { width: 28px; height: 28px; }
.mq-set b { display: block; font-family: var(--font-head); font-size: 1.02rem; line-height: 1.35; }
.mq-set small { display: block; color: var(--text-2); font-size: .82rem; line-height: 1.45; margin-top: 2px; }
.mq-set .meta { color: var(--text-3); font-size: .74rem; margin-top: 4px; }
.mq-set .chev { margin-left: auto; width: 18px; height: 18px; color: var(--gold); flex: none; }

.mq-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mq-top .mq-count { font-size: .86rem; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mq-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 244, 222, .08); overflow: hidden; }
.mq-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--purple-2), var(--gold)); transition: width .5s var(--ease); }
.mq-viewport { overflow: hidden; position: relative; }
.mq-q { animation: mqIn .45s var(--ease) both; }
.mq-q.out { animation: mqOut .28s ease forwards; }
@keyframes mqIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes mqOut { to { opacity: 0; transform: translateX(-40px); } }
.mq-q h2 { text-align: center; font-size: clamp(1.15rem, 3.4vw, 1.5rem); margin: 4px 0 16px; }
.mq-opts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.mq-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 112px; padding: 14px 10px; border-radius: 18px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--text); font-size: .92rem; line-height: 1.45; transition: .2s var(--ease); }
.mq-opt:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.mq-opt .oi { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-2); background: radial-gradient(circle at 32% 26%, rgba(255, 236, 186, .25), rgba(144, 103, 198, .25) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line-2); }
.mq-opt .oi svg { width: 22px; height: 22px; }
.mq-opt.picked { border-color: var(--gold); background: rgba(227, 194, 122, .14); box-shadow: 0 0 0 2px rgba(227, 194, 122, .3); }
.mq-back { margin-top: 12px; display: flex; justify-content: center; }

.mq-result-hero { text-align: center; padding: 22px 16px; border-radius: var(--radius-lg); background: radial-gradient(400px 200px at 50% 0%, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%), linear-gradient(170deg, rgba(58, 29, 99, .8), rgba(22, 10, 40, .95)); border: 1px solid var(--line-2); box-shadow: var(--shadow-gold); }
.mq-result-hero .ri { width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--gold-grad); box-shadow: 0 0 0 8px rgba(227, 194, 122, .1), 0 0 40px -6px var(--gold); animation: popIn .6s var(--ease); }
.mq-result-hero .ri svg { width: 42px; height: 42px; }
.mq-result-hero h2 { margin-bottom: .15em; }
.mq-result-hero .tag { color: var(--text-2); font-style: italic; }
.mq-detail { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 720px) { .mq-detail { grid-template-columns: 1fr 1fr; } .mq-detail .wide { grid-column: 1 / -1; } }
.mq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mq-list li { display: flex; gap: 8px; align-items: flex-start; font-size: .94rem; color: var(--text-2); }
.mq-list li svg { width: 16px; height: 16px; flex: none; margin-top: 5px; color: var(--good); }
.mq-list.warn li svg { color: var(--warn); }
.mq-match { display: flex; gap: 12px; align-items: center; }
.mq-match .mi2 { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--love); background: rgba(244, 143, 177, .14); box-shadow: inset 0 0 0 1px rgba(244, 143, 177, .4); }
.mq-match .mi2 svg { width: 24px; height: 24px; }

/* =====================================================================
   จับคู่
   ===================================================================== */
.mt-board { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 8px; max-width: var(--maxw, 440px); margin: 0 auto; perspective: 900px; }
@media (min-width: 720px) { .mt-board { gap: 12px; } }
.mt-card { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; border-radius: 12px; transform-style: preserve-3d; transition: transform .5s var(--ease); cursor: pointer; }
.mt-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.mt-card.flipped, .mt-card.matched { transform: rotateY(180deg); }
.mt-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mt-back { background: radial-gradient(circle at 50% 40%, rgba(227, 194, 122, .2), transparent 60%), linear-gradient(150deg, #3d1f6b, #1c0d33); border: 1px solid var(--line-2); box-shadow: inset 0 0 0 4px rgba(18, 8, 31, .5), inset 0 0 0 5px rgba(227, 194, 122, .25); color: var(--gold); }
.mt-back svg { width: 42%; height: auto; opacity: .85; }
.mt-front { transform: rotateY(180deg); background: linear-gradient(180deg, #fffaf0, #f3e6c8); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(184, 138, 62, .45), 0 10px 20px -12px rgba(0, 0, 0, .7); align-content: center; gap: 2px; }
.mt-front .g { font-size: clamp(1.5rem, 7vw, 2.3rem); line-height: 1; color: #6a3fa0; }
.mt-front .g svg { width: clamp(28px, 8vw, 42px); height: clamp(28px, 8vw, 42px); }
.mt-front small { font-size: clamp(.6rem, 2.3vw, .76rem); color: var(--ink-2); line-height: 1.2; text-align: center; padding: 0 2px; }
.mt-card.matched .mt-front { background: linear-gradient(180deg, #fff3cf, #f0d08a); box-shadow: inset 0 0 0 2px #b88a3e, 0 0 18px -4px var(--gold); }
.mt-card.matched { animation: mtPop .5s var(--ease) .35s; }
.mt-card.miss .mt-front { box-shadow: inset 0 0 0 2px #e07a7a; }
@keyframes mtPop { 50% { transform: rotateY(180deg) scale(1.08); } }
.mt-meaning { min-height: 64px; margin: 14px auto 0; max-width: 520px; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 16px; background: rgba(227, 194, 122, .08); border: 1px solid var(--line); font-size: .9rem; color: var(--text-2); }
.mt-meaning .g { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); color: var(--ink); font-size: 1.3rem; }
.mt-meaning .g svg { width: 22px; height: 22px; }
.mt-meaning b { color: var(--gold-2); font-weight: 500; }
.mt-meaning.flash { animation: popIn .4s var(--ease); }
.mt-bests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mt-bests div { text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: .8rem; color: var(--text-3); }
.mt-bests b { display: block; color: var(--text); font-size: .92rem; font-weight: 500; }

/* =====================================================================
   ตอบคำถาม
   ===================================================================== */
.qz-timer { height: 8px; border-radius: 99px; background: rgba(255, 244, 222, .08); overflow: hidden; margin-bottom: 14px; }
.qz-timer i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); transform-origin: left; }
.qz-timer.low i { background: linear-gradient(90deg, #c56b3a, var(--warn)); }
.qz-cat { display: flex; justify-content: center; margin-bottom: 6px; }
.qz-q { text-align: center; font-size: clamp(1.12rem, 3.3vw, 1.45rem); margin: 6px 0 16px; min-height: 2.7em; }
.qz-choices { display: grid; gap: 10px; }
@media (min-width: 640px) { .qz-choices { grid-template-columns: 1fr 1fr; } }
.qz-choice { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px; text-align: left; border-radius: 16px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--text); font-size: .96rem; line-height: 1.45; transition: .18s var(--ease); }
.qz-choice:hover:not([disabled]) { border-color: var(--line-2); background: var(--surface-2); }
.qz-choice .k { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; color: var(--gold-2); background: rgba(227, 194, 122, .1); box-shadow: inset 0 0 0 1px var(--line); }
.qz-choice[disabled] { cursor: default; }
.qz-choice.correct { border-color: var(--good); background: rgba(127, 216, 164, .14); }
.qz-choice.correct .k { background: var(--good); color: #10301f; }
.qz-choice.wrong { border-color: var(--bad); background: rgba(240, 138, 138, .12); animation: qzShake .35s; }
.qz-choice.wrong .k { background: var(--bad); color: #3a1010; }
.qz-choice.dim { opacity: .5; }
@keyframes qzShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.qz-exp { margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: .92rem; color: var(--text-2); background: rgba(185, 150, 236, .1); border: 1px solid rgba(185, 150, 236, .25); animation: popIn .35s var(--ease); }
.qz-exp b { color: var(--text); }
.qz-combo { display: inline-flex; align-items: center; gap: 4px; color: var(--ink) !important; background: var(--gold-grad); border: 0 !important; animation: popIn .3s var(--ease); }
.qz-combo svg { color: var(--ink) !important; }
.qz-float { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--gold-2); pointer-events: none; animation: qzFloat .9s var(--ease) forwards; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
@keyframes qzFloat { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -50px); } }
.qz-start { text-align: center; }
.qz-start .big { width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--gold-grad); box-shadow: 0 0 0 8px rgba(227, 194, 122, .1), 0 0 40px -6px var(--gold); }
.qz-start .big svg { width: 46px; height: 46px; }
.qz-rules { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 16px 0; }
.qz-rules div { padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: .78rem; color: var(--text-3); line-height: 1.35; }
.qz-rules b { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--gold-2); }
.qz-review { display: grid; gap: 6px; text-align: left; margin-top: 12px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.qz-review div { display: flex; gap: 8px; font-size: .84rem; color: var(--text-2); padding: 6px 0; border-bottom: 1px dashed var(--line-soft); line-height: 1.5; }
.qz-review svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.qz-review .ok svg { color: var(--good); }
.qz-review .ng svg { color: var(--bad); }
.qz-daily { border-radius: var(--radius); padding: 18px; background: linear-gradient(150deg, rgba(227, 194, 122, .12), rgba(58, 29, 99, .55)); border: 1px solid var(--line-2); }
.qz-daily h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.qz-daily h3 svg { width: 20px; height: 20px; color: var(--gold); }

/* =====================================================================
   บันเทิงประจำวัน
   ===================================================================== */
.sc-wrap { position: relative; max-width: 420px; margin: 0 auto; aspect-ratio: 7 / 5; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .9), 0 0 0 1px var(--line-2); user-select: none; -webkit-user-select: none; }
.sc-under { position: absolute; inset: 0; padding: 16px; display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; color: var(--ink); background: radial-gradient(circle at 50% 0%, #fffaf0, #f3e6c8 70%); }
.sc-under::before { content: ''; position: absolute; inset: 8px; border-radius: 16px; border: 1.5px dashed rgba(184, 138, 62, .55); pointer-events: none; }
.sc-under .k { font-size: .72rem; letter-spacing: .16em; color: #8a5a12; }
.sc-under h3 { margin: 0; color: var(--ink); font-size: clamp(1rem, 4vw, 1.2rem); line-height: 1.45; max-width: 330px; }
.sc-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 360px; margin-top: 6px; }
.sc-items div { display: grid; justify-items: center; gap: 2px; font-size: .68rem; color: var(--ink-2); line-height: 1.25; }
.sc-items .v { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(184, 138, 62, .5); color: #6a3fa0; font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.sc-items .v svg { width: 20px; height: 20px; }
.sc-items .v.sw { background: var(--c); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); }
.sc-items b { font-weight: 600; color: var(--ink); font-size: .74rem; }
.sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .6s; }
.sc-canvas.done { opacity: 0; pointer-events: none; }
.sc-progress { text-align: center; font-size: .85rem; color: var(--text-3); margin-top: 10px; }
.sc-progress b { color: var(--gold-2); }

.ci-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ci-day { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: .7rem; color: var(--text-3); line-height: 1.2; }
.ci-day .cs { width: 30px; height: 30px; display: grid; place-items: center; }
.ci-day .cs svg { width: 26px; height: 26px; fill: rgba(255, 244, 222, .12); stroke: rgba(227, 194, 122, .4); stroke-width: 1; }
.ci-day b { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.ci-day.done { border-color: var(--line-2); background: rgba(227, 194, 122, .1); }
.ci-day.done .cs svg { fill: var(--gold); stroke: #fff1c9; }
.ci-day.done::after { content: '✓'; position: absolute; top: 2px; right: 5px; font-size: .7rem; color: var(--good); }
.ci-day.today { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 194, 122, .25); animation: ciPulse 2s ease-in-out infinite; }
.ci-day.today.done { animation: none; }
.ci-day.big .cs svg { width: 30px; height: 30px; }
@keyframes ciPulse { 50% { box-shadow: 0 0 0 5px rgba(227, 194, 122, .12); } }

.ms-list { display: grid; gap: 8px; }
.ms-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); transition: .2s; min-height: 60px; }
a.ms-item:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.ms-item .mc { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(227, 194, 122, .1); box-shadow: inset 0 0 0 1px var(--line); }
.ms-item .mc svg { width: 20px; height: 20px; }
.ms-item.done .mc { background: var(--good); color: #10301f; box-shadow: none; }
.ms-item .mt { display: grid; line-height: 1.35; min-width: 0; }
.ms-item .mt b { font-weight: 500; font-size: .95rem; }
.ms-item .mt small { color: var(--text-3); font-size: .78rem; }
.ms-item .mr { margin-left: auto; flex: none; font-size: .78rem; color: var(--gold-2); white-space: nowrap; }
.ms-item.done .mt b { text-decoration: line-through; text-decoration-color: rgba(127, 216, 164, .6); }

.qt-card { position: relative; text-align: center; padding: 30px 22px 24px; border-radius: var(--radius-lg); color: var(--ink); background: linear-gradient(180deg, #fffaf0, var(--cream)); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(184, 138, 62, .3); }
.qt-card .qm { font-family: var(--font-head); font-size: 4rem; line-height: .6; color: #c99a48; height: 30px; }
.qt-card blockquote { margin: 6px 0 10px; font-family: var(--font-head); font-size: clamp(1.1rem, 3.6vw, 1.35rem); line-height: 1.7; color: var(--ink); }
.qt-card cite { font-style: normal; font-size: .82rem; color: var(--ink-3); }

.dl-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .dl-grid { grid-template-columns: 1.1fr .9fr; align-items: start; } }

@media (max-width: 380px) {
  .mq-opt { min-height: 100px; font-size: .86rem; }
  .ci-day { font-size: .62rem; }
  .sc-items .v { width: 32px; height: 32px; font-size: .9rem; }
}

/* ขนาดไอคอนที่ style.css ไม่ได้กำหนด */
.page-hero .date-pill svg { width: 16px; height: 16px; flex: none; }
.card h3 > svg, .gz-h3 > svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.gz-h3 { display: flex; align-items: center; gap: 8px; }
.chip svg, .btn-sm svg { width: 16px; height: 16px; flex: none; }
