
:root {
    touch-action: manipulation;
    scroll-smooth;

    /* === Brand Colors === */
    --color-primary: #007AFF;          /* iOS Blue */
    --color-primary-light: #4DA3FF;    /* iOS Blue Light */
    --color-primary-bg: #F2F2F7;       /* iOS System Gray 6 */

    /* === Neutral Colors === */
    --color-white: #FFFFFF;
    --color-gray-100: #F2F2F7;         /* iOS System Gray 6 */
    --color-gray-200: #E5E5EA;         /* iOS System Gray 4 */
    --color-gray-300: #D1D1D6;         /* iOS System Gray 3 */
    --color-gray-400: #AEAEB2;         /* iOS System Gray 2 */
    --color-gray-600: #8E8E93;         /* iOS System Gray */
    --color-gray-800: #1C1C1E;         /* iOS Label */

    /* === Accent Colors === */
    --color-accent-pink: rgba(0, 122, 255, 0.9);  /* iOS Blue accent */
    --color-accent-blue: #007AFF;      /* active slider shadow */
    --color-accent-green: #34C759;     /* iOS Green */

    /* === State Colors === */
    --color-success: #34C759;
    --color-warning: #FF9500;
    --color-error: #FF3B30;
    --color-info: #007AFF;
}

.triangle-right {
	width: 0;
	height: 0;
	border-top: 15px solid transparent;
	border-left: 30px solid var(--color-white);
	border-bottom: 15px solid transparent;
}

.triangle-left {
	width: 0;
	height: 0;
	border-top: 15px solid transparent;
	border-right: 30px solid var(--color-white);
	border-bottom: 15px solid transparent;
}

.arrow {
  border: solid black;
  border-width: 0 2px 2px 0;
  /* display: inline-block; */
  padding: 2px;
}

.up {
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}

