/* Apps de Raulmar — App Store–style showcase.
   Tokens follow iOS system colors so the page reads as a store in both themes. */

:root {
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --card: #ffffff;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.76);
  --label-3: rgba(60, 60, 67, 0.36);
  --separator: rgba(60, 60, 67, 0.2);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.2);
  --tint: #0066cc;
  --tint-fill: #0066cc;
  --on-tint: #ffffff;
  --chrome: rgba(255, 255, 255, 0.72);
  --chrome-border: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-shot: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  --icon-stroke: rgba(0, 0, 0, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --gutter: 20px;
  --content: 1080px;
  --radius-card: 22px;
  --radius-shot: 18px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-grouped: #000000;
    --card: #1c1c1e;
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.62);
    --label-3: rgba(235, 235, 245, 0.34);
    --separator: rgba(84, 84, 88, 0.6);
    --fill: rgba(118, 118, 128, 0.24);
    --fill-strong: rgba(118, 118, 128, 0.34);
    --tint: #4da3ff;
    --tint-fill: #0068d6;
    --chrome: rgba(30, 30, 32, 0.72);
    --chrome-border: rgba(255, 255, 255, 0.1);
    --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
    --shadow-shot: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
    --icon-stroke: rgba(255, 255, 255, 0.12);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 64px;
}
@media (max-width: 1023px) {
  html { scroll-padding-bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom)); }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.35 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 3px solid var(--tint);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Headings receive focus after a route change; that focus is for screen readers, not a visible ring */
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-110%);
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tint-fill);
  color: var(--on-tint);
  font-weight: 600;
}
.skip-link:focus { transform: translateY(12px); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* ---------- Shell ---------- */

main {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom));
  outline: none;
}

.page {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-left)) 0 max(var(--gutter), env(safe-area-inset-right));
}

