:root {
  color-scheme: dark;
  --background: #0f1621;
  --surface: #161f2e;
  --line: #2b3a52;
  --text: #e8eef6;
  --muted: #9fb0c4;
  --accent: #6ee7dc;
  --accent-strong: #8df1e8;
  --content-width: 1080px;
  --text-width: 740px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: #bcfff9;
}

a:focus-visible,
.project-detail summary:focus-visible {
  border-radius: 5px;
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.text-shell {
  width: min(var(--text-width), calc(100% - 48px));
  margin-inline: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 40px 0 64px;
}

.app-icon {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 28px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 78px);
  font-weight: 350;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 600;
  line-height: 1.35;
}

.hero-copy {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.store-status {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border: 1px solid rgba(110, 231, 220, 0.45);
  border-radius: 11px;
  background: rgba(110, 231, 220, 0.1);
  color: var(--accent-strong);
  padding: 10px 16px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.store-status:hover {
  border-color: rgba(110, 231, 220, 0.75);
  background: rgba(110, 231, 220, 0.16);
  color: #bcfff9;
}

.requirements {
  color: var(--muted);
  font-size: 14px;
}

.intro-section {
  border-top: 1px solid var(--line);
  padding: 54px 0 14px;
}

.intro-section p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 2.3vw, 23px);
}

.section {
  padding: 62px 0 0;
}

.section-heading {
  margin: 0 0 22px;
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 450;
}

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

.shot {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #0d1926;
}

.shot-image-link {
  display: block;
  cursor: zoom-in;
}

.shot-image-link:focus-visible {
  border-radius: 14px 14px 0 0;
  outline-offset: -5px;
}

.shot figcaption {
  min-height: 66px;
  padding: 15px 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.shot strong {
  color: var(--text);
  font-weight: 650;
}

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

.feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 22px;
}

.feature h3 {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 500;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.project-details {
  display: grid;
  gap: 12px;
  margin-bottom: 48px;
}

.project-detail {
  overflow: hidden;
  scroll-margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.project-detail[open],
.project-detail:target {
  border-color: rgba(110, 231, 220, 0.45);
}

.project-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 16px 20px;
  cursor: pointer;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
  font-weight: 500;
  list-style: none;
}

.project-detail summary::-webkit-details-marker {
  display: none;
}

.project-detail summary:focus-visible {
  outline-offset: -4px;
}

.project-detail summary h3 {
  margin: 0;
  color: inherit;
  font: inherit;
}

.project-detail summary::after {
  content: "+";
  color: var(--accent);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.project-detail[open] summary::after {
  content: "-";
}

.project-detail-content {
  border-top: 1px solid var(--line);
  padding: 22px 20px 24px;
}

.project-detail-content h4 {
  margin: 28px 0 9px;
  font-size: 18px;
  font-weight: 500;
}

.project-detail-content h4:first-child,
.project-detail-content > :first-child {
  margin-top: 0;
}

.project-detail-content p,
.project-detail-content li {
  color: var(--muted);
}

.project-detail-content p,
.project-detail-content ul {
  margin: 0 0 16px;
}

.project-detail-content > :last-child {
  margin-bottom: 0;
}

.project-detail-content ul {
  padding-left: 24px;
}

.effective-date {
  color: var(--accent) !important;
  font-size: 14px;
  font-weight: 600;
}

.notice {
  border: 1px solid rgba(110, 231, 220, 0.32);
  border-radius: 14px;
  background: rgba(110, 231, 220, 0.08);
  padding: 20px;
  color: var(--text) !important;
}

address {
  font-style: normal;
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  overflow-wrap: anywhere;
  padding: 2px 5px;
  font-size: 0.88em;
  word-break: break-word;
}

@media (max-width: 800px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .shot figcaption {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell,
  .text-shell {
    width: min(100% - 32px, var(--content-width));
  }

  .site-nav {
    align-items: flex-start;
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .hero {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
      "icon title"
      "icon tagline"
      "copy copy"
      "actions actions";
    align-items: center;
    column-gap: 20px;
    row-gap: 0;
    padding: 36px 0 40px;
  }

  .hero > div {
    display: contents;
  }

  .app-icon {
    grid-area: icon;
    align-self: start;
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero h1 {
    grid-area: title;
    align-self: end;
    font-size: clamp(35px, 10vw, 48px);
  }

  .tagline {
    grid-area: tagline;
    align-self: start;
    margin-top: 4px;
  }

  .hero-copy {
    grid-area: copy;
    margin-top: 18px;
  }

  .hero-actions {
    display: grid;
    grid-area: actions;
    gap: 12px;
    margin-top: 20px;
  }

  .store-status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .requirements {
    text-align: center;
  }

  .intro-section {
    padding-top: 38px;
  }

  .section {
    padding-top: 42px;
  }

  .notice {
    padding: 16px;
  }

  .project-details {
    margin-bottom: calc(32px + env(safe-area-inset-bottom));
  }

}

@media (max-width: 390px) {
  body {
    font-size: 16px;
  }

  .hero {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 15px;
    row-gap: 0;
  }

  .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .feature,
  .project-detail-content {
    padding: 18px;
  }

  .project-detail summary {
    min-height: 58px;
    padding: 14px 18px;
  }
}

@media (min-width: 621px) and (orientation: landscape) and (max-height: 500px) {
  .site-nav {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 24px;
    padding: 28px 0 32px;
  }

  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(44px, 7vw, 58px);
  }

  .tagline {
    margin-top: 6px;
  }

  .hero-copy {
    margin-top: 12px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .intro-section {
    padding-top: 36px;
  }

  .section {
    padding-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
