/* =========================================================
   Studium Chinese — modern skin (v1.1)
   โหลดต่อจาก theme.min.css เพื่อปรับหน้าตาทั้งเว็บ
   โทนสี: ครีม/ทอง (แบรนด์เดิม) + กรมท่าเข้ม
   ========================================================= */

:root {
    --sm-bg: #FBF8F1;
    --sm-surface: #FFFFFF;
    --sm-ink: #14133A;
    --sm-ink-2: #3A3958;
    --sm-muted: #6E6C80;
    --sm-line: #EEE6D3;
    --sm-navy: #090761;
    --sm-navy-2: #1D1B7A;
    --sm-cream: #F9E9AC;
    --sm-cream-2: #FBF1DA;
    --sm-cream-3: #FFF8E6;
    --sm-gold: #F4D690;
    --sm-gold-600: #EFC35D;
    --sm-gold-700: #EAB02A;
    --sm-gold-800: #C89214;
    --sm-radius-sm: 12px;
    --sm-radius: 20px;
    --sm-radius-lg: 32px;
    --sm-shadow-sm: 0 1px 2px rgba(20, 19, 58, .04), 0 2px 8px rgba(20, 19, 58, .04);
    --sm-shadow: 0 2px 4px rgba(20, 19, 58, .03), 0 12px 32px -8px rgba(20, 19, 58, .10);
    --sm-shadow-lg: 0 30px 60px -20px rgba(20, 19, 58, .25);
    --sm-font-head: "Plus Jakarta Sans", "Anuphan", "Sarabun", system-ui, sans-serif;
    --sm-font-body: "Anuphan", "Sarabun", system-ui, sans-serif;
}

/* ---------- Base ---------- */
body {
    background: var(--sm-bg) !important;
    color: var(--sm-ink-2);
    font-family: var(--sm-font-body);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--sm-font-head);
    color: var(--sm-ink);
    letter-spacing: -0.01em;
}
a { transition: color .15s ease; }

.sm-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sm-section { padding: 88px 0; }
.sm-section--tight { padding: 56px 0; }

.sm-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--sm-font-head);
    font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--sm-gold-800);
    margin-bottom: 12px;
}
.sm-eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--sm-gold-700); }
.sm-title {
    font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; line-height: 1.15;
    margin: 0 0 12px; color: var(--sm-ink); text-transform: none;
}
.sm-lead { font-size: 18px; color: var(--sm-muted); margin: 0; max-width: 620px; }
.sm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sm-head--center { flex-direction: column; align-items: center; text-align: center; }
.sm-head--center .sm-lead { margin: 0 auto; }

/* ---------- Buttons ---------- */
.sm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 26px; border-radius: 999px;
    font-family: var(--sm-font-head); font-weight: 700; font-size: 16px;
    border: 1px solid transparent; text-decoration: none !important; cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.sm-btn:hover { transform: translateY(-2px); }
.sm-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.sm-btn--dark { background: var(--sm-navy); color: #fff !important; box-shadow: 0 10px 24px -8px rgba(9, 7, 97, .55); }
.sm-btn--dark:hover { background: var(--sm-navy-2); }
.sm-btn--gold { background: var(--sm-gold-700); color: var(--sm-ink) !important; box-shadow: 0 10px 24px -10px rgba(200, 146, 20, .7); }
.sm-btn--gold:hover { background: var(--sm-gold-600); }
.sm-btn--ghost { background: rgba(255, 255, 255, .7); color: var(--sm-ink) !important; border-color: rgba(20, 19, 58, .12); backdrop-filter: blur(6px); }
.sm-btn--ghost:hover { background: #fff; }
.sm-btn--sm { height: 42px; padding: 0 18px; font-size: 14px; }
.sm-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sm-font-head); font-weight: 700; color: var(--sm-navy) !important; }
.sm-link svg { width: 14px; height: 14px; transition: transform .15s ease; }
.sm-link:hover svg { transform: translateX(3px); }

