:root {
  --gq-shell-bg: #060a12;
  --gq-shell-panel: rgba(12, 18, 30, 0.94);
  --gq-shell-panel-soft: rgba(14, 22, 37, 0.92);
  --gq-shell-line: rgba(255, 255, 255, 0.08);
  --gq-shell-line-strong: rgba(101, 231, 255, 0.24);
  --gq-shell-text: #eef4ff;
  --gq-shell-muted: rgba(238, 244, 255, 0.68);
  --gq-shell-accent: #65e7ff;
  --gq-shell-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
  --gq-shell-header-height: 60px;
  --gq-shell-ads-width: 320px;
}

.gq-shell-page {
  height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(101, 231, 255, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 211, 107, 0.08), transparent 22%),
    linear-gradient(180deg, #05070c 0%, #09101c 52%, #0b1220 100%);
  color: var(--gq-shell-text);
  overflow: hidden;
  touch-action: manipulation;
}

.gq-shell-header {
  height: var(--gq-shell-header-height);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--gq-shell-line);
  background: #060b13;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gq-shell-header__left,
.gq-shell-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gq-shell-header__right {
  justify-content: flex-end;
}

.gq-shell-brand,
.gq-shell-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--gq-shell-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gq-shell-text);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.gq-shell-brand:hover,
.gq-shell-back:hover {
  transform: translateY(-1px);
  border-color: var(--gq-shell-line-strong);
}

.gq-shell-brand {
  background: linear-gradient(180deg, rgba(101, 231, 255, 0.12), rgba(62, 123, 255, 0.06));
}

.gq-shell-header__title {
  margin: 0;
  text-align: center;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gq-shell-header__meta {
  color: var(--gq-shell-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gq-shell-main {
  height: calc(100dvh - var(--gq-shell-header-height));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--gq-shell-ads-width);
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.gq-shell-stage {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.gq-shell-playzone {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--gq-shell-line);
  background: #050812;
  box-shadow: var(--gq-shell-shadow);
}

.gq-shell-playzone--with-hud {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.gq-shell-canvas-area {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overscroll-behavior: contain;
  touch-action: none;
}

.gq-shell-hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  min-width: 0;
}

.gq-shell-hud__item,
.gq-shell-sidecar__block {
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(101, 231, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.gq-shell-hud__item {
  padding: 10px 12px;
}

.gq-shell-hud__label,
.gq-shell-sidecar__title {
  display: block;
  color: var(--gq-shell-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.gq-shell-hud__item strong {
  display: block;
  margin-top: 4px;
  color: var(--gq-shell-text);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1;
  white-space: nowrap;
}

.gq-shell-sidecar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.gq-shell-sidecar__block {
  padding: 10px 12px;
}

.gq-shell-help-line {
  margin: 0;
  align-self: stretch;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--gq-shell-muted);
  font-size: 12px;
  line-height: 1.45;
}

.gq-shell-technical {
  display: none !important;
}

.gq-shell-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--gq-shell-line);
  background: rgba(6, 10, 18, 0.88);
  color: var(--gq-shell-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.gq-shell-expand:hover {
  transform: translateY(-1px);
  border-color: var(--gq-shell-line-strong);
}

.gq-shell-details {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.gq-shell-ads {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.gq-shell-ad-slot {
  min-height: 250px;
  aspect-ratio: 300 / 250;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--gq-shell-line);
  background: #0b111c;
  box-shadow: var(--gq-shell-shadow);
  display: grid;
  place-items: center;
  text-align: center;
  flex: 0 0 auto;
}

.gq-shell-ad-slot > div {
  display: none;
}

.gq-shell-ad-slot--small {
  min-height: 250px;
}

.gq-shell-ad-slot__label {
  display: block;
  margin-bottom: 10px;
  color: var(--gq-shell-muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gq-shell-ad-slot__size {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.gq-shell-ad-slot__note {
  margin-top: 10px;
  color: var(--gq-shell-muted);
  font-size: 13px;
  line-height: 1.5;
}

.gq-shell-page--expanded .gq-shell-details {
  display: none;
}

.gq-shell-page--expanded .gq-shell-playzone {
  padding: 8px;
}

@media (max-width: 1180px) {
  .gq-shell-main {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 980px) {
  .gq-shell-main {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .gq-shell-stage {
    grid-template-rows: auto;
    overflow: visible;
  }

  .gq-shell-playzone {
    min-height: min(70vh, 720px);
  }

  .gq-shell-ads {
    height: auto;
    flex-direction: row;
  }
}

@media (max-width: 720px) {
  .gq-shell-header {
    height: auto;
    grid-template-columns: 1fr;
    justify-items: stretch;
    padding: 12px 14px;
  }

  .gq-shell-header__left,
  .gq-shell-header__right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .gq-shell-header__title {
    text-align: left;
    white-space: normal;
  }

  .gq-shell-main {
    height: auto;
    padding: 14px;
    overflow: visible;
  }

  .gq-shell-playzone {
    padding: 10px;
    min-height: min(64vh, 620px);
  }

  .gq-shell-ads {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .gq-shell-ad-slot,
  .gq-shell-ad-slot--small {
    min-height: 160px;
    aspect-ratio: auto;
  }

  .gq-shell-sidecar {
    grid-template-columns: 1fr;
  }

  .gq-shell-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none), (pointer: coarse), (max-width: 900px) {
  html.is-game-touching,
  body.is-game-touching {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .gq-shell-page {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .gq-shell-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      10px
      max(12px, env(safe-area-inset-left, 0px));
  }

  .gq-shell-brand {
    display: none;
  }

  .gq-shell-back {
    min-height: 42px;
    padding: 10px 14px;
  }

  .gq-shell-header__meta {
    display: none;
  }

  .gq-shell-main {
    min-height: calc(100dvh - 58px);
    padding:
      10px
      max(10px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .gq-shell-stage {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .gq-shell-playzone {
    min-height: clamp(360px, 68dvh, 700px);
    padding: 8px;
    border-radius: 14px;
    overscroll-behavior: contain;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .gq-shell-details {
    gap: 10px;
  }

  .gq-shell-ad-slot {
    box-shadow: none;
  }

  .gq-shell-hud {
    gap: 6px;
  }

  .gq-shell-hud__item,
  .gq-shell-sidecar__block,
  .gq-shell-help-line {
    border-radius: 12px;
    padding: 8px 10px;
  }

  .gq-shell-hud__item strong {
    font-size: 18px;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  .gq-shell-header {
    position: static;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 10px;
  }

  .gq-shell-header__right {
    display: none;
  }

  .gq-shell-main {
    min-height: calc(100dvh - 46px);
  }

  .gq-shell-playzone {
    min-height: calc(100dvh - 66px);
  }

  .gq-shell-details {
    display: none;
  }

  .gq-shell-sidecar {
    display: none;
  }
}
