*, *::before, *::after {
    box-sizing: border-box;
}

body {
    --bg-color: #f7f0ff;
    --text-color: #2a1a33;
    --muted-text: #5b4b66;
    --header-bg: linear-gradient(135deg, #5b2a86, #1f7a4c, #d4a51f);
    --header-text: #fff8e6;
    --header-link: #fff8e6;
    --header-link-hover: rgba(255, 255, 255, 0.25);
    --surface-primary: #fffaf2;
    --surface-secondary: #f4ecff;
    --border-color: rgba(91, 42, 134, 0.22);
    --input-border: #cab8df;
    --input-bg: #fff7f0;
    --button-bg: linear-gradient(135deg, #6c2a96, #f1c44d);
    --button-text: #2a1338;
    --button-secondary-bg: #1f7a4c;
    --accent: #6c2a96;
    --accent-emerald: #1f7a4c;
    --announcement-bg: rgba(255, 250, 242, 0.94);
    --announcement-border: rgba(31, 122, 76, 0.32);
    --alert-success-bg: #e6f6ee;
    --alert-success-text: #1c5a3a;
    --alert-error-bg: #fbe9f1;
    --alert-error-text: #8a2f52;
    --comment-bg: rgba(255, 250, 242, 0.9);
    --toggle-bg: rgba(255, 250, 242, 0.94);
    --toggle-border: rgba(108, 42, 150, 0.22);
    --reaction-border: rgba(42, 26, 51, 0.2);
    --card-shadow: 0 14px 32px rgba(64, 26, 89, 0.12);
    --firefly: rgba(247, 198, 82, 0.75);
    --garland: rgba(91, 42, 134, 0.2);
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    background-image:
        url("img/background.png"),
        radial-gradient(circle at 12% 18%, rgba(108, 42, 150, 0.16), transparent 38%),
        radial-gradient(circle at 86% 10%, rgba(247, 198, 82, 0.18), transparent 34%),
        radial-gradient(circle at 20% 86%, rgba(31, 122, 76, 0.16), transparent 36%),
        linear-gradient(160deg, rgba(251, 243, 255, 0.92), rgba(234, 247, 241, 0.94));
    background-size: cover, auto, auto, auto, auto;
    background-position: center, center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, var(--firefly), transparent 50%),
        radial-gradient(3px 3px at 70% 10%, var(--firefly), transparent 55%),
        radial-gradient(2px 2px at 40% 80%, var(--firefly), transparent 50%),
        radial-gradient(3px 3px at 90% 60%, var(--firefly), transparent 55%),
        radial-gradient(2px 2px at 10% 65%, var(--firefly), transparent 50%);
    background-size: 220px 220px, 260px 260px, 240px 240px, 320px 320px, 340px 340px;
    animation: fireflyDrift 16s ease-in-out infinite;
    opacity: 0.5;
    z-index: 0;
}

@keyframes fireflyDrift {
    0% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(18px); opacity: 0.6; }
    100% { transform: translateY(0); opacity: 0.35; }
}

