html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

body {
    background: linear-gradient(180deg, #eaf4ff 0%, #ffffff 55%) no-repeat fixed;
}

.subject-card {
    border-radius: 1.25rem;
    overflow: hidden;
}

.subject-card .btn {
    border-radius: 2rem;
    font-weight: 600;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    transition: transform 0.15s ease;
}

.subject-card .btn:hover {
    transform: translateY(-3px) scale(1.02);
}

.navbar .nav-link {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
}

    .navbar .nav-link:hover,
    .navbar .nav-link:focus,
    .navbar .nav-link.show {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.22);
    }

/* "Why Four Rs?" button and pop-up */
.why-four-btn {
    border-radius: 999px;
    white-space: nowrap;
}

.why-four {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
}

.why-four-text {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.5;
}

    .why-four-text .big-r {
        color: #e8590c;
        font-size: 2.6rem;
        font-weight: 800;
    }

.dropdown-menu {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.dropdown-item {
    font-size: 1.05rem;
    padding: 0.6rem 1.25rem;
}
/* Purple button (Division) */
.btn-purple {
    color: #fff;
    background-color: #7c3aed;
    border-color: #7c3aed;
}

    .btn-purple:hover,
    .btn-purple:focus {
        color: #fff;
        background-color: #6d28d9;
        border-color: #6d28d9;
    }

/* Grown-ups' pages (Views/Parent) */
.gu {
    max-width: 640px;
    margin: 0 auto;
}

    .gu h1 {
        font-weight: 800;
        color: var(--bs-primary);
        text-align: center;
        margin: 1rem 0 1.25rem;
    }

.gu-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

    .gu-card .form-label {
        font-weight: 700;
        font-size: 1.15rem;
    }

    .gu-card .form-control {
        font-size: 1.25rem;
        border-radius: 0.75rem;
    }

    .gu-card .btn-lg {
        border-radius: 2rem;
        font-weight: 700;
    }

.gu-pin {
    letter-spacing: 0.4em;
    font-weight: 700;
}

.gu-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
}

    .gu-child:first-child {
        border-top: 0;
    }

    .gu-child .name {
        flex: 1 1 8rem;
        font-size: 1.5rem;
        font-weight: 800;
    }

/* The family's "well done" picture (cheer.js): a small pop-up in the bottom corner */
.cheer-pop {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1050;
    width: clamp(7rem, 22vw, 11rem);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
    transform-origin: bottom right;
}

    .cheer-pop img {
        display: block;
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
        border: 0.3rem solid #fff;
        border-radius: 1.25rem;
        box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.3);
        background: #fff;
    }

    .cheer-pop .cheer-star {
        position: absolute;
        top: -0.9rem;
        left: -0.9rem;
        font-size: 2.2rem;
        line-height: 1;
        filter: drop-shadow(0 0.15rem 0.2rem rgba(0, 0, 0, 0.3));
    }

    .cheer-pop.cheer-show {
        animation: cheer-in 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
    }

    .cheer-pop.cheer-hide {
        animation: cheer-out 0.4s ease-in forwards;
    }

@keyframes cheer-in {
    from { opacity: 0; transform: scale(0.4) rotate(-8deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes cheer-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.85) translateY(0.5rem); }
}

@media (prefers-reduced-motion: reduce) {
    .cheer-pop.cheer-show { animation: none; opacity: 1; transform: none; }
    .cheer-pop.cheer-hide { animation: none; opacity: 0; }
}
