/* MathCoco Shared Stylesheet */
:root { 
    --brand-purple: #6C5CE7; 
    --brand-purple-dark: #5844e0;
    --brand-yellow: #FFEAA7;
    --brand-coral: #FF7675;
    --brand-mint: #00B894;
    --clay-bg: #FBF9F5;
    --clay-card-bg: #FFFFFF;
    --text-main: #2D3436; 
    --text-sub: #636E72;
    --toy-shadow: 0 12px 32px rgba(108, 92, 231, 0.12), 0 4px 12px rgba(0,0,0,0.04);
    --toy-lip: 0 5px 0 #5240d6;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100vw; overflow-x: hidden; }

body { 
    font-family: 'Pretendard', sans-serif; 
    color: var(--text-main); 
    background-color: var(--clay-bg);
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 118, 117, 0.03) 0%, transparent 25%);
}

/* 3D 클레이 버튼 공통 */
.btn-clay {
    border-radius: 50px;
    font-weight: 800;
    transition: all 0.15s ease-in-out;
    border: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}
.btn-clay:active {
    transform: translateY(3px) !important;
}

/* 스토어 버튼 */
.btn-appstore {
    background: #1E1B4B;
    color: #FFFFFF !important;
    padding: 10px 24px;
    box-shadow: 0 5px 0 #0F0E26, 0 10px 20px rgba(0,0,0,0.15);
    min-height: 52px;
}
.btn-appstore:hover {
    background: #2D276D;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #0F0E26, 0 14px 24px rgba(0,0,0,0.2);
}
.btn-appstore:active {
    box-shadow: 0 2px 0 #0F0E26 !important;
}

.btn-googleplay {
    background: #FFFFFF;
    color: #1E1B4B !important;
    padding: 10px 24px;
    border: 2px solid #E2E8F0;
    box-shadow: 0 5px 0 #CBD5E1, 0 10px 20px rgba(0,0,0,0.08);
    min-height: 52px;
    cursor: pointer;
}
.btn-googleplay:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #94A3B8, 0 14px 24px rgba(0,0,0,0.12);
}
.btn-googleplay:active {
    box-shadow: 0 2px 0 #CBD5E1 !important;
}