body.dark {
    --bg-color: #120a1a;
    --text-color: #f1e7ff;
    --muted-text: #b9a7cc;
    --header-bg: linear-gradient(135deg, #3f175d, #0f5b36, #7f5a0b);
    --header-text: #fff3d6;
    --header-link: #fff3d6;
    --header-link-hover: rgba(255, 255, 255, 0.24);
    --surface-primary: #140c1f;
    --surface-secondary: #0c0a14;
    --border-color: rgba(241, 231, 255, 0.16);
    --input-border: #2d2340;
    --input-bg: #0f0b17;
    --button-bg: linear-gradient(135deg, #6c2a96, #d4a51f);
    --button-text: #fff0d0;
    --button-secondary-bg: #0f5b36;
    --accent: #f1c44d;
    --accent-emerald: #7ad4a1;
    --announcement-bg: rgba(15, 11, 23, 0.95);
    --announcement-border: rgba(122, 212, 161, 0.25);
    --alert-success-bg: #0b2618;
    --alert-success-text: #b8ecd2;
    --alert-error-bg: #2a0e1b;
    --alert-error-text: #f2c2d4;
    --comment-bg: rgba(20, 12, 31, 0.92);
    --toggle-bg: #140c1f;
    --toggle-border: #2a1b3f;
    --reaction-border: #2a1b3f;
    --card-shadow: 0 14px 34px rgba(10, 4, 18, 0.5);
    --firefly: rgba(247, 198, 82, 0.42);
    --garland: rgba(108, 42, 150, 0.24);
    color-scheme: dark;
}

img {
    max-width: 100%;
    height: auto;
}
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-bottom: 2px solid var(--garland);
    overflow: hidden;
    isolation: isolate;
    background-size: 180% 180%;
    animation: headerGlow 18s ease-in-out infinite;
}

header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 80%, rgba(246, 173, 85, 0.32), transparent 38%),
        radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.24), transparent 32%);
    mix-blend-mode: screen;
    opacity: 0.6;
}

@keyframes headerGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
}

header a {
    color: var(--header-link);
    text-decoration: none;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

header nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
}

header nav a:hover,
header nav a:focus {
    background: var(--header-link-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

header nav a + a::before {
    content: "|";
    position: absolute;
    left: -0.6rem;
    color: var(--header-link);
    opacity: 0.75;
    font-weight: 700;
}

@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav {
        width: 100%;
    }
}

/* Hide the messages link specifically on the main feed header */
.feed-page header nav a[href$="messages.php"] {
    display: none;
}
main {
    padding: 1.5rem;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

main > h1 {
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin-bottom: 0.75rem;
    max-width: 720px;
}

main > p {
    max-width: 680px;
    line-height: 1.6;
    color: var(--muted-text);
}

.theme-toggle {
    align-self: flex-end;
    margin: 1.5rem 1.5rem 0;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.12);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 220px;
}

.cta-button.primary {
    background: var(--button-bg);
    color: var(--button-text);
    box-shadow: 0 16px 32px rgba(123, 74, 42, 0.2);
}

.cta-button.secondary {
    background: transparent;
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
}

.cta-button:hover,
.cta-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.support-notice {
    margin-top: 0.5rem;
    color: var(--muted-text);
}

.support-notice a {
    color: var(--accent);
    font-weight: 600;
}

.content-section,
.info-section {
    margin-top: 2.5rem;
    background: var(--surface-primary);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.info-section ol {
    margin: 1rem 0 0.5rem;
    padding-left: 1.2rem;
}

.muted {
    color: var(--muted-text);
    margin-top: 0.75rem;
}

.section-lead {
    margin-top: 0.5rem;
    color: var(--muted-text);
    max-width: 720px;
}

.feature-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
    background: var(--surface-secondary);
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(13, 26, 19, 0.08);
}

.highlight-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted-text);
}

