:root {
    --blue-900: #0b3d91;
    --blue-700: #1565c0;
    --blue-500: #2196f3;
    --blue-200: #bbdefb;
    --blue-100: #e3f2fd;
    --blue-50: #f4f9ff;
    --white: #ffffff;
    --ink: #14233b;
    --ink-soft: #5b6b85;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(11, 61, 145, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Noto Sans Thai", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 320px);
    background-repeat: no-repeat;
    color: var(--ink);
}

a { color: var(--blue-700); text-decoration: none; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 28px;
    background: var(--white);
    border-bottom: 1px solid var(--blue-100);
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
}

.topbar .right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 600px) {
    .topbar { padding: 12px 16px; }
    .brand { font-size: 17px; }
}

.brand {
    font-weight: 700;
    font-size: 20px;
    color: var(--blue-900);
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
}

.brand span { color: var(--blue-500); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--blue-700);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(21, 101, 192, 0.28);
}

.btn-line {
    background: #06C755;
    color: var(--white);
    box-shadow: 0 6px 16px rgba(6, 199, 85, 0.28);
}

.btn-outline {
    background: var(--white);
    color: var(--blue-700);
    border: 1.5px solid var(--blue-200);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--blue-100);
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.hero {
    text-align: center;
    padding: 72px 20px 48px;
}

.hero h1 {
    font-size: 34px;
    color: var(--blue-900);
    margin-bottom: 10px;
}

.hero p { color: var(--ink-soft); font-size: 16px; margin-bottom: 28px; }

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--blue-100);
    padding: 28px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; gap: 14px; }
}

.mb-16 { margin-bottom: 16px; }

.order-card {
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--blue-100);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-card-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
}

.order-card-title { font-weight: 700; font-size: 17px; color: var(--blue-900); }

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--blue-100);
    background: var(--blue-50);
    flex-wrap: wrap;
}

.order-row-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.order-row-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--white);
    border: 1px solid var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-row-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }

.order-row-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .order-row { flex-direction: column; align-items: stretch; }
    .order-row-action { justify-content: space-between; }
}

.book-cover {
    width: 84px;
    height: 110px;
    border-radius: 8px;
    background: var(--blue-100);
    object-fit: cover;
    flex-shrink: 0;
}

.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: var(--blue-700);
}

.pill-success { background: #e8f8ee; color: #1b873f; }
.pill-warn { background: #fff3e0; color: #e65100; }

.pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--blue-100);
    color: var(--blue-700);
}

.price { font-size: 26px; font-weight: 800; color: var(--blue-900); }
.price small { font-size: 14px; color: var(--ink-soft); font-weight: 500; }

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-900);
    margin: 28px 0 14px;
}

.bank-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    background: var(--blue-50);
    border-radius: var(--radius);
    border: 1px solid var(--blue-200);
    text-align: center;
}

.bank-box-name { font-size: 15px; font-weight: 700; color: var(--blue-900); }

.bank-box-account-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.bank-box-account-number {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--blue-900);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bank-copy-btn {
    border: none;
    background: var(--blue-700);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .12s ease, transform .1s ease;
}

.bank-copy-btn:active { transform: scale(0.95); }
.bank-copy-btn.bank-copy-btn-done { background: #1b873f; }

.bank-box-account-name { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 8px; }

.shipping-note {
    background: #fff8ec;
    border: 1px solid #ffcc80;
    border-radius: var(--radius);
    padding: 16px 18px;
    text-align: left;
}

.shipping-note strong { color: #b45309; display: block; margin-bottom: 4px; font-size: 14px; }
.shipping-note p { font-size: 13px; }

.redeem-code-box {
    margin: 20px auto;
    padding: 16px 22px;
    display: inline-block;
    background: var(--blue-50);
    border: 2px dashed var(--blue-500);
    border-radius: 12px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--blue-900);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

input[type=file] { margin-bottom: 14px; }

input[type=text], input[type=tel], input[type=number], input[type=date], textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid var(--blue-100);
    background: var(--blue-50);
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: border-color .12s ease, background .12s ease;
}

input[type=text]:focus, input[type=tel]:focus, input[type=number]:focus, input[type=date]:focus, textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    background: var(--white);
}

