:root {
    --white: #ffffff;
    --off-white: #faf9f7;
    --cream: #f5f3f0;
    --blush: #f8e8e4;
    --rose: #e8c4bc;
    --dusty-rose: #d4a59a;
    --warm-gray: #9a8f8a;
    --text-dark: #4a4543;
    --text-light: #7a7270;
    --accent: #c9a598;
    --shadow: rgba(74, 69, 67, 0.1);
    --shadow-hover: rgba(74, 69, 67, 0.15);
    --danger: #e57373;
    --danger-dark: #d32f2f;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bakgrunn.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
}

h1, h2, h3 {
    font-weight: 300;
    letter-spacing: 0.05em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-light);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-dark);
}

p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--text-light);
}

a {
    color: var(--dusty-rose);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.page-wrapper {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 30px var(--shadow);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.card-large {
    max-width: 900px;
}

.landing-card {
    padding: 3rem 2rem;
}

.couple-names {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 300;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.ampersand {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--dusty-rose);
    display: block;
    font-style: italic;
}

.wedding-date {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--warm-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.intro-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
    padding: 0 0.5rem;
}

.decorative-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dusty-rose), transparent);
    margin: 1.5rem auto;
}

.hearts-decoration {
    width: clamp(35px, 8vw, 60px);
    height: auto;
    opacity: 0.7;
    margin: clamp(0.5rem, 2vw, 1rem) auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--dusty-rose);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--rose);
}

.btn-secondary:hover,
.btn-secondary:active {
    background: var(--blush);
    border-color: var(--dusty-rose);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover,
.btn-danger:active {
    background: var(--danger-dark);
}

.btn-outline {
    background: transparent;
    color: var(--warm-gray);
    border: 1px solid var(--cream);
}

.btn-outline:hover {
    background: var(--cream);
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    border: 1px solid var(--rose);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--dusty-rose);
    box-shadow: 0 0 0 3px rgba(212, 165, 154, 0.2);
}

.form-input::placeholder {
    color: var(--warm-gray);
}

.upload-area {
    border: 2px dashed var(--rose);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(248, 232, 228, 0.3);
    margin-bottom: 1rem;
}

.upload-icon-img {
    width: 60px;
    height: auto;
    opacity: 0.8;
}

.capture-actions {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.capture-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--rose);
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.capture-action:hover,
.capture-action:active {
    background: var(--white);
    border-color: var(--dusty-rose);
    transform: translateY(-2px);
    box-shadow: 0 4px 18px var(--shadow-hover);
}

.capture-action-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    letter-spacing: 0.03em;
}

.debug-reset-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rose);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--warm-gray);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.debug-reset-btn:hover,
.debug-reset-btn:active {
    color: var(--text-dark);
    border-color: var(--dusty-rose);
    background: var(--blush);
    transform: rotate(-20deg);
}

.upload-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--warm-gray);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.file-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cream);
    box-shadow: 0 2px 10px var(--shadow);
}

.file-item img,
.file-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-item .video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dusty-rose);
    font-size: 1.2rem;
}

.file-item .delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    opacity: 1;
}

.file-item .delete-btn:hover,
.file-item .delete-btn:active {
    background: var(--danger);
    color: white;
}

.file-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.login-card {
    max-width: 380px;
}

