        :root {
            --ink: #1B1917;
            --ink-soft: #242019;
            --paper: #EFE6D3;
            --paper-shadow: #d8cba9;
            --text-on-paper: #2B2419;
            --text-on-ink: #F4EEDF;
            --gold: #C89B4C;
            --rust: #A8562F;
            --hairline: rgba(244, 238, 223, 0.14);
        }

        * { box-sizing: border-box; }

        html, body {
            margin: 0;
            padding: 0;
            background: var(--ink);
            color: var(--text-on-ink);
            font-family: 'Noto Sans Thai', sans-serif;
            -webkit-font-smoothing: antialiased;
        }

        a { text-decoration: none; color: inherit; }
        ul { list-style: none; margin: 0; padding: 0; }

        /* ---------- header ---------- */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 20;
            background: rgba(27, 25, 23, 0.92);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--hairline);
        }

        .header-inner {
            max-width: 1120px;
            margin: 0 auto;
            padding: 22px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .wordmark {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .wordmark .brand {
            font-family: 'Noto Serif Thai', serif;
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--text-on-ink);
            letter-spacing: 0.01em;
        }

        .wordmark .brand span { color: var(--gold); }

        .wordmark .tagline {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.65rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: #9c9488;
        }

        #tm-main-nav .navbar-nav {
            display: flex;
            gap: 28px;
        }

        .tm-nav-link {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.72rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: #cfc7b6;
            padding-bottom: 4px;
            border-bottom: 1px solid transparent;
            transition: color .2s ease, border-color .2s ease;
        }

        .nav-item.active .tm-nav-link,
        .tm-nav-link:hover {
            color: var(--gold);
            border-bottom-color: var(--gold);
        }

        .navbar-toggler {
            display: none;
            background: transparent;
            border: 1px solid var(--hairline);
            color: var(--text-on-ink);
            padding: 8px 12px;
            border-radius: 6px;
        }

        /* ---------- content wrap ---------- */
        .tm-content-container {
            max-width: 1120px;
            margin: 0 auto;
            padding: 40px 24px 24px;
        }

        /* ---------- back link ---------- */
        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.7rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #9c9488;
            margin-bottom: 32px;
            transition: color .2s ease;
        }

        .back-link:hover { color: var(--gold); }

        /* ---------- video layout ---------- */
        .tm-video-layout {
            display: grid;
            grid-template-columns: 380px 1fr;
            gap: 44px;
            align-items: start;
            padding-bottom: 64px;
            margin-bottom: 56px;
            border-bottom: 1px dashed var(--hairline);
        }

        .tm-video-frame {
            aspect-ratio: 9 / 16;
            max-width: 100%;
            margin: 0;
            overflow: hidden;
            border-radius: 4px;
            background: #111;
            box-shadow: 0 1px 0 var(--paper-shadow), 0 18px 34px -18px rgba(0,0,0,0.75);
            border: 6px solid var(--paper);
        }

        .tm-video-player {
            width: 100%;
            height: 100%;
            max-height: none;
            display: block;
            background: #000;
            object-fit: cover;
        }

        .tm-video-description-box {
            max-width: 100%;
            padding-top: 4px;
        }

        .eyebrow {
            display: inline-block;
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.68rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--gold);
            margin-bottom: 14px;
        }

        .tm-video-title {
            font-family: 'Noto Serif Thai', serif;
            font-weight: 700;
            font-size: 2.1rem;
            line-height: 1.35;
            color: var(--text-on-ink);
            margin: 0 0 28px;
            overflow-wrap: anywhere;
            position: relative;
            padding-left: 22px;
        }

        .tm-video-title::before {
            content: ".";
            position: absolute;
            left: -6px;
            top: -14px;
            font-family: 'Noto Serif Thai', serif;
            font-size: 3rem;
            color: var(--rust);
        }

        .tm-video-description-box p {
            font-family: 'Noto Sans Thai', sans-serif;
            font-size: 1.02rem;
            line-height: 1.9;
            color: #d9d0bd;
            margin: 0 0 14px;
        }

        .tm-video-description-box p.pull-quote {
            font-family: 'Noto Serif Thai', serif;
            font-weight: 600;
            font-style: normal;
            font-size: 1.25rem;
            line-height: 1.6;
            color: var(--gold);
            border-left: 2px solid var(--gold);
            padding: 4px 0 4px 20px;
            margin: 26px 0;
        }

        /* ---------- related section ---------- */
        .related-heading {
            
            align-items: baseline;
            gap: 14px;
            margin-bottom: 32px;
        }

        .related-heading h2 {
            font-family: 'Noto Serif Thai', serif;
            font-weight: 600;
            font-size: 1.4rem;
            color: var(--text-on-ink);
            margin: 0;
        }

        .related-heading .rule {
            flex: 1;
            height: 1px;
            background: var(--hairline);
        }

        /* ---------- catalog grid (shared card style) ---------- */
        .tm-catalog-item-list {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px 20px;
        }

        .tm-catalog-item {
            list-style: none;
        }

        .tm-catalog-item .card-inner {
            background: var(--paper);
            border-radius: 4px;
            padding: 8px 8px 14px;
            box-shadow: 0 1px 0 var(--paper-shadow), 0 14px 30px -18px rgba(0,0,0,0.7);
            transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
        }

        .tm-catalog-item:hover .card-inner {
            transform: translateY(-6px) rotate(-0.6deg);
            box-shadow: 0 1px 0 var(--paper-shadow), 0 22px 36px -18px rgba(0,0,0,0.75);
        }

        .tm-thumbnail-container {
            position: relative;
            aspect-ratio: 9 / 16;
            background: #111;
            border-radius: 2px;
            overflow: hidden;
        }

        .tm-catalog-item-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            filter: saturate(0.96) contrast(1.02);
            transition: transform .5s ease;
        }

        .tm-catalog-item:hover .tm-catalog-item-img {
            transform: scale(1.045);
        }

        .tm-img-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
        }

        .tm-overlay-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: var(--gold);
            color: var(--ink);
            font-size: 0.8rem;
            opacity: 0.95;
            transform: scale(0.8);
            transition: all .25s ease;
        }

        .tm-catalog-item:hover .tm-overlay-icon {
            opacity: 1;
            transform: scale(1);
        }

        .tm-catalog-item-description {
            padding: 12px 3px 2px;
        }

        .tm-catalog-item-title {
            font-family: 'Noto Serif Thai', serif;
            font-weight: 600;
            font-size: 0.85rem;
            line-height: 1.5;
            color: var(--text-on-paper);
            margin: 0;
            overflow-wrap: anywhere;
            position: relative;
            padding-left: 13px;
            text-align: left;
        }

        .tm-catalog-item-title::before {
            content: ".";
            position: absolute;
            left: -3px;
            top: -5px;
            font-family: 'Noto Serif Thai', serif;
            font-size: 1.25rem;
            color: var(--rust);
        }

        .tm-catalog-item-title a { transition: color .2s ease; }
        .tm-catalog-item-title a:hover { color: var(--rust); }

        /* ---------- footer ---------- */
        footer {
            border-top: 1px solid var(--hairline);
            padding: 28px 0 40px;
            margin-top: 20px;
        }

        footer .footer-note {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.68rem;
            letter-spacing: 0.1em;
            color: #756b58;
            text-align: center;
            text-transform: uppercase;
        }