.down {
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

.hidden-scrollbar
{
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.hidden-scrollbar::-webkit-scrollbar
{
    display:none;
}

.system-bg-color
{
    background-color: var(--color-primary-bg);
}

.system-bg-color-dark
{
    background-color: var(--color-primary);
}

.system-color
{
    color: var(--color-primary);
}

.swipe-up
{
    transition: height 0.5s ease-in-out;
    height: 80dvh;
}

.swipe-down
{
    transition: height 0.5s ease-in-out;
}

/* .index-swipe { */
   /* opacity: 1; */
   /* visibility: visible; */
   /* display: flex; */
   /* transition: visibility 2s ease-in; */
   /* -moz-transition: visibility 2s ease-in; */
   /* -webkit-transition: visibility 2s ease-in; */
/* } */

/* .index-swipe-hidden { */
   /* opacity: 0; */
   /* display: none; */
   /* visibility: hidden; */
/* } */



input:focus {outline:none;}




/* profile headshot gallery */


.gallery-container
{
    height: 100dvw;
    width: 100dvw;
    max-width: 428px;
    max-height: 428px;
}


.gallery-scroll
{
    margin-top: 0.1 em;
    width: 100dvw;
    max-width: 428px;
    display: grid;
    grid-auto-columns: calc(100dvw/3);
    grid-auto-flow: column;
    grid-gap: 0.1em;
    overflow-x: auto;
}

.gallery-scroll > div
{
    width: calc(var(--wused, 100dvw)/3);
    height: calc(var(--wused, 100dvw)/3);
    max-width: 428px;
}

.gallery-scroll > div > img
{
    object-position: left top;
    object-fit: fill;
    width: 100%;    
    height: 100%;
}

.gallery-common-multiple
{
    display: grid;
    margin-top:5dvh;
    height: calc(var(--w, 100dvw) - (var(--wused, 100dvw)/3));
    width: 100dvw;
    max-width: 428px;
    max-height: 428px;
    background-color: black;
    grid-template: repeat(4, 1fr)/repeat(6, 1fr);
    grid-gap: 0.1em;
}

.gallery-common
{
    display: grid;
    height: 100dvw;
    width: 100dvw;
    max-width: 428px;
    max-height: 428px;
    background-color: black;
    grid-template: repeat(4, 1fr) / repeat(6, 1fr);
    grid-gap: 0.1em;
}

.gallery1-h > div:nth-child(1) {
    grid-column: span 6;
    grid-row: span 4;
}

.gallery1-v > div:nth-child(1) {
    grid-column: 2 / 6;
    grid-row: span 4;
}


.gallery2-h > div:nth-child(2n+1) {
    grid-column: span 6;
    grid-row: span 2;
}
.gallery2-h > div:nth-child(2n+2) {
    grid-column: span 6;
    grid-row: span 2;
}

.gallery2-v > div:nth-child(2n+1) {
    grid-column: span 3;
    grid-row: span 4;
}
.gallery2-v > div:nth-child(2n+2) {
    grid-column: span 3;
    grid-row: span 4;
}

.gallery3-h > div:nth-child(3n+1)
{
    grid-column: span 6;
    grid-row: span 2;
}
.gallery3-h > div:nth-child(3n+2)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery3-h > div:nth-child(3n+3)
{
    grid-column: span 3;
    grid-row: span 2;
}

.gallery3-v > div:nth-child(3n+1)
{
    grid-column: span 3;
    grid-row: span 4;
}
.gallery3-v > div:nth-child(3n+2)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery3-v > div:nth-child(3n+3)
{
    grid-column: span 3;
    grid-row: span 2;
}

.gallery4-h > div:nth-child(4n+1)
{
    grid-column: span 4;
    grid-row: span 2;
}
.gallery4-h > div:nth-child(4n+2)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery4-h > div:nth-child(4n+3)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery4-h > div:nth-child(4n+4)
{
    grid-column: span 4;
    grid-row: span 2;
}

.gallery4-v > div:nth-child(4n+1)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery4-v > div:nth-child(4n+2)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery4-v > div:nth-child(4n+3)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery4-v > div:nth-child(4n+4)
{
    grid-column: span 3;
    grid-row: span 2;
}


.gallery5-h > div:nth-child(5n+1)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery5-h > div:nth-child(5n+2)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery5-h > div:nth-child(5n+3)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery5-h > div:nth-child(5n+4)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery5-h > div:nth-child(5n+5)
{
    grid-column: span 2;
    grid-row: span 2;
}


.gallery5-v > div:nth-child(5n+1)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery5-v > div:nth-child(5n+2)
{
    grid-column: span 3;
    grid-row: span 2;
}
.gallery5-v > div:nth-child(5n+3)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery5-v > div:nth-child(5n+4)
{
    grid-column: span 2;
    grid-row: span 2;
}
.gallery5-v > div:nth-child(5n+5)
{
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-common-multiple > div > img,
.gallery-common > div > img 
{
    width: 100%;
    height: 100%;
    /* min-height: 100%; */
    object-fit: cover;
    transition: all ease 1s;
    object-position: left top;
}

.gallery-common-multiple > div:hover img,
.gallery-common > div:hover img
{
    filter: blur(4px);
}

.gallery-common-multiple > div,
.gallery-common > div
{
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 20px 0 rgba(0, 0, 0, 0.19);
}

.gallery-common-multiple div,
.gallery-common div
{
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

/* ============================================
   Apple Clean Theme — iOS-inspired utilities
   ============================================ */

.theme-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}
.theme-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-btn-primary {
    background: #007AFF;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.theme-btn-primary:hover {
    background: #0066D6;
}
.theme-btn-primary:active {
    background: #004EA8;
}

.theme-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid #D1D1D6;
}
.theme-nav-active { color: #007AFF; }

.theme-input {
    background: #FFFFFF;
    border: none;
    border-radius: 10px;
    transition: all 0.2s;
}
.theme-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.theme-section-title {
    background: #007AFF;
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
}

.theme-tag {
    background: #007AFF;
    color: white;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
}

.theme-tag-outline {
    background: rgba(0, 122, 255, 0.08);
    color: #007AFF;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
}
.theme-tag-outline:hover {
    background: rgba(0, 122, 255, 0.15);
}

/* iOS grouped list style */
.theme-grouped-list {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
}
.theme-grouped-item {
    padding: 14px 16px;
    border-bottom: 0.5px solid #E5E5EA;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.theme-grouped-item:last-child {
    border-bottom: none;
}

.theme-skeleton {
    background: linear-gradient(90deg, #E5E5EA 25%, #F2F2F7 50%, #E5E5EA 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =============================================
   Fullscreen Story Layout (TikTok/Reels Mode)
   ============================================= */

/* Snap-scroll container */
.snap-container {
    height: 100dvh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Individual snap slide */
.snap-slide {
    height: 100dvh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    background: #000;
}

.snap-slide img.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}
.slide-bg-blur {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px) brightness(0.4);
    z-index: 0;
}

/* Gradient overlay at bottom of slide */
.slide-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    pointer-events: none;
}

/* Info overlay — bottom-left */
.slide-info {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 80px;
    color: white;
    z-index: 10;
}

.slide-info-enter {
    animation: slideInfoUp 0.5s ease-out forwards;
}

/* Right-side action buttons */
.slide-actions {
    position: absolute;
    right: 12px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.slide-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.slide-action-btn:active {
    transform: scale(0.85);
}

.slide-action-btn:hover {
    background: rgba(255,255,255,0.35);
}

.slide-action-btn-enter {
    animation: actionSlideIn 0.4s ease-out forwards;
    opacity: 0;
}

/* Floating filter bar at top */
.floating-filter {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-pill {
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.filter-pill:active {
    background: rgba(255,255,255,0.35);
}

/* Detail slide-in panel */
.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 420px;
    height: 100dvh;
    z-index: 80;
    background: white;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-panel.active {
    transform: translateX(0);
}

.detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 79;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.detail-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Nav auto-hide on scroll */
.nav-autohide {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-autohide.nav-hidden {
    transform: translateY(100%);
}

/* Double-tap heart animation (centered overlay) */
.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 80px;
    z-index: 30;
    pointer-events: none;
    animation: doubleTapHeart 0.8s ease-out forwards;
}

/* Slide skeleton loading */
.snap-slide-skeleton {
    height: 100dvh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-slide-skeleton::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Animations === */
@keyframes actionSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.3); }
    50%      { transform: scale(0.9); }
    75%      { transform: scale(1.1); }
}

@keyframes doubleTapHeart {
    0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

@keyframes slideInfoUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Frosted glass form card (login page) */
.frosted-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Member cover hero */
.member-hero {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #007AFF 0%, #4DA3FF 100%);
    overflow: hidden;
}

.member-avatar-overlap {
    position: relative;
    margin-top: -50px;
    z-index: 10;
}

/* Search result floating pills */
.search-floating-pills {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.search-floating-pills::-webkit-scrollbar {
    display: none;
}

/* News fullscreen hero */
.news-hero {
    position: relative;
    height: 50dvh;
    overflow: hidden;
}

.news-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

/* Score history collapsible cards */
.score-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.score-card-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.score-card-expand.open {
    max-height: 500px;
}

/* Advance search dropdown panel */
.adv-search-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 0;
    overflow: hidden;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.adv-search-panel.open {
    max-height: 60dvh;
    overflow-y: auto;
}

/* =============================================
   Profile δ — Social Media Style (Instagram)
   ============================================= */

/* --- Cover Photo Section --- */
.profile-cover-section {
    height: 260px;
    background: linear-gradient(135deg, #007AFF 0%, #4DA3FF 50%, #007AFF 100%);
    position: relative;
    overflow: hidden;
}

.profile-cover-blur {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: blur(25px) brightness(0.55) saturate(1.3);
    -webkit-filter: blur(25px) brightness(0.55) saturate(1.3);
    transform: scale(1.15);
    transition: opacity 0.6s ease;
    opacity: 0;
}

.profile-cover-blur.profile-cover-blur-loaded {
    opacity: 1;
}

.profile-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

/* --- Avatar with Rotating Ring --- */
.profile-avatar-area {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    animation: profileAvatarBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

.profile-avatar-ring {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(
        #007AFF 0deg,
        #4DA3FF 90deg,
        #34C759 180deg,
        #4DA3FF 270deg,
        #007AFF 360deg
    );
    animation: profileRingRotate 4s linear infinite;
}

.profile-avatar-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 3px;
    background: white;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #4DA3FF);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Stat Bubbles --- */
.profile-stat-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 122, 255, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(15px);
    transition: box-shadow 0.2s ease;
}

.profile-stat-bubble:hover {
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.profile-stat-animate {
    animation: profileStatCountUp 0.5s ease-out forwards;
}

.profile-stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.profile-stat-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-gray-600);
    margin-top: 2px;
}

/* --- CTA Button --- */
.profile-cta-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #007AFF 0%, #4DA3FF 100%);
    color: white;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.profile-cta-btn:active {
    transform: scale(0.97);
}

.profile-cta-btn:hover {
    box-shadow: 0 6px 24px rgba(0, 122, 255, 0.4);
}

/* Shimmer effect on CTA */
.profile-cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: profileCtaShimmer 3s ease-in-out infinite;
}

/* --- Accordion --- */
.profile-accordion {
    border-bottom: 0.5px solid var(--color-gray-200);
}

.profile-accordion:last-child {
    border-bottom: none;
}

.profile-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-800);
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.profile-accordion-header:active {
    background: rgba(0, 0, 0, 0.03);
}

.profile-accordion-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-gray-400);
    flex-shrink: 0;
}

.profile-accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.profile-accordion-body.profile-accordion-open {
    opacity: 1;
    /* max-height set by JS */
}

/* --- Photo Grid Enhancement --- */
.profile-grid-item {
    animation: profileGridReveal 0.4s ease-out forwards;
    opacity: 0;
}

/* --- Animations --- */
@keyframes profileAvatarBounce {
    0%   { transform: translateX(-50%) scale(0); }
    70%  { transform: translateX(-50%) scale(1.08); }
    85%  { transform: translateX(-50%) scale(0.96); }
    100% { transform: translateX(-50%) scale(1); }
}

@keyframes profileRingRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes profileStatCountUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes profileGridReveal {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes profileAccordionOpen {
    from { max-height: 0; opacity: 0; }
    to   { max-height: 500px; opacity: 1; }
}

@keyframes profileCtaShimmer {
    0%   { left: -100%; }
    60%  { left: 100%; }
    100% { left: 100%; }
}

/* --- Responsive adjustments --- */
@media (min-width: 768px) {
    .profile-cover-section {
        height: 300px;
    }

    .profile-stat-bubble {
        width: 80px;
        height: 80px;
    }

    .profile-stat-number {
        font-size: 20px;
    }

    .profile-stat-label {
        font-size: 11px;
    }
}

/* --- Gallery override for Instagram-style 3-col grid --- */
#div_img_headshot_container .gallery-common,
#div_img_headshot_container .gallery-common-multiple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    grid-gap: 2px;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: none;
    background: transparent;
}

#div_img_headshot_container .gallery-common > div,
#div_img_headshot_container .gallery-common-multiple > div {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    max-width: none;
    border-radius: 2px;
    overflow: hidden;
}

#div_img_headshot_container .gallery-common > div > img,
#div_img_headshot_container .gallery-common-multiple > div > img {
    object-fit: cover;
    object-position: center top;
    border-radius: 2px;
}

