/* =========================================================
   LIFEGROOVE
   COMPLETE APP STYLESHEET
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #f3f0e8;
    color: #26332a;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: #263b2d;
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 0;
}

p {
    color: #4b554d;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    color: #4b554d;
}

li {
    margin-bottom: 6px;
}


/* =========================================================
   GENERAL PAGE LAYOUT
   ========================================================= */

main {
    width: min(900px, 92%);
    margin: 30px auto 60px;
}

main > section {
    margin-bottom: 25px;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

body > h1,
body > p,
body > h2,
body > form,
body > section,
body > main,
body > a {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 20px;

    width: 100%;
    padding: 15px 25px;

    background: #263b2d;
    color: white;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

header h1 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

header button {
    background: #f3f0e8;
    color: #263b2d;
}

header button:hover {
    background: white;
}


/* =========================================================
   BUTTONS
   ========================================================= */

button {
    border: none;
    border-radius: 9px;
    padding: 10px 18px;

    background: #526b58;
    color: white;

    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

button:hover {
    background: #3f5545;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #a8aea9;
    color: white;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =========================================================
   FORMS
   ========================================================= */

form {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;

    color: #344238;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;

    border: 1px solid #c8cec8;
    border-radius: 8px;

    background: #fafaf8;
    color: #26332a;

    font: inherit;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #8ca092;
    border-color: #526b58;
}

form button {
    margin-top: 20px;
}


/* =========================================================
   INDEX / LANDING PAGE
   ========================================================= */

body:has(#life-groove-slogan) {
    min-height: 100vh;
    padding: 70px 20px;

    text-align: center;

    background:
        linear-gradient(
            rgba(243, 240, 232, 0.92),
            rgba(243, 240, 232, 0.92)
        );
}

body:has(#life-groove-slogan) h1 {
    max-width: 900px;
    margin: 30px auto 5px;

    font-size: clamp(2.5rem, 7vw, 4rem);
    letter-spacing: -1px;
}

body:has(#life-groove-slogan) #life-groove-slogan {
    max-width: 900px;
    margin: 0 auto 20px;

    color: #526b58;
    font-size: 1.35rem;
    font-weight: bold;
}

body:has(#life-groove-slogan) p:not(#life-groove-slogan) {
    max-width: 650px;
}

body:has(#life-groove-slogan) a {
    display: inline-block;
    margin: 15px 5px;
}

body:has(#life-groove-slogan) a button {
    min-width: 140px;
    padding: 12px 22px;
}


/* =========================================================
   GET STARTED
   ========================================================= */

body:has(main) main {
    min-height: 100px;
}

body:has(main) main > h1 {
    margin-bottom: 15px;
}

body:has(main) main > h2 {
    margin-top: 30px;
}

body:has(main) main > p {
    color: #4b554d;
}

body > a button {
    margin: 8px;
}


/* =========================================================
   CREATE ACCOUNT
   ========================================================= */

body:has(#account-form) {
    padding: 40px 20px 60px;
}

body:has(#account-form) > h1,
body:has(#account-form) > p,
body:has(#account-form) > form,
body:has(#account-form) > a {
    width: min(700px, 94%);
}

body:has(#account-form) > h1 {
    margin-top: 20px;
}

body:has(#account-form) > p {
    margin-bottom: 25px;
}

body:has(#account-form) form {
    margin-bottom: 15px;
}

#age-display {
    display: block;
    width: 100%;
    padding: 11px 12px;

    background: #eef1ec;
    border: 1px solid #d4dad4;
    border-radius: 8px;

    color: #526b58;
    font-weight: bold;
}

#email-message,
#phone-message,
#password-strength,
#password-message {
    display: block;
    margin-top: 5px;

    color: #667169;
    font-size: 0.88rem;
}

body:has(#account-form) form > p {
    padding: 10px 12px;
    background: #f1f3ef;
    border-radius: 8px;

    color: #667169;
    font-size: 0.85rem;
}

body:has(#account-form) form > button[type="button"] {
    margin-top: 5px;
    padding: 7px 12px;
    background: #7a887c;
}


/* =========================================================
   LOGIN
   ========================================================= */

body:has(#login-form) {
    padding: 70px 20px;
}

body:has(#login-form) > h1,
body:has(#login-form) > form,
body:has(#login-form) > a {
    width: min(500px, 94%);
}

body:has(#login-form) > h1 {
    margin-bottom: 25px;
    text-align: center;
}

body:has(#login-form) form {
    margin-bottom: 10px;
}

body:has(#login-form) > a {
    display: block;
    text-align: center;
}

body:has(#login-form) > a button {
    min-width: 100px;
}


/* =========================================================
   PLAN BADGE
   ========================================================= */

#plan-badge {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1100;

    padding: 7px 14px;

    background: #526b58;
    color: white;

    border-radius: 20px;

    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.5px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   PROFILE MENU
   ========================================================= */

#profile-menu {
    position: fixed;
    top: 55px;
    right: 20px;
    z-index: 1050;
}

#profile-button {
    background: #263b2d;
}

#profile-dropdown {
    display: none;

    min-width: 180px;
    margin-top: 6px;
    padding: 8px;

    background: white;
    border-radius: 11px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

#profile-dropdown a,
#profile-dropdown button {
    display: block;
    width: 100%;
    margin: 3px 0;
    padding: 9px 11px;

    text-align: left;
}

#profile-dropdown a {
    color: #263b2d;
    border-radius: 7px;
}

#profile-dropdown a:hover {
    background: #eef1ec;
}

#profile-dropdown button {
    background: #eeeeeb;
    color: #26332a;
}

#profile-dropdown button:hover {
    background: #dedfdc;
}


