:root {
  --mq-primary: #6657ff;
  --mq-accent: #16dfac;
  --mq-bg: #080b18;
  --mq-bg-soft: #10152b;
  --mq-panel: rgba(255, 255, 255, 0.075);
  --mq-panel-strong: rgba(255, 255, 255, 0.12);
  --mq-border: rgba(255, 255, 255, 0.12);
  --mq-text: #f7f8ff;
  --mq-muted: #aeb5ca;
  --mq-ink: #14172b;
  --mq-radius: 28px;
  --mq-safe-top: env(safe-area-inset-top, 0px);
  --mq-safe-right: env(safe-area-inset-right, 0px);
  --mq-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mq-safe-left: env(safe-area-inset-left, 0px);
}

[hidden] { display: none !important; }
body.mq-game-open { overflow: hidden !important; overscroll-behavior: none; }
body.mq-sheet-open { touch-action: none; }

.mq-app,
.mq-app * { box-sizing: border-box; }

.mq-app {
  position: relative;
  isolation: isolate;
  width: min(100%, 620px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  color: var(--mq-text);
  background:
    radial-gradient(circle at 88% 4%, color-mix(in srgb, var(--mq-primary) 44%, transparent), transparent 29%),
    radial-gradient(circle at 4% 76%, color-mix(in srgb, var(--mq-accent) 20%, transparent), transparent 34%),
    linear-gradient(165deg, #10152d 0%, var(--mq-bg) 52%, #070914 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overscroll-behavior: none;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.mq-app button,
.mq-app select,
.mq-app input { font: inherit; }
.mq-app button { -webkit-tap-highlight-color: transparent; }
.mq-app a { color: inherit; }
.mq-app-glow {
  position: absolute;
  inset: -35%;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 120deg, transparent 0 34%, rgba(102,87,255,.12), transparent 52% 75%, rgba(22,223,172,.08));
  animation: mq-ambient 22s linear infinite;
}

.mq-topbar {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: calc(72px + var(--mq-safe-top));
  padding: calc(10px + var(--mq-safe-top)) calc(12px + var(--mq-safe-right)) 10px calc(14px + var(--mq-safe-left));
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(8,11,24,.78);
  backdrop-filter: blur(22px) saturate(145%);
}

.mq-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 0;
  color: #fff;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mq-brand > span:last-child { min-width: 0; }
.mq-brand small {
  display: block;
  overflow: hidden;
  color: #9099bb;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.mq-brand strong { display: block; font-size: 1.05rem; line-height: 1.1; }
.mq-brand-mark {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #887cff, var(--mq-primary) 56%, #4236dc);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--mq-primary) 35%, transparent);
}
.mq-brand-mark::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  left: -7px;
  top: 7px;
  border-radius: 50%;
  background: var(--mq-accent);
  opacity: .9;
}
.mq-brand-mark i {
  position: absolute;
  width: 12px;
  height: 27px;
  left: 17px;
  top: 8px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(0,0,0,.15);
}
.mq-brand-mark b {
  position: absolute;
  width: 4px;
  height: 4px;
  left: 21px;
  bottom: 10px;
  border-radius: 50%;
  background: var(--mq-primary);
}

.mq-top-actions { display: flex; align-items: center; gap: 7px; }
.mq-icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 9px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  cursor: pointer;
}
.mq-icon-btn:active { transform: scale(.96); }
.mq-install-btn { display: flex; gap: 5px; color: #07130f; border: 0; background: var(--mq-accent); font-weight: 900; }
.mq-install-btn span { font-size: .75rem; }
.mq-install-btn b { font-size: 1rem; }
.mq-live-status {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: #b7c0da;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}
.mq-live-status i { width: 7px; height: 7px; border-radius: 50%; background: #737b96; }
.mq-live-status.is-play { color: #c9ffef; border-color: rgba(22,223,172,.2); background: rgba(22,223,172,.1); }
.mq-live-status.is-play i { background: var(--mq-accent); box-shadow: 0 0 0 5px rgba(22,223,172,.12); animation: mq-pulse 1.5s infinite; }

.mq-stage { height: calc(100dvh - 72px - var(--mq-safe-top)); min-height: 0; }
.mq-screen { display: none; height: 100%; min-height: 0; }
.mq-screen.is-active { display: block; animation: mq-screen-in .28s ease both; }
.mq-home-scroll,
.mq-screen-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px calc(16px + var(--mq-safe-right)) calc(42px + var(--mq-safe-bottom)) calc(16px + var(--mq-safe-left));
  scrollbar-width: none;
}
.mq-home-scroll::-webkit-scrollbar,
.mq-screen-scroll::-webkit-scrollbar { display: none; }

.mq-kicker {
  margin: 0 0 6px;
  color: #aab2ff;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.mq-install-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0,1fr);
  gap: 13px;
  align-items: center;
  padding: 15px 48px 15px 15px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(22,223,172,.3);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(22,223,172,.15), rgba(102,87,255,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.mq-install-card img { width: 62px; height: 62px; border-radius: 19px; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.mq-install-card h2 { margin: 0; font-size: 1rem; }
.mq-install-card p { margin: 4px 0 0; color: var(--mq-muted); font-size: .8rem; line-height: 1.35; }
.mq-install-card .mq-primary { grid-column: 1 / -1; }
.mq-install-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  color: #c6ccdc;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  font-size: 1.25rem;
  cursor: pointer;
}

.mq-hero {
  position: relative;
  min-height: 258px;
  overflow: hidden;
  padding: 26px 22px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.035)),
    radial-gradient(circle at 75% 20%, rgba(102,87,255,.46), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 24px 55px rgba(0,0,0,.18);
}
.mq-hero-copy { position: relative; z-index: 2; max-width: 72%; }
.mq-hero h1 {
  max-width: 350px;
  margin: 0;
  font-size: clamp(2.2rem, 11vw, 4rem);
  line-height: .94;
  letter-spacing: -.055em;
}
.mq-hero p:last-child { max-width: 340px; margin: 16px 0 0; color: #c3c9da; font-size: .95rem; line-height: 1.5; }
.mq-hero-art { position: absolute; right: -12px; bottom: -25px; width: 188px; height: 240px; }
.mq-hero-ring {
  position: absolute;
  inset: 30px -20px 0 0;
  border: 28px solid rgba(22,223,172,.14);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.mq-hero-phone {
  position: absolute;
  right: 35px;
  bottom: 18px;
  width: 92px;
  height: 168px;
  display: grid;
  place-items: center;
  border: 6px solid #f6f7ff;
  border-radius: 25px;
  background: linear-gradient(165deg, var(--mq-primary), #151a38 72%);
  box-shadow: 0 22px 45px rgba(0,0,0,.32);
  transform: rotate(10deg);
}
.mq-hero-phone::before { content: ""; position: absolute; top: 7px; width: 26px; height: 5px; border-radius: 10px; background: rgba(255,255,255,.72); }
.mq-hero-phone span { font-size: .66rem; font-weight: 950; letter-spacing: .15em; }
.mq-hero-phone i { position: absolute; bottom: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--mq-accent); }
.mq-spark { position: absolute; color: #fff; filter: drop-shadow(0 0 12px rgba(255,255,255,.5)); }
.mq-spark-a { right: 13px; top: 46px; font-size: 1.4rem; animation: mq-float 2.7s ease-in-out infinite; }
.mq-spark-b { left: 22px; bottom: 40px; color: var(--mq-accent); font-size: .75rem; animation: mq-float 3.2s ease-in-out infinite reverse; }

.mq-section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 26px 2px 14px; }
.mq-section-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.025em; }
.mq-section-head > span { flex: 0 0 auto; padding: 7px 10px; color: #c4c8ff; border: 1px solid rgba(164,170,255,.16); border-radius: 999px; background: rgba(102,87,255,.09); font-size: .7rem; font-weight: 850; }

.mq-game-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.mq-game-card {
  position: relative;
  min-height: 184px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 16px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  text-align: left;
  cursor: pointer;
  animation: mq-card-in .42s calc(var(--mq-card-index) * 45ms) ease both;
}
.mq-game-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -45px; top: -48px; border-radius: 50%; background: var(--mq-card-glow, rgba(102,87,255,.22)); filter: blur(4px); }
.mq-game-card--balance { --mq-card-glow: rgba(22,223,172,.25); }
.mq-game-card--steps { --mq-card-glow: rgba(255,183,72,.24); }
.mq-game-card--still { --mq-card-glow: rgba(92,190,255,.24); }
.mq-game-card--duel { --mq-card-glow: rgba(255,105,152,.24); }
.mq-game-card:active { transform: scale(.98); }
.mq-game-card__icon { position: relative; z-index: 1; width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 17px; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: rgba(255,255,255,.09); font-size: 1.55rem; }
.mq-game-card__copy { position: relative; z-index: 1; display: block; }
.mq-game-card__copy small { display: block; color: #aeb5ff; font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.mq-game-card__copy strong { display: block; margin: 5px 0 6px; font-size: 1.04rem; line-height: 1.1; }
.mq-game-card__copy em { display: -webkit-box; overflow: hidden; color: #aeb4c7; font-size: .76rem; font-style: normal; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mq-game-card__meta { position: relative; z-index: 1; width: 100%; display: flex; align-items: end; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.mq-game-card__meta b { font-size: 1.05rem; }
.mq-game-card__meta small { color: #7f89a5; font-size: .65rem; font-weight: 750; }

.mq-safety-strip { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin-top: 15px; padding: 15px; border: 1px solid rgba(22,223,172,.2); border-radius: 20px; background: rgba(22,223,172,.08); }
.mq-safety-strip > span { font-size: 1.25rem; }
.mq-safety-strip p { margin: 0; color: #c7ded8; font-size: .79rem; line-height: 1.45; }
.mq-safety-strip a { grid-column: 2; color: var(--mq-accent); font-size: .75rem; font-weight: 850; }

.mq-back,
.mq-text-button { min-height: 44px; padding: 8px 0; color: #bac1d4; border: 0; background: transparent; font-weight: 800; cursor: pointer; }
.mq-game-heading { display: flex; align-items: center; gap: 15px; margin: 7px 0 20px; }
.mq-game-icon,
.mq-brief-icon { flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; background: linear-gradient(145deg, var(--mq-primary), #9188ff); box-shadow: 0 18px 40px color-mix(in srgb, var(--mq-primary) 30%, transparent); font-size: 2rem; }
.mq-game-heading h1 { margin: 0 0 4px; font-size: clamp(2rem, 9vw, 3.2rem); line-height: .98; letter-spacing: -.045em; }
.mq-game-heading p:last-child { margin: 0; color: var(--mq-muted); font-size: .86rem; line-height: 1.4; }

.mq-how-preview { display: grid; grid-template-columns: 104px 1fr; gap: 17px; align-items: center; padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 25px; background: rgba(255,255,255,.06); }
.mq-how-preview__visual { width: 104px; height: 132px; display: grid; place-items: center; border: 5px solid rgba(255,255,255,.9); border-radius: 22px; background: radial-gradient(circle at 50% 35%, rgba(22,223,172,.24), transparent 38%), linear-gradient(160deg, var(--mq-primary), #1b2144); box-shadow: 0 18px 34px rgba(0,0,0,.22); font-size: 2rem; font-weight: 950; }
.mq-how-preview h2 { margin: 0; font-size: 1.1rem; }
.mq-how-preview p:not(.mq-kicker) { margin: 7px 0; color: #c1c7d8; font-size: .8rem; line-height: 1.45; }
.mq-how-preview ul { margin: 8px 0 0; padding-left: 17px; color: #9ea6bd; font-size: .73rem; line-height: 1.45; }

.mq-setup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.mq-setup-grid label { display: block; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 17px; background: rgba(255,255,255,.045); }
.mq-setup-grid label > span { display: block; margin-bottom: 7px; color: #929ab3; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mq-setup-grid select { width: 100%; min-height: 42px; padding: 0 30px 0 10px; color: #fff; border: 0; border-radius: 11px; outline: 0; background: #1c2344; font-size: .83rem; font-weight: 750; }
.mq-setup-grid option { color: #111; background: #fff; }

.mq-device-card { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 20px; background: rgba(255,255,255,.05); }
.mq-device-card > div { min-width: 0; }
.mq-device-card strong { display: block; font-size: .86rem; }
.mq-device-card p { margin: 4px 0 0; color: #9da5bc; font-size: .72rem; line-height: 1.4; }
.mq-device-dot { float: left; width: 11px; height: 11px; margin: 4px 10px 29px 0; border-radius: 50%; background: #687089; }
.mq-device-dot.is-ok { background: var(--mq-accent); box-shadow: 0 0 0 6px rgba(22,223,172,.1); }
.mq-device-dot.is-warning { background: #ffb248; }
.mq-device-dot.is-checking { background: #a5abff; animation: mq-pulse 1s infinite; }
.mq-confirm { display: flex; gap: 11px; align-items: flex-start; margin: 16px 0; padding: 14px; color: #d7dbea; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.035); font-size: .78rem; line-height: 1.45; }
.mq-confirm input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--mq-accent); }

.mq-primary,
.mq-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border-radius: 16px; text-decoration: none !important; font-weight: 900; line-height: 1.1; cursor: pointer; }
.mq-primary { color: #fff; border: 0; background: linear-gradient(135deg, var(--mq-primary), #8a7fff); box-shadow: 0 14px 32px color-mix(in srgb, var(--mq-primary) 28%, transparent); }
.mq-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.mq-secondary { color: #fff; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.065); }
.mq-primary-large { width: 100%; min-height: 56px; }
.mq-compact { min-height: 44px; padding: 9px 14px; font-size: .78rem; }

.mq-briefing-wrap { padding-bottom: calc(30px + var(--mq-safe-bottom)); }
.mq-brief-hero { padding: 8px 4px 19px; text-align: center; }
.mq-brief-icon { margin: 0 auto 16px; }
.mq-brief-hero h1 { margin: 0; font-size: clamp(2.2rem, 10vw, 3.5rem); line-height: .95; letter-spacing: -.05em; }
.mq-brief-hero > p:last-child { margin: 13px auto 0; max-width: 450px; color: var(--mq-muted); font-size: .9rem; line-height: 1.5; }
.mq-brief-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mq-brief-steps li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 19px; background: rgba(255,255,255,.055); }
.mq-brief-steps li > span { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 14px; background: linear-gradient(145deg, var(--mq-primary), #877cff); font-weight: 950; }
.mq-brief-steps p { margin: 0; color: #d8dbea; font-size: .82rem; line-height: 1.45; }
.mq-brief-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 17px; }
.mq-brief-info article { display: flex; gap: 9px; align-items: flex-start; padding: 13px; border-radius: 18px; background: rgba(22,223,172,.075); }
.mq-brief-info article > span { font-size: 1.15rem; }
.mq-brief-info strong { display: block; font-size: .78rem; }
.mq-brief-info p { margin: 4px 0 0; color: #aeb8c7; font-size: .68rem; line-height: 1.4; }
.mq-tap-note { margin: 10px 12px 0; color: #79829c; font-size: .65rem; line-height: 1.4; text-align: center; }

.mq-calibration-screen { padding: 16px; }
.mq-calibration-card { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 18px calc(18px + var(--mq-safe-bottom)); text-align: center; }
.mq-calibration-orbit { position: relative; width: 220px; height: 220px; display: grid; place-items: center; margin-bottom: 24px; }
.mq-calibration-orbit::before,
.mq-calibration-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); }
.mq-calibration-orbit::before { inset: 7px; animation: mq-spin 7s linear infinite; border-top-color: var(--mq-accent); }
.mq-calibration-orbit::after { inset: 27px; animation: mq-spin 5s linear infinite reverse; border-right-color: #9c94ff; }
.mq-calibration-orbit i,
.mq-calibration-orbit b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--mq-accent); box-shadow: 0 0 20px var(--mq-accent); }
.mq-calibration-orbit i { top: 18px; right: 48px; }
.mq-calibration-orbit b { left: 28px; bottom: 52px; background: #8f86ff; }
.mq-calibration-phone { position: relative; z-index: 2; width: 82px; height: 142px; display: grid; place-items: center; border: 6px solid #fff; border-radius: 23px; background: linear-gradient(160deg, var(--mq-primary), #151a36); box-shadow: 0 25px 48px rgba(0,0,0,.34); font-size: 2rem; }
.mq-calibration-phone::before { content: ""; position: absolute; top: 6px; width: 23px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.7); }
.mq-calibration-card h1 { margin: 0; font-size: clamp(2rem, 9vw, 3.3rem); line-height: .98; letter-spacing: -.045em; }
.mq-calibration-card > p:not(.mq-kicker) { max-width: 370px; margin: 12px 0 20px; color: var(--mq-muted); line-height: 1.45; }
.mq-calibration-progress { width: min(320px, 84%); height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.mq-calibration-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mq-accent), #9af9de); transition: width .12s linear; }
.mq-countdown { min-height: 74px; margin-top: 10px; color: #fff; font-size: 4rem; line-height: 1; text-shadow: 0 0 35px color-mix(in srgb, var(--mq-primary) 80%, transparent); }

.mq-play-screen { position: relative; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 10px calc(12px + var(--mq-safe-right)) calc(10px + var(--mq-safe-bottom)) calc(12px + var(--mq-safe-left)); }
.mq-play-screen.is-active { display: grid; }
.mq-play-head { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.mq-play-title { min-width: 0; }
.mq-play-title small { display: block; overflow: hidden; color: #878fa8; font-size: .57rem; font-weight: 900; letter-spacing: .11em; text-overflow: ellipsis; white-space: nowrap; }
.mq-play-title strong { display: block; overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.mq-play-stats { display: flex; gap: 6px; }
.mq-play-stats > div { min-width: 59px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.055); text-align: center; }
.mq-play-stats span { display: block; color: #858ea8; font-size: .52rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mq-play-stats strong { display: block; margin-top: 1px; font-size: 1.15rem; }
.mq-progress { height: 6px; margin: 10px 1px 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.mq-progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mq-accent), #98ffe1); transition: width .1s linear; }
.mq-play-main { height: auto; min-height: 0; display: grid; grid-template-rows: minmax(230px, 1fr) auto; align-items: center; text-align: center; }
.mq-motion-visual { position: relative; width: 100%; height: 100%; min-height: 230px; display: grid; place-items: center; perspective: 900px; overflow: hidden; }
.mq-motion-visual::before { content: ""; position: absolute; width: min(68vw, 320px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(102,87,255,.22), rgba(102,87,255,.045) 50%, transparent 68%); filter: blur(2px); }
.mq-phone { position: relative; z-index: 2; width: 106px; height: 186px; display: grid; place-items: center; border: 7px solid #f7f8ff; border-radius: 29px; background: radial-gradient(circle at 50% 38%, rgba(22,223,172,.28), transparent 34%), linear-gradient(160deg, var(--mq-primary), #151a37 75%); box-shadow: 0 30px 65px rgba(0,0,0,.36); font-size: 3rem; transition: transform .08s linear; }
.mq-phone::before { content: ""; position: absolute; top: 7px; width: 30px; height: 5px; border-radius: 6px; background: rgba(255,255,255,.75); }
.mq-phone::after { content: ""; position: absolute; bottom: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--mq-accent); }
.mq-phone-wave { position: absolute; inset: -22px; z-index: -1; border: 2px solid rgba(102,87,255,.26); border-radius: 38px; animation: mq-wave 2s ease-out infinite; }
.mq-wave-b { animation-delay: 1s; }

.mq-balance-field { position: relative; z-index: 2; width: min(82vw, 370px); aspect-ratio: 1.25; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 36px; background: radial-gradient(circle at center, rgba(255,255,255,.08), transparent 52%), linear-gradient(145deg, rgba(102,87,255,.2), rgba(22,223,172,.07)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 22px 55px rgba(0,0,0,.25); }
.mq-balance-field::before,
.mq-balance-field::after { content: ""; position: absolute; background: rgba(255,255,255,.06); }
.mq-balance-field::before { width: 1px; height: 100%; left: 50%; top: 0; }
.mq-balance-field::after { height: 1px; width: 100%; top: 50%; left: 0; }
.mq-balance-target,
.mq-balance-orb,
.mq-balance-hold { position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; }
.mq-balance-target { z-index: 2; width: 74px; height: 74px; border: 4px solid var(--mq-accent); box-shadow: 0 0 0 12px rgba(22,223,172,.09), 0 0 35px rgba(22,223,172,.28); }
.mq-balance-orb { z-index: 4; width: 30px; height: 30px; background: radial-gradient(circle at 35% 25%, #fff, #b7b1ff 35%, var(--mq-primary) 74%); box-shadow: 0 9px 18px rgba(0,0,0,.36), 0 0 25px rgba(134,123,255,.45); transition: transform .06s linear; }
.mq-balance-hold { --mq-hold: 0deg; z-index: 3; width: 88px; height: 88px; background: conic-gradient(var(--mq-accent) var(--mq-hold), transparent 0); -webkit-mask: radial-gradient(circle, transparent 61%, #000 63%); mask: radial-gradient(circle, transparent 61%, #000 63%); }

.mq-task-copy { position: relative; z-index: 3; padding: 0 7px 8px; }
.mq-round-label { display: inline-flex; align-items: center; min-height: 29px; margin: 0 0 3px; padding: 6px 10px; color: #b0b5ff; border: 1px solid rgba(166,172,255,.14); border-radius: 999px; background: rgba(102,87,255,.08); font-size: .6rem; font-weight: 950; letter-spacing: .14em; }
.mq-round-label.is-hit { color: #07150f; border-color: var(--mq-accent); background: var(--mq-accent); animation: mq-hit .4s ease both; }
.mq-task-copy h1 { margin: 2px 0 5px; font-size: clamp(1.65rem, 8vw, 3.1rem); line-height: .98; letter-spacing: -.045em; }
.mq-task-copy > p:not(.mq-round-label) { margin: 0 auto; max-width: 440px; color: #a9b0c4; font-size: .8rem; line-height: 1.4; }
.mq-center-hint,
.mq-player-badge { display: inline-flex; margin-top: 9px; padding: 7px 10px; border-radius: 999px; font-size: .68rem; font-weight: 850; }
.mq-center-hint { color: #ffd39a; background: rgba(255,172,72,.12); }
.mq-player-badge { color: #c9fff0; background: rgba(22,223,172,.11); }

.mq-fallback { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }
.mq-fallback-head { min-width: 72px; text-align: left; }
.mq-fallback-head span { display: block; color: #9da6bd; font-size: .65rem; font-weight: 850; }
.mq-fallback-head small { display: block; margin-top: 2px; color: #626c87; font-size: .53rem; line-height: 1.2; }
.mq-fallback-controls { display: grid; grid-template-columns: repeat(6, 42px); gap: 5px; }
.mq-fallback-controls button { width: 42px; height: 42px; color: #fff; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.06); font-size: 1rem; cursor: pointer; }
.mq-fallback-controls button:active { color: #08120f; background: var(--mq-accent); transform: scale(.94); }

.mq-handoff-card,
.mq-result-wrap { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; padding: 28px 20px calc(28px + var(--mq-safe-bottom)); text-align: center; }
.mq-handoff-icon { font-size: 4rem; }
.mq-handoff-card h1,
.mq-result-wrap h1 { max-width: 450px; margin: 3px 0 10px; font-size: clamp(2.3rem, 11vw, 4rem); line-height: .94; letter-spacing: -.055em; }
.mq-handoff-card > p:not(.mq-kicker),
.mq-result-wrap > p:not(.mq-kicker) { max-width: 430px; color: var(--mq-muted); line-height: 1.5; }
.mq-handoff-score { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0; }
.mq-handoff-score span { min-width: 90px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.06); }
.mq-handoff-score small { display: block; color: #8f98b1; }
.mq-handoff-score strong { display: block; margin-top: 2px; font-size: 1.4rem; }
.mq-handoff-card .mq-primary { max-width: 420px; }

.mq-result-medal { margin-bottom: 8px; font-size: 4.8rem; filter: drop-shadow(0 18px 22px rgba(0,0,0,.3)); animation: mq-medal .65s cubic-bezier(.2,.8,.2,1.2) both; }
.mq-result-score { min-width: 220px; display: flex; flex-direction: column; margin: 15px 0; padding: 20px 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 27px; background: linear-gradient(145deg, rgba(102,87,255,.28), rgba(255,255,255,.055)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.mq-result-score span,
.mq-result-score small { color: #aeb5ca; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.mq-result-score strong { font-size: 4rem; line-height: 1; }
.mq-result-actions { width: min(100%, 420px); display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.mq-app-reminder { width: min(100%, 420px); display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; margin-top: 14px; padding: 10px 12px; color: #fff; border: 1px solid rgba(22,223,172,.18); border-radius: 18px; background: rgba(22,223,172,.075); text-align: left; cursor: pointer; }
.mq-app-reminder img { width: 42px; height: 42px; border-radius: 13px; }
.mq-app-reminder strong,
.mq-app-reminder small { display: block; }
.mq-app-reminder strong { font-size: .8rem; }
.mq-app-reminder small { margin-top: 2px; color: #91a8a1; font-size: .65rem; }

.mq-sheet { position: absolute; inset: 0; z-index: 90; display: flex; align-items: flex-end; }
.mq-sheet-backdrop { position: absolute; inset: 0; background: rgba(2,4,12,.76); backdrop-filter: blur(10px); }
.mq-sheet-card { position: relative; z-index: 2; width: 100%; max-height: calc(92dvh - var(--mq-safe-top)); overflow-y: auto; padding: 10px 20px calc(22px + var(--mq-safe-bottom)); color: var(--mq-ink); border-radius: 30px 30px 0 0; background: #f8f9ff; box-shadow: 0 -25px 80px rgba(0,0,0,.38); animation: mq-sheet-up .28s ease both; }
.mq-sheet-handle { width: 44px; height: 5px; margin: 0 auto 13px; border-radius: 99px; background: #d5d9e7; }
.mq-drawer-close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; color: #424960; border: 0; border-radius: 14px; background: #e9ebf4; cursor: pointer; }
.mq-sheet-card h2 { max-width: 82%; margin: 0 0 12px; font-size: 1.75rem; line-height: 1; letter-spacing: -.035em; }
.mq-install-head { display: flex; align-items: center; gap: 14px; padding-right: 48px; }
.mq-install-head img { width: 76px; height: 76px; border-radius: 23px; box-shadow: 0 15px 35px rgba(30,35,70,.2); }
.mq-install-head .mq-kicker { color: #5b54d3; }
.mq-sheet-card > p { color: #626a80; line-height: 1.5; }
.mq-install-benefits { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.mq-install-benefits span { padding: 7px 9px; color: #12604c; border-radius: 999px; background: #dff8ef; font-size: .68rem; font-weight: 850; }
.mq-install-steps ol { display: grid; gap: 8px; margin: 12px 0 17px; padding: 0; list-style: none; }
.mq-install-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; padding: 10px; border: 1px solid #e3e6ef; border-radius: 15px; background: #fff; }
.mq-install-steps li span { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border-radius: 11px; background: var(--mq-primary); font-weight: 900; }
.mq-install-steps li p { margin: 0; color: #4e566c; font-size: .78rem; line-height: 1.35; }
.mq-sheet-card > .mq-secondary { margin-top: 8px; color: #31384f; border-color: #dce0eb; background: #eceef6; }
.mq-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e6e8f0; }
.mq-switch span { min-width: 0; }
.mq-switch strong,
.mq-switch small { display: block; }
.mq-switch small { margin-top: 3px; color: #7c8498; font-size: .7rem; }
.mq-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mq-switch i { position: relative; flex: 0 0 51px; width: 51px; height: 30px; border-radius: 99px; background: #d8dce7; transition: background .2s; }
.mq-switch i::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(20,24,50,.2); transition: transform .2s; }
.mq-switch input:checked + i { background: var(--mq-primary); }
.mq-switch input:checked + i::after { transform: translateX(21px); }
.mq-privacy-note { font-size: .72rem; }
.mq-privacy-note a { color: #5148d5; }
.mq-toast { position: absolute; z-index: 120; left: 16px; right: 16px; bottom: calc(18px + var(--mq-safe-bottom)); padding: 13px 15px; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(20,24,48,.96); box-shadow: 0 18px 55px rgba(0,0,0,.35); font-size: .78rem; line-height: 1.4; text-align: center; animation: mq-toast-in .25s ease both; }
.mq-orientation-guard { position: absolute; inset: 0; z-index: 130; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 30px; color: #fff; background: rgba(7,9,20,.96); text-align: center; }
.mq-orientation-guard span { font-size: 4rem; animation: mq-tilt 1.8s ease-in-out infinite; }
.mq-orientation-guard strong { max-width: 360px; font-size: 1.2rem; }

.mq-hub,
.mq-install-page,
.mq-legal,
.mq-browser-diagnostics { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.mq-hub { max-width: 1120px; margin: 34px auto; }
.mq-hub-hero { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 30px; align-items: center; overflow: hidden; padding: clamp(28px,6vw,70px); color: #fff; border-radius: 36px; background: radial-gradient(circle at 88% 20%, rgba(22,223,172,.25), transparent 32%), linear-gradient(145deg,#111631,#252c57); }
.mq-hub-hero h2 { max-width: 760px; margin: .2em 0; font-size: clamp(2.3rem,5vw,4.5rem); line-height: .98; letter-spacing: -.05em; }
.mq-hub-hero p { max-width: 690px; color: #c5cadb; line-height: 1.6; }
.mq-hub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.mq-hub-phone img { width: 100%; border-radius: 32%; box-shadow: 0 28px 70px rgba(0,0,0,.3); transform: rotate(7deg); }
.mq-hub-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 18px 0; }
.mq-hub-cards article { padding: 22px; border: 1px solid #e4e6ef; border-radius: 22px; background: #fff; }
.mq-hub-cards span { font-size: 2rem; }
.mq-hub-cards h3 { margin: 10px 0 6px; }
.mq-hub-cards p { margin: 0; color: #687087; line-height: 1.5; }
.mq-hub-safety { padding: 25px; border-radius: 22px; background: #eafaf5; }
.mq-hub-safety h3 { margin-top: 0; }

.mq-install-page { max-width: 1050px; margin: 36px auto; }
.mq-install-page__hero { display: grid; grid-template-columns: 180px 1fr; gap: 30px; align-items: center; padding: clamp(24px,5vw,55px); color: #fff; border-radius: 34px; background: linear-gradient(145deg,#121733,#262d59); }
.mq-install-page__hero img { width: 170px; height: 170px; border-radius: 34%; box-shadow: 0 25px 60px rgba(0,0,0,.28); }
.mq-install-page__hero h1 { margin: 0; font-size: clamp(2.2rem,5vw,4rem); line-height: .98; }
.mq-install-page__hero p { color: #c4cada; line-height: 1.6; }
.mq-install-page__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 18px 0; }
.mq-install-page__grid article { padding: 22px; border: 1px solid #e4e6ef; border-radius: 22px; background: #fff; }
.mq-install-page__grid article > span { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 14px; background: var(--mq-primary); font-weight: 900; }
.mq-install-page__grid h2 { font-size: 1.1rem; }
.mq-install-page__grid p { color: #687087; line-height: 1.55; }
.mq-install-panel-status { margin-bottom: 12px; padding: 14px; border-radius: 15px; background: #eef0f7; color: #535c73; }

.mq-legal,
.mq-browser-diagnostics { max-width: 900px; margin: 32px auto; padding: clamp(22px,5vw,52px); color: var(--mq-ink); border: 1px solid #e4e6ed; border-radius: 26px; background: #fff; }
.mq-legal h1 { font-size: clamp(2rem,5vw,3.5rem); }
.mq-legal h2 { margin-top: 1.6em; }
.mq-legal p,
.mq-legal li { line-height: 1.7; }
.mq-browser-diagnostics p { padding: 10px 0; border-bottom: 1px solid #eee; }

.mq-reduced-motion *,
.mq-reduced-motion *::before,
.mq-reduced-motion *::after { animation: none !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }

@keyframes mq-screen-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes mq-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mq-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes mq-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mq-pulse { 50% { opacity: .45; } }
@keyframes mq-wave { from { opacity: .45; transform: scale(.8); } to { opacity: 0; transform: scale(1.2); } }
@keyframes mq-float { 50% { transform: translateY(-9px) rotate(8deg); } }
@keyframes mq-spin { to { transform: rotate(360deg); } }
@keyframes mq-hit { 40% { transform: scale(1.1); } }
@keyframes mq-medal { from { opacity: 0; transform: translateY(20px) scale(.55) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes mq-ambient { to { transform: rotate(360deg); } }
@keyframes mq-tilt { 50% { transform: rotate(90deg); } }

@media (min-width: 560px) {
  .mq-app { border-radius: 32px; }
  .mq-live-status { display: flex; }
}

@media (hover: hover) and (pointer: fine) {
  .mq-game-card:hover { border-color: rgba(172,176,255,.45); background: linear-gradient(155deg, rgba(102,87,255,.22), rgba(255,255,255,.055)); transform: translateY(-3px); }
  .mq-primary:hover { filter: brightness(1.08); }
  .mq-secondary:hover { background: rgba(255,255,255,.1); }
}

@media (max-width: 420px) {
  .mq-topbar { padding-left: calc(10px + var(--mq-safe-left)); padding-right: calc(8px + var(--mq-safe-right)); }
  .mq-brand-mark { flex-basis: 38px; width: 38px; height: 38px; }
  .mq-brand-mark i { left: 15px; top: 7px; }
  .mq-brand-mark b { left: 19px; }
  .mq-brand small { display: none; }
  .mq-brand strong { font-size: .94rem; }
  .mq-top-actions { gap: 5px; }
  .mq-icon-btn { min-width: 40px; width: 40px; height: 40px; padding: 0; border-radius: 13px; }
  .mq-install-btn { width: auto; min-width: 55px; padding: 0 8px; }
  .mq-home-scroll,
  .mq-screen-scroll { padding-left: calc(12px + var(--mq-safe-left)); padding-right: calc(12px + var(--mq-safe-right)); }
  .mq-hero { min-height: 240px; padding: 22px 18px; }
  .mq-hero-copy { max-width: 76%; }
  .mq-hero h1 { font-size: 2.45rem; }
  .mq-hero-art { right: -28px; transform: scale(.9); transform-origin: right bottom; }
  .mq-game-card { min-height: 171px; padding: 14px; }
  .mq-game-card__icon { width: 47px; height: 47px; margin-bottom: 13px; }
  .mq-game-card__copy strong { font-size: .96rem; }
  .mq-game-card__copy em { font-size: .7rem; }
  .mq-how-preview { grid-template-columns: 84px 1fr; padding: 14px; }
  .mq-how-preview__visual { width: 84px; height: 115px; }
  .mq-device-card { align-items: flex-start; flex-direction: column; }
  .mq-device-card .mq-secondary { width: 100%; min-height: 44px; }
  .mq-brief-info { grid-template-columns: 1fr; }
  .mq-fallback-head { display: none; }
  .mq-fallback { justify-content: center; }
  .mq-fallback-controls { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; }
  .mq-fallback-controls button { width: 100%; }
}

@media (max-height: 700px) {
  .mq-play-main { height: auto; grid-template-rows: minmax(150px, 1fr) auto; }
  .mq-motion-visual { min-height: 180px; }
  .mq-phone { width: 86px; height: 148px; border-width: 6px; font-size: 2.3rem; }
  .mq-balance-field { width: min(75vw, 320px); }
  .mq-task-copy h1 { font-size: clamp(1.45rem, 6.8vw, 2.3rem); }
  .mq-fallback { height: 64px; }
  .mq-fallback-controls button { height: 38px; }
}

@media (orientation: landscape) and (max-height: 620px) {
  .mq-app { width: 100%; max-width: none; height: 100dvh; min-height: 0; border-radius: 0; }
  .mq-topbar { height: calc(60px + var(--mq-safe-top)); padding-top: calc(6px + var(--mq-safe-top)); padding-bottom: 6px; }
  .mq-stage { height: calc(100dvh - 60px - var(--mq-safe-top)); }
  .mq-play-screen { padding-top: 6px; }
  .mq-play-main { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .mq-motion-visual { min-height: 0; }
  .mq-task-copy { padding: 0 12px; }
  .mq-fallback { position: absolute; right: calc(10px + var(--mq-safe-right)); bottom: calc(6px + var(--mq-safe-bottom)); width: calc(50% - 18px); border-top: 0; }
  .mq-phone { width: 76px; height: 130px; }
  .mq-balance-field { width: min(46vw, 320px); }
  .mq-calibration-orbit { width: 155px; height: 155px; margin-bottom: 8px; }
  .mq-calibration-phone { width: 60px; height: 103px; }
  .mq-calibration-card { display: grid; grid-template-columns: 190px 1fr; grid-template-rows: auto auto auto auto; column-gap: 24px; text-align: left; }
  .mq-calibration-orbit { grid-row: 1 / 5; }
  .mq-calibration-progress { width: 100%; }
  .mq-countdown { min-height: 45px; font-size: 2.8rem; }
}

@media (max-width: 760px) and (pointer: coarse), (max-width: 760px) {
  .mq-app { position: fixed; inset: 0; z-index: 999999; width: 100%; max-width: none; height: 100dvh; min-height: 0; margin: 0; border-radius: 0; }
}

@media (max-width: 850px) {
  .mq-hub-hero { grid-template-columns: 1fr; }
  .mq-hub-phone { max-width: 180px; }
  .mq-hub-cards { grid-template-columns: 1fr 1fr; }
  .mq-install-page__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .mq-hub-hero,
  .mq-install-page__hero { grid-template-columns: 1fr; border-radius: 24px; }
  .mq-install-page__hero img { width: 120px; height: 120px; }
  .mq-hub-cards { grid-template-columns: 1fr; }
}