.faq-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.faq-item {
    background: var(--surface-secondary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
}

.site-footer {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    padding: 2rem;
    border-radius: 16px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.footer-heading {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: var(--muted-text);
}

.footer-link {
    color: var(--accent-emerald);
    font-weight: 600;
    text-decoration: none;
}

.floating-buttons {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10;
}

.floating-buttons a {
    text-decoration: none;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    background: var(--surface-primary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    text-align: center;
}

.floating-buttons .back-to-top {
    background: var(--button-secondary-bg);
    color: #f6f3ea;
}

@media (max-width: 720px) {
    .theme-toggle {
        align-self: stretch;
        margin: 1rem;
    }

    body {
        background-attachment: scroll;
    }

    main {
        padding: 1.25rem 1rem 2rem;
    }

    main > h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    .cta-button {
        width: 100%;
    }

    .content-section,
    .info-section {
        padding: 1.25rem;
    }

    .site-footer {
        padding: 1.5rem 1.25rem;
    }

    .floating-buttons {
        right: 1rem;
        left: 1rem;
        align-items: stretch;
    }
}
.container {
    max-width: 960px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--surface-primary), var(--surface-secondary));
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 20%, rgba(31, 138, 95, 0.08), transparent 30%),
        radial-gradient(circle at 88% 14%, rgba(198, 40, 40, 0.08), transparent 30%),
        radial-gradient(circle at 18% 88%, rgba(246, 173, 85, 0.08), transparent 32%);
    opacity: 0.8;
}
form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    background: linear-gradient(180deg, var(--surface-secondary), var(--surface-primary));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.card-grid .card {
    margin-bottom: 0;
}
input, textarea, select {
    padding: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-color);
}
button {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(198, 40, 40, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
button.secondary {
    background: var(--button-secondary-bg);
}
button:hover,
button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 138, 96, 0.24);
    filter: brightness(1.03);
}
.announcement-block {
    background: var(--announcement-bg);
    border: 1px solid var(--announcement-border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.announcement-block h3 {
    margin: 0;
}
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.announcement-meta {
    font-size: 0.9rem;
    color: var(--muted-text);
}
.announcement-manage {
    margin-top: 1rem;
}
.announcement-manage summary {
    cursor: pointer;
    font-weight: 600;
}
.announcement-manage form {
    margin-top: 0.75rem;
}
.announcement-delete {
    display: inline-block;
    gap: 0;
    margin-top: 0.5rem;
}
.announcement-delete button {
    margin-top: 0;
}
.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}
.alert.success {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
}
.alert.error {
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
}
.error-list {
    margin: 0;
    padding-left: 1.25rem;
}
.input-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}
.post, .marketplace-item {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--surface-primary);
}
.post-content-wrapper {
    position: relative;
}
.post-content {
    --post-collapse-height: 260px;
    position: relative;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.6;
    word-wrap: break-word;
}
.post-content[data-collapsed="true"] {
    max-height: var(--post-collapse-height);
    overflow: hidden;
}
.post-content[data-collapsed="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface-primary));
    pointer-events: none;
}
.post-content-toggle {
    margin-top: 0.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-secondary);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.post-content-toggle:hover,