/* =========================================================
   MENU / HOME
   ========================================================= */

body:has(#streak-count) {
    padding-bottom: 60px;
}

body:has(#streak-count) > h1,
body:has(#streak-count) > p,
body:has(#streak-count) > h2,
body:has(#streak-count) > a,
body:has(#streak-count) > button {
    width: min(800px, 90%);
    margin-left: auto;
    margin-right: auto;
}

body:has(#streak-count) > h1 {
    margin-top: 85px;
    margin-bottom: 5px;

    font-size: 2.6rem;
}

body:has(#streak-count) > h2 {
    margin-top: 32px;
    margin-bottom: 12px;

    padding-bottom: 7px;

    border-bottom: 2px solid #d9ded8;
}

body:has(#streak-count) > p {
    margin-top: 8px;
}

body:has(#streak-count) > a {
    display: inline-block;
    width: auto;
    margin: 6px 4px;
}

body:has(#streak-count) > a button {
    min-width: 140px;
}

#streak-count {
    color: #526b58;
    font-weight: bold;
    font-size: 1.1rem;
}

#daily-affirmation {
    padding: 18px 20px;

    background: #eef1ec;
    border-left: 5px solid #526b58;
    border-radius: 9px;

    color: #344238;
}

#use-streak-freeze {
    margin-top: 5px;
    background: #718878;
}


/* =========================================================
   CHOOSE PLAN
   ========================================================= */

body:has(#free-plan) {
    padding: 45px 20px 70px;
}

body:has(#free-plan) > h1,
body:has(#free-plan) > p,
body:has(#free-plan) > h2 {
    width: min(1000px, 94%);
    margin-left: auto;
    margin-right: auto;
}

body:has(#free-plan) > h1 {
    text-align: center;
    margin-bottom: 8px;
}

body:has(#free-plan) > p {
    text-align: center;
    max-width: 700px;
}

body:has(#free-plan) > h2 {
    margin-top: 35px;
    margin-bottom: 20px;
    text-align: center;
}

body:has(#free-plan) > section {
    display: inline-block;
    vertical-align: top;

    width: calc(50% - 14px);
    min-height: 470px;

    margin: 0 5px 25px;
    padding: 28px;

    background: white;
    border-radius: 16px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.09);
}

body:has(#free-plan) > section:first-of-type {
    border: 2px solid #d9ded8;
}

body:has(#free-plan) > section:last-of-type {
    border: 2px solid #526b58;
}

body:has(#free-plan) > section h3 {
    font-size: 1.5rem;
    margin-top: 0;
}

body:has(#free-plan) > section:last-of-type h3 {
    color: #526b58;
}

body:has(#free-plan) > section button {
    width: 100%;
    margin-top: 15px;
}


/* =========================================================
   ACTIVITIES
   ========================================================= */

body:has(#activities-container) main {
    margin-top: 35px;
}

#activities-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.activity-card {
    padding: 22px;

    background: #f7f8f5;
    border: 1px solid #d9ded8;
    border-radius: 13px;

    transition: 0.2s;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.activity-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.activity-card p {
    min-height: 52px;
}

.activity-card button {
    margin-top: 10px;
}


/* =========================================================
   SWIMMING / LOCATIONS
   ========================================================= */

#locations-container {
    display: grid;
    gap: 18px;
}

.location-card {
    padding: 22px;

    background: #f7f8f5;
    border: 1px solid #d9ded8;
    border-radius: 13px;
}

.location-card h3 {
    margin-top: 0;
}

.location-card button {
    margin-top: 8px;
}


/* =========================================================
   POPUPS - GENERAL
   ========================================================= */

.popup {
    position: fixed;
    inset: 0;
    z-index: 2000;

    background: rgba(25, 32, 27, 0.68);

    overflow-y: auto;
}

.popup-content {
    position: relative;

    width: min(600px, 92%);
    max-height: 86vh;

    margin: 7vh auto;
    padding: 32px;

    overflow-y: auto;

    background: white;
    border-radius: 16px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

.popup-content > button:first-child {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 5px 10px;

    background: #eeeeeb;
    color: #26332a;

    font-size: 1.1rem;
}

.popup-content h2 {
    padding-right: 35px;
}


/* =========================================================
   BOOKING POPUP
   ========================================================= */

#booking-form {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

#booking-message {
    color: #526b58;
    font-weight: bold;
}


/* =========================================================
   BOOKINGS PAGE
   ========================================================= */

body:has(#upcoming-bookings) main {
    margin-top: 35px;
}

#upcoming-bookings,
#past-bookings {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.booking-card {
    padding: 20px;

    background: #f7f8f5;
    border: 1px solid #d9ded8;
    border-radius: 12px;
}