textarea { resize: vertical; }

label { font-size: 13.5px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 8px; }

/* Quantity stepper, Grab-style: big round +/- buttons either side of the count */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    margin-bottom: 16px;
    border: 1.5px solid var(--blue-100);
    border-radius: 999px;
    background: var(--blue-50);
    padding: 4px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--white);
    color: var(--blue-700);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(11, 61, 145, 0.15);
    transition: transform .1s ease, background .1s ease;
}

.qty-btn:active { transform: scale(0.92); background: var(--blue-100); }

.qty-stepper input[type=number] {
    width: 56px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 800;
    color: var(--blue-900);
    margin: 0;
    padding: 0;
    -moz-appearance: textfield;
}

.qty-stepper input[type=number]::-webkit-outer-spin-button,
.qty-stepper input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Custom file-upload tile replacing the native <input type=file> button */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 28px 16px;
    border: 2px dashed var(--blue-200);
    border-radius: var(--radius);
    background: var(--blue-50);
    text-align: center;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.upload-box:hover, .upload-box:active { border-color: var(--blue-500); background: var(--blue-100); }

.upload-box.upload-box-filled {
    border-style: solid;
    border-color: #1b873f;
    background: #e8f8ee;
}

.upload-box-icon { font-size: 30px; }
.upload-box-text { font-size: 15px; font-weight: 700; color: var(--blue-900); }
.upload-box-hint { font-size: 12.5px; color: var(--ink-soft); }

#slipPreview {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    margin-top: 12px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
}

.format-choice { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }

@media (max-width: 480px) {
    .format-choice { flex-direction: column; }
}

.format-option {
    flex: 1;
    position: relative;
    padding: 18px;
    border-radius: var(--radius);
    border: 2px solid var(--blue-100);
    cursor: pointer;
    text-align: center;
    transition: border-color .12s ease, background .12s ease;
}

.format-option.selected { border-color: var(--blue-700); background: var(--blue-50); }
.format-option h3 { margin: 8px 0 4px; color: var(--blue-900); }
.format-option p { margin: 0; font-size: 13px; color: var(--ink-soft); }

.format-option-recommended { border-color: var(--blue-300, var(--blue-200)); }

.format-option-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #e65100;
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.format-option-badge-preorder { background: var(--ink-soft); }

.muted { color: var(--ink-soft); font-size: 14px; }
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

/* ===== Reader ===== */

.reader-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0e1726;
}

.reader-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #14233b;
    color: #e8eefc;
    flex-shrink: 0;
    z-index: 30;
}

.reader-topbar .left, .reader-topbar .right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reader-topbar button {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #e8eefc;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-topbar button:hover { background: rgba(255,255,255,0.16); }

.reader-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
    max-width: 38vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reader-page-indicator { font-size: 13px; opacity: 0.75; min-width: 64px; text-align: center; }

.reader-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e1726;
    -webkit-touch-callout: none;
    user-select: none;
}

.reader-stage img {
    max-height: 100%;
    max-width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    pointer-events: none;
    -webkit-user-drag: none;
}

.reader-tap-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 33%;
    z-index: 5;
    cursor: pointer;
}

.reader-tap-zone.left { left: 0; }
.reader-tap-zone.right { right: 0; }

.reader-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.10);
    color: #e8eefc;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.reader-nav-arrow:hover { background: rgba(255,255,255,0.22); }
.reader-nav-arrow.left { left: 18px; }
.reader-nav-arrow.right { right: 18px; }

/* Tap zones are for touch; on devices with a mouse, show real arrow buttons instead. */
@media (hover: hover) and (pointer: fine) {
    .reader-tap-zone { display: none; }
    .reader-nav-arrow { display: flex; }
}

.reader-zoom-wrap {
    overflow: auto;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-zoom-wrap img {
    transition: width .15s ease;
}

.reader-zoom-controls {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(20, 35, 59, 0.85);
    border-radius: 999px;
    padding: 6px 10px;
    color: #e8eefc;
    font-size: 13px;
}

.reader-zoom-controls button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.10);
    color: #e8eefc;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-zoom-controls button:hover { background: rgba(255,255,255,0.22); }
