html {
    height: 100%;
    background-color: #3d2415;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh + 200px);
    height: 100lvh;
    background-image: url('/img/site/background_day.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
}

html.scene-night body::before {
    background-image: url('/img/site/background_night.png');
}

body {
    margin: 0;
    padding: 30px 0; 
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; 
}

@keyframes fadeScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeScaleOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes accessPanelIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.access-panel {
    display: none;
}

.access-panel.active {
    display: block;
    animation: accessPanelIn 0.3s ease-out;
}

.form-container.fade-out {
    animation: fadeScaleOut 0.35s ease-in forwards;
}

.form-container {
    position: relative;
    padding: 24px;
    width: 280px;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(150deg, #5b3a22 0%, #4b301c 50%, #3d2415 100%);
    border: 2px solid #2a1a11;
    box-shadow: 0 6px 18px rgba(0,0,0,0.75), inset 0 0 5px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: fadeScaleIn 0.6s ease-out forwards;
}

.logo {
    width: 180px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55));
}

input[type="text"],
input[type="email"],
input[type="password"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    padding: 7px;
    border: 2px solid #2c1b10;
    border-radius: 5px;
    margin-top: 8px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #2e1e13, #3c281c);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.45);
    font-family: 'VT323', monospace;
    font-size: var(--fs-base);
    color: #e8d8c3;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.password-wrapper {
    position: relative;
    display: inline-block;
    width: 90%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 38px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: #a89070;
    width: auto;
    box-shadow: none;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #d9b37e;
}

.password-toggle::before {
    display: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

input:focus {
    border-color: #a87a43;
    outline: none;
    box-shadow: 0 0 8px rgba(160,110,60,0.45), inset 0 0 6px rgba(0,0,0,0.4);
}

.hint {
    width: 90%;
    font-size: var(--fs-x-small);
    color: #c9a86b;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
    pointer-events: none;
    text-align: center;
}

.hint.second {
    margin-top: 0;
}

input:focus + .hint,
input:focus + .hint + .hint.second,
.password-wrapper:has(input:focus) + .hint,
.password-wrapper:has(input:focus) + .hint + .hint.second {
    opacity: 1;
    transform: translateY(0);
    max-height: 3em;
    margin: -6px auto 6px;
}

input:focus + .hint + .hint.second,
.password-wrapper:has(input:focus) + .hint + .hint.second {
    margin-top: -2px;
    max-height: 6em;
}

button {
    width: 92%;
    padding: 13px 10px;
    margin: 12px 0;
    background: linear-gradient(180deg, #d5b06a 0%, #b07b3c 100%);
    border: 3px solid #2d1b0d;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #1a0e05;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 #2d1b0d,
        0 6px 12px rgba(0,0,0,0.7);
    transition: background 0.25s;
    text-align: center;
}

button::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 5px;
    background: linear-gradient(120deg,
        #e8d08c,
        #f9e49a,
        #c89a5a,
        #e8d08c
    );
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

button:hover::before {
    opacity: .5;
}

@keyframes innerGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

button span {
    position: relative;
    z-index: 1;
}

.button-disabled {
    opacity: .45;
    pointer-events: none;
    user-select: none;
}

.terms-container {
    width: 90%;
    margin: 4px auto 8px;
    display: flex;
    align-items: center;
    text-align: left;
    line-height: 1.4;
    font-size: var(--fs-small);
    color: #e8d8c3;
}

.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 16px auto 0;
}

.terms-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #a87a43;
}

.terms-container a {
    color: #d9b37e;
    text-decoration: none;
}

.terms-container a:hover {
    text-decoration: underline;
}

.toggle-link {
    margin-top: 16px;
    font-size: var(--fs-small);
    color: #e8d8c3;
    line-height: 1.5;
}

.toggle-link a {
    color: #d9b37e;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-link a:hover:not(.disabled) {
    text-decoration: underline;
    color: #e8c99a;
}

.toggle-link a.disabled {
    color: #7a6550;
    cursor: not-allowed;
    pointer-events: none;
}

.welcome-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.welcome-wrapper h2,
.welcome-wrapper p,
.welcome-wrapper form {
    margin: 0;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: var(--fs-small);
    color: #e8d8c3;
    margin-bottom: 2px;
}

