/* ============================================
 * 소리튠 주니어 - Kids English Academy
 * 어린이 영어학교 Fun & Playful Design
 * ============================================ */

/* ── 밝고 즐거운 배경 ── */
.student-page {
    background: linear-gradient(180deg, #4FC3F7 0%, #81D4FA 30%, #B3E5FC 60%, #E1F5FE 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 떠다니는 구름/별 장식 */
.student-page::before,
.student-page::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
}
.student-page::before {
    top: 8%;
    left: -5%;
    width: 160px;
    height: 60px;
    background: rgba(255,255,255,0.5);
    border-radius: 100px;
    box-shadow: 30px 10px 0 10px rgba(255,255,255,0.4), 60px -5px 0 5px rgba(255,255,255,0.3);
    animation: cloudDrift 20s linear infinite;
}
.student-page::after {
    top: 18%;
    right: -10%;
    width: 120px;
    height: 45px;
    background: rgba(255,255,255,0.35);
    border-radius: 80px;
    box-shadow: 25px 8px 0 8px rgba(255,255,255,0.3);
    animation: cloudDrift 28s linear infinite 5s;
}

.student-page .app-container {
    background: transparent;
    position: relative;
    z-index: 1;
}

/* ============================================
 * 로딩 스플래시
 * ============================================ */
.view-loading {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #FFB74D 0%, #FF9800 40%, #FF7043 100%);
}

.loading-brand {
    text-align: center;
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-logo-ring {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: conic-gradient(#FFD54F, #FF7043, #FF5252, #AB47BC, #42A5F5, #66BB6A, #FFD54F);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 3s linear infinite;
    padding: 4px;
}

.loading-logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9800, #FF7043);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.loading-brand-text {
    color: white;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.loading-brand-sub {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ============================================
 * 랜딩 페이지 (비로그인 메인)
 * ============================================ */

/* ── 히어로 ── */
.landing-hero {
    position: relative;
    padding: calc(env(safe-area-inset-top, 0px) + 40px) 24px 0;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(160deg, #FF9800 0%, #FF7043 40%, #FF5722 100%);
    border-radius: 0 0 40px 40px;
    min-height: 320px;
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.landing-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}
.landing-particle.p1 {
    width: 180px; height: 180px;
    top: -40px; right: -30px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
    animation: landingFloat 8s ease-in-out infinite;
}
.landing-particle.p2 {
    width: 100px; height: 100px;
    bottom: 20px; left: -20px;
    background: radial-gradient(circle, rgba(255,213,79,0.3) 0%, transparent 70%);
    animation: landingFloat 10s ease-in-out infinite 2s;
}
.landing-particle.p3 {
    width: 14px; height: 14px;
    top: 30%; left: 15%;
    background: #FFD54F;
    animation: twinkle 3s ease-in-out infinite, landingFloat 6s ease-in-out infinite;
}
.landing-particle.p4 {
    width: 10px; height: 10px;
    top: 20%; right: 20%;
    background: rgba(255,255,255,0.8);
    animation: twinkle 2.5s ease-in-out infinite 1s, landingFloat 7s ease-in-out infinite reverse;
}
.landing-particle.p5 {
    width: 8px; height: 8px;
    bottom: 30%; right: 30%;
    background: rgba(255,241,118,0.9);
    animation: twinkle 2s ease-in-out infinite 0.5s, landingFloat 5s ease-in-out infinite;
}

@keyframes landingFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(12px, -18px) scale(1.05); }
    50% { transform: translate(-8px, 10px) scale(0.95); }
    75% { transform: translate(6px, -6px) scale(1.02); }
}

.landing-hero-content {
    position: relative;
    z-index: 2;
}

/* ── 로고 ── */
.landing-logo-wrap {
    margin-bottom: 16px;
}

.landing-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gentleBounce 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.landing-logo span {
    font-size: 40px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── 타이틀 ── */
.landing-title {
    font-size: 32px;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.15);
    margin-bottom: 6px;
}

.landing-title span {
    background: linear-gradient(135deg, #FFD54F, #FFF176);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-desc {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

/* ── 통계 바 ── */
.landing-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(0,0,0,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 14px 8px;
    margin: 0 auto 24px;
    max-width: 340px;
}

.landing-stat {
    flex: 1;
    text-align: center;
}

.landing-stat-num {
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.12);
    line-height: 1.1;
}

.landing-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}

.landing-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

/* ── 섹션 공통 ── */
.landing-section {
    padding: 24px 20px 0;
}

.landing-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.landing-section-icon {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.landing-section-title {
    font-size: 18px;
    font-weight: 900;
    color: #263238;
    letter-spacing: -0.3px;
}

.landing-section-sub {
    font-size: 13px;
    color: #90A4AE;
    font-weight: 600;
    margin-top: 2px;
}

/* ── 랭킹 미리보기 ── */
.landing-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.landing-ranking-loading {
    text-align: center;
    padding: 32px 16px;
    color: #90A4AE;
    font-size: 14px;
    font-weight: 600;
}

.landing-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    animation: slideUpFade 0.4s ease backwards;
}

.landing-ranking-item:nth-child(1) { animation-delay: 0.05s; }
.landing-ranking-item:nth-child(2) { animation-delay: 0.1s; }
.landing-ranking-item:nth-child(3) { animation-delay: 0.15s; }
.landing-ranking-item:nth-child(4) { animation-delay: 0.2s; }
.landing-ranking-item:nth-child(5) { animation-delay: 0.25s; }

.landing-ranking-item.rank-1 {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-color: #FFD54F;
    box-shadow: 0 4px 20px rgba(255,193,7,0.15);
}
.landing-ranking-item.rank-2 {
    background: linear-gradient(135deg, #FAFAFA, #F5F5F5);
    border-color: #E0E0E0;
}
.landing-ranking-item.rank-3 {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-color: #FFCC80;
}

.landing-rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    background: #CFD8DC;
}

.landing-ranking-item.rank-1 .landing-rank-badge {
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    box-shadow: 0 2px 8px rgba(255,152,0,0.3);
    font-size: 16px;
}
.landing-ranking-item.rank-2 .landing-rank-badge {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
}
.landing-ranking-item.rank-3 .landing-rank-badge {
    background: linear-gradient(135deg, #D4A574, #CD7F32);
}

.landing-rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.landing-rank-info {
    flex: 1;
    min-width: 0;
}

.landing-rank-name {
    font-size: 15px;
    font-weight: 800;
    color: #263238;
}

.landing-rank-class {
    font-size: 12px;
    color: #90A4AE;
    font-weight: 600;
}

.landing-rank-coins {
    flex-shrink: 0;
}

.landing-rank-trophy {
    font-size: 20px;
    margin-right: 2px;
}

/* ── 카드 컬렉션 쇼케이스 ── */
.landing-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.landing-cards::-webkit-scrollbar { display: none; }

.landing-cards-nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    margin-bottom: 2px;
}

.landing-cards-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #90CAF9;
    background: #E3F2FD;
    color: #1976D2;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.landing-cards-nav:active {
    background: #BBDEFB;
    transform: scale(0.92);
}

.landing-cards-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.landing-cards-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #BBDEFB;
    transition: background 0.2s, transform 0.2s;
}

.landing-cards-dot.active {
    background: #1976D2;
    transform: scale(1.3);
}

.landing-card-item {
    flex-shrink: 0;
    width: 100px;
    height: 130px;
    scroll-snap-align: start;
    text-align: center;
    perspective: 600px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.landing-card-front,
.landing-card-back {
    border-radius: 20px;
    padding: 14px 10px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 2px solid rgba(0,0,0,0.04);
    backface-visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.landing-card-front {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.landing-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 10px 8px;
}

.landing-card-item.flipped .landing-card-front {
    transform: rotateY(180deg);
}

.landing-card-item.flipped .landing-card-back {
    transform: rotateY(0deg);
}

.landing-card-back-title {
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 4px;
}

.landing-card-back-desc {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0.95;
}

.landing-card-back-coin-limit {
    font-size: 8px;
    font-weight: 600;
    margin-top: 2px;
    opacity: 0.8;
}

.landing-card-back-coin {
    font-size: 12px;
    font-weight: 900;
    margin-top: 4px;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 10px;
}

.landing-card-item:active .landing-card-front {
    transform: scale(0.95);
}
.landing-card-item.flipped:active .landing-card-front {
    transform: rotateY(180deg) scale(0.95);
}

.landing-card-front img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 3px solid var(--card-color, #E0E0E0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.landing-card-name {
    font-size: 13px;
    font-weight: 900;
    color: #37474F;
    margin-bottom: 2px;
}

.landing-card-coin {
    font-size: 11px;
    font-weight: 700;
    color: var(--card-color, #90A4AE);
}

.landing-cards-hint {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #90A4AE;
    margin-top: 8px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ── CTA 버튼 ── */
/* ── 로그인 안내 가이드 ── */
.landing-login-guide {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1.5px solid rgba(255,255,255,0.9);
}
.landing-login-guide-title {
    font-size: 15px;
    font-weight: 900;
    color: #37474F;
    margin-bottom: 14px;
    text-align: center;
}
.landing-login-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.landing-login-step {
    display: flex;
    align-items: center;
    gap: 12px;
}
.landing-login-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B1A, #FF8A3D);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255,107,26,0.3);
}
.landing-login-step-text {
    font-size: 13px;
    font-weight: 600;
    color: #455A64;
    line-height: 1.4;
}
.landing-login-step-text strong {
    color: #FF6B1A;
    font-weight: 800;
}

.landing-cta {
    padding: 32px 24px 12px;
    text-align: center;
}

.landing-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    background: linear-gradient(135deg, #FF7043, #FF5722);
    color: white;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.3px;
    box-shadow: 0 8px 32px rgba(255,87,34,0.4), 0 0 0 0 rgba(255,87,34,0.3);
    transition: all 0.3s ease;
    animation: ctaPulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.landing-cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: ctaShimmer 3s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(255,87,34,0.4), 0 0 0 0 rgba(255,87,34,0.3); }
    50% { box-shadow: 0 12px 40px rgba(255,87,34,0.5), 0 0 0 8px rgba(255,87,34,0.08); }
}

@keyframes ctaShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.landing-cta-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px rgba(255,87,34,0.3);
}

.landing-cta-text { position: relative; z-index: 1; }

.landing-cta-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.landing-cta-hint {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #90A4AE;
}

/* ── 통합 로그인 버튼 (비로그인 시) ── */
.landing-login-btn-wrap {
    padding: 24px 24px 16px;
    text-align: center;
}
.landing-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 48px;
    background: linear-gradient(135deg, #FF7043, #FF5722);
    color: #fff;
    border-radius: 60px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(255,87,34,0.35);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.landing-login-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: ctaShimmer 3s ease-in-out infinite;
}
.landing-login-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px rgba(255,87,34,0.3);
}

/* ── 반 선택 래퍼 (CTA 클릭 후) ── */
#class-select-section {
    padding: 0 16px;
}

