:root {
    --bg: #f8f3ee;
    --bg-alt: #efe6dd;
    --text: #3a2f2a;
    --muted: #7a6a62;
    --accent: #b88b6a;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.hero {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
        url("/static/images/Oslo.jpg") center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--white);
}

.sub-hero {
    background: linear-gradient(to bottom, #eadfd4, #f8f3ee);
    border-bottom: 1px solid rgba(122, 106, 98, 0.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.12), rgba(20, 20, 20, 0.35));
}

.navbar,
.hero-content {
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 48px;
    gap: 20px;
}

.logo {
    font-size: 1.4rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.brand-logo-image {
    width: 50px;
    height: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 22px;
    font-size: 0.95rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.25s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hero-content {
    text-align: center;
    padding: 80px 20px 120px;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    opacity: 0.95;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    margin-bottom: 16px;
}

.hero-date {
    font-size: 1.1rem;
    margin-bottom: 28px;
}

.section {
    padding: 90px 20px;
}

.page-section {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.narrow {
    max-width: 760px;
    text-align: center;
}

.section-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.page-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 400;
    margin-bottom: 24px;
}

.lead {
    font-size: 1.15rem;
    color: var(--text);
    margin: 0 auto 28px;
    max-width: 710px;
    text-align: justify;
    text-align-last: center;
    line-height: 1.85;
    white-space: pre-line;
}

.countdown-section {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
}

.countdown-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    font-weight: 400;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

#countdown div {
    min-width: 110px;
    background: var(--bg);
    border-radius: 20px;
    padding: 22px 16px;
    box-shadow: var(--shadow);
}

#countdown span {
    display: block;
    font-size: 2rem;
    margin-bottom: 6px;
}

#countdown small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
}

.content-card {
    background: var(--white);
    padding: 32px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: left;
    margin-top: 18px;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.placeholder-box {
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    background: linear-gradient(135deg, #d8c2b0, #f4ece5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    box-shadow: var(--shadow);
}

.footer {
    text-align: center;
    padding: 32px 20px;
    background: #e8ddd2;
    color: var(--text);
}

.footer p {
    margin-bottom: 10px;
}

@media (max-width: 960px) {
    .navbar {
        padding: 20px 24px;
        flex-direction: column;
    }

    .nav-links {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .placeholder-grid {
        grid-template-columns: 1fr;
    }

    #countdown div {
        min-width: 90px;
    }
}


.gallery-grid-clean {
    display: grid;
    grid-template-columns: repeat(auto-fit, 700px);
    justify-content: center;
    gap: 32px;
    align-items: start;
    margin: 36px auto 0;
}

.memory-photo {
    margin: 0;
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.10))
            drop-shadow(0 22px 35px rgba(0, 0, 0, 0.10));
}

.memory-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.memory-photo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.14))
            drop-shadow(0 30px 45px rgba(0, 0, 0, 0.12));
}

.photo-1 {
    transform: rotate(-4deg);
}

.photo-2 {
    transform: rotate(4deg);
}

.photo-3 {
    transform: rotate(-3eg);
}

.photo-4 {
    transform: rotate(3deg);
}

.photo-5 {
    transform: rotate(-2deg);
}

.photo-6 {
    transform: rotate(-3deg);
}

@media (max-width: 700px) {
    .gallery-grid-clean {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .photo-1,
    .photo-2,
    .photo-3,
    .photo-4,
    .photo-5,
    .photo-6 {
        transform: rotate(0deg);
    }
}


.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 38px;
    align-items: start;
    margin-top: 36px;
}

.contact-image-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12);
    min-height: 806px;
    background: #e9dfd6;
}

.contact-image-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 806px;
    object-fit: cover;
}

.contact-info-panel {
    display: grid;
    gap: 20px;
}

.contact-intro-card,
.contact-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(184, 139, 106, 0.16);
    border-radius: 24px;
    padding: 26px 26px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
    text-align: left;
}

.contact-intro-card h2,
.contact-card h3 {
    font-weight: 400;
    margin-bottom: 12px;
}

.contact-intro-card h2 {
    font-size: 1.8rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    color: var(--text);
}

.contact-person {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 18px;
}

.contact-person:first-of-type {
    margin-top: 6px;
}

.contact-icon {
    color: var(--accent);
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 2px;
}

.contact-name {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-card a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(184, 139, 106, 0.35);
}

.contact-card a:hover {
    border-bottom-color: rgba(184, 139, 106, 0.8);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    position: relative;
    padding-left: 20px;
    margin-top: 10px;
}

.contact-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.location-line {
    font-weight: 600;
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-image-card,
    .contact-image-card img {
        min-height: 380px;
    }
}

.program-intro {
    max-width: 640px;
    margin: 0 auto 36px;
    text-align: center;
    color: var(--muted);
}

.timeline-elegant {
    position: relative;
    max-width: 780px;
    margin: 10px auto 0;
    padding-left: 36px;
}

.timeline-elegant::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 24px;
    bottom: -5px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(184, 139, 106, 0.15),
        rgba(184, 139, 106, 0.65),
        rgba(184, 139, 106, 0.15)
    );
}