/* ---------- Navbar (floating pill) ---------- */
.sm-nav-wrap { position: sticky; top: 0; z-index: 1030; padding: 14px 16px 0; pointer-events: none; }
.sm-nav-wrap .sm-nav { pointer-events: auto; }
.sm-nav {
    max-width: 1180px; margin: 0 auto;
    background: rgba(255, 255, 255, .86) !important;
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid rgba(20, 19, 58, .07);
    border-radius: 999px;
    box-shadow: var(--sm-shadow-sm);
    padding: 8px 10px 8px 22px !important;
    min-height: 64px;
}
.sm-nav .navbar-brand-img { max-height: 36px; }
.sm-nav .navbar-nav .nav-link {
    font-family: var(--sm-font-head); font-weight: 600; font-size: 15px;
    color: var(--sm-ink-2) !important; border-radius: 999px;
    padding: 8px 16px !important; margin: 0 2px;
}
.sm-nav .navbar-nav .nav-link:hover { color: var(--sm-ink) !important; background: var(--sm-cream-3); }
.sm-nav .navbar-nav .nav-link.is-active { color: var(--sm-ink) !important; background: var(--sm-cream-2); }
.sm-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sm-icon-btn {
    width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--sm-ink-2) !important; background: transparent; border: 1px solid rgba(20, 19, 58, .08);
    transition: background .15s ease;
}
.sm-icon-btn:hover { background: var(--sm-cream-3); }
.sm-icon-btn svg { width: 20px; height: 20px; }
.sm-nav .navbar-toggler.sm-toggler {
    width: 44px; height: 44px; border-radius: 999px !important; background: var(--sm-ink) !important; color: #fff !important;
    display: inline-flex; align-items: center; justify-content: center; margin-left: 4px;
}
@media (min-width: 1200px) {
    .sm-nav .navbar-collapse { justify-content: center; }
    .sm-nav .navbar-collapse .navbar-nav { margin: 0 auto !important; }
}
@media (max-width: 1199.98px) {
    /* backdrop-filter สร้าง containing block ทำให้เมนูมือถือ (position: fixed) ถูกบีบอยู่ในแถบ → ปิดบนจอเล็ก */
    .sm-nav { border-radius: 24px; padding-left: 16px !important; background: #fff !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .sm-nav .sm-nav-cta { display: none !important; }
}

/* ---------- Hero ---------- */
.sm-hero-wrap { padding: 20px 16px 0; }
.sm-hero {
    position: relative; overflow: hidden;
    max-width: 1220px; margin: 0 auto;
    border-radius: 40px;
    background:
        radial-gradient(600px 380px at 12% 0%, rgba(255, 255, 255, .85), transparent 70%),
        radial-gradient(700px 420px at 100% 10%, rgba(239, 195, 93, .55), transparent 65%),
        linear-gradient(160deg, #FFF6D6 0%, var(--sm-cream) 55%, var(--sm-gold) 100%);
    padding: 72px 24px 0;
    text-align: center;
    isolation: isolate;
}
.sm-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
    background-image: radial-gradient(rgba(20, 19, 58, .18) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%);
            mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%);
}
.sm-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    background: rgba(255, 255, 255, .7); border: 1px solid rgba(20, 19, 58, .08);
    font-family: var(--sm-font-head); font-weight: 700; font-size: 14px; color: var(--sm-ink);
    backdrop-filter: blur(6px);
}
.sm-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sm-gold-700); box-shadow: 0 0 0 4px rgba(234, 176, 42, .25); }
.sm-hero h1 {
    font-size: clamp(40px, 6.4vw, 80px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em;
    margin: 22px auto 18px; color: var(--sm-ink); max-width: 900px;
}
.sm-hero h1 .accent { color: var(--sm-navy); position: relative; white-space: nowrap; }
.sm-hero h1 .accent::after {
    content: ""; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .22em; z-index: -1;
    background: rgba(234, 176, 42, .55); border-radius: 6px;
}
.sm-hero .sm-hero-lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--sm-ink-2); max-width: 720px; text-wrap: balance; margin: 0 auto 32px; }
.sm-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sm-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; }
.sm-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, .65); border: 1px solid rgba(20, 19, 58, .08);
    font-family: var(--sm-font-head); font-weight: 700; font-size: 14px; color: var(--sm-ink) !important;
    transition: background .15s ease, transform .15s ease;
}
.sm-chip:hover { background: #fff; transform: translateY(-1px); }
.sm-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; }
.sm-hero-logo { margin-top: 26px; }
.sm-hero-logo img { max-width: 150px; }

/* browser-frame mockup for slide images */
.sm-frame {
    position: relative; max-width: 980px; margin: 48px auto -2px;
    background: #fff; border-radius: 22px 22px 0 0;
    border: 1px solid rgba(20, 19, 58, .08); border-bottom: 0;
    box-shadow: var(--sm-shadow-lg); overflow: hidden;
}
.sm-frame-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #F1EEE6; background: #FCFBF8; }
.sm-frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #E7E2D6; display: block; }
.sm-frame-bar .url {
    margin-left: 12px; font-size: 12px; color: var(--sm-muted); background: #F4F1EA; padding: 4px 12px; border-radius: 999px;
    font-family: var(--sm-font-head);
}
.sm-frame .flickity-viewport { border-radius: 0; }
.sm-frame img { display: block; width: 100%; height: auto; }
.sm-frame .flickity-page-dots { bottom: 14px; }
.sm-frame .flickity-prev-next-button { width: 40px; height: 40px; background: rgba(255,255,255,.85); }
@media (max-width: 767.98px) {
    .sm-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 24px -24px 0; padding: 0 24px 4px; scrollbar-width: none; }
    .sm-chips::-webkit-scrollbar { display: none; }
    .sm-chip { flex-shrink: 0; }
    .sm-hero { border-radius: 28px; padding-top: 48px; }
    .sm-frame { border-radius: 18px 18px 0 0; margin-top: 36px; }
    .sm-hero-actions .sm-btn { width: 100%; max-width: 320px; }
}