.post-content-toggle:focus-visible {
    background: var(--header-link-hover);
    border-color: var(--accent);
    outline: none;
    transform: translateY(-1px);
}
.post-content-toggle:active {
    transform: translateY(0);
}
.post-image {
    margin: 0.75rem 0;
    display: inline-block;
}
.post-image-thumbnail {
    max-width: 220px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-image-thumbnail:hover,
.post-image-thumbnail:focus {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.lightbox-trigger {
    cursor: pointer;
}

.lightbox-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.post-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0;
}
.post-photo {
    background: #f8f9fb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--border-color);
}
.post-photo .post-image-thumbnail {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.post-video {
    margin: 0.75rem 0;
}

.post-video video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    background: #000;
}

.link-preview {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.link-preview:hover,
.link-preview:focus-visible {
    border-color: var(--accent-emerald);
    box-shadow: 0 10px 22px rgba(12, 64, 46, 0.18);
    transform: translateY(-1px);
    outline: none;
}

.link-preview-image {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.link-preview-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.link-preview-host {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-text);
}

.link-preview-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-preview-description {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lost-found-container {
    max-width: 760px;
}

.lost-found-create {
    margin-bottom: 2rem;
}

.lost-found-feed {
    margin-top: 2rem;
}

.lost-found-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.lost-found-status.lost {
    background: #fdecea;
    color: #b83226;
}

.lost-found-status.found {
    background: #e6fffa;
    color: #047481;
}

.lost-found-title {
    margin: 0.5rem 0 0.75rem;
}

.lost-found-meta {
    margin: 0.25rem 0 0;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.lost-found-details,
.lost-found-contact {
    margin: 0.35rem 0;
    color: var(--text-color);
}

.lost-found-contact {
    font-style: italic;
}

.lost-found-empty {
    margin-top: 1rem;
    color: var(--muted-text);
    font-style: italic;
}
.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
}
.image-modal-frame {
    position: relative;
    width: min(95vw, 1100px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 3.5rem;
}
.image-modal.is-visible {
    visibility: visible;
    opacity: 1;
}
.image-modal-body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.image-modal img {
    max-width: min(90vw, 960px);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.image-modal-counter {
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    min-height: 1.25rem;
}
.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-modal-prev {
    left: 1rem;
}

.image-modal-next {
    right: 1rem;
}

.image-modal-nav:hover,
.image-modal-nav:focus-visible,
.image-modal-close:hover,
.image-modal-close:focus {
    background: rgba(0, 0, 0, 0.8);
}
.image-modal-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.35);
}

.image-modal.image-modal-single .image-modal-nav {
    display: none;
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.1rem;
    background: linear-gradient(135deg, #f6ad55, #e63946);
    color: #1f120a;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.25);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease, background 0.2s ease;
    pointer-events: none;
    z-index: 60;
}

.back-to-top::before {
    content: '⬆';
    font-size: 1rem;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    box-shadow: 0 14px 36px rgba(230, 57, 70, 0.35);
    background: linear-gradient(135deg, #fbd38d, #f56565);
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        padding: 0.6rem 1rem;
    }
}
.marketplace-listings {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.marketplace-listings__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}
.marketplace-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.marketplace-search input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.marketplace-search button {
    padding: 0.5rem 1rem;
}
.marketplace-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}
.marketplace-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}
.marketplace-item-body {
    flex: 1 1 auto;
}
.marketplace-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.button-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--button-text);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}
.button-link:hover {
    background: #16306d;
}
.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.post-author-image,
.post-author-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.post-author-image {
    flex-shrink: 0;
}
.post-author-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1f3c88;
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}
.post-author-details h3 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.comments {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.comments-toggle {
    margin-top: 0.5rem;
    border: 1px solid var(--toggle-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    background: var(--toggle-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.comments-toggle summary {
    margin: 0;
    padding: 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}
.comments-toggle summary:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.comments-toggle summary::-webkit-details-marker {
    display: none;
}
.comments-toggle summary::before {
    content: '▸';
    font-size: 0.85rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}
.comments-toggle[open] {
    background: var(--surface-primary);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(31, 60, 136, 0.08);
}
.comments-toggle[open] summary::before {
    transform: rotate(90deg);
}
.comments-toggle[open] summary {
    color: var(--accent);
}
.comments-content {
    margin-top: 0.75rem;
}
.comment {
    background: var(--comment-bg);
    padding: 0.75rem 1rem;
    border-radius: 18px;
    margin-bottom: 0.75rem;
    display: inline-block;
    max-width: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.comment strong {
    display: block;
    font-size: 0.95rem;
}
.comment p {
    margin: 0.35rem 0 0;
}
.comment small {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
}
.comment-replies {
    margin-left: 2.5rem;
    padding-left: 0.75rem;
    border-left: none;
}
.comment-replies .comment {
    margin-top: 0.5rem;
    background: rgba(240, 242, 245, 0.9);
}
.comments form {
    margin-top: 0.5rem;
}
.reactions,
.comment-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.reaction-form {
    margin: 0;
}
.reaction-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--reaction-border);
    border-radius: 50%;
    background: var(--surface-primary);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.reaction-button:hover {
    background: var(--toggle-bg);
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(31, 60, 136, 0.15);
}
.reaction-button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--button-text);
    box-shadow: 0 2px 6px rgba(31, 60, 136, 0.25);
}
.reaction-button .reaction-emoji {
    font-size: 1.1rem;
    line-height: 1;
}
.reaction-button .reaction-count,
.reaction-button .reaction-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.post h3, .marketplace-item h3 {
    margin-top: 0;
}
.friend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.friend-card {
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--surface-secondary);
}
.banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}
.business-banner {
    margin-bottom: 1rem;
}
.banner-placeholder {
    background: var(--surface-secondary);
    border: 1px dashed var(--border-color);
    color: var(--muted-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}
.group-card-banner {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--surface-secondary);
}
.group-thumbnail {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}
.group-card-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
}
.profile-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    margin-top: -48px;
}
.profile-header {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-secondary);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
}
.profile-header > div {
    padding: 1rem;
}
.profile-header h2 {
    margin-bottom: 0.35rem;
}
.profile-header .banner {
    border-radius: 0;
}
.profile-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}
.notification-panel {
    position: relative;
    width: 100%;
    max-width: 320px;
}
.notification-panel[open] {
    box-shadow: var(--card-shadow);
}
.notification-bell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.notification-bell::-webkit-details-marker {
    display: none;
}
.notification-bell:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.bell-icon {
    font-size: 1.1rem;
}
.notification-count {
    background: #e11d48;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    min-width: 1.5rem;
    text-align: center;
}
.notification-list {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 320px;
    overflow-y: auto;
}
.notification-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}
.notification-item {
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-secondary);
}
.notification-item.unread {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(31, 60, 136, 0.12);
}
.notification-message {
    margin-bottom: 0.25rem;
}
.notification-meta {
    color: var(--muted-text);
}
.badge {
    background: var(--accent);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
}
.badge.verified {
    background: var(--button-bg);
}
.badge.founding {
    background: #28a745;
}
.badge.owner {
    background: #111827;
}
.badge.admin {
    background: #0ea5e9;
}
.badge.moderator {
    background: #6b21a8;
}
.badge.pending {
    background: #ff9800;
}