#zoomLabel { min-width: 42px; text-align: center; }

.reader-loading {
    position: absolute;
    color: #9db3d6;
    font-size: 13px;
}

.reader-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.reader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
    transition: width .2s ease;
}

/* Panel (TOC / search) */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.55);
    z-index: 40;
    display: none;
}

.panel-overlay.open { display: block; }

.panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(380px, 88vw);
    background: var(--white);
    box-shadow: 4px 0 30px rgba(0,0,0,0.25);
    padding: 18px 18px 0;
    display: flex;
    flex-direction: column;
}

.panel h2 { font-size: 16px; color: var(--blue-900); margin: 4px 0 14px; }

.panel input[type=text] { margin-bottom: 10px; flex-shrink: 0; }

.toc-list {
    overflow-y: auto;
    flex: 1;
    margin: 0 -18px;
    padding: 0 18px 10px;
}

.toc-group + .toc-group { margin-top: 4px; }

.toc-part {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
    color: var(--white);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0 6px;
    cursor: pointer;
}

.toc-part .toc-part-title { font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.toc-part .toc-part-subtitle { font-size: 11.5px; opacity: .85; margin-top: 2px; }

.toc-chapter {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 10px 10px;
    margin: 2px 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-900);
    background: var(--blue-50);
    border-left: 3px solid var(--blue-500);
}

.toc-chapter:hover { background: var(--blue-100); }

.toc-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 9px 10px 9px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--ink);
}

.toc-item:hover { background: var(--blue-50); }
.toc-item .pg, .toc-chapter .pg, .toc-part .pg {
    color: var(--ink-soft);
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}
.toc-chapter .pg { color: var(--blue-700); }
.toc-part .pg { color: rgba(255,255,255,.85); }

.toc-item.active, .toc-chapter.active {
    background: var(--blue-200);
}

footer.site-footer {
    text-align: center;
    color: var(--ink-soft);
    font-size: 13px;
    padding: 30px 0;
}

/* ===== Sales landing page ===== */

.pill-accent {
    background: #fff3e0;
    color: #e65100;
}

.btn-lg { padding: 14px 28px; font-size: 16px; }

.sales-hero {
    background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
    padding: 48px 0 56px;
}

.sales-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 820px) {
    .sales-hero-grid { grid-template-columns: 1fr; }
    .sales-hero-cover { order: -1; max-width: 280px; margin: 0 auto; }
}

/* Shopee-style mobile tightening: smaller type, less breathing room between
   blocks, full-width tap targets — dense and easy to scan/tap with a thumb
   instead of the spacious desktop layout. */
@media (max-width: 600px) {
    .sales-hero { padding: 28px 0 36px; }
    .sales-hero-copy h1 { font-size: 24px; margin: 10px 0 4px; }
    .sales-sub { font-size: 14.5px; margin-bottom: 14px; }
    .rating-row { font-size: 13px; flex-wrap: wrap; margin-bottom: 14px; }
    .sales-points { font-size: 13.5px; gap: 8px; margin-bottom: 20px; }
    .sales-cta-row { gap: 8px; }
    .sales-cta-row .btn-lg { width: 100%; justify-content: center; font-size: 15px; padding: 14px 20px; }
    .sales-cta-note { font-size: 12px; }
    .trust-row { gap: 8px 14px; margin-top: 16px; font-size: 11.5px; }
    .section-title { font-size: 16px; margin: 22px 0 12px; }
    .format-card { padding: 18px; }
    .faq-card { padding: 20px !important; }
    .container { padding: 0 16px; }
}

.sales-hero-copy h1 {
    font-size: 32px;
    color: var(--blue-900);
    margin: 14px 0 6px;
    line-height: 1.25;
}

.sales-sub { color: var(--ink-soft); font-size: 16px; margin-bottom: 18px; }

.sales-points {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
}

.sales-cta-row { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sales-cta-note { font-size: 13px; color: var(--ink-soft); }

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
    font-size: 13px;
    color: var(--ink-soft);
}

.sales-hero-cover {
    position: relative;
    text-align: center;
}

.sales-hero-cover img {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(11, 61, 145, 0.22);
}