/* 주요 액션 버튼 */
.btn-learn-minute {
    background: linear-gradient(135deg, #6C5CE7 0%, #4834D4 100%);
    color: #FFFFFF !important;
    padding: 11px 26px;
    box-shadow: 0 5px 0 #372A99, 0 10px 20px rgba(108, 92, 231, 0.25);
    font-size: 0.95rem;
    font-weight: 800;
    position: relative;
    z-index: 5;
}
.btn-learn-minute:hover {
    background: linear-gradient(135deg, #7C6EF0 0%, #5844E0 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #372A99, 0 14px 24px rgba(108, 92, 231, 0.35);
}
.btn-learn-minute:active {
    box-shadow: 0 2px 0 #372A99 !important;
}

.btn-kakao {
    background-color: var(--brand-yellow);
    color: #191919;
    font-weight: 800;
    border-radius: 50px;
    padding: 9px 18px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
.btn-kakao:hover {
    background-color: #FADA0A;
    color: #000;
    transform: translateY(-2px);
}

/* 네비게이션 */
.navbar { 
    backdrop-filter: blur(14px); 
    background: rgba(251, 249, 245, 0.92); 
    border-bottom: 2px solid rgba(226, 232, 240, 0.6); 
}
.nav-app-switcher .nav-link {
    font-weight: 800;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    color: #64748b;
    transition: all 0.2s;
}
.nav-app-switcher .nav-link.active {
    background: #FFFFFF;
    color: var(--brand-purple);
    box-shadow: 0 3px 0 #DDD6FE, 0 6px 12px rgba(108, 92, 231, 0.1);
}

/* Hero 섹션 */
.hero-section { 
    padding-top: 135px; 
    padding-bottom: 70px; 
    position: relative;
}
.hero-badge {
    background: #EDE9FE;
    color: #6D28D9;
    font-weight: 800;
    font-size: 0.86rem;
    border: 1.5px solid #DDD6FE;
    box-shadow: 0 3px 0 #DDD6FE;
}
.release-pill {
    background: #DCFCE7;
    color: #166534;
    font-weight: 800;
    font-size: 0.84rem;
    border: 1.5px solid #BBF7D0;
    box-shadow: 0 3px 0 #BBF7D0;
}
.new-v16-pill {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 800;
    font-size: 0.84rem;
    border: 1.5px solid #FDE68A;
    box-shadow: 0 3px 0 #FDE68A;
}
.hero-headline { 
    font-size: clamp(2rem, 6.5vw, 3.4rem);
    font-weight: 900; 
    line-height: 1.25; 
    letter-spacing: -0.02em; 
    color: #1E1B4B;
}
.hero-headline span.highlight {
    background: linear-gradient(135deg, #6C5CE7 0%, #FF7675 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 클릭 재생 3D 쇼츠 캐러셀 쇼룸 (유튜브 공식 조회수 정상 집계) */
.shorts-carousel-section {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    user-select: none;
}
.shorts-carousel-stage {
    position: relative;
    width: 100%;
    height: 495px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.shorts-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 262px;
    aspect-ratio: 9 / 16;
    border-radius: 30px;
    background: #FFFFFF;
    padding: 8px;
    box-shadow: 0 22px 48px rgba(30, 27, 75, 0.18), 0 6px 0 #E2E8F0;
    border: 2.5px solid #F1F5F9;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease,
                filter 0.35s ease,
                box-shadow 0.35s ease;
    transform-origin: center center;
}
.shorts-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: #0F172A;
}
.shorts-card-inner iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.shorts-card.is-active {
    z-index: 10;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 24px 54px rgba(108, 92, 231, 0.24), 0 6px 0 #DDD6FE;
    border-color: #EDE9FE;
}
.shorts-card.is-prev {
    z-index: 5;
    opacity: 0.78;
    transform: translate(calc(-50% - 148px), -50%) scale(0.82) rotate(-3deg);
    filter: saturate(0.85);
    cursor: pointer;
}
.shorts-card.is-next {
    z-index: 5;
    opacity: 0.78;
    transform: translate(calc(-50% + 148px), -50%) scale(0.82) rotate(3deg);
    filter: saturate(0.85);
    cursor: pointer;
}
.shorts-card.is-prev:hover {
    opacity: 0.95;
    transform: translate(calc(-50% - 154px), -50%) scale(0.85) rotate(-2deg);
}
.shorts-card.is-next:hover {
    opacity: 0.95;
    transform: translate(calc(-50% + 154px), -50%) scale(0.85) rotate(2deg);
}
.shorts-card.is-hidden {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.7);
}
.shorts-side-poster {
    width: 100%;
    height: 100%;
    position: relative;
    background: #1E1B4B;
}
.shorts-side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shorts-side-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.12) 0%, rgba(15,23,42,0.58) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 18px 14px;
    text-align: center;
}
.shorts-side-badge {
    background: rgba(255, 255, 255, 0.94);
    color: #1E1B4B;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.shorts-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}
.shorts-arrow-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #EDE9FE;
    background: #FFFFFF;
    color: var(--brand-purple);
    font-weight: 900;
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.12), 0 3px 0 #DDD6FE;
    transition: all 0.15s ease;
}
.shorts-arrow-btn:hover {
    background: var(--brand-purple);
    color: #FFFFFF;
    border-color: var(--brand-purple);
    transform: translateY(-1px);
}
.shorts-arrow-btn:active {
    transform: translateY(2px);
}
.shorts-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    padding: 7px 14px;
    border-radius: 50px;
    border: 1.5px solid #EDE9FE;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.08);
}
.shorts-dot-btn {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: #CBD5E1;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}
.shorts-dot-btn.active {
    width: 26px;
    border-radius: 10px;
    background: var(--brand-purple);
}
.shorts-caption-bar {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.shorts-active-pill {
    background: #FFFFFF;
    color: #1E1B4B;
    border: 1.5px solid #EDE9FE;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 3px 0 #EDE9FE;
}
.shorts-yt-link {
    font-size: 0.80rem;
    font-weight: 800;
    color: #DC2626;
    background: #FEF2F2;
    border: 1.5px solid #FECACA;
    padding: 6px 12px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}
.shorts-yt-link:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
}

/* 맞춤형 PDF 문제은행 생성 파트 */
.pdf-showcase-section {
    padding: 85px 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBF9F5 100%);
    border-top: 3px solid #EDE9FE;
    position: relative;
}
.pdf-spec-pill {
    background: #FFFFFF;
    border: 2px solid #EDE9FE;
    border-radius: 20px;
    padding: 14px 18px;
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.06), 0 3px 0 #EDE9FE;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}
.pdf-spec-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #F3EEFF;
    color: var(--brand-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.pdf-library-card {
    background: #FFFFFF;
    border-radius: 36px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(108, 92, 231, 0.14), 0 6px 0 #DDD6FE;
    border: 3px solid #EDE9FE;
    max-width: 980px;
    margin: 0 auto;
}
.pdf-subject-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}
.pdf-subject-btn {
    background: #F8FAFC;
    color: #475569;
    border: 2px solid #E2E8F0;
    border-radius: 50px;
    padding: 9px 20px;
    font-size: 0.92rem;
    font-weight: 800;
    transition: all 0.15s ease;
    box-shadow: 0 3px 0 #E2E8F0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pdf-subject-btn .count-pill {
    background: #E2E8F0;
    color: #475569;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 900;
}
.pdf-subject-btn:hover, .pdf-subject-btn.active {
    background: var(--brand-purple);
    color: #FFFFFF;
    border-color: var(--brand-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #4834D4, 0 8px 16px rgba(108, 92, 231, 0.25);
}
.pdf-subject-btn.active .count-pill,
.pdf-subject-btn:hover .count-pill {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* 단계 & 번호 무한 확장 컨트롤 바 */
.pdf-selector-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F8FAFC;
    border-radius: 22px;
    border: 1.5px solid #E2E8F0;
    margin-bottom: 18px;
}
.pdf-select-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.pdf-select-box {
    background-color: #FFFFFF;
    border: 2px solid #CBD5E1;
    border-radius: 14px;
    padding: 7px 32px 7px 14px;
    font-weight: 800;
    font-size: 0.88rem;
    color: #1E293B;
    cursor: pointer;
    box-shadow: 0 2px 0 #E2E8F0;
}
.pdf-select-box:focus {
    border-color: var(--brand-purple);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.pdf-nav-btn {
    background: #FFFFFF;
    color: #334155;
    border: 1.5px solid #CBD5E1;
    border-radius: 14px;
    padding: 7px 13px;
    font-size: 0.84rem;
    font-weight: 800;
    transition: all 0.15s ease;
    box-shadow: 0 2px 0 #E2E8F0;
}
.pdf-nav-btn:hover:not(:disabled) {
    background: #EDE9FE;
    color: var(--brand-purple);
    border-color: #C4B5FD;
}
.pdf-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pdf-paper-stage {
    background: #F1F5F9;
    border-radius: 24px;
    padding: 20px;
    border: 2px solid #E2E8F0;
}
.pdf-sheet-box {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border: 1px solid #E2E8F0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pdf-canvas-wrap {
    position: relative;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    border: 1px solid #F1F5F9;
    cursor: zoom-in;
}
.pdf-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* 롱폼 온보딩 & 시계 공부 쇼케이스 섹션 */
.longform-showcase-section {
    padding: 85px 0;
    background: linear-gradient(180deg, #FBF9F5 0%, #F3EEFF 100%);
    border-top: 3px solid #EDE9FE;
    position: relative;
}
.tablet-video-card {
    background: #FFFFFF;
    border-radius: 36px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(108, 92, 231, 0.14), 0 6px 0 #DDD6FE;
    border: 3px solid #EDE9FE;
    max-width: 920px;
    margin: 0 auto;
}
.tablet-screen-16x10 {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0F172A;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12);
}
.chapter-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
    padding: 14px;
    background: #F8FAFC;
    border-radius: 24px;
    border: 1.5px solid #E2E8F0;
}
.chapter-jump-btn {
    background: #FFFFFF;
    color: #334155;
    border: 1.5px solid #E2E8F0;
    border-radius: 50px;
    padding: 7px 14px;
    font-size: 0.84rem;
    font-weight: 800;
    transition: all 0.15s ease;
    box-shadow: 0 2px 0 #E2E8F0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chapter-jump-btn .time-badge {
    color: var(--brand-purple);
    font-family: monospace;
    font-weight: 900;
    background: #EDE9FE;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.78rem;
}
.chapter-jump-btn:hover, .chapter-jump-btn.active {
    background: var(--brand-purple);
    color: #FFFFFF;
    border-color: var(--brand-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.25);
}
.chapter-jump-btn:hover .time-badge, .chapter-jump-btn.active .time-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* 인터랙티브 웹 시뮬레이터 공통 */
.simulator-section {
    padding: 90px 0;
    background: #FFFFFF;
    border-top: 3px solid #F1F5F9;
    border-bottom: 3px solid #F1F5F9;
    position: relative;
}
.sim-container-card {
    background: var(--clay-bg);
    border-radius: 36px;
    border: 3px solid #EDE9FE;
    box-shadow: 0 16px 40px rgba(108, 92, 231, 0.08), 0 6px 0 #DDD6FE;
    overflow: hidden;
}
.sim-nav-tabs {
    display: flex;
    background: #EDE9FE;
    padding: 8px 12px;
    gap: 10px;
}
.sim-nav-btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    font-weight: 900;
    font-size: 1.02rem;
    color: #6D28D9;
    border-radius: 22px;
    transition: all 0.2s;
}
.sim-nav-btn.active {
    background: #FFFFFF;
    color: #4C1D95;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15), 0 3px 0 #C4B5FD;
}