/* Remove hover blur on gallery in profile mode */
#div_img_headshot_container .gallery-common > div:hover img,
#div_img_headshot_container .gallery-common-multiple > div:hover img {
    filter: brightness(0.92);
}

/* Banner thumbnails horizontal scroll */
#div_banner_container {
    scroll-snap-type: x mandatory;
}

#div_banner_container > div {
    scroll-snap-align: start;
}

/* --- Profile name area under avatar --- */
.profile-name-skeleton {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
}

/* Star rating alignment inside profile info */
#div_info .gl-star-rating {
    justify-content: center;
    margin-top: 4px;
}

/* Comment section within accordion */
#div_info .text-sm.font-semibold {
    font-size: 14px;
}

/* Ensure div_info content has good spacing */
#div_info > .flex {
    padding-bottom: 4px;
}

/* Smooth entrance for the whole profile page */
.profile-cover-section,
#profile_gallery_section,
#div_info_container {
    animation: profilePageFadeIn 0.5s ease-out;
}

@keyframes profilePageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .profile-avatar-area,
    .profile-stat-bubble,
    .profile-stat-animate,
    .profile-cover-section,
    #profile_gallery_section,
    #div_info_container,
    .profile-grid-item,
    .profile-cta-btn::after {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .profile-avatar-area {
        transform: translateX(-50%) !important;
    }

    .profile-avatar-ring {
        animation: none !important;
    }

    .profile-cover-blur {
        transition: none !important;
    }
}