:root {
  --pwa-bg: #121221;
  --pwa-panel: #1a1a2b;
  --pwa-text: #f7f7fb;
  --pwa-muted: #aaaabb;
  --pwa-accent: #ffcd30;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--pwa-bg);
}

body.pwa-product-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--pwa-bg);
  color: var(--pwa-text);
  font-family: 'Montserrat', system-ui, sans-serif;
}

.pwa-product-page *,
.pwa-product-page *::before,
.pwa-product-page *::after {
  box-sizing: border-box;
}

.pwa-main {
  position: relative;
  isolation: isolate;
}

.pwa-main::before {
  display: none;
  content: none;
}

.pwa-section,
.pwa-hero {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.pwa-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: center;
  min-height: 680px;
  padding: 78px 0 86px;
}

.pwa-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--pwa-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.pwa-eyebrow::before {
  width: 26px;
  height: 2px;
  background: currentColor;
  content: '';
}

.pwa-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
  text-transform: none;
  text-wrap: balance;
}

.pwa-hero-lead {
  max-width: 710px;
  margin: 26px 0 0;
  color: var(--pwa-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  text-wrap: pretty;
}

.pwa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pwa-actions[hidden] {
  display: none !important;
}

.pwa-actions .btn-primary,
.pwa-actions .btn-secondary-outline {
  min-height: 62px;
  border: 1px solid transparent;
  font: 900 12px/1.2 'Montserrat', system-ui, sans-serif;
  letter-spacing: .045em;
  cursor: pointer;
}

.pwa-actions .btn-secondary-outline {
  border-color: var(--glass-border);
}

.pwa-hero-visual {
  position: relative;
  min-width: 0;
}

.pwa-game-shell {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pwa-game-shell::before {
  display: block;
  padding-top: 520px;
  content: '';
}

.pwa-game-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.pwa-section {
  padding: 88px 0;
}

.pwa-section h2 {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  text-wrap: balance;
}

.pwa-section-intro {
  max-width: 760px;
  margin: 0 0 36px;
  color: var(--pwa-muted);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.pwa-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pwa-card,
.pwa-install-step,
.pwa-faq details {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(26,26,43,.84);
}

.pwa-card {
  min-height: 220px;
  padding: 28px;
}

.pwa-card-number {
  display: inline-flex;
  min-width: 44px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  border-radius: 9px;
  background: var(--pwa-accent);
  color: #121221;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 0 10px 24px rgba(255,205,48,.16);
}

.pwa-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
}

.pwa-card p,
.pwa-copy p,
.pwa-install-step p,
.pwa-faq p {
  margin: 0;
  color: var(--pwa-muted);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

.pwa-device-showcase {
  margin-top: 38px;
}

.pwa-device-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: rgba(26,26,43,.84);
}

.pwa-device-tab {
  min-width: 150px;
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pwa-muted);
  font: 800 12px/1.2 'Montserrat', system-ui, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}

.pwa-device-tab[aria-selected="true"] {
  background: var(--pwa-accent);
  color: #121221;
  box-shadow: 0 10px 30px rgba(255,205,48,.18);
}

.pwa-device-tab:focus-visible {
  outline: 3px solid rgba(255,205,48,.32);
  outline-offset: 3px;
}

.pwa-device-panel {
  padding-top: 24px;
}

.pwa-device-panel[hidden] {
  display: none;
}

.pwa-device-frame {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: #0e0e19;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}

.pwa-device-frame-mobile {
  width: min(430px, 100%);
  margin-inline: auto;
}

.pwa-device-caption {
  max-width: 880px;
  margin: 18px auto 0 !important;
  text-align: center;
}

.pwa-device-mobile-layout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1fr);
  gap: clamp(32px, 7vw, 82px);
  align-items: center;
}

.pwa-device-copy h3 {
  margin: 0 0 24px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
}

.pwa-device-points {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pwa-device-points li {
  position: relative;
  padding-left: 34px;
}

.pwa-device-points li::before {
  position: absolute;
  top: 3px;
  left: 0;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background-color: var(--pwa-accent);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  content: '';
}

.pwa-device-points li:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121221' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}

.pwa-device-points li:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121221' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m8 11 4 4 4-4'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E");
}

.pwa-device-points li:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121221' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H3v5'/%3E%3Cpath d='m3 3 6 6'/%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='m21 3-6 6'/%3E%3Cpath d='M8 21H3v-5'/%3E%3Cpath d='m3 21 6-6'/%3E%3Cpath d='M16 21h5v-5'/%3E%3Cpath d='m21 21-6-6'/%3E%3C/svg%3E");
}

.pwa-device-points strong,
.pwa-device-points span {
  display: block;
}

.pwa-device-points strong {
  margin-bottom: 4px;
  color: var(--pwa-text);
  font-size: 15px;
}

.pwa-device-points span {
  color: var(--pwa-muted);
  font-size: 13px;
  line-height: 1.55;
}

.pwa-screenshot {
  display: block;
  width: 100%;
  border-radius: 14px;
  background: #0e0e19;
}