.marketplace-detail {
    display: grid;
    gap: 1.5rem;
}
.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.back-link:hover {
    text-decoration: underline;
}
.marketplace-detail-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    background: var(--surface-primary);
}
.marketplace-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--muted-text);
}
.marketplace-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}
.marketplace-gallery-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.marketplace-messages {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    background: var(--surface-primary);
}
.marketplace-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.marketplace-conversations {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.conversation-link {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--toggle-bg);
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}
.conversation-link.active {
    background: var(--accent);
    color: var(--button-text);
}
.marketplace-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}
.marketplace-message {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    background: #f9fafb;
}
.marketplace-message.mine {
    background: #e8f1ff;
    border-color: #c6d7ff;
}
.message-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 0.5rem;
}
.marketplace-message-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}
.marketplace-message-form textarea {
    resize: vertical;
}
.marketplace-message-form button {
    align-self: flex-start;
}
.marketplace-messages-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.marketplace-messages-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .marketplace-messages-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

.marketplace-conversation-list {
    flex: 0 0 280px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.marketplace-conversation-list h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.marketplace-conversation-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.marketplace-conversation-list li {
    border-bottom: 1px solid var(--border-color);
}

.marketplace-conversation-list li:last-child {
    border-bottom: none;
}

.marketplace-conversation-list a {
    display: block;
    padding: 0.75rem 0;
    color: inherit;
}

.marketplace-conversation-list li.active a {
    font-weight: bold;
}

.conversation-title {
    display: block;
}

.conversation-partner,
.conversation-updated {
    display: block;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.marketplace-conversation-detail {
    flex: 1 1 auto;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.marketplace-conversation-detail header h3 {
    margin-top: 0;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.muted {
    color: var(--muted-text);
    font-size: 0.9rem;
}
.profile-links {
    margin: 1rem 0;
}
.profile-links a {
    margin-right: 1rem;
    font-weight: 600;
}
.profile-links a:not(:last-child)::after {
    content: '|';
    display: inline-block;
    margin-left: 1rem;
    color: var(--muted-text);
}
.share-invite {
    margin: 1.5rem 0;
}
.share-invite-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--surface-secondary);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.share-invite-copy h3 {
    margin: 0 0 0.35rem 0;
}
.share-invite-copy p {
    margin: 0;
    color: var(--muted-text);
}
.share-invite-form {
    display: grid;
    gap: 0.75rem;
}
.share-invite-form textarea {
    width: 100%;
}
.share-invite-form button {
    justify-self: start;
}
@media (min-width: 768px) {
    .share-invite-card {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.photo-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    background: var(--surface-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.photo-card .photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: end;
    max-width: 420px;
}
.search-form label {
    grid-column: 1 / -1;
    font-weight: 600;
}
.search-form button {
    height: 100%;
}
.page-intro {
    color: var(--muted-text);
}
.status-pill {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}
.status-pill.verified {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
}
.business-directory-list {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: stretch;
}
.business-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--surface-secondary);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.business-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.business-card__title {
    margin: 0;
}
.business-card__title a {
    color: inherit;
}
.business-card__description {
    color: var(--muted-text);
}
.business-card-meta {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin: 0.75rem 0;
}
.business-card__actions {
    margin-top: auto;
}
.business-directory-empty {
    grid-column: 1 / -1;
    color: var(--muted-text);
}
.business-page-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.business-owner {
    font-weight: 600;
}
.business-owner-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 0.75rem;
    border: 2px solid var(--accent);
}
.owner-note {
    background: var(--surface-secondary);
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    color: var(--text-color);
}
.business-management {
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--surface-secondary);
}
.business-form textarea {
    resize: vertical;
}
.business-post {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: var(--surface-primary);
    box-shadow: var(--card-shadow);
}
.business-post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.inline-form {
    display: inline;
}
.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}
.link-button:hover,
.link-button:focus {
    color: var(--button-bg);
}
.business-comments {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.business-comment {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}
.business-comment p {
    margin: 0.5rem 0 0;
}
.business-comment:last-of-type {
    border-bottom: none;
}
.comment-form {
    margin-top: 1rem;
}
.business-gallery {
    margin-top: 2rem;
}
.business-photo-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.business-photo {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--surface-primary);
    box-shadow: var(--card-shadow);
}
.business-photo figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--muted-text);
}
.business-photo-meta {
    font-size: 0.8rem;
    color: var(--muted-text);
    margin-top: 0.5rem;
}

