/* ==========================================================================
   Game setup pages: one calm brand look (2026-11-26)

   Every memorization game's setup page had its own blue-violet, purple-pink or
   green-blue gradient spread over ~50 per-game stylesheets. This one file,
   loaded after them on game pages only, gives them all the same surface:
   a light page with the eight-point-star pattern, a soft lavender header card,
   and flat purple only for whatever is selected or pressable.

   The in-game play screens (front.layouts.game) are each game's own artwork
   and are not touched here.

   The per-game sheets pin these colours on #setupScreen / #qdSetup, so the
   backgrounds below carry !important to win over those id selectors.
   ========================================================================== */

html {
    --gs-ink: #1F1147;
    --gs-purple: #7C3AED;
    --gs-purple-deep: #6D28D9;
    --gs-soft: #F5F3FF;
    /* the same star tile as --ak-pattern, drawn in white for dark surfaces */
    --gs-pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.1' opacity='.13'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3Cpath d='M0 36h8M64 36h8M36 0v8M36 64v8'/%3E%3C/g%3E%3C/svg%3E");
}

/* page surface */
html body .setup-screen {
    background: #FAF8FF var(--ak-pattern) !important;
}
html body .setup-screen .animated-background,
html body .setup-screen .brain-pulse {
    display: none;
}

/* the game's header card: soft lavender with dark text (a full-strength purple
   block read as too loud inside the game) */
html body .setup-screen .setup-header {
    background: #EDE9FE var(--ak-pattern) !important;
    box-shadow: none;
    border-bottom: 1.5px solid #DDD6FE;
}
html body .setup-screen .setup-header,
html body .setup-screen .setup-header :is(h1, h2, h3, h4, p, span) {
    color: var(--gs-ink);
    text-shadow: none;
}
html body .setup-screen .setup-header p { color: #4B4468; }
/* the detective page pins white header text on #qdSetup */
html body #qdSetup .setup-header :is(h1, h2, h3) { color: var(--gs-ink) !important; }
html body #qdSetup .setup-header p { color: #4B4468 !important; }
html body .setup-screen .setup-header .setup-icon {
    background: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(31, 17, 71, .08);
}

/* "log in first" notice: light, with a purple edge. The red error variants
   (hl-/hr-/tr-alert-error) keep their own colours. */
html body .setup-screen .alert-notice:not([class*="alert-error"]) {
    background: var(--gs-soft) !important;
    border: 1.5px solid #DDD6FE;
    box-shadow: none;
}
html body .setup-screen .alert-notice:not([class*="alert-error"]) :is(h3, h4, p, span, strong) {
    color: var(--gs-ink);
    text-shadow: none;
}
html body .setup-screen .alert-notice:not([class*="alert-error"]) p { color: #4B4468; }
html body .setup-screen .alert-notice:not([class*="alert-error"]) .alert-icon {
    background: #FFFFFF !important;
}

/* selected options: a light tile with a purple edge and dark text. Some games
   drew their selection light with dark text, others solid with white text;
   one light style keeps every label readable and the page calm. */
html body .setup-screen .level-card.active,
html body .setup-screen .type-tab.active,
html body .setup-screen .difficulty-option.selected {
    background: var(--gs-soft) !important;
    border: 2px solid var(--gs-purple) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, .12);
}
html body .setup-screen :is(.level-card.active, .type-tab.active, .difficulty-option.selected),
html body .setup-screen :is(.level-card.active, .type-tab.active, .difficulty-option.selected) :is(h3, h4, p, span, div, strong, small) {
    color: var(--gs-ink) !important;
}
html body .setup-screen :is(.level-card.active, .difficulty-option.selected) :is(.level-desc, p, small) {
    color: #4B4468 !important;
}

/* primary actions */
html body .setup-screen .btn-start-game,
html body .setup-screen .start-button,
html body .setup-screen .btn.btn-primary,
html body .setup-screen .surah-checkbox input[type="checkbox"]:checked + .surah-label,
html body .setup-screen .tr-count input:checked + span,
html body .setup-screen .hr-count input:checked + span {
    background: var(--gs-purple) !important;
    border-color: var(--gs-purple);
}
html body .setup-screen .btn-start-game:hover,
html body .setup-screen .start-button:hover,
html body .setup-screen .btn.btn-primary:hover {
    background: var(--gs-purple-deep) !important;
}

/* the "log in" link under the difficulty picker (10 games share it) used a
   one-off pinkish purple, #a557dd */
html body .setup-screen .btn-link.login {
    background: var(--gs-purple) !important;
    border-color: var(--gs-purple) !important;
    color: #FFFFFF;
}
html body .setup-screen .btn-link.login:hover {
    background: var(--gs-purple-deep) !important;
    border-color: var(--gs-purple-deep) !important;
}

/* softly selected tiles (themes, reciters) */
html body .setup-screen .theme-option.selected,
html body .setup-screen .reciter-card.active {
    background: var(--gs-soft) !important;
    border-color: var(--gs-purple);
}

/* small round avatars / previews that used the old gradients */
html body .setup-screen .child-avatar-large,
html body .setup-screen .student-avatar,
html body .setup-screen .tr-preview-pawn,
html body .setup-screen .tr-preview-dice,
html body .setup-screen .tr-preview-end {
    background: var(--gs-purple) !important;
}

/* "more games" band under every setup page: same light surface as the page */
html body .other-games-section {
    background: #F5F3FF var(--ak-pattern) !important;
    border-top: 1.5px solid #E9E3FB;
}
html body .other-games-section .other-games-header :is(h2, p) {
    color: var(--gs-ink);
    text-shadow: none;
}
html body .other-games-section .other-games-header p { color: #4B4468; }
html body .other-games-section .btn-all-games,
html body .btn-all-games {
    background: var(--gs-purple) !important;
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(124, 58, 237, .2);
}