.pwa-install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pwa-install-step {
  padding: 24px;
}

.pwa-install-step h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.pwa-install-chooser {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: rgba(26,26,43,.7);
}

.pwa-install-method-list {
  display: grid;
  align-content: start;
  gap: 7px;
}

.pwa-install-method-list button {
  position: relative;
  min-height: 58px;
  padding: 13px 42px 13px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--pwa-muted);
  font: 700 12px/1.4 'Montserrat', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.pwa-install-method-list button::after {
  position: absolute;
  top: 50%;
  right: 16px;
  color: currentColor;
  content: '→';
  transform: translateY(-50%);
}

.pwa-install-method-list button:hover {
  background: rgba(255,255,255,.035);
  color: #fff;
}

.pwa-install-method-list button[aria-selected="true"] {
  border-color: rgba(255,205,48,.28);
  background: rgba(255,205,48,.1);
  color: var(--pwa-accent);
}

.pwa-install-method-list button:focus-visible,
.pwa-install-select-label select:focus-visible {
  outline: 2px solid var(--pwa-accent);
  outline-offset: 2px;
}

.pwa-install-select-label {
  display: none;
  color: var(--pwa-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pwa-install-select-label select {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255,205,48,.28);
  border-radius: 12px;
  background: #181828;
  color: #fff;
  font: 700 14px/1.3 'Montserrat', system-ui, sans-serif;
}

.pwa-install-instructions {
  min-height: 252px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 14px;
  background: rgba(9,9,19,.42);
}

.pwa-install-instructions article[hidden] { display: none; }

.pwa-install-device {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--pwa-accent);
  color: #121221;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pwa-install-instructions h3 {
  margin: 0 0 20px;
  font-size: clamp(20px, 3vw, 28px);
}

.pwa-install-instructions ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install-steps;
}

.pwa-install-instructions li {
  position: relative;
  min-height: 26px;
  padding-left: 38px;
  color: var(--pwa-muted);
  font-size: 14px;
  line-height: 1.55;
  counter-increment: install-steps;
}

.pwa-install-instructions li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255,205,48,.24);
  border-radius: 8px;
  color: var(--pwa-accent);
  font-size: 10px;
  font-weight: 900;
  content: counter(install-steps);
}

.pwa-offline-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(255,205,48,.24);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,205,48,.10), rgba(26,26,43,.85));
}

.pwa-offline-panel p {
  color: var(--pwa-muted);
  line-height: 1.7;
}

.pwa-connectivity-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.pwa-connectivity-card {
  padding: 17px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(9,9,19,.38);
}

.pwa-connectivity-card.is-offline {
  border-color: rgba(255,205,48,.32);
  background: rgba(255,205,48,.07);
}

.pwa-connectivity-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
}

.pwa-connectivity-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  color: var(--pwa-muted);
  font-weight: 900;
}

.pwa-connectivity-icon svg {
  display: block;
  width: 19px;
  height: 19px;
}

.is-offline .pwa-connectivity-icon {
  background: var(--pwa-accent);
  color: #121221;
}

.pwa-connectivity-head strong,
.pwa-connectivity-head span {
  display: block;
}

.pwa-connectivity-head .pwa-connectivity-icon {
  display: grid;
}

.pwa-connectivity-head strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.pwa-connectivity-head div > span {
  margin-top: 2px;
  color: var(--pwa-muted);
  font-size: 10px;
}

.pwa-connectivity-card ul {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid rgba(255,255,255,.07);
  list-style: none;
}

.pwa-connectivity-card li {
  position: relative;
  padding-left: 16px;
  color: var(--pwa-muted);
  font-size: 11px;
  line-height: 1.45;
}

.pwa-connectivity-card li::before {
  position: absolute;
  top: .58em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.pwa-connectivity-card.is-offline li::before { background: var(--pwa-accent); }

.pwa-faq {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pwa-faq details {
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.01);
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}

.pwa-faq details:hover,
.pwa-faq details[open] {
  border-color: rgba(255,205,48,.2);
  background: rgba(255,255,255,.02);
}

.pwa-faq details[open] {
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
}

.pwa-faq summary {
  position: relative;
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 12px;
  padding: 22px 62px 22px 24px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  user-select: none;
  cursor: pointer;
}

.pwa-faq summary::-webkit-details-marker {
  display: none;
}

.pwa-faq summary::before {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,205,48,.1);
  color: var(--pwa-accent);
  font-size: 14px;
  font-weight: 900;
  content: '?';
}

.pwa-faq summary::after {
  position: absolute;
  top: calc(50% - 5px);
  right: 28px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--pwa-muted);
  border-bottom: 2px solid var(--pwa-muted);
  content: '';
  transform: rotate(45deg);
  transition: transform .3s cubic-bezier(.4,0,.2,1), border-color .3s ease;
}

.pwa-faq details:hover summary::after {
  border-color: #fff;
}

.pwa-faq details[open] summary::after {
  border-color: var(--pwa-accent);
  transform: rotate(-135deg);
}

