.home-page, .inner-page {
  --ink: #233234;
  --muted: #565a58;
  --home-width: min(760px, calc(100% - 32px));
  --section-gap: 24px;
  min-height: 100vh;
  color: var(--ink);
  background: #39b8bd url('/assets/home/paper.png') repeat 0 0 / 90px auto;
}

.home-layout {
  width: var(--home-width);
  margin: auto;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.home-hero, .home-intro, .home-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.home-theatre {
  width: min(620px, 100%);
  aspect-ratio: 620 / 619;
  overflow: hidden;
}
.home-theatre img {
  width: 100%;
  height: auto;
  aspect-ratio: 620 / 699.487;
  object-fit: cover;
  mask: url('/assets/home/theatre-mask.png') center / cover no-repeat;
}
.home-hero h1 { width: min(389px, 75%); }
.home-hero h1 img { width: 100%; }
.home-intro { gap: 8px; padding-bottom: 16px; }
.home-intro p { font-size: 17px; line-height: 26px; }
.home-intro .home-genre { font-size: 22px; line-height: 32px; font-weight: 700; }

.home-stores {
  width: min(100%, 291px);
  display: grid;
  grid-template-columns: minmax(0, 131fr) minmax(0, 152fr);
  gap: 8px;
  align-items: stretch;
}
.apple-badge { align-self: center; border-radius: 7px; }
.apple-badge img { width: 100%; }
.google-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid #a6a6a6;
  border-radius: 7px;
  color: #fff;
  background: #080808;
  font-family: Arial, sans-serif;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 500;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
}
.google-badge img { width: min(22%, 31px); }
.google-badge small { display: block; font: 700 10px/1.3 LineSeed, sans-serif; }

.weekly-section { padding-block: 8px; }
.weekly-section h2 { margin-bottom: 18px; font-size: 30px; line-height: 47px; }
.weekly-section > p a { text-decoration: underline; margin-left: .5em; }
.weekly-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.weekly-track li { display: flex; min-width: 0; }
.weekly-card, .home-guide a {
  --underlay: #ffe498;
  width: 100%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px var(--underlay), 0 5.5px var(--ink);
}
.weekly-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 9px 9px 13px;
  border-radius: 14px;
}
.weekly-track li:nth-child(2) .weekly-card { --underlay: #cbe7d0; }
.weekly-track li:nth-child(3) .weekly-card { --underlay: #dccff2; }
.weekly-art {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 9px;
}
.weekly-card h3 { font-size: 21px; line-height: 28px; }
.weekly-meta, .weekly-card time { color: var(--muted); font-size: 12px; line-height: 19px; }
.weekly-meta { font-weight: 700; }
.weekly-card time { margin-top: auto; }
.weekly-controls { display: none; }

.home-guide { display: grid; gap: 12px; padding: 4px 0 3px; }
.home-guide a {
  --underlay: #ffbf74;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 51px;
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
}
.home-guide a + a { --underlay: #cbe7d0; }
.home-arrow { width: 19px; margin-inline: 2.5px; transform: rotate(180deg); }
.home-guide a:hover, .weekly-card:hover h3, .home-footer a:hover { text-decoration: underline; }
.home-download {
  padding: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: #def4f2;
}
.home-download h2 { font-size: 24px; line-height: 38px; }
.home-download p { color: var(--muted); font-size: 15px; line-height: 24px; }
.home-footer {
  width: var(--home-width);
  margin: var(--section-gap) auto 0;
  padding: 12px 0 48px;
  text-align: center;
  font-size: 12px;
  line-height: 19px;
}
.home-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; }
.home-footer a { padding-block: 8px; font-weight: 700; }
.home-footer small { display: block; margin-top: 6px; font-size: inherit; }

@media (max-width: 660px) {
  .home-page, .inner-page { --section-gap: 16px; }
  .home-layout { padding-top: 32px; }
  .home-hero { gap: 8px; width: calc(100% + 32px); align-self: center; }
  .home-theatre { width: min(380px, calc(100% - 10px)); aspect-ratio: 1; }
  .home-hero h1 { width: min(278px, 75%); }
  .home-intro { gap: 6px; padding-bottom: 8px; }
  .home-intro p { font-size: 15px; line-height: 24px; }
  .home-intro .home-genre { font-size: 17px; line-height: 26px; }
  .weekly-section h2 { margin-bottom: 12px; font-size: 24px; line-height: 38px; }
  .weekly-track {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .weekly-track::-webkit-scrollbar { display: none; }
  .weekly-track li { scroll-snap-align: start; }
  .weekly-card:focus-visible { outline-offset: -5px; }
  .weekly-card h3 { font-size: 20px; line-height: 33px; }
  .weekly-controls:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
  }
  .weekly-controls button {
    width: 44px;
    height: 48px;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    background: #fffcf5;
    font-size: 20px;
  }
  .weekly-controls [data-weekly-next] { background: #ffbf74; }
  .weekly-controls button:disabled { color: #565a58; background: #f5f1e7; }
  .home-download { padding: 18px; }
  .home-download h2 { font-size: 19px; line-height: 30px; }
  .home-download p { font-size: 13px; line-height: 21px; }
}