/* 1) 시계 시뮬레이터 */
.clock-sim-box {
    position: relative;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
}
.clock-sky-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0 0 32px 32px;
    z-index: 1;
    overflow: hidden;
    transition: background 0.3s ease;
}
#skyCelestialCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.clock-interactive-canvas {
    position: relative;
    z-index: 5;
    width: 310px;
    height: 310px;
    touch-action: none;
    cursor: grab;
    filter: drop-shadow(0 16px 30px rgba(0,0,0,0.18));
}
.clock-interactive-canvas:active { cursor: grabbing; }

.clock-digital-pill {
    position: relative;
    z-index: 5;
    background: rgba(255,255,255,0.96);
    padding: 7px 18px 7px 20px;
    border-radius: 50px;
    font-size: 1.22rem;
    font-weight: 900;
    color: #1E1B4B;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1), 0 3px 0 #E2E8F0;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-mode-toggle {
    background: #EDE9FE;
    color: #5B21B6;
    border: 1px solid #DDD6FE;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-mode-toggle:hover {
    background: #DDD6FE;
}

.clock-guide-pill {
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 7px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    max-width: 92%;
    text-align: center;
    margin-top: 12px;
}
.clock-guide-pill span {
    color: #1E293B;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.4;
}

/* 2) 세로셈 모눈 보드 & 3열 수직 정렬 그리드 */
.math-sim-box {
    position: relative;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
}
.math-quiz-board {
    position: relative;
    background: #FFFFFF;
    border: 3px solid #E2E8F0;
    border-radius: 28px;
    padding: 22px 28px 42px 28px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04), 0 4px 0 #E2E8F0;
    max-width: 480px;
    width: 100%;
    background-image: 
        linear-gradient(#F1F5F9 1.5px, transparent 1.5px),
        linear-gradient(90deg, #F1F5F9 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    overflow: hidden;
    user-select: none;
}

.vertical-math-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 4px auto 0 auto;
    width: fit-content;
}