/* ---------- Stats ---------- */
.sm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.sm-stat .num {
    font-family: var(--sm-font-head); font-weight: 800; font-size: clamp(36px, 4.4vw, 56px); line-height: 1;
    color: var(--sm-ink); letter-spacing: -0.02em;
}
.sm-stat .num em { font-style: normal; color: var(--sm-gold-700); }
.sm-stat p { margin: 10px 0 0; color: var(--sm-muted); font-weight: 500; }
.sm-stats-head { text-align: center; margin-bottom: 36px; }
.sm-stats-head h2 { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sm-gold-800); margin: 0 0 6px; }
.sm-stats-head p { margin: 0; color: var(--sm-muted); }
@media (max-width: 767.98px) { .sm-stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; } }

/* ---------- Feature cards (Why pick us) ---------- */
.sm-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sm-feature {
    background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
    padding: 28px; transition: transform .2s ease, box-shadow .2s ease; height: 100%;
}
.sm-feature:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow); }
.sm-feature-icon {
    width: 84px; height: 84px; border-radius: 22px; margin-bottom: 20px;
    background: linear-gradient(145deg, var(--sm-cream-3), var(--sm-cream));
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sm-feature-icon img { max-width: 64px; max-height: 64px; object-fit: contain; }
.sm-feature h3 { font-size: 20px; font-weight: 800; margin: 0 0 8px; text-transform: capitalize; }
.sm-feature p { margin: 0; color: var(--sm-muted); font-size: 15.5px; line-height: 1.65; }
@media (max-width: 991.98px) { .sm-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .sm-features { grid-template-columns: 1fr; } }

/* ---------- Course cards ---------- */
.sm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.sm-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1199.98px) { .sm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 991.98px) { .sm-grid, .sm-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .sm-grid, .sm-grid--3 { grid-template-columns: 1fr; } }

.sm-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
    overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.sm-card:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow); }
.sm-card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sm-cream-3); overflow: hidden; }
.sm-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sm-card:hover .sm-card-media img { transform: scale(1.04); }
.sm-price {
    position: absolute; left: 12px; bottom: 12px;
    display: inline-flex; align-items: baseline; gap: 6px;
    background: rgba(255, 255, 255, .95); border-radius: 999px; padding: 6px 12px;
    font-family: var(--sm-font-head); font-weight: 800; font-size: 15px; color: var(--sm-ink);
    box-shadow: var(--sm-shadow-sm);
}
.sm-price del { font-weight: 500; font-size: 12px; color: var(--sm-muted); }
.sm-card-body { padding: 18px 18px 6px; flex: 1; display: flex; flex-direction: column; }
.sm-tag {
    align-self: flex-start; display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: var(--sm-cream-2); color: var(--sm-gold-800) !important;
    font-family: var(--sm-font-head); font-weight: 700; font-size: 12px; margin-bottom: 10px;
}
.sm-card-title { font-size: 18px; font-weight: 800; line-height: 1.35; margin: 0 0 10px; color: var(--sm-ink); }
.sm-card-title a { color: inherit !important; }
.sm-card-title a:hover { color: var(--sm-navy) !important; }
.sm-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 4px; color: var(--sm-muted); font-size: 14px; }
.sm-meta span { display: inline-flex; align-items: center; gap: 6px; }
.sm-meta svg { width: 15px; height: 15px; color: var(--sm-gold-800); }
.sm-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 14px 18px 0; padding: 14px 0 16px; border-top: 1px solid #F3EEE2;
}
.sm-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--sm-line); background: var(--sm-cream-3); }
.sm-card-foot .sm-link { font-size: 14px; }