@media (max-width: 720px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header h1 a {
        display: inline-flex;
        align-items: center;
    }

    header nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    header nav a {
        text-align: center;
        padding: 0.6rem 0.75rem;
    }

    main {
        padding: 0.75rem 0.5rem;
    }

    .container {
        margin: 0;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 1.25rem;
    }

    .announcement-header,
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .announcement-meta {
        width: 100%;
    }

    .reactions,
    .comment-reactions {
        justify-content: flex-start;
    }

    .marketplace-item {
        flex-direction: column;
        align-items: stretch;
    }

    .marketplace-item-actions {
        justify-content: flex-start;
    }

    .marketplace-thumb {
        width: 100%;
        height: auto;
        max-height: 240px;
    }

    .marketplace-gallery {
        justify-content: center;
    }

    .friend-list {
        flex-direction: column;
    }

    .business-photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    form {
        grid-template-columns: 1fr;
    }

    input,
    textarea,
    select,
    button {
        font-size: 1rem;
    }
}

.events-calendar {
    display: grid;
    gap: 2rem;
}

.calendar-header {
    display: grid;
    gap: 0.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-nav-btn {
    background: #e8edfa;
    color: #1f3c88;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}

.calendar-nav-btn:hover,
.calendar-nav-btn:focus {
    background: #d4def7;
}

.calendar-month-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f3c88;
}

.calendar-grid {
    background: #f7f9fc;
    border: 1px solid #dde3f4;
    border-radius: 8px;
    padding: 1rem;
}

.calendar-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #495470;
    margin-bottom: 0.75rem;
}