/* Mobile: floating capsule tab bar */
.tabs {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 5px;
  border-radius: 999px;
  background: var(--chrome);
  border: 0.5px solid var(--chrome-border);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.tabs__brand,
.tabs__dev { display: none; }
.tabs__list { display: flex; gap: 2px; }
.tabs__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 84px;
  padding: 7px 14px 6px;
  border-radius: 999px;
  color: var(--label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background-color 0.2s, color 0.2s;
}
.tabs__item svg { width: 26px; height: 26px; }
.tabs__item[aria-current="page"] {
  color: var(--tint);
  background: var(--fill);
}

/* Desktop: the tab bar becomes a sidebar, like the Mac App Store */
@media (min-width: 1024px) {
  :root { --sidebar: 248px; --gutter: 40px; }
  main { margin-left: var(--sidebar); padding-bottom: 64px; }
  .tabs {
    left: 0; top: 0; bottom: 0;
    transform: none;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    padding: 22px 14px 18px;
    border-radius: 0;
    border: 0;
    border-right: 0.5px solid var(--separator);
    background: var(--bg-grouped);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .tabs__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 22px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
  }
  .tabs__list { flex-direction: column; gap: 2px; }
  .tabs__item {
    flex-direction: row;
    gap: 12px;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
  }
  .tabs__item svg { width: 22px; height: 22px; color: var(--tint); }
  .tabs__item:hover { background: var(--fill); }
  .tabs__item[aria-current="page"] { background: var(--fill-strong); color: var(--label); }
  .tabs__dev {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding: 10px 12px;
    color: var(--label-2);
    font-size: 13px;
  }
  .tabs__dev svg { width: 16px; height: 16px; }
  .tabs__dev:hover { color: var(--tint); }
}

/* ---------- Large title header ---------- */

.large-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 0 18px;
}
.large-title__date {
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.large-title h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9f0a, #ff375f 55%, #5e5ce6);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
@media (min-width: 1024px) {
  .large-title { padding-top: 44px; padding-bottom: 26px; }
  .large-title h1 { font-size: 40px; }
}

/* ---------- Section headers ---------- */

.section { padding-top: 36px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-top: 0.5px solid var(--separator);
  padding-top: 18px;
}
.section__head--flush { border-top: 0; padding-top: 0; }
.section__head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.section__head p { color: var(--label-2); font-size: 15px; }
.section__sub { color: var(--label-2); font-size: 15px; margin-top: -6px; padding-bottom: 12px; }

/* ---------- App icon ---------- */

.app-icon {
  flex: none;
  width: var(--s, 60px);
  height: var(--s, 60px);
  border-radius: 22.5%;
  object-fit: cover;
  box-shadow: inset 0 0 0 0.5px var(--icon-stroke), 0 0 0 0.5px var(--icon-stroke);
  background: #fff;
}
.app-icon--tile {
  object-fit: contain;
  padding: 12%;
  background: #fff;
}

/* ---------- Buttons ---------- */

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--tint);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform 0.15s var(--ease), background-color 0.2s;
}
.pill:hover { background: var(--fill-strong); }
.pill:active { transform: scale(0.95); }
.pill--filled {
  background: var(--tint-fill);
  color: var(--on-tint);
}
.pill--filled:hover { background: color-mix(in srgb, var(--tint-fill) 88%, #000); }
.pill--on-media {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.pill--on-media:hover { background: rgba(255, 255, 255, 0.34); }
.pill--large { height: 36px; min-width: 96px; font-size: 16px; padding: 0 22px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--tint);
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.2s;
}
.icon-btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.icon-btn:hover { background: var(--fill-strong); }
.icon-btn:active { transform: scale(0.92); }

/* A link that makes its whole card clickable while leaving other links usable */
.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 3px solid var(--tint); outline-offset: 3px; }
.above { position: relative; z-index: 2; }

/* ---------- Lockup (icon + name + subtitle + button) ---------- */

.lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.lockup__text { flex: 1; min-width: 0; }
.lockup__name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lockup__sub {
  color: var(--label-2);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lockup__meta { color: var(--label-2); font-size: 12px; margin-top: 2px; }

/* ---------- Story cards (Destacadas / Featured) ---------- */

.stories {
  display: grid;
  gap: 28px;
}
@media (min-width: 720px) {
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}

.story {
  --theme-deep: color-mix(in oklab, var(--theme) 68%, #000);
  --glow: color-mix(in srgb, var(--theme) 55%, #fff);
  --on-theme: #fff;
  --on-theme-2: rgba(255, 255, 255, 0.92);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(440px, 128vw, 500px);
  border-radius: var(--radius-card);
  background:
    radial-gradient(120% 70% at 85% 0%, var(--glow) 0%, transparent 62%),
    linear-gradient(170deg, var(--theme) 0%, var(--theme-deep) 100%);
  color: var(--on-theme);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.story[data-tone="dark"] {
  --on-theme: #141414;
  --on-theme-2: rgba(20, 20, 20, 0.72);
}
@media (min-width: 720px) { .story { min-height: 540px; } }
@media (hover: hover) {
  .story:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.42); }
}
.story:active { transform: scale(0.985); }

.story__text { padding: 22px 22px 0; }
.story__eyebrow {
  color: var(--on-theme-2);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.story__title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.story__blurb {
  margin-top: 8px;
  color: var(--on-theme-2);
  font-size: 15px;
  line-height: 1.35;
  max-width: 34ch;
  text-wrap: pretty;
}

.story__art {
  position: relative;
  z-index: -1;
  flex: 1 0 auto;
  min-height: 9em; /* always leaves room for the lockup band, even with large text */
  margin-top: 22px;
  pointer-events: none;
}
.story__shot {
  position: absolute;
  width: 46%;
  max-width: 232px;
  aspect-ratio: 390 / 844;
  border-radius: 9% / 4.2%;
  object-fit: cover;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-shot);
  transition: transform 0.5s var(--ease);
}
.story__shot--back {
  left: 6%;
  top: 30px;
  transform: rotate(-7deg);
  filter: saturate(0.92);
}
.story__shot--front {
  right: 7%;
  top: 6px;
  transform: rotate(5deg);
}
@media (hover: hover) {
  .story:hover .story__shot--back { transform: rotate(-9deg) translateY(-6px); }
  .story:hover .story__shot--front { transform: rotate(6deg) translateY(-10px); }
}

.story__lockup {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  padding: 14px 18px 16px;
  background: color-mix(in srgb, var(--theme-deep) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  pointer-events: none;
}
.story__lockup .lockup__name { color: var(--on-theme); }
.story__lockup .lockup__sub { color: var(--on-theme-2); }
.story__lockup .pill { pointer-events: auto; }
.story[data-tone="dark"] .pill--on-media { background: rgba(0, 0, 0, 0.12); color: #141414; }
.story[data-tone="dark"] .pill--on-media:hover { background: rgba(0, 0, 0, 0.2); }

/* The card clips its children, so the focus ring goes on the card itself */
.story:has(.stretched:focus-visible) { outline: 3px solid var(--tint); outline-offset: 3px; }
@media (max-width: 359px) {
  .story__lockup .pill { min-width: 0; padding: 0 14px; }
}

/* ---------- Install card (Destacadas / Featured) ---------- */

.install-card {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--bg-grouped);
}
@media (prefers-color-scheme: dark) { .install-card { background: var(--card); } }
@media (min-width: 720px) {
  .install-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 32px; padding: 18px 24px; }
}
.install-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.install-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 22.5%;
  background: var(--tint-fill);
  color: var(--on-tint);
}
.install-card__icon svg { width: 24px; height: 24px; stroke-width: 2; }
.install-card h2 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
  text-wrap: balance;
}
.install-card__head p {
  margin-top: 2px;
  color: var(--label-2);
  font-size: 14px;
  line-height: 1.35;
  text-wrap: pretty;
}
.install-card__steps {
  display: grid;
  gap: 6px;
  counter-reset: step;
  font-size: 15px;
  line-height: 1.4;
}
.install-card__steps li {
  position: relative;
  padding-left: 30px;
  counter-increment: step;
}
.install-card__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--tint);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Plain list of apps ---------- */