.math-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.col-op {
    width: 44px;
    font-family: 'Fredoka', 'Pretendard', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #1E293B;
    text-align: center;
    line-height: 1;
}

.col-tens, .col-units {
    width: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', 'Pretendard', monospace;
    font-size: 3.4rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.1;
    text-align: center;
}

.carry-row { margin-bottom: 2px; }
.carry-row .col-tens { height: 36px; }

.carry-dashed-circle {
    width: 34px;
    height: 34px;
    border: 2px dashed #94A3B8;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.vertical-math-line {
    width: 100%;
    min-width: 220px;
    height: 4px;
    background: #1E293B;
    border-radius: 4px;
    margin: 8px 0 14px 0;
}

.answer-slot-box {
    width: 68px;
    height: 76px;
    background: rgba(108, 92, 231, 0.08);
    border: 2.5px dashed rgba(108, 92, 231, 0.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.answer-slot-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    border-top: 1px dashed rgba(108, 92, 231, 0.3);
}
.answer-slot-box::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 1px;
    border-left: 1px dashed rgba(108, 92, 231, 0.3);
}

#mathFullCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    touch-action: none;
    cursor: crosshair;
}

.canvas-guide-overlay {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #7C3AED;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed rgba(124, 58, 237, 0.25);
    padding: 3px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    white-space: nowrap;
}