/* ---------- Events ---------- */
.sm-events { display: grid; gap: 16px; }
.sm-event {
    display: grid; grid-template-columns: 160px 1fr 112px; align-items: stretch;
    background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
    overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.sm-event:hover { transform: translateY(-3px); box-shadow: var(--sm-shadow); }
.sm-event-img { display: block; background: var(--sm-cream-3); }
.sm-event-img img { width: 100%; height: 100%; object-fit: cover; min-height: 120px; }
.sm-event-body { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.sm-event-body h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; line-height: 1.4; }
.sm-event-body h3 a { color: var(--sm-ink) !important; }
.sm-event-body p { margin: 0; color: var(--sm-muted); font-size: 14.5px; }
.sm-event-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--sm-cream), var(--sm-gold)); color: var(--sm-ink) !important;
    font-family: var(--sm-font-head);
}
.sm-event-date b { font-size: 34px; font-weight: 800; line-height: 1; }
.sm-event-date span { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
@media (max-width: 767.98px) {
    .sm-event { grid-template-columns: 1fr; }
    .sm-event-img img { aspect-ratio: 16 / 9; }
    .sm-event-date { flex-direction: row; gap: 8px; padding: 10px; }
    .sm-event-date b { font-size: 22px; }
}

/* ---------- Reviews ---------- */
.sm-reviews {
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(255, 255, 255, .6), transparent 70%),
        linear-gradient(180deg, var(--sm-cream-2), var(--sm-cream));
    border-radius: var(--sm-radius-lg);
    max-width: 1220px; margin: 0 auto; padding: 80px 0 64px; overflow: hidden;
}
.sm-reviews .flickity-slider > div { padding: 0 10px; }
.sm-review {
    background: #fff; border-radius: var(--sm-radius); padding: 26px; box-shadow: var(--sm-shadow-sm);
    border: 1px solid rgba(20, 19, 58, .05); height: 100%; margin-bottom: 8px;
}
.sm-review-quote { width: 34px; height: 34px; color: var(--sm-gold-700); margin-bottom: 12px; }
.sm-review p { color: var(--sm-ink-2); font-size: 15.5px; line-height: 1.75; margin: 0 0 20px; }
.sm-review-person { display: flex; align-items: center; gap: 12px; }
.sm-review-person img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.sm-review-person h4 { font-size: 16px; font-weight: 800; margin: 0; }
.sm-review-person span { font-size: 13.5px; color: var(--sm-muted); }
.sm-reviews .flickity-page-dots .dot { background: var(--sm-ink); }
.sm-reviews .flickity-prev-next-button { background: #fff; box-shadow: var(--sm-shadow-sm); }

/* ---------- CTA ---------- */
.sm-cta-wrap { padding: 0 16px; }
.sm-cta {
    position: relative; overflow: hidden; isolation: isolate;
    max-width: 1220px; margin: 0 auto; border-radius: 40px; text-align: center;
    padding: 88px 24px;
    background:
        radial-gradient(520px 320px at 85% 0%, rgba(234, 176, 42, .45), transparent 70%),
        radial-gradient(520px 320px at 0% 100%, rgba(244, 214, 144, .25), transparent 70%),
        linear-gradient(150deg, #0B0A3F 0%, var(--sm-navy) 55%, #17157A 100%);
}
.sm-cta h2 { color: #fff; font-size: clamp(34px, 5vw, 64px); font-weight: 800; margin: 0 0 12px; letter-spacing: -0.02em; }
.sm-cta p { color: rgba(255, 255, 255, .8); font-size: 18px; margin: 0 0 32px; }

/* ---------- Footer ---------- */
.sm-footer { background: #fff !important; border-top: 1px solid var(--sm-line); margin-top: 88px; padding-top: 64px !important; }
.sm-footer h5, .sm-footer h5 button { font-family: var(--sm-font-head); font-weight: 800 !important; color: var(--sm-ink) !important; }
.sm-footer .footer-brand { height: 52px !important; width: auto; }
.sm-footer-tag { color: var(--sm-muted); font-size: 15px; max-width: 300px; margin: 0 0 20px; }
.sm-footer .list-social-item a { border: 1px solid var(--sm-line); color: var(--sm-ink-2) !important; background: #fff; }
.sm-footer .list-social-item a:hover { background: var(--sm-cream-2); }
.sm-footer ul a.text-reset:hover { color: var(--sm-navy) !important; }
.sm-footer .media img { border-radius: 12px !important; }

/* ---------- Inner page header (page-title component) ---------- */
.sm-page-head { padding: 28px 16px 0; margin-bottom: 28px; }
.sm-page-head-inner {
    max-width: 1220px; margin: 0 auto; border-radius: var(--sm-radius-lg); text-align: center;
    padding: 56px 24px;
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(239, 195, 93, .45), transparent 65%),
        linear-gradient(160deg, #FFF6D6 0%, var(--sm-cream) 70%);
}
.sm-page-head h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; margin: 0 0 10px; }
.sm-page-head .breadcrumb { margin: 0; }
.sm-page-head .breadcrumb-item, .sm-page-head .breadcrumb-item a { color: var(--sm-ink-2) !important; font-weight: 500; }

/* ---------- Generic theme overrides (inner pages) ---------- */
.card { border-radius: var(--sm-radius) !important; border-color: var(--sm-line) !important; }
.card.shadow { box-shadow: var(--sm-shadow-sm) !important; }
.card-img, .card-img-top, .card-zoom { border-top-left-radius: var(--sm-radius) !important; border-top-right-radius: var(--sm-radius) !important; }
.btn { border-radius: 999px; }
.btn-primary { background-color: var(--sm-navy); border-color: var(--sm-navy); }
.form-control, .form-select { border-radius: var(--sm-radius-sm); }

/* reveal helper (AOS fallback when JS disabled) */
.no-js [data-aos] { opacity: 1 !important; transform: none !important; }

/* =========================================================
   v1.2 — หน้าเรียน (learn) และแบบทดสอบ (quiz)
   ========================================================= */
.sm-learn { padding-top: 2.5rem; }
.sm-learn-head { display: flex; gap: 1.5rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.5rem; }
.sm-learn-back { display: inline-block; color: var(--sm-muted); font-size: .9rem; margin-bottom: .5rem; }
.sm-learn-back:hover { color: var(--sm-navy); }
.sm-learn-title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 0; color: var(--sm-ink); }
.sm-learn-sub { color: var(--sm-muted); margin-top: .25rem; }

.sm-progress-card { background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: 1rem 1.25rem; min-width: 260px; box-shadow: var(--sm-shadow-sm); }
.sm-progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; color: var(--sm-muted); }
.sm-progress-top strong { font-family: var(--sm-font-head); font-size: 1.5rem; color: var(--sm-navy); }
.sm-progress-meta { font-size: .85rem; color: var(--sm-muted); margin-top: .4rem; }
.sm-bar { height: 10px; border-radius: 99px; background: var(--sm-cream-2); overflow: hidden; margin-top: .4rem; }
.sm-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sm-gold-700), var(--sm-gold-800)); transition: width .4s ease; }
.sm-bar--thin { height: 6px; margin: 0; flex: 1; }

