/* ===== Force Light Mode (ป้องกัน auto-dark) ===== */
        :root { color-scheme: light; }
        html, body { background-color: #ffffff !important; color: #414042 !important; overflow-x: clip; }
        @supports not (overflow-x: clip) {
            html, body { overflow-x: hidden; }
        }

        body { font-family: 'Anuphan', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
        body.modal-active { overflow: hidden; }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Brand color utilities that do not depend on Tailwind arbitrary classes. */
        .brand-bg-line { background-color: #06C755 !important; }
        .brand-bg-facebook { background-color: #1877F2 !important; }
        .brand-bg-shopee { background-color: #EE4D2D !important; }
        .brand-bg-lazada { background-color: #0F146D !important; }

        /* Brand Pattern */
        #patternContainer {
            position: fixed; inset: 0; z-index: -1; pointer-events: none;
            display: grid; grid-template-columns: repeat(auto-fill, 220px);
            grid-auto-rows: 220px; opacity: 0.07;
        }
        .pattern-tile {
            width: 100%; height: 100%;
            background-image: url('../img/pattern.png');
            background-size: contain; background-repeat: no-repeat; background-position: center;
        }

        /* Hero — WebP with JPG fallback */
        .hero-bg {
            background:
                linear-gradient(135deg, rgba(0,42,57,0.92) 0%, rgba(0,58,77,0.85) 100%),
                image-set(
                    url('../img/hero-bg.webp') type('image/webp'),
                    url('../img/hero-bg.jpg') type('image/jpeg')
                ) center/cover no-repeat,
                url('../img/hero-bg.jpg') center/cover no-repeat,
                #003a4d;
        }
        .hero-pattern-overlay {
            position: absolute; inset: 0;
            background-image: url('../img/pattern.png');
            background-size: 180px 180px; opacity: 0.06; pointer-events: none;
        }
        .home-hero-title {
            font-size: 2.5rem;
            line-height: 1;
            max-width: 100%;
        }
        .home-hero-subtitle {
            font-size: 0.72rem;
            max-width: 100%;
        }
        .home-hero-copy {
            max-width: min(100%, 42rem);
        }
        .home-hero-actions {
            width: 100%;
            max-width: 28rem;
        }
        .home-hero-actions a {
            width: 100%;
        }
        @media (max-width: 767px) {
            .home-hero-title {
                font-size: clamp(2.1rem, 10vw, 2.5rem);
                letter-spacing: clamp(0.12em, 1.7vw, 0.2em);
            }
            .home-hero-subtitle {
                letter-spacing: clamp(0.18em, 1.2vw, 0.32em);
            }
        }
        @media (min-width: 640px) {
            .home-hero-actions {
                width: auto;
                max-width: none;
            }
            .home-hero-actions a {
                width: auto;
            }
        }
        @media (min-width: 768px) {
            .home-hero-title { font-size: 4.5rem; }
            .home-hero-subtitle { font-size: 1rem; }
        }
        @media (min-width: 1024px) {
            .home-hero-title { font-size: 6rem; }
        }

        .section-divider { display: inline-block; width: 80px; height: 5px; background: #fdb913; border-radius: 2px; }

        /* Catalog cards */
        .catalog-card { transition: transform 0.4s ease, box-shadow 0.4s ease; }
        .catalog-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -15px rgba(0,58,77,0.3); }
        .catalog-img-wrap img { transition: transform 0.6s ease; }
        .catalog-card:hover .catalog-img-wrap img { transform: scale(1.08); }

        /* About section special: Tilted decorative wood-grain */
        .about-bg {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            position: relative;
        }
        .about-bg::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
            background: linear-gradient(90deg, #003a4d 0%, #fdb913 50%, #003a4d 100%);
        }
        .stat-big {
            font-size: clamp(2.5rem, 7vw, 4.5rem);
            font-weight: 700; line-height: 1;
            color: #003a4d;
            letter-spacing: -0.02em;
        }
        .stat-big sup { color: #fdb913; font-size: 0.5em; vertical-align: super; }
        .value-card {
            background: white; padding: 1.75rem 1.5rem; border-radius: 0.75rem;
            border: 1px solid #e5e7eb;
            transition: all 0.3s;
        }
        .value-card:hover {
            border-color: #fdb913;
            box-shadow: 0 12px 30px -10px rgba(0,58,77,0.15);
            transform: translateY(-4px);
        }

        /* Image placeholder fallback */
        .img-placeholder {
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            display: flex; align-items: center; justify-content: center;
            color: #9ca3af; font-size: 28px;
        }

        /* Lightbox */
        #lightbox { display: none; position: fixed; inset: 0; z-index: 500; align-items: center; justify-content: center; }
        #lightbox.active { display: flex; }
        #lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.95); cursor: pointer; }
        .lightbox-wrapper { position: relative; max-height: 90vh; max-width: 95vw; display: flex; flex-direction: column; align-items: center; z-index: 510; }
        #lightbox-img-container { overflow: hidden; max-height: 75vh; max-width: 100%; display: flex; justify-content: center; align-items: center; border-radius: 12px; position: relative; cursor: zoom-in; }
        #lightbox-img { transition: transform 0.1s ease-out; transform-origin: center; max-height: 75vh; max-width: 100%; user-select: none; -webkit-user-drag: none; }
        #lightbox-img.zoomed { cursor: grab; }
        #lightbox-img.dragging { transition: none; cursor: grabbing; }
        #lightbox-video { max-height: 75vh; max-width: 100%; border-radius: 12px; display: none; }
        .zoom-info {
            position: absolute; bottom: -45px; left: 50%; transform: translateX(-50%);
            color: white; background: rgba(0,0,0,0.6); padding: 6px 14px; border-radius: 20px;
            font-size: 12px; pointer-events: none; opacity: 0.85; white-space: nowrap;
        }
        .btn-close-lightbox {
            position: absolute; top: -18px; right: -18px;
            background-color: #fdb913; color: #003a4d;
            width: 44px; height: 44px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%; cursor: pointer; z-index: 550;
            border: 3px solid white; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
            transition: transform 0.2s;
        }
        .btn-close-lightbox:hover { transform: scale(1.1) rotate(90deg); }
        .nav-btn {
            position: absolute; top: 50%; transform: translateY(-50%);
            background-color: rgba(0, 58, 77, 0.85); color: #fdb913;
            padding: 18px 14px; cursor: pointer; z-index: 520; border-radius: 8px;
            transition: all 0.3s; backdrop-filter: blur(4px); border: none;
        }
        .nav-btn:hover { background-color: rgba(0, 58, 77, 1); transform: translateY(-50%) scale(1.05); }
        @media (max-width: 768px) {
            .nav-btn { padding: 14px 10px; }
            .btn-close-lightbox { width: 38px; height: 38px; top: -12px; right: -12px; }
        }

        .hidden-view { display: none; }

        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Mobile menu */
        #mobile-menu {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(-8px);
            transition:
                opacity 0.2s ease,
                visibility 0.2s ease,
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        #mobile-menu.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0);
        }

        /* Reveal */
        .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
        .reveal.visible { opacity: 1; transform: translateY(0); }

        /* Scroll-to-top */
        #scroll-top {
            position: fixed; bottom: 24px; right: 24px;
            width: 48px; height: 48px;
            background: #003a4d; color: #fdb913; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 6px 20px rgba(0,58,77,0.35);
            cursor: pointer; z-index: 90; opacity: 0; pointer-events: none;
            transition: all 0.3s; border: none;
        }
        #scroll-top.visible { opacity: 1; pointer-events: auto; }
        #scroll-top:hover { background: #fdb913; color: #003a4d; transform: translateY(-3px); }

        *:focus-visible { outline: 2px solid #fdb913; outline-offset: 2px; }

        section[id] { scroll-margin-top: 80px; }

        .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        .line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

        /* Floating LINE/Phone CTA */
        .float-cta {
            position: fixed; bottom: 24px; left: 24px; z-index: 90;
            display: flex; flex-direction: column; gap: 10px;
        }
        .float-cta a {
            width: 52px; height: 52px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            color: white; font-size: 22px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.25);
            transition: transform 0.2s;
        }
        .float-cta a:hover { transform: scale(1.1); }
        .float-cta .fb-cta { background: #1877F2; }
        .float-cta .phone-cta { background: #fdb913; color: #003a4d; }
        .float-cta .line-cta { background: #06C755; }

        @media (max-width: 480px) {
            .float-cta {
                bottom: 12px;
                right: 12px;
                left: auto;
                transform: none;
                flex-direction: row;
                gap: 8px;
            }
            .float-cta a { width: 46px; height: 46px; font-size: 18px; }
            #scroll-top { width: 42px; height: 42px; bottom: 72px; right: 16px; }
        }

        /* ===== Color Catalog Section ===== */
        .color-section-bg {
            background:
                radial-gradient(ellipse at top, rgba(253,185,19,0.08) 0%, transparent 60%),
                linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
            position: relative;
        }
        .color-section-bg::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(0,58,77,0.2), transparent);
        }
        .color-tab {
            padding: 0.6rem 1.5rem; border-radius: 999px;
            font-weight: 600; font-size: 0.85rem; letter-spacing: 0.05em;
            text-transform: uppercase; cursor: pointer; transition: all 0.25s;
            border: 1.5px solid #d1d3d4; background: white; color: #414042;
            display: inline-flex; align-items: center; gap: 0.5rem;
        }
        .color-tab:hover { border-color: #fdb913; color: #003a4d; }
        .color-tab.active {
            background: #003a4d; color: #fdb913;
            border-color: #003a4d;
            box-shadow: 0 6px 20px -6px rgba(0,58,77,0.5);
        }
        .color-guide-helper {
            max-width: 1060px;
            margin: 0 auto 1.75rem;
            padding: 1.15rem;
            border: 1px solid rgba(0,58,77,0.12);
            border-left: 5px solid #fdb913;
            border-radius: 8px;
            background: rgba(255,255,255,0.94);
            box-shadow: 0 16px 36px -28px rgba(0,58,77,0.45);
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 1rem 1.4rem;
            align-items: center;
        }
        .color-guide-kicker {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            color: #c58c00;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 0.35rem;
        }
        .color-guide-copy h2 {
            margin: 0;
            color: #003a4d;
            font-size: clamp(1.15rem, 2.8vw, 1.65rem);
            font-weight: 700;
            line-height: 1.35;
        }
        .color-guide-copy p {
            margin: 0.45rem 0 0;
            color: #4b5563;
            font-size: 0.95rem;
            line-height: 1.75;
        }
        .color-guide-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
            margin-top: 0.75rem;
        }
        .color-guide-chips span {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 0.25rem 0.7rem;
            border-radius: 999px;
            background: #f6f3ee;
            color: #003a4d;
            font-size: 0.78rem;
            font-weight: 600;
        }
        .color-guide-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 0.65rem;
        }
        .color-guide-primary,
        .color-guide-secondary {
            min-height: 42px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            border-radius: 8px;
            padding: 0.7rem 1rem;
            font-size: 0.86rem;
            font-weight: 700;
            line-height: 1.25;
            transition: all 0.25s ease;
            white-space: nowrap;
        }
        .color-guide-primary {
            background: #003a4d;
            color: #fdb913;
            border: 1px solid #003a4d;
        }
        .color-guide-primary:hover {
            background: #fdb913;
            color: #003a4d;
            border-color: #fdb913;
            transform: translateY(-2px);
        }
        .color-guide-secondary {
            background: #ffffff;
            color: #003a4d;
            border: 1px solid rgba(0,58,77,0.25);
        }
        .color-guide-secondary:hover {
            border-color: #fdb913;
            color: #c58c00;
            transform: translateY(-2px);
        }
        @media (max-width: 768px) {
            .color-guide-helper {
                grid-template-columns: 1fr;
                padding: 1rem;
            }
            .color-guide-actions {
                justify-content: stretch;
            }
            .color-guide-primary,
            .color-guide-secondary {
                flex: 1 1 100%;
                white-space: normal;
            }
        }
        .color-card {
            background: white; border-radius: 14px; overflow: hidden;
            box-shadow: 0 4px 14px -4px rgba(0,58,77,0.12);
            border: 1px solid #ececec;
            cursor: pointer;
            transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s ease;
            display: flex; flex-direction: column;
        }
        .color-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 22px 40px -16px rgba(0,58,77,0.32);
            border-color: #fdb913;
        }
        .color-card .img-wrap {
            position: relative;
            background: linear-gradient(180deg, #f5f1ea 0%, #ece6db 100%);
            overflow: hidden;
        }
        .color-card.view-door .img-wrap { aspect-ratio: 352 / 600; }
        .color-card.view-plank .img-wrap { aspect-ratio: 1200 / 552; }
        .color-card .img-wrap img {
            width: 100%; height: 100%; object-fit: cover; object-position: center;
            transition: transform 0.6s ease;
        }
        .color-card:hover .img-wrap img { transform: scale(1.06); }
        .color-card .code-badge {
            position: absolute; top: 10px; left: 10px;
            background: rgba(0,58,77,0.92); color: #fdb913;
            font-weight: 700; font-size: 0.7rem; letter-spacing: 0.1em;
            padding: 4px 10px; border-radius: 999px;
            backdrop-filter: blur(4px);
        }
        .color-card .swatch-chip {
            position: absolute; bottom: 10px; right: 10px;
            width: 32px; height: 32px; border-radius: 50%;
            border: 3px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.18);
        }
        .color-card .info {
            padding: 1rem 1rem 1.1rem;
            border-top: 1px solid #f0eee9;
        }
        .color-card .info .th-name {
            font-weight: 700; color: #003a4d; font-size: 0.95rem; line-height: 1.3;
        }
        .color-card .info .en-name {
            color: #888; font-size: 0.72rem; letter-spacing: 0.08em;
            text-transform: uppercase; margin-top: 2px;
        }

        /* Modal */
        #color-modal { display: none; position: fixed; inset: 0; z-index: 700; }
        #color-modal.active { display: flex; align-items: center; justify-content: center; padding: 16px; }
        #color-modal .overlay {
            position: absolute; inset: 0; background: rgba(0,20,30,0.86); backdrop-filter: blur(6px);
            cursor: pointer;
        }
        .color-modal-box {
            position: relative; z-index: 710;
            background: #fff; border-radius: 18px; overflow: hidden;
            max-width: 880px; width: 100%; max-height: 92vh;
            display: grid; grid-template-columns: 1fr 1.2fr;
            box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
        }
        @media (max-width: 768px) {
            .color-modal-box { grid-template-columns: 1fr; max-height: 94vh; }
        }
        .color-modal-img {
            background: linear-gradient(180deg, #f5f1ea 0%, #ece6db 100%);
            display: flex; align-items: center; justify-content: center;
            padding: 1.2rem; min-height: 280px;
        }
        .color-modal-img img { max-width: 100%; max-height: 64vh; object-fit: contain; border-radius: 8px; }
        .color-modal-content {
            padding: 1.5rem 1.5rem 1.75rem;
            overflow-y: auto;
        }
        @media (min-width: 769px) {
            .color-modal-content { max-height: 92vh; }
        }
        .color-modal-content h3 {
            font-size: 1.6rem; font-weight: 700; color: #003a4d; line-height: 1.15;
        }
        .modal-close {
            position: absolute; top: 12px; right: 12px; z-index: 720;
            width: 38px; height: 38px; border-radius: 50%;
            background: rgba(255,255,255,0.95); color: #003a4d;
            display: flex; align-items: center; justify-content: center;
            border: none; cursor: pointer;
            box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: transform 0.2s;
        }
        .modal-close:hover { transform: rotate(90deg); }
        .tone-chip {
            display: inline-flex; align-items: center; gap: 0.4rem;
            padding: 4px 10px 4px 4px; border-radius: 999px;
            background: #f6f3ee; font-size: 0.72rem; color: #414042;
            margin: 3px; line-height: 1.2;
        }
        .tone-chip .dot {
            width: 16px; height: 16px; border-radius: 50%;
            border: 1.5px solid white; box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
        }
        .style-pill {
            display: inline-block; padding: 4px 10px; border-radius: 6px;
            background: #003a4d; color: #fdb913;
            font-size: 0.7rem; letter-spacing: 0.05em; margin: 3px 4px 3px 0;
            font-weight: 500;
        }
        .color-modal-guide-btn {
            flex: 1 1 100%;
            min-width: 180px;
            background: #f6f3ee;
            color: #003a4d;
            border: 1px solid #e5e7eb;
            font-weight: 700;
            font-size: 0.86rem;
            padding: 0.72rem 0.9rem;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.25s ease;
        }
        .color-modal-guide-btn:hover {
            border-color: #fdb913;
            background: #fff8df;
            color: #9a6a00;
        }
        .pdf-btn {
            display: inline-flex; align-items: center; gap: 0.5rem;
            padding: 0.75rem 1.25rem; border-radius: 10px;
            background: white; border: 1.5px solid #003a4d; color: #003a4d;
            font-weight: 600; font-size: 0.85rem;
            transition: all 0.25s;
        }
        .pdf-btn:hover {
            background: #003a4d; color: #fdb913; transform: translateY(-2px);
            box-shadow: 0 12px 24px -10px rgba(0,58,77,0.45);
        }
        .pdf-btn.primary { background: #fdb913; border-color: #fdb913; color: #003a4d; }
        .pdf-btn.primary:hover { background: #003a4d; color: #fdb913; border-color: #003a4d; }

        /* Download modal */
        #download-modal { display: none; position: fixed; inset: 0; z-index: 700; }
        #download-modal.active { display: flex; align-items: center; justify-content: center; padding: 16px; }
        #download-modal .overlay {
            position: absolute; inset: 0; background: rgba(0,20,30,0.86); backdrop-filter: blur(6px);
            cursor: pointer;
        }
        .download-modal-box {
            position: relative; z-index: 710;
            background: #fff; border-radius: 18px; padding: 1.75rem 1.5rem 1.5rem;
            max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto;
            box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
        }
        .dl-row {
            display: flex; align-items: center; gap: 0.85rem;
            padding: 0.85rem 1rem; border-radius: 12px;
            border: 1.5px solid #e5e7eb; background: #fafafa;
            color: #003a4d; transition: all 0.25s;
            text-decoration: none;
        }
        .dl-row:hover {
            border-color: #fdb913; background: white; transform: translateX(2px);
            box-shadow: 0 6px 18px -8px rgba(0,58,77,0.25);
        }
        .dl-row .icon {
            width: 42px; height: 42px; border-radius: 10px;
            background: #003a4d; color: #fdb913;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.05rem; flex-shrink: 0;
        }
        .dl-row.primary .icon { background: #fdb913; color: #003a4d; }
        .dl-row .meta { flex: 1; min-width: 0; }
        .dl-row .meta .title { font-weight: 700; font-size: 0.92rem; color: #003a4d; }
        .dl-row .meta .sub { font-size: 0.72rem; color: #888; margin-top: 1px; }
        .dl-row .arrow { color: #9ca3af; font-size: 0.85rem; }
        .dl-row:hover .arrow { color: #fdb913; }
/* ===== Multi-page additions ===== */
.nav-link {
    padding: 0.5rem 0; position: relative;
    transition: color 0.2s;
}
.nav-link:hover { color: #fdb913; }
.nav-link.active {
    color: #fdb913;
}
.nav-link.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: #fdb913; border-radius: 1px;
}
.mobile-link.active {
    background: rgba(253,185,19,0.12);
    color: #003a4d;
    border-left: 3px solid #fdb913;
    padding-left: 0.875rem !important;
}

/* Breadcrumbs */
.breadcrumb {
    background: white; border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}
.breadcrumb a, .breadcrumb span {
    font-size: 0.85rem; color: #6b7280;
}
.breadcrumb a:hover { color: #003a4d; }
.breadcrumb .sep { color: #d1d5db; margin: 0 0.5rem; }
.breadcrumb .current { color: #003a4d; font-weight: 600; }

/* Lightbox */
#lightbox { display: none; position: fixed; inset: 0; z-index: 500; align-items: center; justify-content: center; }
#lightbox.active { display: flex; }
#lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.95); cursor: pointer; }
.lightbox-wrapper { position: relative; max-height: 90vh; max-width: 95vw; display: flex; flex-direction: column; align-items: center; z-index: 510; }
#lightbox-img, #lightbox-video {
    max-height: 80vh; max-width: 100%; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lb-btn {
    background: rgba(0,58,77,0.85); color: #fdb913;
    padding: 14px; cursor: pointer; border-radius: 8px;
    transition: all 0.25s; border: none; font-size: 1.1rem;
}
.lb-btn:hover { background: #003a4d; transform: scale(1.05); }
.lb-close {
    position: absolute; top: -18px; right: -18px;
    background: #fdb913; color: #003a4d;
    width: 44px; height: 44px; border-radius: 50%;
    border: 3px solid white; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 550; transition: transform 0.2s;
}
.lb-close:hover { transform: rotate(90deg); }
.lb-nav-wrap {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 100%; display: flex; justify-content: space-between;
    padding: 0 1rem; pointer-events: none;
}
.lb-nav-wrap .lb-btn { pointer-events: auto; }

/* Page hero header (for non-home pages) */
.page-hero {
    background: linear-gradient(135deg, #003a4d 0%, #015069 100%);
    color: white; padding: 4rem 0 3rem;
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: url('../img/pattern.png'); background-size: 180px;
    opacity: 0.05; pointer-events: none;
}
.page-hero h1 {
    font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700;
    letter-spacing: 0.02em;
}
.page-hero .subtitle {
    color: #fdb913; font-size: 0.85rem; letter-spacing: 0.3em;
    text-transform: uppercase; margin-bottom: 0.75rem;
}

/* Card grid utility for sections */
.card-grid-2-3-4 {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .card-grid-2-3-4 { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .card-grid-2-3-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

/* ===== Lightbox bottom action bar ===== */
.lb-bottom-bar {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; margin-top: 1rem; width: 100%;
}
.lb-counter {
    color: rgba(255,255,255,0.7); font-size: 0.85rem;
    letter-spacing: 0.05em;
}
.lb-actions {
    display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
}
.lb-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; padding: 0.7rem 1.3rem;
    border-radius: 999px; font-size: 0.9rem; font-weight: 600;
    border: 2px solid transparent; cursor: pointer;
    transition: all 0.2s; text-decoration: none;
    white-space: nowrap;
}
.lb-action-btn.primary {
    background: #fdb913; color: #003a4d;
    box-shadow: 0 4px 14px rgba(253,185,19,0.3);
}
.lb-action-btn.primary:hover {
    background: #003a4d; color: #fdb913;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.lb-action-btn.secondary {
    background: rgba(255,255,255,0.1);
    color: white; border-color: rgba(255,255,255,0.3);
}
.lb-action-btn.secondary:hover {
    background: rgba(255,255,255,0.2); border-color: white;
}
.lb-action-btn i { font-size: 1rem; }

#lightbox-img.zoomed {
    transform: scale(1.8); transition: transform 0.3s ease;
    cursor: zoom-out;
}
#lightbox-img { cursor: zoom-in; transition: transform 0.3s ease; }
@media (max-width: 640px) {
    .lb-action-btn { padding: 0.6rem 1rem; font-size: 0.82rem; }
}

/* ===== Homepage sliders ===== */
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 38px; height: 38px;
    background: white; color: #003a4d;
    border: none; border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 0.85rem;
}
.slider-btn:hover { background: #fdb913; color: #003a4d; transform: translateY(-50%) scale(1.1); }
.slider-btn-left { left: -8px; }
.slider-btn-right { right: -8px; }
@media (max-width: 640px) {
    .slider-btn { width: 32px; height: 32px; font-size: 0.7rem; }
    .slider-btn-left { left: 4px; }
    .slider-btn-right { right: 4px; }
}

.slider-card {
    flex-shrink: 0; scroll-snap-align: start;
    transition: transform 0.3s;
}
.slider-card:hover { transform: translateY(-4px); }

/* Reels card sizing */
.reel-slide {
    width: 180px; aspect-ratio: 9/16;
    border-radius: 12px; overflow: hidden; position: relative;
    box-shadow: 0 4px 14px rgba(0,58,77,0.12);
    background: linear-gradient(135deg, rgba(0,58,77,0.15), rgba(0,58,77,0.3));
}
@media (min-width: 640px) { .reel-slide { width: 220px; } }

/* Article card sizing */
.article-slide {
    width: 280px;
    background: white; border-radius: 12px; overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0,58,77,0.08);
}
@media (min-width: 640px) { .article-slide { width: 320px; } }

/* Article reading layout */
.article-page {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
}
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.article-main-col { min-width: 0; }
.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.article-cover-frame {
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 16px 40px -28px rgba(0,58,77,0.55);
}
.article-cover-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.article-lead,
.article-toc,
.article-sidebar-box,
.article-line-card {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}
.article-lead {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-left: 5px solid #fdb913;
}
.article-lead p {
    margin: 0;
    color: #003a4d;
    font-size: clamp(1.05rem, 2.4vw, 1.25rem);
    line-height: 1.85;
    font-weight: 500;
}
.article-toc {
    margin-top: 1.25rem;
    padding: 1rem;
}
.article-toc-title,
.article-sidebar-kicker {
    color: #fdb913;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.article-toc-links {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.65rem;
}
.article-toc-links a {
    color: #003a4d;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
}
.article-toc-links a:hover { color: #c58c00; }
.article-content {
    margin-top: 2rem;
    color: #414042;
    font-size: clamp(1rem, 2vw, 1.08rem);
    line-height: 1.9;
}
.article-content > p {
    margin: 0 0 1.5rem;
    color: #4b5563;
}
.article-section {
    padding: 1.75rem 0;
    border-top: 1px solid #e5e7eb;
    scroll-margin-top: 7rem;
}
.article-section h2 {
    color: #003a4d;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.9rem;
}
.article-section p { margin: 0; }
.article-section .article-bullet-list,
.article-section ul {
    margin: 1rem 0 0;
    padding-left: 0;
    display: grid;
    gap: 0.65rem;
    list-style: none;
}
.article-section .article-bullet-list li,
.article-section ul li {
    position: relative;
    padding-left: 1.35rem;
    color: #4b5563;
    line-height: 1.8;
}
.article-section .article-bullet-list li::before,
.article-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #fdb913;
    box-shadow: 0 0 0 3px rgba(253,185,19,0.16);
}
.article-section .article-bullet-list strong,
.article-section ul strong {
    color: #003a4d;
    font-weight: 700;
}
.article-section-kicker {
    margin: 0 0 0.45rem;
    color: #fdb913;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.article-inline-figure {
    margin: 1.4rem 0 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}
.article-inline-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.article-inline-figure figcaption {
    margin: 0;
    padding: 0.85rem 1rem;
    color: #5b6472;
    font-size: 0.92rem;
    line-height: 1.65;
    background: #fbfcfd;
    border-top: 1px solid #eef2f6;
}
.article-question-panel,
.article-reference-panel {
    margin: 1.3rem 0 0;
    padding: 1.35rem;
    border-radius: 8px;
    border: 1px solid #e0e7ef;
    background: #ffffff;
}
.article-question-panel h2,
.article-reference-panel h2 {
    margin: 0 0 1rem;
    color: #003a4d;
    font-size: clamp(1.25rem, 2.6vw, 1.65rem);
    font-weight: 700;
}
.article-question-list {
    display: grid;
    gap: 0.75rem;
}
.article-question-item {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #fbfcfd;
}
.article-question-item summary {
    cursor: pointer;
    padding: 0.9rem 1rem;
    color: #003a4d;
    font-weight: 700;
    line-height: 1.55;
}
.article-question-item p {
    margin: 0;
    padding: 0 1rem 1rem;
    color: #5b6472;
    line-height: 1.8;
}
.article-reference-panel ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}
.article-reference-panel li {
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f6;
}
.article-reference-panel li:first-child {
    padding-top: 0;
    border-top: 0;
}
.article-reference-panel a {
    display: inline-block;
    color: #003a4d;
    font-weight: 700;
    line-height: 1.5;
}
.article-reference-panel a:hover { color: #c58c00; }
.article-reference-panel span {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.65;
}
.article-summary-section {
    margin-top: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e0e7ef;
    border-left: 5px solid #003a4d;
    border-radius: 8px;
    background: #f8fafc;
}
.article-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 2rem;
}
.article-related-link {
    display: block;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.article-related-link span {
    display: block;
    color: #fdb913;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.article-related-link strong {
    display: block;
    color: #003a4d;
    line-height: 1.55;
}
.article-related-link:hover {
    border-color: #fdb913;
    background: #fffaf0;
    transform: translateY(-2px);
}
.article-sidebar {
    display: grid;
    gap: 1rem;
}
.article-sidebar-box { padding: 1.1rem; }
.article-sidebar-box h2 {
    color: #003a4d;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.35rem 0 0.65rem;
}
.article-sidebar-box p {
    color: #5b6472;
    font-size: 0.92rem;
    line-height: 1.75;
}
.article-side-link {
    display: block;
    padding: 0.75rem 0;
    color: #003a4d;
    font-size: 0.92rem;
    font-weight: 700;
    border-top: 1px solid #eef2f6;
}
.article-side-link:hover { color: #c58c00; }
.article-line-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    color: #ffffff;
    background: #06c755;
    font-weight: 700;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.article-line-card:hover {
    opacity: 0.92;
    transform: translateY(-2px);
}
@media (min-width: 640px) {
    .article-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 760px) 300px;
        justify-content: center;
    }
    .article-sidebar {
        position: sticky;
        top: 6.5rem;
    }
}

.article-index-card {
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px -26px rgba(0,58,77,0.55);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.article-index-card:hover {
    border-color: #fdb913;
    transform: translateY(-4px);
    box-shadow: 0 18px 38px -28px rgba(0,58,77,0.65);
}
.article-index-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.article-index-card:hover img { transform: scale(1.045); }
.article-index-card.featured {
    display: grid;
}
@media (min-width: 1024px) {
    .article-index-card.featured {
        grid-column: span 2;
        grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    }
    .article-index-card.featured .article-index-image {
        aspect-ratio: auto;
        min-height: 100%;
    }
}


.article-cta-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin: 1.25rem 0 0;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 58, 77, 0.16);
    background: linear-gradient(135deg, #f8fafc 0%, #fff7e6 100%);
}
.article-cta-card h2 {
    margin: 0 0 0.55rem;
    color: #003a4d;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 700;
    line-height: 1.35;
}
.article-cta-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.75;
}
.article-cta-card ul {
    margin: 0.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    list-style: none;
}
.article-cta-card li {
    position: relative;
    padding-left: 1.15rem;
    color: #4b5563;
    line-height: 1.65;
}
.article-cta-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: #fdb913;
}
.article-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #003a4d;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}
.article-cta-button:hover {
    background: #00506a;
    transform: translateY(-1px);
}
.article-overview-figure {
    margin-top: 1.25rem;
    border-color: rgba(0, 58, 77, 0.14);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
@media (max-width: 767px) {
    .article-cta-card { grid-template-columns: 1fr; }
    .article-cta-button {
        width: 100%;
        white-space: normal;
        text-align: center;
    }
}

/* Codex article summary placement and compact references */
.article-reference-panel {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-color: #eef2f6;
    background: #fbfcfd;
    box-shadow: none;
}
.article-reference-panel .article-section-kicker {
    margin-bottom: 0.2rem;
    color: #9ca3af;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}
.article-reference-panel h2 {
    margin-bottom: 0.55rem;
    color: #334155;
    font-size: clamp(0.98rem, 1.8vw, 1.12rem);
}
.article-reference-panel ul {
    gap: 0.45rem;
}
.article-reference-panel li {
    padding-top: 0.5rem;
}
.article-reference-panel a {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
}
.article-reference-panel span {
    margin-top: 0.12rem;
    color: #7b8491;
    font-size: 0.78rem;
    line-height: 1.5;
}
.article-summary-section .article-overview-figure {
    margin: 1rem 0 0;
    border-color: rgba(0, 58, 77, 0.12);
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}
.article-summary-section .article-overview-figure figcaption {
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Codex pure generated explain figures */
.article-explain-figure {
    margin: 1.35rem 0 0;
    border-color: rgba(0, 58, 77, 0.16);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}



/* ===== Article search page ===== */
.article-search-entry {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 0;
}
.article-search-entry-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.88rem 1.15rem;
    border: 1px solid rgba(0,58,77,0.12);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(253,185,19,0.12), rgba(255,255,255,0.95));
    color: #003a4d;
    box-shadow: 0 8px 24px rgba(0,58,77,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-search-entry-card:hover {
    transform: translateY(-2px);
    border-color: rgba(253,185,19,0.7);
    box-shadow: 0 12px 30px rgba(0,58,77,0.12);
}
.article-search-entry-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #003a4d;
    color: #fdb913;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.article-search-entry-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}
.article-search-entry-copy strong {
    font-size: 1rem;
}
.article-search-entry-copy span {
    font-size: 0.85rem;
    color: #5f6b76;
    line-height: 1.7;
}
.article-search-entry-arrow {
    margin-left: auto;
    color: #fdb913;
}
.article-search-shell {
    background: #f8fafc;
    padding: 2.75rem 0 4rem;
}
.article-search-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 14px 38px rgba(0,58,77,0.08);
    padding: 1.35rem;
}
.article-search-form {
    display: grid;
    gap: 1rem;
}
.article-search-input-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 2px solid rgba(0,58,77,0.14);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
}
.article-search-input-row:focus-within {
    border-color: #fdb913;
    box-shadow: 0 0 0 4px rgba(253,185,19,0.18);
}
.article-search-icon {
    color: #003a4d;
    padding-left: 0.35rem;
}
#article-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #003a4d;
    font-size: 1rem;
    background: transparent;
}
.article-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 6px;
    background: #003a4d;
    color: #fff;
    font-weight: 700;
    padding: 0.72rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.article-search-submit:hover {
    background: #fdb913;
    color: #003a4d;
}
.article-search-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}
.article-search-chip {
    border: 1px solid rgba(0,58,77,0.14);
    background: #fff;
    color: #003a4d;
    border-radius: 999px;
    padding: 0.48rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.article-search-chip.active,
.article-search-chip:hover {
    background: #fdb913;
    border-color: #fdb913;
    color: #003a4d;
}
.article-search-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}
.article-search-count {
    color: #5f6b76;
    font-size: 0.9rem;
}
.article-search-clear {
    border: 0;
    background: transparent;
    color: #003a4d;
    font-weight: 700;
    cursor: pointer;
}
.article-search-clear:hover {
    color: #b98500;
}
.article-search-results {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}
.article-search-result-card {
    min-width: 0;
}
.article-search-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #5f6b76;
}
.article-search-empty i {
    display: inline-flex;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(253,185,19,0.16);
    color: #003a4d;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.article-search-empty h2 {
    color: #003a4d;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}
@media (min-width: 640px) {
    .article-search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .article-search-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .article-search-input-row {
        grid-template-columns: auto 1fr;
    }
    .article-search-submit {
        grid-column: 1 / -1;
    }
    .article-search-entry-card {
        align-items: flex-start;
    }
}

/* ===== Catalog zoom pro ===== */
#lightbox .lightbox-wrapper {
    width: min(96vw, 1180px);
    max-height: 94vh;
}
.lb-viewport {
    position: relative;
    width: 100%;
    height: min(76vh, 760px);
    overflow: hidden;
    border-radius: 12px;
    background: rgba(9, 18, 24, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#lightbox-img,
#lightbox-video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    box-shadow: none;
    border-radius: 12px;
}
#lightbox-img {
    cursor: zoom-in;
    will-change: transform;
    transform-origin: center center;
}
#lightbox-img.zoomed {
    cursor: grab;
}
#lightbox-img.dragging {
    cursor: grabbing;
    transition: none;
}
#lightbox .lb-actions {
    align-items: center;
}
.lb-zoom-strip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    background: rgba(0,58,77,0.72);
    color: #fff;
}
.lb-zoom-level,
.lb-zoom-icon,
.lb-zoom-reset {
    border: 0;
    border-radius: 999px;
    min-height: 34px;
    padding: 0 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.lb-zoom-icon {
    width: 34px;
    padding: 0;
}
.lb-zoom-level.active,
.lb-zoom-level:hover,
.lb-zoom-icon:hover,
.lb-zoom-reset:hover {
    background: #fdb913;
    color: #003a4d;
}
@media (max-width: 640px) {
    #lightbox .lightbox-wrapper {
        width: 94vw;
    }
    .lb-viewport {
        height: 64vh;
    }
    .lb-zoom-strip {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 12px;
    }
    .lb-zoom-level,
    .lb-zoom-reset {
        min-height: 32px;
        padding: 0 0.56rem;
        font-size: 0.78rem;
    }
}


/* ===== Color decision flow ===== */
.color-decision-flow {
    border: 1px solid rgba(0,58,77,0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(0,58,77,0.08);
    padding: 1.35rem;
}
.color-decision-head {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}
.color-decision-head h2 {
    color: #003a4d;
    font-size: clamp(1.25rem, 3vw, 1.85rem);
    font-weight: 800;
}
.color-decision-head p {
    color: #5f6b76;
    line-height: 1.8;
    font-size: 0.94rem;
}
.color-advisor-grid {
    display: grid;
    gap: 1rem;
}
.color-advisor-controls {
    display: grid;
    gap: 0.85rem;
}
.color-advisor-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fbfcfd;
}
.color-advisor-step > span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #003a4d;
    color: #fdb913;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.color-advisor-step h3 {
    color: #003a4d;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}
.color-advisor-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}
.color-advisor-option {
    border: 1px solid rgba(0,58,77,0.14);
    background: #fff;
    color: #003a4d;
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.color-advisor-option.active,
.color-advisor-option:hover {
    background: #fdb913;
    border-color: #fdb913;
}
.color-advisor-output {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}
.color-advisor-output-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.color-advisor-output-head h3 {
    color: #003a4d;
    font-weight: 800;
}
.color-advisor-output-head a {
    color: #b98500;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}
.color-advisor-results {
    display: grid;
    gap: 0.85rem;
}
.color-advisor-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 0.85rem;
    align-items: center;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    padding: 0.65rem;
    background: #fff;
}
.color-advisor-image {
    position: relative;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    cursor: pointer;
    background: #f3f4f6;
}
.color-advisor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.color-advisor-image span {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.color-advisor-code {
    color: #b98500;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.color-advisor-card h3 {
    color: #003a4d;
    font-weight: 800;
    margin: 0.1rem 0;
}
.color-advisor-card p {
    color: #5f6b76;
    font-size: 0.8rem;
    line-height: 1.55;
}
.color-advisor-detail {
    margin-top: 0.42rem;
    border: 0;
    background: transparent;
    color: #003a4d;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}
.color-advisor-detail:hover {
    color: #b98500;
}
@media (min-width: 1024px) {
    .color-advisor-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }
    .color-advisor-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .color-advisor-output-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .color-advisor-card {
        grid-template-columns: 84px 1fr;
    }
}

.article-search-panel-inline {
    margin-bottom: 1rem;
}
.article-search-toolbar-inline {
    margin-top: 0;
}
@media (max-width: 640px) {
    .article-search-panel,
    .color-decision-flow {
        padding: 1rem;
    }
}


/* ===== Article search compact results polish ===== */
.article-search-panel {
    padding: clamp(1.25rem, 2.4vw, 1.85rem);
}
.article-search-input-row {
    padding: 0.78rem 0.9rem;
}
.article-search-submit {
    box-shadow: 0 8px 18px rgba(0,58,77,0.14);
    transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.article-search-submit:active {
    transform: translateY(1px) scale(0.98);
}
.article-search-submit.search-done {
    background: #fdb913;
    color: #003a4d;
    box-shadow: 0 0 0 4px rgba(253,185,19,0.22), 0 10px 22px rgba(0,58,77,0.12);
    animation: search-confirm 0.72s ease;
}
@keyframes search-confirm {
    0% { transform: scale(1); }
    38% { transform: scale(1.045); }
    100% { transform: scale(1); }
}
#articles-grid.article-results-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 0.9rem;
    align-items: stretch;
}
.article-compact-card {
    min-width: 0;
    min-height: 124px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,58,77,0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.article-compact-card:hover {
    transform: translateY(-2px);
    border-left-color: #fdb913;
    box-shadow: 0 14px 30px rgba(0,58,77,0.12);
}
.article-compact-thumb {
    width: 100%;
    height: 100%;
    min-height: 124px;
    background: #f3f4f6;
    overflow: hidden;
}
.article-compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.article-compact-card:hover .article-compact-thumb img {
    transform: scale(1.04);
}
.article-compact-body {
    min-width: 0;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.article-compact-date {
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.2;
    margin-bottom: 0.36rem;
}
.article-compact-body h2 {
    color: #003a4d;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.38;
    margin: 0 0 0.26rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-compact-body p {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.48;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-compact-more {
    color: #b98500;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.55rem;
    transition: transform 0.2s ease;
}
.article-compact-card:hover .article-compact-more {
    transform: translateX(3px);
}
@media (min-width: 1280px) {
    #articles-grid.article-results-compact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .article-compact-card {
        grid-template-columns: 96px minmax(0, 1fr);
        min-height: 122px;
    }
    .article-compact-thumb {
        min-height: 122px;
    }
    .article-compact-body {
        padding: 0.9rem 1rem;
    }
    .article-compact-body h2 {
        font-size: 0.92rem;
    }
    .article-compact-body p {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }
}
