﻿[x-cloak] {
    display: none !important;
}

:root {
    --mall-header-offset: 80px;
    --mall-modal-gap: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-attachment: fixed;
}

::selection {
    background: rgba(156, 103, 55, 0.16);
}

.product-cover,
.bg-cover {
    background-color: #e9dbc9;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    top: 5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-item {
    min-width: 240px;
    max-width: 360px;
    border-radius: 1rem;
    border: 1px solid rgba(156, 103, 55, 0.16);
    background: rgba(255, 250, 243, 0.96);
    padding: 0.9rem 1rem;
    box-shadow: 0 18px 35px rgba(47, 36, 25, 0.15);
    color: #2f2419;
    backdrop-filter: blur(12px);
}

.toast-item.success {
    border-color: rgba(117, 138, 115, 0.25);
}

.toast-item.error {
    border-color: rgba(201, 135, 120, 0.3);
}

textarea {
    min-height: 120px;
}

.prose img {
    border-radius: 1rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: calc(var(--mall-header-offset) + var(--mall-modal-gap)) 1rem 1.5rem;
    background: rgba(47, 36, 25, 0.45);
    backdrop-filter: blur(2px);
}

.modal-panel {
    width: 100%;
    max-height: calc(100vh - var(--mall-header-offset) - (var(--mall-modal-gap) * 2));
}

.back-top-button {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
    border: 1px solid rgba(156, 103, 55, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 243, 0.96);
    box-shadow: 0 18px 35px rgba(47, 36, 25, 0.15);
    color: #2f2419;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(10px);
}

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

@media (max-width: 640px) {
    .toast-stack {
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 1rem;
    }

    .toast-item {
        min-width: auto;
        max-width: none;
    }

    .modal-overlay {
        align-items: flex-start;
    }

    .back-top-button {
        right: 0.85rem;
        bottom: 0.85rem;
    }
}