.class-select-wrap {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 24px 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    border: 2px solid rgba(255,255,255,0.8);
}

.class-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.class-select-title {
    font-size: 18px;
    font-weight: 900;
    color: #263238;
}

.class-select-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    color: #78909C;
    transition: all 0.15s ease;
}

.class-select-close:active {
    background: rgba(0,0,0,0.12);
    transform: scale(0.9);
}

/* ── 역할별 로그인 ── */
.landing-role-login {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px 8px;
}
.landing-role-divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,.06);
    margin-bottom: 20px;
}
.landing-role-title {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #90A4AE;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}
.landing-role-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.landing-role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 4px 12px;
    background: rgba(255,255,255,.85);
    border-radius: 14px;
    text-decoration: none;
    transition: all .2s;
    border: 1.5px solid rgba(0,0,0,.04);
}
.landing-role-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-color: var(--role-color, #999);
}
.landing-role-icon {
    font-size: 24px;
    line-height: 1;
}
.landing-role-name {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* ── 랜딩 푸터 ── */
.landing-footer {
    text-align: center;
    padding: 40px 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
}

.landing-footer-logo {
    font-size: 13px;
    font-weight: 800;
    color: #B0BEC5;
    letter-spacing: -0.3px;
}

.landing-footer-copy {
    font-size: 11px;
    color: #CFD8DC;
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
 * 로그인 히어로 (반 선택)
 * ============================================ */
.login-hero {
    position: relative;
    padding: calc(env(safe-area-inset-top, 0px) + 40px) 24px 32px;
    text-align: center;
    overflow: hidden;
}

.login-hero-compact { padding-bottom: 24px; }

.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 떠다니는 별/원 */
.hero-circle {
    position: absolute;
    border-radius: 50%;
}
.hero-circle-1 {
    width: 20px; height: 20px;
    top: 20%; right: 15%;
    background: rgba(255,255,255,0.6);
    animation: twinkle 2s ease-in-out infinite, float 6s ease-in-out infinite;
}
.hero-circle-2 {
    width: 14px; height: 14px;
    top: 60%; left: 10%;
    background: rgba(255,241,118,0.7);
    animation: twinkle 2.5s ease-in-out infinite 0.5s, float 8s ease-in-out infinite reverse;
}
.hero-circle-3 {
    width: 10px; height: 10px;
    top: 35%; left: 75%;
    background: rgba(255,255,255,0.5);
    animation: twinkle 3s ease-in-out infinite 1s, float 10s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo { margin-bottom: 12px; }

.hero-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FFB74D, #FF9800);
    border: 4px solid rgba(255,255,255,0.6);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: white;
    box-shadow: 0 6px 24px rgba(255,152,0,0.35);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: gentleBounce 3s ease-in-out infinite;
}

.hero-title {
    font-size: 28px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.hero-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ============================================
 * 로그인 바디
 * ============================================ */
.login-body {
    padding: 0 16px 40px;
}

/* ── 반 선택 그리드 ── */
.class-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.class-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px 8px;
    border-radius: 18px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.7);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.class-item:active { transform: scale(0.9); }

.class-item.selected {
    background: white;
    border-color: #FF9800;
    box-shadow: 0 4px 20px rgba(255,152,0,0.25), 0 0 0 3px rgba(255,152,0,0.15);
    transform: scale(1.05);
}

.class-item-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    border: 2.5px solid rgba(255,255,255,0.8);
}

.class-item.selected .class-item-logo { border-color: #FFB74D; }

.class-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.class-item-name {
    font-size: 11px;
    font-weight: 800;
    color: #546E7A;
    letter-spacing: -0.3px;
}

.class-item.selected .class-item-name { color: #E65100; }

/* ── 보안 로그인 카드 (이름 + 전화번호) ── */
.secure-login-card {
    margin: 20px 16px 0;
    background: white;
    border-radius: 28px;
    padding: 32px 24px 28px;
    text-align: center;
    box-shadow: 0 12px 48px rgba(0,0,0,0.08);
    border: 2px solid #E0F2F1;
    position: relative;
    overflow: hidden;
}

.secure-login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FF5722, #FF9800);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.secure-login-lock {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255,152,0,0.2);
}

.secure-login-title {
    font-size: 20px;
    font-weight: 900;
    color: #263238;
    margin-bottom: 4px;
}

.secure-login-desc {
    font-size: 13px;
    color: #90A4AE;
    font-weight: 600;
    margin-bottom: 24px;
}

.secure-login-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.secure-login-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #546E7A;
    margin-bottom: 6px;
}

.secure-login-field input {
    width: 100%;
    padding: 14px 16px;
    border: 3px solid #E0E0E0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #263238;
    background: #FAFAFA;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.secure-login-field input:focus {
    border-color: #FF9800;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,152,0,0.12);
    outline: none;
}

.secure-login-field input::placeholder {
    color: #CFD8DC;
    font-weight: 600;
}

.secure-login-btn {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 900;
    border-radius: 16px;
    margin-bottom: 12px;
}

.secure-login-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #90A4AE;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.secure-login-back:active {
    color: #546E7A;
    background: #F5F5F5;
}

