.ttc-app-page [hidden] { display: none !important; }
.app-masthead {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden; align-items: stretch; border-radius: var(--ttc-hub-radius);
  background: #482767; color: #fff;
}
.app-masthead-copy { align-self: center; padding: clamp(23px, 4vw, 48px); }
.app-masthead-copy > h1 {
  margin: 0; font-size: clamp(2.1rem, 5vw, 3.65rem); font-weight: 900;
  line-height: 1.04; letter-spacing: -.045em; text-wrap: balance;
}
.app-masthead-copy p { margin: 10px 0 0; max-width: 42ch; color: #f3eafc; }
.app-masthead-copy .app-masthead-line { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 760; color: #fff; }
.app-masthead-copy .app-store-link { display: inline-flex; margin-top: 19px; }
.app-masthead-copy .app-masthead-trust { font-size: .875rem; }
.app-masthead-peek { position: relative; min-width: 0; }
.app-masthead-peek img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: left center;
}
.app-gallery-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.app-gallery :is(button, a):focus-visible, .app-masthead a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.app-gallery button {
  padding: 7px 13px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-strong); color: var(--text); font: inherit; font-weight: 730; cursor: pointer;
}
.app-gallery-tabs button[aria-selected="true"] { background: #7139a2; border-color: transparent; color: #fff; }
.app-gallery-slide {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  min-height: 0; margin-bottom: 12px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--ttc-hub-radius); background: var(--surface-strong);
}
.app-gallery-copy { align-self: center; padding: clamp(20px, 4vw, 44px); }
.app-gallery-kicker { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .07em; font-size: .8rem; font-weight: 850; color: var(--app-kicker-ink, var(--ttc-feature)); }
:root[data-theme="dark"] .app-gallery-kicker { color: color-mix(in srgb, var(--app-kicker-ink, var(--ttc-feature)) 58%, white); }
.app-gallery-copy h3 { margin: 0 0 9px; color: var(--text); font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.12; letter-spacing: -.033em; text-wrap: balance; }
.app-gallery-copy p:not(.app-gallery-kicker) { margin: 0; max-width: 43ch; color: var(--secondary); }
.ttc-app-page .app-gallery-copy .text-link { text-decoration: none; }
.app-gallery-copy .text-link span { flex: none; }
/* Native Dex, Battle, Team Builder, and Learning accents for screenshot stages. */
.app-gallery-slide.app-dex { --app-screen-ink: #e62829; --app-kicker-ink: #bd2025; }
.app-gallery-slide.app-build { --app-screen-ink: #5db4c8; }
.app-gallery-slide.app-learn { --app-screen-ink: #3e792e; }
.app-gallery-slide:is(.hub-matchups, .hub-circuit, .hub-gambit) {
  --app-kicker-ink: var(--ttc-feature-ink);
  --app-screen-ink: var(--ttc-feature);
}
:root[data-theme="dark"] .app-gallery-slide:is(.hub-matchups, .hub-circuit, .hub-gambit) .app-gallery-kicker {
  color: var(--ttc-feature-ink);
}
.app-summary-band#pro { --ttc-feature: #7139a2; }
.app-gallery-screen {
  position: relative;
  min-width: 0;
  min-height: clamp(280px, 27vw, 322px);
  overflow: hidden;
  background-color: color-mix(in srgb, var(--app-screen-ink, var(--ttc-feature)) 84%, #171421);
  background-image: url('/assets/matchup-matrix.svg?v=neutral');
  background-position: center top;
  background-size: 198px 198px;
}
.app-gallery-screen .theme-shot {
  position: absolute; inset: 14px auto auto 50%; transform: translateX(-50%);
  width: min(74%, clamp(206px, 25vw, 264px)); aspect-ratio: 519 / 1060;
}
.app-gallery-controls { display: flex; align-items: center; gap: 10px; justify-content: center; }
.app-gallery-counter { min-width: 4ch; text-align: center; font-variant-numeric: tabular-nums; color: var(--secondary); }
.app-gallery-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-review-grid-current { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ttc-hub-gap); }
.app-review-grid-current figure {
  display: flex; flex-direction: column; gap: 8px; padding: clamp(14px, 2.5vw, 23px);
  border: 1px solid var(--line); border-radius: var(--ttc-hub-radius); background: var(--surface-strong);
}
.app-review-grid-current .app-review-stars { letter-spacing: .07em; }
.app-review-grid-current .app-review-stars[data-star-type="grass"] { color: #3fa129; }
.app-review-grid-current .app-review-stars[data-star-type="fire"] { color: #e62829; }
.app-review-grid-current .app-review-stars[data-star-type="water"] { color: #2980ef; }
.app-review-grid-current figcaption { margin-top: auto; }
.app-summary-panel.app-summary-band { border-top-width: 1px; padding: 0; overflow: hidden; }
.app-summary-band > h2 {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  margin: 0; padding: 11px clamp(14px, 2.5vw, 23px); background: var(--ttc-feature); color: #fff;
}
.app-summary-band > h2 svg { flex: none; }
.app-summary-band-copy { padding: clamp(14px, 2.5vw, 23px); }
@media (max-width: 740px) {
  .app-masthead { grid-template-columns: minmax(0, 1fr); }
  /* Give the mobile grid row a definite height and crop the in-flow image from below. */
  .app-masthead-peek { height: clamp(185px, 64vw, 470px); overflow: hidden; }
  .app-masthead-peek img { position: static; height: auto; }
  .app-review-grid-current { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 570px) {
  .app-gallery-slide { grid-template-columns: minmax(0, 1fr); }
  .app-gallery-screen { min-height: clamp(220px, 65vw, 265px); background-size: 168px 168px; }
  .app-gallery-screen .theme-shot { width: min(66%, 230px); }
  .app-gallery-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-gallery-tabs button { padding-inline: 6px; }
}