.booking-card h3 {
    margin-top: 0;
}

.booking-card button {
    margin-top: 10px;
}

#no-bookings {
    padding: 15px;

    background: #eef1ec;
    border-radius: 9px;

    color: #68736b;
    font-style: italic;
}


/* =========================================================
   GOALS
   ========================================================= */

body:has(#goal-form) main {
    margin-top: 35px;
}

#goal-form {
    margin-bottom: 25px;
}

#goals-container {
    display: grid;
    gap: 18px;
}

.goal-card {
    padding: 21px;

    background: #f7f8f5;
    border: 1px solid #d9ded8;
    border-radius: 13px;
}

.goal-card h3 {
    margin-top: 0;
}

.goal-card button {
    margin: 5px 5px 5px 0;
}

#no-goals {
    padding: 15px;

    background: #eef1ec;
    border-radius: 9px;

    color: #777;
    font-style: italic;
}


/* =========================================================
   PROFILE
   ========================================================= */

#profile-picture-container {
    margin-bottom: 20px;
    text-align: center;
}

#profile-picture {
    display: block;

    width: 120px;
    height: 120px;

    margin: 0 auto;

    object-fit: cover;

    border: 4px solid #526b58;
    border-radius: 50%;
}

#profile-name {
    margin-bottom: 5px;
    text-align: center;
    font-size: 1.8rem;
}

#profile-nickname {
    color: #526b58;
    font-weight: bold;
}

#profile-picture-input {
    margin-top: 12px;
    padding: 8px;
}

#save-profile {
    margin-top: 15px;
}

#terminate-account {
    background: #704646;
}

#terminate-account:hover {
    background: #5b3737;
}

#cancel-plan {
    background: #7b735a;
}


/* =========================================================
   SETTINGS
   ========================================================= */

body:has(#password-popup) main {
    margin-top: 35px;
}

body:has(#password-popup) main > section {
    margin-bottom: 20px;
}

#password-popup,
#email-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 3000;

    width: min(500px, 92%);
    max-height: 90vh;
    overflow-y: auto;

    padding: 30px;

    transform: translate(-50%, -50%);

    background: white;
    border-radius: 15px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
}

