.legacy-wall-section {
    padding: 40px 16px;
    max-width: 100%;
    margin: 0 auto;
    margin-top: 40px;
}

.legacy-wall-intro {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, rgba(255, 55, 95, 0.04) 0%, transparent 100%);
    border-radius: var(--radius-2xl, 18px);
}

.legacy-wall-intro .intro-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ios-pink, #FF375F) 0%, var(--ios-red, #FF453A) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(255, 55, 95, 0.3);
}

.legacy-wall-intro .intro-icon i {
    font-size: 2rem;
    color: white;
}

.legacy-wall-intro h2 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl, 1.75rem);
    font-weight: var(--font-bold, 700);
    color: var(--text-primary, #1C1C1E);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.legacy-wall-intro p {
    font-family: var(--font-primary);
    font-size: var(--text-base, 0.9375rem);
    color: var(--text-secondary, #48484A);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.week-navigation {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.week-selector {
    position: relative;
    display: inline-block;
}

.week-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #48484A);
    cursor: pointer;
    transition: all 0.2s ease;
}

.week-selector-btn:hover {
    border-color: var(--ios-pink, #FF375F);
    color: var(--ios-pink, #FF375F);
}

.week-selector-btn.active {
    background: linear-gradient(135deg, var(--ios-pink, #FF375F), var(--ios-red, #FF453A));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 55, 95, 0.3);
}

.week-selector-btn i {
    font-size: 1rem;
}

.week-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-xl, 14px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 100;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.week-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.week-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
    font-family: var(--font-primary);
}

.week-item:hover {
    background: rgba(255, 55, 95, 0.08);
}

.week-item.selected {
    background: linear-gradient(135deg, var(--ios-pink, #FF375F), var(--ios-red, #FF453A));
    color: white;
}

.week-item.selected .week-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.week-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.week-count {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--bg-grouped, #F2F2F7);
    border-radius: 12px;
    color: var(--text-tertiary, #8E8E93);
}

.week-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--ios-pink, #FF375F), var(--ios-red, #FF453A));
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

.week-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-tertiary, #8E8E93);
    font-size: 0.9rem;
}

.legacy-corkboard {
    background: linear-gradient(135deg, #d4a574 0%, #c49660 50%, #b8845a 100%);
    border-radius: 16px;
    min-height: 500px;
    padding: 30px;
    position: relative;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.legacy-corkboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(139, 90, 43, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 80% 20%, rgba(139, 90, 43, 0.25) 0%, transparent 2%),
        radial-gradient(circle at 40% 70%, rgba(139, 90, 43, 0.2) 0%, transparent 4%),
        radial-gradient(circle at 90% 80%, rgba(139, 90, 43, 0.3) 0%, transparent 2.5%),
        radial-gradient(circle at 10% 90%, rgba(139, 90, 43, 0.25) 0%, transparent 3%);
    pointer-events: none;
}

.legacy-loading,
.legacy-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.legacy-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.legacy-loading span {
    color: white;
    font-family: var(--font-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.legacy-empty i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.legacy-empty h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.legacy-empty p {
    font-family: var(--font-primary);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.legacy-empty .btn {
    background: white;
    color: #b8845a;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg, 12px);
    font-family: var(--font-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.legacy-empty .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.legacy-canvas {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding: 10px;
    --polaroid-size: clamp(120px, 14vw, 180px);
}

.legacy-polaroid {
    padding: clamp(8px, 1vw, 12px);
    padding-bottom: clamp(36px, 4vw, 48px);
    border-radius: 3px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: var(--polaroid-size);
    flex-shrink: 0;
}

.diamond-polaroid {
    background: linear-gradient(145deg, #e9d5ff 0%, #d8b4fe 100%);
}

.platinum-polaroid {
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
}

.gold-polaroid {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
}

.silver-polaroid {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
}

.bronze-polaroid {
    background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%);
}

.legacy-polaroid::before {
    content: '';
    position: absolute;
    top: clamp(5px, 0.6vw, 8px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(10px, 1vw, 14px);
    height: clamp(10px, 1vw, 14px);
    border-radius: 50%;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.legacy-polaroid.diamond-polaroid::before {
    background: linear-gradient(145deg, #a855f7 0%, #7c3aed 100%);
}

.legacy-polaroid.platinum-polaroid::before {
    background: linear-gradient(145deg, #64748b 0%, #475569 100%);
}

.legacy-polaroid.gold-polaroid::before {
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
}

.legacy-polaroid.silver-polaroid::before {
    background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);
}

.legacy-polaroid.bronze-polaroid::before {
    background: linear-gradient(145deg, #ea580c 0%, #c2410c 100%);
}

.legacy-polaroid:hover {
    transform: scale(1.08) rotate(0deg) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.polaroid-avatar {
    width: calc(var(--polaroid-size) - clamp(16px, 2vw, 24px));
    height: calc(var(--polaroid-size) - clamp(16px, 2vw, 24px));
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: clamp(6px, 0.8vw, 10px);
    position: relative;
    overflow: hidden;
}

.diamond-avatar-bg {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
}

.platinum-avatar-bg {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.gold-avatar-bg {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.silver-avatar-bg {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.bronze-avatar-bg {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

.polaroid-avatar .avatar-initials {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.silver-avatar-bg .avatar-initials,
.bronze-avatar-bg .avatar-initials {
    color: #334155;
    text-shadow: none;
}

.polaroid-avatar .tier-icon-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: clamp(24px, 2.5vw, 32px);
    height: clamp(24px, 2.5vw, 32px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.diamond-avatar-bg .tier-icon-badge {
    color: #a855f7;
}

.platinum-avatar-bg .tier-icon-badge {
    color: #64748b;
}

.gold-avatar-bg .tier-icon-badge {
    color: #f59e0b;
}

.silver-avatar-bg .tier-icon-badge {
    color: #64748b;
}

.bronze-avatar-bg .tier-icon-badge {
    color: #ea580c;
}

.polaroid-caption {
    position: absolute;
    bottom: clamp(8px, 1vw, 14px);
    left: clamp(8px, 1vw, 12px);
    right: clamp(8px, 1vw, 12px);
    font-family: 'Caveat', 'Segoe Script', cursive;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.polaroid-badges {
    position: absolute;
    top: clamp(20px, 2.5vw, 28px);
    right: clamp(4px, 0.5vw, 8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.polaroid-badge {
    width: clamp(20px, 2vw, 26px);
    height: clamp(20px, 2vw, 26px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.polaroid-badge.recurring {
    background: linear-gradient(135deg, #30D158, #059669);
    color: white;
}

.polaroid-badge.honor {
    background: linear-gradient(135deg, #FF375F, #FF453A);
    color: white;
}


.legacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.legacy-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.legacy-modal .modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-3xl, 20px);
    max-width: 420px;
    width: 95%;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

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

.legacy-modal .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.legacy-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.legacy-modal .modal-header {
    padding: 32px 24px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.diamond-header {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: white;
}

.platinum-header {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.gold-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.silver-header {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

.bronze-header {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
}

.modal-avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-avatar .avatar-initials {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
}

.donor-info h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    margin: 0 0 8px;
    font-weight: 600;
}

.donor-tier {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
}

.section-label {
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary, #8E8E93);
    margin-bottom: 6px;
}

.dedication-section,
.honor-section {
    margin-bottom: 16px;
}

.dedication-section p,
.honor-section p {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary, #1C1C1E);
    line-height: 1.6;
    margin: 0;
}

.recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--ios-green, #30D158) 0%, #059669 100%);
    color: white;
    border-radius: var(--radius-md, 10px);
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .legacy-wall-section {
        padding: 30px 16px;
        margin-top: 30px;
    }

    .legacy-wall-intro {
        padding: 30px 16px;
    }

    .legacy-wall-intro .intro-icon {
        width: 60px;
        height: 60px;
    }

    .legacy-wall-intro .intro-icon i {
        font-size: 1.75rem;
    }

    .legacy-wall-intro h2 {
        font-size: 1.5rem;
    }

    .legacy-corkboard {
        padding: 20px;
        min-height: 400px;
        border-radius: 12px;
    }

    .legacy-canvas {
        gap: 16px;
        --polaroid-size: clamp(100px, 35vw, 140px);
    }

    .legacy-modal .modal-content {
        border-radius: var(--radius-2xl, 18px) var(--radius-2xl, 18px) 0 0;
        max-height: 85vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
    }

    .legacy-modal .modal-header {
        padding: 24px 20px 20px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .week-selector-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .legacy-canvas {
        --polaroid-size: clamp(90px, 40vw, 120px);
        gap: 12px;
    }

    .polaroid-avatar .avatar-initials {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
    }
}
