@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --surface: #f6f7f8;
  --raised: #fff;
  --ink: #202124;
  --muted: #54585d;
  --rule: #dedfe1;
  --outline: #b5b7ba;
  --accent: #b52b27;
  --on-accent: #fff;
  --accent-hover: #91231f;
  --focus: #236cb3;
  font-family: Roboto, "DM Sans", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17181a;
  --surface: #232426;
  --raised: #202123;
  --ink: #f4f4f4;
  --muted: #c1c3c6;
  --rule: #3c3e42;
  --outline: #676a6e;
  --accent: #ffaaa0;
  --on-accent: #45120d;
  --accent-hover: #ffc1b9;
  --focus: #a5caff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #17181a;
    --surface: #232426;
    --raised: #202123;
    --ink: #f4f4f4;
    --muted: #c1c3c6;
    --rule: #3c3e42;
    --outline: #676a6e;
    --accent: #ffaaa0;
    --on-accent: #45120d;
    --accent-hover: #ffc1b9;
    --focus: #a5caff;
  }
}


* { box-sizing: border-box; }
body { min-width: 0; margin: 0; font-size: 1rem; line-height: 1.5; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 4vw, 3.4rem); font-weight: 650; letter-spacing: -.045em; }
h2 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 650; letter-spacing: -.03em; }
h3 { font-size: 1.075rem; font-weight: 650; letter-spacing: -.01em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[id] { scroll-margin-top: 1rem; }
[hidden], .icon-library { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 2; padding: .65rem 1rem; border-radius: .4rem; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: .5rem; }
.wrap { width: min(calc(100% - 3rem), 71rem); margin-inline: auto; }
.icon, .feature-icon { width: 1.25rem; height: 1.25rem; flex: none; }

.site-header { border-bottom: 1px solid var(--rule); }
.nav, .brand, .nav-links, .nav-tools, .github-link, .theme-toggle { display: flex; align-items: center; }
.nav { min-height: 4.25rem; gap: clamp(1.5rem, 5vw, 4.5rem); }
.brand { gap: .5rem; width: fit-content; color: var(--ink); font-size: 1.3rem; font-weight: 700; letter-spacing: -.055em; text-decoration: none; }
.brand img { width: 1.42em; height: auto; }
.nav-links { align-self: stretch; gap: clamp(1rem, 2.5vw, 2rem); }
.nav-links a { display: flex; align-items: center; min-height: 44px; border-bottom: 3px solid transparent; padding-top: 3px; color: var(--muted); font-size: .94rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links a:hover { color: var(--ink); }
.nav-tools { gap: .25rem; margin-left: auto; }
.github-link, .theme-toggle { width: 44px; height: 44px; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.github-link:hover, .theme-toggle:hover { background: var(--surface); color: var(--ink); }
.sun, [data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: inline; }

.app-listing {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  column-gap: 2rem; row-gap: 1.8rem; padding-block: clamp(2rem, 4.3vw, 3.75rem) 1.8rem;
}
.app-identity { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.75rem); min-width: 0; }
.app-icon { width: clamp(4.5rem, 10vw, 7.25rem); height: auto; flex: none; border-radius: 23%; }
.developer-link { display: inline-block; margin-top: .18rem; color: var(--accent); font-size: 1rem; font-weight: 650; text-decoration: none; }
.app-description { margin-top: .4rem; color: var(--muted); font-size: 1.05rem; }
.listing-actions { display: grid; gap: .55rem; min-width: 12.75rem; }
.button, .viewer-controls button, .viewer-close {
  display: inline-flex; align-items: center; justify-content: center; gap: .48rem;
  min-height: 44px; padding: .62rem 1.2rem; border: 1px solid transparent; border-radius: .55rem;
  color: var(--on-accent); background: var(--accent); font-size: .94rem; font-weight: 650;
  text-decoration: none; text-align: center; line-height: 1.35;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button.secondary, .upi-copy, .viewer-controls button, .viewer-close { color: var(--ink); border-color: var(--outline); background: var(--paper); }
.button.secondary:hover, .upi-copy:hover, .viewer-controls button:hover, .viewer-close:hover { background: var(--surface); }
.text-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.app-facts { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: .85rem 0; }
.app-facts > div { padding: 0 clamp(.85rem, 2.2vw, 2rem); border-left: 1px solid var(--rule); }
.app-facts > div:first-child { padding-left: 0; border-left: 0; }
.app-facts dt { color: var(--muted); font-size: .875rem; }
.app-facts dd { margin-top: .1rem; color: var(--ink); font-size: 1rem; font-weight: 600; }
.app-facts a { color: inherit; }

.screenshots, .features, .tv-section, .install { border-top: 1px solid var(--rule); padding-block: clamp(1.65rem, 3.5vw, 2.6rem); }
.screenshot-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10rem, 1fr);
  gap: clamp(.65rem, 1.25vw, 1rem); overflow-x: auto; overscroll-behavior-x: contain;
  list-style: none; margin: .9rem -.28rem 0; padding: .28rem; scroll-snap-type: x proximity;
}
.screenshot-strip li { min-width: 0; scroll-snap-align: start; }
.screenshot { display: block; border-radius: .75rem; color: var(--muted); text-decoration: none; }
.screenshot img { width: 100%; height: auto; aspect-ratio: 632 / 1390; object-fit: contain; background: #101112; border-radius: .75rem; border: 1px solid var(--rule); }
.screenshot span { display: block; margin-top: .55rem; font-size: .9rem; font-weight: 550; }
.screenshot:hover { color: var(--ink); }
.screenshot-viewer { width: min(32rem, calc(100% - 1.25rem)); max-height: calc(100% - 1.25rem); padding: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: .85rem; }
.screenshot-viewer::backdrop { background: rgb(8 11 14 / 74%); }
.viewer-head, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.viewer-head form { margin: 0; }
.viewer-image { display: block; width: auto; max-width: 100%; height: auto; max-height: min(68vh, 49rem); margin: .7rem auto; object-fit: contain; border-radius: .45rem; touch-action: pan-y pinch-zoom; }
.viewer-position { color: var(--muted); font-size: .9rem; }
.viewer-controls button, .viewer-close { padding: .45rem .85rem; }

.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8rem; margin-top: 1.3rem; }
.feature-list article { display: flex; align-items: flex-start; gap: .75rem; }
.feature-icon { margin-top: .1rem; color: var(--accent); }
.feature-list p, .intro, .install-intro, .build-info p, .guide-section p, .guide-steps, .maker-story p, .support-panel p { color: var(--muted); line-height: 1.6; }
.feature-list p { margin-top: .45rem; }
.tv-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.intro { margin-top: .75rem; max-width: 58ch; }
.tv-stage img { width: 100%; height: auto; border-radius: .75rem; border: 1px solid var(--rule); }
.tv-install-actions, .build-links, .support-shortcuts, .guide-jumps { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem 1.25rem; }
.tv-copy .tv-install-actions { margin-top: 1.1rem; }
.file-meta { margin-block: .55rem .75rem; color: var(--muted); font-size: .875rem; }
.release-origin { color: inherit; }
.install-intro { max-width: 76ch; margin-top: .65rem; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.35rem; }
.platform-download, .support-panel { border: 1px solid var(--rule); border-radius: .8rem; background: var(--raised); padding: clamp(1rem, 2.2vw, 1.65rem); min-width: 0; }
.platform-download h3, .support-method h3 { font-size: 1.2rem; }
.build-label { margin-top: 1.3rem; color: var(--ink); font-weight: 600; }
.smaller-builds, .star-sources { padding: 0; list-style: none; }
.smaller-builds li { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding-block: .38rem; border-bottom: 1px solid var(--rule); }
.smaller-builds span, .checksums, .release-notes, .build-links { font-size: .9rem; }
.smaller-builds span { color: var(--muted); flex: none; }
.release-notes { display: inline-block; margin-top: .8rem; }
.checksums { margin-top: 1rem; }
.checksums summary { width: fit-content; min-height: 44px; align-content: center; cursor: pointer; color: var(--ink); font-weight: 600; }
.checksums dl div + div { margin-top: .65rem; }
.checksums code, .guide-steps samp { overflow-wrap: anywhere; }
.checksums dd { color: var(--muted); }
.build-info { max-width: 78ch; margin-top: 1.5rem; padding-left: 1rem; border-left: 3px solid var(--rule); }
.build-info p { margin-top: .45rem; }
.build-links { margin-top: .6rem; }

.site-footer { margin-top: 1rem; border-top: 1px solid var(--rule); }
.footer-row { display: flex; gap: 1.5rem 3rem; justify-content: space-between; padding-block: 1.65rem; }
.maker-credit p, .star-sources, #project-stars h2 { font-size: .94rem; }
.maker-credit p { color: var(--muted); margin-top: .35rem; }
#project-stars h2 { letter-spacing: normal; }
.star-sources { margin-top: .3rem; }

.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem); gap: clamp(1.5rem, 7vw, 6rem); align-items: start; padding-block: clamp(2rem, 4.5vw, 3.8rem); }
.support-note h1, .tv-guide h1 { font-size: clamp(2rem, 3.8vw, 3rem); }
.support-shortcuts { margin-block: .45rem 1.2rem; }
.maker-story { max-width: 65ch; border-top: 1px solid var(--rule); padding-top: 1.3rem; }
.maker-story p { margin-top: .85rem; }
.maker-signature { margin-top: 1.25rem; font-weight: 600; }
.support-panel { background: var(--surface); }
.support-panel p { margin-top: .5rem; }
.support-method { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--rule); }
.support-method .button { margin-top: .6rem; }
.support-method h3 span { color: var(--muted); margin-left: .35rem; font-weight: 400; font-size: .94rem; }
.upi-id { display: block; width: 100%; padding: .55rem .75rem; margin-top: .7rem; border: 1px solid var(--outline); border-radius: .45rem; background: var(--paper); color: var(--ink); }
.upi-qr { width: 11.5rem; height: auto; margin-top: 1rem; border: 1px solid var(--rule); border-radius: .5rem; }
.copy-status { font-size: .9rem; }
.copy-status:empty { display: none; }