#password-popup h3,
#email-popup h3 {
    margin-top: 0;
}

#password-popup button,
#email-popup button {
    margin-top: 10px;
}


/* =========================================================
   REWARDS
   ========================================================= */

body:has(#reward-container) main {
    margin-top: 35px;
}

#reward-container,
#badge-container {
    display: grid;
    gap: 15px;
}

.reward-card,
.badge-card {
    padding: 21px;

    background: #f7f8f5;
    border: 1px solid #d9ded8;
    border-radius: 13px;
}

.reward-card h3,
.badge-card h3 {
    margin-top: 0;
}

.reward-card button {
    margin-top: 10px;
}

.badge-card.locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.badge-card.unlocked {
    border: 2px solid #526b58;
    background: #eef1ec;
}


/* =========================================================
   DIARY
   ========================================================= */

body:has(#calendar) {
    padding-bottom: 60px;
}

body:has(#calendar) > h1,
body:has(#calendar) > p,
body:has(#calendar) > #calendar,
body:has(#calendar) > #enter-diary,
body:has(#calendar) > a {
    width: min(900px, 92%);
    margin-left: auto;
    margin-right: auto;
}

body:has(#calendar) > h1 {
    margin-top: 35px;
}

#calendar {
    margin-top: 25px;
    padding: 22px;

    background: white;
    border-radius: 16px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

#calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

#calendar-header h2 {
    margin: 0;
    text-align: center;
}

#calendar-header button {
    min-width: 45px;
    padding: 9px;
}

#weekday-headings {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;

    margin-top: 20px;
    padding: 10px 4px;

    color: #526b58;
    font-size: 0.82rem;
    font-weight: bold;
    text-align: center;
}

#calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}

#calendar-dates button {
    min-height: 45px;
    padding: 5px;

    background: #eef1ec;
    color: #26332a;
}

#calendar-dates button:hover {
    background: #dce4dc;
}

#calendar-dates .has-diary {
    background: #526b58;
    color: white;
}

#enter-diary {
    margin-top: 20px;
}

#diary-popup {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 2500;

    background: rgba(25, 32, 27, 0.68);

    overflow-y: auto;
}

#diary-box {
    position: relative;

    width: min(600px, 92%);
    max-height: 86vh;

    margin: 7vh auto;
    padding: 32px;

    overflow-y: auto;

    background: white;
    border-radius: 16px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

#diary-popup-title {
    padding-right: 35px;
}

#close-diary {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 5px 10px;

    background: #eeeeeb;
    color: #26332a;
}


/* =========================================================
   LEARN PAGE
   ========================================================= */

body:has(#feed-container) main {
    margin-top: 30px;
}

#learn-controls {
    position: sticky;
    top: 74px;
    z-index: 900;
}

#learn-controls h2 {
    margin-bottom: 12px;
}

#learn-controls select {
    margin-bottom: 10px;
}

#randomise-feed {
    margin-top: 5px;
}


/* =========================================================
   LEARN FEED
   ========================================================= */

#feed-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
}


/* EVERY POST IS A SEPARATE CARD */

.post-card {
    width: 100%;
    padding: 22px;

    background: white;

    border: 1px solid #d9ded8;
    border-radius: 15px;

    box-shadow: 0 3px 11px rgba(0, 0, 0, 0.07);

    overflow: hidden;
}

.post-card:hover {
    box-shadow: 0 6px 17px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.post-card p {
    margin-bottom: 10px;
}


/* POST HEADER */

.post-header {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 14px;
}

.post-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    background: #eef1ec;
    border-radius: 50%;

    font-size: 1.4rem;
}

.post-header strong {
    color: #263b2d;
}


/* POST CATEGORY */

.post-category {
    display: inline-block;

    margin-top: 10px;
    padding: 4px 10px;

    background: #eef1ec;
    color: #526b58;

    border-radius: 20px;

    font-size: 0.78rem;
    font-weight: bold;
}


/* POST ACTIONS */

.post-actions {
    display: flex;
    gap: 8px;

    margin-top: 18px;
    padding-top: 13px;

    border-top: 1px solid #e1e4e0;
}

.post-actions button {
    padding: 7px 11px;

    background: transparent;
    color: #526b58;

    box-shadow: none;
}