.welcome-gardens-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 44px;
    background: linear-gradient(180deg, #d5b06a 0%, #b07b3c 100%);
    border: 2px solid #2d1b0d;
    border-radius: 4px;
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #1a0e05;
    font-size: 22px;
    line-height: 1;
    overflow: hidden;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    z-index: 1;
}

.welcome-gardens-arrow::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 2px;
    background: linear-gradient(120deg, #e8d08c, #f9e49a, #c89a5a, #e8d08c);
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

@media (hover: hover) {
    .welcome-gardens-arrow:hover {
        background: linear-gradient(180deg, #e8c99a 0%, #c89a5a 100%);
        box-shadow: 0 3px 0 #2d1b0d, 0 4px 8px rgba(0,0,0,0.5);
    }

    .welcome-gardens-arrow:hover::before {
        opacity: 0.5;
    }
}

.welcome-gardens-arrow:active {
    transform: translateY(calc(-50% + 2px));
    box-shadow: 0 1px 0 #2d1b0d, 0 2px 4px rgba(0,0,0,0.35);
}

.welcome-gardens-arrow span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    line-height: 1;
}

.welcome-gardens {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-gardens-shelf {
    position: relative;
    background: linear-gradient(145deg, #2e1e13, #3c281c);
    border: 2px solid rgba(44, 27, 16, 0.95);
    border-radius: 8px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.35);
    padding: 10px 20px;
}

.welcome-gardens-niche {
    background: linear-gradient(135deg, #5b3a22 0%, #4b301c 100%);
    border: 3px solid #2a1a11;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.7), inset 0 0 6px rgba(0,0,0,0.4);
    padding: 6px;
}

.welcome-gardens-viewport {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.welcome-gardens-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.welcome-gardens-img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    cursor: pointer;
}

#welcome-garden-modal .modal-content {
    width: 90vw;
    max-width: 960px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
}

#welcome-garden-modal .modal-preview-image {
    max-width: 100%;
    max-height: 60vh;
}

#welcome-garden-modal .modal-close {
    margin: 0;
}

#welcome-garden-modal .modal-btn {
    width: auto;
    margin: 0;
}

.welcome-gardens-prev {
    left: -14px;
}

.welcome-gardens-next {
    right: -14px;
}