.app-list li {
  position: relative;
  border-radius: 14px;
}
.app-list .lockup { padding: 10px 0; }
.app-list li + li .lockup__body { border-top: 0.5px solid var(--separator); }
.app-list .lockup { align-items: stretch; }
.app-list .app-icon { align-self: center; }
.lockup__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -10px;
  margin-bottom: -10px;
  padding: 10px 0;
}
@media (min-width: 720px) {
  .app-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .app-list li:nth-child(2) .lockup__body { border-top: 0; }
}

/* ---------- Category pages: result cards with screenshots ---------- */

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 900px) { .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }

.result {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: 0 0 0 0.5px var(--separator), 0 8px 24px -16px rgba(0, 0, 0, 0.25);
}
@media (prefers-color-scheme: dark) { .result { box-shadow: none; } }
.result .lockup__name {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.result__shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.result__shots img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  border-radius: 12px;
  background: var(--fill);
  box-shadow: 0 0 0 0.5px var(--separator);
}
.result__blurb {
  margin-top: 12px;
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.4;
}

/* ---------- Product page ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  border-bottom: 0.5px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.navbar.is-scrolled,
.navbar.is-condensed {
  background: var(--chrome);
  border-bottom-color: var(--separator);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.navbar__back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--tint);
  font-size: 17px;
  cursor: pointer;
}
.navbar__back svg { width: 24px; height: 24px; stroke-width: 2.4; }
.navbar__center {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 6px);
  opacity: 0;
  transition: opacity 0.2s, transform 0.25s var(--ease);
  pointer-events: none;
}
.navbar__end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar__open {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s, transform 0.25s var(--ease);
  pointer-events: none;
}
.navbar.is-condensed .navbar__center,
.navbar.is-condensed .navbar__open {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.navbar.is-condensed .navbar__open { transform: none; }
@media (min-width: 1024px) {
  .navbar { padding-left: 24px; padding-right: 32px; }
}

.product { padding-bottom: 8px; }
.product__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 8px 0 22px;
}
.product__header .app-icon { --s: 118px; }
.product__titles { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.product__titles h1 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.product__titles .subtitle {
  margin-top: 3px;
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.3;
}
.product__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}
@media (min-width: 720px) {
  .product__header { gap: 28px; padding-top: 20px; }
  .product__header .app-icon { --s: 168px; }
  .product__titles h1 { font-size: 34px; }
  .product__titles .subtitle { font-size: 19px; }
  .product__actions { justify-content: flex-start; gap: 16px; }
}

/* Facts strip */
.facts {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 12px var(--gutter);
  border-top: 0.5px solid var(--separator);
  border-bottom: 0.5px solid var(--separator);
  scroll-snap-type: x proximity;
}
.facts::-webkit-scrollbar { display: none; }
.facts li {
  flex: 1 0 auto;
  min-width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 2px 14px;
  text-align: center;
  scroll-snap-align: start;
}
.facts li + li { border-left: 0.5px solid var(--separator); }
.facts__k {
  color: var(--label-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.facts__v {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--label-2);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}
.facts__v svg { width: 26px; height: 26px; }
.facts__s { color: var(--label-2); font-size: 12px; white-space: nowrap; }
@media (min-width: 720px) {
  .facts { margin: 0; padding-left: 0; padding-right: 0; }
}

/* Screenshot carousel */
.shots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 14px;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots li { flex: none; width: min(58vw, 236px); scroll-snap-align: start; }
.shot-btn {
  position: relative; /* keeps the visually-hidden label inside the scroller */
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-shot);
  text-align: left;
}
.shot-btn img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  border-radius: var(--radius-shot);
  background: var(--fill);
  box-shadow: 0 0 0 0.5px var(--separator);
  transition: transform 0.25s var(--ease);
}
.shot-btn:active img { transform: scale(0.98); }
.shots figcaption {
  margin-top: 8px;
  padding: 0 2px;
  color: var(--label-2);
  font-size: 13px;
  line-height: 1.3;
}
.shots__more { display: none; }
@media (min-width: 1024px) {
  .shots { margin: 0; padding-left: 0; padding-right: 0; scroll-padding: 0; }
  .shots li { width: calc((100% - 36px) / 4); }
}