/* ── 카드 상세 모달 (획득 날짜 태그) ── */
.card-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F5F5F5;
    margin-bottom: 16px;
}

.card-detail-img-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-detail-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-detail-info { flex: 1; }

.card-detail-name {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 2px;
}

.card-detail-meta {
    font-size: 13px;
    color: #90A4AE;
    font-weight: 600;
}

.card-detail-qty {
    font-size: 14px;
    color: #546E7A;
    font-weight: 700;
    margin-top: 4px;
}

.card-detail-dates { margin-top: 4px; }

.card-detail-dates-title {
    font-size: 14px;
    font-weight: 800;
    color: #546E7A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-detail-dates-title::before {
    content: '📅';
    font-size: 16px;
}

.card-detail-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-detail-empty {
    text-align: center;
    padding: 32px 16px;
}

.card-detail-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.card-detail-empty-text {
    font-size: 16px;
    font-weight: 800;
    color: #78909C;
    margin-bottom: 6px;
}

.card-detail-empty-hint {
    font-size: 13px;
    color: #B0BEC5;
    font-weight: 600;
}

/* ── 전화번호 입력 ── */
.phone-verify {
    margin-top: 20px;
    background: white;
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 2px solid #E0F7FA;
}

.phone-verify-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.phone-verify-title {
    font-size: 17px;
    font-weight: 900;
    color: #37474F;
    margin-bottom: 4px;
}

