.app-page {
  background: #f8fcfe;
  --app-blue: #187eaa;
}

.app-page .btn-primary { background: var(--app-blue); }
.app-page .btn-primary:hover { background: #11688f; }
.app-page .btn-secondary { color: #186f95; background: #fff; border: 1px solid #c7e2ed; }
.app-page :is(button, a):focus-visible { outline: 3px solid #1479a1; outline-offset: 5px; }
.app-page [hidden] { display: none !important; }
.app-page section[id] { scroll-margin-top: 100px; }
.app-page .section { padding-block: clamp(48px, 7vw, 84px); }
.app-page .section-heading { max-width: 720px; }
.app-page .section-heading h2 { letter-spacing: -.025em; }
.app-kicker { color: #187ba2; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; font-size: .76rem; margin: 0 0 16px; }
.app-skip { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 12px 20px; background: #fff; color: #18313f; transform: translateY(-160%); }
.app-skip:focus { transform: none; }
.app-hero { padding: 48px 0 0; }
.app-hero-copy { text-align: center; max-width: 800px; margin-inline: auto; }
.app-hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.12; letter-spacing: -.04em; margin-bottom: 22px; }
.app-hero h1 span { color: var(--app-blue); }
.app-hero .subline { margin: 0 auto 26px; max-width: 660px; }
.app-hero .btn-row { justify-content: center; }
.app-hero-art { margin: 40px 0 0; border-radius: 26px; overflow: hidden; box-shadow: 0 16px 50px #1d567a12; border: 1px solid #e0eef6; }
.app-hero-art img { width: 100%; height: auto; }
.app-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 29px 0; border-bottom: 1px solid #dceaf1; }
.app-facts p { margin: 0; text-align: center; color: var(--muted); font-size: .94rem; }
.app-facts strong { display: block; color: var(--text); font-size: 1.04rem; }
.app-section-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.app-section-top .section-heading { margin-bottom: 28px; }
.app-section-top .section-intro { margin-bottom: 0; }
.app-section-note { color: var(--muted); font-size: .88rem; margin-bottom: 30px; white-space: nowrap; }
.app-game-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.app-game-tabs a { display: flex; flex-direction: column; gap: 8px; padding: 16px 10px; text-decoration: none; text-align: center; font-size: .88rem; line-height: 1.3; font-weight: 700; color: #526773; border: 1px solid #dce7ed; border-radius: 14px; background: #fff; }
.app-game-tabs a span { color: #7d8f98; font-size: .7rem; letter-spacing: .12em; }
.app-game-tabs a:hover { border-color: #8bb9cf; }
.app-game-tabs a[aria-selected="true"] { background: #e4f2f9; border-color: #4097bc; color: #155e80; box-shadow: inset 0 -3px #4097bc; }
.app-game-panel { --game-accent: #267ead; --game-bg: #eaf5fc; display: grid; grid-template-columns: 1.08fr 1fr; border: 1px solid #dde9ef; border-radius: 26px; overflow: hidden; background: #fff; margin-bottom: 24px; }
.app-game-panel[data-color="gold"] { --game-accent: #95670c; --game-bg: #fff7dc; }
.app-game-panel[data-color="purple"] { --game-accent: #7549a4; --game-bg: #f2edfa; }
.app-game-panel[data-color="green"] { --game-accent: #327a49; --game-bg: #edf7ed; }
.app-game-panel[data-color="orange"] { --game-accent: #a35417; --game-bg: #fff1e4; }
.app-game-copy { padding: clamp(26px, 4vw, 50px); align-self: center; }
.app-game-copy .app-kicker { color: var(--game-accent); }
.app-game-copy h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.03em; margin-bottom: 16px; }
.app-game-copy > p:not(.app-kicker) { color: var(--muted); margin: 0 0 22px; }
.app-game-copy ul { display: grid; gap: 13px; padding-left: 20px; margin: 0 0 25px; color: #405968; }
.app-game-copy li::marker { color: var(--game-accent); }
.app-learning { border-top: 1px solid #e4edf2; padding-top: 18px; font-size: .92rem; color: #526773; }
.app-learning strong { display: block; color: var(--game-accent); margin-bottom: 4px; }
.app-inline-link { color: #176f96; font-weight: 700; text-underline-offset: 4px; }
.app-gallery { margin: 0; background: var(--game-bg); padding: 25px 22px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; }
.app-gallery-slides { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; width: 100%; justify-items: center; }
.app-gallery.is-enhanced .app-gallery-slides { display: block; width: auto; }
.app-screenshot-link { display: block; width: 216px; max-width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 12px 30px #183c5526; border: 5px solid #fff; background: #f5faff; cursor: zoom-in; }
.app-screenshot-link img { width: 100%; height: auto; }
.app-gallery-controls { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.app-gallery-controls button { min-width: 36px; min-height: 36px; padding: 5px; font: inherit; font-size: .82rem; border: 1px solid #bdd1dd; border-radius: 50%; color: #385969; background: #ffffffb3; cursor: pointer; }
.app-gallery-controls button[aria-pressed="true"] { background: #234f66; border-color: #234f66; color: #fff; }
.app-gallery figcaption { text-align: center; color: #526773; font-size: .78rem; margin-top: 12px; }
.app-gallery-status { display: block; margin-bottom: 2px; }
.app-demo-strip { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 25px 30px; border: 1px solid #d9e8ef; border-radius: 18px; }
.app-demo-strip h3 { margin-bottom: 5px; font-size: 1.15rem; }
.app-demo-strip p { color: var(--muted); margin: 0; }
.app-demo-strip .btn { flex-shrink: 0; }
.app-progress-section { background: #eaf5fa; border-block: 1px solid #daeaf2; }
.app-progress-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(35px, 7vw, 100px); align-items: center; }
.app-progress-visual { position: relative; padding: 24px; display: flex; justify-content: center; background: #d9edf5; border-radius: 50% 50% 28px 28px; }
.app-progress-visual .app-screenshot-link { max-width: 220px; transform: rotate(-3deg); }
.app-progress-copy h2 { max-width: 440px; }
.app-progress-copy > p { color: var(--muted); }
.app-numbered-list { padding: 0; margin: 28px 0 0; list-style: none; display: grid; gap: 22px; counter-reset: steps; }
.app-numbered-list li { position: relative; padding-left: 50px; counter-increment: steps; color: var(--muted); }
.app-numbered-list li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 1px; color: #267b9c; font-size: .85rem; font-weight: 750; border-bottom: 2px solid #8bbfd2; padding-bottom: 5px; }
.app-numbered-list strong { display: block; color: var(--text); margin-bottom: 4px; }
.app-support-art { margin: 32px 0; border-radius: 24px; overflow: hidden; border: 1px solid #ddeaf1; }
.app-support-art img { width: 100%; height: auto; }
.app-support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.app-support-copy { padding: 14px 4px; }
.app-support-copy h3 { font-size: 1.35rem; }
.app-support-copy p { color: var(--muted); }
.app-support-copy ul { display: grid; gap: 9px; padding-left: 20px; color: #405968; }
.app-premium { border-left: 1px solid #dce8ef; padding-left: 38px; }
.app-premium-label { display: inline-block; color: #87551b; background: #fff0d7; border-radius: 6px; padding: 3px 9px; font-size: .75rem; font-weight: 750; margin-bottom: 13px; }
.app-philosophy { background: #fff; border-block: 1px solid #e0edf3; }
.app-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 34px; }
.app-principles article { border-top: 3px solid #b9ddea; padding-top: 22px; }
.app-principles article:nth-child(2) { border-color: #f3cf88; }
.app-principles article:nth-child(3) { border-color: #b6d9b7; }
.app-principles h3 { font-size: 1.15rem; margin-bottom: 10px; }
.app-principles p { color: var(--muted); margin: 0; }
.app-download { text-align: center; padding: 64px 28px; margin: 65px auto; border-radius: 28px; background: #173f57; color: #fff; }
.app-download .app-kicker { color: #a5d9ee; }
.app-download h2 { margin-bottom: 18px; }
.app-download > p:not(.app-kicker) { max-width: 570px; margin: 0 auto 24px; color: #d1e6ef; }
.app-download .btn-row { justify-content: center; }
.app-download .btn-primary { background: #fff; color: #174b64; box-shadow: none; }
.app-download .btn-secondary { background: transparent; color: #fff; border-color: #7599ab; }
.app-lightbox { max-width: min(94vw, 1100px); max-height: 94dvh; border: 0; padding: 54px 18px 14px; border-radius: 18px; background: #f8fcfe; color: var(--text); }
.app-lightbox::backdrop { background: #102b41d9; }
.app-lightbox img { width: auto; max-width: 100%; height: auto; max-height: calc(94dvh - 114px); margin: auto; object-fit: contain; }
.app-lightbox p { margin: 12px 0 0; font-size: .85rem; text-align: center; }
.app-lightbox-close { position: absolute; top: 8px; right: 10px; border: 1px solid #c6dce6; border-radius: 8px; padding: 8px 12px; font: inherit; background: #fff; cursor: pointer; }
html.app-lightbox-open { overflow: hidden; }

@media (max-width: 820px) {
  .app-game-tabs { grid-template-columns: repeat(3, 1fr); }
  .app-game-tabs a { flex-direction: row; align-items: center; justify-content: center; padding: 14px 8px; }
  .app-section-note { display: none; }
  .app-game-panel { grid-template-columns: 1fr 1fr; }
  .app-game-copy { padding: 25px; }
  .app-progress-grid { gap: 36px; }
  .app-facts { gap: 14px; }
}

@media (max-width: 600px) {
  .app-hero { padding-top: 24px; }
  .app-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .app-hero-art { border-radius: 14px; margin-top: 30px; }
  .app-facts { grid-template-columns: 1fr; gap: 13px; padding-block: 23px; }
  .app-facts p { font-size: .85rem; }
  .app-facts strong { display: inline; font-size: .9rem; margin-right: 5px; }
  .app-game-tabs { gap: 6px; }
  .app-game-tabs a { font-size: .78rem; flex-direction: column; gap: 4px; padding: 12px 4px; }
  .app-game-panel { grid-template-columns: 1fr; border-radius: 20px; }
  .app-game-copy { padding: 28px 23px; }
  .app-gallery { padding: 24px 20px 18px; }
  .app-screenshot-link { max-width: 210px; }
  .app-gallery-controls button { min-width: 42px; min-height: 42px; }
  .app-demo-strip { align-items: stretch; flex-direction: column; padding: 23px; }
  .app-progress-grid { grid-template-columns: 1fr; }
  .app-progress-copy { order: -1; }
  .app-progress-visual { width: 90%; margin: 12px auto 0; }
  .app-progress-visual .app-screenshot-link { max-width: 200px; }
  .app-support-grid, .app-principles { grid-template-columns: 1fr; gap: 22px; }
  .app-support-art { margin-block: 25px; border-radius: 14px; }
  .app-premium { border-left: 0; border-top: 1px solid #dce8ef; padding: 28px 4px 0; }
  .app-download { margin-block: 40px; padding: 40px 22px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-page *, .app-page *::before, .app-page *::after { transition: none !important; }
}