.login-title {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.folder-item {
    background: var(--white);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 2px 15px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.folder-item:hover,
.folder-item:active {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px var(--shadow-hover);
    border-color: var(--rose);
}

.folder-icon-img {
    width: 50px;
    height: auto;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.folder-name {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.folder-count {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--warm-gray);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cream);
    box-shadow: 0 2px 10px var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.gallery-item:hover,
.gallery-item:active {
    transform: scale(1.03);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content img,
.modal-content video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.video-player-container {
    position: relative;
    background: var(--text-dark);
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.video-player-container video {
    width: 100%;
    max-height: 70vh;
    display: block;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--text-light);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--dusty-rose);
}

.breadcrumb span {
    color: var(--warm-gray);
}

.message {
    padding: 0.9rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.message-success {
    background: rgba(129, 199, 132, 0.2);
    color: #2e7d32;
    border: 1px solid rgba(129, 199, 132, 0.5);
}

.message-error {
    background: rgba(229, 115, 115, 0.2);
    color: #c62828;
    border: 1px solid rgba(229, 115, 115, 0.5);
}

.message-info {
    background: rgba(212, 165, 154, 0.2);
    color: var(--text-dark);
    border: 1px solid var(--rose);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--cream);
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dusty-rose), var(--accent));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.progress-status-header p {
    margin: 0;
}

.upload-progress-overlay.is-processing .progress-bar {
    background: linear-gradient(90deg, var(--dusty-rose), var(--accent), var(--dusty-rose));
    background-size: 200% 100%;
    animation: progressShimmer 1.1s linear infinite;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cream);
    border-top-color: var(--dusty-rose);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progressShimmer {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
}

.welcome-back {
    background: var(--blush);
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.welcome-back p {
    margin: 0;
    color: var(--text-dark);
    font-size: clamp(1rem, 3vw, 1.1rem);
}

.empty-state {
    text-align: center;
    padding: 1rem;
    color: var(--warm-gray);
}

.empty-state-icon-img {
    width: 70px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.5;
}


.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    padding: 1rem;
}

.custom-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.upload-progress-overlay.active {
    opacity: 1;
    visibility: visible;
}

.upload-progress-modal {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.upload-progress-modal .custom-dialog-icon {
    margin-bottom: 0.75rem;
}

.custom-dialog {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(10px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    opacity: 0;
}

.custom-dialog-overlay.active .custom-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.custom-dialog-icon {
    width: 50px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.custom-dialog-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.custom-dialog-message {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.custom-dialog-extra {
    margin-bottom: 1.5rem;
}

.custom-dialog-extra .form-group {
    margin-bottom: 0;
    text-align: left;
}

.custom-dialog-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.custom-dialog-buttons .btn {
    min-width: 100px;
}

.toast-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--white);
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 90vw;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
}

.toast-icon {
    width: 36px;
    height: auto;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.toast-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 1rem;
    color: var(--text-light);
}

@media (min-width: 481px) and (max-width: 768px) {
    .page-wrapper {
        padding: 1.5rem;
    }
    
    .card {
        padding: 2.5rem 2rem;
    }
    
    .landing-card {
        padding: 3rem 2rem;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .upload-area {
        padding: 2.5rem 2rem;
    }
    
    .upload-icon-img {
        width: 70px;
    }
}

@media (min-width: 769px) {
    .page-wrapper {
        padding: 2rem;
    }
    
    .card {
        padding: 3rem;
    }
    
    .landing-card {
        padding: 4rem 3rem;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .upload-area {
        padding: 3rem 2rem;
    }
    
    .upload-icon-img {
        width: 80px;
    }
    
    .folder-icon-img {
        width: 60px;
    }
    
    .empty-state-icon-img {
        width: 80px;
    }
    
    .file-item .delete-btn {
        opacity: 0;
    }
    
    .file-item:hover .delete-btn {
        opacity: 1;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
    
    .card {
        padding: 1.5rem 1rem;
        border-radius: 10px;
    }
    
    .btn {
        padding: 0.8rem 1.25rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .custom-dialog {
        padding: 1.5rem;
    }
    
    .custom-dialog-buttons {
        flex-direction: column;
    }
    
    .custom-dialog-buttons .btn {
        width: 100%;
    }
    
    .file-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .folder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.nowrap { white-space: nowrap; }
.balanced-text { 
    text-wrap: balance;
    word-break: keep-all;
}

@media (max-width: 400px) {
    .balanced-text .nowrap:last-child {
        display: block;
    }
}

.back-link {
    font-size: 0.9rem;
    color: var(--warm-gray);
}

.breadcrumb-nav {
    text-align: left;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 0.25rem;
}

.section-subtitle {
    margin-bottom: 1rem;
}

.footer-note {
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin-top: 0.5rem;
    font-style: italic;
}

.empty-visitors-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cream);
    text-align: center;
}

.empty-visitors-section .visitors-label {
    color: var(--warm-gray);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.empty-visitors-section .visitors-list {
    color: var(--text-light);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.video-placeholder-icon {
    font-size: 3rem;
}

.modal-video {
    max-width: 85vw;
    max-height: 75vh;
}

.hidden-input {
    display: none;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="number"],
    input[type="search"] {
        font-size: 16px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .file-item .delete-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    
    .gallery-item {
        -webkit-touch-callout: none;
    }
}

@supports (padding: max(0px)) {
    .page-wrapper {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}