.phone-verify-desc {
    font-size: 13px;
    color: #90A4AE;
    margin-bottom: 20px;
}

.phone-input-group { display: flex; gap: 10px; }

.phone-input-group input {
    flex: 1;
    padding: 14px;
    border: 3px solid #E0E0E0;
    border-radius: 16px;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 8px;
    color: #37474F;
    background: #FAFAFA;
    transition: all 0.2s ease;
}

.phone-input-group input:focus {
    border-color: #FF9800;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,152,0,0.12);
}

.btn-glow {
    box-shadow: 0 4px 16px rgba(255,152,0,0.4);
}

/* ============================================
 * 형제 선택
 * ============================================ */
.sibling-list { display: flex; flex-direction: column; gap: 10px; }

.sibling-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid #E0F2F1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.sibling-item:active {
    transform: scale(0.96);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.sibling-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sibling-item-name { font-size: 18px; font-weight: 900; color: #37474F; }
.sibling-item-class { font-size: 13px; color: #90A4AE; margin-top: 2px; font-weight: 600; }

/* ============================================
 * 마이페이지 히어로
 * ============================================ */
.mypage-hero {
    position: relative;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 24px;
    overflow: hidden;
}

.mypage-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mypage-hero-bg .hero-circle-1 { width: 16px; height: 16px; top: 15%; right: 10%; }
.mypage-hero-bg .hero-circle-2 { width: 12px; height: 12px; bottom: 25%; left: 8%; }
.mypage-hero-bg .hero-circle-3 { width: 8px; height: 8px; top: 45%; left: 55%; }

.mypage-hero-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mypage-brand {
    font-size: 15px;
    font-weight: 900;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.mypage-logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.15s ease;
}

.mypage-logout-btn:active { background: rgba(255,255,255,0.35); color: white; }

/* ── 프로필 ── */
.mypage-profile {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 16px;
}

.mypage-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    color: white;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    position: relative;
}

/* 아바타 뱃지 반짝이 */
.mypage-avatar::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.3);
    animation: spin 12s linear infinite;
}