.timeline-event {
    position: relative;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 28px;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 32px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(184, 139, 106, 0.14);
}

.timeline-time {
    font-size: 1rem;
    letter-spacing: 1px;
    color: var(--accent);
    padding-top: 25px;
    text-align: right;
    white-space: nowrap;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(184, 139, 106, 0.14);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
    text-align: left;
}

.timeline-card h3 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.timeline-card p {
    color: var(--muted);
}


@media (max-width: 700px) {
    .timeline-elegant {
        padding-left: 28px;
    }

    .timeline-event {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .timeline-time {
        text-align: left;
        padding-top: 0;
    }

    .timeline-dot {
        left: -22px;
        top: 10px;
    }
}

.secret-hotspot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    z-index: 3;
    background: rgba(255, 180, 90, 0.08);
    box-shadow: 0 0 4px rgba(255, 180, 90, 0.10);
    display: block;
}

.secret-hotspot:hover {
    background: rgba(255, 180, 90, 0.22);
    box-shadow: 0 0 10px rgba(255, 180, 90, 0.25);
}

.gift-page-content {
    margin-top: 30px;
}

.gift-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 26px 0 24px;
}

.gift-shelf-image {
    display: block;
    max-width: 420px;
    width: 100%;
    height: auto;
}

.gift-note {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text);
}

.gift-note p {
    font-size: 1.15rem;
    line-height: 1.85;
    text-align: justify;
    text-align-last: center;
}


.auth-form {
    display: grid;
    gap: 14px;
    max-width: 420px;
    margin: 30px auto 0;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d5c7bb;
    border-radius: 14px;
    background: var(--white);
    font: inherit;
}

.flash-wrap {
    max-width: 760px;
    margin: 0 auto 24px;
}

.flash-message {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(184, 139, 106, 0.18);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
     white-space: pre-line;
}

.game-header {
    margin-top: 24px;
    text-align: center;
}

.game-progress {
    color: var(--muted);
}

.game-list {
    max-width: 700px;
    margin: 30px auto 0;
    display: grid;
    gap: 18px;
    padding-left: 6px;
}

.game-row {
    position: relative;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(184, 139, 106, 0.18);
    border-radius: 22px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    align-items: center;
}

.game-row.solved {
    border-color: rgba(82, 150, 104, 0.35);
}

.game-hint {
    font-size: 1.1rem;
    color: var(--text);
}

.game-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.game-input {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    border: 1px solid #d5c7bb;
    border-radius: 12px;
    font: inherit;
    background: var(--white);
}

.solved-input {
    background: #eef8f0;
    border-color: #8dbc99;
}

.game-status {
    color: #529668;
    font-size: 1.4rem;
}

.small-btn {
    padding: 10px 18px;
    font-size: 0.95rem;
}

.admin-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

.admin-item {
    padding: 14px 0;
    border-top: 1px solid rgba(184, 139, 106, 0.14);
}

.admin-item form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.admin-item input {
    padding: 10px 12px;
    border: 1px solid #d5c7bb;
    border-radius: 12px;
    font: inherit;
}


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

.locked-row {
    opacity: 0.92;
}

.disabled-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.disabled-input {
    background: #ece7e1;
    color: #8b7d73;
    border: 1px solid #d8ccc1;
    cursor: not-allowed;
}

.disabled-input::placeholder {
    color: #9b8e84;
}

.disabled-btn {
    background: #c9beb4;
    color: #f8f3ee;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.9;
}

.disabled-btn:hover {
    transform: none;
    opacity: 0.9;
}


.invite-view {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border: none;
}

.invite-image {
    display: block;
    width: min(100%, 950px);
    height: auto;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
}




.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-trigger {
    display: inline-block;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(184, 139, 106, 0.14);
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.10);
    padding: 8px 0;
    display: none;
    z-index: 20;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
    text-align: center;
    color: var(--text);
}

.nav-dropdown-menu a:hover {
    background: rgba(184, 139, 106, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}


.game-mobile-actions {
    display: none;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .game-mobile-actions {
        display: flex;
    }
}


.wrong-input {
    background: #fdf0f0;
    border-color: #d98c8c;
}

.success-status {
    color: #529668;
    font-size: 1.4rem;
}

.error-status {
    color: #b85c5c;
    font-size: 1.35rem;
    align-self: center;
}


.game-solver-count {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
    margin-top: -4px;
}


.leaderboard-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(184, 139, 106, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.leaderboard-rank {
    font-size: 1.1rem;
    color: var(--accent);
    text-align: center;
}

.leaderboard-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.leaderboard-score {
    color: var(--muted);
    white-space: nowrap;
}


.puzzle-number {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(184, 139, 106, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.puzzle-extra-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
    font-style: italic;
}



.invite-download-text {
    text-align: center;
    margin: 18px auto 24px;
    color: var(--muted);
    font-size: 1rem;
}

.invite-download-text a {
    color: var(--accent);
    border-bottom: 1px solid rgba(184, 139, 106, 0.45);
}

.invite-download-text a:hover {
    border-bottom-color: rgba(184, 139, 106, 0.9);
}