.post-actions button:hover {
    background: #eef1ec;
    transform: none;
    box-shadow: none;
}


/* COMMENTS */

.comment-section {
    margin-top: 15px;
    padding-top: 15px;

    border-top: 1px solid #ddd;
}

.comment {
    margin-bottom: 10px;
    padding: 11px 13px;

    background: #f5f6f3;
    border-radius: 9px;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-input {
    margin-top: 10px;
}


/* =========================================================
   PAYMENT POPUP
   ========================================================= */

#payment-popup {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 4000;

    background: rgba(0, 0, 0, 0.68);

    overflow-y: auto;
}

#payment-box {
    position: relative;

    width: min(500px, 92%);
    max-height: 90vh;

    margin: 5vh auto;
    padding: 38px 35px 30px;

    overflow-y: auto;

    background: white;
    border-radius: 16px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#payment-box h2 {
    margin-top: 15px;
}

#insert-card {
    position: absolute;
    top: 15px;
    right: 15px;

    padding: 7px 10px;

    font-size: 0.78rem;
}

#close-payment {
    position: absolute;
    top: 15px;
    left: 15px;

    padding: 5px 10px;

    background: #eeeeeb;
    color: #26332a;
}

#payment-box label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}

#payment-box input {
    width: 100%;
}

#payment-box p:last-of-type {
    padding: 5px;

    color: #888;

    font-size: 0.75rem;
    text-align: center;
    font-weight: bold;
}

#submit-payment {
    display: block;
    margin: 22px auto 0;
}


/* =========================================================
   PAYMENT PLAN PAGE
   ========================================================= */

body:has(#current-plan) main {
    margin-top: 35px;
}

#current-plan {
    color: #526b58;
    font-weight: bold;
}

#plan-status {
    padding: 12px 15px;

    background: #eef1ec;
    border-left: 4px solid #526b58;
    border-radius: 8px;
}


/* =========================================================
   GOODBYE PAGE
   ========================================================= */

body:has(#terminate-account) main {
    width: min(900px, 92%);
}

body:has(#terminate-account) section {
    margin-bottom: 20px;
}


/* =========================================================
   GENERAL PAGE WITH MAIN
   ========================================================= */

main a {
    color: #526b58;
    font-weight: bold;
}