.mypage-student-name {
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mypage-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.mypage-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.3);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.4);
}

/* ACE/BRAVO 진행 뱃지 (랭킹용 — coin-badge와 동일 사이즈) */
.progress-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.badge-ace { background: rgba(255,87,34,0.15); color: #E64A19; border: 1px solid rgba(255,87,34,0.3); }
.badge-bravo { background: rgba(156,39,176,0.15); color: #7B1FA2; border: 1px solid rgba(156,39,176,0.3); }
.badge-clear { background: rgba(255,193,7,0.2); color: #F57F17; border: 1px solid rgba(255,193,7,0.4); }

/* 마이탭 hero — mypage-tag와 동일 사이즈 */
.mypage-tags .progress-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.3);
    color: white;
    border-color: rgba(255,255,255,0.4);
}

/* 포디움 뱃지 (작게) */
.podium-progress .progress-badge {
    padding: 2px 8px;
    font-size: 10px;
    margin-top: 2px;
}

/* ── 코인 보물상자 ── */
.mypage-coin-card {
    position: relative;
    z-index: 2;
    margin: 0 auto 16px;
    max-width: 300px;
}

.coin-card-glow {
    position: absolute;
    inset: -6px;
    background: linear-gradient(135deg, #FFD54F, #FF9800, #FFD54F);
    border-radius: 28px;
    opacity: 0.35;
    filter: blur(14px);
    animation: coinGlow 3s ease-in-out infinite;
}

.coin-card-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 3px solid #FFD54F;
    border-radius: 22px;
    box-shadow: 0 6px 24px rgba(255,152,0,0.2), inset 0 2px 0 rgba(255,255,255,0.6);
}

.coin-card-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255,152,0,0.3), inset 0 -2px 0 rgba(0,0,0,0.08);
    animation: gentleBounce 2.5s ease-in-out infinite;
}

.coin-card-icon span {
    font-size: 26px;
    font-weight: 900;
    color: #E65100;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.coin-card-label {
    font-size: 11px;
    font-weight: 700;
    color: #BF360C;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.coin-card-value {
    font-size: 38px;
    font-weight: 900;
    color: #E65100;
    line-height: 1;
    letter-spacing: -1px;
}

/* ── 랭킹 카드 ── */
.mypage-rankings {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mypage-rank-card {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    background: rgba(255,255,255,0.35);
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.5);
}

.rank-divider { display: none; }

.rank-card-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 4px;
}