.tv-guide { padding-bottom: 2rem; }
.tv-guide-intro, .guide-section { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: clamp(1.5rem, 5vw, 5rem); }
.tv-guide-intro { align-items: center; padding-block: clamp(2rem, 4vw, 3rem); }
.tv-guide-intro .tv-stage { width: min(100%, 31rem); justify-self: end; }
.guide-jumps { margin-top: 1rem; }
.guide-jumps a { display: inline-flex; align-items: center; min-height: 44px; font-size: .94rem; font-weight: 600; }
.guide-section { padding-block: clamp(1.6rem, 3vw, 2.5rem); border-top: 1px solid var(--rule); }
.guide-section p { max-width: 65ch; margin-top: .65rem; }
.guide-section .button { margin-top: 1.1rem; }
.guide-steps { padding-left: 1.5rem; }
.guide-steps li { padding-left: .2rem; }
.guide-steps li + li { margin-top: .9rem; }
.guide-steps strong, .guide-steps b, .guide-settings strong, .guide-settings b, .guide-steps li::marker { color: var(--ink); }
.guide-settings p + h3 { margin-top: 1.4rem; }

@media (max-width: 840px) {
  .feature-list { grid-template-columns: 1fr; gap: 1.2rem; max-width: 70ch; }
  .app-facts { row-gap: .65rem; }
  .support-layout { grid-template-columns: minmax(0, 1fr) minmax(15rem, .7fr); gap: 1.5rem; }
}
@media (max-width: 700px) {
  .wrap { width: min(calc(100% - 2rem), 71rem); }
  .app-listing { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; }
  .listing-actions { grid-row: 3; display: flex; flex-wrap: wrap; gap: .55rem; min-width: 0; }
  .app-facts { grid-row: 2; }
  .app-facts > div { padding-inline: .9rem; }
  .tv-section, .platform-grid, .support-layout, .tv-guide-intro, .guide-section { grid-template-columns: 1fr; }
  .tv-guide-intro .tv-stage { justify-self: start; }
  .support-layout { gap: 2rem; }
  .support-panel { max-width: 32rem; width: 100%; }
  .footer-row { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .nav { display: grid; min-height: auto; grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
  .nav .brand { min-height: 3.15rem; }
  .nav-tools { grid-column: 2; grid-row: 1; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; gap: 1.5rem; }
  .app-listing { padding-top: 1.6rem; }
  .app-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 0; }
  .app-facts > div { padding-inline: .65rem; }
  .app-facts > div:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
}
@media (max-width: 440px) {
  .listing-actions { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .app-identity { gap: .8rem; }
  .app-description { font-size: 1rem; }

  .nav-links { gap: 1.1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll(root block)) {
    .home-page::before {
      content: ""; position: fixed; inset: 0 0 auto; height: 2px; z-index: 1;
      background: var(--accent); pointer-events: none; transform-origin: left;
      animation: page-progress auto linear both;
      animation-timeline: scroll(root block);
    }
  }

  .app-icon { animation: app-float 2.4s ease-in-out 2; }

  .screenshot { animation: thumbnail-arrive 220ms ease-out backwards; }
  .screenshot-strip li:nth-child(2) .screenshot { animation-delay: 45ms; }
  .screenshot-strip li:nth-child(3) .screenshot { animation-delay: 90ms; }
  .screenshot-strip li:nth-child(4) .screenshot { animation-delay: 135ms; }
  .screenshot-strip li:nth-child(5) .screenshot { animation-delay: 180ms; }

  .viewer-image[data-direction] { --slide-offset: 12px; animation: viewer-arrive 150ms ease-out; }
  .viewer-image[data-direction="previous"] { --slide-offset: -12px; }

  .screenshot img, .button[data-apk] .icon { transition: transform 180ms ease-out; }
  .screenshot:focus-visible img { transform: translateY(-3px); }
  .button[data-apk]:focus-visible .icon { transform: translateY(2px); }
  @media (hover: hover) {
    .screenshot:hover img { transform: translateY(-3px); }
    .button[data-apk]:hover .icon { transform: translateY(2px); }
  }

  @supports (animation-timeline: view()) {
    .tv-section .tv-stage {
      animation: tv-arrive auto ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}
@keyframes page-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes thumbnail-arrive {
  from { opacity: .85; transform: translateY(3px); }
}
@keyframes viewer-arrive {
  from { transform: translateX(var(--slide-offset)); }
}
@keyframes app-float {
  50% { transform: translateY(-4px) rotate(-2deg); }
}
@keyframes tv-arrive {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}
