/* Souvenir Page - Typography-focused Layout */

/* Fullscreen Background - matches other pages */
.fullscreen-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background-color: #1a1a2e;
    pointer-events: none; /* Allow clicks to pass through to content */
}

.scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
}

.scene-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-color: #1a1a2e;
    animation: subtle-breathing 6s ease-in-out infinite;
}

.background-layer.loaded {
    opacity: 1;
}

@keyframes subtle-breathing {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.02); 
    }
}

/* Ensure body has proper background */
body.souvenir-page {
    position: relative;
    background-color: #1a1a2e; /* Prevent white flash */
}

/* Fullscreen Background Container */
#souvenir-page-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10; /* Above background (1) but below header */
    padding: 120px 0 0 40px;
    background: transparent;
    pointer-events: none; /* Allow clicks to pass through to background */
}

/* Main Souvenir Frame - Left-aligned, Fixed Width */
.souvenir-frame {
    pointer-events: auto; /* Re-enable clicks on the frame itself */
    background: white;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border: 1.5px solid var(--border, #d0c7f0);
    width: 470px !important;
    min-width: 470px;
    max-width: 470px;
    max-height: calc(100vh - 160px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Souvenir Info Section - Compact Header */
.souvenir-info-section {
    padding: 20px 28px;
    border-bottom: 1.5px solid var(--border, #d0c7f0);
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    position: relative;
    z-index: 100002; /* Above popup (100001) to prevent being affected */
}

/* Tab Controls - Button Style */
.souvenir-face-controls {
    padding: 12px;
    display: flex;
    gap: 8px;
    background: white;
    border-bottom: 1.5px solid var(--border, #d0c7f0);
    justify-content: center;
}

.souvenir-face-btn {
    min-width: 100px;
    height: 36px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(115, 75, 161, 0.3);
    border-radius: 0;
    color: var(--user-color, #734ba1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.souvenir-face-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--user-color, #734ba1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(115, 75, 161, 0.3);
}

.souvenir-face-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.souvenir-face-btn.active {
    background: var(--user-color, #734ba1);
    color: white;
    border-color: var(--user-color, #734ba1);
}

.souvenir-face-btn .btn-icon {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Souvenir Icon Bubble - Floating Animation */
.souvenir-icon-bubble {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(200,220,255,0.4));
    border: 3px solid rgba(255,255,255,0.6);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15), 
                inset -4px -4px 18px rgba(0,0,0,0.08),
                inset 4px 4px 15px rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: gentle-float 4s ease-in-out infinite;
}

@keyframes gentle-float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
    }
    25% { 
        transform: translate(2px, -3px) rotate(1deg);
    }
    50% { 
        transform: translate(-1px, -5px) rotate(-1deg);
    }
    75% { 
        transform: translate(-3px, -2px) rotate(0.5deg);
    }
}

@keyframes souvenir-pop {
    0% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.souvenir-icon {
    width: 60px !important;
    height: 60px !important;
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* Souvenir Text Content - Sans-serif, Left-aligned, User Color */
.souvenir-text {
    flex: 1;
    text-align: left;
}

.souvenir-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px !important;
    font-weight: 600;
    color: #555 !important;
    margin: 0 0 4px 0;
    line-height: 1.3;
    position: relative;
    z-index: 100003;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.souvenir-description {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #666;
    margin: 0 0 3px 0;
    line-height: 1.5;
    font-weight: 400;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.souvenir-details {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #888;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
    text-transform: lowercase;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Content Faces Container - Fixed height */
.souvenir-content-faces {
    position: relative;
    height: 272px; /* Same as 8 event rows */
    background: white;
    overflow: hidden;
}

/* Face transition animations */
.souvenir-events-face,
.souvenir-keepers-face,
.souvenir-explore-face,
.souvenir-bouncer-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.souvenir-events-face:not(.active),
.souvenir-keepers-face:not(.active),
.souvenir-explore-face:not(.active),
.souvenir-bouncer-face:not(.active) {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.souvenir-events-face.active,
.souvenir-keepers-face.active,
.souvenir-explore-face.active,
.souvenir-bouncer-face.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Canon Events Face - Scrollable, limited to 8 rows */
.souvenir-events-face {
    overflow-y: auto;
    background: white;
    display: none;
}

.souvenir-events-face.active {
    display: block;
}

/* Custom scrollbar styling for events face - overlay style */
.souvenir-events-face::-webkit-scrollbar {
    width: 8px;
}

.souvenir-events-face::-webkit-scrollbar-track {
    background: transparent;
}

.souvenir-events-face::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

.souvenir-events-face::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar */
.souvenir-events-face {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
    overflow-y: overlay;
}

/* Make event rows clickable */
.souvenir-events-face .row-entry {
    cursor: pointer;
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Event Stack Content - Apply same reset as #rows-container */
.souvenir-events-face,
.souvenir-events-face * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Keepers Face - Profile holder list with scrolling */
/* Custom scrollbar styling for events face - overlay style */
.souvenir-events-face::-webkit-scrollbar {
    width: 8px;
}

.souvenir-events-face::-webkit-scrollbar-track {
    background: transparent;
}

.souvenir-events-face::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

.souvenir-events-face::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar */
.souvenir-events-face {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
    overflow-y: overlay;
}

.souvenir-keepers-face.active {
    display: block;
}

/* Custom scrollbar styling for keepers face - square style */
.souvenir-keepers-face::-webkit-scrollbar {
    width: 8px;
}

.souvenir-keepers-face::-webkit-scrollbar-track {
    background: transparent;
}

.souvenir-keepers-face::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--user-color, #734ba1) 30%, transparent);
    border-radius: 0;
    border: none;
    transition: background 0.2s ease;
}

.souvenir-keepers-face::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--user-color, #734ba1) 50%, transparent);
}

/* Firefox scrollbar */
.souvenir-keepers-face {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--user-color, #734ba1) 30%, transparent) transparent;
    overflow-y: auto;
}

.souvenir-keepers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1px;
    padding: 0;
    background: color-mix(in srgb, var(--user-color, #734ba1) 20%, #e0dce8);
}

.keeper-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: color-mix(in srgb, var(--user-color, #734ba1) 4%, #fdfcfe);
    border: none;
    border-radius: 0;
    transition: background 0.15s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.keeper-card:hover {
    background: color-mix(in srgb, var(--user-color, #734ba1) 10%, white);
}

.keeper-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--user-color, #734ba1);
    box-shadow: none;
}

.keeper-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.keeper-card-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: color-mix(in srgb, var(--user-color, #734ba1) 80%, #1a1520);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.keeper-card-handle {
    font-size: 0.65rem;
    color: color-mix(in srgb, var(--user-color, #734ba1) 50%, #555);
    font-family: monospace;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Explore More Face - Souvenirs Physics Box */
.souvenir-explore-face {
    overflow: hidden;
    background: white;
    display: none;
}

.souvenir-explore-face.active {
    display: block;
}

.souvenir-explore-face .souvenirs-physics-container {
    width: 100%;
    height: 100%;
    background: #fdfcfe;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.souvenir-explore-face #explore-souvenirs-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.souvenir-explore-face .souvenirs-mini-widget {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 248, 255, 0.98) 100%);
    border-radius: 0;
    padding: 0;
    box-shadow: 0 6px 20px rgba(115, 75, 161, 0.25),
                0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    z-index: 10;
    min-width: 240px;
    max-width: 280px;
}

.souvenir-widget-inner {
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid #734ba1;
}

.souvenir-widget-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.souvenir-widget-photo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(200,220,255,0.6));
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15), 
                inset -3px -3px 8px rgba(0,0,0,0.08),
                inset 3px 3px 8px rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.souvenir-widget-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.92;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.05s ease-out;
}

@keyframes gentleWave {
    0%, 100% { 
        transform: rotate(-0.5deg) translateY(0px); 
    }
    50% { 
        transform: rotate(0.5deg) translateY(-2px); 
    }
}

.souvenir-icon-wave {
    animation: gentleWave 3s ease-in-out infinite;
}

.souvenir-widget-info {
    flex: 1;
    text-align: left;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.souvenir-widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #372e42;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
}

.souvenir-widget-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
    z-index: 5;
    font-weight: 300;
}

.souvenir-widget-close:hover {
    color: #734ba1;
    transform: scale(1.1);
}

.souvenir-widget-explore {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.souvenir-widget-explore:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.souvenir-widget-arrow {
    font-size: 0.8rem;
    margin-left: 6px;
}

/* BouncerBox Face - Same fixed height */
.souvenir-bouncer-face {
    background: white;
    display: none;
    height: 100%;
    overflow: hidden;
}

.souvenir-bouncer-face.active {
    display: block;
}

/* Toggle Details Button - Right Side Above Drawer */
.toggle-details-btn {
    position: fixed;
    bottom: 120px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0;
    pointer-events: auto; /* Ensure button is clickable */
}

.toggle-details-btn:hover {
    transform: scale(1.1);
}

.toggle-details-btn:active {
    transform: scale(0.95);
}

.eye-icon {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.eye-open {
    opacity: 1;
    transform: scale(1);
}

.eye-closed {
    opacity: 0;
    transform: scale(0.8);
}

.toggle-details-btn.details-hidden .eye-open {
    opacity: 0;
    transform: scale(0.8);
}

.toggle-details-btn.details-hidden .eye-closed {
    opacity: 1;
    transform: scale(1);
}

/* Frame fade in/out animation */
.souvenir-frame {
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.souvenir-frame.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

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



/* Ensure database row styling works correctly in souvenir events */
.souvenir-events-face .row-entry,
.canon-events .row-entry {
    min-height: 40px;
    align-items: center;
    width: 100% !important;
}

.souvenir-events-face .row-entry .cell,
.canon-events .row-entry .cell {
    display: flex;
    align-items: center;
    padding: 0 1px;
    box-sizing: border-box;
}

.souvenir-events-face .row-entry .cell:first-child,
.canon-events .row-entry .cell:first-child {
    padding-left: 16px;
}

.souvenir-events-face .row-entry .cell:last-child,
.canon-events .row-entry .cell:last-child {
    padding-right: 16px;
}

/* Cell widths optimized for 470px frame width */
.souvenir-events-face .row-entry .cell.epoch,
.canon-events .row-entry .cell.epoch {
    flex: 0 0 90px;
    max-width: 90px;
    min-width: 90px;
    text-align: center;
    justify-content: center;
    font-size: 0.75em;
}

.souvenir-events-face .row-entry .cell.avatar,
.canon-events .row-entry .cell.avatar {
    flex: 0 0 20px;
    max-width: 20px;
    min-width: 20px;
    padding: 4px 1px;
    text-align: center;
    justify-content: center;
    margin-left: 8px;
}

.souvenir-events-face .row-entry .cell.canon,
.canon-events .row-entry .cell.canon {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    justify-content: flex-start;
    padding-left: 8px;
    overflow: hidden;
}

/* Souvenir Box Styles (Legacy - kept for potential use) */

.souvenir-description {
    font-size: 15px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 10px 0;
}

.souvenir-keepers {
    font-size: 10px !important;
    color: #aaa !important;
    font-style: italic !important;
    margin: 0;
    font-weight: 300;
    display: block;
    line-height: 1.4;
}

/* Souvenir Box Carousel - Compact */
.souvenir-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e6f5;
}

.souvenir-box-title {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: #5a4a7a;
    font-weight: 600;
}

.souvenir-box-nav {
    display: flex;
    gap: 6px;
}

.nav-btn {
    background: transparent;
    border: 1.5px solid #d0c7f0;
    color: #888;
    padding: 4px 10px;
    border-radius: 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #fff;
    color: var(--user-color, #734ba1);
    border-color: var(--user-color, #734ba1);
}

.nav-btn.active {
    background: var(--user-color, #734ba1);
    color: white;
    border-color: var(--user-color, #734ba1);
}

.souvenir-box-content {
    height: 140px;
    overflow-y: auto;
}

.souvenir-keeper-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: #fdfcfe;
    border: 1px solid #e8e6f5;
    margin-bottom: 6px;
    font-size: 13px;
    color: #5a4a7a;
}

.souvenir-keeper-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.souvenir-keeper-time {
    color: #888;
    font-size: 12px;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .floating-widget {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: calc(100% - 32px) !important;
        max-width: 100% !important;
        margin: 16px;
        max-height: none !important;
    }
    
    #souvenir-page-container {
        position: relative;
        height: auto;
        overflow: visible;
        padding: var(--content-top-spacing) 1rem 4rem 1rem;
    }
    
    .souvenir-frame {
        width: 100% !important;
        min-width: auto;
        max-width: 100%;
        max-height: none;
    }
    
    .box-widget {
        height: auto !important;
    }
    
    .souvenir-box-content {
        height: auto;
        max-height: 300px;
    }
    
    .toggle-details-btn {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    #souvenir-page-container {
        padding: var(--content-top-spacing-mobile) 0.75rem 3rem 0.75rem;
    }
    
    .souvenir-frame {
        border-width: 1px;
    }
    
    .souvenir-info-section {
        padding: 14px 16px;
        gap: 12px;
        flex-direction: row;
        align-items: center;
    }
    
    .souvenir-icon-bubble {
        width: 50px !important;
        height: 50px !important;
    }
    
    .souvenir-icon-bubble img {
        width: 36px !important;
        height: 36px !important;
    }
    
    .souvenir-text {
        text-align: left;
    }
    
    .souvenir-name {
        font-size: 1.1rem;
    }
    
    .souvenir-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .souvenir-details {
        font-size: 0.7rem;
    }
    
    .souvenir-face-controls {
        padding: 8px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .souvenir-face-btn {
        min-width: auto;
        flex: 1;
        padding: 6px 10px;
        font-size: 0.7rem;
        height: 32px;
    }
    
    .souvenir-face-btn span {
        display: none;
    }
    
    .souvenir-face-btn .btn-icon {
        width: 14px;
        height: 14px;
    }
    
    .souvenir-content-faces {
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .toggle-details-btn {
        width: 40px;
        height: 40px;
        bottom: 16px;
        right: 16px;
    }
    
    /* Keeper cards responsive adjustments */
    .souvenir-keepers-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1px;
    }
    
    .keeper-card {
        padding: 12px 8px;
        gap: 6px;
    }
    
    .keeper-card-avatar {
        width: 36px;
        height: 36px;
    }
    
    .keeper-card-name {
        font-size: 0.75rem;
    }
    
    .keeper-card-handle {
        font-size: 0.6rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #souvenir-page-container {
        padding: var(--content-top-spacing-mobile) 0.5rem 2.5rem 0.5rem;
    }
    
    .souvenir-info-section {
        padding: 12px;
        gap: 10px;
    }
    
    .souvenir-icon-bubble {
        width: 42px !important;
        height: 42px !important;
    }
    
    .souvenir-icon-bubble img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .souvenir-name {
        font-size: 1rem;
    }
    
    .souvenir-description {
        font-size: 0.75rem;
    }
    
    .souvenir-face-controls {
        padding: 6px;
        gap: 4px;
    }
    
    .souvenir-face-btn {
        padding: 5px 8px;
        height: 28px;
    }
    
    /* Keeper cards on extra small screens */
    .souvenir-keepers-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
    }
    
    .keeper-card {
        padding: 10px 6px;
        gap: 6px;
    }
    
    .keeper-card-avatar {
        width: 32px;
        height: 32px;
        border-width: 1.5px;
    }
    
    .keeper-card-name {
        font-size: 0.72rem;
    }
    
    .keeper-card-handle {
        font-size: 0.55rem;
