﻿:root {
    --bb-bg: #f5f7fb;
    --bb-surface: rgba(255,255,255,.92);
    --bb-surface-solid: #ffffff;
    --bb-text: #0f172a;
    --bb-muted: #64748b;
    --bb-line: #e2e8f0;
    --bb-line-soft: #edf2f7;
    --bb-primary: #2563eb;
    --bb-primary-dark: #1d4ed8;
    --bb-primary-soft: #eff6ff;
    --bb-accent: #38bdf8;
    --bb-success: #059669;
    --bb-danger: #dc2626;
    --bb-radius-sm: 12px;
    --bb-radius: 18px;
    --bb-radius-lg: 28px;
    --bb-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05);
    --bb-shadow: 0 18px 55px rgba(15,23,42,.09);
    --bb-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 8% 0%, rgba(56,189,248,.10), transparent 28rem),
        radial-gradient(circle at 92% 8%, rgba(37,99,235,.08), transparent 26rem),
        var(--bb-bg);
    color: var(--bb-text);
    font-family: Pretendard, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "맑은 고딕", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.site-header,
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px max(22px, calc((100vw - var(--bb-max)) / 2));
    border-bottom: 1px solid rgba(226,232,240,.78);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand,
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--bb-text) !important;
    font-family: Pretendard, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "맑은 고딕", sans-serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: -.03em !important;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: block;
    flex: 0 0 34px;
    object-fit: contain;
}

.header-right,
.site-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.header-right a,
.site-actions a {
    margin: 0 !important;
    padding: 9px 12px !important;
    border-radius: 11px !important;
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    transition: background .18s ease, color .18s ease, transform .18s ease;
    white-space: nowrap;
}

.header-right a:hover,
.site-actions a:hover {
    color: var(--bb-text) !important;
    background: #f1f5f9;
}

.header-right a.btn,
.site-actions a.btn,
.primary-link {
    color: #fff !important;
    background: var(--bb-primary) !important;
    box-shadow: 0 8px 20px rgba(37,99,235,.18) !important;
}

.header-right a.btn:hover,
.site-actions a.btn:hover,
.primary-link:hover {
    background: var(--bb-primary-dark) !important;
    transform: translateY(-1px);
}

.hero {
    max-width: var(--bb-max);
    margin: 0 auto;
    padding: 76px 22px 38px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 6vw, 70px);
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 32px;
    background:
        radial-gradient(circle at 90% 0%, rgba(56,189,248,.16), transparent 28rem),
        linear-gradient(145deg, #ffffff 0%, #f8fbff 54%, #f4f8ff 100%);
    box-shadow: var(--bb-shadow);
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -100px;
    bottom: -150px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(56,189,248,.02));
    filter: blur(3px);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: rgba(239,246,255,.82);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 5px rgba(56,189,248,.12);
}

.hero h1 {
    max-width: 780px;
    margin: 0;
    color: #0b1220;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -.055em;
    word-break: keep-all;
}