.rank-card-value {
    font-size: 20px;
    font-weight: 900;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
 * 마이페이지 바디
 * ============================================ */
.mypage-body {
    position: relative;
    z-index: 2;
    padding: 0 16px 40px;
    margin-top: 8px;
}

/* ── 카드 컬렉션 (스티커 앨범) ── */
.card-collection {
    background: white;
    border-radius: 28px;
    padding: 20px 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    border: 2px solid #E0F2F1;
    position: relative;
    overflow: hidden;
}

/* 스티커 앨범 배경 패턴 */
.card-collection::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 3px at 20px 20px, #FFF9C4 100%, transparent 100%),
        radial-gradient(circle 2px at 60px 45px, #E1F5FE 100%, transparent 100%),
        radial-gradient(circle 3px at 85% 30px, #F3E5F5 100%, transparent 100%),
        radial-gradient(circle 2px at 40% 80%, #E8F5E9 100%, transparent 100%);
    opacity: 0.5;
    pointer-events: none;
}

.card-collection-header { margin-bottom: 14px; position: relative; }

.card-collection-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 900;
    color: #37474F;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.reward-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 2.5px solid transparent;
}

.reward-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    border-radius: 4px;
}

.reward-card:active { transform: scale(0.97); }

/* 카드별 배경 & 테두리 */
.reward-card[data-color="steady"]  { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); border-color: #A5D6A7; }
.reward-card[data-color="leader"]  { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border-color: #90CAF9; }
.reward-card[data-color="mission"] { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-color: #FFCC80; }
.reward-card[data-color="posture"] { background: linear-gradient(135deg, #F3E5F5, #E1BEE7); border-color: #CE93D8; }
.reward-card[data-color="passion"] { background: linear-gradient(135deg, #FFEBEE, #FFCDD2); border-color: #EF9A9A; }
.reward-card[data-color="champion"] { background: linear-gradient(135deg, #FFFDE7, #FFF176); border-color: #FFEE58; }
.reward-card[data-color="ace"]     { background: linear-gradient(135deg, #FFF8E1, #FFECB3); border-color: #FFD54F; }

.reward-card-image {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.reward-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reward-card-info {
    flex: 1;
    min-width: 0;
}

.reward-card-name {
    font-weight: 900;
    font-size: 15px;
}

.reward-card-coins {
    font-size: 12px;
    color: #78909C;
    margin-top: 1px;
    font-weight: 600;
}

.reward-card-hint {
    font-size: 11px;
    color: #B0BEC5;
    margin-top: 2px;
    font-weight: 600;
}

.reward-card-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 50px;
    padding: 8px 6px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.reward-card-count-number {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.reward-card-count-label {
    font-size: 10px;
    color: #90A4AE;
    font-weight: 700;
}

/* ── 전체 랭킹 버튼 ── */
.ranking-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    margin-top: 16px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    color: #E65100;
    border-radius: 20px;
    font-weight: 800;
    font-size: 15px;
    border: 2.5px solid #FFD54F;
    box-shadow: 0 4px 16px rgba(255,193,7,0.2);
    transition: all 0.2s ease;
}

.ranking-btn:active {
    transform: scale(0.97);
    box-shadow: 0 6px 24px rgba(255,193,7,0.3);
}

.ranking-btn-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.ranking-btn span { flex: 1; text-align: left; }
.ranking-btn svg:last-child { color: #FFB74D; }

/* ── 푸터 ── */
.mypage-footer { text-align: center; padding: 24px 0 16px; }
.footer-logo {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 700;
}

/* ============================================
 * 전체 랭킹 페이지
 * ============================================ */
.ranking-page {
    background: linear-gradient(180deg, #E3F2FD, #F5F5F5);
    min-height: 100vh;
}

.ranking-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
    background: linear-gradient(135deg, #42A5F5, #1E88E5);
    box-shadow: 0 4px 20px rgba(30,136,229,0.3);
}

.ranking-back-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.15s ease;
}

.ranking-back-btn:active { background: rgba(255,255,255,0.35); }

.ranking-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 900;
    color: white;
}

.ranking-body {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
}

/* ── 포디움 ── */
.ranking-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px 24px;
    background: linear-gradient(180deg, #1E88E5 0%, #E3F2FD 100%);
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 110px;
}

.podium-item.rank-1 { order: 2; }
.podium-item.rank-2 { order: 1; }
.podium-item.rank-3 { order: 3; }

.podium-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    color: white;
    position: relative;
}

.podium-item.rank-1 .podium-avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    box-shadow: 0 4px 20px rgba(255,193,7,0.45);
    border: 4px solid rgba(255,255,255,0.7);
    animation: gentleBounce 2s ease-in-out infinite;
}

.podium-item.rank-2 .podium-avatar {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 3px solid rgba(255,255,255,0.6);
}

.podium-item.rank-3 .podium-avatar {
    background: linear-gradient(135deg, #D4A574, #CD7F32);
    box-shadow: 0 4px 16px rgba(205,127,50,0.3);
    border: 3px solid rgba(255,255,255,0.6);
}

.podium-trophy { position: absolute; top: -10px; right: -8px; font-size: 22px; }
.podium-item.rank-1 .podium-trophy { font-size: 28px; top: -14px; right: -10px; }

.podium-name { font-size: 14px; font-weight: 800; color: #37474F; text-align: center; }
.podium-class { font-size: 11px; color: #90A4AE; font-weight: 600; }

.podium-coins { font-size: 14px; font-weight: 900; }

.podium-bar {
    width: 100%;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    font-weight: 900;
    color: white;
    font-size: 15px;
}

.podium-item.rank-1 .podium-bar { height: 76px; background: linear-gradient(180deg, #FFD54F, #FFA726); }
.podium-item.rank-2 .podium-bar { height: 54px; background: linear-gradient(180deg, #E0E0E0, #BDBDBD); }
.podium-item.rank-3 .podium-bar { height: 42px; background: linear-gradient(180deg, #D4A574, #CD7F32); }

/* ── 랭킹 리스트 ── */
.ranking-list { padding: 0 16px; }

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: white;
    border-radius: 16px;
    margin-bottom: 8px;
    border: 2px solid #F5F5F5;
    transition: all 0.15s ease;
}

.ranking-item:active { transform: scale(0.99); border-color: #E0E0E0; }

.ranking-rank {
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-weight: 900;
    font-size: 13px;
    color: white;
    background: #CFD8DC;
    border-radius: 50%;
    flex-shrink: 0;
}

.ranking-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.ranking-info { flex: 1; min-width: 0; }
.ranking-name { font-weight: 800; font-size: 15px; color: #37474F; }
.ranking-class { font-size: 12px; color: #90A4AE; margin-top: 1px; font-weight: 600; }
.ranking-coins { flex-shrink: 0; }

/* ── 카드 히스토리 모달 ── */
.card-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    border-bottom: 2px solid #F5F5F5;
    border-radius: 12px;
    margin-bottom: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.card-history-item:last-child { border-bottom: none; margin-bottom: 0; }
.card-history-item:hover {
    background: linear-gradient(135deg, #E3F2FD, #F3E5F5);
    transform: translateX(4px);
}
.card-history-item:active {
    transform: translateX(2px);
}

.card-history-source {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-history-source-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.card-history-source-icon.src-checklist { background: #E8F5E9; }
.card-history-source-icon.src-qr_attendance { background: #FFF3E0; }
.card-history-source-icon.src-manual { background: #F3E5F5; }
.card-history-source-icon.src-system { background: #ECEFF1; }

.card-history-detail { font-size: 14px; color: #37474F; font-weight: 700; }
.card-history-date { font-size: 12px; color: #90A4AE; font-weight: 600; margin-top: 1px; }
.card-history-amount { font-weight: 900; font-size: 18px; min-width: 44px; text-align: right; }
.card-history-amount.positive { color: #43A047; }
.card-history-amount.negative { color: #E53935; }

/* ── 히스토리 상세 레이어 팝업 ── */
.history-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    max-width: 320px;
    width: calc(100vw - 40px);
    animation: popupAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.history-popup.show {
    display: block;
}

@keyframes popupAppear {
    from { opacity: 0; transform: scale(0.9) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.history-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F5F5F5;
}

.history-popup-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.history-popup-title {
    font-size: 16px;
    font-weight: 800;
    color: #263238;
}

.history-popup-subtitle {
    font-size: 12px;
    color: #90A4AE;
    margin-top: 2px;
}

.history-popup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-popup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-popup-label {
    font-size: 13px;
    color: #78909C;
    font-weight: 500;
}

.history-popup-value {
    font-size: 14px;
    font-weight: 700;
    color: #37474F;
}

.history-popup-desc {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #E3F2FD, #EDE7F6);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #455A64;
}

.history-popup-desc strong {
    color: #1565C0;
}

.history-popup-tip {
    margin-top: 10px;
    padding: 8px 12px;
    background: #FFF8E1;
    border-radius: 8px;
    font-size: 12px;
    color: #E65100;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
 * 하단 네비게이션 바
 * ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 6px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.bottom-nav.hidden {
    display: none !important;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    color: #90A4AE;
    font-size: 11px;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: #FF6B1A;
}

.bottom-nav-item.active svg {
    stroke: #FF6B1A;
}

.bottom-nav-item:active {
    transform: scale(0.9);
}

/* 하단 네비 여백 보정 */
.mypage-body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

.ranking-body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

#view-login .landing-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* ============================================
 * 키프레임 애니메이션
 * ============================================ */
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(8px, -12px); }
    66% { transform: translate(-6px, 6px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.6); }
}

@keyframes cloudDrift {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 200px)); }
}

@keyframes coinGlow {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.04); }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

.animate-slideUp {
    animation: slideUpFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
 * 반응형 (PC)
 * ============================================ */
@media (min-width: 768px) {
    .student-page {
        background: #263238;
    }

    .student-page::before,
    .student-page::after { display: none; }

    .student-page .app-container {
        background: linear-gradient(180deg, #4FC3F7 0%, #81D4FA 30%, #B3E5FC 60%, #E1F5FE 100%);
        box-shadow: 0 0 80px rgba(79,195,247,0.2), 0 20px 60px rgba(0,0,0,0.3);
        border-radius: 0;
        min-height: 100vh;
    }

    .ranking-page {
        background: linear-gradient(180deg, #E3F2FD, #F5F5F5);
    }

    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }
}

/* ── 라즈키즈 로그인 정보 ── */
.razkids-section {
    margin-bottom: 16px;
}
.razkids-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.razkids-header-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.razkids-title {
    font-size: 16px;
    font-weight: 700;
    color: #555;
}
.razkids-subtitle {
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}
.razkids-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.razkids-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
}
.razkids-field:last-child {
    border-bottom: none;
}
.razkids-field-label {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    flex-shrink: 0;
}
.razkids-field-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-align: right;
    word-break: break-all;
}
.razkids-pw-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.razkids-pw-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.razkids-pw-toggle:active {
    color: #FF6B1A;
}
.razkids-guide-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #FFF8F0;
    border: 1.5px solid #FFE0C0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #FF6B1A;
    cursor: pointer;
    transition: background 0.15s;
}
.razkids-guide-toggle:active {
    background: #FFE0C0;
}
.razkids-guide-arrow {
    transition: transform 0.2s;
}
.razkids-guide-toggle.open .razkids-guide-arrow {
    transform: rotate(180deg);
}
.razkids-guide {
    margin-top: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.razkids-guide-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rk-guide-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.rk-guide-step-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #FF6B1A, #FF9800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}
.rk-guide-step-body {
    flex: 1;
}
.rk-guide-step-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}
.rk-guide-step-body p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
}
.rk-guide-step-body img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 8px;
}
.rk-guide-step-body a {
    color: #FF6B1A;
    text-decoration: underline;
    font-weight: 600;
}
.rk-guide-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #FF0000;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.rk-guide-video-btn:active {
    background: #CC0000;
}
.rk-guide-link {
    color: #FF6B1A;
    font-weight: 700;
    text-decoration: underline;
}

/* ── 코인 계좌 ── */
.coin-account {
    margin-top: 20px;
}
.coin-account-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #555;
}
.coin-account-panel {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.coin-account-settling {
    text-align: center;
    padding: 20px 16px;
    color: #999;
    font-size: 14px;
    line-height: 1.7;
}
.coin-account-settling-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.coin-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.coin-account-row:last-child {
    border-bottom: none;
}
.coin-account-label {
    font-size: 14px;
    color: #555;
}
.coin-account-amount {
    font-size: 14px;
    font-weight: 700;
}
.coin-account-amount.plus {
    color: #4CAF50;
}
.coin-account-amount.minus {
    color: #F44336;
}
.coin-account-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 10px;
}
.coin-account-balance-label {
    font-size: 14px;
    font-weight: 600;
    color: #888;
}
.coin-account-balance-amount {
    font-size: 20px;
    font-weight: 700;
    color: #F5A623;
}

/* ── 지난 학기 기록 ── */
.semester-history {
    margin-top: 20px;
}

.semester-history-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #555;
}

.semester-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.semester-tabs::-webkit-scrollbar { display: none; }

.semester-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #E0E0E0;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
}
.semester-tab.active {
    background: #FF6B1A;
    border-color: #FF6B1A;
    color: #fff;
}

.semester-panel {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.semester-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 6px;
}
.semester-card-name {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}
.semester-card-detail {
    text-align: right;
    font-size: 13px;
}
.semester-card-calc {
    color: #888;
}
.semester-card-subtotal {
    font-weight: 700;
    color: #F5A623;
}

.semester-summary {
    text-align: center;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border-radius: 10px;
}
.semester-summary-coins {
    font-size: 20px;
    font-weight: 700;
    color: #F5A623;
}
.semester-summary-rank {
    font-size: 18px;
    font-weight: 700;
    color: #FF6B1A;
}
.semester-summary-label {
    font-size: 14px;
    color: #888;
}
.semester-empty {
    text-align: center;
    padding: 24px;
    color: #bbb;
    font-size: 14px;
}