.large-card-full-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 25;
    padding: 24px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 32px 32px;
    animation: fadeIn 0.25s ease-out;
}
.large-card-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    text-align: center;
    margin: auto;
    width: 100%;
    max-width: 480px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

/* 6대 배움터 카드 */
.feature-box {
    background: #FFFFFF;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), 0 4px 0 #E2E8F0;
    border: 2px solid #F1F5F9;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(108, 92, 231, 0.09), 0 5px 0 #DDD6FE;
    border-color: #EDE9FE;
}
.playground-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    background: #F3EEFF;
    color: var(--brand-purple);
    margin-bottom: 10px;
}

@media (max-width: 991.98px) {
    .hero-section { padding-top: 110px; padding-bottom: 40px; }
    .shorts-carousel-stage { height: 420px; }
    .shorts-card { width: 218px; border-radius: 26px; padding: 6px; }
    .shorts-card-inner { border-radius: 20px; }
    .shorts-card.is-prev {
        transform: translate(calc(-50% - 76px), -50%) scale(0.80) rotate(-3deg);
    }
    .shorts-card.is-next {
        transform: translate(calc(-50% + 76px), -50%) scale(0.80) rotate(3deg);
    }
    .pdf-library-card { padding: 14px; border-radius: 24px; }
    .pdf-paper-stage { padding: 12px; }
    .pdf-selector-toolbar { justify-content: center; }
    .tablet-video-card { padding: 12px; border-radius: 24px; }
    .tablet-screen-16x10 { border-radius: 16px; }
    .chapter-jump-btn { font-size: 0.78rem; padding: 6px 11px; }
    .sim-nav-btn { font-size: 0.92rem; padding: 10px 6px; }
    .math-quiz-board { padding: 18px 20px 38px 20px; }
    .clock-interactive-canvas { width: 280px; height: 280px; }

    .col-op { width: 36px; font-size: 2.2rem; }
    .col-tens, .col-units { width: 58px; font-size: 2.7rem; }
    .math-row { gap: 10px; }
    .answer-slot-box { width: 58px; height: 66px; }
    .vertical-math-line { min-width: 180px; }
    .canvas-guide-overlay { font-size: 0.72rem; padding: 3px 10px; }
}

@media (max-width: 400px) {
    .shorts-carousel-stage { height: 390px; }
    .shorts-card { width: 200px; }
    .shorts-card.is-prev {
        transform: translate(calc(-50% - 60px), -50%) scale(0.78) rotate(-2deg);
    }
    .shorts-card.is-next {
        transform: translate(calc(-50% + 60px), -50%) scale(0.78) rotate(2deg);
    }
}

/* Language-specific font stacks */
html[lang="ko"] body {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[lang="en"] body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[lang="ja"] body {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Inter', 'Meiryo', sans-serif;
}
html[lang^="zh-Hant"] body {
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Inter', sans-serif;
}
html[lang^="zh-Hans"] body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Inter', sans-serif;
}