.hero p {
    max-width: 690px;
    margin: 22px 0 0;
    color: #5b6b82;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.8;
    word-break: keep-all;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-point {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.hero-point::before {
    content: "✓";
    color: var(--bb-primary);
    font-weight: 900;
}

.program-nav-wrap {
    position: sticky;
    top: 72px;
    z-index: 900;
    border-top: 1px solid rgba(226,232,240,.55);
    border-bottom: 1px solid rgba(226,232,240,.78);
    background: rgba(245,247,251,.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.program-nav {
    max-width: var(--bb-max);
    margin: 0 auto;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.program-nav-label {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-right: 4px;
}

.menu-list {
    display: flex !important;
    align-items: center;
    gap: 7px;
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    min-width: max-content;
}

.menu-list li { margin: 0 !important; padding: 0 !important; }
.menu-list li a {
    display: block;
    padding: 9px 13px !important;
    border: 1px solid #e2e8f0;
    border-radius: 999px !important;
    background: #fff;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    transition: .18s ease;
}
.menu-list li a:hover {
    border-color: #bfdbfe;
    color: #1d4ed8 !important;
    background: #eff6ff;
    transform: translateY(-1px);
}
.menu-list li a.active {
    border-color: #2563eb;
    color: #fff !important;
    background: #2563eb;
    box-shadow: 0 8px 20px rgba(37,99,235,.16);
}

.content-main {
    width: 100%;
    max-width: var(--bb-max);
    margin: 0 auto;
    padding: 42px 22px 74px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-kicker {
    color: var(--bb-primary);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-title {
    margin: 7px 0 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    letter-spacing: -.035em;
}

.section-desc {
    max-width: 520px;
    margin: 0;
    color: var(--bb-muted);
    font-size: 14px;
    line-height: 1.7;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.program-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid var(--bb-line);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--bb-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.program-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 20px 45px rgba(15,23,42,.10);
}

.program-card-image {
    min-height: 184px;
    display: grid;
    place-items: center;
    padding: 26px;
    background:
        radial-gradient(circle at 50% 0%, rgba(56,189,248,.13), transparent 72%),
        #f8fafc;
    border-bottom: 1px solid var(--bb-line-soft);
}

.program-card-image img {
    width: 100%;
    max-width: 156px;
    height: 130px;
    object-fit: contain;
    border-radius: 16px;
}

.program-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.program-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -.02em;
    word-break: keep-all;
}

.program-card p {
    margin: 11px 0 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    word-break: keep-all;
}

.program-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.program-price {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.program-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
    transition: .18s ease;
}

.program-card:hover .program-arrow {
    color: #fff;
    background: #2563eb;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
}
.detail-breadcrumb a { color: #2563eb; }

.card.product-detail-card,
.card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bb-line);
    border-radius: 26px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--bb-shadow);
}

.product-detail-flex {
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr);
    align-items: stretch;
    gap: 0;
    min-height: 390px;
    margin: 0;
}

.product-image {
    display: grid;
    place-items: center;
    min-height: 390px;
    padding: 50px;
    border: 0;
    border-right: 1px solid var(--bb-line-soft);
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 10%, rgba(56,189,248,.16), transparent 62%),
        linear-gradient(145deg, #f8fbff, #f8fafc);
}

.product-image img {
    width: min(100%, 250px);
    max-width: 250px;
    height: 230px;
    margin: 0;
    padding: 12px;
    object-fit: contain;
    border: 0;
    border-radius: 24px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 20px 45px rgba(15,23,42,.08);
}

.product-info {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    padding: 54px;
}

.product-label {
    display: inline-flex;
    margin-bottom: 13px;
    padding: 6px 9px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
}

.product-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(29px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -.045em;
    text-align: left;
    word-break: keep-all;
}

.product-price {
    margin: 18px 0 0;
    color: #334155;
    font-size: 19px;
    font-weight: 800;
}

.product-price small {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 650;
}

.product-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 28px;
}

.btn-main,
.btn-download,
.buy-btn,
.login-btn,
.register-btn,
.mypage-btn {
    min-width: 132px;
    width: auto;
    margin: 0;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition: .18s ease;
}

.btn-main,
.buy-btn,
.login-btn,
.register-btn,
.mypage-btn {
    color: #fff;
    background: var(--bb-primary);
    box-shadow: 0 10px 24px rgba(37,99,235,.18);
}

.btn-main:hover,
.buy-btn:hover,
.login-btn:hover,
.register-btn:hover,
.mypage-btn:hover {
    color: #fff;
    background: var(--bb-primary-dark);
    transform: translateY(-1px);
}

.btn-download {
    color: #1e40af;
    border-color: #dbeafe;
    background: #eff6ff;
}
.btn-download:hover {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #dbeafe;
}
.btn-download:disabled {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
}

.product-desc {
    margin: 0;
    padding: 36px 42px 44px;
    border-top: 1px solid var(--bb-line-soft);
    color: #334155;
    font-size: 15px;
    line-height: 1.82;
}
.product-desc h1,
.product-desc h2,
.product-desc h3 { color: #0f172a; letter-spacing: -.025em; }
.product-desc img { max-width: 100%; height: auto; border-radius: 16px; }
.product-desc table { max-width: 100%; overflow-x: auto; }

.empty-state {
    padding: 54px 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    color: #64748b;
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(226,232,240,.8);
    background: rgba(255,255,255,.7);
}
.footer-inner {
    max-width: var(--bb-max);
    margin: 0 auto;
    padding: 28px 22px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #94a3b8;
    font-size: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: #64748b; font-weight: 650; }
.footer-links a:hover { color: #2563eb; }

/* 기존 독립 페이지 공통 현대화 */
.login-box,
.register-box,
.buy-box,
.mypage-box,
.payments-box,
.wrap .card {
    border: 1px solid var(--bb-line) !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.95) !important;
    box-shadow: var(--bb-shadow) !important;
}

.login-box,
.register-box,
.buy-box,
.mypage-box {
    width: min(100% - 28px, 460px) !important;
    max-width: 460px !important;
    margin: 56px auto !important;
    padding: 34px !important;
}

.payments-box,
.wrap {
    width: min(100% - 28px, 900px) !important;
    max-width: 900px !important;
    margin: 48px auto !important;
}

.login-title,
.register-title,
.buy-title,
.mypage-title,
.payments-title,
.wrap .title {
    color: #0f172a !important;
    font-size: 24px !important;
    font-weight: 850 !important;
    letter-spacing: -.035em !important;
}

.login-label,
.register-label,
.buy-label,
.mypage-label,
.wrap .label {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 750 !important;
}

.login-input,
.register-input,
.buy-input,
.mypage-input {
    min-height: 46px;
    border: 1px solid #dbe2ea !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.03) inset;
}

.login-input:focus,
.register-input:focus,
.buy-input:focus,
.mypage-input:focus {
    outline: none !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.09) !important;
}

.login-btn,
.register-btn,
.buy-btn,
.mypage-btn {
    width: 100% !important;
    min-height: 48px;
    margin-top: 20px !important;
}

.captcha-img,
.captcha-box img {
    border-radius: 10px !important;
}

.terms-box,
.buy-proofbox,
.buy-addrbox,
.mypage-danger {
    border-radius: 14px !important;
}

.payments-table {
    overflow: hidden;
    border-radius: 15px !important;
    border: 1px solid var(--bb-line);
}
.payments-table th { background: #f8fafc !important; color: #475569 !important; }
.payments-table td { color: #334155 !important; }

.legal-shell {
    width: min(100% - 28px, 880px);
    margin: 50px auto 72px;
}
.legal-card {
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--bb-line);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--bb-shadow);
}
.legal-card h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.045em;
}
.legal-card .updated { margin-bottom: 28px; color: #94a3b8; font-size: 13px; }
.legal-card h2 { margin: 28px 0 9px; font-size: 17px; color: #0f172a; }
.legal-card p,
.legal-card li { color: #475569; font-size: 14px; line-height: 1.85; }
.legal-card ul { padding-left: 21px; }

@media (max-width: 900px) {
    .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-detail-flex { grid-template-columns: 1fr; }
    .product-image { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--bb-line-soft); }
    .product-info { padding: 38px; }
}

@media (max-width: 680px) {
    .site-header,
    .header {
        min-height: 64px;
        padding: 9px 14px !important;
        gap: 12px;
        overflow: hidden;
    }
    .brand,
    .logo {
        flex: 0 0 auto;
        font-size: 16px !important;
    }
    .brand-icon { width: 30px; height: 30px; flex-basis: 30px; }
    .header-right,
    .site-actions {
        flex: 1 1 auto;
        justify-content: flex-start;
        gap: 1px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
    .header-right::-webkit-scrollbar,
    .site-actions::-webkit-scrollbar { display: none; }
    .header-right a,
    .site-actions a { padding: 7px 8px !important; font-size: 12px !important; }
    .program-nav-wrap { top: 64px; }
    .program-nav { padding: 10px 14px; }
    .program-nav-label { display: none; }
    .hero { padding: 40px 14px 24px; }
    .hero-panel { padding: 30px 22px; border-radius: 24px; }
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 15px; line-height: 1.75; }
    .hero-points { margin-top: 22px; }
    .hero-point { font-size: 12px; padding: 8px 10px; }
    .content-main { padding: 30px 14px 56px; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .program-grid { grid-template-columns: 1fr; }
    .program-card-image { min-height: 160px; }
    .product-image { min-height: 240px; padding: 28px; }
    .product-image img { height: 180px; }
    .product-info { padding: 28px 22px; }
    .product-title { font-size: 30px; }
    .product-buttons { width: 100%; }
    .btn-main,
    .btn-download { flex: 1; min-width: 0; }
    .product-desc { padding: 28px 22px 34px; }
    .footer-inner { align-items: flex-start; flex-direction: column; padding: 24px 14px 30px; }
    .login-box,
    .register-box,
    .buy-box,
    .mypage-box { padding: 24px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