.calendar-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-cell {
    min-height: 110px;
    background: #eef2fb;
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-cell--current-month {
    background: #fff;
    border: 1px solid #dde3f4;
}

.calendar-cell--today {
    border-color: #1f3c88;
    box-shadow: 0 0 0 2px rgba(31, 60, 136, 0.15);
}

.calendar-date {
    font-weight: 700;
    color: #1f3c88;
}

.calendar-cell--has-events .calendar-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.calendar-cell--has-events .calendar-date::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f3c88;
}

.calendar-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.calendar-events li {
    display: flex;
    gap: 0.35rem;
    align-items: baseline;
    font-size: 0.85rem;
}

.calendar-event-link {
    display: inline-flex;
    gap: 0.35rem;
    align-items: baseline;
    color: inherit;
    text-decoration: none;
}

.calendar-event-link:hover .calendar-event-title,
.calendar-event-link:focus .calendar-event-title {
    text-decoration: underline;
}

.calendar-event-time {
    font-weight: 600;
    color: #1f3c88;
}

.calendar-event-title {
    color: #333;
}

.calendar-share {
    border: 1px solid #dde3f4;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f7f9fc;
}

.calendar-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    color: #1f3c88;
}

.calendar-form input,
.calendar-form textarea {
    border-color: #c7d2fe;
}

.calendar-upcoming {
    display: grid;
    gap: 1rem;
}

.upcoming-events-list {
    display: grid;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.upcoming-event {
    border: 1px solid #dde3f4;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    display: grid;
    gap: 0.75rem;
}

.upcoming-event-media {
    border: 1px solid #dde3f4;
    border-radius: 8px;
    overflow: hidden;
}

.upcoming-event-media img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
}

.upcoming-event-details h4 {
    margin: 0;
}

.upcoming-event-details p {
    margin: 0.25rem 0 0;
}

.event-details-link {
    font-weight: 600;
    color: #1f3c88;
    text-decoration: none;
}

.event-details-link:hover,
.event-details-link:focus {
    text-decoration: underline;
}

.upcoming-event-host {
    font-weight: 600;
    color: #1f3c88;
}

.event-delete-form {
    justify-self: start;
}

.event-details {
    display: grid;
    gap: 1.25rem;
}

.event-details__header {
    display: grid;
    gap: 0.4rem;
}

.event-details__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495470;
    margin: 0.2rem 0 0;
}

.event-details__host {
    margin: 0;
    font-weight: 600;
    color: #1f3c88;
}

.event-details__media {
    border: 1px solid #dde3f4;
    border-radius: 8px;
    overflow: hidden;
}

.event-details__media img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.event-details__description {
    border: 1px solid #dde3f4;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: #fff;
    display: grid;
    gap: 0.5rem;
}

@media (max-width: 700px) {
    .calendar-day-names,
    .calendar-cells {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-cell {
        min-height: 90px;
    }
}

.flying-sleigh {
    position: fixed;
    top: var(--sleigh-start-y, 14vh);
    left: var(--sleigh-start-x, -28vw);
    width: clamp(130px, 16vw, 240px);
    pointer-events: none;
    z-index: 30;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
    animation: sleigh-flight var(--sleigh-duration, 18s) linear forwards;
}

@keyframes sleigh-flight {
    from {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(var(--sleigh-rotation-start, -3deg));
    }

    10% {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translate3d(var(--sleigh-end-x, 150vw), var(--sleigh-end-y, -26vh), 0)
            rotate(var(--sleigh-rotation-end, 3deg));
    }
}

.faq-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--card-shadow);
}

.faq-item dt {
    font-weight: bold;
    margin-bottom: 0.35rem;
}

.faq-item dd {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.6;
}

.faq-item ol {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.25rem;
}

.faq-item a {
    color: var(--accent-emerald);
    font-weight: bold;
}

.faq-item a:hover {
    text-decoration: underline;
}