.cover-placeholder {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 5 / 7;
    margin: 0 auto;
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--blue-700), var(--blue-900));
    box-shadow: 0 16px 40px rgba(11, 61, 145, 0.22);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 800;
    font-size: 22px;
    padding: 24px;
}

.price-tag {
    position: absolute;
    bottom: -18px;
    right: 50%;
    transform: translateX(140px);
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 10px 18px;
    text-align: center;
}

@media (max-width: 820px) {
    .price-tag { transform: translateX(100px); }
}

@media (max-width: 380px) {
    .price-tag { right: auto; left: 50%; transform: translateX(-50%); bottom: -54px; }
}

.price-tag-old { font-size: 12px; color: var(--ink-soft); text-decoration: line-through; }
.price-tag-new { font-size: 22px; font-weight: 800; color: #e65100; }

.format-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
    text-align: center;
}

.format-card-recommended { border: 2px solid var(--blue-700); }

.format-card-icon { font-size: 36px; margin-bottom: 8px; }
.format-card h3 { margin: 4px 0; color: var(--blue-900); }

.toc-preview-grid { gap: 14px; }

.toc-preview-card {
    background: var(--blue-50);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 14px;
    color: var(--blue-900);
}

.faq-card details {
    border-top: 1px solid var(--blue-100);
    padding: 14px 0;
}

.faq-card details:first-of-type { border-top: none; }

.faq-card summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--blue-900);
    list-style: none;
}

.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::before { content: '▸  '; color: var(--blue-500); }
.faq-card details[open] summary::before { content: '▾  '; }

.sticky-cta {
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--blue-100);
    box-shadow: 0 -4px 20px rgba(11,61,145,0.08);
    padding: 12px 0;
    margin-top: 40px;
}

.sticky-cta-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sticky-chat-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #06C755;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sticky-price-block { flex: 1; min-width: 0; }
.sticky-price-now { font-size: 20px; font-weight: 800; color: #e65100; line-height: 1.1; }
.sticky-price-meta { font-size: 11.5px; }

.sticky-buy-btn { flex-shrink: 0; }

@media (max-width: 640px) {
    .sticky-price-meta { display: none; }
}

/* ===== Sales page extras: urgency, motion, social proof ===== */

.promo-bar {
    background: linear-gradient(90deg, #e65100, #ff7043);
    color: var(--white);
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 12px;
    letter-spacing: .2px;
}

.promo-bar span { font-variant-numeric: tabular-nums; }

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.35); }
    50% { box-shadow: 0 0 0 8px rgba(230, 81, 0, 0); }
}

.pulse-badge { animation: pulse-badge 2.2s ease-out infinite; }

@keyframes pulse-btn {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(21, 101, 192, 0.28); }
    50% { transform: scale(1.035); box-shadow: 0 10px 26px rgba(21, 101, 192, 0.4); }
}

.btn-pulse { animation: pulse-btn 1.8s ease-in-out infinite; }
.btn-pulse:hover { animation-play-state: paused; }

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.stars { color: #ffb300; letter-spacing: 2px; }

.cover-tilt {
    transition: transform .35s ease;
}

.cover-tilt:hover { transform: rotate(-1.5deg) scale(1.03); }

.price-tag-save {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 800;
    color: #1b873f;
    background: #e8f8ee;
    border-radius: 999px;
    padding: 2px 8px;
    display: inline-block;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-visible { opacity: 1; transform: translateY(0); }

.stats-strip {
    background: var(--blue-900);
    padding: 32px 0;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.stats-strip.reveal-visible { opacity: 1; transform: translateY(0); }

.stats-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    text-align: center;
}

@media (max-width: 720px) {
    .stats-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
    .stats-strip { padding: 22px 0; margin-top: 0; }
}

.stat-box .stat-num {
    font-size: 30px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.stat-box .stat-label {
    font-size: 12.5px;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}

.compare-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 14px;
}

.compare-table th, .compare-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--blue-100);
}

.compare-table th:first-child, .compare-table td:first-child { text-align: left; }

.compare-table thead th {
    background: var(--blue-50);
    color: var(--blue-900);
    font-weight: 700;
}

