/* Блок «Геймификация: музей-квест» (acf/case-gamification-museum-quest), RU-148.
   Шрифты страницы геймификации: PIXY (пиксельные надписи), Montserrat (заголовки), Raleway (текст).
   Ширина — .gm-container страницы. Акцент #fb4926, тёмная сцена #121116. */
.gm-mq { --a: #fb4926; --dark: #121116; background: var(--gm-bg, #f7f7f7); padding: 24px 0 96px; }
.gm-mq__scroll { position: relative; height: calc(var(--steps, 3) * 85vh + 100vh); }
/* Закреплённая сцена помещается между шапкой (≈102 px) и шкалой прогресса страницы внизу (≈90 px на компьютере, ≈200 px на телефоне) */
.gm-mq { --mq-top: 112px; --mq-bottom: 92px; }
.gm-mq__pin { position: sticky; top: var(--mq-top); }
.gm-mq__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; height: min(700px, calc(100vh - var(--mq-top) - var(--mq-bottom))); padding: 44px 56px; border-radius: 40px; background: var(--dark); color: #fff; overflow: hidden; isolation: isolate; }
.gm-mq__stage::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(60% 70% at 78% 55%, rgba(251, 73, 38, .32), transparent 70%), radial-gradient(40% 40% at 10% 100%, rgba(251, 73, 38, .18), transparent 70%); }
.gm-mq__grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(70% 80% at 70% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 80% at 70% 50%, #000 30%, transparent 80%); }
.gm-mq__spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(340px 340px at var(--mx, 72%) var(--my, 50%), rgba(251, 73, 38, .3), transparent 70%); }
.gm-mq__copy { position: relative; z-index: 4; display: flex; flex-direction: column; justify-content: center; }
.gm-mq__eyebrow { display: flex; align-items: center; gap: 10px; font: 400 15px/1 PIXY, Montserrat, sans-serif; letter-spacing: .06em; color: var(--a); }
.gm-mq__eyebrow i { width: 10px; height: 10px; background: var(--a); box-shadow: 0 0 12px var(--a); animation: gmMqBlink 1.2s steps(2) infinite; }
.gm-mq h2 { margin: 18px 0 14px; font: 600 46px/1.08 Montserrat, Raleway, sans-serif; letter-spacing: -.035em; color: #fff; }
.gm-mq h2 em { font-style: normal; color: var(--a); }
.gm-mq__lead { max-width: 470px; margin: 0 0 24px; font: 400 18px/1.5 Raleway, sans-serif; color: rgba(255, 255, 255, .72); }
.gm-mq__tabs { display: flex; flex-direction: column; gap: 8px; max-width: 470px; }
.gm-mq__tab { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 12px 16px 12px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: rgba(255, 255, 255, .04); color: inherit; text-align: left; font: inherit; cursor: pointer; overflow: hidden; transition: background .3s, border-color .3s, transform .3s; }
.gm-mq__tab:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }
.gm-mq__ico { width: 44px; height: 44px; object-fit: contain; }
.gm-mq__tab b { display: block; font: 600 17px/1.2 Montserrat, sans-serif; color: #fff; }
.gm-mq__tab small { display: block; margin-top: 3px; font: 400 13px/1.35 Raleway, sans-serif; color: rgba(255, 255, 255, .55); }
.gm-mq__num { font: 400 13px/1 PIXY, monospace; color: rgba(255, 255, 255, .35); }
.gm-mq__tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--a); }
.gm-mq__tab.is-on { background: rgba(251, 73, 38, .12); border-color: rgba(251, 73, 38, .5); transform: translateX(6px); }
.gm-mq__tab.is-on .gm-mq__num { color: var(--a); }
.gm-mq__score { display: flex; align-items: center; gap: 14px; margin-top: 22px; font: 400 14px/1 PIXY, monospace; color: rgba(255, 255, 255, .6); }
.gm-mq__stars { display: flex; gap: 6px; }
.gm-mq__stars i { width: 18px; height: 18px; background: rgba(255, 255, 255, .15); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); transition: background .3s, transform .3s; }
.gm-mq__stars i.on { background: #ffb400; transform: scale(1.15); filter: drop-shadow(0 0 6px #ffb400); }
.gm-mq__view { position: relative; display: flex; align-items: center; justify-content: center; }
.gm-mq__frame { position: relative; z-index: 2; width: 100%; aspect-ratio: 1600 / 1029; will-change: translate; }
.gm-mq__scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateY(24px) scale(.96); filter: blur(6px); transition: opacity .7s, transform .9s cubic-bezier(.2, .7, .2, 1), filter .7s; }
.gm-mq__scene.is-on { opacity: 1; transform: none; filter: none; }
.gm-mq__toast { position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .94); color: #24232b; box-shadow: 0 20px 40px rgba(0, 0, 0, .35); font: 600 13px/1.25 Raleway, sans-serif; opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .45s, transform .55s cubic-bezier(.2, 1.4, .4, 1); }
.gm-mq__toast.is-on { opacity: 1; transform: none; }
.gm-mq__toast.is-empty { display: none; }
.gm-mq__toast small { display: block; margin-bottom: 5px; font: 400 11px/1 PIXY, monospace; letter-spacing: .05em; color: var(--a); }
.gm-mq__px { flex: 0 0 28px; width: 28px; height: 28px; background: var(--a); clip-path: polygon(0 30%, 30% 30%, 30% 0, 70% 0, 70% 30%, 100% 30%, 100% 70%, 70% 70%, 70% 100%, 30% 100%, 30% 70%, 0 70%); }
.gm-mq__toast--a { left: 2%; top: 10%; }
.gm-mq__toast--b { right: 0; bottom: 8%; }
.gm-mq__spark { position: absolute; z-index: 4; width: 8px; height: 8px; background: var(--a); opacity: 0; animation: gmMqPx 3s infinite; }
@keyframes gmMqBlink { 50% { opacity: .2; } }
@keyframes gmMqPx { 0% { opacity: 0; transform: translateY(10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-60px); } }