.guest-btn {
    width: 92%;
    padding: 13px 10px;
    margin: 12px 0;
    background: linear-gradient(180deg, #6b7c3f 0%, #5a6b35 100%);
    border: 3px solid #7d8f4a;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 0 #2d1b0d,
        0 6px 12px rgba(0,0,0,0.7);
    transition: background 0.25s;
    text-align: center;
}

.guest-btn::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 5px;
    background: linear-gradient(120deg,
        #7d8f4a,
        #8ba055,
        #6b7c3f,
        #7d8f4a
    );
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

.guest-btn:hover::before {
    opacity: .5;
}

.guest-btn:hover {
    background: linear-gradient(180deg, #7d8f4a 0%, #6b7c3f 100%);
}

.guest-btn span {
    position: relative;
    z-index: 1;
}

.cookie-consent-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(150deg, #5b3a22 0%, #4b301c 50%, #3d2415 100%);
    border-top: 2px solid #2a1a11;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.6);
    padding: 14px 20px;
    display: none;
    align-items: center;
    gap: 16px;
    z-index: 1000;
}

.cookie-consent-bar.active {
    display: flex;
}

.cookie-consent-text {
    flex: 1;
    color: #e8d8c3;
    font-size: var(--fs-small);
    margin: 0;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #d9b37e;
    text-decoration: none;
}

.cookie-consent-text a:hover {
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-consent-btn {
    width: auto;
    padding: 7px 14px;
    margin: 0;
    border: 2px solid #2c1b10;
    border-radius: 6px;
    font-size: var(--fs-small);
    font-weight: 600;
    color: #fff;
    transition: all 0.2s;
}

.cookie-consent-btn-reject {
    background: linear-gradient(180deg, #8b3a3a 0%, #723030 100%);
    border-color: #a04545;
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
    color: #fff;
}

.cookie-consent-btn-reject::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background: linear-gradient(120deg, #a04545, #b05555, #8b3a3a, #a04545);
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

.cookie-consent-btn-reject:hover::before {
    opacity: .5;
}

.cookie-consent-btn-reject:hover {
    background: linear-gradient(180deg, #a04545 0%, #8b3a3a 100%);
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
}

.cookie-consent-btn-reject:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
}

.cookie-consent-btn-accept {
    background: linear-gradient(180deg, #6b7c3f 0%, #5a6b35 100%);
    border-color: #7d8f4a;
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
    color: #fff;
}

.cookie-consent-btn-accept::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background: linear-gradient(120deg, #7d8f4a, #8ba055, #6b7c3f, #7d8f4a);
    background-size: 300% 300%;
    z-index: 0;
    animation: innerGlow 2s linear infinite;
    opacity: 0;
    transition: opacity 0.25s;
}

.cookie-consent-btn-accept:hover::before {
    opacity: .5;
}

.cookie-consent-btn-accept:hover {
    background: linear-gradient(180deg, #7d8f4a 0%, #6b7c3f 100%);
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
}

.cookie-consent-btn-accept:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2d1b0d, 0 3px 6px rgba(0,0,0,0.45);
}

@media (max-width: 600px) {
    .form-container {
        width: 90%;
        padding: 20px;
        box-sizing: border-box;
    }

    .welcome-chat {
        width: 90%;
    }
	
    .logo {
        width: 160px;
    }
	
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 9px;
    }
	
    button {
        padding: 13px;
        margin-top: 14px;
        margin-bottom: 10px;
    }
	
    .terms-container {
        margin-bottom: 12px;
        font-size: var(--fs-base);
        line-height: 1.5;
    }
	
    .terms-container input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin-right: 8px;
    }

    .cookie-consent-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-consent-btn {
        flex: 1;
    }
}

.welcome-chat {
    position: relative;
    width: 332px;
    max-width: 90%;
    height: 96px;
    margin-bottom: 16px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.welcome-chat.welcome-chat-ready {
    opacity: 1;
}

.welcome-chat-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.welcome-chat-bubble {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(150deg, #5b3a22 0%, #4b301c 50%, #3d2415 100%);
    border: 2px solid #2a1a11;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 0 5px rgba(0,0,0,0.4);
    text-align: left;
    box-sizing: border-box;
}

.welcome-chat-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #a87a43;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    object-fit: cover;
}

.welcome-chat-avatar.avatar-male {
    border-color: #a8c8e8;
}

.welcome-chat-avatar.avatar-female {
    border-color: #e8a8c8;
}

.welcome-chat-avatar.avatar-other {
    border-color: #a8d5b0;
}

.welcome-chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.welcome-chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.welcome-chat-name {
    font-family: var(--font-main);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--title-color);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.welcome-chat-role {
    font-family: var(--font-main);
    font-size: var(--fs-x-small);
    font-weight: 600;
    padding: 1px 7px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.welcome-chat-text {
    font-family: var(--font-main);
    font-size: var(--fs-small);
    color: #e8d8c3;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.welcome-chat-mobile {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.welcome-chat-mobile.welcome-chat-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.welcome-chat-mobile.welcome-chat-leaving {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
}

@media (min-width: 1100px) {
    .welcome-chat {
        position: fixed;
        right: 28px;
        bottom: 28px;
        width: 300px;
        height: 70vh;
        max-height: 620px;
        margin-bottom: 0;
        pointer-events: none;
    }

    .welcome-chat-track {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
        mask-image: linear-gradient(to bottom, transparent 0%, #000 16%);
    }

    .welcome-chat-text {
        -webkit-line-clamp: 4;
    }

    .welcome-chat-desktop {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
        overflow: hidden;
        transform: translateY(20px) scale(0.96);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    max-height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    margin-top 0.7s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: opacity, transform, max-height;
    }

    .welcome-chat-desktop.welcome-chat-visible {
        opacity: 1;
        max-height: 180px;
        margin-top: 12px;
        transform: translateY(0) scale(1);
    }

    .welcome-chat-desktop.welcome-chat-leaving {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
        transform: translateY(-14px) scale(0.96);
    }
}
