/* Homepage palette stays local to the menu; course and gameplay colors are unchanged. */
.home-page #start-screen {
    --turf: #f7f3e9;
    --turf-2: #eeeade;
    --turf-3: #dedaca;
    --chalk: #193c30;
    --chalk-2: #5a695d;
    --chalk-3: #657165;
    --green: #20553d;
    --sand: #20553d;
    color: var(--chalk);
    background: var(--turf);
}
.home-page { --home-ink: #193c30; --home-accent: #20553d; --home-line: #dedaca; }
/* Collection displays use renders of the actual in-game models. */
.home-page #start-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title collection" "modes collection" "courses collection";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(28px, 5vw, 70px);
    padding-top: 84px;
}
.home-page #title { font-size: clamp(54px, 6.3vw, 80px); }
.home-page #subtitle { font-size: 19px; max-width: 33ch; }
.home-eyebrow { color: var(--home-accent); font-size: 11px; letter-spacing: .15em; font-weight: 700; line-height: 1.5; }
#title-wrapper > .home-eyebrow { margin-bottom: 20px; }
#home-courses { grid-area: courses; min-width: 0; }
.home-page #mode-buttons { margin-bottom: 6px; }
.home-controls { font-size: 12px; color: var(--chalk-2); padding: 12px 16px 0; }
.home-collections { grid-area: collection; min-width: 0; }
.home-collections-heading { margin-bottom: 22px; }
.home-collections-heading h2 { font-size: clamp(23px, 2.4vw, 30px); letter-spacing: -.04em; line-height: 1.1; margin-top: 9px; }
.home-collections-heading p { margin-top: 9px; font-size: 14px; color: var(--chalk-2); max-width: 35ch; }
.home-series, .home-decorations { display: block; width: 100%; text-align: left; font: inherit; border: 1px solid var(--home-line); cursor: pointer; overflow: hidden; border-radius: 18px; position: relative; transition: transform .18s, border-color .18s; }
.home-series:hover, .home-decorations:hover { transform: translateY(-3px); border-color: var(--home-accent); }
.home-series { color: var(--home-ink); background: #fffdf7; }
.home-collections > .home-series + .home-series { margin-top: 12px; }
.home-series img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 15px 12px #172b2625); }
.home-series-ocean { background: radial-gradient(ellipse at 50% 40%, #edf8f2, #cee4df 85%); border-color: #b5cfbf; }
.home-series-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: .08em; padding: 18px 22px 0; color: #5a695d; }
.home-series-label > span { letter-spacing: 0; opacity: .8; }
.home-series-ocean img { margin: -30px 0 -42px; transform: scale(1.12); }
.home-series-bottom { display: flex; align-items: center; justify-content: space-between; padding: 0 22px 22px; gap: 8px; }
.home-series-bottom strong { display: block; font-size: 27px; letter-spacing: -.04em; line-height: 1.1; }
.home-series-bottom small { display: block; font-size: 12px; margin-top: 6px; opacity: .8; }
.home-card-arrow { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #d8c596; }
.home-series-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.home-series-fruit { background: radial-gradient(ellipse at top, #fffdf7, #eeeee3); color: var(--home-ink); }
.home-series-monster { background: radial-gradient(ellipse at top, #fffdf7, #eeeee3); }
.home-series-pair img { margin: -5px 0 -10px; transform: scale(1.12); }
.home-series-pair .home-series-bottom { padding: 0 15px 18px; }
.home-series-pair strong { font-size: 18px; }
.home-series-pair small { font-size: 12px; }
.home-decorations { margin-top: 22px; padding: 22px; color: #fffdf7; background: radial-gradient(ellipse at 85% 80%, #39765e, #214b3b 75%); border-color: #214b3b; }
.home-decorations > strong { display: block; font-size: 28px; letter-spacing: -.04em; line-height: 1.08; max-width: 13ch; margin-top: 12px; }
.home-decorations > p { font-size: 14px; line-height: 1.5; max-width: 23ch; margin-top: 12px; color: #e0e9dc; }
.home-decorations img { position: absolute; width: 65%; height: auto; bottom: 20px; right: -35px; transform: rotate(-7deg); pointer-events: none; }
.home-decorations-footer { display: flex; justify-content: space-between; margin-top: 35px; font-size: 13px; font-weight: 600; position: relative; }
.home-collection-note { margin: 14px 4px 0; font-size: 12px; line-height: 1.6; color: var(--chalk-3); }
@media (max-width: 760px) {
    .home-page #start-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "modes" "collection" "courses"; padding-top: 76px; }
    .home-page #title { max-width: 8ch; font-size: clamp(52px, 11vw, 76px); }
    .home-page #subtitle { max-width: 34ch; font-size: 17px; }
    .home-collections { margin-top: 34px; }
    .home-collections-heading h2 { font-size: 28px; }
    .home-series-ocean img { max-height: 230px; }
    #home-courses { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-series, .home-decorations { transition: none; }
    .home-series:hover, .home-decorations:hover { transform: none; }
}
/* Keep the homepage Locker entry in the top navigation, clear of the title. */
.home-page #menu-store-button { position: absolute; top: 14px; left: 18px; width: auto; min-width: 100px; height: 44px; padding: 0 14px; border-radius: 24px; display: flex; flex-direction: row; gap: 8px; background: #eeeade; color: var(--home-accent); border-color: #d8c596; box-shadow: none; font-size: 11px; }
.home-page #menu-store-button svg { width: 22px; height: 22px; }
/* Match the Locker's cream surfaces, forest-green actions and antique gold. */
.home-page .challenge-group { background: linear-gradient(125deg, #f6dfa2, #e8cb7d); border-color: #d8b969; box-shadow: 0 10px 28px #82663616; }
.home-page .challenge-group #challenge-btn,
.home-page .challenge-group #challenge-btn .mode-title { color: #193c30; }
.home-page .challenge-group #challenge-btn .mode-desc,
.home-page .home-controls { color: #5a695d; }
.home-page .challenge-group .challenge-eyebrow { color: #826636; }
.home-page .challenge-group .challenge-flag { color: #20553d; background: #fffdf7; border-color: #d8c596; }
.home-page .challenge-group #challenge-btn .challenge-play { color: #fffdf7; background: #20553d; border-radius: 24px; padding: 10px 20px; }
.home-page .challenge-group-footer { background: #193c3005; border-color: #d8c596; }
.home-page #daily-board { color: #20553d; }
.home-page #account-button, .home-page #account-menu { color: #193c30; background: #fffdf7; border-color: #d8c596; }
.home-page #account-sign-out { color: #20553d; }
.home-page #random-course-btn { border-color: #dedaca; border-radius: 14px; background: #fffdf7; }
.home-page #random-course-btn:hover { background: #e8ecdf; }
.home-page #start-screen :focus-visible { outline-color: #bb923a; }
.home-page .home-eyebrow { color: #826636; }

.home-page .home-decorations .home-eyebrow { color: #efd99f; }
.home-page .challenge-group .challenge-eyebrow { color: #6c542b; }
.home-page .challenge-group #challenge-btn .mode-desc, .home-page .home-controls { color: #4d573b; }
.home-page .home-controls { font-size: 13px; }
.home-page .challenge-group-footer { background: #fffdf726; border-color: #b8954840; }
.home-series:active, .home-decorations:active { transform: translateY(0) scale(.99); }
.home-page .challenge-group #challenge-btn:active { background: #fffdf720; }
@media (prefers-reduced-motion: reduce) {
    .home-series:active, .home-decorations:active { transform: none; }
}

/* Desktop reward invitation, secondary to the gold Play card. */
#desktop-install[hidden] { display: none; }
#desktop-install { margin: 18px 0 0; padding: 22px 24px; border: 1px solid #a7be8e40; border-radius: 18px; background: linear-gradient(120deg, #214b32, #193e2b); color: #f5f7ed; text-align: left; box-shadow: inset 0 1px #ffffff09; }
.desktop-install-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.desktop-install-kicker { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #bdd1ab; }
.desktop-install-reward { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 30px; background: #f1d68e14; border: 1px solid #efd38c40; color: #f6dc99; font-size: 13px; font-weight: 700; white-space: nowrap; }
#desktop-install strong { display: block; font-size: 23px; letter-spacing: -.025em; line-height: 1.2; }
#desktop-install p { margin: 8px 0 18px; color: #c1d0bc; font-size: 14px; line-height: 1.5; }
#desktop-install button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 18px; border: 1px solid #ffe9b5; border-radius: 10px; background: linear-gradient(110deg, #f8e7b1, #e8c778); box-shadow: 0 3px 0 #0b291b55; color: #193c30; font: inherit; font-weight: 700; cursor: pointer; }
#desktop-install button::after { content: '↗'; font-size: 20px; line-height: 1; }
#desktop-install button:hover:not(:disabled) { background: #ffedbe; }
#desktop-install button:active:not(:disabled) { box-shadow: none; }
#desktop-install button:disabled { opacity: .65; cursor: default; }
#desktop-install button:disabled::after { content: '✓'; }
.desktop-install-note { display: block; margin-top: 12px; color: #b2c5ac; font-size: 11px; line-height: 1.5; text-align: center; }
#desktop-install #desktop-install-status { margin: 14px 0 0; }
#desktop-install-status:empty { display: none; }

/* A bounded shelf keeps new collections from lengthening the homepage. */
.home-collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 10px; }
.home-view-all { border: 0; background: transparent; color: inherit; padding: 10px 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.home-collection-arrows { display: flex; gap: 8px; }
.home-collection-arrows button { width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.home-collection-arrows button:disabled { opacity: .3; cursor: default; }
.home-series-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #b89548 transparent; padding: 4px 2px 12px; }
.home-series-track .home-series { display: flex; flex-direction: column; min-width: 0; scroll-snap-align: start; }
.home-series-track .home-series img { width: 100%; height: auto; aspect-ratio: 7 / 4; object-fit: contain; margin: 0; transform: none; max-height: none; }
.home-series-track .home-series-label { padding: 10px 14px 0; font-size: 10px; letter-spacing: .08em; }
.home-series-track .home-series-bottom { width: 100%; box-sizing: border-box; flex: 1; padding: 8px 14px 18px; align-items: flex-end; }
.home-series-track .home-series-bottom strong { font-size: clamp(18px, 1.8vw, 23px); }
.home-series-track .home-card-arrow { width: auto; height: auto; border: 0; }
.home-series-track:focus-visible { outline: 2px solid #bb923a; outline-offset: 3px; }
@media (max-width: 760px) {
    .home-series-track { grid-auto-columns: 86%; }
    .home-series-track .home-series-bottom strong { font-size: 25px; }
}