.sm-player { background: #000; border-radius: var(--sm-radius); overflow: hidden; box-shadow: var(--sm-shadow); }
.sm-player iframe, .sm-player video, .sm-player .ratio > div { width: 100%; height: 100%; border: 0; background: #000; }
.sm-watch { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--sm-surface); border-top: 1px solid var(--sm-line); }
.sm-watch-label { font-size: .85rem; color: var(--sm-muted); white-space: nowrap; }

.sm-article { margin-top: 1.5rem; }
.sm-article--main { margin-top: 0; background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--sm-shadow-sm); }
.sm-article-title { font-size: 1.35rem; margin-bottom: 1rem; }
.sm-article-body { font-size: 1.05rem; line-height: 1.85; color: var(--sm-ink-2); overflow-wrap: anywhere; }
.sm-article-body img { max-width: 100%; height: auto; border-radius: var(--sm-radius-sm); }
.sm-chip-type { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: .3rem .75rem; border-radius: 99px; background: var(--sm-cream); color: var(--sm-navy); margin-bottom: .75rem; }

.sm-complete-row { margin-top: 1.25rem; }
.sm-done-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-radius: 99px; background: #E7F6EC; color: #1E7A3F; font-weight: 600; }

.sm-quiz-cta { margin-top: 1.5rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1.25rem 1.5rem; border-radius: var(--sm-radius); background: linear-gradient(135deg, var(--sm-navy), var(--sm-navy-2)); color: #fff; }
.sm-quiz-cta-kicker { font-size: .85rem; opacity: .75; }
.sm-quiz-cta-title { font-family: var(--sm-font-head); font-size: 1.2rem; font-weight: 700; }
.sm-quiz-cta-meta { font-size: .85rem; opacity: .85; }
.sm-quiz-cta .text-success { color: #8BE3A8 !important; }

.sm-learn-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }
.sm-learn-nav .sm-btn { max-width: 100%; white-space: normal; text-align: left; }

/* สารบัญ */
.sm-curriculum { position: sticky; top: 6.5rem; background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: .5rem; box-shadow: var(--sm-shadow-sm); max-height: calc(100vh - 8rem); overflow: auto; }
.sm-cur-lesson + .sm-cur-lesson { border-top: 1px solid var(--sm-line); }
.sm-cur-lesson summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .85rem .75rem; cursor: pointer; border-radius: var(--sm-radius-sm); }
.sm-cur-lesson summary::-webkit-details-marker { display: none; }
.sm-cur-lesson summary:hover { background: var(--sm-cream-3); }
.sm-cur-ring { --p: 0; flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--sm-navy);
    background: radial-gradient(closest-side, #fff 76%, transparent 78% 100%), conic-gradient(var(--sm-gold-700) calc(var(--p) * 1%), var(--sm-cream-2) 0); }
.sm-cur-name { font-weight: 600; color: var(--sm-ink); line-height: 1.3; }
.sm-cur-name small { display: block; font-weight: 400; color: var(--sm-muted); font-size: .8rem; margin-top: .15rem; }
.sm-cur-lesson ul { list-style: none; margin: 0 0 .5rem; padding: 0 0 0 .5rem; }
.sm-cur-topic { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 0; background: none; border-radius: var(--sm-radius-sm); text-align: left; color: var(--sm-ink-2); font-size: .95rem; }
.sm-cur-topic:hover { background: var(--sm-cream-3); color: var(--sm-ink); }
.sm-cur-topic.is-current { background: var(--sm-cream); color: var(--sm-navy); font-weight: 600; }
.sm-cur-topic.is-locked { opacity: .6; }
.sm-cur-check { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: var(--sm-cream-2); color: var(--sm-navy); }
.sm-cur-topic.is-done .sm-cur-check { background: #2E9B57; color: #fff; font-size: .8rem; }
.sm-cur-topic-name { flex: 1; min-width: 0; }
.sm-cur-dur { font-size: .78rem; color: var(--sm-muted); white-space: nowrap; }
.sm-cur-quiz { text-decoration: none; border: 1px dashed var(--sm-gold-600); margin-top: .25rem; }
.sm-tag-free { font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 6px; background: #E7F6EC; color: #1E7A3F; }
.sm-final { display: flex; gap: .85rem; align-items: center; margin: .5rem; padding: 1rem; border-radius: var(--sm-radius-sm); background: var(--sm-navy); color: #fff; text-decoration: none; }
.sm-final:hover { color: #fff; background: var(--sm-navy-2); }
.sm-final small { display: block; opacity: .8; font-size: .8rem; }
.sm-final.is-locked { background: #ECEAF3; color: var(--sm-muted); }
.sm-final.is-locked:hover { color: var(--sm-ink); }
.sm-final.is-done { background: linear-gradient(135deg, var(--sm-gold-700), var(--sm-gold-800)); }
.sm-final-icon { font-size: 1.5rem; }

/* แบบทดสอบ */
.sm-quiz .container-sm { max-width: 820px; }
.sm-quiz-card { background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--sm-shadow-sm); margin-bottom: 1rem; }
.sm-quiz-intro { margin-top: 1rem; }
.sm-quiz-head { margin: 1rem 0 1.25rem; }
.sm-quiz-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.5rem; }
.sm-quiz-facts > div { background: var(--sm-cream-3); border-radius: var(--sm-radius-sm); padding: 1rem; }
.sm-quiz-facts b { display: block; font-family: var(--sm-font-head); font-size: 1.5rem; color: var(--sm-navy); }
.sm-quiz-facts span { font-size: .85rem; color: var(--sm-muted); }
.sm-locked { margin-top: 1.5rem; padding: 1.25rem; border-radius: var(--sm-radius-sm); background: #F3F1F8; }
.sm-locked ul { padding-left: 1.2rem; }
.sm-history { margin-top: 2rem; border-top: 1px solid var(--sm-line); padding-top: 1rem; }
.sm-history-title { font-weight: 600; margin-bottom: .5rem; color: var(--sm-ink); }
.sm-history-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; font-size: .92rem; border-bottom: 1px dashed var(--sm-line); }
.sm-result-pill { font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 99px; background: #FDECEC; color: #B23B3B; }
.sm-result-pill.is-pass { background: #E7F6EC; color: #1E7A3F; }

.sm-q { border: 1px solid var(--sm-line); }
.sm-q legend, .sm-q-no { float: none; width: auto; font-size: .82rem; font-weight: 700; color: var(--sm-gold-800); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .04em; }
.sm-q-text { font-size: 1.15rem; color: var(--sm-ink); font-weight: 500; }
.sm-q-pinyin { color: var(--sm-muted); margin-top: .15rem; }
.sm-q-img { max-width: 100%; border-radius: var(--sm-radius-sm); margin-top: .75rem; }
.sm-q-audio { width: 100%; margin-top: .75rem; }
.sm-options { display: grid; gap: .6rem; margin-top: 1rem; }
.sm-option { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1.5px solid var(--sm-line); border-radius: var(--sm-radius-sm); cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.sm-option:hover { border-color: var(--sm-gold-600); background: var(--sm-cream-3); }
.sm-option input { position: absolute; opacity: 0; pointer-events: none; }
.sm-option-key { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--sm-cream-2); color: var(--sm-navy); }
.sm-option-text { flex: 1; }
.sm-option-text small { display: block; color: var(--sm-muted); }
.sm-option:has(input:checked) { border-color: var(--sm-navy); background: #F1F0FA; }
.sm-option:has(input:checked) .sm-option-key { background: var(--sm-navy); color: #fff; }
.sm-option:has(input:focus-visible) { outline: 3px solid var(--sm-gold-600); outline-offset: 2px; }
.sm-option.is-static { cursor: default; }
.sm-option.is-static:hover { border-color: var(--sm-line); background: none; }
.sm-option.is-correct { border-color: #2E9B57 !important; background: #E7F6EC !important; }
.sm-option.is-correct .sm-option-key { background: #2E9B57; color: #fff; }
.sm-option.is-picked:not(.is-correct) { border-color: #D35454 !important; background: #FDECEC !important; }
.sm-option.is-picked:not(.is-correct) .sm-option-key { background: #D35454; color: #fff; }
.sm-option-tag { font-size: .75rem; color: var(--sm-muted); white-space: nowrap; }
.sm-q.is-right { border-left: 4px solid #2E9B57; }
.sm-q.is-wrong { border-left: 4px solid #D35454; }
.sm-explain { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--sm-radius-sm); background: var(--sm-cream-3); font-size: .95rem; }
.sm-quiz-submit { position: sticky; bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.25rem; border-radius: 99px; background: var(--sm-surface); border: 1px solid var(--sm-line); box-shadow: var(--sm-shadow); margin: 1.5rem 0 3rem; }
.sm-result { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; margin-top: 1rem; border-top: 6px solid #D35454; }
.sm-result.is-pass { border-top-color: #2E9B57; }
.sm-result-score { text-align: center; }
.sm-result-big { display: block; font-family: var(--sm-font-head); font-size: 3rem; font-weight: 800; color: var(--sm-navy); line-height: 1; }
.sm-result-score > span:last-child { font-size: .85rem; color: var(--sm-muted); }
.sm-result-text h2 { font-size: 1.35rem; margin: 0 0 .25rem; }
.sm-result-actions { grid-column: 1 / -1; display: flex; gap: .75rem; flex-wrap: wrap; }
.sm-review-title { margin: 2rem 0 1rem; font-size: 1.25rem; }

@media (max-width: 991.98px) {
    .sm-curriculum { position: static; max-height: none; }
}
@media (max-width: 575.98px) {
    .sm-learn { padding-top: 1.5rem; }
    .sm-progress-card { min-width: 0; width: 100%; }
    .sm-quiz-facts { grid-template-columns: 1fr; }
    .sm-result { grid-template-columns: 1fr; text-align: center; }
    .sm-result-actions { justify-content: center; }
    .sm-quiz-submit { border-radius: var(--sm-radius); }
}
.sm-profile-progress { position: relative; z-index: 2; max-width: 360px; margin-bottom: 1rem; }
.sm-profile-progress .sm-progress-top strong { font-size: 1.1rem; }
.sm-article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .98rem; }
.sm-article-body th, .sm-article-body td { padding: .55rem .75rem; border-bottom: 1px solid var(--sm-line); text-align: left; vertical-align: top; }
.sm-article-body th { background: var(--sm-cream-3); color: var(--sm-ink); font-weight: 600; }

/* =========================================================
   v1.3 — Why pick us (การ์ดภาพประกอบใหญ่)
   ========================================================= */
.sm-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sm-why-card {
    --tone: #FFF4D6; --tone-2: #FBE3A0; --ink-tone: #8A6100;
    position: relative; display: flex; flex-direction: column; background: var(--sm-surface);
    border: 1px solid var(--sm-line); border-radius: 28px; overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.sm-why-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(20, 19, 58, .28); border-color: transparent; }
.sm-why-card--mint  { --tone: #E3F6EC; --tone-2: #BFE8D2; --ink-tone: #1F7A4A; }
.sm-why-card--lilac { --tone: #ECEBFB; --tone-2: #CFCBF5; --ink-tone: #3B33A6; }
.sm-why-card--sky   { --tone: #E2F0FB; --tone-2: #BBDCF5; --ink-tone: #1E5F93; }
.sm-why-card--peach { --tone: #FDEBDD; --tone-2: #F8CDAE; --ink-tone: #A24C14; }
.sm-why-card--rose  { --tone: #FCE7EA; --tone-2: #F5C3CB; --ink-tone: #A12A3E; }
.sm-why-stage {
    position: relative; height: 230px; display: flex; align-items: flex-end; justify-content: center;
    background:
        radial-gradient(circle at 50% 115%, var(--tone-2) 0 38%, transparent 39%),
        radial-gradient(circle at 85% 12%, rgba(255,255,255,.75) 0 14%, transparent 15%),
        linear-gradient(160deg, var(--tone), #fff 140%);
    overflow: hidden;
}
.sm-why-stage img {
    width: 190px; height: 190px; object-fit: contain; margin-bottom: 10px;
    filter: drop-shadow(0 14px 18px rgba(20, 19, 58, .14));
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.sm-why-card:hover .sm-why-stage img { transform: translateY(-6px) scale(1.06) rotate(-2deg); }
.sm-why-no {
    position: absolute; left: 22px; top: 18px; font-family: var(--sm-font-head); font-weight: 800;
    font-size: 15px; letter-spacing: .08em; color: var(--ink-tone); opacity: .75;
}
.sm-why-badge {
    position: absolute; right: 18px; top: 16px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,.85); backdrop-filter: blur(6px); color: var(--ink-tone);
    font-size: 13px; font-weight: 700; box-shadow: 0 2px 8px rgba(20,19,58,.06);
}
.sm-why-body { padding: 24px 26px 28px; }
.sm-why-body h3 { font-size: 21px; font-weight: 800; margin: 0 0 8px; text-transform: capitalize; color: var(--sm-ink); }
.sm-why-body p { margin: 0; color: var(--sm-muted); font-size: 15.5px; line-height: 1.65; }
@media (max-width: 991.98px) { .sm-why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) {
    .sm-why { grid-template-columns: 1fr; gap: 16px; }
    .sm-why-card { flex-direction: row; align-items: stretch; border-radius: 22px; }
    .sm-why-stage { flex: 0 0 120px; height: auto; min-height: 140px; align-items: center; }
    .sm-why-stage img { width: 96px; height: 96px; margin: 0; }
    .sm-why-no, .sm-why-badge { display: none; }
    .sm-why-body { padding: 16px 18px; }
    .sm-why-body h3 { font-size: 17px; }
    .sm-why-body p { font-size: 14px; }
}

/* =========================================================
   v1.3 — บทความความรู้ (การ์ดหน้าแรก, หน้าบทความ, Quiz ท้ายบท)
   ========================================================= */
.sm-articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sm-acard { display: flex; flex-direction: column; background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: 24px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.sm-acard:hover { transform: translateY(-4px); box-shadow: var(--sm-shadow); }
.sm-acard-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sm-cream-2); }
.sm-acard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sm-acard:hover .sm-acard-media img { transform: scale(1.04); }
.sm-acard-cover { position: absolute; inset: 0; display: grid; place-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.5) 0 18%, transparent 19%), linear-gradient(135deg, var(--sm-navy), #2B2896 60%, var(--sm-gold-800)); }
.sm-acard-cover span { font-family: var(--sm-font-head); font-weight: 800; font-size: 30px; color: #fff; letter-spacing: .02em; text-align: center; padding: 0 16px; }
.sm-acard-quiz { position: absolute; left: 14px; top: 14px; padding: 5px 11px; border-radius: 999px; background: var(--sm-gold-700); color: var(--sm-navy); font-size: 12.5px; font-weight: 800; }
.sm-acard-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.sm-acard-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--sm-muted); }
.sm-acard-body h3 { font-size: 19px; font-weight: 800; margin: 0; line-height: 1.4; }
.sm-acard-body h3 a { color: var(--sm-ink); }
.sm-acard-body p { margin: 0; color: var(--sm-muted); font-size: 15px; }
.sm-acard-more { margin-top: auto; padding-top: 6px; }
@media (max-width: 991.98px) { .sm-articles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .sm-articles { grid-template-columns: 1fr; } }

.sm-post { max-width: 780px; margin: 0 auto; padding: 2.5rem 16px 4rem; }
.sm-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--sm-muted); font-size: 14px; margin: .5rem 0 .75rem; }
.sm-post-meta .sm-chip-type { margin: 0; }
.sm-post-hasquiz { padding: .25rem .7rem; border-radius: 99px; background: #F1F0FA; color: var(--sm-navy); font-weight: 600; font-size: 13px; }
.sm-post-title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.25; color: var(--sm-ink); margin: 0 0 1.5rem; }
.sm-post-cover { margin: 0 0 2rem; border-radius: 24px; overflow: hidden; box-shadow: var(--sm-shadow-sm); }
.sm-post-cover img { width: 100%; height: auto; display: block; }
.sm-post-body { font-size: 1.08rem; }
.sm-post-body h2, .sm-post-body h3 { margin-top: 1.8rem; color: var(--sm-ink); }
.sm-post-body blockquote { margin: 1.25rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--sm-gold-700); background: var(--sm-cream-3); border-radius: 0 14px 14px 0; }

.sm-pquiz { margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 24px; background: var(--sm-surface); border: 2px solid var(--sm-cream); box-shadow: var(--sm-shadow); }
.sm-pquiz-head { display: flex; gap: 14px; align-items: flex-start; }
.sm-pquiz-icon { flex: 0 0 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sm-navy); color: var(--sm-gold-600); font-weight: 800; font-size: 22px; }
.sm-pquiz-kicker { font-size: 13px; font-weight: 700; color: var(--sm-gold-800); text-transform: uppercase; letter-spacing: .05em; }
.sm-pquiz-q { font-size: 1.2rem; margin: .2rem 0 0; color: var(--sm-ink); line-height: 1.5; }
.sm-pquiz-opt { width: 100%; text-align: left; background: #fff; font: inherit; color: inherit; }
.sm-pquiz-opt:disabled { cursor: default; opacity: 1; }
.sm-pquiz-opt:disabled:not(.is-correct):not(.is-picked) { opacity: .55; }
.sm-pquiz-result { margin-top: 1.25rem; padding: 1rem 1.25rem; border-radius: 16px; }
.sm-pquiz-result.is-right { background: #E7F6EC; }
.sm-pquiz-result.is-wrong { background: #FDF0EC; }
.sm-pquiz-verdict { font-weight: 700; color: var(--sm-ink); }
.sm-pquiz-explain { margin-top: .5rem; line-height: 1.75; }