/* Prose */
.prose { color: var(--label); font-size: 16px; line-height: 1.5; }
.prose p + p { margin-top: 10px; }
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.more-btn {
  margin-top: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--tint);
  font-size: 16px;
  cursor: pointer;
}
.dev-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 10px 0;
  color: var(--tint);
  font-size: 15px;
}
.dev-link small { display: block; color: var(--label-2); font-size: 13px; }
.dev-link svg { width: 18px; height: 18px; color: var(--label-3); stroke-width: 2.2; }

/* What's new */
.whatsnew__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--label-2);
  font-size: 15px;
  padding-bottom: 8px;
}
.bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.45;
}
.bullets li + li { margin-top: 6px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--tint));
}
.history-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--tint);
  font-size: 15px;
}

/* Features grid */
.features {
  display: grid;
  gap: 10px;
}
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-grouped);
  font-size: 15px;
  line-height: 1.4;
}
@media (prefers-color-scheme: dark) { .features li { background: var(--card); } }
.features svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: -1px;
  color: var(--accent, var(--tint));
  stroke-width: 2.2;
}

/* Install steps */
.install {
  display: grid;
  gap: 10px;
}
@media (min-width: 720px) { .install { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.install li {
  padding: 16px;
  border-radius: 16px;
  border: 0.5px solid var(--separator);
}
.install h3 { font-size: 15px; font-weight: 600; }
.install p { margin-top: 6px; color: var(--label-2); font-size: 14px; line-height: 1.45; }
.install kbd,
.install-card kbd {
  font: inherit;
  font-weight: 600;
  color: var(--label);
}

/* Information list */
.info { font-size: 15px; }
.info div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-top: 0.5px solid var(--separator);
}
.info div:first-child { border-top: 0; }
.info dt { color: var(--label-2); flex: none; }
.info dd { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.info dd a { color: var(--tint); }
@media (min-width: 720px) {
  .info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .info div:nth-child(2) { border-top: 0; }
}

/* More from developer */
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(92%, 320px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 6px;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf li { position: relative; scroll-snap-align: start; }
.shelf .lockup { padding: 6px 0; }
@media (min-width: 1024px) {
  .shelf { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0; padding: 0; }
}

/* Scrollers clip outlines, so draw these focus rings inside the item */
.shots .shot-btn:focus-visible,
.shelf .stretched:focus-visible::after { outline-offset: -3px; }

/* ---------- Footer ---------- */

.footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 0.5px solid var(--separator);
  color: var(--label-2);
  font-size: 13px;
  line-height: 1.5;
}
.footer a { color: var(--tint); }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox[open] { display: flex; flex-direction: column; animation: fade-in 0.2s ease-out; }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 6px 20px;
}
.lightbox__count { font-size: 15px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }
.lightbox .icon-btn { background: rgba(255, 255, 255, 0.16); color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}
.lightbox__track:focus-visible { outline: 2px solid #fff; outline-offset: -6px; border-radius: 12px; }
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  scroll-snap-align: center;
  min-height: 0;
}
.lightbox__slide img {
  max-height: calc(100% - 40px);
  width: auto;
  max-width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: contain;
  border-radius: 22px;
}
.lightbox__slide figcaption { color: rgba(255, 255, 255, 0.82); font-size: 15px; text-align: center; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
}
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
@media (hover: hover) and (min-width: 720px) { .lightbox__nav { display: inline-grid; } }
.lightbox__nav:active { transform: translateY(-50%) scale(0.92); }
.lightbox__nav[disabled] { opacity: 0.3; cursor: default; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(30, 30, 32, 0.92);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 32px; left: calc(50% + var(--sidebar) / 2); } }

/* ---------- Misc ---------- */

.noscript { padding: 40px var(--gutter); }
.noscript ul { margin-top: 16px; display: grid; gap: 10px; }
.noscript a { color: var(--tint); }

.empty { padding: 40px 0; color: var(--label-2); }
.empty a { color: var(--tint); }

@keyframes fade-in { from { opacity: 0; } }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.22s; }
::view-transition-group(hero-icon) { animation-duration: 0.38s; animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Browsers without color-mix(): keep the cards and band solid instead of transparent */
@supports not (color: color-mix(in srgb, red, red)) {
  .story { --theme-deep: var(--theme); --glow: var(--theme); }
  .story__lockup { background: rgba(0, 0, 0, 0.35); }
  .pill--filled:hover { background: var(--tint-fill); }
}