main a:hover {
    text-decoration: underline;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    body {
        font-size: 0.95rem;
    }

    header {
        padding: 12px 15px;
        gap: 12px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    main {
        width: 94%;
        margin-top: 20px;
    }

    main > section {
        padding: 19px;
    }


    /* INDEX */

    body:has(#life-groove-slogan) {
        padding: 45px 15px;
    }

    body:has(#life-groove-slogan) h1 {
        font-size: 2.5rem;
    }


    /* MENU */

    body:has(#streak-count) > h1 {
        margin-top: 75px;
        font-size: 2.2rem;
    }

    body:has(#streak-count) > a {
        display: block;
        width: min(400px, 90%);
        margin: 8px auto;
    }

    body:has(#streak-count) > a button {
        width: 100%;
    }


    /* PLAN */

    body:has(#free-plan) > section {
        display: block;
        width: min(600px, 94%);
        min-height: auto;
        margin: 18px auto;
    }


    /* ACTIVITIES */

    #activities-container {
        grid-template-columns: 1fr;
    }


    /* CALENDAR */

    #calendar {
        padding: 12px;
    }

    #calendar-header {
        gap: 8px;
    }

    #calendar-header h2 {
        font-size: 1.15rem;
    }

    #weekday-headings {
        gap: 3px;
        padding: 8px 2px;

        font-size: 0.65rem;
    }

    #calendar-dates {
        gap: 4px;
    }

    #calendar-dates button {
        min-height: 38px;
        padding: 3px;

        font-size: 0.85rem;
    }


    /* PROFILE MENU */

    #profile-menu {
        top: 50px;
        right: 10px;
    }

    #profile-dropdown {
        min-width: 160px;
    }

    #plan-badge {
        top: 9px;
        right: 10px;
        padding: 6px 10px;
    }


    /* LEARN */

    #learn-controls {
        top: 58px;
    }

    #feed-container {
        gap: 16px;
    }

    .post-card {
        padding: 17px;
    }

    .post-actions {
        flex-wrap: wrap;
    }


    /* POPUPS */

    #payment-box,
    #diary-box,
    .popup-content {
        width: 94%;
        margin-top: 5vh;
        padding: 27px 18px;
    }

    #password-popup,
    #email-popup {
        width: 94%;
    }
}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 420px) {

    button {
        padding: 9px 13px;
        font-size: 0.9rem;
    }

    header {
        padding: 10px 12px;
    }

    header h1 {
        font-size: 1.05rem;
    }

    #plan-badge {
        display: none;
    }

    #calendar-dates button {
        min-height: 34px;
        font-size: 0.78rem;
    }

    #weekday-headings {
        font-size: 0.58rem;
    }

    .post-header {
        gap: 8px;
    }

    .post-avatar {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

/* Homepage menu tiles */
body:has(#streak-count) > a {
    display: inline-flex;
    margin: 0;
}

body:has(#streak-count) > a button {
    width: 75px;
    height: 75px;
    padding: 4px;
    margin: 0;
    border-radius: 10px;
    font-size: 0.75rem;
}

body:has(#streak-count) {
    text-align: center;
}

/* LifeGroove homepage title */
body:has(#streak-count) > h1 {
    margin-top: 110px;
    margin-bottom: 5px;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 2px;
    color: #526b58;
    text-shadow: 3px 3px 0 #d9ded8;
}

body:has(#streak-count) #menu-slogan {
    display: block;
    width: fit-content;
    max-width: 90%;
    margin: 10px auto 35px;
    padding: 10px 24px;
    border: 2px solid #526b58;
    border-radius: 15px;
    background: #ffffff;
    color: #263b2d;
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Homepage hero */
#hero-section {
    width: min(850px, 92%);
    margin: 90px auto 25px;
    padding: 35px 25px 30px;
    background: #b3bdb3;
    border-radius: 25px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#hero-section h1 {
    margin: 0 0 10px;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 2px;
    color: #526b58;
    text-shadow: 3px 3px 0 #ffffff;
}

#menu-slogan {
    display: inline-block;
    margin: 0;
    padding: 10px 24px;
    border-radius: 15px;
    background: #ffffff;
    color: #263b2d;
    font-size: 1.15rem;
    font-weight: bold;
}

body:has(#streak-count) #welcome-message {
    width: auto;
    margin: 8px 0 0;
    padding: 0;
    color: #263b2d;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

/* Today's Progress */
/* Today's Progress - two side-by-side panels */
#daily-progress {
    display: flex !important;
    flex-direction: row !important;
    width: min(850px, 92%) !important;
    margin: 25px auto 35px !important;
    gap: 20px !important;
}

#streak-section,
#affirmation-section {
    flex: 1 !important;
    width: 50% !important;
    margin: 0 !important;
    padding: 25px !important;
    background: white;
    border-radius: 18px;
    text-align: center;
}

#streak-section h2,
#affirmation-section h2 {
    margin-top: 0;
}

#streak-count {
    font-size: 3rem !important;
    font-weight: 900;
}

#daily-affirmation {
    width: 100% !important;
    margin: 10px 0 0 !important;
}

/* Small screens */
@media (max-width: 700px) {
    #daily-progress {
        flex-direction: column !important;
    }

    #streak-section,
    #affirmation-section {
        width: 100% !important;
    }
}

#daily-progress {
    display: grid !important;
    grid-template-columns: 0.7fr 1.3fr !important;
    gap: 20px !important;
}

#streak-section,
#affirmation-section {
    width: 100% !important;
    margin: 0 !important;
}

#open-goal-popup {
    display: block;
    margin: 0 auto;
    font-size: 1rem;
}

#goal-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(25, 32, 27, 0.68);
    overflow-y: auto;
}

#goal-popup-box {
    position: relative;
    width: min(600px, 92%);
    max-height: 86vh;
    margin: 7vh auto;
    padding: 32px;
    overflow-y: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
}

#goal-popup-box h2 {
    margin-top: 0;
}

#close-goal-popup {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    background: #eeeeeb;
    color: #26332a;
}

#close-goal-popup:hover {
    background: #ddd;
}