@media (min-width: 992px) and (max-height: 820px) {
	.gm-mq h2 { font-size: 38px; }
	.gm-mq__lead { display: none; }
	.gm-mq__tab small { display: none; }
}
@media (max-width: 991px) {
	.gm-mq { --mq-top: 72px; --mq-bottom: 204px; }
	.gm-mq__scroll { height: calc(var(--steps, 3) * 70svh + 100svh); }
	.gm-mq__stage { grid-template-columns: 1fr; align-content: start; align-items: stretch; gap: 10px; height: calc(100svh - var(--mq-top) - var(--mq-bottom)); max-height: 640px; padding: 18px 16px; border-radius: 28px; }
	.gm-mq__view { order: -1; height: 24svh; max-height: 210px; }
	.gm-mq__frame { height: 100%; width: auto; max-width: 100%; }
	.gm-mq__eyebrow { font-size: 12px; }
	.gm-mq h2 { margin: 12px 0 8px; font-size: 27px; }
	.gm-mq__lead { margin-bottom: 14px; font-size: 14px; }
	.gm-mq__tabs { gap: 8px; }
	.gm-mq__tab { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 8px 12px 8px 8px; }
	.gm-mq__ico { width: 34px; height: 34px; }
	.gm-mq__tab b { font-size: 15px; }
	.gm-mq__tab small { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s, opacity .4s; }
	.gm-mq__tab.is-on small { max-height: 40px; opacity: 1; }
	.gm-mq__score { margin-top: 14px; }
	.gm-mq__toast { padding: 8px 10px; font-size: 11px; }
	.gm-mq__px { flex-basis: 20px; width: 20px; height: 20px; }
}
@media (max-width: 991px) and (max-height: 760px) {
	.gm-mq__lead, .gm-mq__score { display: none; }
	.gm-mq h2 { font-size: 23px; }
	.gm-mq__view { height: 20svh; }
}
@media (prefers-reduced-motion: reduce) {
	.gm-mq__stage { height: auto; }
	.gm-mq__scroll { height: auto; }
	.gm-mq__pin { position: static; }
	.gm-mq *, .gm-mq *::before, .gm-mq *::after { animation: none !important; transition: none !important; }
}

/* RU-149: описание пункта — раскрывается у активного */
.gm-mq__desc { display: block; max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; font: 400 14px/1.45 Raleway, sans-serif; color: rgba(255, 255, 255, .8); transition: max-height .5s ease, opacity .4s ease, margin-top .4s ease; }
.gm-mq__tab.is-on .gm-mq__desc { max-height: 84px; margin-top: 8px; opacity: 1; }
@media (min-width: 992px) and (max-height: 820px) {
	.gm-mq__desc { font-size: 13px; }
}
@media (max-width: 991px) {
	.gm-mq__lead { display: none; }
	.gm-mq__copy { justify-content: flex-start; }
	.gm-mq__tab small { display: none; }
	.gm-mq__desc { font-size: 13px; line-height: 1.4; }
	.gm-mq__tab.is-on .gm-mq__desc { max-height: 104px; margin-top: 4px; }
	.gm-mq__view { height: 21svh; }
}
@media (max-width: 991px) and (max-height: 760px) {
	.gm-mq__view { height: 14svh; }
	.gm-mq h2 { margin: 8px 0 6px; font-size: 21px; }
	.gm-mq__eyebrow { display: none; }
	.gm-mq__desc { font-size: 12px; }
	.gm-mq__tab.is-on .gm-mq__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
	.gm-mq__tabs { gap: 6px; }
	.gm-mq__tab { padding-top: 6px; padding-bottom: 6px; }
}