.compare-table td.highlight, .compare-table th.highlight {
    background: var(--blue-50);
    color: var(--blue-900);
    font-weight: 700;
}

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

@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; gap: 12px; } }

.testimonial-card {
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.testimonial-card p { font-size: 14px; margin: 10px 0; }
.testimonial-name { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

/* ---- USP / positioning sections ---- */
.positioning-quote {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin: 28px 0;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}
.positioning-quote small { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; opacity: 0.85; }

.typewriter-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 14px;
}
.typewriter-prefix { font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.typewriter-word-wrap { display: inline-flex; align-items: baseline; }
.typewriter-word { font-size: 26px; font-weight: 800; color: var(--blue-700); }
.typewriter-cursor { font-size: 26px; font-weight: 400; color: var(--blue-500); margin-left: 2px; animation: typewriter-blink 1s step-end infinite; }
@keyframes typewriter-blink { 50% { opacity: 0; } }

.workflow-strip {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 28px 0 8px;
    padding: 24px 16px;
    background: linear-gradient(180deg, var(--blue-50), var(--white));
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
}
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 96px;
    text-align: center;
}
.workflow-step-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--white);
    border: 2px solid var(--blue-200);
    border-radius: 50%;
    font-size: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 8px;
    transition: transform 0.2s, border-color 0.2s;
}
.workflow-step:hover .workflow-step-icon { transform: translateY(-3px); border-color: var(--blue-700); }
.workflow-step-label { font-weight: 800; font-size: 13.5px; color: var(--blue-900); }
.workflow-step-sub { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.workflow-connector {
    width: 28px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--blue-200) 0 6px, transparent 6px 10px);
    margin-top: 27px;
    flex-shrink: 0;
}

@media (max-width: 820px) {
    .workflow-strip { gap: 14px 0; }
    .workflow-step { width: 78px; }
    .workflow-step-icon { width: 46px; height: 46px; font-size: 20px; }
    .workflow-connector { width: 14px; margin-top: 22px; }
}
@media (max-width: 600px) {
    .workflow-strip { padding: 18px 8px; }
    .workflow-step { width: 64px; }
    .workflow-step-icon { width: 40px; height: 40px; font-size: 17px; }
    .workflow-step-label { font-size: 11.5px; }
    .workflow-step-sub { display: none; }
    .workflow-connector { width: 8px; margin-top: 19px; }
    .typewriter-word, .typewriter-cursor { font-size: 21px; }
    .typewriter-prefix { font-size: 14px; }
}

.usp-card {
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.usp-card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--blue-100);
    color: var(--blue-700);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
}
.usp-card h3 { margin: 0 0 8px; color: var(--blue-900); font-size: 16px; }
.usp-card p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }
.usp-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.7; }

.pgc-card {
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.pgc-card h3 { margin: 0 0 10px; font-size: 15px; }
.pgc-card.pgc-jobs h3 { color: var(--blue-700); }
.pgc-card.pgc-pains h3 { color: #c62828; }
.pgc-card.pgc-gains h3 { color: #1b873f; }
.pgc-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }

@media (max-width: 600px) {
    .positioning-quote { font-size: 15.5px; padding: 22px 16px; }
    .workflow-step { font-size: 12.5px; padding: 8px 12px; }
}

/* ── AI Case cards (AI ทำแทนได้มากกว่าที่คิด) ── */
.ai-case-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: transform .15s, box-shadow .15s;
}
.ai-case-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(21,86,192,.10); }
.ai-case-num {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--blue-700);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
}
.ai-case-body h3 { margin: 0 0 6px; font-size: 15.5px; color: var(--blue-900); }
.ai-case-body p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── 10 cases grid ── */
.ten-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ten-case-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}
.ten-case-icon { font-size: 22px; flex-shrink: 0; }
.ten-case-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
    flex-shrink: 0;
}
.ten-case-label { font-size: 13.5px; color: var(--ink); font-weight: 500; }