.idiom-badge {
    color: #ea580c;
    background: #ffedd5;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .15rem .5rem;
    font-size: .75rem;
    font-weight: 600;
    display: inline-block;
}
.item-number {
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    font-size: .9rem;
    font-weight: 700;
display: inline-flex;
}

        /* ---------- responsive ---------- */
        @media (max-width: 1000px) {
            .tm-catalog-item-list {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 900px) {
            .tm-video-layout {
                grid-template-columns: 1fr;
            }

            .tm-video-frame {
                max-width: 300px;
                margin: 0 auto;
            }
        }

        @media (max-width: 767px) {
            .header-inner { padding: 16px 20px; }
            .wordmark .brand { font-size: 1.2rem; }
            .navbar-toggler { display: inline-flex; }
            .collapse.navbar-collapse {
                display: none;
                position: absolute;
                top: 100%;
                right: 0;
                left: 0;
                background: var(--ink-soft);
                border-bottom: 1px solid var(--hairline);
                padding: 16px 20px;
            }
            .collapse.navbar-collapse.show { display: block; }
            #tm-main-nav .navbar-nav { flex-direction: column; gap: 14px; }
            .tm-content-container { padding: 28px 18px 18px; }
            .tm-video-title { font-size: 1.5rem; }
            .tm-catalog-item-list { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
            .tm-catalog-item-title { font-size: 0.78rem; }
        }