.pwa-faq summary:focus-visible {
  outline: 2px solid rgba(255,205,48,.65);
  outline-offset: -3px;
}

.pwa-faq-answer {
  display: block !important;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

.pwa-faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.pwa-faq details[open] .pwa-faq-answer {
  height: auto;
  opacity: 1;
}

.pwa-faq details.is-closing .pwa-faq-answer {
  height: auto;
}

.pwa-faq-answer p {
  padding: 0 62px 24px 60px;
  font-size: 15px;
  line-height: 1.6;
}

.pwa-modal {
  position: fixed;
  z-index: 1000002;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5,5,13,.84);
  backdrop-filter: blur(14px);
}

.pwa-modal.hide { display: none !important; }
body.pwa-dialog-open { overflow: hidden; }

.pwa-modal-card {
  position: relative;
  width: min(100%, 490px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 40px 34px 30px;
  border: 1px solid rgba(255,205,48,.3);
  border-radius: 24px;
  background: #191927;
  color: var(--pwa-text);
  text-align: center;
  box-shadow: 0 30px 90px rgba(0,0,0,.58), 0 0 42px rgba(255,205,48,.08);
}

.pwa-modal-card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pwa-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pwa-muted);
  font-size: 28px;
  cursor: pointer;
}

.pwa-modal-close:hover,
.pwa-modal-close:focus-visible {
  background: rgba(255,255,255,.07);
  color: #fff;
  outline: 2px solid var(--pwa-accent);
}

.pwa-modal-icon {
  display: block;
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.pwa-modal-card h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.16;
}

.pwa-modal-card > p {
  margin: 0;
  color: var(--pwa-muted);
  font-size: 14px;
  line-height: 1.65;
}

.pwa-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.pwa-text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--pwa-muted);
  font: 700 12px/1 'Montserrat', system-ui, sans-serif;
  cursor: pointer;
}

.pwa-text-button:hover,
.pwa-text-button:focus-visible { color: var(--pwa-accent); }

.pwa-final {
  padding-bottom: 120px;
  text-align: center;
}

.pwa-final .pwa-actions {
  justify-content: center;
}

@media (max-width: 820px) {
  .pwa-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 68px; }
  .pwa-card-grid { grid-template-columns: 1fr; }
  .pwa-offline-panel { grid-template-columns: 1fr; }
  .pwa-game-shell::before { padding-top: 470px; }
}

@media (max-width: 700px) {
  .pwa-device-mobile-layout { grid-template-columns: 1fr; }
  .pwa-device-copy { max-width: 520px; margin-inline: auto; }
  .pwa-install-chooser { grid-template-columns: 1fr; }
  .pwa-install-method-list { display: none; }
  .pwa-install-select-label { display: block; }
}

@media (max-width: 540px) {
  .pwa-section,
  .pwa-hero { width: min(100% - 28px, 1160px); }
  .pwa-hero { display: flex; flex-direction: column; gap: 0; text-align: center; }
  .pwa-hero > div:first-child { display: contents; }
  .pwa-hero .pwa-eyebrow {
    order: 1;
    align-self: center;
    justify-content: center;
    margin-inline: auto;
  }
  .pwa-hero h1 { order: 2; }
  .pwa-hero-lead { order: 3; margin-inline: auto; }
  .pwa-hero-visual { order: 4; width: 100%; margin-top: 24px; }
  .pwa-hero .pwa-actions { order: 5; width: 100%; margin-top: 24px; }
  .pwa-section > .pwa-eyebrow {
    display: flex;
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    margin-inline: auto;
    text-align: center;
  }
  .pwa-section > h2 {
    max-width: 18ch;
    margin-inline: auto;
    text-align: center;
  }
  .pwa-section > .pwa-section-intro,
  .pwa-card,
  .pwa-device-copy,
  .pwa-device-caption,
  .pwa-install-select-label,
  .pwa-install-instructions,
  .pwa-offline-panel,
  .pwa-connectivity-card,
  .pwa-faq summary,
  .pwa-faq-answer {
    text-align: left;
  }
  .pwa-offline-panel .pwa-eyebrow {
    display: flex;
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    margin-inline: auto;
    text-align: center;
  }
  .pwa-final > .pwa-section-intro { text-align: center; }
  .pwa-install-grid { grid-template-columns: 1fr; }
  .pwa-actions { display: grid; }
  .pwa-actions .btn-primary,
  .pwa-actions .btn-secondary-outline { width: 100%; padding-inline: 20px; }
  .pwa-device-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pwa-device-tab { min-width: 0; padding-inline: 10px; }
  .pwa-game-shell::before { padding-top: 430px; }
  .pwa-faq summary { min-height: 66px; padding: 18px 48px 18px 18px; font-size: 15px; }
  .pwa-faq summary::after { right: 20px; }
  .pwa-faq-answer p { padding: 0 20px 20px 54px; }
  .pwa-connectivity-map { grid-template-columns: 1fr; }
  .pwa-install-instructions { min-height: 0; padding: 24px 18px; }
  .pwa-modal-card { padding: 34px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pwa-faq-answer { transition: none; }
}