/* ── Earn section (อ่านเล่มเดียว หาเงินได้เลย) ── */
.earn-section {
    background: linear-gradient(135deg, #0d1b4b 0%, #1a3480 60%, #0d47a1 100%);
    padding: 56px 0;
    margin: 40px 0;
}
.earn-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius);
    padding: 22px;
    color: #fff;
    transition: background .2s;
}
.earn-card:hover { background: rgba(255,255,255,.14); }
.earn-icon { font-size: 30px; margin-bottom: 10px; }
.earn-card h3 { margin: 0 0 8px; font-size: 15.5px; color: #fff; }
.earn-card p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.75); line-height: 1.6; }
.earn-section .section-title { color: #fff; }
.earn-target {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 28px;
    color: rgba(255,255,255,.7);
    font-size: 14px;
}
.earn-tag {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 5px 16px;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
}

/* ── Easy learn section (เรียนง่าย เข้าใจง่าย) ── */
.easy-learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.easy-learn-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}
.easy-learn-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.easy-learn-video-placeholder {
    background: linear-gradient(135deg, #0d1b4b, #1565c0);
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex; align-items: center; justify-content: center;
}
.easy-learn-video-inner {
    text-align: center;
    color: #fff;
    padding: 20px;
}
.easy-learn-video-inner strong { font-size: 16px; }

@media (max-width: 640px) {
    .easy-learn-grid { grid-template-columns: 1fr; }
    .ten-cases-grid { grid-template-columns: 1fr 1fr; }
    .earn-section { padding: 36px 0; }
}

/* ── Section band backgrounds for visual rhythm ── */
.section-band {
    padding: 56px 0;
}
.section-band-tint {
    background: #f0f7ff;
    padding: 56px 0;
}
.section-band-dark {
    background: var(--blue-900);
    padding: 56px 0;
}
.section-band-gray {
    background: #f8fafc;
    padding: 56px 0;
}

/* ── Earn cards: icon-first compact ── */
.earn-card-compact {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
}
.earn-card-compact .earn-icon { font-size: 36px; margin-bottom: 10px; }
.earn-card-compact h3 { margin: 0; font-size: 15px; color: #fff; font-weight: 700; }

/* ── PGC compact ── */
.pgc-card-compact {
    background: var(--white);
    border: 1.5px solid var(--blue-100);
    border-radius: var(--radius);
    padding: 24px 20px;
}
.pgc-card-compact h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.pgc-card-compact.pgc-pains { border-top: 3px solid #ef5350; }
.pgc-card-compact.pgc-jobs { border-top: 3px solid var(--blue-600); }
.pgc-card-compact.pgc-gains { border-top: 3px solid #2e7d32; }
.pgc-card-compact.pgc-pains h3 { color: #c62828; }
.pgc-card-compact.pgc-jobs h3 { color: var(--blue-700); }
.pgc-card-compact.pgc-gains h3 { color: #1b873f; }
.pgc-card-compact ul { margin: 0; padding-left: 16px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.9; }

/* ── USP compact ── */
.usp-card-compact {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.usp-num {
    width: 32px; height: 32px; flex-shrink: 0;
    background: var(--blue-600); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.usp-card-compact h3 { margin: 0 0 4px; font-size: 14.5px; color: var(--blue-900); font-weight: 700; }
.usp-card-compact p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 820px) {
    .section-band, .section-band-tint, .section-band-dark, .section-band-gray { padding: 36px 0; }
}

/* ── Section title spacing reset inside bands ── */
.section-band > .container > .section-title,
.section-band-tint > .container > .section-title,
.section-band-gray > .container > .section-title,
.section-band-dark > .container > .section-title,
.earn-section > .container > .section-title {
    margin-top: 0;
    margin-bottom: 8px;
}

/* ── Subtitle muted text below section title ── */
.section-band > .container > p.muted:first-of-type,
.section-band-tint > .container > p.muted:first-of-type,
.section-band-gray > .container > p.muted:first-of-type {
    margin-top: 0;
    margin-bottom: 28px;
}

/* ── Grid spacing from title ── */
.section-band > .container > .grid-2,
.section-band > .container > .grid-3,
.section-band-tint > .container > .grid-2,
.section-band-tint > .container > .grid-3,
.section-band-gray > .container > .grid-2,
.section-band-gray > .container > .grid-3 {
    margin-top: 24px;
}
