:root {
  --bg-top: #f8f9ff;
  --bg-bottom: #e8ecff;
  --ink: #12152a;
  --muted: #4f567c;
  --panel: rgba(255, 255, 255, 0.88);
  --line: #d6dbff;
  --accent: #2240c7;
  --accent-strong: #1a33a1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 15%, #ffffff 0%, transparent 28%),
    radial-gradient(circle at 85% 12%, #dbe4ff 0%, transparent 32%),
    linear-gradient(150deg, var(--bg-top), var(--bg-bottom));
  padding: 28px 18px;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(36, 51, 125, 0.14);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

h1,
h2 {
  font-family: 'Sora', sans-serif;
  margin: 8px 0 0;
  line-height: 1.2;
}

.title-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(34, 64, 199, 0.08);
  padding: 4px;
}

h1 {
  font-size: clamp(1.7rem, 4.8vw, 2.7rem);
}

h2 {
  font-size: 1.2rem;
}

.lead {
  margin-top: 10px;
  color: #2d355e;
  max-width: 75ch;
}

.download-btn {
  display: inline-block;
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
}

.download-btn:hover {
  background: var(--accent-strong);
}

.file-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.features {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.features li,
.lead,
h1,
h2 {
  overflow-wrap: anywhere;
}

.gallery {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.preview {
  flex-shrink: 0;
  width: 140px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f2f4ff;
  object-fit: cover;
  aspect-ratio: 9 / 16;
  scroll-snap-align: start;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 200ms ease-out;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

#lightboxImg {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  color: #fff;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  body {
    padding: 14px 12px;
  }

  .page {
    gap: 12px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 16px;
  }

  .title-section {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .app-logo {
    width: 42px;
    height: 42px;
  }

  h1 {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
    line-height: 1.15;
    word-break: break-word;
  }

  .lead {
    font-size: 0.97rem;
    line-height: 1.5;
  }

  .features {
    padding-left: 18px;
    gap: 10px;
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .preview {
    width: 100%;
    max-width: none;
    border-radius: 12px;
  }

  .download-btn {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
  }

  .lightbox-content {
    max-width: 96%;
    max-height: 92vh;
  }

  .close-btn {
    top: 6px;
    right: 6px;
    width: 42px;
    height: 42px;
    font-size: 26px;
  }
}