/* Global Support Email Button (EN / JP / TW / CN) */
.btn-support-email {
    background-color: #EDE9FE;
    color: #6D28D9;
    font-weight: 800;
    border-radius: 50px;
    padding: 9px 18px;
    border: 1.5px solid #DDD6FE;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}
.btn-support-email:hover {
    background-color: #DDD6FE;
    color: #5B21B6;
    transform: translateY(-2px);
}

/* =====================================================================
   Interactive Web Taste Showcase (Right under Hero Card)
   ===================================================================== */
.web-taste-section {
    padding: 36px 0 42px;
    background: linear-gradient(180deg, rgba(255, 245, 240, 0.72) 0%, rgba(251, 249, 245, 0.96) 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.75);
    border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.web-taste-card {
    max-width: 1040px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 28px;
    border: 1.5px solid #EAE6FF;
    box-shadow: 0 16px 38px rgba(108, 92, 231, 0.10), 0 4px 12px rgba(15, 23, 42, 0.04);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.web-taste-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 8% 18%, rgba(255, 71, 87, 0.06) 0%, transparent 38%),
        radial-gradient(circle at 92% 84%, rgba(108, 92, 231, 0.07) 0%, transparent 42%);
    pointer-events: none;
}

.web-taste-emblem {
    position: relative;
    z-index: 1;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 24px;
    background: linear-gradient(145deg, #FFF3F4 0%, #F5F3FF 100%);
    border: 1.5px solid #FDE2E6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.9), 0 6px 14px rgba(255, 71, 87, 0.12);
}

.web-taste-emblem img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.web-taste-live-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10B981;
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.web-taste-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.web-taste-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF1F2;
    color: #E11D48;
    border: 1px solid #FECDD3;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.web-taste-title {
    font-size: 1.38rem;
    font-weight: 900;
    color: #1E1B4B;
    line-height: 1.28;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.web-taste-desc {
    font-size: 0.94rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 12px;
}

.web-taste-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.web-taste-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

.web-taste-action {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-web-taste-launch {
    background: linear-gradient(135deg, #FF4757 0%, #FF6B81 100%);
    color: #FFFFFF !important;
    padding: 13px 26px;
    min-height: 54px;
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 900;
    box-shadow: 0 5px 0 #D63042, 0 12px 24px rgba(255, 71, 87, 0.28);
    white-space: nowrap;
}

.btn-web-taste-launch:hover {
    background: linear-gradient(135deg, #FF3B4D 0%, #FF5C75 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #D63042, 0 16px 28px rgba(255, 71, 87, 0.34);
}

.btn-web-taste-launch:active {
    box-shadow: 0 2px 0 #D63042 !important;
}

.web-taste-hint {
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
}

.web-taste-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1040px;
    margin: 0 auto;
}

.web-taste-stack .web-taste-card {
    width: 100%;
    margin: 0;
}

.web-taste-card-cosmic {
    background: linear-gradient(135deg, #0B1120 0%, #111B36 56%, #1B1842 100%);
    border-color: rgba(125, 211, 252, 0.36);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22), 0 6px 18px rgba(56, 189, 248, 0.14);
}

.web-taste-card-cosmic::before {
    background:
        radial-gradient(circle at 12% 20%, rgba(56, 189, 248, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(167, 139, 250, 0.20) 0%, transparent 46%);
}

.web-taste-card-cosmic .web-taste-emblem {
    background: radial-gradient(circle at 30% 25%, #1E3A8A 0%, #0F172A 68%, #020617 100%);
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: inset 0 2px 10px rgba(125, 211, 252, 0.22), 0 8px 20px rgba(2, 6, 23, 0.45);
}

.web-taste-card-cosmic .web-taste-live-dot {
    border-color: #0B1120;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.32);
}

.web-taste-card-cosmic .web-taste-eyebrow {
    background: rgba(56, 189, 248, 0.15);
    color: #7DD3FC;
    border-color: rgba(125, 211, 252, 0.36);
}

.web-taste-card-cosmic .web-taste-title {
    color: #FFFFFF;
}

.web-taste-card-cosmic .web-taste-desc {
    color: #CBD5E1;
}

.web-taste-card-cosmic .web-taste-chip {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.28);
    color: #E2E8F0;
}

.web-taste-card-cosmic .web-taste-hint {
    color: #94A3B8;
}

.btn-web-taste-cosmic {
    background: linear-gradient(135deg, #0EA5E9 0%, #10B981 100%);
    color: #FFFFFF !important;
    padding: 13px 26px;
    min-height: 54px;
    border-radius: 999px;
    font-size: 1.02rem;
    font-weight: 900;
    box-shadow: 0 5px 0 #047857, 0 12px 24px rgba(14, 165, 233, 0.32);
    white-space: nowrap;
}

.btn-web-taste-cosmic:hover {
    background: linear-gradient(135deg, #38BDF8 0%, #34D399 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #047857, 0 16px 28px rgba(14, 165, 233, 0.40);
}

.btn-web-taste-cosmic:active {
    box-shadow: 0 2px 0 #047857 !important;
}

@media (max-width: 991px) {
    .web-taste-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }
    .web-taste-chips {
        justify-content: center;
    }
    .web-taste-action {
        width: 100%;
    }
    .btn-web-taste-launch,
    .btn-web-taste-cosmic {
        width: 100%;
        max-width: 320px;
    }
}
